*Now available in dedicated controller ICs*

*By implementing all relevant functional blocks in hardware, the MCE achieves significantly higher torque and speed control bandwidth than traditional DSP-hosted software alternatives. Furthermore, silicon area is minimized since library functions such as PI compensators and vector rotators can be used multiple times in the motor control algorithm.*

*By Angus Murray, International Rectifier*

Many controllers designed for permanent magnet synchronous motors (PMSMs) implement Rotor Field Oriented Control (FOC). While starting such a controller is relatively straightforward for stationary rotors, it presents more of a challenge for naturally rotating loads.

To implement rotor referenced FOC (Figure 1), motor winding variables are transformed to the rotating d-q frame, which is aligned with rotor field position. Motor flux and torque control consists of a direct axis current (id) control loop and a quadrature axis current (iq) control loop. An outer speed feedback loop provides reference input for the quadrature axis current control, while reference for the direct axis current is zero.

This approach maximizes motor efficiency since motor current is in quadrature with rotor field. All three feedback loops use proportional plus integral (PI) feedback compensators. The speed control loop regulates mechanical speed by calculating motor torque needed for zero speed error. The integral feedback term forces the steady state error to zero since even a small error will drive a change in output. The proportional feedback term reacts immediately to changes in the error and so determines the loop’s dynamic response. The size of the integral term is limited on both the lower and upper sides to prevent windup of the integrators during transients. For system protection, PI compensator outputs are limited to rated values.

Both i_{d} and i_{q} current control loops amplify the error between reference and actual currents and generate the desired voltage commands v_{d} and v_{q}. An advantage of the FOC approach is that it translates AC stator currents and voltages into quasi-DC voltages and currents in the rotor reference frame.

This is effective since the PI current compensators do not see currents at the rotor frequency and just regulate the DC quantities id and iq to compensate for the single pole introduced by the winding resistance and inductance.

Although rotor FOC relies on quantities referenced to the rotating d-q frame of reference, the signals measured are the AC motor phase currents i_{u}, i_{v} and i_{w}. To detect quantities i_{d }and i_{q}, these must be transformed into the rotating d-q frame of reference by using the following:

AC command voltages vu, vv and vw are obtained in an inverse fashion as shown:

Hence, PMSM control requires rotor angle and speed information, which, in a sensorless controller, is calculated from motor currents and voltages. The sensorless rotor angle observer, shown in figure 2 utilizes the stator winding back EMF calculated from the measured stator current and the applied stator voltages. Integration of the stator back EMF yields the linked rotor flux.

This is a function of the alignment between the stator windings and rotor magnet, which is a sine and cosine function of rotor angle. The rotor angle observer includes a vector rotator that calculates the error between rotor flux angle and estimated angle. The feedback loop includes a PI compensator that forces angle error to zero such that estimated angle tracks rotor flux angle. An extra integrating function derives the rotor angular velocity since input to the integrator tracks the time derivative of the output.

As the rotor angle observer relies on stator winding back EMF the rotor must be moving to estimate angle and position. At start up angle is unknown and the controller ramps up motor frequency in open loop mode without position feedback. The rotor magnet naturally synchronises with the rotating stator field even though it may not have optimum alignment. When the motor reaches a certain minimum speed, back EMF is detectable and the sensorless controller switches to closed loop mode.

### Naturally Rotating Load

In some cases (e.g. a fan in the outdoor-mounted module of an air conditioning unit) the rotor may be rotating naturally when the controller receives the start signal. As application of low frequency voltages to a motor spinning at high speeds would cause high currents and a potentially damaging pulsating torque, the controller cannot assume zero speed.

At start up, the controller does not have the required position data to correctly align the stator current with the rotor field and so generate a constant torque. Hence to successfully start the PMSM the rotor angle observer and controller must first operate without generating torque.

To achieve this, the controller starts with the reference for the torqueproducing current, I_{qref}, set to zero. Since the flux producing current, I_{dref}, is also zero the motor stator current is regulated to zero value and zero torque is applied. In this zero-torque-reference mode the rotor angle observer locks on to the rotor angle position. The angle rotation block in the angle estimator has two outputs - one a function of the sine of the error between the estimated angle and rotor flux angle, the other a function of the cosine of angle error. When the angle estimator locks onto rotor flux angle the sine output is zero and the cosine output equals the rotor flux magnitude. The controller determines that the estimator has locked on to the rotor flux once the flux magnitude output reaches a sufficiently high value. Depending on the observed direction and the motor speed, the controller can calculate in which direction the rotor is moving and take appropriate action.

### Forward Rotation

With natural rotation in the forward direction, the controller enables the speed control immediately after the rotor angle observer locks onto the rotor angle. The speed controller calculates torque reference current, I_{qref}, to bring the speed to the target value. The limit on the reference current, I_{qref}, is increased gradually up to rated motor current to reduce the possibility of abrupt speed transients.

Figure 3 shows the waveforms for rotor current and rotor angle during start-up into a forward rotating load, highlighting how the rotor angle estimator locks into rotor position. Once lock is detected, the limit on I_{qref} is removed and full torque, as commanded by the speed loop, is applied.

In practice, because the rotor angle observer is not accurate at very low speeds when back EMF is low, this procedure is only used when observed speed is above a threshold forward speed (around 5% to 10% of motor rated speed).

### Reverse Rotation

With reverse direction the controller must first brake the motor before starting in the correct direction from zero speed. Figure 4 shows experimentally obtained waveforms of the start into the reverse rotating fan.

There is the initial braking period, then a two second park function followed by an open loop speed ramp lasting about one second. Finally the controller closes the position and speed loop and the motor accelerates to the target speed.

### Dedicated Hardware

Procedures for starting naturally rotating PMSMs are now available in dedicated controller ICs. IR’s iMOTION * devices, for example, implement the rotor FOC principle in configurable hardware known as the Motion Control Engine (MCE).

By implementing all relevant functional blocks in hardware, the MCE achieves significantly higher torque and speed control bandwidth than traditional DSP-hosted software alternatives. Furthermore, silicon area is minimized since library functions such as PI compensators and vector rotators can be used multiple times in the motor control algorithm. Other functions include a Clark transformation, limiting, linear ramp, and a low pass filter.

The ICs also integrate an 8-bit microcontroller to perform non time critical tasks, as well as essential motion control peripherals. These are tightly coupled with the MCE, and can reconstruct the three phase motor current based on a signal from a single shunt resistor on the DC link bus. This simplifies current sensing arrangements by reducing the number of external sense resistors required.

*IR’s iMOTION, representing the intelligent motion control, is a trademark of International Rectifier.