# Simulation of Field Oriented Control Algorithm of Permanent Magnet Synchronous Motor Based on SVPWM

Authors: Bin Wang
Journal: Mobile Information Systems
 (2022)

---

## Abstract

Aiming at the problems of large flux pulsation and unstable operation of permanent magnet synchronous motors affected by motor parameters and magnetic field harmonics, this paper proposes a permanent magnet synchronous motor vector control strategy based on SVPMW directional control algorithm to improve motor control performance. This control strategy realizes the effective control of the motor under harmonic interference by establishing a motor model oriented along the air gap magnetic field and the SVPMW regulator algorithm. At the same time, an online query algorithm for current reference values based on mathematical models is established to achieve fast dynamic response of the motor. A simulation model of directional control is established in MATLAB/Simulink. The simulation results show that the modeling method can effectively reduce the interference of harmonics on the flux linkage. It proves that under the interference of harmonics, the directional control of this algorithm has a better control effect, which is practical. The design and debugging of the motor control system provide the basis and ideas.


---

## Body

## 1. Introduction

Today, in electrically driven engineering vehicles, permanent magnet synchronous motors are the first choice for vehicle-driven motors due to their simple structure, reliable operation, small size, and high efficiency. Control technology directly affects the performance of permanent magnet synchronous motors. It is the key to permanent magnet synchronous motor technology. Current permanent magnet synchronous motor control technologies mainly include rotor field direction control and stator field orientation control [1]. However, these methods do not achieve good control effects under some working conditions. Rotor field orientation control is greatly affected by changes in rotor parameters and has some impact on system performance. Physical motors are process limited, and numerous magnetic field harmonics, as well as stator field orientation control air gap rotating flux, are highly sensitive to harmonics [2].In a nonlinear magnetic field, the magnetic saturation effect has a serious impact on the performance of high-performance motors. Drive system controls accuracy. During motor operation, the stator current changes with load. If you change it, as the motor load increases, the stator current will also increase, and the motor air gap will increase. The magnetic field is saturated [3] and because of the coupling in the relationship between the flux linkage and the current, the saturation of the magnetic circuit matches the air gap flux based on how the air gap flux linkage is controlled. More suitable for handling the magnetic field saturation effect of motors [4, 5].This paper presents the vector control of permanent magnet synchronous motor based on the air gap field orientation. We established the model of the air-grap fluxψg in the MT rotating coordinate system, and the obtained iM and iT values undergo coordinate transformation, space vector pulse width modulation (SVPWM) pair the motor is controlled [6–8]. Perform simulation analysis in MATLAB/Simulink, the permanent magnet synchronous motor based on air gap field-oriented control has good dynamic and steady-state features, and provide a theoretical basis for the next engineering design [9].The rest of the paper is organized as follows: Section2 contains analysis of mathematical model of permanent magnet synchronous motor. Section 3 is based on analysis of permanent magnet synchronous motor control system. Similarly, Section 4 is based on simulation analysis of control system and the final section is the conclusion.


## 2. Analysis of Mathematical Model of Permanent Magnet Synchronous Motor

### 2.1. Motor Model Analysis considering Magnetic Field Harmonic Analysis

Establish thed‐q synchronous rotating coordinate system, and the rotor direction of the permanent magnet synchronous motor is related to the d-axis direction is the same, the q-axis is perpendicular to the rotor direction, and the mathematical model of the d‐q coordinate system is shown in Figure 1.Figure 1
Schematic diagram of the mathematical model of the permanent magnet synchronous motor in thed‐q coordinate system.The stator voltage equation in thed‐q coordinate system is
(1)uduq=idψdiqψqRddt+ωe−ωeLqiqLdid+ψfT.d and q axis flux linkage equation is
(2)ψd=Ldid+ψf,ψq=Lqiq.The electromagnetic torque equation at this time is(3)Te=32pniqidLd−Lq+ψf.Among them, the permanent magnet synchronous motor parameters are shown in Table1.Table 1
Permanent magnet synchronous motor parameters.
uduqd‐q axis component of stator voltageidiqd‐q axis component of stator currentψdψqd‐q axis component of stator fluxLdLqd‐q-axis inductance componentωeElectrical angular velocityRStator resistanceψfRotor fluxPhysical motors are limited by technology and cannot output exactly the same ideal waveform as an ideal motor. The magnetic field generated by a permanent magnet synchronous motor contains many harmonics, so the motor’s air gap magnetic field is not ideally a sine wave. The magnetic field chain equations generated in thed,q coordinate system are
(4)ψd=Ldid+ψ1+ψ5+ψ7cos6θ+ψ11+ψ13cos12θ+⋯,ψq=Ldid+ψ1+−ψ5+ψ7cos6θ+−ψ11+ψ13sin12θ+⋯.The electromagnetic torque equation is(5)Te=32pψ1id,iqiq+Ldid,iq−Lqid,iqidiq+ψd6sin6θ+ψd12sin12θ+⋯id+ψq6sin6θ+ψq12sin12θ+⋯iq.


