Table of Contents - TG Drives
Table of Contents - TG Drives Table of Contents - TG Drives
80 Reg, PID regulator GENERAL EXTENDED REGISTER GROUPS The regulator performs a central function in the system. It determines the torque needed to make the motor follow the speed and position commands at all times. It is a parallel PID type of regulator with several feed forward functions. It can be used in several configurations dependant on the applications characteristics. It operates with 1 kHz update rate. The output is a normalized value of the torque calculated each servo cycle. This output is then used by the commutation logic to create two sinusoidal currents. FUNCTION Reg.PosErr Reg.SpdErr Reg.IErr Reg.SpdErr Reg.TorqLim Reg.TorqPLim Reg.TorqNLim Reg.TorqTime Reg.TorqCLim Reg.PGain Reg.IGain Reg.DGain RELATED ITEMS Pg.Apos Pg.ASpeed EXAMPLE USAGE . Reg.TorqLim,8000 Reg.TorqCLim,2000 Reg.TorqTime,500 or Reg.Mode,64 . The inputs to the regulator are the command values for position, speed and acceleration. Each ms the difference between the command values and the actual values are calculated. The acceleration is used only for the feed forward parts. The position error is used in the Proportional and the Integral part, and the speed error is used in the Derivative part. The feed forward parts are Inertia compensation, Viscous friction, Static friction and Torque. These parts makes up the output which is passed trough a limiting function. There are three different limits, maximum positive torque (Reg.TorqPLim), maximum negative torque (Reg.TorqNLim) and maximum continuous torque (Reg.TorqLim). The output torque is always limited to the range bounded by Reg.TorqPLim and Reg.TorqNLim. If enabled, an additional function will limit the output to Reg.TorqLim. If the output has been larger than this limit for more than Reg.TorqTime [ms]. This can be seen as a dynamic torque limit. By adjusting these limits to proper values, the motor can be protected from excessive overheating, permitting the thermal sensor in the motor windings to be able to react fast enough. The gain and other tuning parameters must be calculated and/or established by testing for each application. Command value for position. Command value for speed. ;set maximum torque limit ;set continuos limit to 25 % ;allow 500 ms of max. torque ;activate dynamic torque limit User's Manual 5.1 Inmotion Technologies AB Doc. No.9032 0027 01 (B), Rev. 11.07.2001
EXTENDED REGISTER GROUPS GROUP MEMBERS (GROUP 6) Group.Member Member No Reg.Mode 0 0..255 R(W) Bit-defined, 1. Defines the integration modes of the regulator. Bit 0 and 1 are status bits, showing the internal regulator modes. When Bit3 is activated, the Reg.PGain value must be decreased or set to zero. If both Bit2 and Bit3 are activated (and for simplicity Reg.PGain = 0), we have a Position regulator with integration of position error and speed error. This has the effect of reducing the speed, which with the regulator returns the motor to the correct position after a large position error. The maximum return speed is calculated as (FS = SampleFrequency = 1000 Hz). Re g. SpdErr Re g . PErrLim = Re g. SiScale FS * 2 Thus, the maximum return speed can be calculated to: Re g. PErrLim FS Re g. SiScale 2 Bit0 (1) Integrate up enabled. R Bit1 (2) Integrate down enabled. R Bit2 (4) Integrate from limited Reg.PosErr. RW Bit3 (8) Integrate from unlimited Reg.SpdErr / FS * 2 Reg.SiScale RW Bit4 (16) Enable simple digital filter. RW Bit5 (32) Activates the Torque cam, Gear.Campos is used as SetTorq Bit6 (64) This bit is set to enable the use of Reg.TorqCLim. Bit7 (128) When this bit is set the result of the regulator is to be discarded. Bit2 = 0 Bit3 = 0 Reg.Pgain 0 Bit2 = 0 Bit3 = 0 Reg.Pgain = 0 Bit2 = 1 Bit3 = 0 Reg.PGain0 Bit2 = 0 Bit3 = 1 Reg.PGain = 0 Position regulator without integration. When both Bit2 and Bit3 are Zero and Reg.PGain is non-zero, the result is a position regulator without integration. Speed regulator without integration. When both Bit2 and Bit3 are Zero and Reg.PGain is zero, the result is a speed regulator without integration. Bit2 is activated when a position regulator with integration of position error is desired. Bit3 is activated when a velocity regulator with integration of speed error is desired. Reg.PGain 1 -2 31 ..2 31 -1 RW Reg, PID regulator Range Ability The Proportional or Position feedback gain of the regulator. A value of 1024 corresponds in 1 unit of Torque generated for 1 unit of position error. Limited by Firmware, not alarmed if a value is written, only a smaller value is read. User's Manual 5.1 Inmotion Technologies AB Doc. No.9032 0027 01 (B), Rev. 11.07.2001 81
- Page 30 and 31: 30 Compiler Symbols PL2 NATIVE POSI
- Page 32 and 33: 32 Compiler directives PL2 NATIVE P
- Page 34 and 35: 34 Compiler directives Warnings: No
- Page 36 and 37: 36 Spline function compilation dire
- Page 38 and 39: 38 Multiline Macro MACRO DEFINITION
- Page 41 and 42: PL2 Mnemonics GENERAL The general f
- Page 43 and 44: PL2 MNEMONICS Standard set Mnemonic
- Page 45 and 46: PL2 MNEMONICS TRACE RELATED MNEMONI
- Page 47 and 48: PL2 MNEMONICS Indexed Addressing Mn
- Page 49 and 50: PL2 MNEMONICS If r_length < r_Membe
- Page 51 and 52: PL2 MNEMONICS Text mode \000 Intern
- Page 53 and 54: Extended register groups INTRODUCTI
- Page 55 and 56: EXTENDED REGISTER GROUPS STACK HAND
- Page 57 and 58: EXTENDED REGISTER GROUPS RD1, Resol
- Page 59 and 60: EXTENDED REGISTER GROUPS RD1, Resol
- Page 61 and 62: EXTENDED REGISTER GROUPS RD1.FiltSp
- Page 63 and 64: EXTENDED REGISTER GROUPS RD2, Resol
- Page 65 and 66: EXTENDED REGISTER GROUPS RD2, Resol
- Page 67 and 68: EXTENDED REGISTER GROUPS RD2.ChkLow
- Page 69 and 70: EXTENDED REGISTER GROUPS Pos Inc Pr
- Page 71 and 72: EXTENDED REGISTER GROUPS Pg.ASpeed
- Page 73 and 74: EXTENDED REGISTER GROUPS MOTOR, MOT
- Page 75 and 76: EXTENDED REGISTER GROUPS 2-Pole: 81
- Page 77 and 78: EXTENDED REGISTER GROUPS Motor.Base
- Page 79: EXTENDED REGISTER GROUPS REG, PID R
- Page 83 and 84: EXTENDED REGISTER GROUPS Positive T
- Page 85 and 86: EXTENDED REGISTER GROUPS Reg, PID r
- Page 87 and 88: EXTENDED REGISTER GROUPS Gear.Incr
- Page 89 and 90: EXTENDED REGISTER GROUPS GROUP MEMB
- Page 91 and 92: EXTENDED REGISTER GROUPS Gear, Elec
- Page 93 and 94: EXTENDED REGISTER GROUPS TMR, SYSTE
- Page 95 and 96: EXTENDED REGISTER GROUPS Tmr, Syste
- Page 97 and 98: EXTENDED REGISTER GROUPS RELATED IT
- Page 99 and 100: EXTENDED REGISTER GROUPS SysIo.ADC1
- Page 101 and 102: EXTENDED REGISTER GROUPS Bit10 (102
- Page 103 and 104: EXTENDED REGISTER GROUPS INT, INTER
- Page 105 and 106: EXTENDED REGISTER GROUPS Bit2 (4) =
- Page 107 and 108: EXTENDED REGISTER GROUPS Int, Inter
- Page 109 and 110: EXTENDED REGISTER GROUPS IN, DIGITA
- Page 111 and 112: EXTENDED REGISTER GROUPS X7A:6. In.
- Page 113 and 114: EXTENDED REGISTER GROUPS X7B:33. Ou
- Page 115 and 116: EXTENDED REGISTER GROUPS GROUP MEMB
- Page 117 and 118: EXTENDED REGISTER GROUPS Vector, In
- Page 119 and 120: EXTENDED REGISTER GROUPS CAPTURE, C
- Page 121 and 122: EXTENDED REGISTER GROUPS CAPTURE, C
- Page 123 and 124: EXTENDED REGISTER GROUPS CAPTURE, C
- Page 125 and 126: EXTENDED REGISTER GROUPS Ana.ConnTM
- Page 127 and 128: EXTENDED REGISTER GROUPS EEPROM Gro
- Page 129 and 130: EXTENDED REGISTER GROUPS Bit(0..3)
EXTENDED REGISTER GROUPS<br />
GROUP MEMBERS (GROUP 6)<br />
Group.Member Member<br />
No<br />
Reg.Mode 0 0..255 R(W)<br />
Bit-defined, 1. Defines the integration modes <strong>of</strong> the regulator. Bit 0<br />
and 1 are status bits, showing the internal regulator modes. When<br />
Bit3 is activated, the Reg.PGain value must be decreased<br />
or set to<br />
zero. If both Bit2 and Bit3 are activated (and for simplicity<br />
Reg.PGain = 0), we have a Position regulator with integration <strong>of</strong><br />
position error and speed error. This has the effect <strong>of</strong> reducing the<br />
speed, which with the regulator returns the motor to the correct<br />
position after a large position error.<br />
The maximum return speed is calculated as<br />
(FS = SampleFrequency = 1000 Hz).<br />
Re g.<br />
SpdErr<br />
Re g . PErrLim = Re g.<br />
SiScale<br />
FS * 2<br />
Thus, the maximum return speed can be calculated to:<br />
Re<br />
g.<br />
PErrLim<br />
FS Re g.<br />
SiScale<br />
2<br />
Bit0 (1) Integrate up enabled. R<br />
Bit1 (2) Integrate down enabled. R<br />
Bit2 (4) Integrate from limited Reg.PosErr. RW<br />
Bit3 (8) Integrate from unlimited<br />
Reg.SpdErr / FS * 2 Reg.SiScale<br />
RW<br />
Bit4 (16) Enable simple digital filter. RW<br />
Bit5 (32) Activates the Torque cam, Gear.Campos is used as SetTorq<br />
Bit6 (64) This bit is set to enable the use <strong>of</strong> Reg.TorqCLim.<br />
Bit7 (128) When this bit is set the result <strong>of</strong> the regulator is to be discarded.<br />
Bit2 = 0<br />
Bit3 = 0<br />
Reg.Pgain 0<br />
Bit2 = 0<br />
Bit3 = 0<br />
Reg.Pgain = 0<br />
Bit2 = 1<br />
Bit3 = 0<br />
Reg.PGain0<br />
Bit2 = 0<br />
Bit3 = 1<br />
Reg.PGain = 0<br />
Position regulator without integration. When both Bit2 and Bit3 are<br />
Zero and Reg.PGain is non-zero,<br />
the result is a position regulator<br />
without integration.<br />
Speed regulator without integration. When both Bit2 and Bit3 are<br />
Zero and Reg.PGain is zero,<br />
the result is a speed regulator without<br />
integration.<br />
Bit2 is activated when a position regulator with integration <strong>of</strong> position<br />
error is desired.<br />
Bit3 is activated when a velocity regulator with integration <strong>of</strong> speed<br />
error is desired.<br />
Reg.PGain 1 -2 31 ..2 31 -1 RW<br />
Reg, PID regulator<br />
Range Ability<br />
The Proportional or Position feedback gain <strong>of</strong> the regulator. A value<br />
<strong>of</strong> 1024 corresponds in 1 unit <strong>of</strong> Torque generated for 1 unit <strong>of</strong><br />
position error. Limited by Firmware, not alarmed if a value is written,<br />
only a smaller value is read.<br />
User's Manual 5.1 Inmotion Technologies AB<br />
Doc. No.9032 0027 01 (B), Rev. 11.07.2001<br />
81