Open access peer-reviewed chapter

Advanced Control of the Permanent Magnet Synchronous Motor

By Marian Găiceanu

Submitted: February 2nd 2018Reviewed: July 9th 2018Published: November 5th 2018

DOI: 10.5772/intechopen.80086

Downloaded: 1688


The electrical machines are the core of the electrical drives. By introducing the vector control techniques for the alternative current machines, the high performances in drive systems are attained. One on the alternative current machines is the permanent magnet synchronous motor (PMSM). Due to their advantages, it becomes a very popular solution in the electrical drive field. In this chapter, an optimal control solution applied on the PMSM based on the Riccati solution is developed by the author. The objectives of the optimal control drive system are regulation, stability, robustness to the load disturbance variation and the energy reduction. Comparative with the conventional cascaded control, the proposed solution conducts up to 10% to energy efficiency improvement in transient regimes. The efficiency improvement depends on the chosen weighted matrices. Both the conventional and optimal controllers are implemented in Matlab-Simulink. The real-time solution based on the dSpace platform is provided.


  • PMSM
  • PI control
  • quadratic control
  • Riccati
  • Matlab-Simulink
  • dSpace

1. The origins of the optimal control

Variational calculus uses multivariable functions and has the objective of obtaining a function (maximum or minimum) of a functional. The optimal command consists of finding time-varying functions or gain factors placed on the state feedback in order to find the extreme point of a functional cost. Therefore, optimal control derives from variational calculus. Optimization is a collection of methods and techniques for obtaining optimal solutions to automation problems.

The issue of optimization has encountered several stages of development, marked by the emergence of research areas. The optimization problem has been initiated since antiquity, continuing in the Renaissance period (with remarkable progress in the development of the optimization problem through the variational calculus), respectively, and its expansion to the optimal command(born in 1697) by solving the brachistochrone problem [1]. The foundation of the optimal control theory has been done by Semionovici Pontryagin’s maximum principle (1956).

Thus, Johann Bernoulli (1667–1748) launched a challenge to the problem of the minimum time (“brachistochrone problem”, the problem of determining a curve to ensure the fastest descent of a mass on its surface). By using variational calculation, Johann Bernoulli solved this problem in 1697, originally formulated in 1638 by Galileo Galilei (1564–1642).

In June 1696, Bernoulli formulated the issue of the minimum time in Acta Eruditorumjournal: two points A and B are to determine the AMB curve of a moving point M, with the initial velocity vA = 0, which under its own weight will move from A to B in the shortest possible time. The shortest distance is the straight segment AB, but it is not the one that can be traversed in the shortest possible time (Figure 1).

Figure 1.

Brachistochrone problem.

The Pontryagin maximum principle led to the birth of optimal control, a wider theory than variational calculus.

The origins of the variational calculation, after Herman H. Goldstine (1980), originated in 1662, when Pierre de Fermat (1601–1665), by posturing the Fermat’s principle by specifying that the fastest path of a light beam passing through a single optical medium is the one in which light passes “in minimum time” (Heron’s interpretation).

In consultation with Leibniz (Gottfried Wilhelm Freiherr von Leibniz, 1646–1716), the founder of variational calculus alongside Newton, Bernoulli sets the deadline to refer to the solution in the summer of 1697. Thus, besides Johann’s solution, the following mathematicians answer this challenge: (1) Leibniz presents his solution in a letter addressed to Bernoulli in June of the same year, (2) Jakob Bernoulli (1654–1705, with probabilistic theory distributions that bear his name) offers another solution to the larger brother’s solution, (3) Tschirnhaus, (4) L’Hopital and (5) Newton presents his solution in February 1697 to the Royal Society.


2. Modern optimal control

The optimal command appeared with the publication of Bernoulli’s solution in Acta Eruditorum. The optimal control theory started with the Pontryagin maximum principle (USSR, 1956). Jacopo Francesco Riccati (1676–1754) presented a scalar form of the equation that bears his name, an equation used to solve the linear quadratic problems of today. The varied engineering calculations were developed by Placido Cicara (Torino, 1957), G. Newton and Gould Kaiser (1957), Derek F. Lawden (London, 1963), Athans F. (1966) and D. McRuer (1973). The design of the control by using a quadratic performance index was studied by G. Newton and Gould Kaiser (the square error integrator); Kalman (1960) introduces quadratic penalty on control and output error, obtaining optimal control by solving the inverse Riccati equation; and Chang (1961) introduces a restriction, by a K2 weighting factor, into the composition of the quadratic performance index. Athans had named this control type, both for monovariable linear systems and for multivariable systems, as control based on a linear quadratic regulator.

