Spinning PM synchronous motors with sensored FOC using real-time embedded software Altair Embed®

Mayank_21559
Mayank_21559 New Altair Community Member
edited December 2021 in Altair HyperWorks

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 image ) in this case.

image
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 image . 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 image 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 image and orientate the controller image synchronous coordinate system as shown in the FOC vector plot. This requires instantaneous knowledge of the angle θ and amplitude image (required to calculate the torque). The flux speed image, is calculated from the angle θ.

image

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 image, flux angle and, electrical shaft speed. Torque control requires control of the current image. A shaft torque estimate is found using image, where  is the PM flux amplitude.


image   image

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 image, which in turn controls the angle image that orientates the image coordinate system relative to the stationary image 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 image rpm). Under no-load the PM flux vector is synchronized with the current vector, set to image. The shaft torque of the machine is equal to image, where image is the angle between the d axis and the actual rotor flux. When a load is applied, the angle image increases and the torque increases. The pull-out-torque is achieved with image, after which the machine loses synchronism. No-load operation with image 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 image, 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 image and knowledge of the stator inductance and resistance. This allows calculation of the EMF amplitude using:

        image         --eqn. 1

        with image and image. The flux estimate is then equal to image.

  • The pole pair number p is readily identified by spinning the motor with a reference frequency image, which corresponds to a shaft speed (rev/sec) of image. For example, for a 2 pole pair machine image, 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 image, in which case the shaft torque is simply image, 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 image. A proportional integral (PI) controller is defined as

    image, with image and ‘s’ the Laplace operator.

The PI output is the reference quadrature current value, which has user-defined boundary limits image. The proportional image and integral gain image 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 image is usually done to achieve field-weakening, which means reducing the voltage amplitude image 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 image, where  image, which is the short-circuit current of the machine. This implies that machines with a condition image have a small image 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.

image                 image
Texas Instruments Launchpad with boostpack                                                                      PMSyn Teknic motor with encoder

The motor parameters are image. Furthermore, field-weakening is not advisable, because image, hence setting image 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.

image

STM32 Nucleo-64 board with three-phase driver and PM Teknic motor

As in the previous case image (where the image machine current is (in this case) set by the converter and is limited to 2.8A). Hence, setting image to zero is again preferable because field weakening is not effective for this drive. An estimate for the maximum shaft speed is found using image, which gives image. Therefore, with a 24V DC bus voltage, the estimated maximum shaft speed is image for this motor. In practice, it will be slightly lower due to the presence of the stator resistance voltage component image.

 

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 image used by the processor to run the OUT file.  

image

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.

image

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

 image        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

  • Ric_22025
    Ric_22025
    Altair Employee
    edited January 2021

    Great job on this blog, thank you Duco and Mayank.