Sie sind auf Seite 1von 15

Application Note

Setup for PMAC Commutation of Brushless PMDC (AC-Servo) Motors


and Moving Coil Brushless Linear Motors
PMAC can be used to not only provide servo control of a motor system (closing both the position and
velocity loops) but can additionally perform the algorithms necessary to commutate brushless permanent
magnet servomotors, in either rotary or linear forms, and AC induction motors. The controller utilizes
incremental encoder feedback to keep track of rotor position (stationary magnet track position in a linear
motor) and outputs two sinusoidal phase commands. The third phase command is generated via a balance
loop in the amplifier. Resolver feedback may be used in conjunction with the Acc-8D Opt 7 R/D
converter board to produce incremental encoder feedback if the motor is equipped with a resolver.
This procedure will guide the PMAC user through the setup for commutating either brushless PMDC
motors (sometimes referred to as AC-servomotors or merely Brushless motors) or moving coil brushless
linear motors. The motor and amplifier should already be wired, and there should be no load connected to
the motor’s output shaft or linear table for this setup procedure. PMAC must be capable of commutating
the motor, verified by open-loop moves, before the servo loop can be tuned.
Setting up Brushless Motor Commutation
Motor commutation is only one of PMAC’s many capabilities. To implement this capability, several
software parameters need to be set up initially. Figure 1 gives an overview of the setup of PMAC for
brushless motor commutation.
1. The first step in setting up the PMAC to commutate a motor, is to tell the control to perform
commutation for the specific motor. The commutation calculations for a motor are enabled by
setting Ix01 = 1.
Example: To enable commutation of motor #3, set I301=1.
2. PMAC must be told which two DAC outputs will output the sinusoidal commutation command
signals to the amplifier. This is accomplished by the setup of Ix02 with the lower address of a pair of
adjacent DAC registers. Possible values for Ix02 are:
Hex Decimal DAC Pair
$C002 49154 DAC1 & DAC2
$C00A 49162 DAC3 & DAC4
$C012 49170 DAC5 & DAC6
$C01A 49178 DAC7 & DAC8
$C022 49186 DAC9 & DAC10
$C02A 49194 DAC11 & DAC12
$C032 49202 DAC13 & DAC14
$C03A 49210 DAC15 & DAC16

Example 1: Continuing with the setup of motor #3 and assuming that motors #1 and #2 are not
PMAC commutated (thus using 1 DAC each) motor #3 could use DACs 3 and 4. Therefore, I302 =
$C00A (or 49162 decimal).
Example 2: PMAC is to commutate four brushless motors. In this case, the setup of I302 for
motor #3 would be I302 = $C012 (DACs 5 and 6) as typically, motors #1 and #2 would use the
first four DACs.
3. To perform the continuous commutation calculations, PMAC requires continuously updated
information on the position of the motor rotor (or stationary magnet track in a linear motor). This
information, in the form of an encoder pulse train, must come from a feedback source (encoder or
resolver) rigidly coupled to the rotor or stationary magnet track. PMAC must be told (via Ix83)
which encoder register to read continually for this position information. Hence, Ix83, which points to
the encoder register, is referred to as the phase position address.

PMAC Commutation of Brushless Motors 1


Application Note

Legal values are:


Hex Decimal Encoder Hex Decimal Encoder
$C001 49153 Encoder 1 $C021 49185 Encoder 9
$C005 49157 Encoder 2 $C025 49189 Encoder 10
$C009 49161 Encoder 3 $C029 49193 Encoder 11
$C00D 49165 Encoder 4 $C02D 49197 Encoder 12
$C011 49169 Encoder 5 $C031 49201 Encoder 13
$C015 49173 Encoder 6 $C035 49205 Encoder 14
$C019 49177 Encoder 7 $C03D 49209 Encoder 15
$C01D 49181 Encoder 8 $C03F 49213 Encoder 16

