Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you do accurate angular positional control of a Brushless DC motor? 4

Status
Not open for further replies.

Nicholas Lee

Industrial
Jul 16, 2018
1
Whilst there are many examples of velocity control of Brushless DC (BLDC) motors on the web, I have been having trouble identifying exactly how to implement very accurate angular positional control.

I have a hardware setup with a BLDC motor, whose output shaft position is monitored by a very accurate absolute rotary optical encoder.
The current in each of its three coil windings is controlled from a 16-bit analog-to-digital converter (ADC). [i.e. precision analogue, not PWM controlled]

I understand the principle of converting the three winding currents (U, V ,W) into a single applied field vector (With a Magnitude and Direction) by means of Park-Clarke transforms etc.
I also understand that maximum torque is achieved when the applied field vector is 90 degrees ahead of the physical angular position of the rotor and that the torque falls to zero when the field vector is aligned with the rotor angle.
NB: There are no hall sensors in the motor, the position of the output shaft is measured with an absolute optical encoder.

My confusion arises partly because there is no externally observable way to accurately measure the physical angular offset between the magnetic field vector created by the phase windings inside the motor, and the zero-datum angle of the optical encoder attached to the motor shaft. This angular offset (call it Theta) is an unknown value, but it is constant, as the windings and the optical encoder are both physically connected to the motor shaft.
This unknown physical angular offset seems to be the main stumbling block to creating a positional feedback loop.
This is because Theta gets inherently added to the error value when subtracting the angle between the desired and the measured positional angle, and this messes up using that calculated error signal in the forward path of a any (PID) controller used to generate the required control signals.
In velocity control, the value of Theta would be irrelevant, but for positional control it matters.

Rearranging the system diagram, the unknown but constant offset theta is being added to the error, a bit like in this image.
Here, r(t) is the desired angle, y(t) is the angle of the shaft as measured by the optical encoder, and theta is the unwanted constant offset to be rejected.
Plant_ju7mjm.jpg

(Admittedly, the image does not represent how the 2 components of the field vector are generated, just the angular component)

Is there a way to auto-tune the system so as to evaluate what the angle Theta is?
Have I misunderstood the control problem entirely? Is there a better way to solve this?

Any help would be gratefully received.
 
Replies continue below

Recommended for you

I believe it's in the software. By leading and lagging the commutation while comparing it to the optical encoder output you can arrive at an encoder position that you can subsequently tag as a fixed and known shaft position.

Lots of machine tools that have spindles, that need to know their positions accurately, will require that the encoder be mounted to the motor shaft and adjusted precisely to time the encoder. Yaskawa spindles are this way. If someone unknowingly pulls the encoder off to replace the bearings they're in for a rough ride. Yaskawa uses the optical encoder output to actually commutate their spindle motors. If you get the encoder back on 'close' the spindle will turn while vibrating and making a racket. Otherwise, you will see the spindle turn a revolution and then everything goes down as the controller doesn't see the expected rotor acceleration. The drives, however, DO use an index on the encoder so they know precisely where the shaft is on stat-up after the shaft has rotated far enough to see the index pulse. So even these fully encoded drives need some software magic to get enough motion to find the index on power-up initialization.



Just re-reading your question I see your motor has an absolute encoder, I hadn't remembered that from reading it yesterday. What I describe above works for a relative encoder.

So! You have exactly what I described above in the Yaskawa drives. Yaskawa puts the drives in a jig, hooks the encoder output index channel to a scope. Hooks two of the motor windings to the scope and then spins the motor. The magnets in the motor develop a voltage across the the motor leads that is, of course, sinusoidal. They then dial in the encoder mounting angle index pulse as compared to the motor lead sinewave to some relationship they settled on via empirical discovery eons ago. They lock it on and paint the setscrews and charge about $1k for this annoying service.


Keith Cress
kcress -
 
We once did a phasing check on a set of custom motors because we were having trouble getting them to start. Turned out that the manufacturer managed to make each motor with a different color scheme, so no two motors had the same color wires for any of the windings.

There are sensorless motors that rely on back EMF to determine the correct commutation and phasing:




TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
What you want to do is to temporarily treat the motor like a stepper motor to force it to a known angle. For example, command a moderately large positive current for the U phase, the same negative current for the V phase, and zero current for the W phase. Wait for the rotor to settle at the resulting position, and read your encoder value. The encoder difference from this zero rotor angle is your offset (that you call Theta).

Of course, there are many possible rotor angles that you could call zero. It does not really matter as long as you are consistent. You must be careful and rigorous. Your zero position must match the exact implementation of the Park-Clarke transform you are using.

With your absolute rotor angle sensor, you only need to do this procedure once per motor, and store the offset value. If you get consistently assembled motor-encoder pairs, you only need to do this once per design. (With an incremental sensor, you would need to do this every time you power up.)

Once you have established your rotor reference, you will want to command current 90 degrees offset from this "stepper" current vector angle to obtain the maximum torque per unit current.

Curt Wilson
Omron Delta Tau





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor