S32K396 Motor Control Kit with 3-Phase PMSM
The S32K396 motor control kit with 3-phase PMSM is the newest version of NXP's motor control kits. It creates compatibility between the 3-phase low voltage source inverter and NXP's S32K396 MCU, which is part of the S32K39/37/36 family for electrification applications. The power stage incorporates the MC33937 3-Phase Field Effect Transistor Pre-Driver, offering a comprehensive set of functions and condition monitoring capabilities. The following are the main features of the motor control kit:
SYSTEM CONCEPT
The system is designed to drive a 3-phase PMSM, using the following NXP components:
Control methodology includes:
PMSM CONTROL STRATEGIES
The NXP's 3-phase PMSM motor control kit offers four control strategies which can be enabled in FreeMASTER using the MCAT tool:
Each of them has its own purpose.
SCALAR CONTROL
The Scalar Control (see Fig. 4) is primarily used to debug the position sensor signals and verify the phase currents measurement since these variables do not provide any feedback to the control structure. The input to the scalar control scheme is the required speed in rpm (Speed_req) which is further recalculated to the required electrical angular velocity ωe in rad/s. This variable is?multiplied by Kfactor?to provide the required q-axis voltage uq_req?for the PMSM and also integrated to receive the required electrical position θe needed for the Inverse Park Transformation. The required d-axis voltage ud_req?is set to zero which means that the stator voltage lies in the motor q-axis. The dq voltages are then further transformed with the Inverse Park Transformation to the stationary reference frame αβ. These voltages are inputs into the Space Vector Modulation (SVM) to create duty cycles for the Voltage Source Inverter (VSI) which provides PWMs for PMSM.
VOLTAGE FOC
The Voltage FOC can be turned on when the position sensor signals are debugged properly in Scalar Control. As evident from Fig. 5, the feedback from the position sensor is now set back to the Inverse Park Transformation to transform required dq voltages to the stationary reference frame?αβ. Requesting the?d-axis voltage ud_req, the PMSM will align to the nearest d-axis position. Requesting the q-axis voltage uq_req, the PMSM will start to spin in a forward or backward direction based on the amplitude of the required voltage.
CURRENT FOC
In the Current FOC, dq currents are used as feedback to the control loop. Firstly, phase currents in the 3-phase stationary reference frame abc need to be transformed to the 2-phase stationary reference frame?αβ using the Clarke Transformation. Afterward, the Park Transformation needs to be employed to transform the?αβ currents to the rotational reference frame dq. In this reference frame, the currents are DC values and can be easily controlled by simple PI controllers. In the Current FOC scheme, the application user can choose to control d- or q-axis current. Requesting the d-axis current, the PMSM will align to the nearest d-axis position similarly as in the Voltage FOC scheme. Attention needs to be paid when choosing the required q-axis current. Firstly, it is recommended to hold the shaft of the PMSM before demanding any current in the q-axis. Afterward, the required q-axis current can be demanded, which will provide torque to the PMSM. Thus, the machine will try to rotate in a forward or backward direction based on the amplitude of the required current. The measured q-axis current Iq_real?can be compared with the required q-axis current Iq_req?in the FreeMASTER project panel as well as the d-axis currents.
领英推荐
In the Current FOC, the feedback currents can be calibrated with the real currents measured on the shunt resistors of VSI. Requiring the d-axis current will align the rotor to the d-axis position. Since the d-axis position is aligned with phase a, the measured d-axis current as watched in the FreeMASTER should be the same as the current measured directly on phase a of VSI. If not, the current scales should be calibrated properly for accurate FOC operation.
SPEED FOC
The Speed FOC, as the name implies, allows for control of the PMSM speed in a forward or backward direction. It is the outer loop of the FOC structure. The only addition according to the Current FOC is another PI controller in the q-axis. This connection represents a cascade control structure. The speed can be controlled by the required electrical angular velocity ωe_req. The error between the required and measured electrical angular velocity is then suppressed to zero with a speed PI controller to set a reference current in the q-axis.
The required d-axis current is set to zero in the NXP's application. However, by providing a negative required d-axis current to the PMSM, the speed region of the machine can be further enhanced. The part of the?AMMCLib library is also NXP's algorithm FW, which allows to increase PMSM speed range by controlling the required d-axis current to the negative values.
OUTPUT VOLTAGE ACTUATION AND PHASE CURRENT MEASUREMENT
The 3-phase VSI shown in Fig. 8?uses three shunt resistors (R38, R39, R40) placed in three legs of the inverter as phase current sensors. Stator phase current which flows through the shunt resistor produces a voltage drop which is interfaced to the ADC of the microcontroller through conditional circuitry.
Fig. 9 shows a gain setup and input signal filtering circuit for the operational amplifier which provides the conditional circuitry and adjusts voltages to fit into the ADC input voltage range.
The phase current sampling technique is a challenging task for the detection of phase current differences and for acquiring full 3-phase information of stator current by its reconstruction. Phase currents flowing through shunt resistors produce a voltage drop which needs to be appropriately sampled by the ADC when low-side transistors are switched on. The current cannot be measured by the shunt resistors at an arbitrary moment. This is because the current only flows through the shunt resistor when the bottom transistor of the respective inverter leg is switched on. Therefore, considering Fig. 8, phase a current is measured using the R38 shunt resistor and can only be sampled when the low-side transistor Q2 is switched on. Correspondingly, the current in phase b can only be measured if the low-side transistor Q3 is switched on, and the current in phase c can only be measured if the low-side transistor Q4 is switched on. To get an actual instant of current sensing, voltage waveform analysis has to be performed.
In standard motor operation, where the supplied voltage is generated using the SVM, the sampling instant of phase current takes place in the middle of the PWM period in which all bottom transistors are switched on. If the duty cycle goes to 100%, there is an instant when one of the bottom transistors is switched on for a very short time period. Therefore, only two currents are measured and the third one is calculated.
S32K396 is using the eTPU timer for switching pattern generation. The duty cycle of PWMs is limited to 98% by default. This is due to the minimum PWM that is needed for all the phase current measurements. Default settings and also type of modulation can be changed by using of eTPU function selector.
ROTOR POSITION/SPEED ESTIMATION
Different sensor types might require different approaches to evaluate the speed and position of the motor. The NXP approach for resolver systems utilizes an Angle Tracking Observer (ATO), see Fig. 10, which is based on the Phase-Locked Loop (PLL) technique. The ATO input is a position error between the position given by the sensor and the estimated ATO position. The PI controller in the ATO loop minimizes the input error by adjusting a control variable, in this case, the control variable is equivalent to a motor speed. Integration of the speed leads to the estimated position.
The ATO for the resolver system is characterized by the position error calculation.?The coefficients of the ATO PI controller, integrator, and filter can be tuned by the MCAT tool. The ATO function is a member of the motor control SW library?and is available as AMCLIB_TrackObsrv.
S32K396 is using eTPU for resolver feedback signal demodulation.?The resolver digital interface eTPU function (RESOLVER) uses an eTPU-based trigger to initiate the sine wave generator SGEN. SGEN generates a single harmonic sinusoidal frequency needed to recover coil excitation. In the resolver position sensor, this excitation signal is modulated by the sine and cosine of the actual motor angle. Motor angular position, angular speed, a revolution counter, and diagnostics are the results of the sine and cosine feedback signal processing.
SUMMARY
The S32K396 motor control kit with a 3-phase PMSM offers a comprehensive and advanced solution for motor control applications. It features the S32K396 MCU from S32K39/37/36 family and the MC33937 3-Phase Field Effect Transistor Pre-Driver, providing robust control and monitoring capabilities. The S32K396 motor control kit key highlights are:
Overall, the kit is an ideal solution for developing efficient and reliable motor control systems in various electrification applications.
Author | Michal Vidlák
Automotive Processing Digital Marketing at NXP Semiconductors
1 个月Motor control has always been a complicated mistery for me since I was in engineering school. I am always happy to see my co-workers at NXP find ways to make motor control simpler and faster.