A smart motor control module allows designers to carry out parameter identification in PMSM-based industrial designs.
Permanent magnet synchronous machines (PMSMs) are prevalent in industrial applications due to their robust mechanical dynamics and higher efficiency and power density. In PMSM, vector control contains a current loop as well as mechanical, electrical, speed, and position loops. However, accurate and precise machine parameters are needed to build a proper mathematical model for the PMSM control system.
Datasheets are not always available, and even when they are, they often don’t consider the operating conditions that each machine encounters. A simple way to solve this dilemma is to use a smart motor control module. The smart motor’s algorithm should be based on the recursive least square (RLS) algorithm with a forgetting factor that allows it to modify and monitor PMSM changes in real-time
This article presents solutions for RLS-based motor parameter identification for PMSMs using a smart motor control module. It will also demonstrate other parameters that have an impact on the control loop.
Field-oriented control in PMSMs
Normally, field-oriented control (FOC) is used to drive PMSMs to improve the dynamic response and utilize machine’s full potential. The basic objective is to separately control the field flux and torque. Following the Clarke and Park transformations, a PMSM model can be calculated under the synchronous rotating Q-D frame by using equations 1-4:
Where the subscripts Q and D refer to the Q-axis and D-axis variables, respectively. LS is the machine’s self-inductance and LM is the machine’s mutual inductance.
To further simplify the control, the rotor flux should be aligned on the D-axis while there is zero rotor flux on the Q-axis. The flux for the Q-axis and D-axis can be estimated with equations 5 and 6, respectively:
The electromagnetic torque can be calculated using the equation 7:
Following the transformation steps from the equations above, the magnetic flux can be directly controlled by the D-axis current. With a constant IDS, the torque (TE) can be directly controlled by manipulating the Q-axis current. If IDS = 0, then the electromagnetic torque is directly proportional to IQS.
Figure 1 The FOC of the PMSM can be obtained by using the above derivations. Source: Monolithic Power Systems
The outer loop reference can be the desired torque, machine speed, or certain shaft position. It is compared to the measured variables and feeds the error to a controller (most commonly a PI controller) to generate the command torque current (IQ-REF).
The D-axis current reference (ID-REF) is set according to the magnetic flux requirements. The outputs of the current regulators and controllers (VQ-REF and VD-REF) are the input for the space vector pulse-width modulation (SVPWM). The SVPWM block generates the gate signals for the inverter to drive the PMSM.
To achieve the desired dynamic performance of the PMSM servo machine, a smart motor control module can provide a controlled parameter with auto-tuning features. The smart motor control module can tune each PI controller automatically based on the given bandwidth requirements.
For current loop, the open-loop transfer function can be estimated by using the equation 8:
Given that current bandwidth equals S = jω, the PMSM control parameters (KP and KI) can be calculated based on the stator resistance and inductance.
Similar to the current loop, the outer loop’s open-loop function can be calculated with equation 9:
Where kt is the machine torque constant, J is the inertia, and B is the friction coefficient.
From equation 9, the control parameter for outer loop can be calculated using the machine torque constant (kt), inertia (J), and friction coefficient (B).
Recursive least square algorithm
The RLS is the recursive application of the least squares (LS) regression algorithm. New data is taken at each iteration to modify the system’s previous estimate.
The system output (y(t)) can be calculated with equation 10:
Where ϕ is the system input matrix and θ is the PMSM system parameter.
Use θ^ to indicate the estimated system parameters. The objective function, or the term that is meant to be minimized or maximized, can be estimated with equation 11:
A new matrix for P and L can be calculated with equations 12 and 13, respectively:
The RLS parameter identification scheme is estimated with equations 14-18:
Adding a forgetting factor to the algorithm allows the scheme to handle a time-varying system. The weight given to the forgetting factor data depends on how old the data is, as the old data has less of an impact on the current iteration. The newest data is given the greatest weight for the algorithm. The forgetting factor (λ) ranges between 0 to 1. The new objective function can be estimated with equation 19:
With the new objective function in equation 19, the nth oldest data has a weight of λn. The recursive least square with a forgetting factor scheme can be calculated with equations 20-24:
Next page: Experimental results