Quite often Ix83 points to the same encoder as Ix03, which points to the encoder used to close the
position loop. However, it is important to note that Ix83 points to an unprocessed encoder register
while Ix03 points to processed encoder data in an encoder conversion table register. Thus, Ix83 and
Ix03 will never contain the same address, even though they may often share the same encoder.
Example: If Motor #3 is to use rotor position information for phasing from Encoder #3, then I383 =
$C009. (If Encoder #3 was also used to close the position loop, I303 would probably be $722).
4. Setting up the correct polarity in a PMAC commutated and controlled system is of great importance.
Failure to match polarity between the feedback information and command signals will result in
runaway conditions or motor lock-ups. There are several factors which contribute to the system
polarity. The first is the setup of the Encoder Decode variables (I900, I905, I910, etc.). These
variables (one per encoder) determine how the raw encoder data, pulses, are to be decoded into
counts. The valid choices for setup of this variable are:
Value Meaning
1 x1 quadrature decode CW
2 x2 quadrature decode CW
3 x4 quadrature decode CW
5 x1 quadrature decode CCW
6 x2 quadrature decode CCW
7 x4 quadrature decode CCW

Set the variable associated with the encoder being used to 3 temporarily. With the amplifier disabled
and power applied to thee feedback device, rotate the motor shaft (or slightly displace the linear
motor) by hand while watching the motor position in the PMAC Executive’s F7 position window.
Change the encoder decode variable if necessary to get the direction sense wanted (e.g. clockwise
rotation of motor shaft yields increasing encoder counts). Polarity will be discussed in Step 10.
Important Note For Resolver Users: When using the Acc-8D-Opt 7 Resolver to Digital Convertor’s
absolute position reading abilities (no-movement phasing, power-on position reading), it is necessary that
the encoder decode variable be set to decode in a x4 CCW manner (i.e. a value 7). If the direction sense
this provides must be changed, reverse the sine and cos leads on the resolver.

5. To properly commutate the motor, PMAC must know the size of the commutation cycle in encoder
counts. It computes this through two I-parameters, Ix70 and Ix71. Ix70 tells PMAC how many
commutation (or electrical) cycles of the motor occur within each mechanical cycle (revolution). A
commutation cycle consists of two poles (one pole pair) of a multiphase motor. Set Ix70 equal to the
number of commutation cycles per mechanical cycle.

2 PMAC Commutation of Brushless Motors


Application Note

Example 1: In the ongoing example, if motor #3 is a 4-pole brushless motor, then I370=2 since
two commutation cycles exist for each mechanical revolution of the motor.
Example 2: Suppose a brushless linear motor is to be commutated. The setup of Ix70 can be
confusing if not examined carefully, as typically these motors have multiple pole-pairs for greater
length of travel. However, the same commutation (electrical) cycle occurs for each fixed-length
travel cycle (see Application Note 1 of this series for further details on linear motor commutation).
Thus, there is one electrical cycle for each mechanical (travel) cycle, and Ix70 should be 1.
6. The second half of the commutation cycle size setup is the configuration of Ix71. To correctly
interpret the encoder data representing rotor and phase position, PMAC must be informed as to the
number of encoder counts per N commutation cycles, where N is the number of commutation cycles
of the motor per mechanical cycle (Ix70). This paramater, defined as Ix71, works in conjunction with
Ix70 to define (counts/commutation cycle = Ix70/Ix71).
The meaning of a count, as interpreted by Ix71, is defined by the encoder-decode variable for the
commutation feedback device (Encoder I-variable I900, I905, etc.). If a times-4 decode is used, a
count is one-fourth of an encoder line.
Example 1: Motor #3 has a 1000-line encoder on its tail shaft. I910 is set for x4 decoding hence,
there are 4000 counts per mechanical revolution, and I371 should be set to 4000. By doing this,
PMAC knows that there are 4000 counts per two commutation cycles (as motor #3 is a 4-pole
motor). Another way to interpret this is that in one mechanical cycle there are: 4000 counts/2-
commutation cycles = 2000 counts/commutation cycle.
Example 2: Motor #3 has resolver feedback which is processed through the Delta Tau Acc-8D Opt-7
Resolver-to-Digital converter board. The resolver-to-digital board converts the signals from each
electrical cycle of the resolver (1 pole pair) to 1024 lines. (Typically, resolver manufacturers call out
the number of pole pairs by defining the resolver as an N speed resolver where N is the number of
pole pairs). Since the resolver on Motor #3 is a 2-pole design (1-pole pair) there are 1024 lines per
motor revolution. After x4 decoding in the PMAC, 4096 counts exist per revolution. Thus for the 4-
pole brushless motor, there are 4096 counts per 2-commutation cycles of the motor, and I371 should
be set to 4096.
Example 3: Motor #3 is a brushless linear motor with a travel cycle of 2.4 inches. The linear scale
providing encoder feedback outputs 2000 lines per inch. Recall that for linear motors, each travel
cycle is equivalent to a commutation cycle. Thus, with x4 decoding the PMAC will see:
2000 lines/inch x 4 counts/line x 2.4 inches/comm. cycle = 19,200 counts/comm. cycle! I371 = 19200.
7. At this point PMAC can test the hardware operation by driving the PMAC DAC outputs directly
without actually using the commutation algorithm. It is necessary to achieve satisfactory results
from this test in order for the commutation algorithm to work.
The following test should be performed which will six-step a three phase motor through a complete
commutation cycle. The phase offset variables Ix29 and Ix79 are used to force current directly into the
particular phases and drive the motor like a stepper motor. Phase R is commanded by the oddnumbered
DAC-output which is excited via Ix79. Phase S is commanded by the even-numbered DAC, excited by
Ix29. Phase T is commanded from the balance loop generated in the amplifier. Observe that the motor
shaft steps equal angular distances in a consistent direction of rotation. PMAC’s overtravel limits must be
grounded or disabled via Ix25 for the test to work.
Type the following commands in the terminal window of the Executive program. For this example, w
motor #3 is being addressed.

PMAC Commutation of Brushless Motors 3


Application Note

Warning:
Once the test is started, complete it. Leaving the motor locked in one state while
taking a lunch or coffee break can result in excessive motor heating and possible
damage to the motor and/or amplifier.
#3O0 ;Address motor and Command zero output
1. I329=-3000 I379=0 ;Drive current into Phase T and out Phase R
2. {I329= I379=3000 ;Drive current into Phase S and out Phase R
3. I329=0 {I379=3000} ;Drive current into Phase S and out Phase T
4. I329=3000 I379= 0 ;Drive current into Phase R and out Phase T
5. {I329=3000} I379=-3000 ;Drive current into Phase R and out Phase S
6. I329=0 {I379=-3000} ;Drive current into Phase T and out Phase S
7. I329=-3000 I379=0 ;Repeat of (1)
8. I329=0 {I379=0} ;Deenergize motor phases to prevent motor heating

Note:
A similar 8-step test can be done for a 4-phase motor.
Note:
Some of the commands (shown in brackets { } above) are redundant, as their value
was preset in the previous step. They are shown here to illustrate the concept of the
six-step test. If they are used, do not send the brackets.
After each command, observe the motor shaft locking into a new position as it steps through the
commutation cycle. There should be six distinct locked positions. The angular distance between steps
should be equal. The direction of rotation should be consistent from step to step. Also, observe the
correlation between the motor’s commutation cycle and mechanical cycle (i.e. for a 4-pole motor there
are two commutation cycles per one mechanical revolution, thus the six-step test should index the motor
through 180 mechanical degrees.) Between settings 1 and 7, a position change in counts equal to
Ix71/Ix70 should occur. Watch the change in position with the PMAC Executive’s [F7] position window,
however make sure that Ix03 points to the same encoder to insure helpful position data before doing such.
8. To obtain the best performance and maximum efficiency from the motor, the DAC bias values for the
two PMAC commanded phases should be determined and set via I-variables Ix29 and Ix79. Each of
these parameters are the digital equivalent of an offset potentiometer on an analog output. Ideally,
Ix29 and Ix79 are set so that when 0 V DC is commanded, with an O0 command, no current flows
through any phase of the motor. If there is no access to the phase current measurements, it is still
valuable to use these bias terms to null out analog offsets in the DAC such that their signal voltage
outputs are 0 VDC when 0VDC is commanded. Ix79 biases the first phase which is the lowermost in
the pair of DAC outputs (i.e. DAC4 in a pair composed of DACs 3 and 4). Ix29 biases the second
phase.
To set these values, place a voltmeter on the DAC output pin (referenced to AGND) and adjust the
Ix29 and Ix79 values through the PMAC exec software, observing their impact on the voltage output.
The DAC offset auto-tuning program in the PMAC executive software is not intended for use with
PMAC-commutated axes and thus should not be used. Future versions of the executive software may
include DAC bias auto-tuning provisions for PMAC-commutated axes.

4 PMAC Commutation of Brushless Motors


Application Note

9. The next commutation parameter which PMAC must be aware of to commutate PMDC brushless and
linear motors is the angle between the motor phases (Ix72). This parameter also permits the reversal
of the phasing, so that the motor leads do not have to be flipped if the phasing was miswired in
assembly. The units of Ix72 are 1/256 of a commutation cycle, so for a three-phase motor (120°
between phases), the possible values are 85 (phase 2 leads phase 1) or 171 (phase 2 lags phase 1).
The parameter could be set also for a four-phase motor (90° between phases) if required. For a four-
phase motor, the possible values of Ix72 are 64 (phase 2 leads phase 1) or 192 (phase 2 lags phase 1).
To set Ix72, perform the following quick test to verify whether phase 2 lags or leads phase 1 (this
essentially determines the output polarity). The test again uses the phase-offset variables Ix29 and
Ix79 to force current directly into the particular phases and drive the motor like a stepper motor. By
observing which direction the motor steps as different phases are driven, we can tell whether the
output polarity is correct, given the present feedback wiring and encoder-decode variable, and the
present motor wiring and setup of Ix72.
Type the following commands in the terminal window of the executive program. For this example
motor #3 is being addressed:
#3O0 ;Address motor and Command zero output
I329=3000 ;Positive offset of 3000 bits on Phase #1
P ;Query position (after motor settles)
382 ;PMAC responds with position
I379=3000 ;Positive offset of 3000 bits on Phase #2
• ;Query position (after motor settles)
215 ;PMAC responds with position
I329=Original value ;Return Ix29 to value determined by DAC bias
;setup (step 6)
I379=Original value ;Return Ix79 to value determined by DAC bias
;setup (step 6)
With Ix72 preset to 85, the motor should have moved in the negative direction when the second phase
positive offset was added on top of the first phase positive offset (as it did in this example). If there is
a mismatch, change either the encoder decode variable (see step 5) or, Ix72. However, if the motor
already counts in the proper direction (per step 5) then change Ix72. If, Ix72 is preset to 171, the
motor should move in the positive direction. In other words, if the motor counted down in the test,
Ix72 should be set to 85, if it counted up in the test, Ix72 should be set at 171.
10. At this point, the commutation setup is almost complete. PMAC must perform a Phase-Search (also
called phasing or phase-referencing) once the motor is powered-on to establish where the location of
Phase 1 is. This search requires that the motor shaft is free to rotate a maximum of 240 electrical
degrees in either direction (a higher pole count motor will hence have a smaller mechanical angular
displacement in the phase search). There are two popular methods of performing the power-up
phase search.
Note:
PMAC also has the ability to initiate no-movement power-on phase referencing.
This is an advanced feature requiring an absolute feedback device and PMAC
firmware version 1.14 or newer. This feature is discussed in Appendix A of this
article. However, it is necessary that the phase search methods discussed in Step 10
are capable of achieving successful phasing and commutation before nomovement
phase referencing is setup.

PMAC Commutation of Brushless Motors 5


Application Note

PMAC’s Automatic Phase Search


The first is a PMAC automatic search which the control can be set up to perform on power-up/reset.
This search is quick, but gentle and is effective for most systems. It can however provide inconsistent
results if there is substantial friction or a directional load (such as gravity). For systems with these
problems, the second method, which will be referred to as the stepper method of phasing brushless
motors, should be used.
In the automatic phasing search, PMAC makes two guesses as to the proper phasing reference point,
applies a torque command at each guess, and observes the response of the motor to each command.
Based on the magnitude and direction of the two responses, PMAC calculates the proper phasing
reference point. It then starts the commutation based on this reference and closes the servo loop to hold
position.
Two parameters must be specified to tell PMAC how to do this phasing search. Ix73 specifies the
magnitude of the torque command during each guess, with units of DAC bits. Typical values are 2500 to
10,000 with 8000 (one quarter of full output range) being a good starting point. Ix74 sets the duration of
each torque command and evaluation of its response, with units of servo cycles. Typical values are 3 to
5 (around two milliseconds).
PMAC’s auto-phase search is actuated on power-up if Ix80 is set to 1. To power-up with the motors
killed, set Ix80 to 0 and issue a $ command for PMAC to execute its auto-phase search.
Note:
Ix69, the DAC Limit for motor x, can override the setting of Ix73. Make sure that
this limit is set high enough so that it does not prevent the phase search from
occurring. The default value is 20,480.

Stepper Method of Phasing


The stepper method of phasing is described below. There are many derivations of this method, however
all involve directly exciting phases of the motor to force the motor into a known position in the phasing
cycle, (much like the polarity test, and six-step tests described previously). This method is rougher and
causes more movement than the automatic search method, but usually it is more robust for systems with
high friction and/or large directional loads. It is possible also to phase parallel gantry motors
simultaneously using this method. The commands to perform this phase-search can be issued from the
PMAC executive software's terminal window for initial testing or can be built into a PLC program which
runs once on power-on/reset.
The stepper method of phasing involves zeroing the contents of the phase position register for the motor
to be commutated. To do this, set up a pointer to the register. The list below shows the memory locations
of these registers. Mx70 is the suggested M-Variable for pointing to this register.
Example 1:
The example below illustrates how a stepper-phase search can be easily accomplished in a few keystrokes
from the PMAC Executive’s terminal window. This example assumes that the motor to be phased is #3
and phase 2 was found to lead phase 1 (I372=85 or 64).
#3 O0 ;Open-loop mode, zero-magnitude
I329=-3000 I379=3000 ;Force current to enter 1st phase and exit 2nd phase
;(If Ix72 is 171 or 192, Ix29 should be 3000, Ix79=-3000)
I329=0 ;Remove first phase bias, (near zero DAC output)
M370=0 ;Define current position as phase zero position
I379=0 ;Remove second phase bias, (near zero DAC output)
O10 ;Issue small positive open-loop command
O-10 ;Issue small negative open-loop command

6 PMAC Commutation of Brushless Motors


Application Note

When the phasing works and commutated open-loop moves can be performed, build the phase-search into
a PLC program (see below) so PMAC can execute the phasing automatically by merely running the PLC
program on power-up/reset.
Example 2: The example below illustrates a PLC stepper-phase search program for a brushless motor
defined as #3.
CLOSE ; Make sure all buffers are closed
I380=0 ; Do not perform PMAC's auto-phase search on power-up
M370->D:$00B9 ; Assign M-variable to point at to Motor #3’s phase position register

PLC Program to Perform Phasing:


OPEN PLC 1 CLEAR
CMD "#3O0" ; Address motor #3 and issue zero-magnitude open-loop command
P329=I329 ; Store first phase bias value
P379=I379 ; Store second phase bias value
IF (I372=171) OR (I372=I92) ;Phase 2 lags Phase 1
I329=3000 ;Force positive current into first phase
I379=-3000 ;Force negative current to exit second phase
ELSE ;Phase 2 leads Phase 1,
I329=-3000 ;Force negative current to exit second phase
I379=3000 ;Force positive current into second phase
ENDIF
P1=0 ;Start delay counter variable
WHILE(P1<5000) ;Create delay to allow motor to stabilize
P1=P1+1 ;Increment delay counter
ENDWHILE
I329=P329 ; Restore first-phase bias (near zero DAC output)
P1=0 ;Start delay counter variable again
WHILE (P1<5000) ;Create delay to allow motor to stabilize
P1=P1+1 ;Increment delay counter
ENDWHILE
M370=0 ;Define current position as zero position in phasing cycle
I379=P379 ;Restore real second-phase bias (near zero DAC output)
CMD "#3J/" ;Close the servo-loop on motor #3
DISABLE PLC 1 ;Keep this program from executing again
CLOSE
When the above program is run, the motor is driven to its zero location in the phase cycle and the contents
of the phase position register are set to zero. Thus, PMAC now has a reference for the zero location in the
phase cycle and can commutate based off of this reference point. (Note that the method of locating the
zero phase location is different for motors with phase 2 leading phase 1 than for motors with phase 2
lagging phase 1.)
The stepper method of phasing should repeatedly lock the motor into the same position in the electrical
cycle each time the phase search is performed, (one physical location on a 2-pole rotary motor, two
physical locations on a 4-pole rotary brushless motor, or evenly spaced points on a linear motor). If
having difficulty commutating once the search has been executed, more the motor shaft (or table) by hand
to different physical positions with no bias on the DACs. Then execute the phase search, mark the
settling point (zero location in the phasing cycle, and repeat).
Sometimes, as mentioned earlier, PMAC’s automatic phase search does not yield consistent results
(particularly in systems with vertical loads or high-static friction). If interested in the accuracy of either
phase search method on the system, use the test in Appendix B to compare phasing of loaded and
unloaded motors, thus determining the accuracy of the motor phasing under load.

PMAC Commutation of Brushless Motors 7


Application Note

11. PMAC should now be ready to commutate the motor. Address the axis to be commutated and issue a
small open loop command. Confirm that with a small positive open loop command, the position
counter counts up. If the open loop command is then changed to a negative value, the motor should
reverse direction and the position counter should count down. If all works well, move on to jogging
the motor (closed servo-loop control), and tuning the PID loop. Do this before implementing any of
the additional resolver-based features discussed following appendices.
12. An additional parameter which will aid in optimum performance of a brushless motor (rotary or
linear) is Ix34, the PID Integration mode. When proceeding to tune the PID loop, this parameter
should be set to 0, continuous integrator operation, to overcome cogging imperfections in the motor.
Although not necessary for commutation, setting Ix34 to 0 will improve performance.
Summary
1. Set Ix01=1 to enable commutation.
2. Set Ix02 to define which pair of DAC outputs will command the amplifier.
3. Set Ix83 to define the encoder register which will provide phase position feedback.
4. Set up the Encoder-decode variable (I900, I905, I910, etc.) to match the direction sense needed in the
application.
5. Set Ix70 to define how many commutation cycles occur within each mechanical cycle (revolution).
6. Set Ix71 to define how many encoder counts occur per N commutation cycles, where N is the value of
Ix70.
7. Perform six-step test to verify operation of hardware (Motor, Amp, and PMAC DACs).
8. Set Ix29 and Ix79 with DAC bias values such that when 0VDC is commanded, no current flows
through any phase of the motor.
9. Perform polarity test and set Ix72 accordingly to define angle between motor phases.
10. Define to PMAC how it is to perform a phase search and actuate the search.
a. PMAC automatic phase search
• Set Ix73 to define the magnitude of the torque command during the movements of the phase
search.
• Set Ix74 to define the duration of each torque command.
• Actuate search by issuing the $ command.
b. Stepper method of phasing
• Set Mx70 to point to the phase position register.
• Write and execute PLC program, or type commands into terminal window, to drive motor to
stable equilibrium position and zero phase position register.
11. Confirm correct commutation by issuing small open loop commands, or jogging the motor (jogging
however will require reasonable servo-gains).
12. Proceed to tune the PID loop, setting Ix34 = 0 for continuous integrator operation.

8 PMAC Commutation of Brushless Motors


Application Note

Appendix A. - No-Movement Power-on Phase Reference


All brushless motors require some type of a phase-search on power up to establish a relationship between
the zero position of the motor’s commutation cycle and the zero position of the feedback device.
However many applications cannot tolerate the movement (up to 240 electrical degrees) associated with a
conventional power-on phase search. Further complicating the system designer’s task is that this
conventional power-on phase search may occur in either direction depending on the prior rest position of
the motor’s rotor.
For these applications, a no-movement power-on phase search is required. This is a feature which
PMAC commutated motors may incorporate provided that:
• An absolute position feedback device (such as a resolver or absolute encoder) is rigidly coupled to the
motor rotor. The position sensor must be absolute over at least one commutation cycle.
• PMAC must be equipped with PROM version 1.14 or newer.
The no-movement power-on phase reference works as follows. Initially, when setting up the system (this
may be done in a lab setting), the motor is forced to the zero position in its phase cycle. The position of
the absolute sensor is read by querying an M-Variable previously set up to point to the sensor. After
performing some math on this value, the resulting value is stored in PMAC as Ix75 and represents the
power-on phase position offset. Ix81 is set to tell PMAC the address location where it can find the
absolute sensor's feedback, and how to decode this information. On power-up (or when a reset motor, $
command is issued) PMAC will look to this address, grab the current position of the rotor, add to it the
pre-determined offset parameter, and instantly it knows where the motor is in its phasing cycle relevant to
the current position. No movement is necessary.
The steps described below show the setup of this feature in detail.
1. First make sure that the system is commutating correctly with either the PMAC’s automatic phase
search or the stepper phase search method before incorporating the no-movement phase search (see
steps 11 and 12 above). If the system has difficulty commutating, the no-movement phase search will
only add to the problems.
2. PMAC must be told which address to look to on power-up/reset for absolute phase position
information. Ix81 defines this address to PMAC as well as how to read the data it finds there. Do not
confuse this parameter with Ix83, the ongoing phase position information, as many times this
information may have been decoded differently and brought into a different address, or may be from
an entirely different feedback device altogether. Ix81 is set to zero if no special power-on phase
position reading is desired, as in the case for an incremental encoder. If PMAC is commutating a
motor and this is the case, one of the two power-on phasing routines aforementioned will be required.
Note:
Ix81 is used for PMAC's commutation algorithms alone, to locate position within
one electrical cycle of the motor. It is not used for any servo loop position
information, even for power-up. Ix10 may be used for that purpose.
Ix81 consists of two parts. First, the low 16-bits contains the address of the register containing the
power-on position information, either a PMAC memory-I/O address or an address on the multiplexer
(thumbwheel) port. The high 8-bits specify how to read the information at the address.
Tip:
Ix81 can best be interpreted if the parameter is specified in hexadecimal form ($
prefix). If I9 is set to 2 or 3, the value of this variable will be reported back to the
host in hex.

PMAC Commutation of Brushless Motors 9


Application Note

If the high eight bits contain a value from 0 to 7, the address specified in the low 16 bits is a multiplexer-
port address with a valid range of $0002 to $0100 (1 to 256 decimal). The actual multiplexer port
addresses have a range from 0-254, but in Ix81, a value of 256 must be used to represent 0. The
multiplexer port is used for devices like the resolver-to-digital converters on Acc-8D Option 7. The value
in the high eight bits specifies the number (location) of the device at that multiplexer address; there are
potentially eight devices (0-7) at each multiplexer address.
If the high eight bits contain a value from 8 to 24, the address specified in the low 16-bits is a PMAC
memory-I/O address, usually the address of an Acc-14 register containing absolute encoder position. The
value in the high eight bits specifies the number of bits, starting at bit 0, to be used for the absolute
power-on position information.
Example 1:
Motor 1 has a single resolver at location 0 of an Acc-8D OPT-7 R/D converter card. The card is set up to
communicate absolute position feedback to PMAC through the multiplexer (JTHW) port at address 0.
Thus, I181 would be set to a value of $000100. (Recall $100 represents multiplexer address 0.)
Example 2:
Motor 2 has a single resolver at location 6 on an Acc-8D OPT-7 board. The board communicates at
multiplexer address 4. I281 should be set to $060004.
Example 3:
Motor 3 has a geared resolver package composed of three resolvers coupled to its tail-shaft. The resolver
signals are connected back to an Acc-8D OPT-7 board at locations 1, 2, and 3 (fine, medium, and coarse).
The R/D card is setup at multiplexer address 6. I381 should thus be set to $010006.
Example 4:
Motor 4 has a 20-bit single-turn absolute encoder at Port A of the first Acc-14 (address Y:$FFD0).
Thus, I481 should be equal to $14FFD0 ($14=20 decimal).
Example 5:
Motor 5 is a DC brush motor which has a geared resolver package coupled to it containing two resolvers.
These are interfaced to locations 0 and 1 of an Acc-8D OPT-7 board which itself lies a multiplexer address
2. In this case, I581=0 as no phase search or PMAC commutation is required for a DC brush motor.
3. The following steps are associated with determining the phase position offset. First, define an M-
Variable to point to the absolute sensor (TWR form for a resolver, Y form for an absolute encoder).
Example 1:
To point to a resolver interfaced through location 0 of Acc-8D OPT-7, which ties into the JTHW port at
multiplexer address 0: M171-> TWR:0,0.
Example 2:
To point to a resolver interfaced through location 4 of Acc-8D OPT-7, which ties into the JTHW port at
multiplexer address 2: M171-> TWR:2,4.
Example 3:
Motor 3 has a 20-bit single-turn absolute encoder at Port A of the first Acc-14 (address Y:$FFD0).
Thus, M900->Y:$FFD0,0,20.
4. Give the motor an open loop, zero-magnitude command (#1 O0).

10 PMAC Commutation of Brushless Motors


Application Note

Steps 5 and 6 will manually run the stepper motor phasing search using on-line commands to drive the
motor to the zero location of its phasing cycle.
5. Put a bias on the first phase by setting Ix29. Use a positive bias if Ix72=171 or 192 (usually 3000 is a
good value), or a negative bias if Ix72=85 or 64. Also, put a bias in the opposite direction of the same
magnitude on the second phase by setting Ix79. The motor should lock in on a position and refuse to
move. (An example illustrating steps 2-11 is provided after step 11.)
6. Now remove the first phase bias by setting Ix29 back to zero, or the value found to force zero current
into the phase, and the motor should lock in on another position. This position is the zero position of
the phasing cycle.
7. After the motor has settled, read the position of the absolute sensor by querying its M-Variable value.
8. Take the negative of this value, multiply it by Ix70, and assign the resulting value to Ix75. This
records the offset between the zero position of the phase cycle and the absolute sensor’s zero position.
9. Return Ix79 to zero or the bias value found to force zero current into the phase.
10. Set Ix73 and Ix74 each to 0. If this is not done, PMAC’s automatic phase search will execute on
power-up/reset.
11. Address the motor to be phased and issue a reset ($) command. The motor should now be phased
properly. Notice little to no movement when the $ command is issued. The motor should now be
capable of closed loop movements such as jogging. Remember to save the new I-Variables before
doing a full reset on the card.
Example:
The following example illustrates steps 2-11. A brushless motor with Ix70=1 and Ix72=171 is connected
to PMAC as motor #1. The feedback for this motor is a resolver connected to location 0 of an Acc8D-
OPT7 R/D board. The R/D board interfaces to PMAC at multiplexer address 0.
I181=$000100 ;Set power-on position address
M171->TWR:0,0 ;Set M-Variable to look at absolute position information from Thumbwheel multi-
;plexer port, address 0, resolver location 0 #1O0 Address motor #1, open-loop zero
;command
I129=2000 ;Positive bias on first phase output
I179=-2000 ;Negative bias on second phase output
I129=0 ;Remove bias from first phase output
M171 ;Query sensor position
223 ;PMAC responds
I175=-223 ;Set phasing position offset (223*-1*Ix70)
I179=0 ;Remove bias from second phase
I173=0 ;Disable PMAC’s automatic power-up/reset phase search
I174=0 ;Disable PMAC’s automatic power-up/reset phase search
$ ;Try phasing from absolute position sensor. Motor shaft should not move.

PMAC Commutation of Brushless Motors 11


Application Note

Appendix B. - Testing the Accuracy and Repeatability of the Phase


Search
Three methods of phasing the motor on power-up/reset have been discussed. PMAC’s automatic phase
search is adequate in most applications and easily implemented. The stepper motor method of phasing is
more robust but requires a few more keystrokes to set up. Finally, the no-movement phase search,
discussed in Appendix A yields the most accurate and repeatable phasing results, while additionally
providing the advantage of zero movement during the power-on/reset phasing. An absolute sensor is
necessary however if this method is to be implemented.
It is sometimes desirable to know how accurate a phasing search method is. Forces, such as directional
loads and friction, can hinder a phase-search in its attempt to find the zero location in the motor's phasing
cycle. In severe cases, the motor will not phase at all and will lock-up when asked to subsequently move.
More common however, is that the zero-location reference ends up shifted slightly from the actual zero
location of the phase cycle, resulting in decreased motor efficiency, (specifically, a reduction in motor
torque and increased heating of the motor).
The question hence arises as to how accurate a particular phasing method may be for an application, and
whether or not this accuracy is repeatable. The following test addresses these questions.
To determine the accuracy of a phase-search, it is necessary to first perform a phasing with no load on the
motor (i.e. shaft decoupled from system mechanics for a rotary motor, table unloaded for a linear motor).
The phasing method suggested as a benchmark for this unloaded test is the stepper motor method.
1. First, if a M-Variable does not point to the motor’s phase position register, set one at this time. The
list below shows the memory locations of these registers. Mx70 is the suggested M-Variable for
pointing to this register.
Motor#1 phase position register ->X:$0041,24,S
Motor#2 phase position register ->X:$007D,24,S
Motor#3 phase position register ->X:$00B9,24,S
Motor#4 phase position register ->X:$0F5,24,S
Motor#5 phase position register ->X:$0131,24,S
Motor#6 phase position register ->X:$016D,24,S
Motor#7 phase position register ->X:$01A9,24,S
Motor#8 phase position register ->X:$01E5,24,S

Note:
To periodically examine the contents of Mx70 which will aid in the interpretation
of its data, set the M-Variable to process a single 24-bit width register into a signed
integer (see format shown above).
2. Drive the unloaded motor to its zero location in the phase cycle. The on-line commands from the
stepper method of phasing necessary to do this are shown below. The example below assumes we are
working with motor #1.
#1 O0 ; open-loop mode, zero- magnitude
P129=I129 P179=I179 ; Store predetermined DAC bias values which yield near zero DAC output
I129=-3000 I179=3000 ; Force current to enter 1st phase and exit 2nd phase
; (If Ix72 is 171 or 192, Ix29 should be 3000, Ix79=-3000)
I129=P129 ; Remove 1st phase bias, (near zero DAC output)
M170=0 ; Define current position as phase zero position
I179=P179 ; Remove 2nd phase bias, (near zero DAC output)

12 PMAC Commutation of Brushless Motors


Application Note

3. Next, Home the motor (HM) to the nearest index channel. (Make sure that there is some integral
gain in the system to reduce the following error during the home search to zero.)
4. Query Mx70 and copy down the value. This is the distance between the fixed index channel and
phase-search determined zero location of the phasing cycle. This value will serve as the benchmark
for comparison later.
5. Now, load the system by reconnecting mechanics or loading the linear table with whatever weight
may be on it at power-up/reset.
6. Execute the phase-search to use in the system.
7. Home the motor to the nearest index channel.
8. Query Mx70 and compare it to the value found in step 4 above. The two should be quite similar. The
larger the difference between the two numbers, the larger the error is in the phase search performed
under load. In other words, the smaller the difference, the more accurate the phase search performed
under load. Use the following formula to determine the percentage of possible torque can be
achieved with this phasing.
Difference between Mx70 (Step 4) and Mx70 (Step 8) | x 360 = Phase Error in Electrical Degrees (P.E.E.D.) # of
counts per commutation cycle
COS (P.E.E.D.) x 100 = % of available torque which will be possible with this phasing.
9. Several repetitions of steps 6, 7, and 8 from different starting positions will give an indication of
how repeatable the phasing method being used under load actually is. Actually, the Mx70 values
queried in step 8 are quite consistent. If using PMAC’s automatic phase search and find that for
the application there is a large deviation between the Mx70 values collected in step 8, implement
the stepper-motor method of phasing to reduce the deviation. If using the no-movement phase
referencing, the phase search is 100% repeatable.
Troubleshooting Brushless Motor Commutation
No Motor Movement
1. Check to make certain that the PMAC overtravel limits are disabled either externally or via Ix25.
The amplifier may also have overtravel limits which must be disabled for motor operation.
2. Is the amplifier enabled? If using PMAC for this function, use the Status Window in the PMAC
exec to determine if PMAC is enabling the output. Use a voltmeter to confirm the polarity at the
amplifier.
3. With a voltmeter or oscilloscope, monitor the DAC output voltages from PMAC with respect to
AGND while stepping through the test. (Access at the remote terminal block.) Watch the values
change as the different phases are turned on and off. If unable to see the changes, confirm that Ix02
is set to the pair of DAC outputs connected to the amplifier’s command inputs. Also, verify that
when performing the six-step test, the correct motor is addressed. Is there +/- 15VDC connected to
PMAC? If the problem persists, set M-Variables to point at the DAC registers (My02 and Mz02
where y and z are DAC#s) and query their values as Ix29 and Ix79 are changed. If the M-Variable
contents are equal to Ix29(Ix79) then a problem exists with PMAC’s output hardware (bad supply or
componets). If the M- Variable contents are not equal to Ix29(Ix79), a software fault is probably the
cause (i.e. limits, amp fault).
4. If the DAC output value is changing as successive commands in the test are issued, PMAC is trying
to step the motor through its commutation cycle, however the amplifier is not following the command
signals and driving current into the motor windings. Check for command signal integrity at the
amplifier and phase connection between the amp and motor.

PMAC Commutation of Brushless Motors 13


Application Note

Motor Moves, but Locks into a Position, Refusing to Move Again


With a voltmeter or oscilloscope, monitor the DAC output voltages from PMAC with respect to AGND
while stepping through the test. (Access at the remote terminal block.) Are their values changing as the
different phases are turned on and off? If not, verify that both +/- 15VDC are connected to PMAC. If the
problem persists, set M-Variables to point at the DAC registers (My02 and Mz02 where y and z are
DAC#s) and query their values as Ix29 and Ix79 are changed. If the M-variables contents are equal to
Ix29(Ix79), then a problem exists with PMAC’s output hardware (bad supply or componets). If the M-
variables contents are not equal to Ix29(Ix79), a software fault is the cause (i.e. limits, amp fault).
Less than Six Distinct Steps Observed in the Test
(Angular distance traveled per step is not consistent)
1. Confirm that Ix02 is set for the pair of DAC outputs connected to the amplifier’s command inputs.
2. Is Ix01 set to 1 to enable commutation?
3. With a voltmeter or oscilloscope, monitor the DAC output voltages from PMAC with respect to
AGND while stepping through the test. (Access at the remote terminal block.) Are their values
changing as each different pair of phases are turned on and off? If not, confirm that both +/15VDC
are connected to PMAC. If problems persist, the PMAC may have a damaged DAC output. Set M-
Variables to point at the DAC registers (My02 and Mz02 where y and z are DAC#s) and query their
values as Ix29 and Ix79 are changed. If the M- Variables contents are equal to Ix29(Ix79), then a
problem exists with PMAC’s output hardware (bad supply or components).
4. If the DAC output value is changing as successive commands in the test are issued, PMAC is trying
to step the motor through its commutation cycle, however the amplifier is not following the command
signals and driving current into the motor windings. Check for command signal integrity at the
amplifier and phase connection between the amp and motor. Also, confirm that the amplifier’s input
stage is set up to receive two sinusoidal phase commands and will generate internally the third phase
via balance loop circuitry. Amplifiers which only accept +/10 VDC current and/or velocity
commands may require modification to allow PMAC to perform the motor commutation. If the
problem persists, power down, disconnect the motor, and measure the resistance between motor
phases (R to S, S to T, and T to R). All three phase-to-phase resistance values should be
approximately equal. If not, there is a problem in the motor. If the resistances are equal, chances are
that the amplifier has a bad power transistor or a problem in the power stage. Make sure that the
motor can be six-stepped before continuing!
Troubleshooting Stepper Method of Phasing
Motor Moves, but Locks into a Position, Refusing to Move Again
1. Is the motor phased? Has PMAC’s auto-phasing been set up and actuated on startup (Ix80=1) or with
a $, or performed a stepper phase search. It may be possible that the loads in the system prevent
PMAC’s auto-phasing routine from accurately determining a phase reference point. Try the stepper
phase search method.
2. Check the DAC offset parameters Ix29 and Ix79 and confirm that they are at the values determined in
step 8.
3. Check the angle between phases, Ix72. Is the value what was determined in step 9? If the motor six-
steps but locks up when issued an open-loop command, there is a polarity mismatch. Repeat the
polarity setup test in step 10 and adjust Ix72.
4. If Ix72 was changed, was the parameter saved and $$$ typed to allow the card to re-read the new value?
5. After making changes to any of the commutation setup I-variables, was the motor re-phrased before
trying open loop moves or jog commands.

14 PMAC Commutation of Brushless Motors


Application Note

Motor Moves, However Slow Jogging Results in Noticeable Lurching of the


Shaft
This is a symptom associated with saturated resolver feedback. If using the Acc-8D OPT7 R/D converter,
turn the motor shaft by hand while observing the sine and cos input amplitudes with a scope (preferred) or
meter. The amplitudes should not exceed 5V peak to peak. If they do, adjust the gain pot for the resolver
reference signal such that the transformed signals (sin and cos) are 5V peak to peak.
Troubleshooting No-Movement Power-On Phase Reference
Motor Phases, but Movement Still Observed in Phase Search
1. Have both Ix73 and Ix74 been set to zero?
2. Verify that Ix81 is correctly pointing to the address of the absolute position information.
Motor does not Phase; Locks up or Runs Away
If the motor was capable of phasing with PMAC’s automatic phase search or the Stepper-phasing method
prior to attempting this method of phasing, the no-movement phase search has failed for one of three
reasons:
1. PMAC has incorrectly read the absolute phase position.
a. Check the value of Ix81. Is it pointing to the absolute position sensor?
b. Using a M-Variable assigned to the absolute position information verify that the
information updates as the motor shaft is turned. (The PMAC Executive’s watch window
can be used to easily view this.)
2. The phase position offset value is incorrect.
a. Verify that Ix75 is indeed set to the value determined in the setup test.
b. When setting up this value were the correct excitation commands (in accordance with the
value of Ix72) issued? (See step 5).
2. Have Ix29 and Ix79 returned to zero, or their zero phase current values?

PMAC Commutation of Brushless Motors 15

Das könnte Ihnen auch gefallen