ISSN (Print) : 0974-6846
ISSN (Online) : 0974-5645
Indian Journal of Science and Technology, Vol 10(25), DOI: 10.17485/ijst/2017/v10i25/108722, July 2017
Optimization of PI Coeffecients of
Permanent Magnet Synchronous
Motor Drive
Byamakesh Nayak* and Tanmoy Roy Choudhury
KIIT University, Bhubaneswar – 751024, Odisha, India;
[email protected], [email protected]
Abstract
Background/Objective: This paper enhances the responses of Permanent Magnet Synchronous Motor (PMSM)
drive system with design of PI controller based on Nelder-Mead optimization Method implemented in Matlab en-
vironment and Optimization Toolbox. Methods/Statistical Analysis: The minimization requirements on control
quality such as overshoot, settling time and steady-state error have been realized by choosing objective function based
on ITAE criterion. The speed error for control of the speed of PMSM based on field oriented control is considered for
implementation of ITAE criterion. Findings: The standard AC6 model (Field oriented control of PMSM drive) of MATLAB
Simpower system is analyzed for optimal design of the coefficients of the PI controller. Improvements: The effec-
tiveness of responses of torque, current and speed tracking are verified with random PI and optimized PI coefficients.
Keywords: ITAE based Objective Function, Matlab Environment, Nelder-Mead Optimization Method, PI Control Design,
Permanent Magnet Synchronous Motor
1. Introduction PMSM has also been gaining popular in comparison
The performance parameters such as power factor, with the induction motor for semi-hermetic drives, like
efficiency, power density, easy control, cost and torque- in compressors with heavy loading due to better cooling
to-inertia ratio of PMSM are superior compared to the methods. The performance of the PMSM is influenced by
conventional induction and synchronous motors for the the demagnetization characteristics of a permanent mag-
same output power1-4. The operation of the Permanent net5.
Magnet Synchronous Motor is based on the applications Control design plays a crucial part in control engi-
and it may be operated in constant power mode or variable neering for control of torque, speed and position in
power mode. In both modes with four quadrants opera- various industrial and domestic fields. The journey
tion, it requires easier control algorithms especially, field from the classical control method to the modern control
oriented control for generating the between the switching methods during 50 years have developed a lot of control
signals for three phase voltage source inverter. Line-start algorithms starting from PI controller to LQ, robust, pre-
*Author for correspondence
Optimization of PI Coeffecients of Permanent Magnet Synchronous Motor Drive
dictive, adaptive control or artificial control. The above 2. Motivation, Objectives and
list is few and still the research is going on for develop-
ment of different algorithms to overcome the problems
Procedures
faced to implement the new technologies6-10. In drive The main motivation factor has to design the best con-
applications, though there are number of control algo- troller to improve the performances in terms of control
rithms, the industry communities prefer the simplest PI quality of any system. About 90% of closed loop control
control for controlling the drives because of cost effec- system uses the PID controller for error minimization
tive and easy to handle. The dynamic responses such as with improved dynamic performances. Most of the clas-
overshoot, settling time, good tracking and above all the sical methods for PID control design require the exact
stability of the system mainly depends on coefficients of mathematical model of the system in term of transfer
the PI controller. There are number of techniques such as function or state-space variable form. In some system,
bode diagram, root-locus etc. for determination of coeffi- it is difficult to find out the exact mathematical model
cients of PI controller. These techniques can be used if the due to non linearity of the system. Although the exact
mathematical model of the system is known. It is difficult model is known but the classical control techniques will
to find accurate mathematical model of industrial drive not give the accurate performances because of modifica-
because of large number of components such as convert- tion of mathematical model by the various disturbances.
ers, electrical machine and its control in the system. The Therefore, this requires the robust design of PI controller.
disturbances cause due to various reasons also affect the This can be achieved by simulating the unknown math-
transfer function of an electrical drive system .There are ematical model repeatedly applying search method for
vast number of books, scientific papers, where efforts put fulfillment of the objective function.
into the idea to develop mathematical model of drive The procedures set up by the authors can be summed
system of finding the coefficients of PI fulfilling certain up as follows
criteria regarding control qualities.
In this paper, effort has been made to find the coeffi- • Built the mathematical model in simpower sys-
cients of PI controller to improve the performances of the tem in MATLAB environment of your choice with
responses of PMSM motor in field oriented control man- proper control algorithms. The algorithms must
ner using Nelder-Mead simplex direct search method. have the PI controller whose coefficients to be
The algorithm, which one described in this paper, is sim- optimised .The name of coefficient variables must
ple and straight forward searching iteration method for be declared as global variables. The error which
determining the minimum of the objective function11-13. to be minimised must be stored in the workspace
The objective function is based on integral criterion of with name. In this paper the PMSM motor drive
ITAE well defined in control engineering14. The Simpson’s is used as a model. This model, named as AC6 is
one-third rule is used for integration of objective func- the built-in demo model of MATLAB simpower
tion. The function fminsearch in optimization toolbox system environment.
of MATLAB uses Nelder-mead algorithm is used for • The objective function should be carefully cho-
searching of the coefficients of PI9. The coefficients of sen. Here, integral criterion of ITAE is considered
PI controller have to be optimized to process the error as objective function. A function is written in
between the command speed and the actual speed for MATLAB and Simpson’s one-third rule is used
operation of PMSM motor drive in field-oriented control to integrate the objective function. Inside the
mode. The PMSM drive was found in MATLAB demo MATLAB objective function the model PMSM
model with name as AC6 is considered in this paper for motor drive is called. The MATLAB program of
optimization. objective function is given in Appendix.
2 Vol 10 (25) | July 2017 | www.indjst.org Indian Journal of Science and Technology
Byamakesh Nayak and Tanmoy Roy Choudhury
• Calling Model Command: [t,y]=sim(‘bkn_ac6_ 3. Dynamic Model and Field
pides’,tt);
• Nelder-Mead simplex direct search method is
Oriented Control of PMSM
used here to search and optimise the coefficients The difference between the PMSM and the wound rotor
of PI controller. The built-in Nelder-Mead simplex synchronous motor are lying in the rotor. The main flux
direct search is stored in the name of fminsearch production in PMSM is constant but, in the wound rotor
in optimisation toolbox of the MATLAB9-10. A synchronous motor is variable and it can be varied by
main program consist of fminsearch function has changing of excitation voltage in the field coil. So, the
been written in MATLAB and it should be called back emf produced by permanent and that produced by
for running of the system. The MATLAB program an excited coil are same. This result in the mathematical
of main function is given in Appendix. model of a PMSM is similar to that of the wound rotor
• Calling objective function : [X,FVAL,EXITFLAG synchronous motor. The motor is inverter controlled and
,OUTPUT]=fminsearch(@byam_obj_ac6,x0,[],t_ the controlled output parameters are six switching sig-
end,h) nals of the semiconductor switches of the inverter. The
• Running of the main program, the fminsearch dynamic model of PMSM in rotor reference frame can be
function calls the objective function. Since objec- written without considering the effect of saturation and
tive function contains running command of parameter variations. The stator q-d dynamic equations
MATLAB, the model will run. The difference of the PMSM, in the rotor reference frame, is derived as
between the speed command and actual speed
is passed into objective function. The output of
objective function will processed through the
iterative searching method defined in fminsearch.
The iterative optimised searching method is dis- (1)
cussed briefly in subsequent sections.
Figure 1. Phasor diagram of Field Oriented Control (FOC) for PMSM.
Vol 10 (25) | July 2017 | www.indjst.org Indian Journal of Science and Technology 3
Optimization of PI Coeffecients of Permanent Magnet Synchronous Motor Drive
The torque developed in the machine is
Where are stator direct axis,
quadrature axis, field component and torque component
currents respectively, S is the Laplace’s operator, is the
(2) torque angle, are rotor electrical and mechan-
ical speeds in rad/s.
In order to decouple the flux component of stator and
torque component of stator the flux component of stator
must be oriented along the rotor flux linkage line. Vector
4. Control Procedures for Vector
control, by field orientation, is achieved by orienting the Control
flux component current along rotor flux linkage at every The complete closed loop for controlling the Speed of
instant of time and it should be zero. PMSM Drive System in vector control mode is shown in
As shown in Figure 1, the rotor flux linkage is rotated Figure 2. It consists of the speed and current sensors, PI
at a rotor speed ωr and always positioned away from a Speed Controller with limiter, hysteresis current control-
stationary reference by the rotor angle θr. Therefore, the ler and the three phase voltage source inverter. The 1st
stator d-q current should be rotated with the same speed order low pass filter is used to filter out the noise signals
ωr so that, d-axis component of stator current must be from the output of the speed sensor. The speed error
aligned to rotor flux position and rendering the stator flux between the reference speed and actual rotor speed is
current component zero by making δ=900. processed through the PI speed controller with limiter to
get the output of the torque reference. The limiter limits
(3) maximum torque production and PI controller is used
to nullify the steady state error in speed and as well as,
Therefore improve the dynamic behavior. The output of the PI is
divided by the Torque constant (KT) to produce the rotor
(4) reference torque component current (iT). To achieve vec-
tor control the field component current must be zero. The
Since the machine is permanent magnet, the λaf is above two currents are converted into three phase stator
constant. Therefore the torque can be written as a-b-c current commands using equations (8) and (9). The
three Hysteresis Current Control (HCC) are used to gen-
(5) erate six current switching pulses for inverter operation
in feedback current mode by comparing each reference
Under this condition, the PMSM behaves exactly as current commands generated and each actual sensed
the separately excited dc motor which is confirmed by the stator three phase currents. The optimization of the coef-
torque expression. ficients of PI controller has been carried out by applying
The rotor dynamic equations in vector control mode Nelder-Mead simplex direct search method to improve
are the performances of responses.
(6)
and (8)
(7)
4 Vol 10 (25) | July 2017 | www.indjst.org Indian Journal of Science and Technology
Byamakesh Nayak and Tanmoy Roy Choudhury
Figure 2. Complete schematic of the speed-controlled of PMSM drive in FOC mode.
5. Nelder–Mead “Simplex” Direct
Search Method
(9) In the mid-1960s, two English statisticians invented the
Nelder–Mead “simplex” direct search method used for
Vol 10 (25) | July 2017 | www.indjst.org Indian Journal of Science and Technology 5
Optimization of PI Coeffecients of Permanent Magnet Synchronous Motor Drive
solving the unconstrained optimization problem15. The • Compute the outside contraction point if
Nelder-Mead method iteratively generates a sequence
of interested vertex points which converge to an optimal
vertex points of objective function f(x)16. At each itera- (13)
tion, the vertices xi are ordered according to the objective
function values
Evaluate if replace
with otherwise go to step-6
(10)
• Compute the inside contraction point if
where x1 is the best vertex and xn+1 is the worst vertex.
The algorithm uses four possible operations: reflection,
expansion, contraction and shrink, each being associ-
(14)
ated with a scalar parameter: α(reflection), β(expansion),
γ(contraction), and δ(shrink). The values of α, β, γ and δ
are lying in the range of >0,>1 and 0 to 1 in both γ and δ evaluate if replace
respectively. with otherwise go to step-6
The one iteration of Nelder-Mead algorithm is as fol- 6 shrink: for
lows15,16:
define
• Find out worst vertices using equation- let it be
(15)
• Compute the reflection point
and proceed to the next iteration.
6. Simulation Results and
where
(11) Discussion
evaluate The procedure used in industry for finding out the coeffi-
cients of PI controller is to adopt the lower the coefficient
if ,replace with values and gradually tune them up until the best possible
performance is achieved1. But, actually, it is difficult to
• Compute the expansion point if ascertain the best coefficient values and also time con-
suming. Therefore, the optimization of PI coefficients is
(12) the best solution.
As per procedures described above, the built- in
Evaluate if replace with function AC6 is simulated repetitively by modifying the
coefficients of PI based on minimization of objective
otherwise by
function. The objective function considered here for nul-
6 Vol 10 (25) | July 2017 | www.indjst.org Indian Journal of Science and Technology
Byamakesh Nayak and Tanmoy Roy Choudhury
Figure 3. Reference speed and actual speed for optimized values of PI controller.
Figure 4. Load torque and actual torque developed in PMSM drive.
lify the steady-state speed error is based on Integral of tem is simulated and the results presented here for step
Time-Weighted Absolute Error (ITAE) criterion. speed inputs. The datasheet of PMSM and MATLAB
Programmers’ for optimization are given in appendix. The
various responses PMSM drive are compared with two
ITAE= (16) different PI coefficients, one is randomly chosen values
(initial values considered for optimization i.e. kp=2 and
Where, is the difference of absolute time depen- ki=.2) and other is estimated optimized vales (kp=1.8207
dent between actual speed and command speed and t is and ki=35.7655). The end of optimization, the values are
the time at that instant. The complete PMSM drive sys- found as:
Vol 10 (25) | July 2017 | www.indjst.org Indian Journal of Science and Technology 7
Optimization of PI Coeffecients of Permanent Magnet Synchronous Motor Drive
Figure 5. 3-phase stator a-b-c currents in A.
Figure 6. Enlarge stator currents during phase reversal.
X = 1.8207 35.7655 (The coefficients of PI control- funcCount: 117
ler) algorithm: ‘Nelder-Mead simplex direct search’
FVAL = 1.8062e+06 message: ‘Optimization terminated:
EXITFLAG = 1 the current x satisfies the termination criteria using
OUTPUT = OPTIONS.TolX of 1.000000e-...’
iterations: 48
8 Vol 10 (25) | July 2017 | www.indjst.org Indian Journal of Science and Technology
Byamakesh Nayak and Tanmoy Roy Choudhury
Figure 7. Reference speed and actual speed for random chosen PI controller values.
Figure 8. Enlarge view to show the steady-state error.
In order to verify the robustness of optimization val- troller chosen and optimized value calculated off line
ues, the motor is operated at a speed command of 300 by considering the initial values. It is observed in Figure
rpm at load torque of 11 N-m. At 1 second, the com- 3 that the rotor speed exactly track the reference speed
mand speed is suddenly changed to 600 rpm without without any steady state error in optimized PI controller
changing the load. At 2 seconds, a negative speed com- though there is slightly overshoot in the speed response.
mand of -100 is given with a load torque of 8N-m.The At starting the electromagnetic torque developed in the
comparisons are made by initial parameters of PI con- machine is equal to value of torque limiter, which is the
Vol 10 (25) | July 2017 | www.indjst.org Indian Journal of Science and Technology 9
Optimization of PI Coeffecients of Permanent Magnet Synchronous Motor Drive
maximum torque capability of machine depicts in Figure 8. References
4. This ensures that the motor accelerates very quickly
by increasing the torque developed far away from the 1. Ogbuka C, Nwosu C, Agu M. A fast hysteresis current–con-
load torque and stabilize to the command speed at 0.4 trolled permanent magnet synchronous motor drive based
on field orientation. Journal Of Electrical Engineering.
second approximately. Figure 5 shows the responses of
2016; 67(2):69–77. CrossRef.
3-phase stator currents. The maximum stator current
2. Pillay P, Krishnan R. Control characteristics and speed con-
at the time of starting is approximately 17.5A far below
troller design for a high performance permanent magnet
than the rated value. In order to change the direction of synchronous motor drive. IEEE Transaction on Power
rotation, the phase sequence should be changed. Figure 6 Electronics. 1990 Apr; 5(2):151–9. CrossRef.
shows the phase inversion from a-b-c to c-b-a that occurs 3. Inoue Y, Yamada K, Morimoto S, Sanada M. Effectiveness
as speed changes from 600 rpm to-100 rpm. The effects of voltage error compensation and parameter identifica-
of optimized PI controller and hit and trial controller is tion for model-based sensorless control of IPMSM. IEEE
compared in Figure 7 and Figure 8. Figure 7 is the speed Trans on Industry Applications. 2009 Feb; 45(1):213–21.
response of randomly chosen PI controller. There is an CrossRef.
appreciable steady state error in randomly chosen param- 4. Inoue Y, Morimoto S, Sanada M. Comparative study of PMSM
eters (296 rpm instead of 300 rpm) as shown in enlarge drive systems based on current control and direct torque
view of Figure-7 depicts in Figure 8. control in flux-weakening control region. IEEE Transaction
on Industry Applications. 2012 Nov–Dec; 48(6):2382–9.
CrossRef.
7. Conclusions 5. Marcic T, Stumberger B, Stumberger G. Comparison of
induction motor and line-start IPM synchronous motor
A PI with hysteresis band current controlled perma- performance in a variable-speed drive. IEEE Transaction
nent magnet synchronous motor drive based on field on Industry Applications. 2012 Nov–Dec; 48(6):2341–52.
orientation has been considered for optimization of the CrossRef.
coefficients of PI controller. Normally, in industries the 6. Martins FG. Tuning PID controllers using the ITAE crite-
hit and trial methods starting from lower coefficient rion. International Journal of Engineering Education. 2005;
values and gradually tuning to the values to get the best 21:867–73.
performances are used. But, this practice affects the sys- 7. Zhuang M, Atherion DP. Tuning PID Controllers with Integral
tem performances during the time of variations of PI Performance Criteria. Proceedings of IEE International
Conference Control; Edinburgh UK. 1991. p. 481–6.
controller’s values and also difficult to get the optimized
8. Ozana S, Docekal T. PID controller design based on global
values. Therefore, offline estimation of PI controller is the
optimization technique with additional constraints. Journal
best choice by building the replica of industrial model Of Electrical Engineering. 2016; 67(3):160–8. CrossRef.
and simulated it with different values of PI controller. The 9. Global Optimization Toolbox User's Manual. 2017. Available
different Iterative values are chosen based on the objec- from: http://www.mathworks.com/help/pdf_doc/gads/
tive function. In this paper, PMSM drive is considered gads_tb.pdf
because of it may be the working horse in industry in 10. Control System Toolbox User’s Manual. 2017. Available
near future. The gains of PI controller are optimized by from: https://in.mathworks.com/help/control/
using Nelder-Mead simplex optimization algorithms. The 11. Symbolic Toolbox User's Manual. Available from: https://
difference between the reference speed and actual speed www.mathworks.com/help/pdf_doc/symbolic/symbolic_
is considered here as an objective function. The opti- tb.pdf
mized values (kp=1.8207 and ki=35.7655) are found after 12. Nelder JA, Mead R. A simplex method for function minimi-
zation. Computer Journal. 1965; 7:308–13. CrossRef.
48 iterations. The specific research objectives have been
achieved as shown in the simulation and analysis results.
10 Vol 10 (25) | July 2017 | www.indjst.org Indian Journal of Science and Technology
Byamakesh Nayak and Tanmoy Roy Choudhury
13. Levine S. The Control Handbook. 2nd Edition. CRC Press; The Nelder-Mead simplex algorithm. New Computing
2010. Environments Microcomputers in Large-Scale Scientific
14. Pipalava D, Kotwal C. ANFIS–PI controller based coordi- Computing. Philadelphia: SIAM; 1987.
nated control scheme of variable speed PMSG based WECS 16. Gao F, Han L. Implementing the Nelder-Mead simplex
to improve LVRT capability of wind farm comprising fixed algorithm with adaptive parameters. Computational
speed SCIG based WECS. Indian Journal of Science and Optimization and Applications. 2012 Jan; 51(1):259–77.
Technology. 2016 Nov; 9(44):1-8. CrossRef. CrossRef.
15. Dennis JE, Woods DJ. Optimization on microcomputers
Vol 10 (25) | July 2017 | www.indjst.org Indian Journal of Science and Technology 11