Bellman (1950) developed dynamic programming by introducing optimal nonlinear control. Bellman used the Hamilton-Jacobi theory and discrete systems. The disadvantage of dynamic programming is the limitation of the variables used due to the need for an important memory space to determine the solution.

Numerical solutions of optimal control were determined by Kalman and Athans (1960) for linear dynamic systems. Moreover, Kalman (1963) determined solutions of multivariable, linear quadratic optimal problems using Riccati matrix equations.

An optimization of dynamic systems has been strongly developed in the field of frequencies by the emergence of robust H-infinite (H∞) and H2 control. Also their name, these optimal commands are more robust to disturbance (due to high-frequency unmodified dynamics) and variations in process parameters. Optimization research is growing fastly seeking to develop modern theories that began in the 1980s, establishing robust optimal control laws for process parameter variations and modeling uncertainties.


3. The problem of optimal control

The problem formulation of the optimization of a dynamic system should include [2, 3, 4]:

  1. The dynamics of the system.

  2. The objectives of the problem have to be formulated accordingly. Mandatory, one of the objectives should be related to the specific energy of the discussed system (mechanical or electrical in this case) to be related.

  3. Determining the set of allowable control.

  4. The performance criterion or index (mathematically is the functional cost), which integrates the proposed objectives by combining the states and controls of the dynamic system.

The problem of the optimal control is to find a solution, being an admissible control that minimizes or maximizes the chosen performance criterion. That solution is called optimal control.

Depending on the objectives imposed, the following types of optimal problems can be highlighted:

  1. Minimum time problem: the goal is to achieve the desired final state of a dynamic system in minimum time.

  2. The minimum fuel consumptionaims to minimize the fuel consumed by a system to move to the desired final state with minimum fuel consumption.

  3. Minimum energy problem: if there is an electrical signal as control signal, part of the system energy, by applying this control, the system energy will be minimized.

  4. The optimal control problem of the final statewill contain the final state error in the chosen performance index. The resulting control will minimize the error.

Due to its applicability in the technique, the performance index based on quadratic energy criteria is highly used.

Linear quadratic problems lead to minimal energy consumption and can be of three types: state feedback control, output control problem and optimal tracking problem.

Linear quadratic problem leads to solving Riccati equations: algebraic and differential (continuous time and discrete time).

The optimal control of the dynamic system involves the synthesis of the optimal control directly from the extremes of the functional cost.

Depending on the final time, dynamic optimization problems can be:

  • Infinite final time (infinite horizon), for linear time-invariantsystems with state constraints. In order to solve this problem type, the algebraic Riccati equation (ARE) is used.

  • Finite final time (finite horizon) for linear time-variantsystems. This type of optimization problem requires the solution of the matrix Riccati differential equation (MRDE).

By taking into account the process constraints, optimization can be without constraints or free state, with constraints or with free time.


4. Control of the synchronous machine with permanent magnets

The mathematical models of the PMSM in stator/rotor reference frame as well as a vector control solution are presented succinctly.

4.1. The mathematical model of the synchronous machine with permanent magnets in fixed reference frame

In order to determine the mathematical model of the PMSM in a fixed reference frame, the following hypotheses are considered: the iron core is non-saturated (applying the superposition effect is valid); the symmetrical three-phase stator windings, the infinite permeability of the air gap, constant air-gap width, the sinusoidal distribution of the magnetic field in the air gap and iron losses are neglected; the permanent magnets are placed on the rotor; and the isotropic machine is considered.

For the stator windings (Figure 2a), the second Kirchhoff Law conducts to


where uA, uB and uC represent the phase voltages; iA, iB and iC the phase currents; ψA, ψB and ψC the magnetic fluxes; and R1 the resistance of the stator phase.

Figure 2.

(a) The three-phase PMSM in stator reference frame and (b) the synchronous reference frame.

By taking into consideration the magnetic flux ψ0 of the rotor permanent magnet, the magnetic flux of each stator winding is as follows (LAA self-inductance and mutual inductances LAB = LBC = LCA):


or in the form:


where L1=32L0is the synchronous inductance.

The stator and rotor phasor equations:


in which the connection between the fixed reference frame and synchronously one is described by the following transformation:


By knowing the electromagnetic energy between the stator and rotor, the electromagnetic torque can be found:


Taking into consideration that the stator windings are star connected:


