[Permanent Magnet Synchronous Motor] Field Oriented Control (FOC) and Matlab/Simulink Simulation Analysis

Author: Senior Brother
Link: https://zhuanlan.zhihu.com/p/594184554
Source: Zhihu
The copyright belongs to the author. For commercial reprint, please contact the author for authorization, for non-commercial reprint, please indicate the source.
 

foreword

The permanent magnet synchronous motor control cannot be bypassed by FOC. This chapter mainly introduces the basic principle of FOC control, coordinate transformation and the mathematical model of the permanent magnet synchronous motor in the synchronous rotating coordinate system, and performs the simulation analysis of the permanent magnet synchronous motor FOC control algorithm through Matlab/Simulink.

1. The basic principle of FOC

The basic idea of ​​the field-oriented control (Field-Oriented Control, FOC) system is: through coordinate transformation, in the synchronously rotating coordinate system according to the rotor magnetic field orientation, an equivalent DC motor model is obtained, and the electromagnetic torque and flux linkage are controlled according to the control method of the DC motor, and then the control quantity in the rotor flux linkage oriented coordinate system is inversely transformed to obtain the corresponding quantity of the three-phase coordinate system to implement control. The specific process is shown in the following figure:

The most important principle of FOC is: Orienting according to the rotor magnetic field , that is, keeping the rotor flux rotation vector always coincident with the d-axis in the dq coordinate system, and the q-axis is orthogonal. By orienting the rotor field, the stator current is decoupled into an excitation component id and a torque component iq. The control of the rotor flux linkage is realized through the current id, and the control of the electromagnetic torque is realized by the current iq, which is analogous to the control of a DC motor. For surface-mounted permanent magnet synchronous motor SPM, the excitation component id is generally set to 0, and all stator currents are used to generate electromagnetic torque.

The main task of FOC is to achieve rotor flux orientation by constantly observing the rotor angle, that is, to keep the rotor flux rotation vector always coincident with the d-axis in the dq coordinate system, the q-axis is orthogonal, and the dq coordinate axis rotates synchronously with the rotor flux.

2. Coordinate Transformation

2.1.Clark coordinate transformation

Static coordinate transformation Clark transformation:

Using equal-amplitude transformation , the current in the three-phase stationary coordinate system ABC is converted into the current in the two-phase stationary coordinate system αβ by the following formula:

Transformation result:

Since ia+ib+ic=0, only the two-phase current in the three-phase static coordinate system is needed in practice, and it can be transformed by the following formula:

2.2. Park coordinate transformation

Convert the current in the two-phase stationary coordinate system αβ to the current in the synchronous rotating coordinate system dq, which is shown by the following formula:

Transformation result:

3. Mathematical model of permanent magnet synchronous motor in synchronous rotating coordinate system

The PMSM mathematical model in the three-phase natural coordinate system is transformed into a mathematical model in the synchronous rotating coordinate system through coordinate transformation. The d-axis of the synchronous rotating frame is aligned with the rotor flux linkage and keeps rotating synchronously, as follows:

Stator voltage equation:

Stator flux equation:

Electromagnetic torque equation:

Motion equation:

Putting the stator flux equation into the voltage equation, the stator voltage equation can be obtained as:

At this time, the electromagnetic torque equation can be written as:

From the above formula, the mathematical model of the PMSM in the three-phase natural coordinate system is transformed into a mathematical model in the synchronous rotating coordinate system through coordinate transformation, so that the mathematical model of the PMSM can be decoupled, and the PMSM can be controlled in the same way as the control method of the DC motor.

The overall control framework of FOC is shown in the figure below:

4. Matlab/Simulink Simulation Analysis of Field Oriented Control of Permanent Magnet Synchronous Motor

4.1. Voltage open-loop control

As shown in the figure above, the Vd and Vq voltages in the synchronous rotating coordinate system are directly given to realize the voltage open-loop control of the field orientation of the permanent magnet synchronous motor. The overall simulation block diagram of Matlab/Simulink is as follows:

4.1.1. Simulation circuit analysis

The voltage values ​​of Vd and Vq in the synchronous rotating coordinate system are directly given to realize the voltage open-loop control of the field orientation of the permanent magnet synchronous motor.

A normalization process is done here, and the output voltage (modulation waveform saddle wave) range of the FOC voltage open-loop control is set between [0,1].

The main circuit includes an inverter circuit and a permanent magnet synchronous motor. The inverter circuit is shown in the figure below, and the Average-Value Inverter module is used to directly generate a three-phase sinusoidal voltage. The permanent magnet synchronous motor adopts BR2804-1700 motor (the parameters of the motor are measured by ST Motor Proflier), and the parameters are as follows:

