Difference between revisions of "Signal path of motor drive"

From Granite Devices Knowledge Wiki
Jump to: navigation, search
[checked revision][checked revision]
(Setpoint signal path)
 
(27 intermediate revisions by one other user not shown)
Line 3: Line 3:
 
[[Setpoint]] signal path converts user setpoint to ''internal setpoint''.  
 
[[Setpoint]] signal path converts user setpoint to ''internal setpoint''.  
  
;Signal path consists following main parts
+
===Setpoint signal path===
*Input multiplier. Purpose of this is to increase resolution of input setpoint to allow more fine grained velocity & acceleration control in trajectory planner. By default [[MUL]] value is 50.
+
Main parts are:
 +
*Input multiplier. Purpose of this is to increase resolution of input setpoint to allow more fine grained velocity & acceleration control in trajectory planner. By default {{param|MUL}} value is 50.
 
*Setpoint smoothing filter. If enabled, applies low pass filter to signal reducing jitter and roughness of signal but also introduces about some delay. By default the filter has 100% attenuation at 250Hz.
 
*Setpoint smoothing filter. If enabled, applies low pass filter to signal reducing jitter and roughness of signal but also introduces about some delay. By default the filter has 100% attenuation at 250Hz.
*Trajectory planner. This limits rate of change of setpoint signal based on [[CVL]] and [[CAL]] parameters. Output rate maximum rate of change:
+
*[[Trajectory planner]]. This limits rate of change of setpoint signal based on {{param|CVL}} and {{param|CAL}} parameters. Output rate maximum rate of change:
**Velocity changes max [[CAL]] nubmer of units per [[control cycle]] (control cycle is 400µs in most GD drives)
+
**Velocity changes max {{param|CAL}} nubmer of units per [[control cycle]] (control cycle is 400µs in most GD drives)
**Velocity maximum value is limited to [[CVL]]
+
**Velocity maximum value is limited to {{param|CVL}}
*Input divider. This divides setpoint signal by [[DIV]] to give desired output scale for ''internal setpoint''. Combination of multiplier and divider can be used change total scaling of setpoint signal.
+
*Input divider. This divides setpoint signal by {{param|DIV}} to give desired output scale for ''internal setpoint''. Combination of multiplier and divider can be used change total scaling of setpoint signal.
 +
 
  
;Internal setpoint matches feedback signals in position and velocity modes. The scale of feedback signals are
 
*Position feedback: position sensor [[Quadrature|counter]] raw value
 
*Velocity feedback: number of feedback device [[Quadrature|counts]] per one [[control cycle]]. Obtained by calculating the difference of position feedback values at every control cycle.
 
*Torque: hardware specific scale, however '''Torque scaler''' knows the hardware scale and scales internal setpoint so that value of +/-16384 represents full torque scale (i.e. internal setpoint value 16384 outputs configured peak current [[MMC]] and 8192 outputs [[MMC]]/2)
 
 
[[File:Driveblockdiagram setpoint v1.png|900px]]
 
[[File:Driveblockdiagram setpoint v1.png|900px]]
 +
 +
===Setpoint source scales===
 +
Different [[setpoint]] sources have different range and scale:
 +
{| class="wikitable"
 +
|-
 +
! Setpoint source !! Type !! Range !! Scale
 +
|-
 +
| Pulse & directon || Incremental || Infinite ||
 +
* Position and torque mode: one pulse changes setpoint by one
 +
* Velocity mode: pulse frequency input, setpoint = number of pulses per [[control cycle]]
 +
|-
 +
| Quadrature || Incremental || Infinite ||
 +
* Position and torque mode: one edge of either channel changes setpoint by one
 +
* Velocity mode: frequency input, setpoint = number of edges of either channel per [[control cycle]]
 +
|-
 +
| PWM || rowspan="2" |Absolute || Full input scale equals setpoint range of +/-16384. In loss of PWM signal, setpoint is 0. || rowspan="3" |
 +
*Direct 1:1 absolute value in position mode
 +
*Velocity & torque mode: +/-16384 represents full torque or speed scale
 +
|-
 +
| Analog || Full input scale equals setpoint range of +/-16384
 +
|-
 +
| Serial ([[SimpleMotion V2]]) || Absolute & incremental || Infinite
 +
|}
 +
 +
It should be noted that trajectory planner operates after multiplier meaning that {{param|CVL}} velocity limit value is not in equal scale with velocity setpoint value.
 +
 +
===Internal setpoint===
 +
Internal setpoint is a predefined setpoint scale inside the drive. The scale of internal setpoint signals are:
 +
*Position mode: position sensor [[Quadrature|counter]] raw value
 +