### 2.2. Analysis of Air Gap Magnetic Field Orientation Control Model

xEstablish the MT synchronous rotating coordinate system, the direction of the air gap flux linkage of the permanent magnet synchronous motor is consistent with the direction of theM axis, and the T axis is perpendicular to the direction of the air gap flux linkage. The mathematical model of the MT coordinate system is shown in Figure 2.Figure 2
Schematic diagram of air gap magnetic field orientation control model.The air gap fluxψg⟶ is the composite magnetic field of the stator excitation flux ψsg⟶ and the rotor permanent magnet flux ψrg⟶. The electromagnetic torque is the result of the interaction between the air gap flux ψg⟶ and the stator excitation flux ψsg⟶:
(6)Te=p1Lmψg⟶×ψsg⟶.The rotor air gap flux linkage is produced by the constant excitation magnetic potential ofψrg⟶ generated by the permanent magnet acting on the air gap flux guide Lm. The permanent magnet synchronous motor is fed with alternating current into the stator windings, and the generated magnetic potential acts on the air gap permeance Lm to produce the corresponding stator excitation flux ψsg⟶:
(7)ψsg=Lmis.Combine vertical formulas (3) and (4) to get
(8)Te=pψg⟶×is⟶.The stator currentis⟶ of the permanent magnet synchronous motor is decomposed into iM⟶ and iT⟶ in the MT shaft system. The stator current is⟶ can be expressed as
(9)is⟶=iM⟶+iT⟶,iM=iscosθs,iT=issinθs.θs is the phase of is in the MT shaft system.iM is the excitation component that controls the amplitude of ψg and has no effect on the torque; iT is the torque component that controls the electromagnetic torque. The electromagnetic torque of the permanent magnet synchronous motor in the MT coordinate system is expressed as
(10)Te=pψgiT.


## 2.1. Motor Model Analysis considering Magnetic Field Harmonic Analysis

Establish thed‐q synchronous rotating coordinate system, and the rotor direction of the permanent magnet synchronous motor is related to the d-axis direction is the same, the q-axis is perpendicular to the rotor direction, and the mathematical model of the d‐q coordinate system is shown in Figure 1.Figure 1
Schematic diagram of the mathematical model of the permanent magnet synchronous motor in thed‐q coordinate system.The stator voltage equation in thed‐q coordinate system is
(1)uduq=idψdiqψqRddt+ωe−ωeLqiqLdid+ψfT.d and q axis flux linkage equation is
(2)ψd=Ldid+ψf,ψq=Lqiq.The electromagnetic torque equation at this time is(3)Te=32pniqidLd−Lq+ψf.Among them, the permanent magnet synchronous motor parameters are shown in Table1.Table 1
Permanent magnet synchronous motor parameters.
uduqd‐q axis component of stator voltageidiqd‐q axis component of stator currentψdψqd‐q axis component of stator fluxLdLqd‐q-axis inductance componentωeElectrical angular velocityRStator resistanceψfRotor fluxPhysical motors are limited by technology and cannot output exactly the same ideal waveform as an ideal motor. The magnetic field generated by a permanent magnet synchronous motor contains many harmonics, so the motor’s air gap magnetic field is not ideally a sine wave. The magnetic field chain equations generated in thed,q coordinate system are
(4)ψd=Ldid+ψ1+ψ5+ψ7cos6θ+ψ11+ψ13cos12θ+⋯,ψq=Ldid+ψ1+−ψ5+ψ7cos6θ+−ψ11+ψ13sin12θ+⋯.The electromagnetic torque equation is(5)Te=32pψ1id,iqiq+Ldid,iq−Lqid,iqidiq+ψd6sin6θ+ψd12sin12θ+⋯id+ψq6sin6θ+ψq12sin12θ+⋯iq.


## 2.2. Analysis of Air Gap Magnetic Field Orientation Control Model