4.1.2. Simulation result analysis

Set the open-loop input voltage Vd, Vq to 0 and 1, and the saddle waveform output by the voltage after inverse Park transformation and SVPWM algorithm is as follows:

Motor speed: 0.2s sudden load

Motor stator current:

Motor rotor position:

Stator current value in dq coordinate system:

Stator voltage in the dq coordinate system:

Electromagnetic torque:

4.2. Current closed-loop control

In the voltage open-loop control, the stator current Id in the dq coordinate system is not equal to 0.036 after the load is added, indicating that the stator current is not fully used to generate electromagnetic torque. The current closed-loop control is introduced to accurately control the motor Id and Iq current values. The main function of the current loop is to start the motor with the maximum current during the starting process, and at the same time play a role in timely anti-disturbance to the fluctuation of the grid voltage, speed up the response speed of the dynamic system, and improve the stability of the system. Its control block diagram is shown in the figure above .

The overall simulation block diagram of Matlab/Simulink for permanent magnet synchronous motor current closed-loop control is as follows:

4.2.1. Simulation circuit analysis

The difference from the voltage open-loop control is that the stator current is fed back. The stator current in the synchronous rotation coordinates is set as Id_Ref and Iq_Ref, and the set value and the feedback value Id and Iq of the stator current are controlled by PI. The output of the PI controller is used as the voltage setting of the permanent magnet synchronous motor to drive the PMSM.

The rest of the simulation part is the same as the voltage open-loop control.

4.2.2. Simulation result analysis

Set the current reference value Id_Ref, Iq_Ref to 0 and 1, and the error between the current reference value and the current feedback value of Id and Iq is used for motor control through the output voltage Vd and Vq of the PI regulator.

Motor speed: 0.2s sudden load

Motor stator current:

Motor rotor position:

Stator current value in the dq coordinate system: When the motor starts, it starts with the set maximum current of 1A. When the speed reaches the steady state value, the current drops immediately, realizing the ideal and optimal start-up transition process.

Stator voltage in the dq coordinate system:

Electromagnetic torque:

4.3. Dual closed-loop control of speed outer loop current inner loop

In actual control, we generally care about the change of the speed, and expect the motor to change at the set speed. At this time, it is not possible to realize only the current closed loop, and the speed closed loop is added to realize the control of the speed. The output of the speed controller is given by the current controller, and the output of the speed controller must be limited, because the output limit value of the speed controller determines the maximum allowable current of the motor used.

The Matlab/Simulink overall simulation block diagram of the permanent magnet synchronous motor speed outer loop current inner loop double closed loop control is shown below:

4.3.1. Simulation circuit analysis

The speed closed-loop control is introduced on the basis of the current closed-loop control, and the output of the speed controller is used as the input of the Iq current to form a double-closed-loop control system of the speed outer loop and the inner loop current.

4.3.2. Simulation result analysis

4.3.2.1 Set the target speed to 3200r/min

Motor speed: 1s sudden load

Motor stator current:

Motor rotor position:

Stator current value in dq coordinate system:

Stator voltage in the dq coordinate system:

Electromagnetic torque:

4.3.2.1 Set the target speed as a variable value

Target RPM:

Motor speed:

Motor stator current:

Motor rotor position:

Stator current value in dq coordinate system:

Stator voltage in the dq coordinate system:

Electromagnetic torque:

V. Summary

So far, the basic principle of permanent magnet synchronous motor FOC and the simulation part of Matlab/Simulink are finished. The permanent magnet synchronous motor's voltage open-loop control, current closed-loop control, and speed outer loop current inner loop double closed-loop control are consistent with the control idea of ​​the DC motor. The permanent magnet synchronous motor is transformed into a synchronous rotating coordinate system oriented according to the rotor magnetic field through coordinate transformation. In order to realize the decoupling of the PMSM mathematical model, the PMSM is equivalent to a separately excited "DC motor", and the PMSM is controlled according to the control idea of ​​the DC motor. The parameter setting of the PID controller, the SVPWM control algorithm and the engineering realization of the field-oriented vector control of the permanent magnet synchronous motor will be supplemented later.

Summarize

This chapter introduces the basic principle of FOC control, coordinate transformation and the mathematical model of the permanent magnet synchronous motor in the synchronous rotating coordinate system, and conducts the simulation analysis of the FOC control algorithm of the permanent magnet synchronous motor through Matlab/Simulink, including voltage open-loop control, current closed-loop control, speed outer loop current inner loop double closed-loop control, and lays the foundation for the analysis in the following chapters.

Guess you like

Origin blog.csdn.net/gonggong11qqqww/article/details/130357570
Recommended