Spinning PM synchronous motors with sensored FOC using real-time embedded software Altair Embed®
Spinning PM synchronous motors with 'sensored' FOC using real-time embedded software Altair Embed®
Prof. Dr. Ir. Duco W. J. Pulle
Chief electrical drive consultant for Altair
Introduction
Machines characterized by a rotor with magnets on its circumference are widely used from traction (see example below) to servo type applications. Its topology, shown below, has three-phase distributed full pitch stator windings, with the rotor (with magnets) on the inside. This implies that the EMF-time plot is quasi-sinusoidal. The number of rotor poles is equal to 4 (two pole pair ) in this case.
PM synchronous topology, ref FLUX 16kW PM synchronous example
The electrical drive shown below consists of the processor (MCU) that houses the control algorithms and all the functionality needed to use the measured current/voltages and generate PWM signals for the converter. The currents, typically measured using in-line sensors (as opposed to shunts) is preferable to maximize the modulation index . Low-pass filters (LPF) are used to measure the converter output voltages and eliminate the PWM component. This implies that the average voltage per sample component remains and is not affected by converter dead-time or conductive voltage components of the semi-conductors. This provides the ability to accurately measure key motor parameters and input power, provided that the LPF characteristics are considered, as is the case. The 12-bit ADC unit digitizes the incoming voltages/currents, and these are sent to the Forward Clarke module that generates the motor current/voltages in stationary coordinates as shown in the vector plot below. These variables together with the measured DC bus voltage and most importantly the shaft angle decoder signals are required for the Controller and FOC Data (FD) modules.
The purpose of the FD module is to track the PM rotor flux vector and orientate the controller synchronous coordinate system as shown in the FOC vector plot. This requires instantaneous knowledge of the angle θ and amplitude (required to calculate the torque). The flux speed , is calculated from the angle θ.
Sensored drive
The controller module consists of a synchronous current (described in the book Applied Control of Electrical Drives) and speed controller, where use is made of the measured current vector , flux angle and, electrical shaft speed. Torque control requires control of the current . A shaft torque estimate is found using , where is the PM flux amplitude.
Vector diagram FOC vector diagram C&F
Critical to sensored FOC is the correct orientation of the d axis along the rotor angle θ generated with the encoder attached to the motor shaft. To achieve this, it is helpful to initially set the drive for “current & frequency control” as shown in the ‘FOC vector diagram C&F’ vector plot. Under these conditions, you set the electrical frequency , which in turn controls the angle that orientates the coordinate system relative to the stationary coordinate system. The orientation of the motor flux vector is entirely controlled by the load torque when the machine is synchronized (rotor shaft speed corresponds to rpm). Under no-load the PM flux vector is synchronized with the current vector, set to . The shaft torque of the machine is equal to , where is the angle between the d axis and the actual rotor flux. When a load is applied, the angle increases and the torque increases. The pull-out-torque is achieved with , after which the machine loses synchronism. No-load operation with is helpful as it allows estimation of the rotor flux, pole pair number, and alignment of the encoder angle as required for FOC and is shown below:
- Alignment of the encoder angle is achieved by condition , which means adding an offset in the FD module until said condition is met.
- Estimation of the flux amplitude requires measurement of the voltage and current vector amplitude and knowledge of the stator inductance and resistance. This allows calculation of the EMF amplitude using:
--eqn. 1
with and . The flux estimate is then equal to .
- The pole pair number p is readily identified by spinning the motor with a reference frequency , which corresponds to a shaft speed (rev/sec) of . For example, for a 2 pole pair machine , a reference frequency of 2 Hz is required to achieve a rotational shaft speed of 1 rotation per second.
Once these three conditions have been achieved under current control operation, FOC can be realized with two modes:
- Torque control, which means controlling the reference current , in which case the shaft torque is simply , which requires knowledge of the PM flux vector as mentioned above.
- Speed control, which requires access to the estimated flux speed (as generated from the encoder signals in the FD module) and the user reference flux speed . A proportional integral (PI) controller is defined as
, with and ‘s’ the Laplace operator.
The PI output is the reference quadrature current value, which has user-defined boundary limits . The proportional and integral gain are defined by the drive inertia and user-defined speed controller bandwidth (described in the book Applied Control of Electrical Drives).
Control of the d axis current reference is usually done to achieve field-weakening, which means reducing the voltage amplitude by rotating the current vector into the second quadrant of the d-q coordinate system. (See the FOC vector diagram shown earlier in this section.) This rotates the voltage vector , where , which is the short-circuit current of the machine. This implies that machines with a condition have a small amplitude compared to the EMF amplitude, which makes field-weakening ineffective.
Application example 1
A practical embodiment of the AC drive mentioned above is shown below and consists of an PMsyn Teknic Motor that has an encoder and a Texas Instruments F28069M Launchpad with a DRV 8301, 6-24V/10A boostpack. Real-time embedded control from Embed is used to fully control the electrical drive FOC sensored.
Texas Instruments Launchpad with boostpack PMSyn Teknic motor with encoder
The motor parameters are . Furthermore, field-weakening is not advisable, because , hence setting to zero is preferable.
You can review the video Field-oriented control HIL to learn more about and run this drive application. The Embed files required to build your own drive, based on this presentation are attached below.
Application example 2
A practical embodiment of the AC drive described in the previous example (but without converter voltage measurements using LP filters) is shown below for the ST-Micro application. It consists of an STM32 Nucleo-64 board interfaced with an 8-48V/2.8A three-phase brushless motor driver that is connected to the same Teknic motor used above. Real-time embedded control from Embed is used to fully control the electrical drive. Because the maximum converter current is well below the maxim motor current, the speed controller should be limited to 2.5A.
STM32 Nucleo-64 board with three-phase driver and PM Teknic motor
As in the previous case (where the machine current is (in this case) set by the converter and is limited to 2.8A). Hence, setting to zero is again preferable because field weakening is not effective for this drive. An estimate for the maximum shaft speed is found using , which gives . Therefore, with a 24V DC bus voltage, the estimated maximum shaft speed is for this motor. In practice, it will be slightly lower due to the presence of the stator resistance voltage component .
Shown below is the Embed diagram that makes use of the compiled-OUT file generated by the compile diagram as discussed in the video for the previous example. Initially, operation is set to speed control, but torque control is also an option.
Output variables are the shaft torque (mNm), shaft speed (rpm), DC bus voltage, and the estimated PM flux (Wb). Also shown is the per unit motor current locus (scale 0.1 =4 A), which is typical for PMsyn machines, due to the presence of quasi-sinusoidal EMF-time waveforms, as mentioned in the Introduction. The CPU time is the percentage of the sample time used by the processor to run the OUT file.
The experimental drone setup shown below shows the ST-Micro drive connected via a USB cable to the laptop that runs the Embed diagram shown above.
A current probe is used to show the measured phase current on the scope, with the drive operating under the same conditions (use of applied hand load) shown in the run-file above.
Experimental FOC setup
The Embed files required to build your own drive, based on this presentation are FOC PM sensored Embed files for ST-Micro are attached below.
About the author
Prof. Dr. Ir. Duco W. J. Pulle
Forty years of experience in electrical drives, including 25 as a professor at various European Universities, including RWTH-ISEA, Germany, the world leader in electrical drives. Author/co-author of three books and numerous conference/journal papers.
Over the past 15 years, I have been working as a consultant in the field of sensorless electrical drives with a wide range of machine types and power.
My vision and passion is to promote the use of real-time embedded control for electrical drive applications using Altair Embed. For this reason, a wide range of application examples have been developed that covers all machine types and control algorithms.
Educational background: Aviation College, B.Sc., M.Sc, Ph.D., flight engineer, and aviator.
Comments
-
Great job on this blog, thank you Duco and Mayank.
0