after some manipulations, the final form of the electromagnetic torque is obtained:


The circular motion equation:


where the combined inertia moment reduced to the rotor shaft J, the viscous torque Tv, load torque Tl and angular velocity Ω.

The significances of the specific PMSM angles from Figure 1(b) are as follows:

  • Angle of the stator current vector ωt.

  • d-axis electric angle θ.

  • Load angle δ.

Mechanical angular velocity:


p—pole pair number.

4.2. Vector control of the synchronous machine with permanent magnets

Vector control in a synchronous reference frame is the best way to control the permanent magnet synchronous machine (PMSM). The field-oriented control is used to control the spatial vectors of magnetic flux, stator current and voltage. As with field-oriented vector control of the three-phase asynchronous machine, the synchronous reference system chosen to drive PMSM allows the stator current vector to decompose into the field-generating component and torque component. The structure of the vector control leads to almost identical operation with the self-excited DC machine, which simplifies the structure of the PMSM control. In order to achieve the high dynamic performances in the PMSM drive, the vector control has been chosen. In this way, the parameters of the PMSM become constant. The d-axis stator component determines the magnetic flux changes, and the q-axis stator component is responsible to control the mechanical units: torque and speed.

The block diagram for vector control of the permanent magnet synchronous machine is shown in Figure 3 [5].

Figure 3.

Block diagram for vector control of PMSM.

In order to make the vector control, the following methodology should be applied:

  1. Measurement of the three-phase stator currents.

  2. By using the direct (forward) Clarke transformation (in order to obtain the equivalent two-phase PMSM model in fixed coordinates):


The above-deducted equation is based on the existence of the isolated stator windings neutral (8).

  1. Direct Park transformation (based on the measured or estimated rotor angle)

  1. The cascaded loop control of the two main axes: the mechanical and magnetic field.

  2. The inverse (reverse) Park (IPARK) and Clarke (ICLARKE) transformations in order to deliver the reference switching states to the three-phase power inverter:


The voltage source power inverter supplies the stator windings of the PMSM with the adequate reference voltages such that the objectives of the control are attained.

The general mathematical model of PMSM in a synchronous reference frame (d, q) is as follows:


with the electromagnetic torque Te=3pψ02iq+3pLqLd2idiq.

Synchronous motors with permanent magnets (with permanent magnet rotor inside, anisotropic PMSM) have different inductances qand d(Lsq > Lsd). For an isotropic PMSM, the inductances are equal: Lsq = Lsd.

The used symbols in the mathematical PMSM model are: J[kg m2], the reduced inertia to the rotor shaft; Te [Nm], Tl [Nm], the electromagnetic torque and load torque; ud, the direct axis component of the stator voltage [Vrms]; uq, the quadrature axis component of the stator voltage [Vrms]; id, the direct axis component of the stator current [Arms]; iq, the quadrature axis component of the stator current [Arms]; θ, electric rotor angle [rad elect]; Ω, angular mechanical velocity [rad/s]; p, pole pairs.

4.2.1. Design of the current controller

In order to design the current control, the second Kirchhoff Law is applied to the stator equivalent circuit:


The corresponding transfer function is as follows:


where τ=LphRphand g=1Rph.

By taking into consideration the step reference signal of the current loop, the proportional integral control is involved:


The performance specifications of the PI control are:

  • The bandwidth of the current loop (Hz) fc.

  • The damping coefficient ζ.

The open loop transfer function is


and the closed loop transfer function is


The denominator of the closed loop transfer function could be written in the standard form of the second-order system:


where the natural pulsation is denoted by ω0(Table 1).

Switching frequency (kHz)The damping coefficientThe bandwidth (Hz)

Table 1.

The bandwidth of the current loop at different switching frequency.

By comparing Eq. (21) with Eq. (22), the parameters of the PI current control are obtained:


The calculated poles of the closed loop current system are as follows:


The connection between the bandwidth and the natural pulsation is based on the below-mentioned equation:


4.2.2. Design of the speed controller

Taking into account that the reference speed signal is the ramp type, the speed control design is based on the symmetrical optimum, the PI controller can be deducted:


with the specific constants [6]:


The equivalent controller parameters are as follows:


5. Optimal control of the electrical drives with PMSM

The high-efficiency PMSM during steady state is obtained at the rated load. During the transient regime, the main loss component into the PMSM drive system is the stator copper losses. For the PMSM operating in often dynamic regimes, the optimal control based on the energetic criteria should be taken into account.

5.1. Optimal control problem statement