*Velocity mode: internal goes through '''Velocity normalized''' that changes scales depending on setpoint source:
 +
**In PWM & Analog source: Internal setpoint of +/-16384 represents whole speed range covered by {{param|CVL}} parameter. I.e. 10V input to analog input runs motor at 100% speed and -5V at -50% etc.
 +
**In all other sources: number of feedback device [[Quadrature|counts]] per one [[control cycle]]. Obtained by calculating the difference of position feedback values at every control cycle.
 +
*Torque mode: '''Torque normalizer''' scales internal setpoint so that value of +/-16384 represents full torque scale (i.e. internal setpoint value 16384 outputs configured peak current {{param|MMC}} and 8192 outputs {{param|MMC}}/2)
  
 
==Controller==
 
==Controller==
 
The default controller type of GD drives is cascaded type where each controlled variable has it's own PI or P controller. In position mode such structure is called as PIV controller.
 
The default controller type of GD drives is cascaded type where each controlled variable has it's own PI or P controller. In position mode such structure is called as PIV controller.
[[File:Driveblockdiagram controller.png|800px]]
 
  
[[Category:Argon user guide]]
+
The block diagram below represents simplified structure of GD drives.
 +
 
 +
 
 +
[[File:Driveblockdiagram controller.png|898x898px]]
 +
 
 +
<nowiki>*</nowiki>) Update rates may be drive model specific. 2500 Hz and 20 kHz apply for most drives including IONI and ATOMI. However, torque control domain on ARGON is 17500 Hz.
 +
==Calculation formulas and examples==
 +
These examples focus on calculating values on a rotary motor and linear axis.
 +
===Constants used later in calculations===
 +
Assuming control cycle to be 400µs / 2500 Hz (default in GD drives):
 +
 
 +
<math>f=2500</math>
 +
 
 +
Calculation of how many counts the [[feedback devices|feedback device]] produces per one physical unit:
 +
 
 +
<math>X_{FeedbackDeviceCountsPerUnit}=4\frac{P_{FBR}}{P_{AXS}}</math>
 +
 
 +
AXS is a number that tells how many physical lenght units (such as millimeters a linear axis) translates per one rotary motor revolution.
 +
 
 +
===Example 1 - Calculating setpoint in position mode===
 +
Here we convert physical units (such as millimeters) to setpoint value in position control mode:
 +
 
 +
<math>setpoint=\frac{P_{MUL}}{P_{DIV}}*D_{DesiredPosition}*X_{FeedbackDeviceCountsPerUnit}</math>
 +
 
 +
===Example 2 - Calculating value for CVL parameter===
 +
Here we convert speed (such as mm/sec, or whatever lenght units AXS represents) to {{param|CVL}} value:
 +
 
 +
<math>P_{CVL}=\frac{V_{DesiredSpeedLimit}*X_{FeedbackDeviceCountsPerUnit}*P_{DIV}}{f}</math>
 +
 
 +
===Example 3 - Calculating value for CAL parameter===
 +
Here we convert speed (such as mm/sec<sup>2</sup>, or whatever lenght units AXS represents) to {{param|CAL}} value:
 +
 
 +
<math>P_{CAL}=\frac{A_{DesiredAccelerationLimit}*X_{FeedbackDeviceCountsPerUnit}*P_{DIV}}{f^2}</math>
 +
 
 +
In alternative method we don't need acceleration value, but just time <math>t</math> in seconds to define how long motor should take to accelerate from zero speed to maximum speed defined by CAL:
 +
 
 +
<math>P_{CAL}=\frac{P_{CVL}}{tf}</math>
 +
 
 +
{{tip|Granity calculates real world units thus it can be used to calculate and experiment with the scales. As scales are linear, interpolation of values is viable choice.}}
 +
 
 +
==See also==
 +
*[[Trajectory planner]]
 +
 
 
[[Category:Development]]
 
[[Category:Development]]
 +
[[Category:Glossary]]
 +
[[Category:Argon_user_guide]]

Latest revision as of 10:37, 6 April 2021

In Granite Devices drives the torque, velocity and position limits and setpoints are defined as integer numbers. The vales are represented "hardware" scale which are described below.

Setpoint signal path[edit | edit source]

Setpoint signal path converts user setpoint to internal setpoint.

Setpoint signal path[edit | edit source]

