0% found this document useful (0 votes)
298 views109 pages

8-Power PMAC Motor Setup Elements 2012-08

Uploaded by

Owais Jafri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
298 views109 pages

8-Power PMAC Motor Setup Elements 2012-08

Uploaded by

Owais Jafri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 109

DELTA TAU

Data Systems, Inc.

Power PMAC Motor Setup Elements


August 2012

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 1
data
DELTA TAU
Data Systems, Inc.

What is a Power PMAC Motor?


• A set of algorithms that execute repeatedly (not all need to be used)
– Trajectory generation: equation calculation and interpolation
– Servo loop closure: feedback and feedforward
– Phase algorithms: commutation and current-loop closure
– Housekeeping: fault detection and status update
• A set of memory registers organized in a data structure
– Saved setup data structure elements
– (Unsaved) control elements
– Status elements
• Links to input/output registers to connect to real world
– Defined by “addressing” saved setup elements
– Use real I/O registers to tie to physical actuator and sensor(s)
– Use network registers to communicate over network (e.g. MACRO)
– Can use memory registers for virtual motor functionality
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 2
data
DELTA TAU
Data Systems, Inc.

Power PMAC Motor Numbering


• Motor numbers start at zero (#0)
• User sets maximum number of motors with Sys.MaxMotors
– Default = 32, highest value = 256
– Highest usable motor number is (Sys.MaxMotors - 1)
– Setting larger than necessary adds to backup file size, some to CPU loading
• Auto-assignment of servo I/O (on re-initialization) to motors starts with
Motor 1 (#1)
– Most users will not utilize #0 for control of physical motor
– User servo algorithm for #0 is useful for custom pre-processing of servo
data
– Virtual motor on #0 can be useful (e.g. electronic line shaft)
• #x data structure elements use Motor[x].{element name}
• “Legacy” I-variable support for existing functions on Motors 0 – 31
– Ix00 – Ix99 for Motor x
– Note that I0 – I99 are now for Motor 0 (not global)
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 3
data
DELTA TAU
Data Systems, Inc.

Step-by-Step IDE Motor Setup

• From IDE “Tools”


menu, select “System
Setup”
• Select “Motors” from
left section of pop-up
window
• Select “Motor #” for
existing motor, or “Add
Motor” for new
• Proceed through setup
controls in right
section

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 4
data
DELTA TAU
Data Systems, Inc.

Interactive IDE Motor Saved Element Setup


• From IDE “Delta Tau”
menu, select
“Configure”, then
“Setup Variables”
• Select “Motor” then
motor number, and
“Setup Elements” from
left section of pop-up
window
• Select category of
setup element
• Select element from
right section to view or
modify

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 5
data
DELTA TAU
Data Systems, Inc.

Motor Functionality Enabling Elements


• Motor[x].ServoCtrl specifies servo interrupt tasks for motor
= 0: inactive – no servo tasks done
= 1: active in “standard” mode, trajectory and servo-loop tasks done
= 8: active in “gantry follower” mode; servo-loop tasks done, but no trajectory
generation (can use trajectory from Motor[x].CmdMotor)
– Active motor is not necessarily enabled
• Motor[x].PhaseCtrl specifies phase interrupt tasks for motor
= 0: inactive – no tasks done in phase interrupt
= 1: commutation done with “packed” (2 16-bit phase values in 1 32-bit register
data (using PMAC3 IC in default mode)
= 4: commutation done with “unpacked” data (1 phase value per register) – must be
used with PMAC2 IC or any MACRO IC
= 8: servo loop closure in phase interrupt – for very high bandwidth actuators
• Motor[x].pAdc specifies current loop enabling in phase interrupt
= 0: No current loop closure
> 0: Current loop closure, sets feedback address
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 6
data
DELTA TAU
Data Systems, Inc.

Controller/Drive Task Division Possibilities


Desired Position
Desired Velocity
Desired Torque
Desired Phase Currents
Desired Phase Voltages
+
Trajectory + +
Position Velocity Phase Current Power
Generation + -
Filter Filter Commutation Filters Modulation
Interpolation - -
-

d
dt Phase Currents

Position
E Motor
Position-
Mode Drive
Velocity-
Mode Drive
Torque-
Mode Drive
Sinewave-
Mode Drive
Direct PWM-
Mode Drive

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 7
data
DELTA TAU
Data Systems, Inc.

Power PMAC Motor Control Modes


• Position output command
– No feedback loops closed in Power PMAC
– Numerical output to networked positioning drive
– Analog output to galvanometer controller with analog position loop
• Velocity output command
– Position loop closed in Power PMAC
– Analog output to velocity-mode servo drive or hydraulic servo valve control
– Pulse-and-direction output to stepper drive
• Torque output command
– Position and velocity loops closed in Power PMAC
– Analog output to torque-mode servo drive
• Sinewave (phase current) commands
– Position and velocity loops closed, commutation done in Power PMAC
– Dual analog outputs to sine-input servo drive
• Direct PWM (phase voltage) commands
– Position, velocity, current loops closed, commutation done in Power PMAC
– 3-phase PWM commands to power-block amplifier
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 8
data
DELTA TAU
Data Systems, Inc.
Motor Addressing Elements
• Saved setup elements that specify the address of registers to be used for
motor input and output functions
• Name of element starts with “p” (pointer to) – e.g. Motor[x].pLimits
• Value usually given as {register element}.a – e.g.
Gate1[4].Chan[0].Status.a
– “a” means “address of”
– User does not need to know numerical value of address
• Servo function addressing elements: Motor[x].pDac, pEnc, pEnc2,
pMasterEnc
• Flag function addressing elements: Motor[x].pLimits, pAmpEnable,
pAmpFault, pCaptFlag, pCaptPos, pEncStatus, pEncCtrl, pEncLoss
• Phase function addressing elements: Motor[x].pPhaseEnc, pAdc,
pSineTable, pVoltSineTable
• Power-on function addressing elements: Motor[x].pAbsPos,
pAbsPhasePos
• Default settings made on re-initialization based on hardware present
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 9
data
DELTA TAU
Data Systems, Inc.

Motor Servo Addressing Elements


• Motor[x].pDac // Command output address
= Gaten[i].Chan[j].Pwm[0].a // PMAC Servo IC PWM “A” output
= Gaten[i].Chan[j].Dac[0].a // PMAC Servo IC DAC “A” output*
= Gaten[i].Chan[j].Pfm.a // PMAC Servo IC PFM (P&D) output*
= Gate2[i].Macro[j][0].a // PMAC2 MACRO IC node k
output
= Gate3[i].MacroOutα[j][0].a // PMAC3 IC MACRO IC A/B node k output
• Motor[x].pEnc // Outer (pos) loop feedback address
• Motor[x].pEnc2 // Inner (vel) loop feedback address
= EncTable[n].a // Address of “nth” table entry result
– Feedback must come through encoder conversion table (ECT)
– For single-feedback systems (most common), .pEnc and .pEnc2 use same
address
– For dual-feedback systems (motor and load), .pEnc has address of load
sensor data, .pEnc2 has address of motor sensor data

* Shares address with PWM register; reports back as PWM registerUMAC Turbo
address Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 10
data
DELTA TAU
Data Systems, Inc.

Motor and Load Feedback Issues

• Best accuracy from load sensor (more direct measurement)


• Best stability from motor sensor (coupling imperfections outside of loop)
• Outer (position) loop determines accuracy
• Inner (velocity) loop determines stability
• Best performance comes from dual motor/load feedback
– Is it worth it?
– Intermediate solution uses corrections on motor sensor
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 11
data
DELTA TAU
Data Systems, Inc.
Motor Input-Flag Addressing Elements
• Motor[x].pEncStatus // “Parent” input-flag address
– Used to set other input-flag variables when Motor[x].EncType is set
– If other input-flag address variables equal to this, no re-read of register
• Motor[x].pCaptFlag // Capture/trigger flag address
• Motor[x].CaptFlagBit // Bit # of trigger in register
• Motor[x].pLimits // HW overtravel limit flag address*
• Motor[x].LimitBits // Bit # of PLIM flag (MLIM is one
higher)
• Motor[x].pAmpFault // Amplifier-fault flag address*
• Motor[x].AmpFaultBit // Bit # of fault flag in register
• Motor[x].AmpFaultLevel // 0 = low-true fault; 1 = high-true fault
• Common addresses used:
= Gate1[i].Chan[j].Status.a // PMAC2 Servo IC channel input flags
= Gate2[i].Macro[j][3].a // PMAC2 MACRO IC node input flags
= Gate3[i].Chan[j].Status.a // PMAC3 IC servo channel input flags
= Gate3[i].MacroInα[j][3].a // PMAC3 IC MACRO
UMAC Turbo A/B node input
Turbo PMAC PCIflags Geo Drive

* Set to 0 to disable function


motion
Single Source Machine Control logic 12
data
DELTA TAU
Data Systems, Inc.

Motor Output-Flag Addressing Elements


• Motor[x].pEncCtrl // “Parent” output-flag address
– Used to set other output-flag variables when Motor[x].EncType is set
– If other output-flag address variables equal to this, no re-read of register
– Used to handshake flags over MACRO ring
• Motor[x].pAmpEnable // Amplifier enable flag address*
• Motor[x].AmpEnableBit // Bit # of enable flag in register
• Common addresses used:
= Gate1[i].Chan[j].Ctrl.a // PMAC2 Servo IC channel output
flags
= Gate2[i].Macro[j][3].a // PMAC2 MACRO IC node output
flags
= Gate3[i].Chan[j].OutCtrl.a // PMAC3 IC servo channel output flags
= Gate3[i].MacroOutα[j][3].a // PMAC3 IC MACRO A/B node output flags

* Set to 0 to disable function


UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 13
data
DELTA TAU
Data Systems, Inc.

“Encoder Type” Specification


• Motor[x].EncType specifies feedback and ASIC type used
= 1: Quadrature encoder, no extension, PMAC2 IC
= 2: Quadrature encoder, 1/T extension, PMAC2 IC
= 3: Sinusoidal encoder, arctangent extension, PMAC2 IC
= 4: MACRO ring feedback, Type 1 protocol, PMAC2 or PMAC3 IC
= 5: Quadrature encoder, 1/T extension, PMAC3 IC
= 6: Sinusoidal encoder, arctangent extension, PMAC3 IC
• Set automatically on re-initialization based on detected servo interfaces
• When set to a value in the Script environment (even to same value):
– Flag bit numbers set to appropriate values for ASIC type
– Captured-position processing elements set to appropriate values for
feedback and ASIC type
• Intended to facilitate quick setting of many setup elements

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 14
data
DELTA TAU
Data Systems, Inc.
Motor Scale Factor Elements
• Provide pre-multiplication of feedback and master data (but not
trajectory command) into servo loop
• These work somewhat differently than in PMAC/Turbo PMAC due to
Power PMAC’s floating-point motor math
• Generally data comes out of ECT in raw units of counts or LSBs
• Motor[x].PosSf // Outer (pos) loop pre-scaling factor
– In motor units per source unit; effectively defines motor units
– Default value of 1.0 makes motor units be same as ECT output units
– Can use to scale motor units to mm, inches, degrees, etc.
– In kinematic apps, can be nice to have motors (“joints”) in user units
– Acts as gain term! – if changed, must change Servo.Kp to compensate;
also all motor settings that use position (e.g. .JogSpeed, FatalFeLimit)
– If use to scale to user units, axis definitions usually have unity scale factors
(e.g. #1->X, #2->Y) or kinematic definition (e.g. #1->I)
• Motor[x].Pos2Sf // Inner (vel) loop pre-scaling factor
– Simply pre-multiplies .pEnc2 source data before velocity feedback gain(s)
– Acts as an inner-loop gain term! UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 15
data
DELTA TAU
Data Systems, Inc.

Motor Scale Factors


EncTable[k].ScaleFactor CompTable[k].Sf[q]

Motor[x].MasterPosSf
Motor[x].CompDac

Motor[x].CompPos

+ +
+ + +
Motor[x].CoordSf[i] PI

Motor[x].DesPos
- -
D

Motor[x].ActPos2

+ +
CompTable[j].Sf[q] Motor[x].PosSf EncTable[j].ScaleFactor

Motor[x].CompPos2 Motor[x].Pos2
Motor[x].ActPos

+ +
CompTable[i].Sf[q] Motor[x].PosSf EncTable[i].ScaleFactor

Motor[x].CompPos Motor[x].Pos

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 16
data
DELTA TAU
Data Systems, Inc.

Multi-Axis Coordination Strategy


• One important strategy for
relating the action of two or
more axes together
• Works by directly tying the Coordination
Axis #1 Algorithm Axis #2
desired trajectories of the axes Desired Desired
Action Action
together
• In PMAC, put the axes in the
same “coordinate system” and Feedback Feedback
command on same program Algorithm Algorithm

line
• Requires that feedback on all
Axis #1 Axis #2
axes be tight enough to keep Actual Actual
Desired
desired physical tolerance Action
Relationship
Action

• “If you can coordinate, you


should.” Quality of coordinated
trajectories is higher than that
of slaved trajectories.
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 17
data
DELTA TAU
Data Systems, Inc.

Multi-Axis Master/Slave Strategy


• Alternate method for relating action
of two or more axes together Master
• Desired action of slave axes is Desired
Action
function of actual action of master
axis
• In PMAC, position following
(electronic gearing) is basic
Slaving
technique Master Algorithm Slave
Actual Desired
• External time-base (electronic cam) Action Action
is more advanced technique
• Quality of master-axis feedback Feedback
Algorithm
does not affect quality of Desired
Relationship
relationship
Slave
• Use when too difficult or too Actual
expensive to get tight feedback in Action

one axis – make that axis the


master
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 18
data
DELTA TAU
Data Systems, Inc.
Motor Position-Following Elements
• Provide “electronic gearing” functionality for master/slave motion
without the need to write motion programs
• Motor[x].pMasterEnc // Source address for master
position
– Must be set to address of ECT entry (e.g. = EncTable[0].a)
• Motor[x].MasterCtrl // Enable/disable, mode control
= 0: Following disabled, normal mode (programming origin fixed)
= 1: Following enabled, normal mode
= 2: Following disabled, offset mode (programming origin moves with following)
= 3: Following enabled, offset mode
• Motor[x].MasterPosSf // Master position scale factor
– Pre-multiplies data from ECT before added into net desired position
– Single 64-bit floating-point value (not ratio of integers as in Turbo PMAC)
– Expressed as motor units per source unit
– Acts as “gear ratio” (motor units per master unit)
– Default of 1.0 (for 1:1 gear ratio) UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 19
data
DELTA TAU
Data Systems, Inc.

Position-Following Enhancements
• Motor[x].SlewMasterPosSf // Specifies rate of change of ratio
= 0.0 disables rate control – get step changes in ratio
> 0.0 enables rate control, sets rate magnitude in change per servo cycle
– Used on enabling and disabling of following
– Used when Motor[x].MasterPosSf is changed
– Should be active when changing mode or ratio on the fly
• Motor[x].MasterMaxSpeed // Limit on speed from following
= 0.0 disables speed limiting
> 0.0 enables speed limiting, sets maximum following velocity magnitude
• Motor[x].MasterMaxAccel // Limit on accel/decel from
following
– Only used when Motor[x].MaxSpeed > 0.0
= 0.0 disables accel limiting, discards “excess” from speed limiting
> 0.0 enables accel limiting, keeps “excess” from limiting and uses when no
longer limited
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 20
data
DELTA TAU
Data Systems, Inc.

Position Following Limits


• Case 1: Speed limit only
– Following velocity saturates at
Motor[x].MasterMaxSpeed
– When request from master falls
below limit, velocity lock re-
established
– Does not “catch up” in position
• Case 2: Speed & accel limits
(but only speed limit exceeded)
– Following velocity saturates at
Motor[x].MasterMaxSpeed
– When request from master falls
below limit, slave stays at limit
to re-establish position lock
– Decelerates to stop at
Motor[x].MasterMaxAccel
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 21
data
DELTA TAU
Data Systems, Inc.

Position Following Limits


• Examples of engaging and
disengaging following on the fly
• Response is acceleration-limited
by Motor[x].MasterMaxAccel
• Overshoots in speed to re-
establish position
synchronization to that of time
of engaging or disengaging
• Case 1: Speed overshoot does
not hit speed limit
• Case 2: Speed overshoot
saturates at
Motor[x].MasterMaxSpeed

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 22
data
DELTA TAU
Data Systems, Inc.

Motor Automatic Safety Checks

• Following error limits


• Hardware overtravel limit switches
• Software overtravel position limit values
• Amplifier fault input signal
• Integrated current (I2T) limit
• Encoder-loss check
• Automatic brake engage/disengage control
• Commanded velocity limit
• Commanded acceleration and deceleration limits
• Commanded “jerk” (da/dt) limit

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 23
data
DELTA TAU
Data Systems, Inc.
Motor Following Error Limits
• Following error is difference between net desired position and net
actual position
– Calculated every servo cycle
– Stored in status element Motor[x].PosError
• Motor[x].FatalFeLimit – magnitude (in motor units) of maximum
following error that permits operation
– If exceeded, motor is “killed” immediately
– Other motors in C.S. killed or aborted, as set by Motor[x].FaultMode bit 0
– Intended for gross failures – e.g. no feedback, reversed feedback, major
obstruction
– Important to set tight limit on machine under development
– Good tuning reduces expected real errors, permits smaller value for this
• Motor[x].WarnFeLimit
– If exceeded, sets Motor[x].FeWarn status bit
– Bit can be used as “error trigger” for triggered moves if
Motor[x].CaptureMode = 2
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 24
data
DELTA TAU
Data Systems, Inc.

Hardware Overtravel Limit Switches


• Each motor can look for negative-end and positive-end limit switch
inputs
• Physically hitting switch stops motion
– Subsequent motion in opposite direction permitted
• Motor[x].pLimits specifies address of register to read for switch inputs
• Motor[x].LimitBits specifies which bits to use (n and n+1)
= 25 for PMAC2 IC limit inputs or for MACRO
= 9 for PMAC3 IC limit inputs
• Bit must read as 0 to be considered not in limit
– With Delta Tau hardware, 0 corresponds to closed (conducting) switch
– Requires use of normally closed limit switches
– Provides more failsafe configuration
• Closed-loop stop (“abort”) if Motor[x].FaultMode bit 2 = 0
• Open-loop stop (“kill”) if Motor[x].FaultMode bit 2 (value 4) = 1
(and have not already hit software limit)
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 25
data
DELTA TAU
Data Systems, Inc.
Software Overtravel Limits
• To prevent motion outside of legal position bounds for the motor
• Can be used in addition to, or instead of, hardware limit switches
– Should be set just to inside of hardware limit switches
• Defined by two saved setup elements
– Motor[x].MaxPos sets positive-end limit
– Motor[x].MinPos sets negative-end limit
– Both in motor units, referenced to motor zero position
– Both enabled if and only if MaxPos > MinPos
• Checks made at both move calculation time and move execution time
• At move calc time, checks move/segment destination against limits:
– Jog moves: Changes destination value (±∞ for indefinite) to limit if exceeded
(no error)
– Non-segmented program moves – if exceeded:
• Will not execute at all if Coord[x].SoftLimitStopDis = 0 (LimitStop error)
• Will change motor destination to limit if Coord[x].SoftLimitStopDis = 1 (no error)
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 26
data
DELTA TAU
Data Systems, Inc.

Software Overtravel Limits (cont.)


– Segmented program moves – if segment destination exceeds limit:
• Abort command issued if no lookahead active, SoftLimitStopDis = 0
• Quick stop at limit if lookahead active, SoftLimitStopDis = 0
• Segment destination changed to limit if SoftLimitStopDis = 1 (no error)
• At move execution time, checks net desired position against limits
– Seldom needed for programmed moves
– Differ from calculation-time limits by Motor[x].SoftLimitOffset
– Uses (MinPos - SoftLimitOffset) and (MaxPos + SoftLimitOffset); if
exceeded:
• SoftPlusLimit or SoftMinusLimit status bit set (Motor[x] and Coord[x])
• No position following in direction of limit permitted
• Abort command issued for closed-loop move if SoftLimitOffset >= 0
• Abort command issued for open-loop move if Motor[x].FaultMode bit 1 = 0
• Kill command issued for open-loop move if Motor[x].FaultMode bit 1 (value 2) = 1

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 27
data
DELTA TAU
Data Systems, Inc. Motor Dynamic Limits
• Motor[x].MaxSpeed (motor units per msec)
– Command speed for rapid moves if Motor[x].RapidSpeedSel = 0
– Maximum speed for linear moves – extends Tm time if violated
– Maximum speed for segments (from linear, circle, pvt) if special lookahead
enabled
• Motor[x].InvAmax (msec2 per motor unit)
– Maximum programmed acceleration (initial and blending) for unsegmented
linear moves – extends Ta time if violated
– Maximum acceleration for segments (from linear, circle, pvt) if special
lookahead enabled
• Motor[x].InvDmax (msec2 per motor unit)
– Maximum programmed final deceleration for unsegmented linear moves –
extends Td time if violated
• Motor[x].InvJmax (msec3 per motor unit)
– Maximum programmed jerk for unsegmented linear moves – extends Ts
time if violated
• Times extended for all motors in C.S. so coordination and path kept
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 28
data
DELTA TAU
Data Systems, Inc.

“I2T” Integrated Current Limiting


• Intended for thermal
protection of motor/drive
• Motor[x].I2tSet: Continuous
current limit (units of 16-bit Power PMAC I2T Protection Feature
output) Normalized
2
I I2
• Motor[x].I2tTrip: Integrated
current limit (units of [16-bit
32768 2 1 .0 2
output]2 * seconds), above 2 Saturation
 MaxDac 
I2tSet MaxDac
2
 
 32768  Integrator
• Trip is treated as amplifier Charge-Up
I2T Fault

fault, killing this motor, and

~
2
~
possibly others as set by  I 2tSet 
 
I 2tSet 2
Motor[x].FaultMode  32768 

~
Integrator

~
Discharge
• Uses measured current in time

direct-PWM mode, actual (seconds)

current in sinewave, torque


modes
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 29
data
DELTA TAU
Data Systems, Inc.
Encoder-Loss Detection
• Loss of feedback sensor can lead to immediate runaway condition
• Other safety checks (following error, amp fault) may not catch in time
• Best to check signal directly for evidence of loss
• Many Delta Tau interfaces have circuitry and logic for this
• Power PMAC provides automatic software check
• Saved setup elements to configure this check:
– Motor[x].pEncLoss // Encoder-loss input flag address*
– Motor[x].EncLossBit // Bit # of flag in register
– Motor[x].EncLossLevel // 0: Low is loss; 1: high is loss
– Motor[x].EncLossLimit // Accumulated error count before trip
• Motor[x].EncLossCount increments each scan error is found, decrements (to 0)
each scan error is not found; trips when greater than EncLossLimit
• On trip, this motor is killed, other motors in CS killed or aborted as set
by Motor[x].FaultMode
* Set to 0 (default) to disable function UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 30
data
DELTA TAU
Data Systems, Inc.

Quadrature Encoder Loss Detection

+5V • ACC-24E2x external XOR circuit


for differential quadrature encoders
R aR
– Motor[x].pEncLoss =
A+
Acc24E2x[i].Chan[j].EncLossN.a
+ A
– Motor[x].EncLossBit = 13
-
A-
– Motor[x].EncLossLevel = 0
1
2 • ACC-24E3 internal XOR circuit for
bR 3 differential quadrature encoders
– Motor[x].pEncLoss =
A? Acc24E3[i].Chan[j].Status.a
– Motor[x].EncLossBit = 28
– Motor[x].EncLossLevel = 1

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 31
data
DELTA TAU
Data Systems, Inc.

Sine and Serial Encoder Loss Detection


• Acc-24E3 sum-of-squares circuit for
analog sine encoders and resolvers
– Motor[x].pEncLoss =
Acc24E3[i].Chan[j].Status.a
– Motor[x].EncLossBit = 31
– Motor[x].EncLossLevel = 1
• Acc-24E3 or ACC-84x serial encoder
transmission (time-out) error bit (some
protocols)
– Motor[x].pEncLoss =
Acc24E3[i].Chan[j].SerialEncDataB.a
– Motor[x].EncLossBit = 31
– Motor[x].EncLossLevel = 1

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 32
data
DELTA TAU
Data Systems, Inc.
Motor Brake Control
• Can set up for automatic control of motor brake, as for vertical axes
• Motor[x].pBrakeOut specifies address of register with brake output
signal (uses bit number specified by Motor[x].BrakeOutBit)
= 0 (default) disables function
= Gate3[i].Chan[j].OutCtrl.a (bit 9) for DSPGATE3 OutFlagBn
= GateIo[i].DataReg[j].a for IOGATE output (e.g. on ACC-68E)
• Motor[x].BrakeOffDelay specifies delay (in msec) in disengaging
brake (setting output to 1) after enabling motor
– Must manually disable for phasing-search move
• Motor[x].BrakeOnDelay specifies delay (in msec) in disabling motor
after engaging brake (setting output to 0) on “delayed” disables
– On-line commands #xdkill, &xddisable
– Direct program commands dkillx, ddisablex
– Emergency “kills” (amp fault and fatal F.E.) and standard commands (#xk,
&xdisable, killx, disablex) disable motor and engage brake simultaneously
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 33
data
DELTA TAU
Data Systems, Inc.

Automatic “Abort” Faults and Resulting Actions


• Conditions that cause an automatic “abort” fault on a motor:
– Either software overtravel limit exceeded in closed-loop mode (unless
Coord[x].SoftLimitStopDis = 1, in which case motor command position
“saturates” at limit, but move calculations continue)
– Either hardware or software overtravel limit detected in open-loop mode
with Motor[x].FaultMode bit 1 (value 2) = 0
– Either hardware overtravel limit detected in closed-loop mode with
Motor[x].FaultMode bit 2 (value 4) = 0
• Offending motor is “aborted” (controlled deceleration to closed-loop
stop using Motor[x].AbortTa and Motor[x].AbortTs)
– These set deceleration and S-curve times if > 0
– These set (inverse) deceleration and jerk rates if < 0
• Other motors in C.S. also aborted
• Motion program in C.S. aborted, cannot resume at this point
• Motors, motion programs in other C.S.’s not affected
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 34
data
DELTA TAU
Data Systems, Inc.

Automatic “Kill” Faults and Resulting Actions


• Conditions that cause an automatic “kill” fault on a motor:
– Fatal following error limit exceeded
– Amplifier fault input detected
– I2T integrated current limit detected
– Encoder loss detected
– Either hardware or software overtravel limit detected in open-loop mode
with Motor[x].FaultMode bit 1 (value 2) = 1
– Either hardware overtravel limit detected in closed-loop mode with
Motor[x].FaultMode bit 2 (value 4) = 1 (and SW limit not already detected)
• Offending motor is “killed” (open-loop, zero command, amp disabled;
no delay for brake engagement)
• Other motors in C.S. aborted if Motor[x].FaultMode bit 0 (value 1) = 0
• Other motors in C.S. killed if Motor[x].FaultMode bit 0 (value 1) = 1
• Motion program in C.S. aborted, cannot resume at this point
• Motors, motion programs in other C.S.’s not affected
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 35
data
DELTA TAU
Data Systems, Inc.
Motor Jogging Move Control
• Basic closed-loop motor moves that can be executed with simple
commands; no need for coordinate systems or motion programs
• Saved setup elements that govern the move:
– Motor[x].JogSpeed (motor units / msec): Magnitude of velocity for jogging
moves (direction is determined by particular jog command)
– Motor[x].JogTa (msec if > 0, msec2/motor unit if < 0): Acceleration time or
inverse acceleration rate
– Motor[x].JogTs (msec if > 0, msec3/motor unit if < 0): S-curve time or
inverse jerk rate
– If JogTa < 0, JogTs must be < 0 (so both specify rate)
– If JogTa > JogTs (> 0), total accel time = JogTa + JogTs
– If JogTa < JogTs (> 0), total accel time = 2 * JogTs
– Specifying by rate better when breaking in with new commands
• Values at time of jog command determine computed trajectory
• Can change element values at any time
– New values do not affect anything until next jog command issued
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 36
data
DELTA TAU
Data Systems, Inc.

Sample Jog Move Profile


• Jog speed set at 60
motor units / msec
• Jog accel/decel set at
0.2 motor units / msec2
(JogTa = -5)
• Jog “jerk” set at 0.001
motor units / msec3
(JogTs = -1000)
• “S-curve time” to full
accel is (A / J) =
0.2 / 0.001 = 200 msec
to full accel
• Total accel time to full
speed is (V / A) + (A / J)
= 300 + 200 = 500 msec

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 37
data
DELTA TAU
Data Systems, Inc.

Specifying Jog Accel/Decel by Time


Vel Acc
• Positive values for JogTa, JogTs JogSpeed

specify times used in acceleration ΔV/JogTa


and deceleration
• Same times used regardless of
change in speed
• Power PMAC automatically V0

computes jerk and accel/decel rates JogTs

JogTa
JogTs

(slightly different rules from Turbo


PMAC) Vel Acc

• If JogTs >= JogTa, no constant JogSpeed

accel section in profile


• May be easier to coordinate multiple ΔV/JogTs

motors
• If new jog command (or trigger)
received during accel/decel, full time V0
JogTs JogTs
is added on to blend to new move JogTs

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 38
data
DELTA TAU
Data Systems, Inc.

Specifying Jog Accel/Decel by Rate


Vel Acc
• Negative values for JogTa, JogTs JogSpeed

specify (inverse) rates used in -1


acceleration and deceleration JogTa

• Same rates used regardless of


change in speed
• Power PMAC automatically V0
computes S-curve and accel/decel JogTs
JogTa
JogTs
JogTa

times ΔV*JogTa

• If jerk rate and change in velocity do Vel Acc


not permit specified accel rate to be JogSpeed

reached, no constant accel section -1


JogTa
in profile √-ΔV/JogTs
• If new jog command (or trigger)
received during accel/decel, present
conditions continue into new move
V0
• This mode strongly recommended if √-ΔV*JogTs √-ΔV*JogTs

breaking into running moves √-ΔV*JogTs

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 39
data
DELTA TAU
Data Systems, Inc.
Motor Jogging Commands
• On-line (e.g. #1j+) or buffered program [e.g. jog+1] commands
– Operate on modally addressed motor or listed motor(s)
• Indefinite commands #xj+ [jog+x] and #xj- [jog-x]
– If software position limits active, treated as jog to the limit position
• Jog stop command #xj/ [jog/x]
– If loop is open, closes loop, decelerating to stop if necessary
• Return-to-prejog position command #xj= [prejogx]
– Useful to resume from hold condition in machining applications
• Jog-to-position commands #xj={constant}, #xj=* [jogx={data}]
– “*” specifies use of value in Motor[x].ProgJogPos element
• Incremental jog commands #xj:{constant}, #xj:* [jogx:{data}]
• Triggered jog commands #x{jog command}^{constant}
– Triggering specified same as for homing-search moves
– Final {constant} is signed distance from trigger position to end position

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 40
data
DELTA TAU
Data Systems, Inc.

Breaking Into Jog Moves


• Can break into jog (or home) move at any time with new jog (or home)
command
• Can issue new command up to every servo cycle
• Uses latest commanded position, velocity, acceleration, and jerk values
as starting condition
• Uses present values of JogSpeed, JogTa, and JogTs
– Can be different from those of executing move
– Best to use JogTa, JogTs < 0 to specify rates – provides seamless
transition
• Can break into open-loop state/move (enabled or disabled)
– Uses latest actual position and velocity values as starting condition
(assumes zero acceleration and jerk)
– Provides smooth transition to closed-loop state/move

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 41
data
DELTA TAU
Data Systems, Inc.

Establishing Motor Position Reference


• Fundamentally, two methods of establishing motor’s position reference
• Homing-search move is most common method
– Permits use of less-expensive incremental sensor
– Must be able to safely reliably find home position at power-up
– Must set up elements that govern homing-search move
• Absolute position read can be desirable
– Must invest in sensor that is absolute over entire motor travel
– Cost increment for these sensors has been decreasing
– Must set up elements that govern absolute position read
• Motor[x].HomeComplete status bit indicates position-reference status
– Used for both position referencing methods
– Set to 0 on power-up/reset
– Set to 0 at start of homing-search move
– Set to 1 when specified homing trigger found (before post-trigger move)
– Set to 1 when specified absolute sensor is read
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 42
data
DELTA TAU
Data Systems, Inc.

Motor Homing-Search Moves


• Jogs motor until finds specified trigger condition
– Software overtravel limits disabled while searching for trigger
• Moves to specified offset from position at trigger, stops there
• Calls that position the motor zero position
– If want this to be a non-zero motor position, use pset command
• Saved setup elements that govern the move:
– Motor[x].HomeVel (motor units / msec): Signed velocity of search move
(sign specifies direction of search)
– Motor[x].JogTa (msec if > 0, msec2/motor unit if < 0): Acceleration time or
inverse acceleration rate
– Motor[x].JogTs (msec if > 0, msec3/motor unit if < 0): S-curve time or
inverse jerk rate
– Motor[x].HomeOffset (motor units) specifies (signed) distance from trigger
position to end (home) position
• On-line hm or program home command causes search move
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 43
data
DELTA TAU
Data Systems, Inc.

Sample Homing-Search Move Profile


• Home speed is 40
motor units / msec
• Note does not hit full
speed on reversal
• Home offset is 0; ends
at trigger position
• Home accel/decel is
0.2 motor units msec2
(JogTa = -5)
• Specifying by rate
yields same
magnitude on reversal
• Home “jerk” is 0.002
motor units / msec3
(JogTs = -500)
• “S-curve time” is (A/J)
= 0.2 / 0.002 = 100
msec to full accel UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 44
data
DELTA TAU
Data Systems, Inc.

Specifying Homing-Search Trigger and Capture


• Motor[x].pCaptFlag specifies address of register for input trigger flags
– Typically set to Gaten[i].Chan[j].Status.a for IC channel’s trigger
– Motor[x].CaptFlagBit set to bit # of trigger (19 for Gate1, 21 for Gate3)
– ASIC channel setup elements specify how trigger is generated
• Gaten[i].Chan[j].CaptCtrl specifies index and/or flag, rising or falling edges
• Gaten[i].Chan[j].CaptFlagSel specifies Home, Plim, Mlim, User flag
• Gate3[i].Chan[j].CaptFlagChan specifies index # of IC channel for flag
• Motor[x].CaptureMode sets trigger type and capture method
= 0 for input trigger from pCaptFlag reg., hardware capture from pCaptPos
register
= 1 for input trigger from pCaptFlag reg., software capture
= 2 for error trigger (|F.E.| > WarnFeLimit), software capture
= 3 for input trigger, timer-assisted software capture (requires Gate3)
• Motor[x].pCaptPos specifies address of hardware-captured counter
= Gaten[i].Chan[j].HomeCapt.a for trigger-latched position
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 45
data
DELTA TAU
Data Systems, Inc.

Processing Hardware-Captured Position


• Motor[x].pCaptPos specifies address of hardware-captured counter
= Gate1[i].Chan[j].HomeCapt.a for PMAC2-style interfaces
= Gate3[i].Chan[j].HomeCapt.a for PMAC3-style interfaces
• Captured position may not have same resolution as servo position
– e.g.: servo has 1/T fractional extension, captured does not
– e.g.: servo has arctangent fractional extension, captured has 1/T extension
• Motor[x].CaptPosRightShift specifies # of low bits to shift out
• Motor[x].CaptPosLeftShift specifies # of bits to shift left (after right
shift) for result to match scaling of servo position
• Motor[x].CaptPosRound specifies whether to offset captured position
½-count to match offset in extended servo position
– Set to 1 to enable if servo position extended and captured position not
• Setting Motor[x].pEncStatus then Motor[x].EncType forces these to
most common setting for IC types used
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 46
data
DELTA TAU
Data Systems, Inc.

Using Software-Captured Position


• Hardware position capture latches position counter value at instant of
input trigger
– Requires position be processed through counter (e.g. incremental encoder)
– Requires trigger be input signal
• If this is not possible, specify software capture instead with
Motor[x].CaptureMode > 0
= 1 specifies software capture with input trigger
= 2 specifies software capture with error trigger (F.E. > WarnFeLimit)
= 3 specifies timer-assisted software capture with input trigger
• Software position capture uses latest motor servo position
– Hardware source of position data does not matter
– No special processing required (already in needed units/scaling)
– Potential delay of up to 1 RTI period limits accuracy of capture
• May need to limit speed of triggered move to get enough accuracy
– For homing, may do fast long move for approximate position, then slow
short move for accurate reference
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 47
data
DELTA TAU
Data Systems, Inc.
Timer-Assisted Software Position Capture
• Gets (almost) accuracy of hardware-counter capture, for feedback that
does not use ASIC counter: e.g. serial or parallel encoder, resolver, ADC
• Uses PFM & timer circuits of DSPGATE3 IC to latch exact time of trigger
• Interpolates between consecutive servo positions to calculate position at
exact time of trigger
• Required motor setup:
– Motor[x].CaptureMode = 3 // Selects this method
– Motor[x].pCaptFlag = Gate3[i].Chan[j].Status.a // For IC channel used
– Motor[x].pCaptPos = Gate3[i].Chan[j].HomeCapt.a // For IC channel used
– Motor[x].ServoCaptTimeOffset // Before servo interrupt (1/65536 cycle)
• Required IC channel setup:
– Gate3[i].Chan[j].Pfm = {value for 16 pulses per servo cycle}
– Gate3[i].Chan[j].EncCtrl = 8 // Count internal PFM pulse train
– Gate3[i].Chan[j].TimerMode = 0 // 1/T extension of pulse count
– Gate3[i].Chan[j].PackOutData = 0 // PFM command in own register
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 48
data
DELTA TAU
Data Systems, Inc.

Timer-Assisted Software Capture Calculations


• Most types of feedback
used with TASC must be
Position

sampled before servo


interrupt to provide
ServoPos1
conversion and transport
time CaptPos

• This delay must be


ServoPos0
specified in
ServoCaptTimeOffset to
be used in TASC
interpolation calculations time

• TASC takes this delay into Servo Servo Capture Servo Servo
Latch Interrupt Trigger Latch Interrupt
account in calculating ServoCapt Time to ServoCapt
TimeOffset Trigger TimeOffset
captured position from Servo
Period
trigger time

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 49
data
DELTA TAU
Data Systems, Inc.

Motor Absolute Power-On Position


• Absolute position sensor can be useful for establishing position
reference if homing-search move too difficult or inconvenient
– Sensor must be absolute over full travel of motor (not just one motor
revolution or electrical cycle, as for absolute phase position)
– Sensor does not have to be same, or same resolution, as for ongoing
• Motor[x].pAbsPos // Absolute position feedback
address
= 0 disables absolute position read -- use homing-search move instead
= {data structure element}.a // Address of register with defined element
= Sys.piom + {adr offset} // Address of I/O reg. w/o defined element
= Sys.Idata[i].a // Address of user shared memory register
• Motor[x].AbsPosFormat // How to use data at address
• Motor[x].AbsPosSf // Scale factor to motor units
• Motor[x].HomeOffset // Offset to motor zero position
• Motor[x].PowerOnMode // Bit 2 sets read at power-on or not
• On-line hmz or program homez commandUMACcauses
Turbo absolute read
Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 50
data
DELTA TAU
Data Systems, Inc.

Motor Absolute Power-On Position Address


• Motor[x].pAbsPos specifies address of (first) register used
– Next higher-addressed register(s) can be read for more significant position data
• Common address settings used:
– Gate3[i].Chan[j].SerialEncDataA.a // Serial encoder, PMAC3 interface
– Acc84E[i].Chan[j].SerialEncDataA.a // Serial encoder, PMAC2 interface
– Gate3[i].GpioData[j].a // Parallel data, PMAC3 interface
– GateIo[i].DataReg[j].a // Parallel data, PMAC2 interface
– Gate3[i].Chan[j].AdcEnc[k].a // Analog data, PMAC3 interface
– Acc28E[i].AdcUdata[j].a // Analog data, PMAC2 interface
• For sensors or formats not supported directly:
– Calculate position value, write as integer to user buffer element(s), use
automatic read with pAbsPos = Sys.Idata[i].a
– Calculate position value, write as floating-point value directly to
Motor[x].Pos (with motor killed)

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 51
data
DELTA TAU
Data Systems, Inc.
Motor Absolute Power-On Position Format
• Motor[x].AbsPosFormat
– Determines how to read and interpret data at specified address
– Of form $aabbccdd, where:
– $dd specifies starting bit ($00 – $1F {31}) in addressed 32-bit register
– $cc specifies total number of bits to use (max of $30 {48})
– $bb specifies how to use subsequent registers (if any)
= $00 - $1F {31}: extend starting from bit $bb of next word
= $20 {32}: extend from bit ($dd + 7) of present word to bit ($dd) of next
– $aa specifies how to interpret numerical value
= 0: Interpret as numerical binary, unsigned
= 1: Interpret as numerical binary, signed
= 2: Interpret as Gray code, unsigned
= 3: Interpret as Gray code, signed
– Example: Motor[x].AbsPosFormat = $01081C08 specifies:
• Start at bit 8 of specified address ($08)
• Use 28 bits ($1C)
• Continue at bit 8 of next address ($08)
• Treat as signed binary value ($01) UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 52
data
DELTA TAU
Data Systems, Inc.

Multiple-Motor Leader/Follower Gantry Setup


• Select (one) “gantry leader” motor with Motor[x].ServoCtrl = 1
– This motor will generate trajectories for all gantry motors, for both motor and
axis moves
• Other motor(s) put in “gantry follower” mode by Motor[x].ServoCtrl = 8
– Set Motor[x].CmdMotor to number of gantry leader motor
– Follower(s) will use command trajectory of leader motor
– Follower(s) will do own servo loop, commutation, current loop, etc.
– Possible, but not necessary, to cross-couple servos of 2 gantry motors
• Leader motor assigned to desired programming axis
– e.g. &1 #1->1000X
• Follower motor(s) given “null” definition in same coordinate system
– e.g. &1 #2->0
– Assignment to same C.S. permits proper fault handling.
• Method provides superior control to old “master/slave” method
• Method more convenient than standard coordination (e.g. &1 #1->X,
#2->X) and saves computation time UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 53
data
DELTA TAU
Data Systems, Inc.

Homing Multiple-Motor Leader/Follower Gantries


• Gantry leader motor must have own home trigger (as normal motor)
• Gantry follower motor(s) may have own home trigger(s)
– Permits correction of power-on “skew”
– In this configuration, command all gantry motors to do homing-search move
together (e.g. #1..3hm)
– Follower motor(s) track leader motor’s trajectory throughout
– When follower motor sees its own trigger and leader-motor trigger both
found, it takes out offset between these positions at speed set by
Motor[x].GantrySlewRate (default = 0!), superimposed on top of tracking
motion (this can happen after leader motor’s homing search move has
finished)
– Leader motor’s homing-search move parameters should ensure that
follower motor trigger(s) will always be found, even under worst-case skew
– Can check Motor[x].GantryHomed status bit for follower motor(s) to
ensure all motors found their trigger and removed all skew.

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 54
data
DELTA TAU
Data Systems, Inc.
Motor “In-Position” Function
• Commanded motion sequences do not consider motor actual positions
• End of commanded move does not guarantee actual position has reached this
point
• In many applications, user wants to ensure that end-of-move position actually
reached before taking subsequent action (e.g. part insertion)
• Motor “in-position” function designed to support this desire
• A motor is considered “in-position” if:
– It is in closed-loop control with desired velocity equal to zero
– Move timer is not active (no dwell or zero-velocity programmed move)
– Magnitude of following error <= Motor[x].InPosBand
– These conditions true for Motor[x].InPosTime + 1 consecutive servo cycles
• Status can be found in Motor[x].InPos status bit
• Coord[x].InPos = 1 if all motors in C.S. are in position
• Typical use in motion program:
X10 Y20; // Commanded move
dwell 0; // Stop lookahead so next line not used before move end
while (!(Coord[1].InPos)) {} // Disable move timer, wait for in-position
LaserOut = 1; // Take subsequent action
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 55
data
DELTA TAU
Data Systems, Inc.

Motor Backlash Elements


• With “lost motion” due to backlash in gearing, a given measured motor
position does not reflect same load position in both directions
• If difference in load position between directions can be measured,
Power PMAC can compensate automatically
• Motor[x].BlSize specifies backlash magnitude, in motor units
• Motor[x].BlSlewRate specifies rate of introduction/removal on
reversal, in motor units per servo cycle
• Motor[x].BlHysteresis specifies extent of reversal before backlash
introduction/removal starts, in motor units
• These elements provide constant backlash over motor position
• Position-dependent backlash can be implemented with comp tables
that use Motor[x].BlCompSize as target register
– Adds onto this constant backlash
– Usually used for bi-directional position compensation rather than true
backlash
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 56
data
DELTA TAU
Data Systems, Inc.
Motor Trajectory Pre-Filter
• Fourth-order numerator and denominator polynomial filter
• Operates on mathematically calculated command trajectories
• Useful for removing trajectory energy at system resonant frequencies
• Useful for creating traditional CNC-style acceleration filtering
• Controlled by Motor[x].PreFilterEna
– = 0 disables pre-filter
– > 0 enables pre-filter, sets filter period in servo cycles
– Values > 1 permit low frequencies to be handled
– Automatic cubic B-spline between filter output values if > 1
• Numerator terms Motor[x].Pni (i = 0 to 4) ith-order polynomial term
• Denominator terms Motor[x].Pdi (i = 1 to 4) ith-order polynomial term
• Filter transfer function: Pn0  Pn1 z 1  Pn 2 z 2  Pn3 z 3  Pn 4 z 4
P z  
1  Pd 1 z 1  Pd 2 z  2  Pd 3 z 3  Pd 4 z  4

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 57
data
DELTA TAU
Data Systems, Inc.

Motor Pre-Filter Block Diagram

Ts Ts
Ppos + DesPos
Spliner
Trajectory To
Before Servo
Filter -
1  z 1

Pn 0  Pn1 z 1  Pn 2 z 2  Pn 3 z 3  Pn 4 z 4
P z  
1  Pd 1 z 1  Pd 2 z  2  Pd 3 z  3  Pd 4 z  4

• Filter sample time Ts set to Motor[x].PreFilterEna servo cycles


• Filter works on difference from previous cycle’s desired position so it
retains full computational resolution at large position values
• If Ts > 1, trajectory is interpolated to servo-cycle rate using cubic B-
spline algorithm
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 58
data
DELTA TAU
Data Systems, Inc.

IDE Setup Control for Pre-Filter Resonant


Frequency Removal
• Part of tuning utility
• Interactive setup of
trajectory pre-filter
• No need to understand
digital filter theory
• User specification of
frequency[ies] to
remove from trajectory
• IDE automatically
calculates filter
coefficients
• Click to implement or
remove filter

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 59
data
DELTA TAU
Data Systems, Inc.
Power PMAC Servo Algorithms
• Purpose is to make motor actual positions match motor desired
positions as closely as possible
– At rest
– During commanded trajectories
– Following a master position
• Use feedback terms (based on actual position values)
• Use feedforward terms (based on desired position values)
• Output represents effort (usually torque/force) for actuator
• Execution tied to servo-clock frequency
– Frequency determined by Servo or MACRO IC settings
– Feedback data latched/strobed on clock edge
– Processor interrupted by servo clock
– Loop closed every (Motor[x].Stime + 1) clock cycles (usually every cycle)
• Can select built-in algorithms of several levels of sophistication
• Can write and select custom servo algorithm
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 60
data
DELTA TAU
Data Systems, Inc.
Servo Algorithm Selection
• Motor[x].Ctrl contains address of start of servo algorithm code
• Motor[x].Ctrl = Sys.PidCtrl specifies very basic PID servo algo.
– No polynomial filters (A, B, C, D, E, or F) or input/output deadband functions
– Generally only used when must have very fast algorithm
• Motor[x].Ctrl = Sys.ServoCtrl (default) specifies standard servo algo.
– PID plus polynomial filters plus deadband algorithms
– Choice of 2nd-order (default) or 7th-order filters with value of
Motor[x].Servo.SwPoly7
– Satisfactory for almost all users
• Motor[x].Ctrl = Sys.PosCtrl specifies output of command position
– Typically for motion networks with positioning drives (e.g. EtherCAT TM)
– No actual servo loop closure in Power PMAC
• Motor[x].Ctrl = Sys.GantryXCtrl specifies added cross-coupled terms
• Motor[x].Ctrl = Sys.AdaptiveCtrl specifies adaptive algorithm
• Motor[x].Ctrl = UserAlgo.ServoCtrlAddr[i] for custom algorithm in C
– IDE provides simple method for user to select user algorithms
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 61
data
DELTA TAU
Data Systems, Inc.

Power PMAC Basic PID Servo Algorithm


1-z-1 Kaff

1-z-1 Kvff

Kviff

+ + +
+ + +
DesPos
Kp ServoOut
- + -
- MaxPosErr MaxDac

Ki
1-z-1
Kvifb MaxInt Kvfb

1-z-1 ActPos2

ActPos

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 62
data
DELTA TAU
Data Systems, Inc.

Basic PID Feedback Terms


• Motor[x].Servo.Kp // Proportional gain term (“P”)
– Multiplies (outer-loop) position (“following”) error
– Product adds into servo command output
– Fundamental servo correction term
– Acts as a spring; higher gain is stiffer spring
– Does not provide damping necessary for stability
• Motor[x].Servo.Ki // Integral gain term (“I”)
– Multiplies intermediate error term
– Product adds into previous cycle’s integrator (unless servo output saturated
by Motor[x].MaxDac)
– Integrator output adds into servo output
– Setting Ki to 0 stops changes to integrator output
– Acts to overcome net loads (e.g. gravitational), biases, friction

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 63
data
DELTA TAU
Data Systems, Inc.

Basic PID Feedback Terms (cont.)


• Motor[x].Servo.Kvfb // Velocity feedback gain (“D”)
– Multiplies (inner loop) actual velocity
– Product added directly to servo output (after integrator)
– Acts as damper to provide stability
• Motor[x].Servo.Kvifb // Velocity feedback gain (“D*”)
– Multiplies (inner loop) actual velocity
– Product added into integrator input
– Acts as damper to provide stability
• By acting on change in actual position, not change in error, these make
it easy to use dual (motor/load) feedback
• Use of Kvfb puts integrator in position loop
– Provides better trajectory tracking
• Use of Kvifb puts integrator in velocity loop
– Provides better disturbance rejection and robustness to plant changes
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 64
data
DELTA TAU
Data Systems, Inc.

Why Use Feedforward?

• Feedback terms require error before responding to desired trajectory


• Feedforward terms contribute to servo output based on desired
trajectory alone
– No need for following error to create servo output
• Feedforward should provide best guess of servo output required to
track trajectory
– Will never be perfect, but can be very close
– Feedback only needs to react to small errors from imperfections in
feedforward and disturbances
• Analytically, feedforward should provide inverse of plant transfer
function
• Feedforward does not contribute to disturbance rejection

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 65
data
DELTA TAU
Data Systems, Inc.

Feedforward Principle
• Traditional servo control
block diagram shows F(s)
Disturbances

feedforward as “add on”, Desired


Feedforward Terms
+ Actual
emphasizes feedback Trajectory R(s) + E(s)
D(s)
+ U(s)
G(s)
Trajectory Y(s)
+
• Same diagram re-arranged -
Feedback Terms Plant Dynamics

shows primary effect of


feedforward for tracking
desired trajectory
Disturbances
• Perfect feedforward model
with no disturbances would Desired + Actual
Trajectory R(s) + U(s) Trajectory Y(s)
not require feedback F(s)=G-1(s) G(s)
+
• Feedback terms Feedforward Terms
Feedback
Plant Dynamics

D(s)
compensate for imperfect Terms
E(s)
model and disturbances + -

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 66
data
DELTA TAU
Data Systems, Inc.
Basic PID Feedforward Terms
• Motor[x].Servo.Kvff // Velocity feedforward gain
– Multiplies desired velocity (from trajectory and master)
– Product added directly to servo output (after integrator)
• Motor[x].Servo.Kviff // Velocity feedforward gain
– Multiplies desired velocity (from trajectory and master)
– Product added into integrator input
• Use Kvff when using Kvfb for derivative gain (position-loop integrator)
• Use Kviff when using Kvifb for derivative gain (velocity-loop integrator)
• Both terms compensate for lag from damping
– Physical (e.g. viscous) damping
– Damping from velocity feedback terms
• Motor[x].Servo.Kaff // Acceleration feedforward gain
– Multiplies desired acceleration (from trajectory and master)
– Product added directly to servo output (after integrator)
– Compensates for expected inertial lag
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 67
data
DELTA TAU
Data Systems, Inc.

Basic PID Non-Linear Terms


• Motor[x].Servo.MaxPosErr
– Clamp on following error input to position loop (in motor units)
– Setting to 0.0 disables position loop; velocity loop and feedforward active
• Motor[x].Servo.MaxInt
– Clamp on integrated position error contribution to servo output
– Setting to 0.0 “empties” integrator (contribution to output is zero)
• Motor[x].MaxDac
– Clamp on servo output magnitude
– Integrator input disabled when this term is limiting output
• Motor[x].DacBias
– Saved offset to servo output, after MaxDac limit
– Separate from phase bias terms
• Motor[x].CompDac
– Added to PID output command before MaxDac limit
– Usually from compensation table, not saved
– Can write to from application UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 68
data
DELTA TAU
Data Systems, Inc.
IDE Interactive Tuning Screen

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 69
data
DELTA TAU
Data Systems, Inc.
IDE Auto-Tuning Screen

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 70
data
DELTA TAU
Data Systems, Inc.

Power PMAC Standard Servo Algorithm

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 71
data
DELTA TAU
Data Systems, Inc.

Motor Servo Polynomial Term Elements


• Not available in basic PID algorithm (Motor[x].Ctrl = Sys.PidCtrl)
• Each polynomial of form: 1 + K1*z-1 + K2*z-2 + … + K7*z-7
• “A” polynomial: Numerator terms (Kan) on commanded position
• “B” polynomial: Numerator terms (Kbn) on actual position
• “C” polynomial: Numerator terms (Kcn) on position error
• “D” polynomial: Denominator terms (Kdn) on position error
• If Motor[x].Servo.SwPoly7 = 0, these are 2nd-order polynomials
– Faster computation, suitable for most systems
• If Motor[x].Servo.SwPoly7 = 1, these are 7th-order polynomials
– Support multiple notches, low-pass filters
• “E” polynomial: Denominator terms on inner-loop position (2nd-order)
– For smoothing (low-pass) with Kafb acceleration feedback
• “F” polynomial: Denominator terms on feedforward input (2nd-order)
– For smoothing (low-pass) when motor is slaved to master signal
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 72
data
DELTA TAU
Data Systems, Inc.

IDE Polynomial Filter Setup Screen

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 73
data
DELTA TAU
Data Systems, Inc.
Servo “Non-Linearity” Elements
• Motor[x].Servo.SwZvInt (not in basic PID algorithm)
= 0: Integrator (input) active when moving and stopped
= 1: Integrator (input) only active when desired velocity = 0
– In traditional servos, only active when stopped
– In modern servos with feedforward, always active
– Good to set to 1 when tuning feedforward terms
• Motor[x].Servo.Kfff
– “Friction feedforward” gain term
– Multiplies by sign (not magnitude) of commanded velocity
– Intended to compensate for dry (Coulomb) friction lag
• Motor[x].Servo.SwFffInt
– Selects friction feedforward term output destination
= 0: Added directly to servo loop command output
= 1: Added to input of error integrator
– Typically set to same destination as velocity feedforward and feedback
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 74
data
DELTA TAU
Data Systems, Inc.

Input Deadband Compensation


FEout

• Can create algorithmic deadband or


Kbreak
compensate for physical deadband =2

• Modifies following error value before


gain calculations
=1
• Motor[x].Servo.BreakPosErr
=0
defines size of zone of modified FEin

error
• Motor[x].Servo.Kbreak specifies
gain (relative to Kp) in zone
BreakPosErr
= 0 creates true deadband
> 1.0 can compensate for physical
deadband or overcome friction Gain Kbreak
=2
Net gain asymptotically approaches Kp
outside of zone Kp
=1
• Does not affect velocity loop =0 FEin

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 75
data
DELTA TAU
Data Systems, Inc.

Output Hysteretic Deadband


• Only active if desired velocity = 0
• Servo output forced to zero when | Servo
Out
FE| < Motor[x].Servo.OutDbOn
OutDbSeed
• Servo output kept at zero until
|FE| > Motor[x].ServoOutDbOff
• When output turned back on, Kp

position error integrator “seeded”


FE
with Motor[x].Servo.OutDbSeed
• Developed for piezo-motors OutDbOn

• Improves settling time for systems


with high static friction OutDbOff

• Can provide traditional deadband


with OutDbOn = OutDbOff,
OutDbSeed = 0 (no hysteresis)

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 76
data
DELTA TAU
Data Systems, Inc.

Gantry Cross-Coupled Servo Algorithm


• For two consecutively numbered motors
• Full algorithm for both motors executed by lower-numbered motor with
Motor[x].Ctrl = Sys.GantryXCtrl
• This motor tells next motor not to execute its own servo by setting
Motor[x].ExtraMotors = 1
• Each motor calculates own component of control effort equivalent to
using default algorithm Sys.ServoCtrl
• Cross-coupling control effort computed by:
– Taking difference in following errors of the two motors
– Using difference to drive (separate) P (.Kxpg), I (.Kxig), and D (.Kxvg)
terms for both motors
– Combining outputs of these terms with motor’s own control effort to drive
error difference toward zero
• Servo technique is independent of trajectory-generation technique (but
gantry leader/follower is recommended)
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 77
data
DELTA TAU
Data Systems, Inc.

Cross-Coupled Algorithm Block Diagram


-
+ + Gantry
ServoCtrlα
Motor α
DesPosα ActPosα
+

PosErrorα
Xctrlα
+

-
Xctrlβ
PosErrorβ

-
DesPosβ ActPosβ
Gantry
ServoCtrlβ
+ + Motor β
-

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 78
data
DELTA TAU
Data Systems, Inc.

Adaptive Servo Control Algorithm


• Permits automatic compensation for system inertia changes
• Selected by setting Motor[x].Ctrl to Sys.AdaptiveCtrl
• Retains all gain terms of standard servo algorithm
• Adds terms to support automatic adaptation
• User should find “nominal” plant gain value using IDE position-loop
autotuner
– Set Motor[x].Servo.NominalGain to this value
– Tune servo loop optimally for this physical plant gain
• Set Motor[x].Servo.EstMinDac to lowest servo command value at
which you will estimate inertia
• Set Motor[x].Servo.EstTime to number of consecutive servo cycles
with valid estimation for gain change
• Each time this # of consecutive cycles has occurred, estimated plant
gain is used to compute compensating Motor[x].Servo.GainFactor
– Range limited by MinGainFactor, MaxGainFactor
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 79
data
DELTA TAU
Data Systems, Inc.

Adaptive Algorithm Block Diagram

DesPos Servo ServoCtrl ServoOut K ActPos


Gain
+ Factor Terms Js2
-

Limits

K
1 J' Inertia
X Estimator

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 80
data
DELTA TAU
Data Systems, Inc.
Executing Servo at Phase Rate
• Intended for a few very-high-bandwidth axes (e.g. fast-tool servos,
galvanometers, piezos)
• Most motors would run at standard servo interrupt
• Enabled for motor by setting Motor[x].PhaseCtrl bit 3 (value 8) to 1
• Feedback source (position and velocity-loop) specified by Motor[x].pPhaseEnc,
not .pEnc and .pEnc2 (no dual feedback)
– Hardware register; no pre-processing by encoder conversion table
– PMAC3 ASIC permits 1/T or sinusoidal encoder interpolation
• Using basic (fast) PID is recommended (Motor[x].Ctrl = Sys.PidCtrl)
• Set Sys.PhaseOverServoPeriod for sub-interpolation at phase rate
• Nth-order interpolation between servo trajectory points as set by
Motor[x].PhaseSplineCtrl (= 0 to 3)
– Tradeoff between responsiveness and smoothness
• Permits significantly higher update rate than for other motors
– PMAC3 ASIC permits more flexibility in PWM frequencies of other motors
• More efficient than high servo rate with some motors slowed (with Stime > 0)
– Conversion table processing done at lower servo rate
– Full interpolation and time base done at lower servo rate
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 81
data
DELTA TAU
Data Systems, Inc.
Why is Motor Commutation Needed?
• Any motor of significant travel requires AC current in phases
• Tightly controlled motors operate from DC source
• Commutation switches direction of current in motor phases to maintain
desired torque direction
– Simple switching commutation algorithm for servo motors usually called
“six-step” commutation (from Hall sensors)
– Simple switching commutation algorithm for stepper motors usually called
“full stepping” or “half stepping”
• Commutation can also control magnitude of current in motor phases to
maintain desired torque level precisely
– Phase-magnitude control commutation algorithms for servo motors usually
called “sinusoidal” commutation
– Phase-magnitude control commutation algorithms for stepper motors
usually called “mini-stepping” or “micro-stepping”
• Brush motors are commutated mechanically inside motors
• Brushless motors are commutated electronically
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 82
data
DELTA TAU
Data Systems, Inc.

Why Commutate in Power PMAC?


• No need for position feedback to drives
• Drives become more universal and less expensive
• Drives are easier and faster to set up
• Power PMAC provides high-quality sinusoidal commutation
• Power PMAC can commutate synchronous (brushless servo) motor
with just incremental encoder feedback
– Ability to perform “phasing-search” move to determine rotor angle
– Alternately, can use low-resolution hall sensors for initial estimate of rotor
angle, then use incremental encoder for ongoing, correcting on index
• Power PMAC can commutate AC induction motors to use as
positioning servo motors (field-oriented [vector] control)
• With commutation and servo loop done in the same device, loss of
feedback or reversed feedback causes loss of torque, not a runaway
condition
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 83
data
DELTA TAU
Data Systems, Inc.

Power PMAC Commutation


• Power PMAC computes
IB commanded phase currents for
B multi-phase motors
IC • Optionally reads actual phase
currents and closes current loops
• Uses servo-loop output as torque
A
IA (quadrature current) command
• Uses motor position sensor to
compute rotor commutation angle
• Supports both synchronous (e.g.
brushless servo) and
C asynchronous (e.g. induction)
motor types

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 84
data
DELTA TAU
Data Systems, Inc.
Basic Motor Commutation Setup Elements
• Motor[x].PhaseCtrl // Enable Power PMAC commutation
– Bit 0 (value 1) enables in “packed” mode (2 phases of feedback and output data
in a single 32-bit register) – for default mode of PMAC3-style IC
– Bit 2 (value 4) enables in “unpacked” mode (each phase of feedback and output
in separate register) – required for PMAC2-style IC and MACRO
• Motor[x].pPhaseEnc // Rotor-angle feedback address
= Gaten[i].Chan[j].PhaseCapt.a // Direct from DSPGATEn encoder reg.
= Gate2[i].Macro[k][0].a // From MACRO ring node, PMAC2 IC
= Gate3[i].MacroInα[k][0].a // From MACRO ring A/B node, PMAC3 IC
• Motor[x].PhasePosSf // Pre-multiplication factor for position
– Converts units of 32-bit source register (usually 1/256 count) to commutation
angle units (1/2048 cycle)
– Inversely (!) proportional to commutation cycle size
– Equation to calculate:
2048 units comm  cyc
• {Let PMAC calculate for you! PhasePosSf 
e.g. = 2048/(1000*256) n LSBs comm  cyc
for 1000 cts/cycle, 1/256ct LSB}

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 85
data
DELTA TAU
Data Systems, Inc.

Sine-Wave Output Commutation


• Power PMAC computes phase current commands, but does not close
current loops
• Command values usually output as DAC voltages (16-bit and 18-bit
resolution)
• In steady-state (constant velocity and load) output signals form sine
waves
• Typical amplifier accepts two phase commands, generates third (if
necessary) so all three sum to zero current
• Most amplifiers close analog current loops and use linear modulation of
power transistors
• This mode used most often in super-high-precision applications due to
high command resolution, low delays and noise

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 86
data
DELTA TAU
Data Systems, Inc.

Sine-Wave Output Block Diagram


DC AC
IaVolts
Magnetization
IdCmd
+ Va Modu- Va
DAC PI
Current Direct Current
Ia lation
Command -
dq
to Phase A Current Loop
Torque Command abc
from Position/ IbVolts
Velocity Servo IqCmd Vb Vb
+ Modu-
DAC PI E
Quadrature Ib lation
-
Current Command e
PhasePos
Phase B Current Loop
-
Slip Constant SG -
DtOverRotorTc - - Vc
Vc Modu-
- + lation

Balance Loop
r
1/s
+ +

PMAC Amplifier

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 87
data
DELTA TAU
Data Systems, Inc.

Sine-Wave Output Motor Setup Elements


• Motor[x].pAdc = 0 to disable digital current loop closure
• Motor[x].PhaseOffset // Angle offset in commutation units
= ±683 for 3-phase motor // +1/3 of a cycle between phases
= ±512 for 2-phase or DC motor // +1/4 of a cycle between phases
– Set sign to match position feedback polarity
• Motor[x].pVoltSineTable // Pointer to output sine table
= Sys.SineTable[0].a for (default) built-in true sine table
– Can make own table in user-shared memory and point to it
• Motor[x].PwmSf // Scale factor: outputs into ASIC units
= 32,767 for full-range outputs
– Changing sign reverses direction sense
– Acts as gain term in feedback loop
• Motor[x].IaBias // Phase A output offset (16-bit units)
• Motor[x].IbBias // Phase B output offset (16-bit units)
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 88
data
DELTA TAU
Data Systems, Inc.

Direct PWM Output Commutation


• Power PMAC computes phase current commands, reads actual phase
currents, closes current loops digitally
• Command phase-voltage values usually output as PWM duty cycles
• These PWM signals are used directly to turn the power transistors on
and off
• Amplifier current sensors measure two phases and digitize in ADCs for
return to Power PMAC
• Measured phase current values transformed to field (torque & flux,
a.k.a. quadrature and direct) through “inverse commutation”
• Current loops closed in “DC frame”, not “AC frame”, minimizing high-
frequency problems at speed
• Fully synchronous software and hardware operation minimizes delays
• All software setup is in Power PMAC; amplifier is “dumb” power block

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 89
data
DELTA TAU
Data Systems, Inc.

Direct PWM Output Block Diagram


DC AC

IdCmd + + IdVolts IaVolts Va


Magnetization
PI PWM
Current Direct Current
Command - IpfGain -
dq
IiGain P IpbGain IbVolts Vb
to PWM E
abc
IqVolts IcVolts Vc
PWM
Direct Current Loop

Torque Command IqCmd PhasePos


+ +
from Position/ PI
Velocity Servo Quadrature IdMeas IaMeas ia
Current - - ADC
IpfGain abc
Command
IiGain P IpbGain
to
IqMeas dq IbMeas ib
ADC

Quadrature Current Loop e


r
SG 1/s
+ +
DtOverRotorTc PMAC Amplifier

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 90
data
DELTA TAU
Data Systems, Inc.

Direct-PWM Output Motor Setup Elements


• Motor[x].pAdc // Specifies current feedback address
= Gate1[i].Chan[j].Adc[0].a // Direct from DSPGATE1 servo channel
= Gate3[i].Chan[j].AdcAmp[0].a // Direct from DSPGATE3 servo channel
= Gate2[i].Macro[k][1].a // From PMAC2 IC node over MACRO
ring
= Gate3[i].MacroInα[k][1].a // From PMAC3 IC node A/B over MACRO ring
• Motor[x].AdcMask // Current feedback 32-bit mask word
– e.g. = $FFF00000 for 12-bit current feedback
• Motor[x].PhaseOffset // Angle offset in commutation units
= ±683 for 3-phase motor // +1/3 of a cycle between phases
= ±512 for 2-phase or DC motor // +1/4 of a cycle between phases
> 0 if positive PWM phase out yields negative current; < 0 if yields positive
• Motor[x].pVoltSineTable // Address of PWM output look-up table
• Motor[x].pSineTable // Address of current input look-up
table
= Sys.SineTable[0].a for standard sine table forUMAC
bothTurbo
transformations
Turbo PMAC PCI Geo Drive
motion
– Can create own table in user shared memory buffer; set these to Sys.Fdata[i].a
Single Source Machine Control logic 91
data
DELTA TAU
Data Systems, Inc.

Digital Current Loop Block Diagram


Forward Path Output
Proportional Scale
Commanded Gain Factor Commanded
Current Voltage
(Id or Iq) + (Vd or Vq)
IpfGain PwmSf
+
Normalized +
- -
to range
-1.0 < I < 1.0

IiGain
1-z-1
Back Path
Integral Ipbgain Proportional
Measured
Gain
Gain Current
(Id or Iq)

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 92
data
DELTA TAU
Data Systems, Inc.

Digital Current Loop Setup Elements


• Current-loop gain terms are scaled the same as in Turbo PMAC
• Terms act on both direct (“d”) and quadrature (“q”) current loops
• Motor[x].IpfGain // Forward-path (error) proportional gain
– More responsive, but noisier than IpbGain
• Motor[x].IpbGain // Back-path (actual) proportional gain
– Smoother but less responsive than IpfGain
• Motor[x].IiGain // Integral (error) gain
• Motor[x].IxCoupleGain // d/q-loop cross-coupling gain
– Multiplied by velocity to affect other loop’s voltage; corrects for inductive lag
• Motor[x].IaBias // Phase A feedback offset (16-bit units)
• Motor[x].IbBias // Phase B feedback offset (16-bit units)
• Motor[x].PwmSf // Scale factor: outputs into ASIC units
= Gate1[i].PwmPeriod to permit 100% duty cycle with PMAC2 IC
= 16384 to permit 100% duty cycle with PMAC3 IC
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 93
data
DELTA TAU
Data Systems, Inc.

IDE Current Loop Tuning

• Both automatic (shown)


and interactive tuning
capabilities provided
• Both command (direct)
current step, gather
actual current response,
calculate response
statistics
• Autotune uses response
statistics and design
goals to calculate
suggested gains
• Interactive tuning shows
plot of step response for
user evaluation

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 94
data
DELTA TAU
Data Systems, Inc.

Current Feedback Auto-Nulling


• Possible to detect and remove current measurement offsets
automatically each time amplifier is enabled
• Motor[x].CurrentNullPeriod (new in V1.5) controls
= 0: No automatic offset nulling
≠ 0: Automatic offset measurement and compensation each time amplifier is
enabled
> 0: Measurements taken before enabling (detects feedback bias only)
< 0: Measurements taken after enabling, but with command outputs at zero
(detects command and feedback bias)
• Magnitude of CurrentNullPeriod sets number of measurements taken
and averaged (one per phase cycle)
• When enabled, Motor[x].IaBias and IbBias automatically set to
opposite of average measured offset
–Overwrites saved values
• Control then fully enabled with bias corrections active
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 95
data
DELTA TAU
Data Systems, Inc.
PWM Signal Generation
New
Command
Loaded
Motor[x].PwmSf

Gate1[i]. PWM
PwmPeriod Command
or Value
16384 (Gate3)

PWM PWM time


Command Counter
Range Range

-Gate1[i].
PWM
PwmPeriod
Up/Down
or
Counter
-16384 (Gate3)

-Motor[x].PwmSf

PWM
Top Signal
PwmDeadTime
PWM
Bottom Signal

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 96
data
DELTA TAU
Data Systems, Inc.
Synchronous Motor Phase Referencing
• Synchronous (i.e. zero-slip) motors require knowledge of absolute rotor
angle for proper commutation
• Initial “phase referencing” operation required to establish this
– Performed on $ command or by setting Motor[x].PhaseFindingStep to 1
– Done automatically at power-up if Motor[x].PowerOnMode bit 1 = 1
• Robust method required – bad reference can cause runaway condition
• Two methods of phase referencing:
– Phasing search move: Excite the motor, observe response, calculate angle;
required if no absolute sensor
• “Stepper-motor” search
• “Four-guess” search
– Absolute phasing read: Use absolute (over one cycle) sensor to read angle
• Absolute encoder
• Resolver
• Hall commutation sensors (or equivalent)
• May perform correction after initial (rough) phase reference
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 97
data
DELTA TAU
Data Systems, Inc.

“Stepper-Motor” Phasing Search Method


• Forces current into phases as in stepper motor control to drive rotor to
known angle
• Motor[x].PhaseFindingTime > 255 selects, specifies settling time for
each step in servo cycles
• Motor[x].PhaseFindingDac specifies current magnitude in phases
(16-bit units)
• First step to +90°e (or possibly stuck at -90°e)
• Second step to 0°e
• After settling, commutation angle register Motor[x].PhasePos set to 0
• Movement between steps must be greater than
Motor[x].AbsPhasePosOffset (in units of 1/2048 commutation cycle)
for successful search (so Motor[x].PhaseFound set to 1)
– 90°e is 512 units; a value of ~400 is recommended
• Net external load may cause some error – correction recommended
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 98
data
DELTA TAU
Data Systems, Inc.
“Four-Guess” Phasing Search Method
• Makes 4 guesses (90°e apart) of phase angle, tests response at each
• Very small movement required; good for frictionless systems
• Motor[x].PhaseFindingTime > 3, < 256 selects, specifies time for
each guess in servo cycles
• Motor[x].PhaseFindingDac specifies output magnitude for each guess
(16-bit units)
• Measures accel for each guess, uses as proxy for generated torque
– Torque proportional to cosine of error in guess
– Acceleration affected by net loads, so second pair of guesses used to
detect these loads
– Rotor angle calculated by arctangent of “sine” and “cosine” responses
• Distance traveled must be larger than user-defined threshold for valid
search (so Motor[x].PhaseFound set to 1)
– Distance for “sine” guesses stored in Motor[x].New[0].Vel
– Distance for “cosine” guesses stored in Motor[x].New[0].Accel
– Sum of squares of these must be > Motor[x].AbsPhasePosOffset2
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 99
data
DELTA TAU
Data Systems, Inc.

Absolute Phase Position Read


• Motor[x].pAbsPhasePos > 0 selects, specifies address of register
– = Gaten[i].Chan[j].Status.a for Hall sensors in ACC-24E2/3 board
– = GateIo[i].DataReg[j].a for parallel data in ACC-14E board
– = Gate3[i].Chan[j].SerialDataA.a for serial encoder in ACC-24E3 board
– = Gate3[i].Chan[j].Atan.a for resolver in ACC-24E3 board
• Motor[x].AbsPhasePosFormat specifies how to use this data
• Motor[x].AbsPhasePosSf multiplies formatted data to convert to
commutation-cycle units (1/2048 cycle)
– e.g. for 65,536 counts/rev on 4-pole (2 comm-cycle) motor,
AbsPhasePosSf = 2048 / (65536/2) = 1/16 = 0.0625
• Motor[x].AbsPhasePosOffset adds to scaled data to reference to
Power PMAC’s commutation zero angle
– Value set to negative of sensor value after stepper-motor search
• Absolute sensor does not have to be same as for ongoing commutation
position
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 100
data
DELTA TAU
Data Systems, Inc.

Absolute Phase Position Read Data Format


• Motor[x].AbsPhasePosFormat
– Determines how to read and interpret data at specified address
– Of form $aabbccdd, where:
– $dd specifies starting bit (0 – $1F {31}) in addressed 32-bit register
– $cc specifies total number of bits to use (max of $20 {32})
– $bb specifies how to use subsequent registers (if any)
• 0 - $1F {31}: extend starting from bit $bb of next word
• $20 {32}: extend from bit ($dd + 7) of present word to bit ($dd) of next
– $aa specifies how to interpret numerical value
• 0: Interpret as numerical binary
• 2: Interpret as Gray code
• 4: Interpret as 3-phase Hall (120 °) (uses 3 bits only, regardless of $cc)
• 5: Interpret as 3-phase Hall (60°) (uses 3 bits only, regardless of $cc)
– Example: Motor[x].AbsPhasePosFormat = $0400031C specifies:
• Start at bit 28 of specified register ($1C)
• Use 3 bits ($03), no continuation ($00)
• Treat as 120° 3-phase Hall sensor ($04)
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 101
data
DELTA TAU
Data Systems, Inc.

Hall Sensor Absolute Phase Position Read


• U, V, and W inputs read as 3-bit
value (0 and 7 are illegal values
for 120° spacing)
• 60° spacing has V inverted from UVW: 1 3 2 6 4 5
this diagram
1
• Read values 1 – 6 are converted U
to 1 of 12 Hall states (6 levels, 6 0
edges) 1
• State values should be multiplied V
0
by AbsPhasePosSf of 170.667
1
(= 2048 / 12)
W
• Standard direction sense as 0
shown
Degrees: 330 30 90 150 210 270
• Inverted sense uses negative SF State: 11 1 3 5 7 9
• Zero-offset position is V edge, U
low, W high, at commutation zero
• Offset from this accommodated
with AbsPhasePosOffset

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 102
data
DELTA TAU
Data Systems, Inc.

Correcting Initial Phase Referencing


• Some initial phase reference methods not accurate or reliable enough
for use without correction
– Prolonged use with phase error can overheat motor and/or drive
• Correction required after Hall-sensor phase read (±30°e)
• Correction recommended after phasing-search moves
• Most common to correct when settled at home position
– Usually precisely located by index pulse within home switch
– Phase position here known from homing after unloaded phasing search
– Can store this position in saved element Motor[x].AbsPhasePosForce
• Sample (PLC) code to implement correction:
home3;
while (!(Motor[3].HomeComplete) || !(Motor[3].InPos)) { }
Motor[3].PhasePos = Motor[3].AbsPhasePosForce;

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 103
data
DELTA TAU
Data Systems, Inc.

Direct PWM Control of DC Brush Motors


• Uses current-loop closure algorithms in commutation routine
• Must “defeat” AC nature of commutation
– Set Motor[x].PhasePosSf multiplication factor to 0.0 to do this
– Does not matter what register is read for phase angle position (default OK)
• Must make sure phase angle is forced to zero (so Ia = Iq)
– Set Motor[x].pAbsPhasePos > 0 for phase read (not search)
– Does not matter what register is read (PhaseCapt register OK)
– Set Motor[x].AbsPhasePosSf = 0.0
– Set Motor[x].AbsPhasePosOffset = 0.0
• Connect motor between outputs from ASIC phases A & C (amp U & W)
– Current measured on phase A (U) feedback
• Disable feedback on unconnected phase B (V)
– Set Motor[x].PhaseMode to 3
– Keeps integrated analog noise from interfering with control
• Set Motor[x].PhaseOffset to ±512 (±90°) so A & C are 180° apart
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 104
data
DELTA TAU
Data Systems, Inc.

Direct PWM Control of DC Brush Motors

IdCmd + + IdVolts = 0 IaVolts Va


Magnetization
PI PWM
Current Direct Current
Command - -
IpfGain dq
P IpbGain IbVolts Vb
IiGain to PWM E
PhaseMode bit 2 = 1 abc
disables Id loop IqVolts IcVolts Vc
PWM
Direct Current Loop
Torque Command IqCmd PhasePos
+ +
from Position/ PI IdMeas
Velocity Servo Quadrature IaMeas ia
Current - - ADC
IpfGain abc
Command P IpbGain
IiGain to
IqMeas dq IbMeas ib
ADC

Quadrature Current Loop PhasePos


Holding PhasePos at 0 means:
=0 R=0
Ia/Va = +Iq/Vq (0)
Ib/Vb = 0
Ic/Vc = -IqVq PMAC Amplifier

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 105
data
DELTA TAU
Data Systems, Inc.

Induction Motor Control


• Commutation algorithm applied to AC induction motors provides field-
oriented (vector) control
• Permits use of induction motors (with position sensors) as positioning
servo motors
– Substantial cost benefit in large motors
– Available in very large sizes
– Very rugged, no demagnetization worries
• Has two issues not present with permanent magnet brushless motors:
– Must induce rotor current for electromagnetic field
– Must create “slip” between rotor field and rotor mechanics
• Rotor field strength dynamically controllable by “magnetization current”
parameter
• “Slip gain” parameter must be set to match motor dynamics

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 106
data
DELTA TAU
Data Systems, Inc.

Induction Motor Setup Elements


• Motor[x].IdCmd // Magnetization current command
– Must be > 0 to magnetize induction motor rotor
– Sets rotor field strength, units of 16-bit output
– Determines motor torque constant, back-EMF constant
– User can vary with speed for field weakening
• Motor[x].DtOverRotorTc // Induction motor slip constant
– Set to ratio of phase update period to rotor electrical time constant
– Multiplied by servo torque command (Iq) to get slip frequency
– Must be 0 for synchronous motor
• Motor[x].PhaseCtrl bit 1 // Slip calculation control
– Bit 1 = 0: Slip calculations use measured current (as in Turbo PMAC)
– Bit 1 (value 2) = 1: Slip calculations use commanded current

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 107
data
DELTA TAU
Data Systems, Inc.

Direct Microstepping with Direct PWM


• For open-loop, fully digital control of stepper motors
• Uses simulated feedback for servo loop and commutation
• Provides 2048 microsteps per cycle (512 microsteps per step)
IaVolts
IdCmd IdVolts U
PI
+ dq W A
- to Amp
IdMeas IqVolts ab V

Current Loops X
IbVolts
DesPos IqCmd IaMeas
PID PI
+ + ab
- - to B
ActPos Simulated Servo IqMeas dq IbMeas
Loop
PhasePos
ECT “Slip”
(0)
Integration Integration + +
Open-Loop Commutation

UMAC Turbo Turbo PMAC PCI Geo Drive


motion
Single Source Machine Control logic 108
data
DELTA TAU
Data Systems, Inc.

Direct Microstepping with Direct PWM


• Integrates servo-loop output command in Motor[x].IqCmd for
simulated feedback
– Uses EncTable[n].type = 11 for read of floating-point register
– Set EncTable[n].index5 = 63 for 64x pre-scaling of value
– Set EncTable[n].index4 = 1 for single integration (velocity to position)
– Set EncTable[n].ScaleFactor = 1/65536 to scale output in microsteps
• Uses Motor[x].SlipGain to rotate commutation angle at a rate
proportional to IqCmd value
– Set to 1 / (4 * [PhaseCyclesPerServoCycle]) for proper scaling
• Motor[x].IdCmd specifies desired current magnitude
– Can change this value directly when desired
• Set phase position setup elements as for DC brush motors to ensure
“measured” phase angle stuck at zero
– All phase angle rotation comes from servo command through “slip” advance
UMAC Turbo Turbo PMAC PCI Geo Drive
motion
Single Source Machine Control logic 109
data

You might also like