The optimal control problem statement consists of defining the dynamic system, the objectives, the initial and final conditions and the functional. The functional or the performance index includes the combination of the independent states weighted by the matrices defined by the designer of the drive system. In order to include the energy terms, the quadratic performance index is chosen. The optimal control problem consists in finding the control which minimizes the performance index. The optimal control problem is unconstrained. By adequately choosing the weighted matrices, the boundary restriction of the states is provided.

The objectivesof the optimal electric drive based on the PMSM are regulation (by obtaining zero steady-state error), stability (admissible electrical and mechanical limits), rejection of the perturbation and energy reduction.

The dynamic regimes of PMSM drive (starting, braking and reversing) are characterized by the absorption of large currents, high slipping and a significant reduction in conversion efficiency (below 50%).

Other side effects are increased power loss in the PMSM, therefore worsening of its thermal regime, reducing life span and increasing the harmonic pollution of the power supply network.

For these reasons it is proposed an optimal control based on energy minimization. The optimal controller has in view the minimization of the absorbed energy necessary to fulfil the required dynamic regimes.

5.1.1. The dynamic system

The constant flux is considered. Therefore, the imposed reference of the d-axis stator current is fixed at zero: i*sd = 0. Taking into account that the speed of the magnetic field wave is the same as of the mechanical rotor in synchronous machine case, to implement the FOC, it is necessary only to measure the mechanical speed, delivering the necessary angle for inverse Park transformation (Figure 3).

The state-space mathematical model of the PMSM is as follows [7]:


By noting the state vector xt=ωmtisqt, uis the control vector; u(t) = usqt, and the perturbation vector is w(t) = Tlt; the mathematical model of the PMSM in the standard state space can be configured:


The initial and final conditions are stated for a starting:


The performance criterionis based on the quadratic functional having in view both the steady-state and dynamic-state performances.

The chosen performance criterion [8] is as follows:


in which Λt=t1is the terminal cost.

The weighting matrices are designed such that S 0and Q 0are positive semidefinite; Shas in view the minimization of the square error between the obtained final state and the imposed one at the final time t1; Q has in view the smooth angular speed without oscillations and minimization of the stator copper losses.

R > 0 is positive definite, in order to assure the minimum condition existence and to limit the magnitude of the control.

The optimal problemconsists of determining the control, u*(t), which minimizes the quadratic functional (35):


The electrical drive system based on the PMSM is completely controllable and observable. Therefore, the existence of the minimum is assured.

By taking into consideration the above-mentioned conditions, the optimal problem is unconstrained, fixed time and free-end point.

5.2. The solution of the optimal control problem

The solution of the optimal control problem exists, and it is unique thanks to the complete controllability and observability of the dynamic system by adequate choosing of the weighting matrices: Q, S ≥ 0 and R > 0 [8].

5.2.1. Hamiltonian of the optimal problem

By knowing the dynamic system and the integral part of the performance index, the Hamiltonian of the proposed problem can be determined:


Through the Hamiltonian (37) the unknown co-state vector is introduced p(t)∈ℜ2.

By using the necessary conditions of the optimality:


both the canonical systemand the optimal control are obtained:


By using Eq. (40), the optimal controlis obtained:


The canonical system can be solved by knowing the initial and final conditions: x(t0) = x0 and p(t1).

The final condition for the co-state vector is obtained by the transversality condition:


The co-state and state vectors are the solutions of the canonical system (41).

The adopted nonrecursive solution of the MRDE in numerical form [8] at any instant thas been found:


where the feedback gain matrix P(t1t) is computed as the solution of the nonrecursive MRDE, the matrix K1 takes into consideration the zero steady-state error at the final time t1 (i.e. to achieve the imposed reference x1 at the final time t1) and the matrix K2 has in view the feedforward compensation of the load torque. The matrices K1 and K2 are calculated via P(t1t), where t1tmeans the time remaining until the final time [8].


6. Numerical results

Both the vector control and optimal control (45) of the PMSM drive system (31) have been implemented in Matlab-Simulink, and numerical results based on the discretization using Z transform and zero order hold for a starting of a 2.81 [kW] and 1420 [rpm] PMSM under a rating load of 19 [Nm].

6.1. Vector control of the PMSM

For operation at rated regime, the magnetizing flux is maintained constant. Therefore, the d-axis stator component is set to zero value, isdt=0[A].

By using an elevator prototype, the experimental results are provided. The optimal control has been implemented on ControlDesk, the dSpace real-time interface.