xEstablish the MT synchronous rotating coordinate system, the direction of the air gap flux linkage of the permanent magnet synchronous motor is consistent with the direction of theM axis, and the T axis is perpendicular to the direction of the air gap flux linkage. The mathematical model of the MT coordinate system is shown in Figure 2.Figure 2
Schematic diagram of air gap magnetic field orientation control model.The air gap fluxψg⟶ is the composite magnetic field of the stator excitation flux ψsg⟶ and the rotor permanent magnet flux ψrg⟶. The electromagnetic torque is the result of the interaction between the air gap flux ψg⟶ and the stator excitation flux ψsg⟶:
(6)Te=p1Lmψg⟶×ψsg⟶.The rotor air gap flux linkage is produced by the constant excitation magnetic potential ofψrg⟶ generated by the permanent magnet acting on the air gap flux guide Lm. The permanent magnet synchronous motor is fed with alternating current into the stator windings, and the generated magnetic potential acts on the air gap permeance Lm to produce the corresponding stator excitation flux ψsg⟶:
(7)ψsg=Lmis.Combine vertical formulas (3) and (4) to get
(8)Te=pψg⟶×is⟶.The stator currentis⟶ of the permanent magnet synchronous motor is decomposed into iM⟶ and iT⟶ in the MT shaft system. The stator current is⟶ can be expressed as
(9)is⟶=iM⟶+iT⟶,iM=iscosθs,iT=issinθs.θs is the phase of is in the MT shaft system.iM is the excitation component that controls the amplitude of ψg and has no effect on the torque; iT is the torque component that controls the electromagnetic torque. The electromagnetic torque of the permanent magnet synchronous motor in the MT coordinate system is expressed as
(10)Te=pψgiT.


## 3. Analysis of Permanent Magnet Synchronous Motor Control System

### 3.1. Design of Air Gap Flux Linkage Observer

Solve the physical quantities in the MT coordinate system,d‐q coordinate system, and ABC coordinate system; the vector relationship between the air gap magnetic field orientation control vector diagram is established, as shown in Figure 3. As shown the angle between the A axis and the d axis is θr, and the angle between the d axis and the M axis is δgf, you can use the coordinate system change to get the physical quantity under the MT axis system.Figure 3
Vector diagram of air gap magnetic field orientation.The air gap flux linkageψg⟶ is the vector sum of the leakage current excitation ψσ⟶, the excitation current excitation Lmis⟶, and the excitation ψf⟶ produced by the rotor’s equivalent excitation winding.The vector equation of the air gap flux linkage is(11)ψg⟶=Lmis⟶+ψf⟶+ψσ⟶.The scalar equation of the air gap flux linkage is
(12)ψg=Lmis2+ψf2+ψσ2.Figure4 shows the structure of the air gap magnetic estimator formed by the MT shaft system.Figure 4
Block diagram of the air gap flux observer.Although the motor control based on the air-gap field orientation controls the air-gap flux linkageψg⟶, the rotor flux linkage ψf⟶ and the leakage flux linkage ψσ⟶ are basically kept constant, and the stator current is⟶, us⟶ is used as the control object to control the permanent magnet synchronous motor.The voltage equation in the MT coordinate system is(13)us=Rsis+dψgdt+jωsψg.MT shaft system is oriented along the air gap magnetic field, then,ψT=0, ψM=ψg, and
(14)uM=RsiM+dψgdt,(15)uT=RsiT+ωsψg.


### 3.2. SVPWM Control Algorithm

Space vector pulse width modulation (SVPWM) considers the inverter system and the entire motor, and the actual flux linkage of the permanent magnets by various combinations of power switches on and off for each bridge arm of the three-phase inverter. Make a synchronous motor, the orbit is close to the reference circular magnetic flux, and the switching pattern of the inverter is obtained by comparing them to form a PWM signal waveform.The three-phase inverter has a combination of eight switches in eight different voltage space vectors, including six nonzero vectors (100, 110, 010, 011, 001, and 101) and two zero vectors (000 and 111). The corresponding ”1” indicates that the upper arm bridge is open and ”0” indicates that the lower arm bridge is open. The amplitude of the six nonzero vectors is 2/3 Udc, the plane is divided into 6 sectors, the angular difference between the two vectors is 60°, and the two zero vectors are in the center of the plane. At a certain moment, the voltage space vector rotates to a specific A sector. Sectors are obtained in time from various combinations of two adjacent nonzero and zero vectors of the sector. Taking the first sector as an example, the synthesized space vector is Vr, and the voltage space vector diagram is shown in Figure5.Figure 5
Voltage space vector diagram.


## 3.1. Design of Air Gap Flux Linkage Observer