Main parts are:

  • Input multiplier. Purpose of this is to increase resolution of input setpoint to allow more fine grained velocity & acceleration control in trajectory planner. By default Setpoint multiplierMUL value is 50.
  • Setpoint smoothing filter. If enabled, applies low pass filter to signal reducing jitter and roughness of signal but also introduces about some delay. By default the filter has 100% attenuation at 250Hz.
  • Trajectory planner. This limits rate of change of setpoint signal based on Velocity limitCVL and Acceleration limitCAL parameters. Output rate maximum rate of change:
    • Velocity changes max Acceleration limitCAL nubmer of units per control cycle (control cycle is 400µs in most GD drives)
    • Velocity maximum value is limited to Velocity limitCVL
  • Input divider. This divides setpoint signal by Setpoint dividerDIV to give desired output scale for internal setpoint. Combination of multiplier and divider can be used change total scaling of setpoint signal.


Driveblockdiagram setpoint v1.png

Setpoint source scales[edit | edit source]

Different setpoint sources have different range and scale:

Setpoint source Type Range Scale
Pulse & directon Incremental Infinite
  • Position and torque mode: one pulse changes setpoint by one
  • Velocity mode: pulse frequency input, setpoint = number of pulses per control cycle
Quadrature Incremental Infinite
  • Position and torque mode: one edge of either channel changes setpoint by one
  • Velocity mode: frequency input, setpoint = number of edges of either channel per control cycle
PWM Absolute Full input scale equals setpoint range of +/-16384. In loss of PWM signal, setpoint is 0.
  • Direct 1:1 absolute value in position mode
  • Velocity & torque mode: +/-16384 represents full torque or speed scale
Analog Full input scale equals setpoint range of +/-16384
Serial (SimpleMotion V2) Absolute & incremental Infinite

It should be noted that trajectory planner operates after multiplier meaning that Velocity limitCVL velocity limit value is not in equal scale with velocity setpoint value.

Internal setpoint[edit | edit source]

Internal setpoint is a predefined setpoint scale inside the drive. The scale of internal setpoint signals are:

  • Position mode: position sensor counter raw value
  • Velocity mode: internal goes through Velocity normalized that changes scales depending on setpoint source:
    • In PWM & Analog source: Internal setpoint of +/-16384 represents whole speed range covered by Velocity limitCVL parameter. I.e. 10V input to analog input runs motor at 100% speed and -5V at -50% etc.
    • In all other sources: number of feedback device counts per one control cycle. Obtained by calculating the difference of position feedback values at every control cycle.
  • Torque mode: Torque normalizer scales internal setpoint so that value of +/-16384 represents full torque scale (i.e. internal setpoint value 16384 outputs configured peak current Peak current limitMMC and 8192 outputs Peak current limitMMC/2)

Controller[edit | edit source]

The default controller type of GD drives is cascaded type where each controlled variable has it's own PI or P controller. In position mode such structure is called as PIV controller.

The block diagram below represents simplified structure of GD drives.


Driveblockdiagram controller.png

*) Update rates may be drive model specific. 2500 Hz and 20 kHz apply for most drives including IONI and ATOMI. However, torque control domain on ARGON is 17500 Hz.

Calculation formulas and examples[edit | edit source]

These examples focus on calculating values on a rotary motor and linear axis.

Constants used later in calculations[edit | edit source]

Assuming control cycle to be 400µs / 2500 Hz (default in GD drives):

$ f=2500 $

Calculation of how many counts the feedback device produces per one physical unit:

$ X_{FeedbackDeviceCountsPerUnit}=4\frac{P_{FBR}}{P_{AXS}} $

AXS is a number that tells how many physical lenght units (such as millimeters a linear axis) translates per one rotary motor revolution.

Example 1 - Calculating setpoint in position mode[edit | edit source]

Here we convert physical units (such as millimeters) to setpoint value in position control mode:

$ setpoint=\frac{P_{MUL}}{P_{DIV}}*D_{DesiredPosition}*X_{FeedbackDeviceCountsPerUnit} $

Example 2 - Calculating value for CVL parameter[edit | edit source]

Here we convert speed (such as mm/sec, or whatever lenght units AXS represents) to Velocity limitCVL value:

$ P_{CVL}=\frac{V_{DesiredSpeedLimit}*X_{FeedbackDeviceCountsPerUnit}*P_{DIV}}{f} $

Example 3 - Calculating value for CAL parameter[edit | edit source]

Here we convert speed (such as mm/sec2, or whatever lenght units AXS represents) to Acceleration limitCAL value:

$ P_{CAL}=\frac{A_{DesiredAccelerationLimit}*X_{FeedbackDeviceCountsPerUnit}*P_{DIV}}{f^2} $

In alternative method we don't need acceleration value, but just time $ t $ in seconds to define how long motor should take to accelerate from zero speed to maximum speed defined by CAL:

$ P_{CAL}=\frac{P_{CVL}}{tf} $

See also[edit | edit source]