The Matlab-Simulink vector control implementation of the PMSM is shown in Figure 4. The performance of the speed controller is depicted in Figure 5 under a rated load torque (Figure 6). The PMSM drive is tested in both dynamic and steady-state regimes. The starting, breaking and speed reversal are shown in Figure 5. In Figures 510, the appropriate signals of the PMSM drive system based on the vector control are shown.

Figure 4.

The Simulink implementation of the PMSM vector control.

Figure 5.

Speed reference and the actual speed.

Figure 6.

The rated load torque of the elevator.

In Figures 7 and 8, the stator current controller performances are shown. In Figure 9, the two-phase stator currents are obtained. At the same time, in Figures 9 and 10, the appropriate dand qstator voltage components are depicted.

Figure 7.

Thed-axis stator current controller.

Figure 8.

Theq-axis stator current controller.

Figure 9.

The phase stator currents.

Figure 10.

The stator voltage components.

6.2. Optimal control of the PMSM

The problem formulation supposes the initial and final condition specification. The initial conditions are formulated for a starting: to = 0 [s], n(to) = 0 and isq(to) = 0. The final conditions are t1 = 0.4 [s], n1 = 1420 [rpm] and isq(t1) = 0. The implemented optimal control of the PMSM conducts to the specific speed reference as in Figure 11. At the same time, the performances of the speed controller are shown in Figure 11.

Figure 11.

The performances of the optimal speed controller.

Figure 12.

Theq-axis current controller.

The performances of the speed and current (d-axis, q-axis) controllers are depicted in Figures 1113. The shape of the stator phase current (Figure 14) and the developed electromagnetic torque (Figure 15) depend on the reference speed (Figure 11).

Figure 13.

Thed-axis current controller.

Figure 14.

The stator phase current.

Figure 15.

The electromagnetic torque.

6.3. dSpace control of the PMSM: experimental results

For the PMSM the same speed profiles have been implemented as in simulation tool. The optimal control has been implemented on the dSpace platform in order to control an elevator (Figures 1618).

Figure 16.

The stator phase currents (U,V) for the PMSM [9].

Figure 17.

The stator voltage of the PMSM [9].

Figure 18.

The ControlDesk real-time interface for controlling PMSM [9].


7. Conclusions

The field-oriented control of the PMSM has the main advantage of decoupling torque from the magnetization flux. Therefore, the parameters of the PMSM do not depend on the rotor position; the stator and rotor currents are treated as DC quantities. The PMSM control is in cascaded manner, the torque control and magnetic flux control being independent; the quick torque response is obtained.

The synchronous machine with permanent magnets is a serious contender for their use in specific applications: irrigation, wind turbines, conveyor belts and elevators.

It is noted that by introducing an optimal regulator, the state vector is limited due to the proper choice of the weighting matrices. By minimizing the quadratic performance index, energy saving is initiated.

In Figure 6, the removal of the system disturbance at t = 0.02 s in a relatively small period compared to the evolution of the process is shown.

The reduction of the energy assures either an increase of the operational period of the electrical drive components or the permanent magnet synchronous motor overload permission.



This work was supported by a grant of the Romanian National Authority for Scientific Research, CNDI-UEFISCDI, project number PN-II-PT-PCCA-2011-3.2-1680.

© 2018 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution 3.0 License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

How to cite and reference

Link to this chapter Copy to clipboard

Cite this chapter Copy to clipboard

Marian Găiceanu (November 5th 2018). Advanced Control of the Permanent Magnet Synchronous Motor, Electric Machines for Smart Grids Applications - Design, Simulation and Control, Adel El-Shahat, IntechOpen, DOI: 10.5772/intechopen.80086. Available from:

chapter statistics

1688total chapter downloads

More statistics for editors and authors

Login to your personal dashboard for more detailed statistics on your publications.

Access personal reporting

Related Content

This Book

Next chapter

Optimization of Fuzzy Logic Controllers by Particle Swarm Optimization to Increase the Lifetime in Power Electronic Stages

By Pedro Ponce, Luis Arturo Soriano, Arturo Molina and Manuel Garcia

Related Book

First chapter

Introductory Chapter: Recent Advances

By Adel El-Shahat

We are IntechOpen, the world's leading publisher of Open Access books. Built by scientists, for scientists. Our readership spans scientists, professors, researchers, librarians, and students, as well as business professionals. We share our knowledge and peer-reveiwed research papers with libraries, scientific and engineering societies, and also work with corporate R&D departments and government entities.

More About Us