Solve the physical quantities in the MT coordinate system,d‐q coordinate system, and ABC coordinate system; the vector relationship between the air gap magnetic field orientation control vector diagram is established, as shown in Figure 3. As shown the angle between the A axis and the d axis is θr, and the angle between the d axis and the M axis is δgf, you can use the coordinate system change to get the physical quantity under the MT axis system.Figure 3
Vector diagram of air gap magnetic field orientation.The air gap flux linkageψg⟶ is the vector sum of the leakage current excitation ψσ⟶, the excitation current excitation Lmis⟶, and the excitation ψf⟶ produced by the rotor’s equivalent excitation winding.The vector equation of the air gap flux linkage is(11)ψg⟶=Lmis⟶+ψf⟶+ψσ⟶.The scalar equation of the air gap flux linkage is
(12)ψg=Lmis2+ψf2+ψσ2.Figure4 shows the structure of the air gap magnetic estimator formed by the MT shaft system.Figure 4
Block diagram of the air gap flux observer.Although the motor control based on the air-gap field orientation controls the air-gap flux linkageψg⟶, the rotor flux linkage ψf⟶ and the leakage flux linkage ψσ⟶ are basically kept constant, and the stator current is⟶, us⟶ is used as the control object to control the permanent magnet synchronous motor.The voltage equation in the MT coordinate system is(13)us=Rsis+dψgdt+jωsψg.MT shaft system is oriented along the air gap magnetic field, then,ψT=0, ψM=ψg, and
(14)uM=RsiM+dψgdt,(15)uT=RsiT+ωsψg.


## 3.2. SVPWM Control Algorithm

Space vector pulse width modulation (SVPWM) considers the inverter system and the entire motor, and the actual flux linkage of the permanent magnets by various combinations of power switches on and off for each bridge arm of the three-phase inverter. Make a synchronous motor, the orbit is close to the reference circular magnetic flux, and the switching pattern of the inverter is obtained by comparing them to form a PWM signal waveform.The three-phase inverter has a combination of eight switches in eight different voltage space vectors, including six nonzero vectors (100, 110, 010, 011, 001, and 101) and two zero vectors (000 and 111). The corresponding ”1” indicates that the upper arm bridge is open and ”0” indicates that the lower arm bridge is open. The amplitude of the six nonzero vectors is 2/3 Udc, the plane is divided into 6 sectors, the angular difference between the two vectors is 60°, and the two zero vectors are in the center of the plane. At a certain moment, the voltage space vector rotates to a specific A sector. Sectors are obtained in time from various combinations of two adjacent nonzero and zero vectors of the sector. Taking the first sector as an example, the synthesized space vector is Vr, and the voltage space vector diagram is shown in Figure5.Figure 5
Voltage space vector diagram.


## 4. Simulation Analysis of Control System

Set up air gap magnetic field control of permanent magnet synchronous motor in MATLAB/Simulink the simulation model is shown in Figure6, and the simulation motor parameters are shown in Table 2.Figure 6
Schematic diagram of Simulink simulation model of permanent magnet synchronous motor air gap field control.Table 2
Simulation motor parameters.
LdmH42.4LqmH65.4ψfWb0.26ψσWb0.062P4VdcV300Is_maxA30In order to verify the static and dynamic performance of the simulation model of the control system of the permanent magnet synchronous motor, the motor is started without load, the rated speed is 1000 r/min, the load is applied att=0.18s, and the load is cancelled at t=0.2s. The simulation curves of electromagnetic torque, speed, and current of the system are shown in Figures 7–9.Figure 7
Speed response curve of permanent magnet synchronous motor.Figure 8
Electromagnetic torque response curve of permanent magnet synchronous motor.Figure 9
Current response curve of permanent magnet synchronous motor.According to the simulation waveform, there is a large starting torque and starting current in the starting phase, the main reason is that the current value is not limited. The motor speed can achieve fast dynamic response under the reference speed ofn=1000r/min, the load increases suddenly at t=0.18s, the motor speed and torque have large fluctuations, and the waveform is good during steady-state operation. The simulation results show that the air-gap field orientation can effectively realize the dynamic steady-state control of the permanent magnet synchronous motor.


## 5. Conclusion

Based on the establishment of the permanent magnet synchronous motor mathematical model, this paper proposes a permanent magnet synchronous motor simulation modeling method based on the air gap flux linkage orientation. The model is designed in MATLAB/Simulink, and the SVPWM control algorithm is adopted as the control strategy. The simulation results show that the waveform conforms to the theoretical analysis, and the system runs smoothly and has good static and dynamic characteristics.


## 6. Future Work

Using this simulation model, the control algorithm can be easily implemented and verified, which provides theoretical support for the analysis and design of the control system and provides ideas for the design of the actual motor control system.



---

*Source: 1839488-2022-05-17.xml*