Research Article FPGA Realization of Sensorless PMSM …downloads.hindawi.com/journals/mpe/2013/919318.pdf · Research Article FPGA Realization of Sensorless PMSM Speed Controller
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Hindawi Publishing CorporationMathematical Problems in EngineeringVolume 2013 Article ID 919318 13 pageshttpdxdoiorg1011552013919318
Research ArticleFPGA Realization of Sensorless PMSMSpeed Controller Based on Extended Kalman Filter
Ying-Shieh Kung1 Nguyen Vu Quynh2 Nguyen Trung Hieu1 and Jin-Mu Lin1
1 Department of Electrical Engineering Southern Taiwan University of Science and Technology 1 Nan-Tai StreetYong-Kang District Tainan City 710 Taiwan
2Department of Electrical Engineering Lac Hong University 10 Huynh Van Nghe Street Buu Long DistrictBien Hoa City 084 Dong Nai Province Vietnam
Correspondence should be addressed to Ying-Shieh Kung kungmailstustedutw
Received 9 September 2013 Accepted 22 October 2013
Academic Editor Teen-Hang Meen
Copyright copy 2013 Ying-Shieh Kung et al This is an open access article distributed under the Creative Commons AttributionLicense which permits unrestricted use distribution and reproduction in any medium provided the original work is properlycited
Based on extended Kalman filter (EKF) the design and FPGA implementation of a sensorless control intellectual property (IP) forpermanent magnet synchronous motor (PMSM) drive are presented in this paper Firstly the mathematical model for PMSM isderived and the vector control is built up Secondly the rotor flux angle (FA) and rotor speed which are estimated by using EKFare describedThese estimated values are feedbacked to the current loop for vector control and to the speed loop for speed controlThirdly the very-high-speed IC hardware description language (VHDL) is adopted to describe the behavior of the sensorless speedcontrol IP which includes the circuits of space vector pulse width modulation (SVPWM) coordinate transformation EKF andPI controller Finally to evaluate the effectiveness and correctness of the proposed of system a cosimulation work performed bySimulink and ModelSim is firstly conducted Then an experimental system by FPGA chip and motor driving board is set up tofurther validate the performance of the proposed EKF-based sensorless speed control IP
1 Introduction
PMSM has been increasingly used in many automationcontrol fields as actuators due to its advantages of supe-rior power density high-performance motion control withfast speed and better accuracy However conventionalmotorcontrol needs a speed sensor or an optical encoder tomeasure the rotor speed and feedback it to the controller forensuring the precision speed control Such sensor presentssome disadvantages such as drive cost machine size reliabil-ity and noise immunity In recent years a sensorless controlwithout position and speed sensors for PMSM drive becomea popular research topic in the literature [1ndash7] Those sen-sorless control strategies have sliding mode observer (SMO)extended Kalman filter (EKF) reduced-order EKF and soforth The EKF is basically a full-order stochastic observerfor the recursive optimum state estimation of a nonlineardynamic system in real time by using signals that are in noisyenvironment [7] Comparing with SMO EKF can directly
estimate the angular speed and it has high convergence ratewhich can give a more rapid speed response [5] HoweverEKF requires heavy online 4times4matrix computing thereforethe complex computation becomes a challenge for a fixed-point processor system In realization a fixed-point processorusing digital signal processor (DSP) and field programmablegate array (FPGA) both can provide a good solution inthis issue Particularly FPGA with programmable hard-wired feature fast computation ability shorter design cycleembedding processor low power consumption and higherdensity is better for the implementation of the digital system[8 9] than DSP
Recently a cosimulation work by Electronic Design Au-tomation (EDA) Simulator Link has been gradually appliedto verify the effectiveness of the Verilog and VHDL codein the motor drive system [10ndash12] The EDA Simulator Link[13] provides a cosimulation interface between MATLAB orSimulink and HDL simulators-ModelSim [14] Using it you
2 Mathematical Problems in Engineering
can verify a VHDL Verilog or mixed-language implemen-tation against your Simulink model or MATLAB algorithm[13] Therefore EDA Simulator Link lets you use MATLABcode and Simulink models as a test bench that generatesstimulus for anHDL simulation and analyzes the simulationrsquosresponse [13] In this paper a cosimulation by EDA SimulatorLink is applied to sensorless speed control for PMSM driveThe PMSM inverter and speed command are performed inSimulink and the EKF algorithm current vector controllerand speed PI controller described by VHDL code are exe-cuted in ModelSim After successful verification in simula-tion an FPGA-based experimental system is established withconfiguration as in Figure 1 for realizing the proposed IP codeagain and experiment results will validate the effectiveness ofthe sensorless speed control system of PMSM drive
2 System Description of PMSM Drive andSensorless Speed Control
The sensorless speed control block diagram for PMSM driveis shown in Figure 1 The modeling of PMSM the EKF-basedrotor flux angle (FA) and rotor speed estimation and the PIcontroller are introduced as follows
21 Mathematical Model of PMSM Themathematical modelof a PMSM is described in two-axis 119889-119902 synchronous rotat-ing reference frame as follows
119889119894119889
119889119905= minus
119903119904
119871119889
119894119889 + 120596119890
119871119902
119871119889
119894119902 +1
119871119889
V119889
119889119894119902
119889119905= minus120596119890
119871119889
119871119902
119894119889 minus119903119904
119871119902
119894119902 minus 120596119890
120582119891
119871119902
+1
119871119902
V119902
(1)
where V119889 V119902 are the 119889 and 119902 axes voltages 119894119889 119894119902 arethe 119889 and 119902 axes currents 119903119904 is the phase winding resis-tance 119871119889 119871119902 are the 119889 and 119902 axes inductance 120596119890 is the rotat-ing speed of magnet flux and 120582119891 is the permanent magnetflux linkage
The current loop control of PMSM drive in Figure 1 isbased on a vector control approach That is if the 119894119889 is forcedto 0 the PMSM will be decoupled and controlling a PMSMis like controlling a DC motor After decoupling the motorrsquostorque is proportional to 119894119902
119879119890 =3119873119875
4120582119891119894119902
Δ= 119870119905119894119902 (2)
Considering the mechanical load the overall dynamic equa-tion of PMSM drive system is obtained by
119869119898
119889
119889119905120596119903 + 119861119898120596119903 = 119879119890 minus 119879119871 (3)
where 119879119890 is the motor torque 119873119875 is pole pairs 119870119905 is torqueconstant 119869119898 is the inertial value 119861119898 is damping ratio 119879119871 isthe external torque and 120596119903 is rotor speed
22 Extended Kalman Filter (EKF) For a motor stochasticnonlinear equation it can be written in the following form
where 119909(119905) 119906(119905) and 119910(119905) are system state system inputand system output respectively The 120590(119905) and 120583(119905) representsystem noise and measurement noise which are zero-meanwhite Gaussian distribution with covariance 119876(119905) and 119877(119905)respectively Once a nominal solution to a motor nonlinearequation can be found in (4)-(5) the linearized perturbationequation is
where 119905119899 = 119899119879119888 and 119905119899minus1 = (119899 minus 1)119879119888The EKF is an optimal estimator which searches the
cost function 119869 = sum119898
119899=11198641199092(119899) at the least square sense
The 119909(119899) is defined by 119909(119899) = 119909(119899) minus 119909(119899) which isthe difference of estimation of state 119909(119899) and system state119909(119899) The EKF algorithm is described by the following two-step recursive equations
Mathematical Problems in Engineering 3
SVPWM
PMSM
PI
Inverter
PWM 1
Park Clark
PWM 6
PWM 2PWM 3PWM 4PWM 5
PI
a b c
Current controller
AD
Modify
AD interface
AD
sin cos of flux angle
FPGA
LPF
LPF
Speed controller
PI
Rotor flux and rotor speed
estimation based on EKF
Load
Ac source
Rectifier
Speed command generation
CL
iu
iw
ref1
ref2
ref3
ia
ib
ic
120572
120572
120573
120573
i120572
i120572
i120573
i120573
120572 120573
120572 120573
120572 120573
120572 120573
iq
id
q
d
d q
d q
ilowastq
+
++
minus
minusminusilowastd = 0
120596lowastr
120596r
120596r
sin e
e
cos e
clarkminus1Parkminus1
Nios II processor
CPU
On-chipROM
On-chipRAM
Aval
on b
us
UART
PIO
Timer
SPI
SDRAMcontroller
a b c
Figure 1 Architecture of FPGA-based sensorless PMSM drive system
Step 1 (prediction step) From (4) and using a simple rectan-gular integration
where [V120572 V120573]119879 is voltage on fixed coordinate [119894120572 119894120573]
119879 iscurrent on fixed coordinate 120579119890 is angular position at magnetflux and 119904 is differential operator If we choose the 119909(119905) =[119894120572 119894120573 120596119890 120579119890]
119879as the state variable of the PMSMmathematicalmodel then (21) can be expanded to the following formula-tion
119889
119889119905
[[[[[
[
119894120572
119894120573
120596119890
120579119890
]]]]]
]
=
[[[[[[[[[
[
minus119903119904119894120572
119871 119904
+
120596119890120582119891
119871 119904
sin 120579119890
minus
119903119904119894120573
119871 119904
minus
120596119890120582119891
119871 119904
cos 120579119890
0
120596119890
]]]]]]]]]
]
+
[[[[[[[[
[
1
119871 119904
0
01
119871 119904
0 0
0 0
]]]]]]]]
]
[
V120572
V120573]Δ= 119891 + 119861[
V120572
V120573]
(22)
[
119894120572
119894120573
] = [1 0 0 0
0 1 0 0]
[[[[[
[
119894120572
119894120573
120596119890
120579119890
]]]]]
]
Δ= ℎ (23)
4 Mathematical Problems in Engineering
Time update (prediction)
Calculate temporary state variables
Calculate temporary covariance matrix
Measurement update (innovation)
Calculate Kalman gain
Update state variables and covariance matrix
Initial
orxn|nminus1 = xnminus1 + (f[xnminus1] + B middot unminus1)Tc
sin 120579119890120596119890120582119891119879119888
119871 119904
cos 120579119890
0 1 minus119903119904119879119888
119871 119904
minus
120582119891119879119888
119871 119904
cos 120579119890120596119890120582119891119879119888
119871 119904
sin 120579119890
0 0 1 0
0 0 119879119888 1
]]]]]]]]]
]
Δ=
[[[
[
119866 0 12060113 12060114
0 119866 12060123 12060124
0 0 1 0
0 0 119879119888 1
]]]
]
(26)
As the results the EKF algorithm in (14)ndash(19) can be carriedout to estimate the state valueThe initial values of 119876119889119877 and1198750 need to be chosen Through the recursive calculation the
state value of 119909(119899) = [120572(119899) 120573(119899) 119890(119899) 120579119890(119899)]119879 is estimated
at each sampling period then the rotor speed can be derivedby
119903 (119899) =119890 (119899)
119873119875
(27)
Finally a summary for the estimation of rotor FA androtor speed based on EKF is presented as follows
Step 1 Set the initial values of 119876119889 119877 1198750 and 119899 = 1
Step 2 Measure the values of 119894120572(119899) 119894120573(119899) V120572(119899) and V120573(119899)from PMSM system
Step 3 Estimate the temporary state variables from (14) Inaddition refer to (22) and the scalar form of the predictionequation can be expressed as follows
120572 (119899 | 119899 minus 1) = (1 minus 119879119888
119903119904
119871 119904
) 120572 (119899 minus 1)
+
119890 (119899 minus 1) 119879119888120582119891 sin (120579119890 (119899 minus 1))119871 119904
+119879119888V120572 (119899 minus 1)
119871 119904
120573 (119899 | 119899 minus 1) = (1 minus 119879119904
119903119904
119871 119904
) 120573 (119899 minus 1)
minus
119890 (119899 minus 1) 119879119904120582119891 cos (120579119890 (119899 minus 1))119871 119904
+
119879119888V120573 (119899 minus 1)
119871 119904
119890 (119899119899 minus 1) = 119890 (119899 minus 1)
120579119890 (119899119899 minus 1) = 120579119890 (119899 minus 1) + 119890 (119899 minus 1) 119879119888
(28)
Step 4 Calculate the Φ119899minus1 from (26)
Mathematical Problems in Engineering 5
Clk
STSB
RCBRCA
STSA
CHBCHA
SVPWMgeneration
ADC interface
Frequency
Application IP
dividerCK
PWM 1PWM 2PWM 3PWM 4PWM 5PWM 6
ADIN[11]
ADIN[0]BDIN[11]
BDIN[0]
CPU
On-chipROM
On-chipRAM
UART
PIO
Timer
SPI
Aval
on b
us
Aval
on b
us
FPGA-based sensorless speed control IP
D[31]
D[0]
A[22]
A[0]
Current controllers and coordinate transformation
(CCCT)
Clk
Clk
Clk
Speed controller
(PI controller)
Clk
Clk-step
Clk-step
Clk-step
Clk-step
Clk-step
Rotor flux and rotor speed estimation
based on EKF
Clk
Nios II embedded processor IP
Sram be[3]Sram be[2]Sram be[1]Sram be[0]
Sram oeSram weSram cs
120596lowastr [150]
120596lowastr [150]
r [150]ilowastq [110]
e[110]
120572[110]
120573[110]
i120572[110]
i120573[110]
ia[110]
ib[110]
ic[110]
[110]
[110]
[110]
rx
ry
rz
Figure 3 Internal architecture of a sensorless speed control IP in FPGA
Step 5 Obtain the temporary covariance matrix 119875119899|119899minus1 from(16) Because matrix 119875119899|119899minus1 is symmetric matrix by 119901119894119895 = 119901119895119894it can be chosen by the following form
119875119899|119899minus1 =
[[[
[
11990111 11990112 11990113 11990114
11990121 11990122 11990123 11990124
11990131 11990132 11990133 11990134
11990141 11990142 11990143 11990144
]]]
]
(29)
Hence from (16) individual elements of 119875119899|119899minus1 could beupdated as follows
Figure 4 State diagram of FSM for describing the EKF-based algorithm
where 119877 represents the uncertainties of measurement vari-ablewhich are very difficult to knowHence119877 is often chosenas unity matrix for simplifying the task but does not affect theoutcome (31) Since 11987512 = 11987521 (31) can be rewritten in thefollowing form
1199011111990122 + 11990111 + 11990122 minus 1199012
12+ 1
[11990122 + 1 minus11990112
minus11990112 11990111 + 1]
(32)To normalize the input value and to prevent the numericaloverflow condition which occurred during computation (32)is normalized and those values are all divided by 4Therefore(32) becomes
where 119896119894119895 is the element in Kalman gain 119870119899 sdot 120572(119899) = 119894120572(119899) minus120572(119899 | 119899 minus 1) and 120573(119899) = 119894120573(119899) minus 120573(119899 | 119899 minus 1)
Mathematical Problems in Engineering 9
(work-3)
(work-2)
(work-1)
Speedcommand
Speed commandRotor speed and Kalman speed
Gain1
Torque
S-function
Flux angle
Stator current
DCTm
mA
NSB
C
0001voltage source
Gain6Saturation
Saturation1
Saturation2
Data type conversion 1
Data type conversion 10
Data type conversion 11
Data type conversion 12
Gain7
Gain8
transformation
flux angleReal and estimated
Constant1
Constant2
Permanent magnetsynchronous machine
Convert
Convert
Convert
Convert
Convert
Convert
Convert0
ModelSim
ModelSim
ModelSim
cmd
Rotor speed
Current command
Speed loop PI controller
iq current command
cmd iq
cmd id
Flux angle
Phase a current
Phase b current
Phase c current
PMW1
PMW2
PMW3
PMW4
PMW5
PMW6
id out
iq out
CCCT and SVPWM
-K-
-K-
-K-
-K-
d-axis current
Motor dq current
Flux angle
wr
Full-order EKF
IGBT-based inverter
idq
ln1Conn1
ln2Conn2
ln3Conn3
ln4Conn4
ln5Conn5
ln6Conn6
+⟨Rotor speed wm (rads)⟩⟨Electromagnetic torque Te (Nlowastm)⟩⟨Rotor angle thetam (rad)⟩⟨Stator current is d (A)⟩⟨Stator current is q (A)⟩⟨Stator current is a (A)⟩⟨Stator current is b (A)⟩⟨Stator current is c (A)⟩
120572
i120572
120573
i120573
V120572 out
V120573 out
I120572 out
I120573 out
Figure 7 The SimulinkModelSim cosimulation architecture for sensorless speed control of PMSM drive
Step 8 Update the present covariance matrix 119875119899 from (18)where 119870119899119867119875119899|119899minus1 can be directly obtained as follows
Step 9 Calculate the rotor speed from (27) then set 119899 = 119899 +1 and go back to Step 2
3 Design of Sensorless Speed Controller IP
Figure 3 illustrates the internal architecture of the proposedFPGA implementation of a sensorless speed control IP forPMSM drive system The internal circuit comprises a NiosII embedded processor IP and an application IP The Nios IIprocessor is depicted to generate the speed command collectthe response data and communicate with external deviceAll programs in Nios II processor are coded in the Clanguage The application IP includes mainly a circuit of anEKF-based rotor FA and rotor speed estimation a speedPI controller a circuit for current controllers and coordinatetransformation (CCCT) a SVPWM circuit and an ADCinterface circuit The sampling frequencies of the speedcontrol loop and current control loop are designedwith 2 kHzand 16 kHz respectively The frequency divider generates50Mhz (Clk) and 125Mhz (Clk-step) clock to supply allcircuits in Figure 3 The internal circuit of CCCT performs
the function of two PI controllers table look-up for sincosfunction and the coordinate transformation for Clark Parkinverse Park and modified inverse Clarke The detailedcircuit design of CCCT speed PI controller ADC interfaceand SVPWM generation in Figure 3 refers to [8] Hereinonly the digital hardware circuit design of the EKF-basedrotor FA and rotor speed estimation is described To reducethe FPGA resource usage a finite-state machine (FSM) isemployed to model the EKF-based algorithm whose designprocedure andmathematical formulation are presented in theprevious sectionThedesign result is shown in Figure 4whichuses one adder one multiplier one divider two sincos look-up table shifters registers and so forth and manipulates 131steps machine to carry out the overall computationThe datatype adopts 16-bit lengthwithQ15 format and 2rsquos complementoperation The multiplier adder and divider apply AlteraLPM (Library ParameterizedModules) standard In Figure 4the steps 1199040 sim 11990412 execute the calculation of Jacobian matrixand predict temporary state variables 11990413 sim 11990468 perform thecomputation of temporary covariance matrix steps 11990469 sim11990470 are for state error calculation steps 11990471sim119904120 update of
10 Mathematical Problems in Engineering
0 01 02 03 04 05 06
0100200300
Spee
d (r
pm)
Speed command Actual
rotor speed
Estimated rotor speed
minus100minus200minus300
Time (s)
(a)
0 01 02 03 04 05 06
005
115
Curr
ent (
A)
minus05
minus1
iqid
Time (s)
(b)
0 01 02 03 04 05 06
0100200300400500
Flux
angl
e (FA
) (d
eg)
Actual rotor FA
Estimated rotor FAby EKF
minus100
Time (s)
(c)
Figure 8 PMSM running at low speed (200 rpm) and inverse speed (plusmn200 rpm) condition (a) Speed step response (b) current responseand (c) actual rotor FA and estimated rotor FA
0 005 01 015 02 025 03 035 04 045 05
0100020003000
Spee
d (r
pm)
Time (s)
Speed command
Estimated rotor speed
Actual rotor speed
minus1000
minus2000
minus3000
(a)
0 005 01 015 02 025 03 035 04 045 05
0
2
4Cu
rren
t (A
)
Time (s)
minus2
minus4
iq
id
(b)
0 005 01 015 02 025 03 035 04 045 05
0100200300400
Flux
angl
e (FA
) (de
g)
Time (s)
Actual rotor FA
Estimated rotor FA by EKF minus100
(c)
Figure 9 PMSM running at wide-range high speed (2000 rpm) and inverse speed (plusmn1000 rpm) condition (a) Speed step response (b) currentresponse AND (c) actual rotor FA and estimated rotor FA
the present covariance matrix 119875119899 and calculate the Kalmangain 119870119899 119904121sim 119904130 describe the present state tuning as wellas executing the computation of rotor FA and rotor speedAccording to (30) the computation of temporary covariancematrix 119875119899|119899minus1in Figure 4 is described in Figure 5 Furtheraccording to (18) (33)-(34) and (36) the update of thepresent covariancematrix119875119899 and calculation theKalman gain119870119899 in Figure 4 are illustrated in Figure 6 The operation ofeach step in Figure 4 is 80 ns (125MHz) in FPGA thereforea total of 131 steps need only 1048 120583s operation timesThe FPGA (Altera) resource usages of EKF-based rotor FAand rotor speed estimation in Figure 4 is 4158 LEs (logicelements) and 2890 RAM bits Additionally the FPGA
resource usages of the circuits of CCCT speed PI controllerADC interface and SVPWM in Figure 3 are 864 LEs and24576 RAM 2043 LEs and 0RAM bits 136 LEs and 0RAMbits and 1221 LEs and 0RAM bits respectively
The SimulinkModelSim cosimulation architecture for sen-sorless PMSM speed control system is shown in Figure 7The SimPowerSystem-Blockset in the Simulink executes thePMSM and the IGBT-based inverterThe EDA simulator linkfor ModelSim executes the cosimulation using VHDL code
Mathematical Problems in Engineering 11
LP filter circuit
Rectifier Inverter
Ac source
Isolated and driving circuits
ADC
ADC
PWM6PWM1
PMSM
Digital circuitof speed PI controller EKF-based rotor FA and speed estimation
and current vector controller for PMSM
FPGA-based sensorless speed control IP
Load
Externalmemory
(Nios II processor)
Embedded processor IP
Application IP
L
C
T+A
TminusA
T+B
TminusB
T+C
TminusC
U V W
ia
ib
CPU
On-chipROM
On-chipRAM
UART
PIO
Timer
SPI
SDRAMcontroller
Aval
on b
us
(a)
(b)
Figure 10 Experimental system (a) with block diagram and (b) in real system
running in ModelSim program It executes the function ofthe sensorless speed controller by three works The work-1to work-3 of ModelSim in Figure 7 respectively perform thefunction of speed loop PI controller the function of cur-rent controller and coordinate transformation (CCCT) andSVPWM and the function of EKF-based rotor FA and rotorspeed estimation The sampling frequency in current controlloop and EKF-based estimation algorithm is designed with16 kHz but in speed control loop is 2 kHz The clocks of50MHz and 125MHz will supply all works of ModelSimThe FPGA (Altera) resource usages of work-1 to work-3 are2043 LEs and 0 RAM bits 2085 LEs and 24576 RAM bitsand 4158 LEs and 2890 RAM bits respectively
In simulation the designed PMSM parameters used inFigure 7 are as follows pole pairs are 4 stator phase resis-tance is 13Ω stator inductance is 63mH inertia is 119869 =
0000108 kglowastm2 and friction factor is 119865 = 00013NlowastmlowastsPI gains in speed control loop are designed with119870119901 = 02442and 119870119894 = 000458 To evaluate the proposed controllerperformance PMSM running at low speed (200 rpm) andinverse speed (from 200 rpm to minus200 rpm or vice versa) con-dition is firstly considered and its simulation results regard-ing as the speed step response the current response as wellas the actual rotor flux angle (FA) and the estimated rotorflux angle are shown in Figure 8 It shows that the motorspeed gives a good dynamic response performance with a
12 Mathematical Problems in Engineering
0 02 04 06 08 1 12 14 16 18 2
0
500 Speed command
Rotor speed
200
Time (s)
Spee
d (r
pm)
minus500
minus200
(a)
0
100
200
300
400
0 02 04 06 08 1 12 14 16 18 2
Actual rotor FA Estimated rotor FA
Time (s)
Flux
angl
e (de
g)
(b)
Figure 11 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) actual rotor FA and estimated rotor FA
0200400600800
10001200 Speed
command
Actual rotor speed
Estimated rotor speed
0 05 1 15 2 25 3Time (s)
Spee
d (r
pm)
(a)
0 05 1 15 2 25 3Time (s)
Curr
ent (
A) iq
id
0
051
15
minus05
minus1
(b)
Figure 12 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) current response
little overshoot and 25ms rising time It also shows thatthe estimated rotor speed can track actual rotor speed wellFigure 8(b) shows a successful vector control because 119894119889 iscontrolled to zero Figure 8(c) shows that the estimated rotorFA can fast track the actual rotor FA even in the inverse speedcommand condition Further another simulation case whilethe PMSMrunning at wide-range high speed (from0 rpm rarr
minus2000 rpm) and inverse speed (from 1000 rpm tominus1000 rpm)condition is tested and its simulation results are shown inFigure 9 It presents that not only at speed tracking butalso at rotor FA tracking the estimated value adopted byEKF method can give a good follow to the real rotor valueHowever except in the initial condition the actual rotorspeed gives a fast step response by 18ms rising time near0mm steady-state value and maximum 175 overshoot
5 Experimental System and Results
After confirming the correctness of the proposed EKF-basedsensorless control IP by simulation the VHDL codes aredirectly applied to the experimental FPGA-based sensorlessPMSM drive system The block diagram and real experi-mental system are depicted in Figure 10 The main devicesinclude a PMSM a DE2 board with Altera CycloneII FPGAa motor driver and a power supplier The parameters of thePMSM are 119903119904 = 063Ω 119871 = 277mH and 4 pole pairs Theinput voltage continuous current rating torque rating speedand continuous power of the PMSM are 220V 12A 23N-m 3000 rpm and 750W respectively The Altera CycloneIIEP2C35 chip adopted in the design possesses 33216 LEsmaximum 475 available IO pins 483840 RAM and 35
embedded multipliers The chip can be embedded with aNios II multicore processor that is equipped with several32-bit CPU flexibility of core size 1 to 16Mbytes of flashmemory in the available memory chip 1 Mbyte SRAM 16Mbyte SDRAM and 4 Gbytes memory outside of the chip Inimplementation except the VHDL codes of CCCT EKF andPI controller the VHDL code of ADC interface circuit shouldbe added and integrated and then downloaded into FPGAThePI gains of speed control loop in experiment are designedwith 119870119901 = 0512 and119870119894 = 0021
In the experimental case PMSM running at low speed(200 rpm) and inverse speed (from 200 rpm to minus200 rpm orvice versa) condition are firstly considered and its experi-ment results regarding the speed step response as well as theactual rotor FA and the estimated rotor FA are shown inFigure 11 Figure 11(a) shows that the motor speed gives agood dynamic response performance with a little oscillationand overshoot and it has 15ms rising time Figure 11(b) showsthat the estimated FA can fast track the actual rotor FA evenin the inverse speed command condition Further anotherexperimental case while the PMSM running at mediumspeed (from 0 rpm rarr 300 rpm rarr 600 rpm rarr 900 rpm rarr
600 rpm rarr 900 rpm) condition is evaluated and its experi-ment results are shown in Figure 12The Figure 12(a) presentsa fast speed trackingwith 15ms rising time and no occurrenceof overshoot condition Figure 12(b) shows a successful vectorcontrol due to the 119894119889 being controlled to zeroTherefore fromthe simulation results in Figures 8 and 9 and the experimentalresults in Figures 11 and 12 it is demonstrated that the EKF-based estimation algorithm used in sensorless PMSM driveand the behavior description by usingVHDL are effective andcorrect
Mathematical Problems in Engineering 13
6 Conclusions
This study has presented a sensorless PMSM drive based onEKF and successfully demonstrated its performance throughcosimulation by using SimulinkModelSim and implemen-tation by using FPGA In realization aspect the VHDL isused to describe the behavior of EKF algorithm and FSM isused to reduce the FPGA resource usage therefore it onlyneeds 4158 LEs and 2890 RAMbits In computational poweraspect the operation time to complete the computation ofEKF algorithm is only 1048 120583s which is less than the 625120583s(16 KHz) sampling time in current control loop In simulatedand experimental results it shows that the use of EKF insensorless PMSM drive can accurately estimate the rotorFA and rotor speed and it can give a good step responseperformance in case of low speed control inverse speedcontrol and high speed control as well
Acknowledgment
This work was supported by the National Science Council ofChina under Grant no NSC 101-2221-E-218-039
References
[1] V C Ilioudis and N I Margaris ldquoPMSM sensorless speedestimation based on sliding mode observersrdquo in Proceedings ofthe 39th IEEE Annual Power Electronics Specialists Conference(PESC rsquo08) pp 2838ndash2843 June 2008
[2] S Chi Z Zhang and L Xu ldquoSliding-mode sensorless controlof direct-drive PM synchronous motors for washing machineapplicationsrdquo IEEE Transactions on Industry Applications vol45 no 2 pp 582ndash590 2009
[3] V Delli Colli R di Stefano and F Marignetti ldquoA system-on-chip sensorless control for a permanent-magnet synchronousmotorrdquo IEEE Transactions on Industrial Electronics vol 57 no11 pp 3822ndash3829 2010
[4] S Bolognani R Oboe andM Zigliotto ldquoSensorless full-digitalpmsm drive with ekf estimation of speed and rotor positionrdquoIEEE Transactions on Industrial Electronics vol 46 no 1 pp184ndash191 1999
[5] M C Huang A J Moses and F Anayi ldquoThe comparison ofsensorless estimation techniques for PMSM between extendedKalman filter and flux-linkage observerrdquo in Proceedings of the21st Annual IEEE Applied Power Electronics Conference andExposition (APEC rsquo06) pp 654ndash659 March 2006
[6] WWang M Zhang and Q Wu ldquoApplication of reduced-orderextended kalman filter in permanent magnet synchronousmotor sensorless regulating systemrdquo in Proceedings of the Inter-national Conference on Digital Manufacturing and Automation(ICDMA rsquo10) pp 271ndash274 December 2010
[7] J-S Jang B-G Park T-S Kim D M Lee and D-S HyunldquoParallel reduced-order extended Kalman Filter for PMSMsensorless drivesrdquo in Proceedings of the 34th Annual Conferenceof the IEEE Industrial Electronics Society (IECON rsquo08) pp 1326ndash1331 November 2008
[8] Y-S Kung and M-H Tsai ldquoFPGA-based speed control IC forPMSM drive with adaptive fuzzy controlrdquo IEEE Transactions onPower Electronics vol 22 no 6 pp 2476ndash2486 2007
[9] L Idkhajine and E Monmasson ldquoDesign methodology forcomplex FPGA-based controllersmdashapplication to an EKF sen-sorless AC driverdquo in Proceedings of the 19th International Con-ference on Electrical Machines (ICEM rsquo10) pp 1ndash6 September2010
[10] H-H Chou Y-S Kung N Vu Quynh and S Cheng ldquoOpti-mized FPGA design verification and implementation of aneuro-fuzzy controller for PMSM drivesrdquo Mathematics andComputers in Simulation vol 90 pp 28ndash44 2013
[11] Y S Kung and T H Nguyen ldquoSimulinkModelsim Co-simu-lation of EKF-based Sensorless PMSM drivesrdquo in Proceedingsof IEEE International on Power Electronics and Drive Systems(PEDS rsquo13) pp 709ndash713 2013
[12] Y Li J Huo X Li J Wen YWang and B Shan ldquoAn open-loopsinmicrostepping driver based on FPGA and the co-simulationof modelsim and simulinkrdquo in Proceedings of the InternationalConference on Computer Mechatronics Control and ElectronicEngineering (CMCE rsquo10) pp 223ndash227 August 2010
[13] The Mathworks ldquoMatlabSimulink Users Guide ApplicationProgram Interface Guiderdquo 2004
can verify a VHDL Verilog or mixed-language implemen-tation against your Simulink model or MATLAB algorithm[13] Therefore EDA Simulator Link lets you use MATLABcode and Simulink models as a test bench that generatesstimulus for anHDL simulation and analyzes the simulationrsquosresponse [13] In this paper a cosimulation by EDA SimulatorLink is applied to sensorless speed control for PMSM driveThe PMSM inverter and speed command are performed inSimulink and the EKF algorithm current vector controllerand speed PI controller described by VHDL code are exe-cuted in ModelSim After successful verification in simula-tion an FPGA-based experimental system is established withconfiguration as in Figure 1 for realizing the proposed IP codeagain and experiment results will validate the effectiveness ofthe sensorless speed control system of PMSM drive
2 System Description of PMSM Drive andSensorless Speed Control
The sensorless speed control block diagram for PMSM driveis shown in Figure 1 The modeling of PMSM the EKF-basedrotor flux angle (FA) and rotor speed estimation and the PIcontroller are introduced as follows
21 Mathematical Model of PMSM Themathematical modelof a PMSM is described in two-axis 119889-119902 synchronous rotat-ing reference frame as follows
119889119894119889
119889119905= minus
119903119904
119871119889
119894119889 + 120596119890
119871119902
119871119889
119894119902 +1
119871119889
V119889
119889119894119902
119889119905= minus120596119890
119871119889
119871119902
119894119889 minus119903119904
119871119902
119894119902 minus 120596119890
120582119891
119871119902
+1
119871119902
V119902
(1)
where V119889 V119902 are the 119889 and 119902 axes voltages 119894119889 119894119902 arethe 119889 and 119902 axes currents 119903119904 is the phase winding resis-tance 119871119889 119871119902 are the 119889 and 119902 axes inductance 120596119890 is the rotat-ing speed of magnet flux and 120582119891 is the permanent magnetflux linkage
The current loop control of PMSM drive in Figure 1 isbased on a vector control approach That is if the 119894119889 is forcedto 0 the PMSM will be decoupled and controlling a PMSMis like controlling a DC motor After decoupling the motorrsquostorque is proportional to 119894119902
119879119890 =3119873119875
4120582119891119894119902
Δ= 119870119905119894119902 (2)
Considering the mechanical load the overall dynamic equa-tion of PMSM drive system is obtained by
119869119898
119889
119889119905120596119903 + 119861119898120596119903 = 119879119890 minus 119879119871 (3)
where 119879119890 is the motor torque 119873119875 is pole pairs 119870119905 is torqueconstant 119869119898 is the inertial value 119861119898 is damping ratio 119879119871 isthe external torque and 120596119903 is rotor speed
22 Extended Kalman Filter (EKF) For a motor stochasticnonlinear equation it can be written in the following form
where 119909(119905) 119906(119905) and 119910(119905) are system state system inputand system output respectively The 120590(119905) and 120583(119905) representsystem noise and measurement noise which are zero-meanwhite Gaussian distribution with covariance 119876(119905) and 119877(119905)respectively Once a nominal solution to a motor nonlinearequation can be found in (4)-(5) the linearized perturbationequation is
where 119905119899 = 119899119879119888 and 119905119899minus1 = (119899 minus 1)119879119888The EKF is an optimal estimator which searches the
cost function 119869 = sum119898
119899=11198641199092(119899) at the least square sense
The 119909(119899) is defined by 119909(119899) = 119909(119899) minus 119909(119899) which isthe difference of estimation of state 119909(119899) and system state119909(119899) The EKF algorithm is described by the following two-step recursive equations
Mathematical Problems in Engineering 3
SVPWM
PMSM
PI
Inverter
PWM 1
Park Clark
PWM 6
PWM 2PWM 3PWM 4PWM 5
PI
a b c
Current controller
AD
Modify
AD interface
AD
sin cos of flux angle
FPGA
LPF
LPF
Speed controller
PI
Rotor flux and rotor speed
estimation based on EKF
Load
Ac source
Rectifier
Speed command generation
CL
iu
iw
ref1
ref2
ref3
ia
ib
ic
120572
120572
120573
120573
i120572
i120572
i120573
i120573
120572 120573
120572 120573
120572 120573
120572 120573
iq
id
q
d
d q
d q
ilowastq
+
++
minus
minusminusilowastd = 0
120596lowastr
120596r
120596r
sin e
e
cos e
clarkminus1Parkminus1
Nios II processor
CPU
On-chipROM
On-chipRAM
Aval
on b
us
UART
PIO
Timer
SPI
SDRAMcontroller
a b c
Figure 1 Architecture of FPGA-based sensorless PMSM drive system
Step 1 (prediction step) From (4) and using a simple rectan-gular integration
where [V120572 V120573]119879 is voltage on fixed coordinate [119894120572 119894120573]
119879 iscurrent on fixed coordinate 120579119890 is angular position at magnetflux and 119904 is differential operator If we choose the 119909(119905) =[119894120572 119894120573 120596119890 120579119890]
119879as the state variable of the PMSMmathematicalmodel then (21) can be expanded to the following formula-tion
119889
119889119905
[[[[[
[
119894120572
119894120573
120596119890
120579119890
]]]]]
]
=
[[[[[[[[[
[
minus119903119904119894120572
119871 119904
+
120596119890120582119891
119871 119904
sin 120579119890
minus
119903119904119894120573
119871 119904
minus
120596119890120582119891
119871 119904
cos 120579119890
0
120596119890
]]]]]]]]]
]
+
[[[[[[[[
[
1
119871 119904
0
01
119871 119904
0 0
0 0
]]]]]]]]
]
[
V120572
V120573]Δ= 119891 + 119861[
V120572
V120573]
(22)
[
119894120572
119894120573
] = [1 0 0 0
0 1 0 0]
[[[[[
[
119894120572
119894120573
120596119890
120579119890
]]]]]
]
Δ= ℎ (23)
4 Mathematical Problems in Engineering
Time update (prediction)
Calculate temporary state variables
Calculate temporary covariance matrix
Measurement update (innovation)
Calculate Kalman gain
Update state variables and covariance matrix
Initial
orxn|nminus1 = xnminus1 + (f[xnminus1] + B middot unminus1)Tc
sin 120579119890120596119890120582119891119879119888
119871 119904
cos 120579119890
0 1 minus119903119904119879119888
119871 119904
minus
120582119891119879119888
119871 119904
cos 120579119890120596119890120582119891119879119888
119871 119904
sin 120579119890
0 0 1 0
0 0 119879119888 1
]]]]]]]]]
]
Δ=
[[[
[
119866 0 12060113 12060114
0 119866 12060123 12060124
0 0 1 0
0 0 119879119888 1
]]]
]
(26)
As the results the EKF algorithm in (14)ndash(19) can be carriedout to estimate the state valueThe initial values of 119876119889119877 and1198750 need to be chosen Through the recursive calculation the
state value of 119909(119899) = [120572(119899) 120573(119899) 119890(119899) 120579119890(119899)]119879 is estimated
at each sampling period then the rotor speed can be derivedby
119903 (119899) =119890 (119899)
119873119875
(27)
Finally a summary for the estimation of rotor FA androtor speed based on EKF is presented as follows
Step 1 Set the initial values of 119876119889 119877 1198750 and 119899 = 1
Step 2 Measure the values of 119894120572(119899) 119894120573(119899) V120572(119899) and V120573(119899)from PMSM system
Step 3 Estimate the temporary state variables from (14) Inaddition refer to (22) and the scalar form of the predictionequation can be expressed as follows
120572 (119899 | 119899 minus 1) = (1 minus 119879119888
119903119904
119871 119904
) 120572 (119899 minus 1)
+
119890 (119899 minus 1) 119879119888120582119891 sin (120579119890 (119899 minus 1))119871 119904
+119879119888V120572 (119899 minus 1)
119871 119904
120573 (119899 | 119899 minus 1) = (1 minus 119879119904
119903119904
119871 119904
) 120573 (119899 minus 1)
minus
119890 (119899 minus 1) 119879119904120582119891 cos (120579119890 (119899 minus 1))119871 119904
+
119879119888V120573 (119899 minus 1)
119871 119904
119890 (119899119899 minus 1) = 119890 (119899 minus 1)
120579119890 (119899119899 minus 1) = 120579119890 (119899 minus 1) + 119890 (119899 minus 1) 119879119888
(28)
Step 4 Calculate the Φ119899minus1 from (26)
Mathematical Problems in Engineering 5
Clk
STSB
RCBRCA
STSA
CHBCHA
SVPWMgeneration
ADC interface
Frequency
Application IP
dividerCK
PWM 1PWM 2PWM 3PWM 4PWM 5PWM 6
ADIN[11]
ADIN[0]BDIN[11]
BDIN[0]
CPU
On-chipROM
On-chipRAM
UART
PIO
Timer
SPI
Aval
on b
us
Aval
on b
us
FPGA-based sensorless speed control IP
D[31]
D[0]
A[22]
A[0]
Current controllers and coordinate transformation
(CCCT)
Clk
Clk
Clk
Speed controller
(PI controller)
Clk
Clk-step
Clk-step
Clk-step
Clk-step
Clk-step
Rotor flux and rotor speed estimation
based on EKF
Clk
Nios II embedded processor IP
Sram be[3]Sram be[2]Sram be[1]Sram be[0]
Sram oeSram weSram cs
120596lowastr [150]
120596lowastr [150]
r [150]ilowastq [110]
e[110]
120572[110]
120573[110]
i120572[110]
i120573[110]
ia[110]
ib[110]
ic[110]
[110]
[110]
[110]
rx
ry
rz
Figure 3 Internal architecture of a sensorless speed control IP in FPGA
Step 5 Obtain the temporary covariance matrix 119875119899|119899minus1 from(16) Because matrix 119875119899|119899minus1 is symmetric matrix by 119901119894119895 = 119901119895119894it can be chosen by the following form
119875119899|119899minus1 =
[[[
[
11990111 11990112 11990113 11990114
11990121 11990122 11990123 11990124
11990131 11990132 11990133 11990134
11990141 11990142 11990143 11990144
]]]
]
(29)
Hence from (16) individual elements of 119875119899|119899minus1 could beupdated as follows
Figure 4 State diagram of FSM for describing the EKF-based algorithm
where 119877 represents the uncertainties of measurement vari-ablewhich are very difficult to knowHence119877 is often chosenas unity matrix for simplifying the task but does not affect theoutcome (31) Since 11987512 = 11987521 (31) can be rewritten in thefollowing form
1199011111990122 + 11990111 + 11990122 minus 1199012
12+ 1
[11990122 + 1 minus11990112
minus11990112 11990111 + 1]
(32)To normalize the input value and to prevent the numericaloverflow condition which occurred during computation (32)is normalized and those values are all divided by 4Therefore(32) becomes
where 119896119894119895 is the element in Kalman gain 119870119899 sdot 120572(119899) = 119894120572(119899) minus120572(119899 | 119899 minus 1) and 120573(119899) = 119894120573(119899) minus 120573(119899 | 119899 minus 1)
Mathematical Problems in Engineering 9
(work-3)
(work-2)
(work-1)
Speedcommand
Speed commandRotor speed and Kalman speed
Gain1
Torque
S-function
Flux angle
Stator current
DCTm
mA
NSB
C
0001voltage source
Gain6Saturation
Saturation1
Saturation2
Data type conversion 1
Data type conversion 10
Data type conversion 11
Data type conversion 12
Gain7
Gain8
transformation
flux angleReal and estimated
Constant1
Constant2
Permanent magnetsynchronous machine
Convert
Convert
Convert
Convert
Convert
Convert
Convert0
ModelSim
ModelSim
ModelSim
cmd
Rotor speed
Current command
Speed loop PI controller
iq current command
cmd iq
cmd id
Flux angle
Phase a current
Phase b current
Phase c current
PMW1
PMW2
PMW3
PMW4
PMW5
PMW6
id out
iq out
CCCT and SVPWM
-K-
-K-
-K-
-K-
d-axis current
Motor dq current
Flux angle
wr
Full-order EKF
IGBT-based inverter
idq
ln1Conn1
ln2Conn2
ln3Conn3
ln4Conn4
ln5Conn5
ln6Conn6
+⟨Rotor speed wm (rads)⟩⟨Electromagnetic torque Te (Nlowastm)⟩⟨Rotor angle thetam (rad)⟩⟨Stator current is d (A)⟩⟨Stator current is q (A)⟩⟨Stator current is a (A)⟩⟨Stator current is b (A)⟩⟨Stator current is c (A)⟩
120572
i120572
120573
i120573
V120572 out
V120573 out
I120572 out
I120573 out
Figure 7 The SimulinkModelSim cosimulation architecture for sensorless speed control of PMSM drive
Step 8 Update the present covariance matrix 119875119899 from (18)where 119870119899119867119875119899|119899minus1 can be directly obtained as follows
Step 9 Calculate the rotor speed from (27) then set 119899 = 119899 +1 and go back to Step 2
3 Design of Sensorless Speed Controller IP
Figure 3 illustrates the internal architecture of the proposedFPGA implementation of a sensorless speed control IP forPMSM drive system The internal circuit comprises a NiosII embedded processor IP and an application IP The Nios IIprocessor is depicted to generate the speed command collectthe response data and communicate with external deviceAll programs in Nios II processor are coded in the Clanguage The application IP includes mainly a circuit of anEKF-based rotor FA and rotor speed estimation a speedPI controller a circuit for current controllers and coordinatetransformation (CCCT) a SVPWM circuit and an ADCinterface circuit The sampling frequencies of the speedcontrol loop and current control loop are designedwith 2 kHzand 16 kHz respectively The frequency divider generates50Mhz (Clk) and 125Mhz (Clk-step) clock to supply allcircuits in Figure 3 The internal circuit of CCCT performs
the function of two PI controllers table look-up for sincosfunction and the coordinate transformation for Clark Parkinverse Park and modified inverse Clarke The detailedcircuit design of CCCT speed PI controller ADC interfaceand SVPWM generation in Figure 3 refers to [8] Hereinonly the digital hardware circuit design of the EKF-basedrotor FA and rotor speed estimation is described To reducethe FPGA resource usage a finite-state machine (FSM) isemployed to model the EKF-based algorithm whose designprocedure andmathematical formulation are presented in theprevious sectionThedesign result is shown in Figure 4whichuses one adder one multiplier one divider two sincos look-up table shifters registers and so forth and manipulates 131steps machine to carry out the overall computationThe datatype adopts 16-bit lengthwithQ15 format and 2rsquos complementoperation The multiplier adder and divider apply AlteraLPM (Library ParameterizedModules) standard In Figure 4the steps 1199040 sim 11990412 execute the calculation of Jacobian matrixand predict temporary state variables 11990413 sim 11990468 perform thecomputation of temporary covariance matrix steps 11990469 sim11990470 are for state error calculation steps 11990471sim119904120 update of
10 Mathematical Problems in Engineering
0 01 02 03 04 05 06
0100200300
Spee
d (r
pm)
Speed command Actual
rotor speed
Estimated rotor speed
minus100minus200minus300
Time (s)
(a)
0 01 02 03 04 05 06
005
115
Curr
ent (
A)
minus05
minus1
iqid
Time (s)
(b)
0 01 02 03 04 05 06
0100200300400500
Flux
angl
e (FA
) (d
eg)
Actual rotor FA
Estimated rotor FAby EKF
minus100
Time (s)
(c)
Figure 8 PMSM running at low speed (200 rpm) and inverse speed (plusmn200 rpm) condition (a) Speed step response (b) current responseand (c) actual rotor FA and estimated rotor FA
0 005 01 015 02 025 03 035 04 045 05
0100020003000
Spee
d (r
pm)
Time (s)
Speed command
Estimated rotor speed
Actual rotor speed
minus1000
minus2000
minus3000
(a)
0 005 01 015 02 025 03 035 04 045 05
0
2
4Cu
rren
t (A
)
Time (s)
minus2
minus4
iq
id
(b)
0 005 01 015 02 025 03 035 04 045 05
0100200300400
Flux
angl
e (FA
) (de
g)
Time (s)
Actual rotor FA
Estimated rotor FA by EKF minus100
(c)
Figure 9 PMSM running at wide-range high speed (2000 rpm) and inverse speed (plusmn1000 rpm) condition (a) Speed step response (b) currentresponse AND (c) actual rotor FA and estimated rotor FA
the present covariance matrix 119875119899 and calculate the Kalmangain 119870119899 119904121sim 119904130 describe the present state tuning as wellas executing the computation of rotor FA and rotor speedAccording to (30) the computation of temporary covariancematrix 119875119899|119899minus1in Figure 4 is described in Figure 5 Furtheraccording to (18) (33)-(34) and (36) the update of thepresent covariancematrix119875119899 and calculation theKalman gain119870119899 in Figure 4 are illustrated in Figure 6 The operation ofeach step in Figure 4 is 80 ns (125MHz) in FPGA thereforea total of 131 steps need only 1048 120583s operation timesThe FPGA (Altera) resource usages of EKF-based rotor FAand rotor speed estimation in Figure 4 is 4158 LEs (logicelements) and 2890 RAM bits Additionally the FPGA
resource usages of the circuits of CCCT speed PI controllerADC interface and SVPWM in Figure 3 are 864 LEs and24576 RAM 2043 LEs and 0RAM bits 136 LEs and 0RAMbits and 1221 LEs and 0RAM bits respectively
The SimulinkModelSim cosimulation architecture for sen-sorless PMSM speed control system is shown in Figure 7The SimPowerSystem-Blockset in the Simulink executes thePMSM and the IGBT-based inverterThe EDA simulator linkfor ModelSim executes the cosimulation using VHDL code
Mathematical Problems in Engineering 11
LP filter circuit
Rectifier Inverter
Ac source
Isolated and driving circuits
ADC
ADC
PWM6PWM1
PMSM
Digital circuitof speed PI controller EKF-based rotor FA and speed estimation
and current vector controller for PMSM
FPGA-based sensorless speed control IP
Load
Externalmemory
(Nios II processor)
Embedded processor IP
Application IP
L
C
T+A
TminusA
T+B
TminusB
T+C
TminusC
U V W
ia
ib
CPU
On-chipROM
On-chipRAM
UART
PIO
Timer
SPI
SDRAMcontroller
Aval
on b
us
(a)
(b)
Figure 10 Experimental system (a) with block diagram and (b) in real system
running in ModelSim program It executes the function ofthe sensorless speed controller by three works The work-1to work-3 of ModelSim in Figure 7 respectively perform thefunction of speed loop PI controller the function of cur-rent controller and coordinate transformation (CCCT) andSVPWM and the function of EKF-based rotor FA and rotorspeed estimation The sampling frequency in current controlloop and EKF-based estimation algorithm is designed with16 kHz but in speed control loop is 2 kHz The clocks of50MHz and 125MHz will supply all works of ModelSimThe FPGA (Altera) resource usages of work-1 to work-3 are2043 LEs and 0 RAM bits 2085 LEs and 24576 RAM bitsand 4158 LEs and 2890 RAM bits respectively
In simulation the designed PMSM parameters used inFigure 7 are as follows pole pairs are 4 stator phase resis-tance is 13Ω stator inductance is 63mH inertia is 119869 =
0000108 kglowastm2 and friction factor is 119865 = 00013NlowastmlowastsPI gains in speed control loop are designed with119870119901 = 02442and 119870119894 = 000458 To evaluate the proposed controllerperformance PMSM running at low speed (200 rpm) andinverse speed (from 200 rpm to minus200 rpm or vice versa) con-dition is firstly considered and its simulation results regard-ing as the speed step response the current response as wellas the actual rotor flux angle (FA) and the estimated rotorflux angle are shown in Figure 8 It shows that the motorspeed gives a good dynamic response performance with a
12 Mathematical Problems in Engineering
0 02 04 06 08 1 12 14 16 18 2
0
500 Speed command
Rotor speed
200
Time (s)
Spee
d (r
pm)
minus500
minus200
(a)
0
100
200
300
400
0 02 04 06 08 1 12 14 16 18 2
Actual rotor FA Estimated rotor FA
Time (s)
Flux
angl
e (de
g)
(b)
Figure 11 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) actual rotor FA and estimated rotor FA
0200400600800
10001200 Speed
command
Actual rotor speed
Estimated rotor speed
0 05 1 15 2 25 3Time (s)
Spee
d (r
pm)
(a)
0 05 1 15 2 25 3Time (s)
Curr
ent (
A) iq
id
0
051
15
minus05
minus1
(b)
Figure 12 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) current response
little overshoot and 25ms rising time It also shows thatthe estimated rotor speed can track actual rotor speed wellFigure 8(b) shows a successful vector control because 119894119889 iscontrolled to zero Figure 8(c) shows that the estimated rotorFA can fast track the actual rotor FA even in the inverse speedcommand condition Further another simulation case whilethe PMSMrunning at wide-range high speed (from0 rpm rarr
minus2000 rpm) and inverse speed (from 1000 rpm tominus1000 rpm)condition is tested and its simulation results are shown inFigure 9 It presents that not only at speed tracking butalso at rotor FA tracking the estimated value adopted byEKF method can give a good follow to the real rotor valueHowever except in the initial condition the actual rotorspeed gives a fast step response by 18ms rising time near0mm steady-state value and maximum 175 overshoot
5 Experimental System and Results
After confirming the correctness of the proposed EKF-basedsensorless control IP by simulation the VHDL codes aredirectly applied to the experimental FPGA-based sensorlessPMSM drive system The block diagram and real experi-mental system are depicted in Figure 10 The main devicesinclude a PMSM a DE2 board with Altera CycloneII FPGAa motor driver and a power supplier The parameters of thePMSM are 119903119904 = 063Ω 119871 = 277mH and 4 pole pairs Theinput voltage continuous current rating torque rating speedand continuous power of the PMSM are 220V 12A 23N-m 3000 rpm and 750W respectively The Altera CycloneIIEP2C35 chip adopted in the design possesses 33216 LEsmaximum 475 available IO pins 483840 RAM and 35
embedded multipliers The chip can be embedded with aNios II multicore processor that is equipped with several32-bit CPU flexibility of core size 1 to 16Mbytes of flashmemory in the available memory chip 1 Mbyte SRAM 16Mbyte SDRAM and 4 Gbytes memory outside of the chip Inimplementation except the VHDL codes of CCCT EKF andPI controller the VHDL code of ADC interface circuit shouldbe added and integrated and then downloaded into FPGAThePI gains of speed control loop in experiment are designedwith 119870119901 = 0512 and119870119894 = 0021
In the experimental case PMSM running at low speed(200 rpm) and inverse speed (from 200 rpm to minus200 rpm orvice versa) condition are firstly considered and its experi-ment results regarding the speed step response as well as theactual rotor FA and the estimated rotor FA are shown inFigure 11 Figure 11(a) shows that the motor speed gives agood dynamic response performance with a little oscillationand overshoot and it has 15ms rising time Figure 11(b) showsthat the estimated FA can fast track the actual rotor FA evenin the inverse speed command condition Further anotherexperimental case while the PMSM running at mediumspeed (from 0 rpm rarr 300 rpm rarr 600 rpm rarr 900 rpm rarr
600 rpm rarr 900 rpm) condition is evaluated and its experi-ment results are shown in Figure 12The Figure 12(a) presentsa fast speed trackingwith 15ms rising time and no occurrenceof overshoot condition Figure 12(b) shows a successful vectorcontrol due to the 119894119889 being controlled to zeroTherefore fromthe simulation results in Figures 8 and 9 and the experimentalresults in Figures 11 and 12 it is demonstrated that the EKF-based estimation algorithm used in sensorless PMSM driveand the behavior description by usingVHDL are effective andcorrect
Mathematical Problems in Engineering 13
6 Conclusions
This study has presented a sensorless PMSM drive based onEKF and successfully demonstrated its performance throughcosimulation by using SimulinkModelSim and implemen-tation by using FPGA In realization aspect the VHDL isused to describe the behavior of EKF algorithm and FSM isused to reduce the FPGA resource usage therefore it onlyneeds 4158 LEs and 2890 RAMbits In computational poweraspect the operation time to complete the computation ofEKF algorithm is only 1048 120583s which is less than the 625120583s(16 KHz) sampling time in current control loop In simulatedand experimental results it shows that the use of EKF insensorless PMSM drive can accurately estimate the rotorFA and rotor speed and it can give a good step responseperformance in case of low speed control inverse speedcontrol and high speed control as well
Acknowledgment
This work was supported by the National Science Council ofChina under Grant no NSC 101-2221-E-218-039
References
[1] V C Ilioudis and N I Margaris ldquoPMSM sensorless speedestimation based on sliding mode observersrdquo in Proceedings ofthe 39th IEEE Annual Power Electronics Specialists Conference(PESC rsquo08) pp 2838ndash2843 June 2008
[2] S Chi Z Zhang and L Xu ldquoSliding-mode sensorless controlof direct-drive PM synchronous motors for washing machineapplicationsrdquo IEEE Transactions on Industry Applications vol45 no 2 pp 582ndash590 2009
[3] V Delli Colli R di Stefano and F Marignetti ldquoA system-on-chip sensorless control for a permanent-magnet synchronousmotorrdquo IEEE Transactions on Industrial Electronics vol 57 no11 pp 3822ndash3829 2010
[4] S Bolognani R Oboe andM Zigliotto ldquoSensorless full-digitalpmsm drive with ekf estimation of speed and rotor positionrdquoIEEE Transactions on Industrial Electronics vol 46 no 1 pp184ndash191 1999
[5] M C Huang A J Moses and F Anayi ldquoThe comparison ofsensorless estimation techniques for PMSM between extendedKalman filter and flux-linkage observerrdquo in Proceedings of the21st Annual IEEE Applied Power Electronics Conference andExposition (APEC rsquo06) pp 654ndash659 March 2006
[6] WWang M Zhang and Q Wu ldquoApplication of reduced-orderextended kalman filter in permanent magnet synchronousmotor sensorless regulating systemrdquo in Proceedings of the Inter-national Conference on Digital Manufacturing and Automation(ICDMA rsquo10) pp 271ndash274 December 2010
[7] J-S Jang B-G Park T-S Kim D M Lee and D-S HyunldquoParallel reduced-order extended Kalman Filter for PMSMsensorless drivesrdquo in Proceedings of the 34th Annual Conferenceof the IEEE Industrial Electronics Society (IECON rsquo08) pp 1326ndash1331 November 2008
[8] Y-S Kung and M-H Tsai ldquoFPGA-based speed control IC forPMSM drive with adaptive fuzzy controlrdquo IEEE Transactions onPower Electronics vol 22 no 6 pp 2476ndash2486 2007
[9] L Idkhajine and E Monmasson ldquoDesign methodology forcomplex FPGA-based controllersmdashapplication to an EKF sen-sorless AC driverdquo in Proceedings of the 19th International Con-ference on Electrical Machines (ICEM rsquo10) pp 1ndash6 September2010
[10] H-H Chou Y-S Kung N Vu Quynh and S Cheng ldquoOpti-mized FPGA design verification and implementation of aneuro-fuzzy controller for PMSM drivesrdquo Mathematics andComputers in Simulation vol 90 pp 28ndash44 2013
[11] Y S Kung and T H Nguyen ldquoSimulinkModelsim Co-simu-lation of EKF-based Sensorless PMSM drivesrdquo in Proceedingsof IEEE International on Power Electronics and Drive Systems(PEDS rsquo13) pp 709ndash713 2013
[12] Y Li J Huo X Li J Wen YWang and B Shan ldquoAn open-loopsinmicrostepping driver based on FPGA and the co-simulationof modelsim and simulinkrdquo in Proceedings of the InternationalConference on Computer Mechatronics Control and ElectronicEngineering (CMCE rsquo10) pp 223ndash227 August 2010
[13] The Mathworks ldquoMatlabSimulink Users Guide ApplicationProgram Interface Guiderdquo 2004
where [V120572 V120573]119879 is voltage on fixed coordinate [119894120572 119894120573]
119879 iscurrent on fixed coordinate 120579119890 is angular position at magnetflux and 119904 is differential operator If we choose the 119909(119905) =[119894120572 119894120573 120596119890 120579119890]
119879as the state variable of the PMSMmathematicalmodel then (21) can be expanded to the following formula-tion
119889
119889119905
[[[[[
[
119894120572
119894120573
120596119890
120579119890
]]]]]
]
=
[[[[[[[[[
[
minus119903119904119894120572
119871 119904
+
120596119890120582119891
119871 119904
sin 120579119890
minus
119903119904119894120573
119871 119904
minus
120596119890120582119891
119871 119904
cos 120579119890
0
120596119890
]]]]]]]]]
]
+
[[[[[[[[
[
1
119871 119904
0
01
119871 119904
0 0
0 0
]]]]]]]]
]
[
V120572
V120573]Δ= 119891 + 119861[
V120572
V120573]
(22)
[
119894120572
119894120573
] = [1 0 0 0
0 1 0 0]
[[[[[
[
119894120572
119894120573
120596119890
120579119890
]]]]]
]
Δ= ℎ (23)
4 Mathematical Problems in Engineering
Time update (prediction)
Calculate temporary state variables
Calculate temporary covariance matrix
Measurement update (innovation)
Calculate Kalman gain
Update state variables and covariance matrix
Initial
orxn|nminus1 = xnminus1 + (f[xnminus1] + B middot unminus1)Tc
sin 120579119890120596119890120582119891119879119888
119871 119904
cos 120579119890
0 1 minus119903119904119879119888
119871 119904
minus
120582119891119879119888
119871 119904
cos 120579119890120596119890120582119891119879119888
119871 119904
sin 120579119890
0 0 1 0
0 0 119879119888 1
]]]]]]]]]
]
Δ=
[[[
[
119866 0 12060113 12060114
0 119866 12060123 12060124
0 0 1 0
0 0 119879119888 1
]]]
]
(26)
As the results the EKF algorithm in (14)ndash(19) can be carriedout to estimate the state valueThe initial values of 119876119889119877 and1198750 need to be chosen Through the recursive calculation the
state value of 119909(119899) = [120572(119899) 120573(119899) 119890(119899) 120579119890(119899)]119879 is estimated
at each sampling period then the rotor speed can be derivedby
119903 (119899) =119890 (119899)
119873119875
(27)
Finally a summary for the estimation of rotor FA androtor speed based on EKF is presented as follows
Step 1 Set the initial values of 119876119889 119877 1198750 and 119899 = 1
Step 2 Measure the values of 119894120572(119899) 119894120573(119899) V120572(119899) and V120573(119899)from PMSM system
Step 3 Estimate the temporary state variables from (14) Inaddition refer to (22) and the scalar form of the predictionequation can be expressed as follows
120572 (119899 | 119899 minus 1) = (1 minus 119879119888
119903119904
119871 119904
) 120572 (119899 minus 1)
+
119890 (119899 minus 1) 119879119888120582119891 sin (120579119890 (119899 minus 1))119871 119904
+119879119888V120572 (119899 minus 1)
119871 119904
120573 (119899 | 119899 minus 1) = (1 minus 119879119904
119903119904
119871 119904
) 120573 (119899 minus 1)
minus
119890 (119899 minus 1) 119879119904120582119891 cos (120579119890 (119899 minus 1))119871 119904
+
119879119888V120573 (119899 minus 1)
119871 119904
119890 (119899119899 minus 1) = 119890 (119899 minus 1)
120579119890 (119899119899 minus 1) = 120579119890 (119899 minus 1) + 119890 (119899 minus 1) 119879119888
(28)
Step 4 Calculate the Φ119899minus1 from (26)
Mathematical Problems in Engineering 5
Clk
STSB
RCBRCA
STSA
CHBCHA
SVPWMgeneration
ADC interface
Frequency
Application IP
dividerCK
PWM 1PWM 2PWM 3PWM 4PWM 5PWM 6
ADIN[11]
ADIN[0]BDIN[11]
BDIN[0]
CPU
On-chipROM
On-chipRAM
UART
PIO
Timer
SPI
Aval
on b
us
Aval
on b
us
FPGA-based sensorless speed control IP
D[31]
D[0]
A[22]
A[0]
Current controllers and coordinate transformation
(CCCT)
Clk
Clk
Clk
Speed controller
(PI controller)
Clk
Clk-step
Clk-step
Clk-step
Clk-step
Clk-step
Rotor flux and rotor speed estimation
based on EKF
Clk
Nios II embedded processor IP
Sram be[3]Sram be[2]Sram be[1]Sram be[0]
Sram oeSram weSram cs
120596lowastr [150]
120596lowastr [150]
r [150]ilowastq [110]
e[110]
120572[110]
120573[110]
i120572[110]
i120573[110]
ia[110]
ib[110]
ic[110]
[110]
[110]
[110]
rx
ry
rz
Figure 3 Internal architecture of a sensorless speed control IP in FPGA
Step 5 Obtain the temporary covariance matrix 119875119899|119899minus1 from(16) Because matrix 119875119899|119899minus1 is symmetric matrix by 119901119894119895 = 119901119895119894it can be chosen by the following form
119875119899|119899minus1 =
[[[
[
11990111 11990112 11990113 11990114
11990121 11990122 11990123 11990124
11990131 11990132 11990133 11990134
11990141 11990142 11990143 11990144
]]]
]
(29)
Hence from (16) individual elements of 119875119899|119899minus1 could beupdated as follows
Figure 4 State diagram of FSM for describing the EKF-based algorithm
where 119877 represents the uncertainties of measurement vari-ablewhich are very difficult to knowHence119877 is often chosenas unity matrix for simplifying the task but does not affect theoutcome (31) Since 11987512 = 11987521 (31) can be rewritten in thefollowing form
1199011111990122 + 11990111 + 11990122 minus 1199012
12+ 1
[11990122 + 1 minus11990112
minus11990112 11990111 + 1]
(32)To normalize the input value and to prevent the numericaloverflow condition which occurred during computation (32)is normalized and those values are all divided by 4Therefore(32) becomes
where 119896119894119895 is the element in Kalman gain 119870119899 sdot 120572(119899) = 119894120572(119899) minus120572(119899 | 119899 minus 1) and 120573(119899) = 119894120573(119899) minus 120573(119899 | 119899 minus 1)
Mathematical Problems in Engineering 9
(work-3)
(work-2)
(work-1)
Speedcommand
Speed commandRotor speed and Kalman speed
Gain1
Torque
S-function
Flux angle
Stator current
DCTm
mA
NSB
C
0001voltage source
Gain6Saturation
Saturation1
Saturation2
Data type conversion 1
Data type conversion 10
Data type conversion 11
Data type conversion 12
Gain7
Gain8
transformation
flux angleReal and estimated
Constant1
Constant2
Permanent magnetsynchronous machine
Convert
Convert
Convert
Convert
Convert
Convert
Convert0
ModelSim
ModelSim
ModelSim
cmd
Rotor speed
Current command
Speed loop PI controller
iq current command
cmd iq
cmd id
Flux angle
Phase a current
Phase b current
Phase c current
PMW1
PMW2
PMW3
PMW4
PMW5
PMW6
id out
iq out
CCCT and SVPWM
-K-
-K-
-K-
-K-
d-axis current
Motor dq current
Flux angle
wr
Full-order EKF
IGBT-based inverter
idq
ln1Conn1
ln2Conn2
ln3Conn3
ln4Conn4
ln5Conn5
ln6Conn6
+⟨Rotor speed wm (rads)⟩⟨Electromagnetic torque Te (Nlowastm)⟩⟨Rotor angle thetam (rad)⟩⟨Stator current is d (A)⟩⟨Stator current is q (A)⟩⟨Stator current is a (A)⟩⟨Stator current is b (A)⟩⟨Stator current is c (A)⟩
120572
i120572
120573
i120573
V120572 out
V120573 out
I120572 out
I120573 out
Figure 7 The SimulinkModelSim cosimulation architecture for sensorless speed control of PMSM drive
Step 8 Update the present covariance matrix 119875119899 from (18)where 119870119899119867119875119899|119899minus1 can be directly obtained as follows
Step 9 Calculate the rotor speed from (27) then set 119899 = 119899 +1 and go back to Step 2
3 Design of Sensorless Speed Controller IP
Figure 3 illustrates the internal architecture of the proposedFPGA implementation of a sensorless speed control IP forPMSM drive system The internal circuit comprises a NiosII embedded processor IP and an application IP The Nios IIprocessor is depicted to generate the speed command collectthe response data and communicate with external deviceAll programs in Nios II processor are coded in the Clanguage The application IP includes mainly a circuit of anEKF-based rotor FA and rotor speed estimation a speedPI controller a circuit for current controllers and coordinatetransformation (CCCT) a SVPWM circuit and an ADCinterface circuit The sampling frequencies of the speedcontrol loop and current control loop are designedwith 2 kHzand 16 kHz respectively The frequency divider generates50Mhz (Clk) and 125Mhz (Clk-step) clock to supply allcircuits in Figure 3 The internal circuit of CCCT performs
the function of two PI controllers table look-up for sincosfunction and the coordinate transformation for Clark Parkinverse Park and modified inverse Clarke The detailedcircuit design of CCCT speed PI controller ADC interfaceand SVPWM generation in Figure 3 refers to [8] Hereinonly the digital hardware circuit design of the EKF-basedrotor FA and rotor speed estimation is described To reducethe FPGA resource usage a finite-state machine (FSM) isemployed to model the EKF-based algorithm whose designprocedure andmathematical formulation are presented in theprevious sectionThedesign result is shown in Figure 4whichuses one adder one multiplier one divider two sincos look-up table shifters registers and so forth and manipulates 131steps machine to carry out the overall computationThe datatype adopts 16-bit lengthwithQ15 format and 2rsquos complementoperation The multiplier adder and divider apply AlteraLPM (Library ParameterizedModules) standard In Figure 4the steps 1199040 sim 11990412 execute the calculation of Jacobian matrixand predict temporary state variables 11990413 sim 11990468 perform thecomputation of temporary covariance matrix steps 11990469 sim11990470 are for state error calculation steps 11990471sim119904120 update of
10 Mathematical Problems in Engineering
0 01 02 03 04 05 06
0100200300
Spee
d (r
pm)
Speed command Actual
rotor speed
Estimated rotor speed
minus100minus200minus300
Time (s)
(a)
0 01 02 03 04 05 06
005
115
Curr
ent (
A)
minus05
minus1
iqid
Time (s)
(b)
0 01 02 03 04 05 06
0100200300400500
Flux
angl
e (FA
) (d
eg)
Actual rotor FA
Estimated rotor FAby EKF
minus100
Time (s)
(c)
Figure 8 PMSM running at low speed (200 rpm) and inverse speed (plusmn200 rpm) condition (a) Speed step response (b) current responseand (c) actual rotor FA and estimated rotor FA
0 005 01 015 02 025 03 035 04 045 05
0100020003000
Spee
d (r
pm)
Time (s)
Speed command
Estimated rotor speed
Actual rotor speed
minus1000
minus2000
minus3000
(a)
0 005 01 015 02 025 03 035 04 045 05
0
2
4Cu
rren
t (A
)
Time (s)
minus2
minus4
iq
id
(b)
0 005 01 015 02 025 03 035 04 045 05
0100200300400
Flux
angl
e (FA
) (de
g)
Time (s)
Actual rotor FA
Estimated rotor FA by EKF minus100
(c)
Figure 9 PMSM running at wide-range high speed (2000 rpm) and inverse speed (plusmn1000 rpm) condition (a) Speed step response (b) currentresponse AND (c) actual rotor FA and estimated rotor FA
the present covariance matrix 119875119899 and calculate the Kalmangain 119870119899 119904121sim 119904130 describe the present state tuning as wellas executing the computation of rotor FA and rotor speedAccording to (30) the computation of temporary covariancematrix 119875119899|119899minus1in Figure 4 is described in Figure 5 Furtheraccording to (18) (33)-(34) and (36) the update of thepresent covariancematrix119875119899 and calculation theKalman gain119870119899 in Figure 4 are illustrated in Figure 6 The operation ofeach step in Figure 4 is 80 ns (125MHz) in FPGA thereforea total of 131 steps need only 1048 120583s operation timesThe FPGA (Altera) resource usages of EKF-based rotor FAand rotor speed estimation in Figure 4 is 4158 LEs (logicelements) and 2890 RAM bits Additionally the FPGA
resource usages of the circuits of CCCT speed PI controllerADC interface and SVPWM in Figure 3 are 864 LEs and24576 RAM 2043 LEs and 0RAM bits 136 LEs and 0RAMbits and 1221 LEs and 0RAM bits respectively
The SimulinkModelSim cosimulation architecture for sen-sorless PMSM speed control system is shown in Figure 7The SimPowerSystem-Blockset in the Simulink executes thePMSM and the IGBT-based inverterThe EDA simulator linkfor ModelSim executes the cosimulation using VHDL code
Mathematical Problems in Engineering 11
LP filter circuit
Rectifier Inverter
Ac source
Isolated and driving circuits
ADC
ADC
PWM6PWM1
PMSM
Digital circuitof speed PI controller EKF-based rotor FA and speed estimation
and current vector controller for PMSM
FPGA-based sensorless speed control IP
Load
Externalmemory
(Nios II processor)
Embedded processor IP
Application IP
L
C
T+A
TminusA
T+B
TminusB
T+C
TminusC
U V W
ia
ib
CPU
On-chipROM
On-chipRAM
UART
PIO
Timer
SPI
SDRAMcontroller
Aval
on b
us
(a)
(b)
Figure 10 Experimental system (a) with block diagram and (b) in real system
running in ModelSim program It executes the function ofthe sensorless speed controller by three works The work-1to work-3 of ModelSim in Figure 7 respectively perform thefunction of speed loop PI controller the function of cur-rent controller and coordinate transformation (CCCT) andSVPWM and the function of EKF-based rotor FA and rotorspeed estimation The sampling frequency in current controlloop and EKF-based estimation algorithm is designed with16 kHz but in speed control loop is 2 kHz The clocks of50MHz and 125MHz will supply all works of ModelSimThe FPGA (Altera) resource usages of work-1 to work-3 are2043 LEs and 0 RAM bits 2085 LEs and 24576 RAM bitsand 4158 LEs and 2890 RAM bits respectively
In simulation the designed PMSM parameters used inFigure 7 are as follows pole pairs are 4 stator phase resis-tance is 13Ω stator inductance is 63mH inertia is 119869 =
0000108 kglowastm2 and friction factor is 119865 = 00013NlowastmlowastsPI gains in speed control loop are designed with119870119901 = 02442and 119870119894 = 000458 To evaluate the proposed controllerperformance PMSM running at low speed (200 rpm) andinverse speed (from 200 rpm to minus200 rpm or vice versa) con-dition is firstly considered and its simulation results regard-ing as the speed step response the current response as wellas the actual rotor flux angle (FA) and the estimated rotorflux angle are shown in Figure 8 It shows that the motorspeed gives a good dynamic response performance with a
12 Mathematical Problems in Engineering
0 02 04 06 08 1 12 14 16 18 2
0
500 Speed command
Rotor speed
200
Time (s)
Spee
d (r
pm)
minus500
minus200
(a)
0
100
200
300
400
0 02 04 06 08 1 12 14 16 18 2
Actual rotor FA Estimated rotor FA
Time (s)
Flux
angl
e (de
g)
(b)
Figure 11 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) actual rotor FA and estimated rotor FA
0200400600800
10001200 Speed
command
Actual rotor speed
Estimated rotor speed
0 05 1 15 2 25 3Time (s)
Spee
d (r
pm)
(a)
0 05 1 15 2 25 3Time (s)
Curr
ent (
A) iq
id
0
051
15
minus05
minus1
(b)
Figure 12 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) current response
little overshoot and 25ms rising time It also shows thatthe estimated rotor speed can track actual rotor speed wellFigure 8(b) shows a successful vector control because 119894119889 iscontrolled to zero Figure 8(c) shows that the estimated rotorFA can fast track the actual rotor FA even in the inverse speedcommand condition Further another simulation case whilethe PMSMrunning at wide-range high speed (from0 rpm rarr
minus2000 rpm) and inverse speed (from 1000 rpm tominus1000 rpm)condition is tested and its simulation results are shown inFigure 9 It presents that not only at speed tracking butalso at rotor FA tracking the estimated value adopted byEKF method can give a good follow to the real rotor valueHowever except in the initial condition the actual rotorspeed gives a fast step response by 18ms rising time near0mm steady-state value and maximum 175 overshoot
5 Experimental System and Results
After confirming the correctness of the proposed EKF-basedsensorless control IP by simulation the VHDL codes aredirectly applied to the experimental FPGA-based sensorlessPMSM drive system The block diagram and real experi-mental system are depicted in Figure 10 The main devicesinclude a PMSM a DE2 board with Altera CycloneII FPGAa motor driver and a power supplier The parameters of thePMSM are 119903119904 = 063Ω 119871 = 277mH and 4 pole pairs Theinput voltage continuous current rating torque rating speedand continuous power of the PMSM are 220V 12A 23N-m 3000 rpm and 750W respectively The Altera CycloneIIEP2C35 chip adopted in the design possesses 33216 LEsmaximum 475 available IO pins 483840 RAM and 35
embedded multipliers The chip can be embedded with aNios II multicore processor that is equipped with several32-bit CPU flexibility of core size 1 to 16Mbytes of flashmemory in the available memory chip 1 Mbyte SRAM 16Mbyte SDRAM and 4 Gbytes memory outside of the chip Inimplementation except the VHDL codes of CCCT EKF andPI controller the VHDL code of ADC interface circuit shouldbe added and integrated and then downloaded into FPGAThePI gains of speed control loop in experiment are designedwith 119870119901 = 0512 and119870119894 = 0021
In the experimental case PMSM running at low speed(200 rpm) and inverse speed (from 200 rpm to minus200 rpm orvice versa) condition are firstly considered and its experi-ment results regarding the speed step response as well as theactual rotor FA and the estimated rotor FA are shown inFigure 11 Figure 11(a) shows that the motor speed gives agood dynamic response performance with a little oscillationand overshoot and it has 15ms rising time Figure 11(b) showsthat the estimated FA can fast track the actual rotor FA evenin the inverse speed command condition Further anotherexperimental case while the PMSM running at mediumspeed (from 0 rpm rarr 300 rpm rarr 600 rpm rarr 900 rpm rarr
600 rpm rarr 900 rpm) condition is evaluated and its experi-ment results are shown in Figure 12The Figure 12(a) presentsa fast speed trackingwith 15ms rising time and no occurrenceof overshoot condition Figure 12(b) shows a successful vectorcontrol due to the 119894119889 being controlled to zeroTherefore fromthe simulation results in Figures 8 and 9 and the experimentalresults in Figures 11 and 12 it is demonstrated that the EKF-based estimation algorithm used in sensorless PMSM driveand the behavior description by usingVHDL are effective andcorrect
Mathematical Problems in Engineering 13
6 Conclusions
This study has presented a sensorless PMSM drive based onEKF and successfully demonstrated its performance throughcosimulation by using SimulinkModelSim and implemen-tation by using FPGA In realization aspect the VHDL isused to describe the behavior of EKF algorithm and FSM isused to reduce the FPGA resource usage therefore it onlyneeds 4158 LEs and 2890 RAMbits In computational poweraspect the operation time to complete the computation ofEKF algorithm is only 1048 120583s which is less than the 625120583s(16 KHz) sampling time in current control loop In simulatedand experimental results it shows that the use of EKF insensorless PMSM drive can accurately estimate the rotorFA and rotor speed and it can give a good step responseperformance in case of low speed control inverse speedcontrol and high speed control as well
Acknowledgment
This work was supported by the National Science Council ofChina under Grant no NSC 101-2221-E-218-039
References
[1] V C Ilioudis and N I Margaris ldquoPMSM sensorless speedestimation based on sliding mode observersrdquo in Proceedings ofthe 39th IEEE Annual Power Electronics Specialists Conference(PESC rsquo08) pp 2838ndash2843 June 2008
[2] S Chi Z Zhang and L Xu ldquoSliding-mode sensorless controlof direct-drive PM synchronous motors for washing machineapplicationsrdquo IEEE Transactions on Industry Applications vol45 no 2 pp 582ndash590 2009
[3] V Delli Colli R di Stefano and F Marignetti ldquoA system-on-chip sensorless control for a permanent-magnet synchronousmotorrdquo IEEE Transactions on Industrial Electronics vol 57 no11 pp 3822ndash3829 2010
[4] S Bolognani R Oboe andM Zigliotto ldquoSensorless full-digitalpmsm drive with ekf estimation of speed and rotor positionrdquoIEEE Transactions on Industrial Electronics vol 46 no 1 pp184ndash191 1999
[5] M C Huang A J Moses and F Anayi ldquoThe comparison ofsensorless estimation techniques for PMSM between extendedKalman filter and flux-linkage observerrdquo in Proceedings of the21st Annual IEEE Applied Power Electronics Conference andExposition (APEC rsquo06) pp 654ndash659 March 2006
[6] WWang M Zhang and Q Wu ldquoApplication of reduced-orderextended kalman filter in permanent magnet synchronousmotor sensorless regulating systemrdquo in Proceedings of the Inter-national Conference on Digital Manufacturing and Automation(ICDMA rsquo10) pp 271ndash274 December 2010
[7] J-S Jang B-G Park T-S Kim D M Lee and D-S HyunldquoParallel reduced-order extended Kalman Filter for PMSMsensorless drivesrdquo in Proceedings of the 34th Annual Conferenceof the IEEE Industrial Electronics Society (IECON rsquo08) pp 1326ndash1331 November 2008
[8] Y-S Kung and M-H Tsai ldquoFPGA-based speed control IC forPMSM drive with adaptive fuzzy controlrdquo IEEE Transactions onPower Electronics vol 22 no 6 pp 2476ndash2486 2007
[9] L Idkhajine and E Monmasson ldquoDesign methodology forcomplex FPGA-based controllersmdashapplication to an EKF sen-sorless AC driverdquo in Proceedings of the 19th International Con-ference on Electrical Machines (ICEM rsquo10) pp 1ndash6 September2010
[10] H-H Chou Y-S Kung N Vu Quynh and S Cheng ldquoOpti-mized FPGA design verification and implementation of aneuro-fuzzy controller for PMSM drivesrdquo Mathematics andComputers in Simulation vol 90 pp 28ndash44 2013
[11] Y S Kung and T H Nguyen ldquoSimulinkModelsim Co-simu-lation of EKF-based Sensorless PMSM drivesrdquo in Proceedingsof IEEE International on Power Electronics and Drive Systems(PEDS rsquo13) pp 709ndash713 2013
[12] Y Li J Huo X Li J Wen YWang and B Shan ldquoAn open-loopsinmicrostepping driver based on FPGA and the co-simulationof modelsim and simulinkrdquo in Proceedings of the InternationalConference on Computer Mechatronics Control and ElectronicEngineering (CMCE rsquo10) pp 223ndash227 August 2010
[13] The Mathworks ldquoMatlabSimulink Users Guide ApplicationProgram Interface Guiderdquo 2004
sin 120579119890120596119890120582119891119879119888
119871 119904
cos 120579119890
0 1 minus119903119904119879119888
119871 119904
minus
120582119891119879119888
119871 119904
cos 120579119890120596119890120582119891119879119888
119871 119904
sin 120579119890
0 0 1 0
0 0 119879119888 1
]]]]]]]]]
]
Δ=
[[[
[
119866 0 12060113 12060114
0 119866 12060123 12060124
0 0 1 0
0 0 119879119888 1
]]]
]
(26)
As the results the EKF algorithm in (14)ndash(19) can be carriedout to estimate the state valueThe initial values of 119876119889119877 and1198750 need to be chosen Through the recursive calculation the
state value of 119909(119899) = [120572(119899) 120573(119899) 119890(119899) 120579119890(119899)]119879 is estimated
at each sampling period then the rotor speed can be derivedby
119903 (119899) =119890 (119899)
119873119875
(27)
Finally a summary for the estimation of rotor FA androtor speed based on EKF is presented as follows
Step 1 Set the initial values of 119876119889 119877 1198750 and 119899 = 1
Step 2 Measure the values of 119894120572(119899) 119894120573(119899) V120572(119899) and V120573(119899)from PMSM system
Step 3 Estimate the temporary state variables from (14) Inaddition refer to (22) and the scalar form of the predictionequation can be expressed as follows
120572 (119899 | 119899 minus 1) = (1 minus 119879119888
119903119904
119871 119904
) 120572 (119899 minus 1)
+
119890 (119899 minus 1) 119879119888120582119891 sin (120579119890 (119899 minus 1))119871 119904
+119879119888V120572 (119899 minus 1)
119871 119904
120573 (119899 | 119899 minus 1) = (1 minus 119879119904
119903119904
119871 119904
) 120573 (119899 minus 1)
minus
119890 (119899 minus 1) 119879119904120582119891 cos (120579119890 (119899 minus 1))119871 119904
+
119879119888V120573 (119899 minus 1)
119871 119904
119890 (119899119899 minus 1) = 119890 (119899 minus 1)
120579119890 (119899119899 minus 1) = 120579119890 (119899 minus 1) + 119890 (119899 minus 1) 119879119888
(28)
Step 4 Calculate the Φ119899minus1 from (26)
Mathematical Problems in Engineering 5
Clk
STSB
RCBRCA
STSA
CHBCHA
SVPWMgeneration
ADC interface
Frequency
Application IP
dividerCK
PWM 1PWM 2PWM 3PWM 4PWM 5PWM 6
ADIN[11]
ADIN[0]BDIN[11]
BDIN[0]
CPU
On-chipROM
On-chipRAM
UART
PIO
Timer
SPI
Aval
on b
us
Aval
on b
us
FPGA-based sensorless speed control IP
D[31]
D[0]
A[22]
A[0]
Current controllers and coordinate transformation
(CCCT)
Clk
Clk
Clk
Speed controller
(PI controller)
Clk
Clk-step
Clk-step
Clk-step
Clk-step
Clk-step
Rotor flux and rotor speed estimation
based on EKF
Clk
Nios II embedded processor IP
Sram be[3]Sram be[2]Sram be[1]Sram be[0]
Sram oeSram weSram cs
120596lowastr [150]
120596lowastr [150]
r [150]ilowastq [110]
e[110]
120572[110]
120573[110]
i120572[110]
i120573[110]
ia[110]
ib[110]
ic[110]
[110]
[110]
[110]
rx
ry
rz
Figure 3 Internal architecture of a sensorless speed control IP in FPGA
Step 5 Obtain the temporary covariance matrix 119875119899|119899minus1 from(16) Because matrix 119875119899|119899minus1 is symmetric matrix by 119901119894119895 = 119901119895119894it can be chosen by the following form
119875119899|119899minus1 =
[[[
[
11990111 11990112 11990113 11990114
11990121 11990122 11990123 11990124
11990131 11990132 11990133 11990134
11990141 11990142 11990143 11990144
]]]
]
(29)
Hence from (16) individual elements of 119875119899|119899minus1 could beupdated as follows
Figure 4 State diagram of FSM for describing the EKF-based algorithm
where 119877 represents the uncertainties of measurement vari-ablewhich are very difficult to knowHence119877 is often chosenas unity matrix for simplifying the task but does not affect theoutcome (31) Since 11987512 = 11987521 (31) can be rewritten in thefollowing form
1199011111990122 + 11990111 + 11990122 minus 1199012
12+ 1
[11990122 + 1 minus11990112
minus11990112 11990111 + 1]
(32)To normalize the input value and to prevent the numericaloverflow condition which occurred during computation (32)is normalized and those values are all divided by 4Therefore(32) becomes
where 119896119894119895 is the element in Kalman gain 119870119899 sdot 120572(119899) = 119894120572(119899) minus120572(119899 | 119899 minus 1) and 120573(119899) = 119894120573(119899) minus 120573(119899 | 119899 minus 1)
Mathematical Problems in Engineering 9
(work-3)
(work-2)
(work-1)
Speedcommand
Speed commandRotor speed and Kalman speed
Gain1
Torque
S-function
Flux angle
Stator current
DCTm
mA
NSB
C
0001voltage source
Gain6Saturation
Saturation1
Saturation2
Data type conversion 1
Data type conversion 10
Data type conversion 11
Data type conversion 12
Gain7
Gain8
transformation
flux angleReal and estimated
Constant1
Constant2
Permanent magnetsynchronous machine
Convert
Convert
Convert
Convert
Convert
Convert
Convert0
ModelSim
ModelSim
ModelSim
cmd
Rotor speed
Current command
Speed loop PI controller
iq current command
cmd iq
cmd id
Flux angle
Phase a current
Phase b current
Phase c current
PMW1
PMW2
PMW3
PMW4
PMW5
PMW6
id out
iq out
CCCT and SVPWM
-K-
-K-
-K-
-K-
d-axis current
Motor dq current
Flux angle
wr
Full-order EKF
IGBT-based inverter
idq
ln1Conn1
ln2Conn2
ln3Conn3
ln4Conn4
ln5Conn5
ln6Conn6
+⟨Rotor speed wm (rads)⟩⟨Electromagnetic torque Te (Nlowastm)⟩⟨Rotor angle thetam (rad)⟩⟨Stator current is d (A)⟩⟨Stator current is q (A)⟩⟨Stator current is a (A)⟩⟨Stator current is b (A)⟩⟨Stator current is c (A)⟩
120572
i120572
120573
i120573
V120572 out
V120573 out
I120572 out
I120573 out
Figure 7 The SimulinkModelSim cosimulation architecture for sensorless speed control of PMSM drive
Step 8 Update the present covariance matrix 119875119899 from (18)where 119870119899119867119875119899|119899minus1 can be directly obtained as follows
Step 9 Calculate the rotor speed from (27) then set 119899 = 119899 +1 and go back to Step 2
3 Design of Sensorless Speed Controller IP
Figure 3 illustrates the internal architecture of the proposedFPGA implementation of a sensorless speed control IP forPMSM drive system The internal circuit comprises a NiosII embedded processor IP and an application IP The Nios IIprocessor is depicted to generate the speed command collectthe response data and communicate with external deviceAll programs in Nios II processor are coded in the Clanguage The application IP includes mainly a circuit of anEKF-based rotor FA and rotor speed estimation a speedPI controller a circuit for current controllers and coordinatetransformation (CCCT) a SVPWM circuit and an ADCinterface circuit The sampling frequencies of the speedcontrol loop and current control loop are designedwith 2 kHzand 16 kHz respectively The frequency divider generates50Mhz (Clk) and 125Mhz (Clk-step) clock to supply allcircuits in Figure 3 The internal circuit of CCCT performs
the function of two PI controllers table look-up for sincosfunction and the coordinate transformation for Clark Parkinverse Park and modified inverse Clarke The detailedcircuit design of CCCT speed PI controller ADC interfaceand SVPWM generation in Figure 3 refers to [8] Hereinonly the digital hardware circuit design of the EKF-basedrotor FA and rotor speed estimation is described To reducethe FPGA resource usage a finite-state machine (FSM) isemployed to model the EKF-based algorithm whose designprocedure andmathematical formulation are presented in theprevious sectionThedesign result is shown in Figure 4whichuses one adder one multiplier one divider two sincos look-up table shifters registers and so forth and manipulates 131steps machine to carry out the overall computationThe datatype adopts 16-bit lengthwithQ15 format and 2rsquos complementoperation The multiplier adder and divider apply AlteraLPM (Library ParameterizedModules) standard In Figure 4the steps 1199040 sim 11990412 execute the calculation of Jacobian matrixand predict temporary state variables 11990413 sim 11990468 perform thecomputation of temporary covariance matrix steps 11990469 sim11990470 are for state error calculation steps 11990471sim119904120 update of
10 Mathematical Problems in Engineering
0 01 02 03 04 05 06
0100200300
Spee
d (r
pm)
Speed command Actual
rotor speed
Estimated rotor speed
minus100minus200minus300
Time (s)
(a)
0 01 02 03 04 05 06
005
115
Curr
ent (
A)
minus05
minus1
iqid
Time (s)
(b)
0 01 02 03 04 05 06
0100200300400500
Flux
angl
e (FA
) (d
eg)
Actual rotor FA
Estimated rotor FAby EKF
minus100
Time (s)
(c)
Figure 8 PMSM running at low speed (200 rpm) and inverse speed (plusmn200 rpm) condition (a) Speed step response (b) current responseand (c) actual rotor FA and estimated rotor FA
0 005 01 015 02 025 03 035 04 045 05
0100020003000
Spee
d (r
pm)
Time (s)
Speed command
Estimated rotor speed
Actual rotor speed
minus1000
minus2000
minus3000
(a)
0 005 01 015 02 025 03 035 04 045 05
0
2
4Cu
rren
t (A
)
Time (s)
minus2
minus4
iq
id
(b)
0 005 01 015 02 025 03 035 04 045 05
0100200300400
Flux
angl
e (FA
) (de
g)
Time (s)
Actual rotor FA
Estimated rotor FA by EKF minus100
(c)
Figure 9 PMSM running at wide-range high speed (2000 rpm) and inverse speed (plusmn1000 rpm) condition (a) Speed step response (b) currentresponse AND (c) actual rotor FA and estimated rotor FA
the present covariance matrix 119875119899 and calculate the Kalmangain 119870119899 119904121sim 119904130 describe the present state tuning as wellas executing the computation of rotor FA and rotor speedAccording to (30) the computation of temporary covariancematrix 119875119899|119899minus1in Figure 4 is described in Figure 5 Furtheraccording to (18) (33)-(34) and (36) the update of thepresent covariancematrix119875119899 and calculation theKalman gain119870119899 in Figure 4 are illustrated in Figure 6 The operation ofeach step in Figure 4 is 80 ns (125MHz) in FPGA thereforea total of 131 steps need only 1048 120583s operation timesThe FPGA (Altera) resource usages of EKF-based rotor FAand rotor speed estimation in Figure 4 is 4158 LEs (logicelements) and 2890 RAM bits Additionally the FPGA
resource usages of the circuits of CCCT speed PI controllerADC interface and SVPWM in Figure 3 are 864 LEs and24576 RAM 2043 LEs and 0RAM bits 136 LEs and 0RAMbits and 1221 LEs and 0RAM bits respectively
The SimulinkModelSim cosimulation architecture for sen-sorless PMSM speed control system is shown in Figure 7The SimPowerSystem-Blockset in the Simulink executes thePMSM and the IGBT-based inverterThe EDA simulator linkfor ModelSim executes the cosimulation using VHDL code
Mathematical Problems in Engineering 11
LP filter circuit
Rectifier Inverter
Ac source
Isolated and driving circuits
ADC
ADC
PWM6PWM1
PMSM
Digital circuitof speed PI controller EKF-based rotor FA and speed estimation
and current vector controller for PMSM
FPGA-based sensorless speed control IP
Load
Externalmemory
(Nios II processor)
Embedded processor IP
Application IP
L
C
T+A
TminusA
T+B
TminusB
T+C
TminusC
U V W
ia
ib
CPU
On-chipROM
On-chipRAM
UART
PIO
Timer
SPI
SDRAMcontroller
Aval
on b
us
(a)
(b)
Figure 10 Experimental system (a) with block diagram and (b) in real system
running in ModelSim program It executes the function ofthe sensorless speed controller by three works The work-1to work-3 of ModelSim in Figure 7 respectively perform thefunction of speed loop PI controller the function of cur-rent controller and coordinate transformation (CCCT) andSVPWM and the function of EKF-based rotor FA and rotorspeed estimation The sampling frequency in current controlloop and EKF-based estimation algorithm is designed with16 kHz but in speed control loop is 2 kHz The clocks of50MHz and 125MHz will supply all works of ModelSimThe FPGA (Altera) resource usages of work-1 to work-3 are2043 LEs and 0 RAM bits 2085 LEs and 24576 RAM bitsand 4158 LEs and 2890 RAM bits respectively
In simulation the designed PMSM parameters used inFigure 7 are as follows pole pairs are 4 stator phase resis-tance is 13Ω stator inductance is 63mH inertia is 119869 =
0000108 kglowastm2 and friction factor is 119865 = 00013NlowastmlowastsPI gains in speed control loop are designed with119870119901 = 02442and 119870119894 = 000458 To evaluate the proposed controllerperformance PMSM running at low speed (200 rpm) andinverse speed (from 200 rpm to minus200 rpm or vice versa) con-dition is firstly considered and its simulation results regard-ing as the speed step response the current response as wellas the actual rotor flux angle (FA) and the estimated rotorflux angle are shown in Figure 8 It shows that the motorspeed gives a good dynamic response performance with a
12 Mathematical Problems in Engineering
0 02 04 06 08 1 12 14 16 18 2
0
500 Speed command
Rotor speed
200
Time (s)
Spee
d (r
pm)
minus500
minus200
(a)
0
100
200
300
400
0 02 04 06 08 1 12 14 16 18 2
Actual rotor FA Estimated rotor FA
Time (s)
Flux
angl
e (de
g)
(b)
Figure 11 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) actual rotor FA and estimated rotor FA
0200400600800
10001200 Speed
command
Actual rotor speed
Estimated rotor speed
0 05 1 15 2 25 3Time (s)
Spee
d (r
pm)
(a)
0 05 1 15 2 25 3Time (s)
Curr
ent (
A) iq
id
0
051
15
minus05
minus1
(b)
Figure 12 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) current response
little overshoot and 25ms rising time It also shows thatthe estimated rotor speed can track actual rotor speed wellFigure 8(b) shows a successful vector control because 119894119889 iscontrolled to zero Figure 8(c) shows that the estimated rotorFA can fast track the actual rotor FA even in the inverse speedcommand condition Further another simulation case whilethe PMSMrunning at wide-range high speed (from0 rpm rarr
minus2000 rpm) and inverse speed (from 1000 rpm tominus1000 rpm)condition is tested and its simulation results are shown inFigure 9 It presents that not only at speed tracking butalso at rotor FA tracking the estimated value adopted byEKF method can give a good follow to the real rotor valueHowever except in the initial condition the actual rotorspeed gives a fast step response by 18ms rising time near0mm steady-state value and maximum 175 overshoot
5 Experimental System and Results
After confirming the correctness of the proposed EKF-basedsensorless control IP by simulation the VHDL codes aredirectly applied to the experimental FPGA-based sensorlessPMSM drive system The block diagram and real experi-mental system are depicted in Figure 10 The main devicesinclude a PMSM a DE2 board with Altera CycloneII FPGAa motor driver and a power supplier The parameters of thePMSM are 119903119904 = 063Ω 119871 = 277mH and 4 pole pairs Theinput voltage continuous current rating torque rating speedand continuous power of the PMSM are 220V 12A 23N-m 3000 rpm and 750W respectively The Altera CycloneIIEP2C35 chip adopted in the design possesses 33216 LEsmaximum 475 available IO pins 483840 RAM and 35
embedded multipliers The chip can be embedded with aNios II multicore processor that is equipped with several32-bit CPU flexibility of core size 1 to 16Mbytes of flashmemory in the available memory chip 1 Mbyte SRAM 16Mbyte SDRAM and 4 Gbytes memory outside of the chip Inimplementation except the VHDL codes of CCCT EKF andPI controller the VHDL code of ADC interface circuit shouldbe added and integrated and then downloaded into FPGAThePI gains of speed control loop in experiment are designedwith 119870119901 = 0512 and119870119894 = 0021
In the experimental case PMSM running at low speed(200 rpm) and inverse speed (from 200 rpm to minus200 rpm orvice versa) condition are firstly considered and its experi-ment results regarding the speed step response as well as theactual rotor FA and the estimated rotor FA are shown inFigure 11 Figure 11(a) shows that the motor speed gives agood dynamic response performance with a little oscillationand overshoot and it has 15ms rising time Figure 11(b) showsthat the estimated FA can fast track the actual rotor FA evenin the inverse speed command condition Further anotherexperimental case while the PMSM running at mediumspeed (from 0 rpm rarr 300 rpm rarr 600 rpm rarr 900 rpm rarr
600 rpm rarr 900 rpm) condition is evaluated and its experi-ment results are shown in Figure 12The Figure 12(a) presentsa fast speed trackingwith 15ms rising time and no occurrenceof overshoot condition Figure 12(b) shows a successful vectorcontrol due to the 119894119889 being controlled to zeroTherefore fromthe simulation results in Figures 8 and 9 and the experimentalresults in Figures 11 and 12 it is demonstrated that the EKF-based estimation algorithm used in sensorless PMSM driveand the behavior description by usingVHDL are effective andcorrect
Mathematical Problems in Engineering 13
6 Conclusions
This study has presented a sensorless PMSM drive based onEKF and successfully demonstrated its performance throughcosimulation by using SimulinkModelSim and implemen-tation by using FPGA In realization aspect the VHDL isused to describe the behavior of EKF algorithm and FSM isused to reduce the FPGA resource usage therefore it onlyneeds 4158 LEs and 2890 RAMbits In computational poweraspect the operation time to complete the computation ofEKF algorithm is only 1048 120583s which is less than the 625120583s(16 KHz) sampling time in current control loop In simulatedand experimental results it shows that the use of EKF insensorless PMSM drive can accurately estimate the rotorFA and rotor speed and it can give a good step responseperformance in case of low speed control inverse speedcontrol and high speed control as well
Acknowledgment
This work was supported by the National Science Council ofChina under Grant no NSC 101-2221-E-218-039
References
[1] V C Ilioudis and N I Margaris ldquoPMSM sensorless speedestimation based on sliding mode observersrdquo in Proceedings ofthe 39th IEEE Annual Power Electronics Specialists Conference(PESC rsquo08) pp 2838ndash2843 June 2008
[2] S Chi Z Zhang and L Xu ldquoSliding-mode sensorless controlof direct-drive PM synchronous motors for washing machineapplicationsrdquo IEEE Transactions on Industry Applications vol45 no 2 pp 582ndash590 2009
[3] V Delli Colli R di Stefano and F Marignetti ldquoA system-on-chip sensorless control for a permanent-magnet synchronousmotorrdquo IEEE Transactions on Industrial Electronics vol 57 no11 pp 3822ndash3829 2010
[4] S Bolognani R Oboe andM Zigliotto ldquoSensorless full-digitalpmsm drive with ekf estimation of speed and rotor positionrdquoIEEE Transactions on Industrial Electronics vol 46 no 1 pp184ndash191 1999
[5] M C Huang A J Moses and F Anayi ldquoThe comparison ofsensorless estimation techniques for PMSM between extendedKalman filter and flux-linkage observerrdquo in Proceedings of the21st Annual IEEE Applied Power Electronics Conference andExposition (APEC rsquo06) pp 654ndash659 March 2006
[6] WWang M Zhang and Q Wu ldquoApplication of reduced-orderextended kalman filter in permanent magnet synchronousmotor sensorless regulating systemrdquo in Proceedings of the Inter-national Conference on Digital Manufacturing and Automation(ICDMA rsquo10) pp 271ndash274 December 2010
[7] J-S Jang B-G Park T-S Kim D M Lee and D-S HyunldquoParallel reduced-order extended Kalman Filter for PMSMsensorless drivesrdquo in Proceedings of the 34th Annual Conferenceof the IEEE Industrial Electronics Society (IECON rsquo08) pp 1326ndash1331 November 2008
[8] Y-S Kung and M-H Tsai ldquoFPGA-based speed control IC forPMSM drive with adaptive fuzzy controlrdquo IEEE Transactions onPower Electronics vol 22 no 6 pp 2476ndash2486 2007
[9] L Idkhajine and E Monmasson ldquoDesign methodology forcomplex FPGA-based controllersmdashapplication to an EKF sen-sorless AC driverdquo in Proceedings of the 19th International Con-ference on Electrical Machines (ICEM rsquo10) pp 1ndash6 September2010
[10] H-H Chou Y-S Kung N Vu Quynh and S Cheng ldquoOpti-mized FPGA design verification and implementation of aneuro-fuzzy controller for PMSM drivesrdquo Mathematics andComputers in Simulation vol 90 pp 28ndash44 2013
[11] Y S Kung and T H Nguyen ldquoSimulinkModelsim Co-simu-lation of EKF-based Sensorless PMSM drivesrdquo in Proceedingsof IEEE International on Power Electronics and Drive Systems(PEDS rsquo13) pp 709ndash713 2013
[12] Y Li J Huo X Li J Wen YWang and B Shan ldquoAn open-loopsinmicrostepping driver based on FPGA and the co-simulationof modelsim and simulinkrdquo in Proceedings of the InternationalConference on Computer Mechatronics Control and ElectronicEngineering (CMCE rsquo10) pp 223ndash227 August 2010
[13] The Mathworks ldquoMatlabSimulink Users Guide ApplicationProgram Interface Guiderdquo 2004
Figure 3 Internal architecture of a sensorless speed control IP in FPGA
Step 5 Obtain the temporary covariance matrix 119875119899|119899minus1 from(16) Because matrix 119875119899|119899minus1 is symmetric matrix by 119901119894119895 = 119901119895119894it can be chosen by the following form
119875119899|119899minus1 =
[[[
[
11990111 11990112 11990113 11990114
11990121 11990122 11990123 11990124
11990131 11990132 11990133 11990134
11990141 11990142 11990143 11990144
]]]
]
(29)
Hence from (16) individual elements of 119875119899|119899minus1 could beupdated as follows
Figure 4 State diagram of FSM for describing the EKF-based algorithm
where 119877 represents the uncertainties of measurement vari-ablewhich are very difficult to knowHence119877 is often chosenas unity matrix for simplifying the task but does not affect theoutcome (31) Since 11987512 = 11987521 (31) can be rewritten in thefollowing form
1199011111990122 + 11990111 + 11990122 minus 1199012
12+ 1
[11990122 + 1 minus11990112
minus11990112 11990111 + 1]
(32)To normalize the input value and to prevent the numericaloverflow condition which occurred during computation (32)is normalized and those values are all divided by 4Therefore(32) becomes
where 119896119894119895 is the element in Kalman gain 119870119899 sdot 120572(119899) = 119894120572(119899) minus120572(119899 | 119899 minus 1) and 120573(119899) = 119894120573(119899) minus 120573(119899 | 119899 minus 1)
Mathematical Problems in Engineering 9
(work-3)
(work-2)
(work-1)
Speedcommand
Speed commandRotor speed and Kalman speed
Gain1
Torque
S-function
Flux angle
Stator current
DCTm
mA
NSB
C
0001voltage source
Gain6Saturation
Saturation1
Saturation2
Data type conversion 1
Data type conversion 10
Data type conversion 11
Data type conversion 12
Gain7
Gain8
transformation
flux angleReal and estimated
Constant1
Constant2
Permanent magnetsynchronous machine
Convert
Convert
Convert
Convert
Convert
Convert
Convert0
ModelSim
ModelSim
ModelSim
cmd
Rotor speed
Current command
Speed loop PI controller
iq current command
cmd iq
cmd id
Flux angle
Phase a current
Phase b current
Phase c current
PMW1
PMW2
PMW3
PMW4
PMW5
PMW6
id out
iq out
CCCT and SVPWM
-K-
-K-
-K-
-K-
d-axis current
Motor dq current
Flux angle
wr
Full-order EKF
IGBT-based inverter
idq
ln1Conn1
ln2Conn2
ln3Conn3
ln4Conn4
ln5Conn5
ln6Conn6
+⟨Rotor speed wm (rads)⟩⟨Electromagnetic torque Te (Nlowastm)⟩⟨Rotor angle thetam (rad)⟩⟨Stator current is d (A)⟩⟨Stator current is q (A)⟩⟨Stator current is a (A)⟩⟨Stator current is b (A)⟩⟨Stator current is c (A)⟩
120572
i120572
120573
i120573
V120572 out
V120573 out
I120572 out
I120573 out
Figure 7 The SimulinkModelSim cosimulation architecture for sensorless speed control of PMSM drive
Step 8 Update the present covariance matrix 119875119899 from (18)where 119870119899119867119875119899|119899minus1 can be directly obtained as follows
Step 9 Calculate the rotor speed from (27) then set 119899 = 119899 +1 and go back to Step 2
3 Design of Sensorless Speed Controller IP
Figure 3 illustrates the internal architecture of the proposedFPGA implementation of a sensorless speed control IP forPMSM drive system The internal circuit comprises a NiosII embedded processor IP and an application IP The Nios IIprocessor is depicted to generate the speed command collectthe response data and communicate with external deviceAll programs in Nios II processor are coded in the Clanguage The application IP includes mainly a circuit of anEKF-based rotor FA and rotor speed estimation a speedPI controller a circuit for current controllers and coordinatetransformation (CCCT) a SVPWM circuit and an ADCinterface circuit The sampling frequencies of the speedcontrol loop and current control loop are designedwith 2 kHzand 16 kHz respectively The frequency divider generates50Mhz (Clk) and 125Mhz (Clk-step) clock to supply allcircuits in Figure 3 The internal circuit of CCCT performs
the function of two PI controllers table look-up for sincosfunction and the coordinate transformation for Clark Parkinverse Park and modified inverse Clarke The detailedcircuit design of CCCT speed PI controller ADC interfaceand SVPWM generation in Figure 3 refers to [8] Hereinonly the digital hardware circuit design of the EKF-basedrotor FA and rotor speed estimation is described To reducethe FPGA resource usage a finite-state machine (FSM) isemployed to model the EKF-based algorithm whose designprocedure andmathematical formulation are presented in theprevious sectionThedesign result is shown in Figure 4whichuses one adder one multiplier one divider two sincos look-up table shifters registers and so forth and manipulates 131steps machine to carry out the overall computationThe datatype adopts 16-bit lengthwithQ15 format and 2rsquos complementoperation The multiplier adder and divider apply AlteraLPM (Library ParameterizedModules) standard In Figure 4the steps 1199040 sim 11990412 execute the calculation of Jacobian matrixand predict temporary state variables 11990413 sim 11990468 perform thecomputation of temporary covariance matrix steps 11990469 sim11990470 are for state error calculation steps 11990471sim119904120 update of
10 Mathematical Problems in Engineering
0 01 02 03 04 05 06
0100200300
Spee
d (r
pm)
Speed command Actual
rotor speed
Estimated rotor speed
minus100minus200minus300
Time (s)
(a)
0 01 02 03 04 05 06
005
115
Curr
ent (
A)
minus05
minus1
iqid
Time (s)
(b)
0 01 02 03 04 05 06
0100200300400500
Flux
angl
e (FA
) (d
eg)
Actual rotor FA
Estimated rotor FAby EKF
minus100
Time (s)
(c)
Figure 8 PMSM running at low speed (200 rpm) and inverse speed (plusmn200 rpm) condition (a) Speed step response (b) current responseand (c) actual rotor FA and estimated rotor FA
0 005 01 015 02 025 03 035 04 045 05
0100020003000
Spee
d (r
pm)
Time (s)
Speed command
Estimated rotor speed
Actual rotor speed
minus1000
minus2000
minus3000
(a)
0 005 01 015 02 025 03 035 04 045 05
0
2
4Cu
rren
t (A
)
Time (s)
minus2
minus4
iq
id
(b)
0 005 01 015 02 025 03 035 04 045 05
0100200300400
Flux
angl
e (FA
) (de
g)
Time (s)
Actual rotor FA
Estimated rotor FA by EKF minus100
(c)
Figure 9 PMSM running at wide-range high speed (2000 rpm) and inverse speed (plusmn1000 rpm) condition (a) Speed step response (b) currentresponse AND (c) actual rotor FA and estimated rotor FA
the present covariance matrix 119875119899 and calculate the Kalmangain 119870119899 119904121sim 119904130 describe the present state tuning as wellas executing the computation of rotor FA and rotor speedAccording to (30) the computation of temporary covariancematrix 119875119899|119899minus1in Figure 4 is described in Figure 5 Furtheraccording to (18) (33)-(34) and (36) the update of thepresent covariancematrix119875119899 and calculation theKalman gain119870119899 in Figure 4 are illustrated in Figure 6 The operation ofeach step in Figure 4 is 80 ns (125MHz) in FPGA thereforea total of 131 steps need only 1048 120583s operation timesThe FPGA (Altera) resource usages of EKF-based rotor FAand rotor speed estimation in Figure 4 is 4158 LEs (logicelements) and 2890 RAM bits Additionally the FPGA
resource usages of the circuits of CCCT speed PI controllerADC interface and SVPWM in Figure 3 are 864 LEs and24576 RAM 2043 LEs and 0RAM bits 136 LEs and 0RAMbits and 1221 LEs and 0RAM bits respectively
The SimulinkModelSim cosimulation architecture for sen-sorless PMSM speed control system is shown in Figure 7The SimPowerSystem-Blockset in the Simulink executes thePMSM and the IGBT-based inverterThe EDA simulator linkfor ModelSim executes the cosimulation using VHDL code
Mathematical Problems in Engineering 11
LP filter circuit
Rectifier Inverter
Ac source
Isolated and driving circuits
ADC
ADC
PWM6PWM1
PMSM
Digital circuitof speed PI controller EKF-based rotor FA and speed estimation
and current vector controller for PMSM
FPGA-based sensorless speed control IP
Load
Externalmemory
(Nios II processor)
Embedded processor IP
Application IP
L
C
T+A
TminusA
T+B
TminusB
T+C
TminusC
U V W
ia
ib
CPU
On-chipROM
On-chipRAM
UART
PIO
Timer
SPI
SDRAMcontroller
Aval
on b
us
(a)
(b)
Figure 10 Experimental system (a) with block diagram and (b) in real system
running in ModelSim program It executes the function ofthe sensorless speed controller by three works The work-1to work-3 of ModelSim in Figure 7 respectively perform thefunction of speed loop PI controller the function of cur-rent controller and coordinate transformation (CCCT) andSVPWM and the function of EKF-based rotor FA and rotorspeed estimation The sampling frequency in current controlloop and EKF-based estimation algorithm is designed with16 kHz but in speed control loop is 2 kHz The clocks of50MHz and 125MHz will supply all works of ModelSimThe FPGA (Altera) resource usages of work-1 to work-3 are2043 LEs and 0 RAM bits 2085 LEs and 24576 RAM bitsand 4158 LEs and 2890 RAM bits respectively
In simulation the designed PMSM parameters used inFigure 7 are as follows pole pairs are 4 stator phase resis-tance is 13Ω stator inductance is 63mH inertia is 119869 =
0000108 kglowastm2 and friction factor is 119865 = 00013NlowastmlowastsPI gains in speed control loop are designed with119870119901 = 02442and 119870119894 = 000458 To evaluate the proposed controllerperformance PMSM running at low speed (200 rpm) andinverse speed (from 200 rpm to minus200 rpm or vice versa) con-dition is firstly considered and its simulation results regard-ing as the speed step response the current response as wellas the actual rotor flux angle (FA) and the estimated rotorflux angle are shown in Figure 8 It shows that the motorspeed gives a good dynamic response performance with a
12 Mathematical Problems in Engineering
0 02 04 06 08 1 12 14 16 18 2
0
500 Speed command
Rotor speed
200
Time (s)
Spee
d (r
pm)
minus500
minus200
(a)
0
100
200
300
400
0 02 04 06 08 1 12 14 16 18 2
Actual rotor FA Estimated rotor FA
Time (s)
Flux
angl
e (de
g)
(b)
Figure 11 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) actual rotor FA and estimated rotor FA
0200400600800
10001200 Speed
command
Actual rotor speed
Estimated rotor speed
0 05 1 15 2 25 3Time (s)
Spee
d (r
pm)
(a)
0 05 1 15 2 25 3Time (s)
Curr
ent (
A) iq
id
0
051
15
minus05
minus1
(b)
Figure 12 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) current response
little overshoot and 25ms rising time It also shows thatthe estimated rotor speed can track actual rotor speed wellFigure 8(b) shows a successful vector control because 119894119889 iscontrolled to zero Figure 8(c) shows that the estimated rotorFA can fast track the actual rotor FA even in the inverse speedcommand condition Further another simulation case whilethe PMSMrunning at wide-range high speed (from0 rpm rarr
minus2000 rpm) and inverse speed (from 1000 rpm tominus1000 rpm)condition is tested and its simulation results are shown inFigure 9 It presents that not only at speed tracking butalso at rotor FA tracking the estimated value adopted byEKF method can give a good follow to the real rotor valueHowever except in the initial condition the actual rotorspeed gives a fast step response by 18ms rising time near0mm steady-state value and maximum 175 overshoot
5 Experimental System and Results
After confirming the correctness of the proposed EKF-basedsensorless control IP by simulation the VHDL codes aredirectly applied to the experimental FPGA-based sensorlessPMSM drive system The block diagram and real experi-mental system are depicted in Figure 10 The main devicesinclude a PMSM a DE2 board with Altera CycloneII FPGAa motor driver and a power supplier The parameters of thePMSM are 119903119904 = 063Ω 119871 = 277mH and 4 pole pairs Theinput voltage continuous current rating torque rating speedand continuous power of the PMSM are 220V 12A 23N-m 3000 rpm and 750W respectively The Altera CycloneIIEP2C35 chip adopted in the design possesses 33216 LEsmaximum 475 available IO pins 483840 RAM and 35
embedded multipliers The chip can be embedded with aNios II multicore processor that is equipped with several32-bit CPU flexibility of core size 1 to 16Mbytes of flashmemory in the available memory chip 1 Mbyte SRAM 16Mbyte SDRAM and 4 Gbytes memory outside of the chip Inimplementation except the VHDL codes of CCCT EKF andPI controller the VHDL code of ADC interface circuit shouldbe added and integrated and then downloaded into FPGAThePI gains of speed control loop in experiment are designedwith 119870119901 = 0512 and119870119894 = 0021
In the experimental case PMSM running at low speed(200 rpm) and inverse speed (from 200 rpm to minus200 rpm orvice versa) condition are firstly considered and its experi-ment results regarding the speed step response as well as theactual rotor FA and the estimated rotor FA are shown inFigure 11 Figure 11(a) shows that the motor speed gives agood dynamic response performance with a little oscillationand overshoot and it has 15ms rising time Figure 11(b) showsthat the estimated FA can fast track the actual rotor FA evenin the inverse speed command condition Further anotherexperimental case while the PMSM running at mediumspeed (from 0 rpm rarr 300 rpm rarr 600 rpm rarr 900 rpm rarr
600 rpm rarr 900 rpm) condition is evaluated and its experi-ment results are shown in Figure 12The Figure 12(a) presentsa fast speed trackingwith 15ms rising time and no occurrenceof overshoot condition Figure 12(b) shows a successful vectorcontrol due to the 119894119889 being controlled to zeroTherefore fromthe simulation results in Figures 8 and 9 and the experimentalresults in Figures 11 and 12 it is demonstrated that the EKF-based estimation algorithm used in sensorless PMSM driveand the behavior description by usingVHDL are effective andcorrect
Mathematical Problems in Engineering 13
6 Conclusions
This study has presented a sensorless PMSM drive based onEKF and successfully demonstrated its performance throughcosimulation by using SimulinkModelSim and implemen-tation by using FPGA In realization aspect the VHDL isused to describe the behavior of EKF algorithm and FSM isused to reduce the FPGA resource usage therefore it onlyneeds 4158 LEs and 2890 RAMbits In computational poweraspect the operation time to complete the computation ofEKF algorithm is only 1048 120583s which is less than the 625120583s(16 KHz) sampling time in current control loop In simulatedand experimental results it shows that the use of EKF insensorless PMSM drive can accurately estimate the rotorFA and rotor speed and it can give a good step responseperformance in case of low speed control inverse speedcontrol and high speed control as well
Acknowledgment
This work was supported by the National Science Council ofChina under Grant no NSC 101-2221-E-218-039
References
[1] V C Ilioudis and N I Margaris ldquoPMSM sensorless speedestimation based on sliding mode observersrdquo in Proceedings ofthe 39th IEEE Annual Power Electronics Specialists Conference(PESC rsquo08) pp 2838ndash2843 June 2008
[2] S Chi Z Zhang and L Xu ldquoSliding-mode sensorless controlof direct-drive PM synchronous motors for washing machineapplicationsrdquo IEEE Transactions on Industry Applications vol45 no 2 pp 582ndash590 2009
[3] V Delli Colli R di Stefano and F Marignetti ldquoA system-on-chip sensorless control for a permanent-magnet synchronousmotorrdquo IEEE Transactions on Industrial Electronics vol 57 no11 pp 3822ndash3829 2010
[4] S Bolognani R Oboe andM Zigliotto ldquoSensorless full-digitalpmsm drive with ekf estimation of speed and rotor positionrdquoIEEE Transactions on Industrial Electronics vol 46 no 1 pp184ndash191 1999
[5] M C Huang A J Moses and F Anayi ldquoThe comparison ofsensorless estimation techniques for PMSM between extendedKalman filter and flux-linkage observerrdquo in Proceedings of the21st Annual IEEE Applied Power Electronics Conference andExposition (APEC rsquo06) pp 654ndash659 March 2006
[6] WWang M Zhang and Q Wu ldquoApplication of reduced-orderextended kalman filter in permanent magnet synchronousmotor sensorless regulating systemrdquo in Proceedings of the Inter-national Conference on Digital Manufacturing and Automation(ICDMA rsquo10) pp 271ndash274 December 2010
[7] J-S Jang B-G Park T-S Kim D M Lee and D-S HyunldquoParallel reduced-order extended Kalman Filter for PMSMsensorless drivesrdquo in Proceedings of the 34th Annual Conferenceof the IEEE Industrial Electronics Society (IECON rsquo08) pp 1326ndash1331 November 2008
[8] Y-S Kung and M-H Tsai ldquoFPGA-based speed control IC forPMSM drive with adaptive fuzzy controlrdquo IEEE Transactions onPower Electronics vol 22 no 6 pp 2476ndash2486 2007
[9] L Idkhajine and E Monmasson ldquoDesign methodology forcomplex FPGA-based controllersmdashapplication to an EKF sen-sorless AC driverdquo in Proceedings of the 19th International Con-ference on Electrical Machines (ICEM rsquo10) pp 1ndash6 September2010
[10] H-H Chou Y-S Kung N Vu Quynh and S Cheng ldquoOpti-mized FPGA design verification and implementation of aneuro-fuzzy controller for PMSM drivesrdquo Mathematics andComputers in Simulation vol 90 pp 28ndash44 2013
[11] Y S Kung and T H Nguyen ldquoSimulinkModelsim Co-simu-lation of EKF-based Sensorless PMSM drivesrdquo in Proceedingsof IEEE International on Power Electronics and Drive Systems(PEDS rsquo13) pp 709ndash713 2013
[12] Y Li J Huo X Li J Wen YWang and B Shan ldquoAn open-loopsinmicrostepping driver based on FPGA and the co-simulationof modelsim and simulinkrdquo in Proceedings of the InternationalConference on Computer Mechatronics Control and ElectronicEngineering (CMCE rsquo10) pp 223ndash227 August 2010
[13] The Mathworks ldquoMatlabSimulink Users Guide ApplicationProgram Interface Guiderdquo 2004
Figure 4 State diagram of FSM for describing the EKF-based algorithm
where 119877 represents the uncertainties of measurement vari-ablewhich are very difficult to knowHence119877 is often chosenas unity matrix for simplifying the task but does not affect theoutcome (31) Since 11987512 = 11987521 (31) can be rewritten in thefollowing form
1199011111990122 + 11990111 + 11990122 minus 1199012
12+ 1
[11990122 + 1 minus11990112
minus11990112 11990111 + 1]
(32)To normalize the input value and to prevent the numericaloverflow condition which occurred during computation (32)is normalized and those values are all divided by 4Therefore(32) becomes
where 119896119894119895 is the element in Kalman gain 119870119899 sdot 120572(119899) = 119894120572(119899) minus120572(119899 | 119899 minus 1) and 120573(119899) = 119894120573(119899) minus 120573(119899 | 119899 minus 1)
Mathematical Problems in Engineering 9
(work-3)
(work-2)
(work-1)
Speedcommand
Speed commandRotor speed and Kalman speed
Gain1
Torque
S-function
Flux angle
Stator current
DCTm
mA
NSB
C
0001voltage source
Gain6Saturation
Saturation1
Saturation2
Data type conversion 1
Data type conversion 10
Data type conversion 11
Data type conversion 12
Gain7
Gain8
transformation
flux angleReal and estimated
Constant1
Constant2
Permanent magnetsynchronous machine
Convert
Convert
Convert
Convert
Convert
Convert
Convert0
ModelSim
ModelSim
ModelSim
cmd
Rotor speed
Current command
Speed loop PI controller
iq current command
cmd iq
cmd id
Flux angle
Phase a current
Phase b current
Phase c current
PMW1
PMW2
PMW3
PMW4
PMW5
PMW6
id out
iq out
CCCT and SVPWM
-K-
-K-
-K-
-K-
d-axis current
Motor dq current
Flux angle
wr
Full-order EKF
IGBT-based inverter
idq
ln1Conn1
ln2Conn2
ln3Conn3
ln4Conn4
ln5Conn5
ln6Conn6
+⟨Rotor speed wm (rads)⟩⟨Electromagnetic torque Te (Nlowastm)⟩⟨Rotor angle thetam (rad)⟩⟨Stator current is d (A)⟩⟨Stator current is q (A)⟩⟨Stator current is a (A)⟩⟨Stator current is b (A)⟩⟨Stator current is c (A)⟩
120572
i120572
120573
i120573
V120572 out
V120573 out
I120572 out
I120573 out
Figure 7 The SimulinkModelSim cosimulation architecture for sensorless speed control of PMSM drive
Step 8 Update the present covariance matrix 119875119899 from (18)where 119870119899119867119875119899|119899minus1 can be directly obtained as follows
Step 9 Calculate the rotor speed from (27) then set 119899 = 119899 +1 and go back to Step 2
3 Design of Sensorless Speed Controller IP
Figure 3 illustrates the internal architecture of the proposedFPGA implementation of a sensorless speed control IP forPMSM drive system The internal circuit comprises a NiosII embedded processor IP and an application IP The Nios IIprocessor is depicted to generate the speed command collectthe response data and communicate with external deviceAll programs in Nios II processor are coded in the Clanguage The application IP includes mainly a circuit of anEKF-based rotor FA and rotor speed estimation a speedPI controller a circuit for current controllers and coordinatetransformation (CCCT) a SVPWM circuit and an ADCinterface circuit The sampling frequencies of the speedcontrol loop and current control loop are designedwith 2 kHzand 16 kHz respectively The frequency divider generates50Mhz (Clk) and 125Mhz (Clk-step) clock to supply allcircuits in Figure 3 The internal circuit of CCCT performs
the function of two PI controllers table look-up for sincosfunction and the coordinate transformation for Clark Parkinverse Park and modified inverse Clarke The detailedcircuit design of CCCT speed PI controller ADC interfaceand SVPWM generation in Figure 3 refers to [8] Hereinonly the digital hardware circuit design of the EKF-basedrotor FA and rotor speed estimation is described To reducethe FPGA resource usage a finite-state machine (FSM) isemployed to model the EKF-based algorithm whose designprocedure andmathematical formulation are presented in theprevious sectionThedesign result is shown in Figure 4whichuses one adder one multiplier one divider two sincos look-up table shifters registers and so forth and manipulates 131steps machine to carry out the overall computationThe datatype adopts 16-bit lengthwithQ15 format and 2rsquos complementoperation The multiplier adder and divider apply AlteraLPM (Library ParameterizedModules) standard In Figure 4the steps 1199040 sim 11990412 execute the calculation of Jacobian matrixand predict temporary state variables 11990413 sim 11990468 perform thecomputation of temporary covariance matrix steps 11990469 sim11990470 are for state error calculation steps 11990471sim119904120 update of
10 Mathematical Problems in Engineering
0 01 02 03 04 05 06
0100200300
Spee
d (r
pm)
Speed command Actual
rotor speed
Estimated rotor speed
minus100minus200minus300
Time (s)
(a)
0 01 02 03 04 05 06
005
115
Curr
ent (
A)
minus05
minus1
iqid
Time (s)
(b)
0 01 02 03 04 05 06
0100200300400500
Flux
angl
e (FA
) (d
eg)
Actual rotor FA
Estimated rotor FAby EKF
minus100
Time (s)
(c)
Figure 8 PMSM running at low speed (200 rpm) and inverse speed (plusmn200 rpm) condition (a) Speed step response (b) current responseand (c) actual rotor FA and estimated rotor FA
0 005 01 015 02 025 03 035 04 045 05
0100020003000
Spee
d (r
pm)
Time (s)
Speed command
Estimated rotor speed
Actual rotor speed
minus1000
minus2000
minus3000
(a)
0 005 01 015 02 025 03 035 04 045 05
0
2
4Cu
rren
t (A
)
Time (s)
minus2
minus4
iq
id
(b)
0 005 01 015 02 025 03 035 04 045 05
0100200300400
Flux
angl
e (FA
) (de
g)
Time (s)
Actual rotor FA
Estimated rotor FA by EKF minus100
(c)
Figure 9 PMSM running at wide-range high speed (2000 rpm) and inverse speed (plusmn1000 rpm) condition (a) Speed step response (b) currentresponse AND (c) actual rotor FA and estimated rotor FA
the present covariance matrix 119875119899 and calculate the Kalmangain 119870119899 119904121sim 119904130 describe the present state tuning as wellas executing the computation of rotor FA and rotor speedAccording to (30) the computation of temporary covariancematrix 119875119899|119899minus1in Figure 4 is described in Figure 5 Furtheraccording to (18) (33)-(34) and (36) the update of thepresent covariancematrix119875119899 and calculation theKalman gain119870119899 in Figure 4 are illustrated in Figure 6 The operation ofeach step in Figure 4 is 80 ns (125MHz) in FPGA thereforea total of 131 steps need only 1048 120583s operation timesThe FPGA (Altera) resource usages of EKF-based rotor FAand rotor speed estimation in Figure 4 is 4158 LEs (logicelements) and 2890 RAM bits Additionally the FPGA
resource usages of the circuits of CCCT speed PI controllerADC interface and SVPWM in Figure 3 are 864 LEs and24576 RAM 2043 LEs and 0RAM bits 136 LEs and 0RAMbits and 1221 LEs and 0RAM bits respectively
The SimulinkModelSim cosimulation architecture for sen-sorless PMSM speed control system is shown in Figure 7The SimPowerSystem-Blockset in the Simulink executes thePMSM and the IGBT-based inverterThe EDA simulator linkfor ModelSim executes the cosimulation using VHDL code
Mathematical Problems in Engineering 11
LP filter circuit
Rectifier Inverter
Ac source
Isolated and driving circuits
ADC
ADC
PWM6PWM1
PMSM
Digital circuitof speed PI controller EKF-based rotor FA and speed estimation
and current vector controller for PMSM
FPGA-based sensorless speed control IP
Load
Externalmemory
(Nios II processor)
Embedded processor IP
Application IP
L
C
T+A
TminusA
T+B
TminusB
T+C
TminusC
U V W
ia
ib
CPU
On-chipROM
On-chipRAM
UART
PIO
Timer
SPI
SDRAMcontroller
Aval
on b
us
(a)
(b)
Figure 10 Experimental system (a) with block diagram and (b) in real system
running in ModelSim program It executes the function ofthe sensorless speed controller by three works The work-1to work-3 of ModelSim in Figure 7 respectively perform thefunction of speed loop PI controller the function of cur-rent controller and coordinate transformation (CCCT) andSVPWM and the function of EKF-based rotor FA and rotorspeed estimation The sampling frequency in current controlloop and EKF-based estimation algorithm is designed with16 kHz but in speed control loop is 2 kHz The clocks of50MHz and 125MHz will supply all works of ModelSimThe FPGA (Altera) resource usages of work-1 to work-3 are2043 LEs and 0 RAM bits 2085 LEs and 24576 RAM bitsand 4158 LEs and 2890 RAM bits respectively
In simulation the designed PMSM parameters used inFigure 7 are as follows pole pairs are 4 stator phase resis-tance is 13Ω stator inductance is 63mH inertia is 119869 =
0000108 kglowastm2 and friction factor is 119865 = 00013NlowastmlowastsPI gains in speed control loop are designed with119870119901 = 02442and 119870119894 = 000458 To evaluate the proposed controllerperformance PMSM running at low speed (200 rpm) andinverse speed (from 200 rpm to minus200 rpm or vice versa) con-dition is firstly considered and its simulation results regard-ing as the speed step response the current response as wellas the actual rotor flux angle (FA) and the estimated rotorflux angle are shown in Figure 8 It shows that the motorspeed gives a good dynamic response performance with a
12 Mathematical Problems in Engineering
0 02 04 06 08 1 12 14 16 18 2
0
500 Speed command
Rotor speed
200
Time (s)
Spee
d (r
pm)
minus500
minus200
(a)
0
100
200
300
400
0 02 04 06 08 1 12 14 16 18 2
Actual rotor FA Estimated rotor FA
Time (s)
Flux
angl
e (de
g)
(b)
Figure 11 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) actual rotor FA and estimated rotor FA
0200400600800
10001200 Speed
command
Actual rotor speed
Estimated rotor speed
0 05 1 15 2 25 3Time (s)
Spee
d (r
pm)
(a)
0 05 1 15 2 25 3Time (s)
Curr
ent (
A) iq
id
0
051
15
minus05
minus1
(b)
Figure 12 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) current response
little overshoot and 25ms rising time It also shows thatthe estimated rotor speed can track actual rotor speed wellFigure 8(b) shows a successful vector control because 119894119889 iscontrolled to zero Figure 8(c) shows that the estimated rotorFA can fast track the actual rotor FA even in the inverse speedcommand condition Further another simulation case whilethe PMSMrunning at wide-range high speed (from0 rpm rarr
minus2000 rpm) and inverse speed (from 1000 rpm tominus1000 rpm)condition is tested and its simulation results are shown inFigure 9 It presents that not only at speed tracking butalso at rotor FA tracking the estimated value adopted byEKF method can give a good follow to the real rotor valueHowever except in the initial condition the actual rotorspeed gives a fast step response by 18ms rising time near0mm steady-state value and maximum 175 overshoot
5 Experimental System and Results
After confirming the correctness of the proposed EKF-basedsensorless control IP by simulation the VHDL codes aredirectly applied to the experimental FPGA-based sensorlessPMSM drive system The block diagram and real experi-mental system are depicted in Figure 10 The main devicesinclude a PMSM a DE2 board with Altera CycloneII FPGAa motor driver and a power supplier The parameters of thePMSM are 119903119904 = 063Ω 119871 = 277mH and 4 pole pairs Theinput voltage continuous current rating torque rating speedand continuous power of the PMSM are 220V 12A 23N-m 3000 rpm and 750W respectively The Altera CycloneIIEP2C35 chip adopted in the design possesses 33216 LEsmaximum 475 available IO pins 483840 RAM and 35
embedded multipliers The chip can be embedded with aNios II multicore processor that is equipped with several32-bit CPU flexibility of core size 1 to 16Mbytes of flashmemory in the available memory chip 1 Mbyte SRAM 16Mbyte SDRAM and 4 Gbytes memory outside of the chip Inimplementation except the VHDL codes of CCCT EKF andPI controller the VHDL code of ADC interface circuit shouldbe added and integrated and then downloaded into FPGAThePI gains of speed control loop in experiment are designedwith 119870119901 = 0512 and119870119894 = 0021
In the experimental case PMSM running at low speed(200 rpm) and inverse speed (from 200 rpm to minus200 rpm orvice versa) condition are firstly considered and its experi-ment results regarding the speed step response as well as theactual rotor FA and the estimated rotor FA are shown inFigure 11 Figure 11(a) shows that the motor speed gives agood dynamic response performance with a little oscillationand overshoot and it has 15ms rising time Figure 11(b) showsthat the estimated FA can fast track the actual rotor FA evenin the inverse speed command condition Further anotherexperimental case while the PMSM running at mediumspeed (from 0 rpm rarr 300 rpm rarr 600 rpm rarr 900 rpm rarr
600 rpm rarr 900 rpm) condition is evaluated and its experi-ment results are shown in Figure 12The Figure 12(a) presentsa fast speed trackingwith 15ms rising time and no occurrenceof overshoot condition Figure 12(b) shows a successful vectorcontrol due to the 119894119889 being controlled to zeroTherefore fromthe simulation results in Figures 8 and 9 and the experimentalresults in Figures 11 and 12 it is demonstrated that the EKF-based estimation algorithm used in sensorless PMSM driveand the behavior description by usingVHDL are effective andcorrect
Mathematical Problems in Engineering 13
6 Conclusions
This study has presented a sensorless PMSM drive based onEKF and successfully demonstrated its performance throughcosimulation by using SimulinkModelSim and implemen-tation by using FPGA In realization aspect the VHDL isused to describe the behavior of EKF algorithm and FSM isused to reduce the FPGA resource usage therefore it onlyneeds 4158 LEs and 2890 RAMbits In computational poweraspect the operation time to complete the computation ofEKF algorithm is only 1048 120583s which is less than the 625120583s(16 KHz) sampling time in current control loop In simulatedand experimental results it shows that the use of EKF insensorless PMSM drive can accurately estimate the rotorFA and rotor speed and it can give a good step responseperformance in case of low speed control inverse speedcontrol and high speed control as well
Acknowledgment
This work was supported by the National Science Council ofChina under Grant no NSC 101-2221-E-218-039
References
[1] V C Ilioudis and N I Margaris ldquoPMSM sensorless speedestimation based on sliding mode observersrdquo in Proceedings ofthe 39th IEEE Annual Power Electronics Specialists Conference(PESC rsquo08) pp 2838ndash2843 June 2008
[2] S Chi Z Zhang and L Xu ldquoSliding-mode sensorless controlof direct-drive PM synchronous motors for washing machineapplicationsrdquo IEEE Transactions on Industry Applications vol45 no 2 pp 582ndash590 2009
[3] V Delli Colli R di Stefano and F Marignetti ldquoA system-on-chip sensorless control for a permanent-magnet synchronousmotorrdquo IEEE Transactions on Industrial Electronics vol 57 no11 pp 3822ndash3829 2010
[4] S Bolognani R Oboe andM Zigliotto ldquoSensorless full-digitalpmsm drive with ekf estimation of speed and rotor positionrdquoIEEE Transactions on Industrial Electronics vol 46 no 1 pp184ndash191 1999
[5] M C Huang A J Moses and F Anayi ldquoThe comparison ofsensorless estimation techniques for PMSM between extendedKalman filter and flux-linkage observerrdquo in Proceedings of the21st Annual IEEE Applied Power Electronics Conference andExposition (APEC rsquo06) pp 654ndash659 March 2006
[6] WWang M Zhang and Q Wu ldquoApplication of reduced-orderextended kalman filter in permanent magnet synchronousmotor sensorless regulating systemrdquo in Proceedings of the Inter-national Conference on Digital Manufacturing and Automation(ICDMA rsquo10) pp 271ndash274 December 2010
[7] J-S Jang B-G Park T-S Kim D M Lee and D-S HyunldquoParallel reduced-order extended Kalman Filter for PMSMsensorless drivesrdquo in Proceedings of the 34th Annual Conferenceof the IEEE Industrial Electronics Society (IECON rsquo08) pp 1326ndash1331 November 2008
[8] Y-S Kung and M-H Tsai ldquoFPGA-based speed control IC forPMSM drive with adaptive fuzzy controlrdquo IEEE Transactions onPower Electronics vol 22 no 6 pp 2476ndash2486 2007
[9] L Idkhajine and E Monmasson ldquoDesign methodology forcomplex FPGA-based controllersmdashapplication to an EKF sen-sorless AC driverdquo in Proceedings of the 19th International Con-ference on Electrical Machines (ICEM rsquo10) pp 1ndash6 September2010
[10] H-H Chou Y-S Kung N Vu Quynh and S Cheng ldquoOpti-mized FPGA design verification and implementation of aneuro-fuzzy controller for PMSM drivesrdquo Mathematics andComputers in Simulation vol 90 pp 28ndash44 2013
[11] Y S Kung and T H Nguyen ldquoSimulinkModelsim Co-simu-lation of EKF-based Sensorless PMSM drivesrdquo in Proceedingsof IEEE International on Power Electronics and Drive Systems(PEDS rsquo13) pp 709ndash713 2013
[12] Y Li J Huo X Li J Wen YWang and B Shan ldquoAn open-loopsinmicrostepping driver based on FPGA and the co-simulationof modelsim and simulinkrdquo in Proceedings of the InternationalConference on Computer Mechatronics Control and ElectronicEngineering (CMCE rsquo10) pp 223ndash227 August 2010
[13] The Mathworks ldquoMatlabSimulink Users Guide ApplicationProgram Interface Guiderdquo 2004
where 119896119894119895 is the element in Kalman gain 119870119899 sdot 120572(119899) = 119894120572(119899) minus120572(119899 | 119899 minus 1) and 120573(119899) = 119894120573(119899) minus 120573(119899 | 119899 minus 1)
Mathematical Problems in Engineering 9
(work-3)
(work-2)
(work-1)
Speedcommand
Speed commandRotor speed and Kalman speed
Gain1
Torque
S-function
Flux angle
Stator current
DCTm
mA
NSB
C
0001voltage source
Gain6Saturation
Saturation1
Saturation2
Data type conversion 1
Data type conversion 10
Data type conversion 11
Data type conversion 12
Gain7
Gain8
transformation
flux angleReal and estimated
Constant1
Constant2
Permanent magnetsynchronous machine
Convert
Convert
Convert
Convert
Convert
Convert
Convert0
ModelSim
ModelSim
ModelSim
cmd
Rotor speed
Current command
Speed loop PI controller
iq current command
cmd iq
cmd id
Flux angle
Phase a current
Phase b current
Phase c current
PMW1
PMW2
PMW3
PMW4
PMW5
PMW6
id out
iq out
CCCT and SVPWM
-K-
-K-
-K-
-K-
d-axis current
Motor dq current
Flux angle
wr
Full-order EKF
IGBT-based inverter
idq
ln1Conn1
ln2Conn2
ln3Conn3
ln4Conn4
ln5Conn5
ln6Conn6
+⟨Rotor speed wm (rads)⟩⟨Electromagnetic torque Te (Nlowastm)⟩⟨Rotor angle thetam (rad)⟩⟨Stator current is d (A)⟩⟨Stator current is q (A)⟩⟨Stator current is a (A)⟩⟨Stator current is b (A)⟩⟨Stator current is c (A)⟩
120572
i120572
120573
i120573
V120572 out
V120573 out
I120572 out
I120573 out
Figure 7 The SimulinkModelSim cosimulation architecture for sensorless speed control of PMSM drive
Step 8 Update the present covariance matrix 119875119899 from (18)where 119870119899119867119875119899|119899minus1 can be directly obtained as follows
Step 9 Calculate the rotor speed from (27) then set 119899 = 119899 +1 and go back to Step 2
3 Design of Sensorless Speed Controller IP
Figure 3 illustrates the internal architecture of the proposedFPGA implementation of a sensorless speed control IP forPMSM drive system The internal circuit comprises a NiosII embedded processor IP and an application IP The Nios IIprocessor is depicted to generate the speed command collectthe response data and communicate with external deviceAll programs in Nios II processor are coded in the Clanguage The application IP includes mainly a circuit of anEKF-based rotor FA and rotor speed estimation a speedPI controller a circuit for current controllers and coordinatetransformation (CCCT) a SVPWM circuit and an ADCinterface circuit The sampling frequencies of the speedcontrol loop and current control loop are designedwith 2 kHzand 16 kHz respectively The frequency divider generates50Mhz (Clk) and 125Mhz (Clk-step) clock to supply allcircuits in Figure 3 The internal circuit of CCCT performs
the function of two PI controllers table look-up for sincosfunction and the coordinate transformation for Clark Parkinverse Park and modified inverse Clarke The detailedcircuit design of CCCT speed PI controller ADC interfaceand SVPWM generation in Figure 3 refers to [8] Hereinonly the digital hardware circuit design of the EKF-basedrotor FA and rotor speed estimation is described To reducethe FPGA resource usage a finite-state machine (FSM) isemployed to model the EKF-based algorithm whose designprocedure andmathematical formulation are presented in theprevious sectionThedesign result is shown in Figure 4whichuses one adder one multiplier one divider two sincos look-up table shifters registers and so forth and manipulates 131steps machine to carry out the overall computationThe datatype adopts 16-bit lengthwithQ15 format and 2rsquos complementoperation The multiplier adder and divider apply AlteraLPM (Library ParameterizedModules) standard In Figure 4the steps 1199040 sim 11990412 execute the calculation of Jacobian matrixand predict temporary state variables 11990413 sim 11990468 perform thecomputation of temporary covariance matrix steps 11990469 sim11990470 are for state error calculation steps 11990471sim119904120 update of
10 Mathematical Problems in Engineering
0 01 02 03 04 05 06
0100200300
Spee
d (r
pm)
Speed command Actual
rotor speed
Estimated rotor speed
minus100minus200minus300
Time (s)
(a)
0 01 02 03 04 05 06
005
115
Curr
ent (
A)
minus05
minus1
iqid
Time (s)
(b)
0 01 02 03 04 05 06
0100200300400500
Flux
angl
e (FA
) (d
eg)
Actual rotor FA
Estimated rotor FAby EKF
minus100
Time (s)
(c)
Figure 8 PMSM running at low speed (200 rpm) and inverse speed (plusmn200 rpm) condition (a) Speed step response (b) current responseand (c) actual rotor FA and estimated rotor FA
0 005 01 015 02 025 03 035 04 045 05
0100020003000
Spee
d (r
pm)
Time (s)
Speed command
Estimated rotor speed
Actual rotor speed
minus1000
minus2000
minus3000
(a)
0 005 01 015 02 025 03 035 04 045 05
0
2
4Cu
rren
t (A
)
Time (s)
minus2
minus4
iq
id
(b)
0 005 01 015 02 025 03 035 04 045 05
0100200300400
Flux
angl
e (FA
) (de
g)
Time (s)
Actual rotor FA
Estimated rotor FA by EKF minus100
(c)
Figure 9 PMSM running at wide-range high speed (2000 rpm) and inverse speed (plusmn1000 rpm) condition (a) Speed step response (b) currentresponse AND (c) actual rotor FA and estimated rotor FA
the present covariance matrix 119875119899 and calculate the Kalmangain 119870119899 119904121sim 119904130 describe the present state tuning as wellas executing the computation of rotor FA and rotor speedAccording to (30) the computation of temporary covariancematrix 119875119899|119899minus1in Figure 4 is described in Figure 5 Furtheraccording to (18) (33)-(34) and (36) the update of thepresent covariancematrix119875119899 and calculation theKalman gain119870119899 in Figure 4 are illustrated in Figure 6 The operation ofeach step in Figure 4 is 80 ns (125MHz) in FPGA thereforea total of 131 steps need only 1048 120583s operation timesThe FPGA (Altera) resource usages of EKF-based rotor FAand rotor speed estimation in Figure 4 is 4158 LEs (logicelements) and 2890 RAM bits Additionally the FPGA
resource usages of the circuits of CCCT speed PI controllerADC interface and SVPWM in Figure 3 are 864 LEs and24576 RAM 2043 LEs and 0RAM bits 136 LEs and 0RAMbits and 1221 LEs and 0RAM bits respectively
The SimulinkModelSim cosimulation architecture for sen-sorless PMSM speed control system is shown in Figure 7The SimPowerSystem-Blockset in the Simulink executes thePMSM and the IGBT-based inverterThe EDA simulator linkfor ModelSim executes the cosimulation using VHDL code
Mathematical Problems in Engineering 11
LP filter circuit
Rectifier Inverter
Ac source
Isolated and driving circuits
ADC
ADC
PWM6PWM1
PMSM
Digital circuitof speed PI controller EKF-based rotor FA and speed estimation
and current vector controller for PMSM
FPGA-based sensorless speed control IP
Load
Externalmemory
(Nios II processor)
Embedded processor IP
Application IP
L
C
T+A
TminusA
T+B
TminusB
T+C
TminusC
U V W
ia
ib
CPU
On-chipROM
On-chipRAM
UART
PIO
Timer
SPI
SDRAMcontroller
Aval
on b
us
(a)
(b)
Figure 10 Experimental system (a) with block diagram and (b) in real system
running in ModelSim program It executes the function ofthe sensorless speed controller by three works The work-1to work-3 of ModelSim in Figure 7 respectively perform thefunction of speed loop PI controller the function of cur-rent controller and coordinate transformation (CCCT) andSVPWM and the function of EKF-based rotor FA and rotorspeed estimation The sampling frequency in current controlloop and EKF-based estimation algorithm is designed with16 kHz but in speed control loop is 2 kHz The clocks of50MHz and 125MHz will supply all works of ModelSimThe FPGA (Altera) resource usages of work-1 to work-3 are2043 LEs and 0 RAM bits 2085 LEs and 24576 RAM bitsand 4158 LEs and 2890 RAM bits respectively
In simulation the designed PMSM parameters used inFigure 7 are as follows pole pairs are 4 stator phase resis-tance is 13Ω stator inductance is 63mH inertia is 119869 =
0000108 kglowastm2 and friction factor is 119865 = 00013NlowastmlowastsPI gains in speed control loop are designed with119870119901 = 02442and 119870119894 = 000458 To evaluate the proposed controllerperformance PMSM running at low speed (200 rpm) andinverse speed (from 200 rpm to minus200 rpm or vice versa) con-dition is firstly considered and its simulation results regard-ing as the speed step response the current response as wellas the actual rotor flux angle (FA) and the estimated rotorflux angle are shown in Figure 8 It shows that the motorspeed gives a good dynamic response performance with a
12 Mathematical Problems in Engineering
0 02 04 06 08 1 12 14 16 18 2
0
500 Speed command
Rotor speed
200
Time (s)
Spee
d (r
pm)
minus500
minus200
(a)
0
100
200
300
400
0 02 04 06 08 1 12 14 16 18 2
Actual rotor FA Estimated rotor FA
Time (s)
Flux
angl
e (de
g)
(b)
Figure 11 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) actual rotor FA and estimated rotor FA
0200400600800
10001200 Speed
command
Actual rotor speed
Estimated rotor speed
0 05 1 15 2 25 3Time (s)
Spee
d (r
pm)
(a)
0 05 1 15 2 25 3Time (s)
Curr
ent (
A) iq
id
0
051
15
minus05
minus1
(b)
Figure 12 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) current response
little overshoot and 25ms rising time It also shows thatthe estimated rotor speed can track actual rotor speed wellFigure 8(b) shows a successful vector control because 119894119889 iscontrolled to zero Figure 8(c) shows that the estimated rotorFA can fast track the actual rotor FA even in the inverse speedcommand condition Further another simulation case whilethe PMSMrunning at wide-range high speed (from0 rpm rarr
minus2000 rpm) and inverse speed (from 1000 rpm tominus1000 rpm)condition is tested and its simulation results are shown inFigure 9 It presents that not only at speed tracking butalso at rotor FA tracking the estimated value adopted byEKF method can give a good follow to the real rotor valueHowever except in the initial condition the actual rotorspeed gives a fast step response by 18ms rising time near0mm steady-state value and maximum 175 overshoot
5 Experimental System and Results
After confirming the correctness of the proposed EKF-basedsensorless control IP by simulation the VHDL codes aredirectly applied to the experimental FPGA-based sensorlessPMSM drive system The block diagram and real experi-mental system are depicted in Figure 10 The main devicesinclude a PMSM a DE2 board with Altera CycloneII FPGAa motor driver and a power supplier The parameters of thePMSM are 119903119904 = 063Ω 119871 = 277mH and 4 pole pairs Theinput voltage continuous current rating torque rating speedand continuous power of the PMSM are 220V 12A 23N-m 3000 rpm and 750W respectively The Altera CycloneIIEP2C35 chip adopted in the design possesses 33216 LEsmaximum 475 available IO pins 483840 RAM and 35
embedded multipliers The chip can be embedded with aNios II multicore processor that is equipped with several32-bit CPU flexibility of core size 1 to 16Mbytes of flashmemory in the available memory chip 1 Mbyte SRAM 16Mbyte SDRAM and 4 Gbytes memory outside of the chip Inimplementation except the VHDL codes of CCCT EKF andPI controller the VHDL code of ADC interface circuit shouldbe added and integrated and then downloaded into FPGAThePI gains of speed control loop in experiment are designedwith 119870119901 = 0512 and119870119894 = 0021
In the experimental case PMSM running at low speed(200 rpm) and inverse speed (from 200 rpm to minus200 rpm orvice versa) condition are firstly considered and its experi-ment results regarding the speed step response as well as theactual rotor FA and the estimated rotor FA are shown inFigure 11 Figure 11(a) shows that the motor speed gives agood dynamic response performance with a little oscillationand overshoot and it has 15ms rising time Figure 11(b) showsthat the estimated FA can fast track the actual rotor FA evenin the inverse speed command condition Further anotherexperimental case while the PMSM running at mediumspeed (from 0 rpm rarr 300 rpm rarr 600 rpm rarr 900 rpm rarr
600 rpm rarr 900 rpm) condition is evaluated and its experi-ment results are shown in Figure 12The Figure 12(a) presentsa fast speed trackingwith 15ms rising time and no occurrenceof overshoot condition Figure 12(b) shows a successful vectorcontrol due to the 119894119889 being controlled to zeroTherefore fromthe simulation results in Figures 8 and 9 and the experimentalresults in Figures 11 and 12 it is demonstrated that the EKF-based estimation algorithm used in sensorless PMSM driveand the behavior description by usingVHDL are effective andcorrect
Mathematical Problems in Engineering 13
6 Conclusions
This study has presented a sensorless PMSM drive based onEKF and successfully demonstrated its performance throughcosimulation by using SimulinkModelSim and implemen-tation by using FPGA In realization aspect the VHDL isused to describe the behavior of EKF algorithm and FSM isused to reduce the FPGA resource usage therefore it onlyneeds 4158 LEs and 2890 RAMbits In computational poweraspect the operation time to complete the computation ofEKF algorithm is only 1048 120583s which is less than the 625120583s(16 KHz) sampling time in current control loop In simulatedand experimental results it shows that the use of EKF insensorless PMSM drive can accurately estimate the rotorFA and rotor speed and it can give a good step responseperformance in case of low speed control inverse speedcontrol and high speed control as well
Acknowledgment
This work was supported by the National Science Council ofChina under Grant no NSC 101-2221-E-218-039
References
[1] V C Ilioudis and N I Margaris ldquoPMSM sensorless speedestimation based on sliding mode observersrdquo in Proceedings ofthe 39th IEEE Annual Power Electronics Specialists Conference(PESC rsquo08) pp 2838ndash2843 June 2008
[2] S Chi Z Zhang and L Xu ldquoSliding-mode sensorless controlof direct-drive PM synchronous motors for washing machineapplicationsrdquo IEEE Transactions on Industry Applications vol45 no 2 pp 582ndash590 2009
[3] V Delli Colli R di Stefano and F Marignetti ldquoA system-on-chip sensorless control for a permanent-magnet synchronousmotorrdquo IEEE Transactions on Industrial Electronics vol 57 no11 pp 3822ndash3829 2010
[4] S Bolognani R Oboe andM Zigliotto ldquoSensorless full-digitalpmsm drive with ekf estimation of speed and rotor positionrdquoIEEE Transactions on Industrial Electronics vol 46 no 1 pp184ndash191 1999
[5] M C Huang A J Moses and F Anayi ldquoThe comparison ofsensorless estimation techniques for PMSM between extendedKalman filter and flux-linkage observerrdquo in Proceedings of the21st Annual IEEE Applied Power Electronics Conference andExposition (APEC rsquo06) pp 654ndash659 March 2006
[6] WWang M Zhang and Q Wu ldquoApplication of reduced-orderextended kalman filter in permanent magnet synchronousmotor sensorless regulating systemrdquo in Proceedings of the Inter-national Conference on Digital Manufacturing and Automation(ICDMA rsquo10) pp 271ndash274 December 2010
[7] J-S Jang B-G Park T-S Kim D M Lee and D-S HyunldquoParallel reduced-order extended Kalman Filter for PMSMsensorless drivesrdquo in Proceedings of the 34th Annual Conferenceof the IEEE Industrial Electronics Society (IECON rsquo08) pp 1326ndash1331 November 2008
[8] Y-S Kung and M-H Tsai ldquoFPGA-based speed control IC forPMSM drive with adaptive fuzzy controlrdquo IEEE Transactions onPower Electronics vol 22 no 6 pp 2476ndash2486 2007
[9] L Idkhajine and E Monmasson ldquoDesign methodology forcomplex FPGA-based controllersmdashapplication to an EKF sen-sorless AC driverdquo in Proceedings of the 19th International Con-ference on Electrical Machines (ICEM rsquo10) pp 1ndash6 September2010
[10] H-H Chou Y-S Kung N Vu Quynh and S Cheng ldquoOpti-mized FPGA design verification and implementation of aneuro-fuzzy controller for PMSM drivesrdquo Mathematics andComputers in Simulation vol 90 pp 28ndash44 2013
[11] Y S Kung and T H Nguyen ldquoSimulinkModelsim Co-simu-lation of EKF-based Sensorless PMSM drivesrdquo in Proceedingsof IEEE International on Power Electronics and Drive Systems(PEDS rsquo13) pp 709ndash713 2013
[12] Y Li J Huo X Li J Wen YWang and B Shan ldquoAn open-loopsinmicrostepping driver based on FPGA and the co-simulationof modelsim and simulinkrdquo in Proceedings of the InternationalConference on Computer Mechatronics Control and ElectronicEngineering (CMCE rsquo10) pp 223ndash227 August 2010
[13] The Mathworks ldquoMatlabSimulink Users Guide ApplicationProgram Interface Guiderdquo 2004
where 119896119894119895 is the element in Kalman gain 119870119899 sdot 120572(119899) = 119894120572(119899) minus120572(119899 | 119899 minus 1) and 120573(119899) = 119894120573(119899) minus 120573(119899 | 119899 minus 1)
Mathematical Problems in Engineering 9
(work-3)
(work-2)
(work-1)
Speedcommand
Speed commandRotor speed and Kalman speed
Gain1
Torque
S-function
Flux angle
Stator current
DCTm
mA
NSB
C
0001voltage source
Gain6Saturation
Saturation1
Saturation2
Data type conversion 1
Data type conversion 10
Data type conversion 11
Data type conversion 12
Gain7
Gain8
transformation
flux angleReal and estimated
Constant1
Constant2
Permanent magnetsynchronous machine
Convert
Convert
Convert
Convert
Convert
Convert
Convert0
ModelSim
ModelSim
ModelSim
cmd
Rotor speed
Current command
Speed loop PI controller
iq current command
cmd iq
cmd id
Flux angle
Phase a current
Phase b current
Phase c current
PMW1
PMW2
PMW3
PMW4
PMW5
PMW6
id out
iq out
CCCT and SVPWM
-K-
-K-
-K-
-K-
d-axis current
Motor dq current
Flux angle
wr
Full-order EKF
IGBT-based inverter
idq
ln1Conn1
ln2Conn2
ln3Conn3
ln4Conn4
ln5Conn5
ln6Conn6
+⟨Rotor speed wm (rads)⟩⟨Electromagnetic torque Te (Nlowastm)⟩⟨Rotor angle thetam (rad)⟩⟨Stator current is d (A)⟩⟨Stator current is q (A)⟩⟨Stator current is a (A)⟩⟨Stator current is b (A)⟩⟨Stator current is c (A)⟩
120572
i120572
120573
i120573
V120572 out
V120573 out
I120572 out
I120573 out
Figure 7 The SimulinkModelSim cosimulation architecture for sensorless speed control of PMSM drive
Step 8 Update the present covariance matrix 119875119899 from (18)where 119870119899119867119875119899|119899minus1 can be directly obtained as follows
Step 9 Calculate the rotor speed from (27) then set 119899 = 119899 +1 and go back to Step 2
3 Design of Sensorless Speed Controller IP
Figure 3 illustrates the internal architecture of the proposedFPGA implementation of a sensorless speed control IP forPMSM drive system The internal circuit comprises a NiosII embedded processor IP and an application IP The Nios IIprocessor is depicted to generate the speed command collectthe response data and communicate with external deviceAll programs in Nios II processor are coded in the Clanguage The application IP includes mainly a circuit of anEKF-based rotor FA and rotor speed estimation a speedPI controller a circuit for current controllers and coordinatetransformation (CCCT) a SVPWM circuit and an ADCinterface circuit The sampling frequencies of the speedcontrol loop and current control loop are designedwith 2 kHzand 16 kHz respectively The frequency divider generates50Mhz (Clk) and 125Mhz (Clk-step) clock to supply allcircuits in Figure 3 The internal circuit of CCCT performs
the function of two PI controllers table look-up for sincosfunction and the coordinate transformation for Clark Parkinverse Park and modified inverse Clarke The detailedcircuit design of CCCT speed PI controller ADC interfaceand SVPWM generation in Figure 3 refers to [8] Hereinonly the digital hardware circuit design of the EKF-basedrotor FA and rotor speed estimation is described To reducethe FPGA resource usage a finite-state machine (FSM) isemployed to model the EKF-based algorithm whose designprocedure andmathematical formulation are presented in theprevious sectionThedesign result is shown in Figure 4whichuses one adder one multiplier one divider two sincos look-up table shifters registers and so forth and manipulates 131steps machine to carry out the overall computationThe datatype adopts 16-bit lengthwithQ15 format and 2rsquos complementoperation The multiplier adder and divider apply AlteraLPM (Library ParameterizedModules) standard In Figure 4the steps 1199040 sim 11990412 execute the calculation of Jacobian matrixand predict temporary state variables 11990413 sim 11990468 perform thecomputation of temporary covariance matrix steps 11990469 sim11990470 are for state error calculation steps 11990471sim119904120 update of
10 Mathematical Problems in Engineering
0 01 02 03 04 05 06
0100200300
Spee
d (r
pm)
Speed command Actual
rotor speed
Estimated rotor speed
minus100minus200minus300
Time (s)
(a)
0 01 02 03 04 05 06
005
115
Curr
ent (
A)
minus05
minus1
iqid
Time (s)
(b)
0 01 02 03 04 05 06
0100200300400500
Flux
angl
e (FA
) (d
eg)
Actual rotor FA
Estimated rotor FAby EKF
minus100
Time (s)
(c)
Figure 8 PMSM running at low speed (200 rpm) and inverse speed (plusmn200 rpm) condition (a) Speed step response (b) current responseand (c) actual rotor FA and estimated rotor FA
0 005 01 015 02 025 03 035 04 045 05
0100020003000
Spee
d (r
pm)
Time (s)
Speed command
Estimated rotor speed
Actual rotor speed
minus1000
minus2000
minus3000
(a)
0 005 01 015 02 025 03 035 04 045 05
0
2
4Cu
rren
t (A
)
Time (s)
minus2
minus4
iq
id
(b)
0 005 01 015 02 025 03 035 04 045 05
0100200300400
Flux
angl
e (FA
) (de
g)
Time (s)
Actual rotor FA
Estimated rotor FA by EKF minus100
(c)
Figure 9 PMSM running at wide-range high speed (2000 rpm) and inverse speed (plusmn1000 rpm) condition (a) Speed step response (b) currentresponse AND (c) actual rotor FA and estimated rotor FA
the present covariance matrix 119875119899 and calculate the Kalmangain 119870119899 119904121sim 119904130 describe the present state tuning as wellas executing the computation of rotor FA and rotor speedAccording to (30) the computation of temporary covariancematrix 119875119899|119899minus1in Figure 4 is described in Figure 5 Furtheraccording to (18) (33)-(34) and (36) the update of thepresent covariancematrix119875119899 and calculation theKalman gain119870119899 in Figure 4 are illustrated in Figure 6 The operation ofeach step in Figure 4 is 80 ns (125MHz) in FPGA thereforea total of 131 steps need only 1048 120583s operation timesThe FPGA (Altera) resource usages of EKF-based rotor FAand rotor speed estimation in Figure 4 is 4158 LEs (logicelements) and 2890 RAM bits Additionally the FPGA
resource usages of the circuits of CCCT speed PI controllerADC interface and SVPWM in Figure 3 are 864 LEs and24576 RAM 2043 LEs and 0RAM bits 136 LEs and 0RAMbits and 1221 LEs and 0RAM bits respectively
The SimulinkModelSim cosimulation architecture for sen-sorless PMSM speed control system is shown in Figure 7The SimPowerSystem-Blockset in the Simulink executes thePMSM and the IGBT-based inverterThe EDA simulator linkfor ModelSim executes the cosimulation using VHDL code
Mathematical Problems in Engineering 11
LP filter circuit
Rectifier Inverter
Ac source
Isolated and driving circuits
ADC
ADC
PWM6PWM1
PMSM
Digital circuitof speed PI controller EKF-based rotor FA and speed estimation
and current vector controller for PMSM
FPGA-based sensorless speed control IP
Load
Externalmemory
(Nios II processor)
Embedded processor IP
Application IP
L
C
T+A
TminusA
T+B
TminusB
T+C
TminusC
U V W
ia
ib
CPU
On-chipROM
On-chipRAM
UART
PIO
Timer
SPI
SDRAMcontroller
Aval
on b
us
(a)
(b)
Figure 10 Experimental system (a) with block diagram and (b) in real system
running in ModelSim program It executes the function ofthe sensorless speed controller by three works The work-1to work-3 of ModelSim in Figure 7 respectively perform thefunction of speed loop PI controller the function of cur-rent controller and coordinate transformation (CCCT) andSVPWM and the function of EKF-based rotor FA and rotorspeed estimation The sampling frequency in current controlloop and EKF-based estimation algorithm is designed with16 kHz but in speed control loop is 2 kHz The clocks of50MHz and 125MHz will supply all works of ModelSimThe FPGA (Altera) resource usages of work-1 to work-3 are2043 LEs and 0 RAM bits 2085 LEs and 24576 RAM bitsand 4158 LEs and 2890 RAM bits respectively
In simulation the designed PMSM parameters used inFigure 7 are as follows pole pairs are 4 stator phase resis-tance is 13Ω stator inductance is 63mH inertia is 119869 =
0000108 kglowastm2 and friction factor is 119865 = 00013NlowastmlowastsPI gains in speed control loop are designed with119870119901 = 02442and 119870119894 = 000458 To evaluate the proposed controllerperformance PMSM running at low speed (200 rpm) andinverse speed (from 200 rpm to minus200 rpm or vice versa) con-dition is firstly considered and its simulation results regard-ing as the speed step response the current response as wellas the actual rotor flux angle (FA) and the estimated rotorflux angle are shown in Figure 8 It shows that the motorspeed gives a good dynamic response performance with a
12 Mathematical Problems in Engineering
0 02 04 06 08 1 12 14 16 18 2
0
500 Speed command
Rotor speed
200
Time (s)
Spee
d (r
pm)
minus500
minus200
(a)
0
100
200
300
400
0 02 04 06 08 1 12 14 16 18 2
Actual rotor FA Estimated rotor FA
Time (s)
Flux
angl
e (de
g)
(b)
Figure 11 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) actual rotor FA and estimated rotor FA
0200400600800
10001200 Speed
command
Actual rotor speed
Estimated rotor speed
0 05 1 15 2 25 3Time (s)
Spee
d (r
pm)
(a)
0 05 1 15 2 25 3Time (s)
Curr
ent (
A) iq
id
0
051
15
minus05
minus1
(b)
Figure 12 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) current response
little overshoot and 25ms rising time It also shows thatthe estimated rotor speed can track actual rotor speed wellFigure 8(b) shows a successful vector control because 119894119889 iscontrolled to zero Figure 8(c) shows that the estimated rotorFA can fast track the actual rotor FA even in the inverse speedcommand condition Further another simulation case whilethe PMSMrunning at wide-range high speed (from0 rpm rarr
minus2000 rpm) and inverse speed (from 1000 rpm tominus1000 rpm)condition is tested and its simulation results are shown inFigure 9 It presents that not only at speed tracking butalso at rotor FA tracking the estimated value adopted byEKF method can give a good follow to the real rotor valueHowever except in the initial condition the actual rotorspeed gives a fast step response by 18ms rising time near0mm steady-state value and maximum 175 overshoot
5 Experimental System and Results
After confirming the correctness of the proposed EKF-basedsensorless control IP by simulation the VHDL codes aredirectly applied to the experimental FPGA-based sensorlessPMSM drive system The block diagram and real experi-mental system are depicted in Figure 10 The main devicesinclude a PMSM a DE2 board with Altera CycloneII FPGAa motor driver and a power supplier The parameters of thePMSM are 119903119904 = 063Ω 119871 = 277mH and 4 pole pairs Theinput voltage continuous current rating torque rating speedand continuous power of the PMSM are 220V 12A 23N-m 3000 rpm and 750W respectively The Altera CycloneIIEP2C35 chip adopted in the design possesses 33216 LEsmaximum 475 available IO pins 483840 RAM and 35
embedded multipliers The chip can be embedded with aNios II multicore processor that is equipped with several32-bit CPU flexibility of core size 1 to 16Mbytes of flashmemory in the available memory chip 1 Mbyte SRAM 16Mbyte SDRAM and 4 Gbytes memory outside of the chip Inimplementation except the VHDL codes of CCCT EKF andPI controller the VHDL code of ADC interface circuit shouldbe added and integrated and then downloaded into FPGAThePI gains of speed control loop in experiment are designedwith 119870119901 = 0512 and119870119894 = 0021
In the experimental case PMSM running at low speed(200 rpm) and inverse speed (from 200 rpm to minus200 rpm orvice versa) condition are firstly considered and its experi-ment results regarding the speed step response as well as theactual rotor FA and the estimated rotor FA are shown inFigure 11 Figure 11(a) shows that the motor speed gives agood dynamic response performance with a little oscillationand overshoot and it has 15ms rising time Figure 11(b) showsthat the estimated FA can fast track the actual rotor FA evenin the inverse speed command condition Further anotherexperimental case while the PMSM running at mediumspeed (from 0 rpm rarr 300 rpm rarr 600 rpm rarr 900 rpm rarr
600 rpm rarr 900 rpm) condition is evaluated and its experi-ment results are shown in Figure 12The Figure 12(a) presentsa fast speed trackingwith 15ms rising time and no occurrenceof overshoot condition Figure 12(b) shows a successful vectorcontrol due to the 119894119889 being controlled to zeroTherefore fromthe simulation results in Figures 8 and 9 and the experimentalresults in Figures 11 and 12 it is demonstrated that the EKF-based estimation algorithm used in sensorless PMSM driveand the behavior description by usingVHDL are effective andcorrect
Mathematical Problems in Engineering 13
6 Conclusions
This study has presented a sensorless PMSM drive based onEKF and successfully demonstrated its performance throughcosimulation by using SimulinkModelSim and implemen-tation by using FPGA In realization aspect the VHDL isused to describe the behavior of EKF algorithm and FSM isused to reduce the FPGA resource usage therefore it onlyneeds 4158 LEs and 2890 RAMbits In computational poweraspect the operation time to complete the computation ofEKF algorithm is only 1048 120583s which is less than the 625120583s(16 KHz) sampling time in current control loop In simulatedand experimental results it shows that the use of EKF insensorless PMSM drive can accurately estimate the rotorFA and rotor speed and it can give a good step responseperformance in case of low speed control inverse speedcontrol and high speed control as well
Acknowledgment
This work was supported by the National Science Council ofChina under Grant no NSC 101-2221-E-218-039
References
[1] V C Ilioudis and N I Margaris ldquoPMSM sensorless speedestimation based on sliding mode observersrdquo in Proceedings ofthe 39th IEEE Annual Power Electronics Specialists Conference(PESC rsquo08) pp 2838ndash2843 June 2008
[2] S Chi Z Zhang and L Xu ldquoSliding-mode sensorless controlof direct-drive PM synchronous motors for washing machineapplicationsrdquo IEEE Transactions on Industry Applications vol45 no 2 pp 582ndash590 2009
[3] V Delli Colli R di Stefano and F Marignetti ldquoA system-on-chip sensorless control for a permanent-magnet synchronousmotorrdquo IEEE Transactions on Industrial Electronics vol 57 no11 pp 3822ndash3829 2010
[4] S Bolognani R Oboe andM Zigliotto ldquoSensorless full-digitalpmsm drive with ekf estimation of speed and rotor positionrdquoIEEE Transactions on Industrial Electronics vol 46 no 1 pp184ndash191 1999
[5] M C Huang A J Moses and F Anayi ldquoThe comparison ofsensorless estimation techniques for PMSM between extendedKalman filter and flux-linkage observerrdquo in Proceedings of the21st Annual IEEE Applied Power Electronics Conference andExposition (APEC rsquo06) pp 654ndash659 March 2006
[6] WWang M Zhang and Q Wu ldquoApplication of reduced-orderextended kalman filter in permanent magnet synchronousmotor sensorless regulating systemrdquo in Proceedings of the Inter-national Conference on Digital Manufacturing and Automation(ICDMA rsquo10) pp 271ndash274 December 2010
[7] J-S Jang B-G Park T-S Kim D M Lee and D-S HyunldquoParallel reduced-order extended Kalman Filter for PMSMsensorless drivesrdquo in Proceedings of the 34th Annual Conferenceof the IEEE Industrial Electronics Society (IECON rsquo08) pp 1326ndash1331 November 2008
[8] Y-S Kung and M-H Tsai ldquoFPGA-based speed control IC forPMSM drive with adaptive fuzzy controlrdquo IEEE Transactions onPower Electronics vol 22 no 6 pp 2476ndash2486 2007
[9] L Idkhajine and E Monmasson ldquoDesign methodology forcomplex FPGA-based controllersmdashapplication to an EKF sen-sorless AC driverdquo in Proceedings of the 19th International Con-ference on Electrical Machines (ICEM rsquo10) pp 1ndash6 September2010
[10] H-H Chou Y-S Kung N Vu Quynh and S Cheng ldquoOpti-mized FPGA design verification and implementation of aneuro-fuzzy controller for PMSM drivesrdquo Mathematics andComputers in Simulation vol 90 pp 28ndash44 2013
[11] Y S Kung and T H Nguyen ldquoSimulinkModelsim Co-simu-lation of EKF-based Sensorless PMSM drivesrdquo in Proceedingsof IEEE International on Power Electronics and Drive Systems(PEDS rsquo13) pp 709ndash713 2013
[12] Y Li J Huo X Li J Wen YWang and B Shan ldquoAn open-loopsinmicrostepping driver based on FPGA and the co-simulationof modelsim and simulinkrdquo in Proceedings of the InternationalConference on Computer Mechatronics Control and ElectronicEngineering (CMCE rsquo10) pp 223ndash227 August 2010
[13] The Mathworks ldquoMatlabSimulink Users Guide ApplicationProgram Interface Guiderdquo 2004
+⟨Rotor speed wm (rads)⟩⟨Electromagnetic torque Te (Nlowastm)⟩⟨Rotor angle thetam (rad)⟩⟨Stator current is d (A)⟩⟨Stator current is q (A)⟩⟨Stator current is a (A)⟩⟨Stator current is b (A)⟩⟨Stator current is c (A)⟩
120572
i120572
120573
i120573
V120572 out
V120573 out
I120572 out
I120573 out
Figure 7 The SimulinkModelSim cosimulation architecture for sensorless speed control of PMSM drive
Step 8 Update the present covariance matrix 119875119899 from (18)where 119870119899119867119875119899|119899minus1 can be directly obtained as follows
Step 9 Calculate the rotor speed from (27) then set 119899 = 119899 +1 and go back to Step 2
3 Design of Sensorless Speed Controller IP
Figure 3 illustrates the internal architecture of the proposedFPGA implementation of a sensorless speed control IP forPMSM drive system The internal circuit comprises a NiosII embedded processor IP and an application IP The Nios IIprocessor is depicted to generate the speed command collectthe response data and communicate with external deviceAll programs in Nios II processor are coded in the Clanguage The application IP includes mainly a circuit of anEKF-based rotor FA and rotor speed estimation a speedPI controller a circuit for current controllers and coordinatetransformation (CCCT) a SVPWM circuit and an ADCinterface circuit The sampling frequencies of the speedcontrol loop and current control loop are designedwith 2 kHzand 16 kHz respectively The frequency divider generates50Mhz (Clk) and 125Mhz (Clk-step) clock to supply allcircuits in Figure 3 The internal circuit of CCCT performs
the function of two PI controllers table look-up for sincosfunction and the coordinate transformation for Clark Parkinverse Park and modified inverse Clarke The detailedcircuit design of CCCT speed PI controller ADC interfaceand SVPWM generation in Figure 3 refers to [8] Hereinonly the digital hardware circuit design of the EKF-basedrotor FA and rotor speed estimation is described To reducethe FPGA resource usage a finite-state machine (FSM) isemployed to model the EKF-based algorithm whose designprocedure andmathematical formulation are presented in theprevious sectionThedesign result is shown in Figure 4whichuses one adder one multiplier one divider two sincos look-up table shifters registers and so forth and manipulates 131steps machine to carry out the overall computationThe datatype adopts 16-bit lengthwithQ15 format and 2rsquos complementoperation The multiplier adder and divider apply AlteraLPM (Library ParameterizedModules) standard In Figure 4the steps 1199040 sim 11990412 execute the calculation of Jacobian matrixand predict temporary state variables 11990413 sim 11990468 perform thecomputation of temporary covariance matrix steps 11990469 sim11990470 are for state error calculation steps 11990471sim119904120 update of
10 Mathematical Problems in Engineering
0 01 02 03 04 05 06
0100200300
Spee
d (r
pm)
Speed command Actual
rotor speed
Estimated rotor speed
minus100minus200minus300
Time (s)
(a)
0 01 02 03 04 05 06
005
115
Curr
ent (
A)
minus05
minus1
iqid
Time (s)
(b)
0 01 02 03 04 05 06
0100200300400500
Flux
angl
e (FA
) (d
eg)
Actual rotor FA
Estimated rotor FAby EKF
minus100
Time (s)
(c)
Figure 8 PMSM running at low speed (200 rpm) and inverse speed (plusmn200 rpm) condition (a) Speed step response (b) current responseand (c) actual rotor FA and estimated rotor FA
0 005 01 015 02 025 03 035 04 045 05
0100020003000
Spee
d (r
pm)
Time (s)
Speed command
Estimated rotor speed
Actual rotor speed
minus1000
minus2000
minus3000
(a)
0 005 01 015 02 025 03 035 04 045 05
0
2
4Cu
rren
t (A
)
Time (s)
minus2
minus4
iq
id
(b)
0 005 01 015 02 025 03 035 04 045 05
0100200300400
Flux
angl
e (FA
) (de
g)
Time (s)
Actual rotor FA
Estimated rotor FA by EKF minus100
(c)
Figure 9 PMSM running at wide-range high speed (2000 rpm) and inverse speed (plusmn1000 rpm) condition (a) Speed step response (b) currentresponse AND (c) actual rotor FA and estimated rotor FA
the present covariance matrix 119875119899 and calculate the Kalmangain 119870119899 119904121sim 119904130 describe the present state tuning as wellas executing the computation of rotor FA and rotor speedAccording to (30) the computation of temporary covariancematrix 119875119899|119899minus1in Figure 4 is described in Figure 5 Furtheraccording to (18) (33)-(34) and (36) the update of thepresent covariancematrix119875119899 and calculation theKalman gain119870119899 in Figure 4 are illustrated in Figure 6 The operation ofeach step in Figure 4 is 80 ns (125MHz) in FPGA thereforea total of 131 steps need only 1048 120583s operation timesThe FPGA (Altera) resource usages of EKF-based rotor FAand rotor speed estimation in Figure 4 is 4158 LEs (logicelements) and 2890 RAM bits Additionally the FPGA
resource usages of the circuits of CCCT speed PI controllerADC interface and SVPWM in Figure 3 are 864 LEs and24576 RAM 2043 LEs and 0RAM bits 136 LEs and 0RAMbits and 1221 LEs and 0RAM bits respectively
The SimulinkModelSim cosimulation architecture for sen-sorless PMSM speed control system is shown in Figure 7The SimPowerSystem-Blockset in the Simulink executes thePMSM and the IGBT-based inverterThe EDA simulator linkfor ModelSim executes the cosimulation using VHDL code
Mathematical Problems in Engineering 11
LP filter circuit
Rectifier Inverter
Ac source
Isolated and driving circuits
ADC
ADC
PWM6PWM1
PMSM
Digital circuitof speed PI controller EKF-based rotor FA and speed estimation
and current vector controller for PMSM
FPGA-based sensorless speed control IP
Load
Externalmemory
(Nios II processor)
Embedded processor IP
Application IP
L
C
T+A
TminusA
T+B
TminusB
T+C
TminusC
U V W
ia
ib
CPU
On-chipROM
On-chipRAM
UART
PIO
Timer
SPI
SDRAMcontroller
Aval
on b
us
(a)
(b)
Figure 10 Experimental system (a) with block diagram and (b) in real system
running in ModelSim program It executes the function ofthe sensorless speed controller by three works The work-1to work-3 of ModelSim in Figure 7 respectively perform thefunction of speed loop PI controller the function of cur-rent controller and coordinate transformation (CCCT) andSVPWM and the function of EKF-based rotor FA and rotorspeed estimation The sampling frequency in current controlloop and EKF-based estimation algorithm is designed with16 kHz but in speed control loop is 2 kHz The clocks of50MHz and 125MHz will supply all works of ModelSimThe FPGA (Altera) resource usages of work-1 to work-3 are2043 LEs and 0 RAM bits 2085 LEs and 24576 RAM bitsand 4158 LEs and 2890 RAM bits respectively
In simulation the designed PMSM parameters used inFigure 7 are as follows pole pairs are 4 stator phase resis-tance is 13Ω stator inductance is 63mH inertia is 119869 =
0000108 kglowastm2 and friction factor is 119865 = 00013NlowastmlowastsPI gains in speed control loop are designed with119870119901 = 02442and 119870119894 = 000458 To evaluate the proposed controllerperformance PMSM running at low speed (200 rpm) andinverse speed (from 200 rpm to minus200 rpm or vice versa) con-dition is firstly considered and its simulation results regard-ing as the speed step response the current response as wellas the actual rotor flux angle (FA) and the estimated rotorflux angle are shown in Figure 8 It shows that the motorspeed gives a good dynamic response performance with a
12 Mathematical Problems in Engineering
0 02 04 06 08 1 12 14 16 18 2
0
500 Speed command
Rotor speed
200
Time (s)
Spee
d (r
pm)
minus500
minus200
(a)
0
100
200
300
400
0 02 04 06 08 1 12 14 16 18 2
Actual rotor FA Estimated rotor FA
Time (s)
Flux
angl
e (de
g)
(b)
Figure 11 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) actual rotor FA and estimated rotor FA
0200400600800
10001200 Speed
command
Actual rotor speed
Estimated rotor speed
0 05 1 15 2 25 3Time (s)
Spee
d (r
pm)
(a)
0 05 1 15 2 25 3Time (s)
Curr
ent (
A) iq
id
0
051
15
minus05
minus1
(b)
Figure 12 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) current response
little overshoot and 25ms rising time It also shows thatthe estimated rotor speed can track actual rotor speed wellFigure 8(b) shows a successful vector control because 119894119889 iscontrolled to zero Figure 8(c) shows that the estimated rotorFA can fast track the actual rotor FA even in the inverse speedcommand condition Further another simulation case whilethe PMSMrunning at wide-range high speed (from0 rpm rarr
minus2000 rpm) and inverse speed (from 1000 rpm tominus1000 rpm)condition is tested and its simulation results are shown inFigure 9 It presents that not only at speed tracking butalso at rotor FA tracking the estimated value adopted byEKF method can give a good follow to the real rotor valueHowever except in the initial condition the actual rotorspeed gives a fast step response by 18ms rising time near0mm steady-state value and maximum 175 overshoot
5 Experimental System and Results
After confirming the correctness of the proposed EKF-basedsensorless control IP by simulation the VHDL codes aredirectly applied to the experimental FPGA-based sensorlessPMSM drive system The block diagram and real experi-mental system are depicted in Figure 10 The main devicesinclude a PMSM a DE2 board with Altera CycloneII FPGAa motor driver and a power supplier The parameters of thePMSM are 119903119904 = 063Ω 119871 = 277mH and 4 pole pairs Theinput voltage continuous current rating torque rating speedand continuous power of the PMSM are 220V 12A 23N-m 3000 rpm and 750W respectively The Altera CycloneIIEP2C35 chip adopted in the design possesses 33216 LEsmaximum 475 available IO pins 483840 RAM and 35
embedded multipliers The chip can be embedded with aNios II multicore processor that is equipped with several32-bit CPU flexibility of core size 1 to 16Mbytes of flashmemory in the available memory chip 1 Mbyte SRAM 16Mbyte SDRAM and 4 Gbytes memory outside of the chip Inimplementation except the VHDL codes of CCCT EKF andPI controller the VHDL code of ADC interface circuit shouldbe added and integrated and then downloaded into FPGAThePI gains of speed control loop in experiment are designedwith 119870119901 = 0512 and119870119894 = 0021
In the experimental case PMSM running at low speed(200 rpm) and inverse speed (from 200 rpm to minus200 rpm orvice versa) condition are firstly considered and its experi-ment results regarding the speed step response as well as theactual rotor FA and the estimated rotor FA are shown inFigure 11 Figure 11(a) shows that the motor speed gives agood dynamic response performance with a little oscillationand overshoot and it has 15ms rising time Figure 11(b) showsthat the estimated FA can fast track the actual rotor FA evenin the inverse speed command condition Further anotherexperimental case while the PMSM running at mediumspeed (from 0 rpm rarr 300 rpm rarr 600 rpm rarr 900 rpm rarr
600 rpm rarr 900 rpm) condition is evaluated and its experi-ment results are shown in Figure 12The Figure 12(a) presentsa fast speed trackingwith 15ms rising time and no occurrenceof overshoot condition Figure 12(b) shows a successful vectorcontrol due to the 119894119889 being controlled to zeroTherefore fromthe simulation results in Figures 8 and 9 and the experimentalresults in Figures 11 and 12 it is demonstrated that the EKF-based estimation algorithm used in sensorless PMSM driveand the behavior description by usingVHDL are effective andcorrect
Mathematical Problems in Engineering 13
6 Conclusions
This study has presented a sensorless PMSM drive based onEKF and successfully demonstrated its performance throughcosimulation by using SimulinkModelSim and implemen-tation by using FPGA In realization aspect the VHDL isused to describe the behavior of EKF algorithm and FSM isused to reduce the FPGA resource usage therefore it onlyneeds 4158 LEs and 2890 RAMbits In computational poweraspect the operation time to complete the computation ofEKF algorithm is only 1048 120583s which is less than the 625120583s(16 KHz) sampling time in current control loop In simulatedand experimental results it shows that the use of EKF insensorless PMSM drive can accurately estimate the rotorFA and rotor speed and it can give a good step responseperformance in case of low speed control inverse speedcontrol and high speed control as well
Acknowledgment
This work was supported by the National Science Council ofChina under Grant no NSC 101-2221-E-218-039
References
[1] V C Ilioudis and N I Margaris ldquoPMSM sensorless speedestimation based on sliding mode observersrdquo in Proceedings ofthe 39th IEEE Annual Power Electronics Specialists Conference(PESC rsquo08) pp 2838ndash2843 June 2008
[2] S Chi Z Zhang and L Xu ldquoSliding-mode sensorless controlof direct-drive PM synchronous motors for washing machineapplicationsrdquo IEEE Transactions on Industry Applications vol45 no 2 pp 582ndash590 2009
[3] V Delli Colli R di Stefano and F Marignetti ldquoA system-on-chip sensorless control for a permanent-magnet synchronousmotorrdquo IEEE Transactions on Industrial Electronics vol 57 no11 pp 3822ndash3829 2010
[4] S Bolognani R Oboe andM Zigliotto ldquoSensorless full-digitalpmsm drive with ekf estimation of speed and rotor positionrdquoIEEE Transactions on Industrial Electronics vol 46 no 1 pp184ndash191 1999
[5] M C Huang A J Moses and F Anayi ldquoThe comparison ofsensorless estimation techniques for PMSM between extendedKalman filter and flux-linkage observerrdquo in Proceedings of the21st Annual IEEE Applied Power Electronics Conference andExposition (APEC rsquo06) pp 654ndash659 March 2006
[6] WWang M Zhang and Q Wu ldquoApplication of reduced-orderextended kalman filter in permanent magnet synchronousmotor sensorless regulating systemrdquo in Proceedings of the Inter-national Conference on Digital Manufacturing and Automation(ICDMA rsquo10) pp 271ndash274 December 2010
[7] J-S Jang B-G Park T-S Kim D M Lee and D-S HyunldquoParallel reduced-order extended Kalman Filter for PMSMsensorless drivesrdquo in Proceedings of the 34th Annual Conferenceof the IEEE Industrial Electronics Society (IECON rsquo08) pp 1326ndash1331 November 2008
[8] Y-S Kung and M-H Tsai ldquoFPGA-based speed control IC forPMSM drive with adaptive fuzzy controlrdquo IEEE Transactions onPower Electronics vol 22 no 6 pp 2476ndash2486 2007
[9] L Idkhajine and E Monmasson ldquoDesign methodology forcomplex FPGA-based controllersmdashapplication to an EKF sen-sorless AC driverdquo in Proceedings of the 19th International Con-ference on Electrical Machines (ICEM rsquo10) pp 1ndash6 September2010
[10] H-H Chou Y-S Kung N Vu Quynh and S Cheng ldquoOpti-mized FPGA design verification and implementation of aneuro-fuzzy controller for PMSM drivesrdquo Mathematics andComputers in Simulation vol 90 pp 28ndash44 2013
[11] Y S Kung and T H Nguyen ldquoSimulinkModelsim Co-simu-lation of EKF-based Sensorless PMSM drivesrdquo in Proceedingsof IEEE International on Power Electronics and Drive Systems(PEDS rsquo13) pp 709ndash713 2013
[12] Y Li J Huo X Li J Wen YWang and B Shan ldquoAn open-loopsinmicrostepping driver based on FPGA and the co-simulationof modelsim and simulinkrdquo in Proceedings of the InternationalConference on Computer Mechatronics Control and ElectronicEngineering (CMCE rsquo10) pp 223ndash227 August 2010
[13] The Mathworks ldquoMatlabSimulink Users Guide ApplicationProgram Interface Guiderdquo 2004
Figure 8 PMSM running at low speed (200 rpm) and inverse speed (plusmn200 rpm) condition (a) Speed step response (b) current responseand (c) actual rotor FA and estimated rotor FA
0 005 01 015 02 025 03 035 04 045 05
0100020003000
Spee
d (r
pm)
Time (s)
Speed command
Estimated rotor speed
Actual rotor speed
minus1000
minus2000
minus3000
(a)
0 005 01 015 02 025 03 035 04 045 05
0
2
4Cu
rren
t (A
)
Time (s)
minus2
minus4
iq
id
(b)
0 005 01 015 02 025 03 035 04 045 05
0100200300400
Flux
angl
e (FA
) (de
g)
Time (s)
Actual rotor FA
Estimated rotor FA by EKF minus100
(c)
Figure 9 PMSM running at wide-range high speed (2000 rpm) and inverse speed (plusmn1000 rpm) condition (a) Speed step response (b) currentresponse AND (c) actual rotor FA and estimated rotor FA
the present covariance matrix 119875119899 and calculate the Kalmangain 119870119899 119904121sim 119904130 describe the present state tuning as wellas executing the computation of rotor FA and rotor speedAccording to (30) the computation of temporary covariancematrix 119875119899|119899minus1in Figure 4 is described in Figure 5 Furtheraccording to (18) (33)-(34) and (36) the update of thepresent covariancematrix119875119899 and calculation theKalman gain119870119899 in Figure 4 are illustrated in Figure 6 The operation ofeach step in Figure 4 is 80 ns (125MHz) in FPGA thereforea total of 131 steps need only 1048 120583s operation timesThe FPGA (Altera) resource usages of EKF-based rotor FAand rotor speed estimation in Figure 4 is 4158 LEs (logicelements) and 2890 RAM bits Additionally the FPGA
resource usages of the circuits of CCCT speed PI controllerADC interface and SVPWM in Figure 3 are 864 LEs and24576 RAM 2043 LEs and 0RAM bits 136 LEs and 0RAMbits and 1221 LEs and 0RAM bits respectively
The SimulinkModelSim cosimulation architecture for sen-sorless PMSM speed control system is shown in Figure 7The SimPowerSystem-Blockset in the Simulink executes thePMSM and the IGBT-based inverterThe EDA simulator linkfor ModelSim executes the cosimulation using VHDL code
Mathematical Problems in Engineering 11
LP filter circuit
Rectifier Inverter
Ac source
Isolated and driving circuits
ADC
ADC
PWM6PWM1
PMSM
Digital circuitof speed PI controller EKF-based rotor FA and speed estimation
and current vector controller for PMSM
FPGA-based sensorless speed control IP
Load
Externalmemory
(Nios II processor)
Embedded processor IP
Application IP
L
C
T+A
TminusA
T+B
TminusB
T+C
TminusC
U V W
ia
ib
CPU
On-chipROM
On-chipRAM
UART
PIO
Timer
SPI
SDRAMcontroller
Aval
on b
us
(a)
(b)
Figure 10 Experimental system (a) with block diagram and (b) in real system
running in ModelSim program It executes the function ofthe sensorless speed controller by three works The work-1to work-3 of ModelSim in Figure 7 respectively perform thefunction of speed loop PI controller the function of cur-rent controller and coordinate transformation (CCCT) andSVPWM and the function of EKF-based rotor FA and rotorspeed estimation The sampling frequency in current controlloop and EKF-based estimation algorithm is designed with16 kHz but in speed control loop is 2 kHz The clocks of50MHz and 125MHz will supply all works of ModelSimThe FPGA (Altera) resource usages of work-1 to work-3 are2043 LEs and 0 RAM bits 2085 LEs and 24576 RAM bitsand 4158 LEs and 2890 RAM bits respectively
In simulation the designed PMSM parameters used inFigure 7 are as follows pole pairs are 4 stator phase resis-tance is 13Ω stator inductance is 63mH inertia is 119869 =
0000108 kglowastm2 and friction factor is 119865 = 00013NlowastmlowastsPI gains in speed control loop are designed with119870119901 = 02442and 119870119894 = 000458 To evaluate the proposed controllerperformance PMSM running at low speed (200 rpm) andinverse speed (from 200 rpm to minus200 rpm or vice versa) con-dition is firstly considered and its simulation results regard-ing as the speed step response the current response as wellas the actual rotor flux angle (FA) and the estimated rotorflux angle are shown in Figure 8 It shows that the motorspeed gives a good dynamic response performance with a
12 Mathematical Problems in Engineering
0 02 04 06 08 1 12 14 16 18 2
0
500 Speed command
Rotor speed
200
Time (s)
Spee
d (r
pm)
minus500
minus200
(a)
0
100
200
300
400
0 02 04 06 08 1 12 14 16 18 2
Actual rotor FA Estimated rotor FA
Time (s)
Flux
angl
e (de
g)
(b)
Figure 11 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) actual rotor FA and estimated rotor FA
0200400600800
10001200 Speed
command
Actual rotor speed
Estimated rotor speed
0 05 1 15 2 25 3Time (s)
Spee
d (r
pm)
(a)
0 05 1 15 2 25 3Time (s)
Curr
ent (
A) iq
id
0
051
15
minus05
minus1
(b)
Figure 12 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) current response
little overshoot and 25ms rising time It also shows thatthe estimated rotor speed can track actual rotor speed wellFigure 8(b) shows a successful vector control because 119894119889 iscontrolled to zero Figure 8(c) shows that the estimated rotorFA can fast track the actual rotor FA even in the inverse speedcommand condition Further another simulation case whilethe PMSMrunning at wide-range high speed (from0 rpm rarr
minus2000 rpm) and inverse speed (from 1000 rpm tominus1000 rpm)condition is tested and its simulation results are shown inFigure 9 It presents that not only at speed tracking butalso at rotor FA tracking the estimated value adopted byEKF method can give a good follow to the real rotor valueHowever except in the initial condition the actual rotorspeed gives a fast step response by 18ms rising time near0mm steady-state value and maximum 175 overshoot
5 Experimental System and Results
After confirming the correctness of the proposed EKF-basedsensorless control IP by simulation the VHDL codes aredirectly applied to the experimental FPGA-based sensorlessPMSM drive system The block diagram and real experi-mental system are depicted in Figure 10 The main devicesinclude a PMSM a DE2 board with Altera CycloneII FPGAa motor driver and a power supplier The parameters of thePMSM are 119903119904 = 063Ω 119871 = 277mH and 4 pole pairs Theinput voltage continuous current rating torque rating speedand continuous power of the PMSM are 220V 12A 23N-m 3000 rpm and 750W respectively The Altera CycloneIIEP2C35 chip adopted in the design possesses 33216 LEsmaximum 475 available IO pins 483840 RAM and 35
embedded multipliers The chip can be embedded with aNios II multicore processor that is equipped with several32-bit CPU flexibility of core size 1 to 16Mbytes of flashmemory in the available memory chip 1 Mbyte SRAM 16Mbyte SDRAM and 4 Gbytes memory outside of the chip Inimplementation except the VHDL codes of CCCT EKF andPI controller the VHDL code of ADC interface circuit shouldbe added and integrated and then downloaded into FPGAThePI gains of speed control loop in experiment are designedwith 119870119901 = 0512 and119870119894 = 0021
In the experimental case PMSM running at low speed(200 rpm) and inverse speed (from 200 rpm to minus200 rpm orvice versa) condition are firstly considered and its experi-ment results regarding the speed step response as well as theactual rotor FA and the estimated rotor FA are shown inFigure 11 Figure 11(a) shows that the motor speed gives agood dynamic response performance with a little oscillationand overshoot and it has 15ms rising time Figure 11(b) showsthat the estimated FA can fast track the actual rotor FA evenin the inverse speed command condition Further anotherexperimental case while the PMSM running at mediumspeed (from 0 rpm rarr 300 rpm rarr 600 rpm rarr 900 rpm rarr
600 rpm rarr 900 rpm) condition is evaluated and its experi-ment results are shown in Figure 12The Figure 12(a) presentsa fast speed trackingwith 15ms rising time and no occurrenceof overshoot condition Figure 12(b) shows a successful vectorcontrol due to the 119894119889 being controlled to zeroTherefore fromthe simulation results in Figures 8 and 9 and the experimentalresults in Figures 11 and 12 it is demonstrated that the EKF-based estimation algorithm used in sensorless PMSM driveand the behavior description by usingVHDL are effective andcorrect
Mathematical Problems in Engineering 13
6 Conclusions
This study has presented a sensorless PMSM drive based onEKF and successfully demonstrated its performance throughcosimulation by using SimulinkModelSim and implemen-tation by using FPGA In realization aspect the VHDL isused to describe the behavior of EKF algorithm and FSM isused to reduce the FPGA resource usage therefore it onlyneeds 4158 LEs and 2890 RAMbits In computational poweraspect the operation time to complete the computation ofEKF algorithm is only 1048 120583s which is less than the 625120583s(16 KHz) sampling time in current control loop In simulatedand experimental results it shows that the use of EKF insensorless PMSM drive can accurately estimate the rotorFA and rotor speed and it can give a good step responseperformance in case of low speed control inverse speedcontrol and high speed control as well
Acknowledgment
This work was supported by the National Science Council ofChina under Grant no NSC 101-2221-E-218-039
References
[1] V C Ilioudis and N I Margaris ldquoPMSM sensorless speedestimation based on sliding mode observersrdquo in Proceedings ofthe 39th IEEE Annual Power Electronics Specialists Conference(PESC rsquo08) pp 2838ndash2843 June 2008
[2] S Chi Z Zhang and L Xu ldquoSliding-mode sensorless controlof direct-drive PM synchronous motors for washing machineapplicationsrdquo IEEE Transactions on Industry Applications vol45 no 2 pp 582ndash590 2009
[3] V Delli Colli R di Stefano and F Marignetti ldquoA system-on-chip sensorless control for a permanent-magnet synchronousmotorrdquo IEEE Transactions on Industrial Electronics vol 57 no11 pp 3822ndash3829 2010
[4] S Bolognani R Oboe andM Zigliotto ldquoSensorless full-digitalpmsm drive with ekf estimation of speed and rotor positionrdquoIEEE Transactions on Industrial Electronics vol 46 no 1 pp184ndash191 1999
[5] M C Huang A J Moses and F Anayi ldquoThe comparison ofsensorless estimation techniques for PMSM between extendedKalman filter and flux-linkage observerrdquo in Proceedings of the21st Annual IEEE Applied Power Electronics Conference andExposition (APEC rsquo06) pp 654ndash659 March 2006
[6] WWang M Zhang and Q Wu ldquoApplication of reduced-orderextended kalman filter in permanent magnet synchronousmotor sensorless regulating systemrdquo in Proceedings of the Inter-national Conference on Digital Manufacturing and Automation(ICDMA rsquo10) pp 271ndash274 December 2010
[7] J-S Jang B-G Park T-S Kim D M Lee and D-S HyunldquoParallel reduced-order extended Kalman Filter for PMSMsensorless drivesrdquo in Proceedings of the 34th Annual Conferenceof the IEEE Industrial Electronics Society (IECON rsquo08) pp 1326ndash1331 November 2008
[8] Y-S Kung and M-H Tsai ldquoFPGA-based speed control IC forPMSM drive with adaptive fuzzy controlrdquo IEEE Transactions onPower Electronics vol 22 no 6 pp 2476ndash2486 2007
[9] L Idkhajine and E Monmasson ldquoDesign methodology forcomplex FPGA-based controllersmdashapplication to an EKF sen-sorless AC driverdquo in Proceedings of the 19th International Con-ference on Electrical Machines (ICEM rsquo10) pp 1ndash6 September2010
[10] H-H Chou Y-S Kung N Vu Quynh and S Cheng ldquoOpti-mized FPGA design verification and implementation of aneuro-fuzzy controller for PMSM drivesrdquo Mathematics andComputers in Simulation vol 90 pp 28ndash44 2013
[11] Y S Kung and T H Nguyen ldquoSimulinkModelsim Co-simu-lation of EKF-based Sensorless PMSM drivesrdquo in Proceedingsof IEEE International on Power Electronics and Drive Systems(PEDS rsquo13) pp 709ndash713 2013
[12] Y Li J Huo X Li J Wen YWang and B Shan ldquoAn open-loopsinmicrostepping driver based on FPGA and the co-simulationof modelsim and simulinkrdquo in Proceedings of the InternationalConference on Computer Mechatronics Control and ElectronicEngineering (CMCE rsquo10) pp 223ndash227 August 2010
[13] The Mathworks ldquoMatlabSimulink Users Guide ApplicationProgram Interface Guiderdquo 2004
Digital circuitof speed PI controller EKF-based rotor FA and speed estimation
and current vector controller for PMSM
FPGA-based sensorless speed control IP
Load
Externalmemory
(Nios II processor)
Embedded processor IP
Application IP
L
C
T+A
TminusA
T+B
TminusB
T+C
TminusC
U V W
ia
ib
CPU
On-chipROM
On-chipRAM
UART
PIO
Timer
SPI
SDRAMcontroller
Aval
on b
us
(a)
(b)
Figure 10 Experimental system (a) with block diagram and (b) in real system
running in ModelSim program It executes the function ofthe sensorless speed controller by three works The work-1to work-3 of ModelSim in Figure 7 respectively perform thefunction of speed loop PI controller the function of cur-rent controller and coordinate transformation (CCCT) andSVPWM and the function of EKF-based rotor FA and rotorspeed estimation The sampling frequency in current controlloop and EKF-based estimation algorithm is designed with16 kHz but in speed control loop is 2 kHz The clocks of50MHz and 125MHz will supply all works of ModelSimThe FPGA (Altera) resource usages of work-1 to work-3 are2043 LEs and 0 RAM bits 2085 LEs and 24576 RAM bitsand 4158 LEs and 2890 RAM bits respectively
In simulation the designed PMSM parameters used inFigure 7 are as follows pole pairs are 4 stator phase resis-tance is 13Ω stator inductance is 63mH inertia is 119869 =
0000108 kglowastm2 and friction factor is 119865 = 00013NlowastmlowastsPI gains in speed control loop are designed with119870119901 = 02442and 119870119894 = 000458 To evaluate the proposed controllerperformance PMSM running at low speed (200 rpm) andinverse speed (from 200 rpm to minus200 rpm or vice versa) con-dition is firstly considered and its simulation results regard-ing as the speed step response the current response as wellas the actual rotor flux angle (FA) and the estimated rotorflux angle are shown in Figure 8 It shows that the motorspeed gives a good dynamic response performance with a
12 Mathematical Problems in Engineering
0 02 04 06 08 1 12 14 16 18 2
0
500 Speed command
Rotor speed
200
Time (s)
Spee
d (r
pm)
minus500
minus200
(a)
0
100
200
300
400
0 02 04 06 08 1 12 14 16 18 2
Actual rotor FA Estimated rotor FA
Time (s)
Flux
angl
e (de
g)
(b)
Figure 11 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) actual rotor FA and estimated rotor FA
0200400600800
10001200 Speed
command
Actual rotor speed
Estimated rotor speed
0 05 1 15 2 25 3Time (s)
Spee
d (r
pm)
(a)
0 05 1 15 2 25 3Time (s)
Curr
ent (
A) iq
id
0
051
15
minus05
minus1
(b)
Figure 12 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) current response
little overshoot and 25ms rising time It also shows thatthe estimated rotor speed can track actual rotor speed wellFigure 8(b) shows a successful vector control because 119894119889 iscontrolled to zero Figure 8(c) shows that the estimated rotorFA can fast track the actual rotor FA even in the inverse speedcommand condition Further another simulation case whilethe PMSMrunning at wide-range high speed (from0 rpm rarr
minus2000 rpm) and inverse speed (from 1000 rpm tominus1000 rpm)condition is tested and its simulation results are shown inFigure 9 It presents that not only at speed tracking butalso at rotor FA tracking the estimated value adopted byEKF method can give a good follow to the real rotor valueHowever except in the initial condition the actual rotorspeed gives a fast step response by 18ms rising time near0mm steady-state value and maximum 175 overshoot
5 Experimental System and Results
After confirming the correctness of the proposed EKF-basedsensorless control IP by simulation the VHDL codes aredirectly applied to the experimental FPGA-based sensorlessPMSM drive system The block diagram and real experi-mental system are depicted in Figure 10 The main devicesinclude a PMSM a DE2 board with Altera CycloneII FPGAa motor driver and a power supplier The parameters of thePMSM are 119903119904 = 063Ω 119871 = 277mH and 4 pole pairs Theinput voltage continuous current rating torque rating speedand continuous power of the PMSM are 220V 12A 23N-m 3000 rpm and 750W respectively The Altera CycloneIIEP2C35 chip adopted in the design possesses 33216 LEsmaximum 475 available IO pins 483840 RAM and 35
embedded multipliers The chip can be embedded with aNios II multicore processor that is equipped with several32-bit CPU flexibility of core size 1 to 16Mbytes of flashmemory in the available memory chip 1 Mbyte SRAM 16Mbyte SDRAM and 4 Gbytes memory outside of the chip Inimplementation except the VHDL codes of CCCT EKF andPI controller the VHDL code of ADC interface circuit shouldbe added and integrated and then downloaded into FPGAThePI gains of speed control loop in experiment are designedwith 119870119901 = 0512 and119870119894 = 0021
In the experimental case PMSM running at low speed(200 rpm) and inverse speed (from 200 rpm to minus200 rpm orvice versa) condition are firstly considered and its experi-ment results regarding the speed step response as well as theactual rotor FA and the estimated rotor FA are shown inFigure 11 Figure 11(a) shows that the motor speed gives agood dynamic response performance with a little oscillationand overshoot and it has 15ms rising time Figure 11(b) showsthat the estimated FA can fast track the actual rotor FA evenin the inverse speed command condition Further anotherexperimental case while the PMSM running at mediumspeed (from 0 rpm rarr 300 rpm rarr 600 rpm rarr 900 rpm rarr
600 rpm rarr 900 rpm) condition is evaluated and its experi-ment results are shown in Figure 12The Figure 12(a) presentsa fast speed trackingwith 15ms rising time and no occurrenceof overshoot condition Figure 12(b) shows a successful vectorcontrol due to the 119894119889 being controlled to zeroTherefore fromthe simulation results in Figures 8 and 9 and the experimentalresults in Figures 11 and 12 it is demonstrated that the EKF-based estimation algorithm used in sensorless PMSM driveand the behavior description by usingVHDL are effective andcorrect
Mathematical Problems in Engineering 13
6 Conclusions
This study has presented a sensorless PMSM drive based onEKF and successfully demonstrated its performance throughcosimulation by using SimulinkModelSim and implemen-tation by using FPGA In realization aspect the VHDL isused to describe the behavior of EKF algorithm and FSM isused to reduce the FPGA resource usage therefore it onlyneeds 4158 LEs and 2890 RAMbits In computational poweraspect the operation time to complete the computation ofEKF algorithm is only 1048 120583s which is less than the 625120583s(16 KHz) sampling time in current control loop In simulatedand experimental results it shows that the use of EKF insensorless PMSM drive can accurately estimate the rotorFA and rotor speed and it can give a good step responseperformance in case of low speed control inverse speedcontrol and high speed control as well
Acknowledgment
This work was supported by the National Science Council ofChina under Grant no NSC 101-2221-E-218-039
References
[1] V C Ilioudis and N I Margaris ldquoPMSM sensorless speedestimation based on sliding mode observersrdquo in Proceedings ofthe 39th IEEE Annual Power Electronics Specialists Conference(PESC rsquo08) pp 2838ndash2843 June 2008
[2] S Chi Z Zhang and L Xu ldquoSliding-mode sensorless controlof direct-drive PM synchronous motors for washing machineapplicationsrdquo IEEE Transactions on Industry Applications vol45 no 2 pp 582ndash590 2009
[3] V Delli Colli R di Stefano and F Marignetti ldquoA system-on-chip sensorless control for a permanent-magnet synchronousmotorrdquo IEEE Transactions on Industrial Electronics vol 57 no11 pp 3822ndash3829 2010
[4] S Bolognani R Oboe andM Zigliotto ldquoSensorless full-digitalpmsm drive with ekf estimation of speed and rotor positionrdquoIEEE Transactions on Industrial Electronics vol 46 no 1 pp184ndash191 1999
[5] M C Huang A J Moses and F Anayi ldquoThe comparison ofsensorless estimation techniques for PMSM between extendedKalman filter and flux-linkage observerrdquo in Proceedings of the21st Annual IEEE Applied Power Electronics Conference andExposition (APEC rsquo06) pp 654ndash659 March 2006
[6] WWang M Zhang and Q Wu ldquoApplication of reduced-orderextended kalman filter in permanent magnet synchronousmotor sensorless regulating systemrdquo in Proceedings of the Inter-national Conference on Digital Manufacturing and Automation(ICDMA rsquo10) pp 271ndash274 December 2010
[7] J-S Jang B-G Park T-S Kim D M Lee and D-S HyunldquoParallel reduced-order extended Kalman Filter for PMSMsensorless drivesrdquo in Proceedings of the 34th Annual Conferenceof the IEEE Industrial Electronics Society (IECON rsquo08) pp 1326ndash1331 November 2008
[8] Y-S Kung and M-H Tsai ldquoFPGA-based speed control IC forPMSM drive with adaptive fuzzy controlrdquo IEEE Transactions onPower Electronics vol 22 no 6 pp 2476ndash2486 2007
[9] L Idkhajine and E Monmasson ldquoDesign methodology forcomplex FPGA-based controllersmdashapplication to an EKF sen-sorless AC driverdquo in Proceedings of the 19th International Con-ference on Electrical Machines (ICEM rsquo10) pp 1ndash6 September2010
[10] H-H Chou Y-S Kung N Vu Quynh and S Cheng ldquoOpti-mized FPGA design verification and implementation of aneuro-fuzzy controller for PMSM drivesrdquo Mathematics andComputers in Simulation vol 90 pp 28ndash44 2013
[11] Y S Kung and T H Nguyen ldquoSimulinkModelsim Co-simu-lation of EKF-based Sensorless PMSM drivesrdquo in Proceedingsof IEEE International on Power Electronics and Drive Systems(PEDS rsquo13) pp 709ndash713 2013
[12] Y Li J Huo X Li J Wen YWang and B Shan ldquoAn open-loopsinmicrostepping driver based on FPGA and the co-simulationof modelsim and simulinkrdquo in Proceedings of the InternationalConference on Computer Mechatronics Control and ElectronicEngineering (CMCE rsquo10) pp 223ndash227 August 2010
[13] The Mathworks ldquoMatlabSimulink Users Guide ApplicationProgram Interface Guiderdquo 2004
Figure 11 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) actual rotor FA and estimated rotor FA
0200400600800
10001200 Speed
command
Actual rotor speed
Estimated rotor speed
0 05 1 15 2 25 3Time (s)
Spee
d (r
pm)
(a)
0 05 1 15 2 25 3Time (s)
Curr
ent (
A) iq
id
0
051
15
minus05
minus1
(b)
Figure 12 (a) Step speed response of actual rotor speed and estimated rotor speed and (b) current response
little overshoot and 25ms rising time It also shows thatthe estimated rotor speed can track actual rotor speed wellFigure 8(b) shows a successful vector control because 119894119889 iscontrolled to zero Figure 8(c) shows that the estimated rotorFA can fast track the actual rotor FA even in the inverse speedcommand condition Further another simulation case whilethe PMSMrunning at wide-range high speed (from0 rpm rarr
minus2000 rpm) and inverse speed (from 1000 rpm tominus1000 rpm)condition is tested and its simulation results are shown inFigure 9 It presents that not only at speed tracking butalso at rotor FA tracking the estimated value adopted byEKF method can give a good follow to the real rotor valueHowever except in the initial condition the actual rotorspeed gives a fast step response by 18ms rising time near0mm steady-state value and maximum 175 overshoot
5 Experimental System and Results
After confirming the correctness of the proposed EKF-basedsensorless control IP by simulation the VHDL codes aredirectly applied to the experimental FPGA-based sensorlessPMSM drive system The block diagram and real experi-mental system are depicted in Figure 10 The main devicesinclude a PMSM a DE2 board with Altera CycloneII FPGAa motor driver and a power supplier The parameters of thePMSM are 119903119904 = 063Ω 119871 = 277mH and 4 pole pairs Theinput voltage continuous current rating torque rating speedand continuous power of the PMSM are 220V 12A 23N-m 3000 rpm and 750W respectively The Altera CycloneIIEP2C35 chip adopted in the design possesses 33216 LEsmaximum 475 available IO pins 483840 RAM and 35
embedded multipliers The chip can be embedded with aNios II multicore processor that is equipped with several32-bit CPU flexibility of core size 1 to 16Mbytes of flashmemory in the available memory chip 1 Mbyte SRAM 16Mbyte SDRAM and 4 Gbytes memory outside of the chip Inimplementation except the VHDL codes of CCCT EKF andPI controller the VHDL code of ADC interface circuit shouldbe added and integrated and then downloaded into FPGAThePI gains of speed control loop in experiment are designedwith 119870119901 = 0512 and119870119894 = 0021
In the experimental case PMSM running at low speed(200 rpm) and inverse speed (from 200 rpm to minus200 rpm orvice versa) condition are firstly considered and its experi-ment results regarding the speed step response as well as theactual rotor FA and the estimated rotor FA are shown inFigure 11 Figure 11(a) shows that the motor speed gives agood dynamic response performance with a little oscillationand overshoot and it has 15ms rising time Figure 11(b) showsthat the estimated FA can fast track the actual rotor FA evenin the inverse speed command condition Further anotherexperimental case while the PMSM running at mediumspeed (from 0 rpm rarr 300 rpm rarr 600 rpm rarr 900 rpm rarr
600 rpm rarr 900 rpm) condition is evaluated and its experi-ment results are shown in Figure 12The Figure 12(a) presentsa fast speed trackingwith 15ms rising time and no occurrenceof overshoot condition Figure 12(b) shows a successful vectorcontrol due to the 119894119889 being controlled to zeroTherefore fromthe simulation results in Figures 8 and 9 and the experimentalresults in Figures 11 and 12 it is demonstrated that the EKF-based estimation algorithm used in sensorless PMSM driveand the behavior description by usingVHDL are effective andcorrect
Mathematical Problems in Engineering 13
6 Conclusions
This study has presented a sensorless PMSM drive based onEKF and successfully demonstrated its performance throughcosimulation by using SimulinkModelSim and implemen-tation by using FPGA In realization aspect the VHDL isused to describe the behavior of EKF algorithm and FSM isused to reduce the FPGA resource usage therefore it onlyneeds 4158 LEs and 2890 RAMbits In computational poweraspect the operation time to complete the computation ofEKF algorithm is only 1048 120583s which is less than the 625120583s(16 KHz) sampling time in current control loop In simulatedand experimental results it shows that the use of EKF insensorless PMSM drive can accurately estimate the rotorFA and rotor speed and it can give a good step responseperformance in case of low speed control inverse speedcontrol and high speed control as well
Acknowledgment
This work was supported by the National Science Council ofChina under Grant no NSC 101-2221-E-218-039
References
[1] V C Ilioudis and N I Margaris ldquoPMSM sensorless speedestimation based on sliding mode observersrdquo in Proceedings ofthe 39th IEEE Annual Power Electronics Specialists Conference(PESC rsquo08) pp 2838ndash2843 June 2008
[2] S Chi Z Zhang and L Xu ldquoSliding-mode sensorless controlof direct-drive PM synchronous motors for washing machineapplicationsrdquo IEEE Transactions on Industry Applications vol45 no 2 pp 582ndash590 2009
[3] V Delli Colli R di Stefano and F Marignetti ldquoA system-on-chip sensorless control for a permanent-magnet synchronousmotorrdquo IEEE Transactions on Industrial Electronics vol 57 no11 pp 3822ndash3829 2010
[4] S Bolognani R Oboe andM Zigliotto ldquoSensorless full-digitalpmsm drive with ekf estimation of speed and rotor positionrdquoIEEE Transactions on Industrial Electronics vol 46 no 1 pp184ndash191 1999
[5] M C Huang A J Moses and F Anayi ldquoThe comparison ofsensorless estimation techniques for PMSM between extendedKalman filter and flux-linkage observerrdquo in Proceedings of the21st Annual IEEE Applied Power Electronics Conference andExposition (APEC rsquo06) pp 654ndash659 March 2006
[6] WWang M Zhang and Q Wu ldquoApplication of reduced-orderextended kalman filter in permanent magnet synchronousmotor sensorless regulating systemrdquo in Proceedings of the Inter-national Conference on Digital Manufacturing and Automation(ICDMA rsquo10) pp 271ndash274 December 2010
[7] J-S Jang B-G Park T-S Kim D M Lee and D-S HyunldquoParallel reduced-order extended Kalman Filter for PMSMsensorless drivesrdquo in Proceedings of the 34th Annual Conferenceof the IEEE Industrial Electronics Society (IECON rsquo08) pp 1326ndash1331 November 2008
[8] Y-S Kung and M-H Tsai ldquoFPGA-based speed control IC forPMSM drive with adaptive fuzzy controlrdquo IEEE Transactions onPower Electronics vol 22 no 6 pp 2476ndash2486 2007
[9] L Idkhajine and E Monmasson ldquoDesign methodology forcomplex FPGA-based controllersmdashapplication to an EKF sen-sorless AC driverdquo in Proceedings of the 19th International Con-ference on Electrical Machines (ICEM rsquo10) pp 1ndash6 September2010
[10] H-H Chou Y-S Kung N Vu Quynh and S Cheng ldquoOpti-mized FPGA design verification and implementation of aneuro-fuzzy controller for PMSM drivesrdquo Mathematics andComputers in Simulation vol 90 pp 28ndash44 2013
[11] Y S Kung and T H Nguyen ldquoSimulinkModelsim Co-simu-lation of EKF-based Sensorless PMSM drivesrdquo in Proceedingsof IEEE International on Power Electronics and Drive Systems(PEDS rsquo13) pp 709ndash713 2013
[12] Y Li J Huo X Li J Wen YWang and B Shan ldquoAn open-loopsinmicrostepping driver based on FPGA and the co-simulationof modelsim and simulinkrdquo in Proceedings of the InternationalConference on Computer Mechatronics Control and ElectronicEngineering (CMCE rsquo10) pp 223ndash227 August 2010
[13] The Mathworks ldquoMatlabSimulink Users Guide ApplicationProgram Interface Guiderdquo 2004
This study has presented a sensorless PMSM drive based onEKF and successfully demonstrated its performance throughcosimulation by using SimulinkModelSim and implemen-tation by using FPGA In realization aspect the VHDL isused to describe the behavior of EKF algorithm and FSM isused to reduce the FPGA resource usage therefore it onlyneeds 4158 LEs and 2890 RAMbits In computational poweraspect the operation time to complete the computation ofEKF algorithm is only 1048 120583s which is less than the 625120583s(16 KHz) sampling time in current control loop In simulatedand experimental results it shows that the use of EKF insensorless PMSM drive can accurately estimate the rotorFA and rotor speed and it can give a good step responseperformance in case of low speed control inverse speedcontrol and high speed control as well
Acknowledgment
This work was supported by the National Science Council ofChina under Grant no NSC 101-2221-E-218-039
References
[1] V C Ilioudis and N I Margaris ldquoPMSM sensorless speedestimation based on sliding mode observersrdquo in Proceedings ofthe 39th IEEE Annual Power Electronics Specialists Conference(PESC rsquo08) pp 2838ndash2843 June 2008
[2] S Chi Z Zhang and L Xu ldquoSliding-mode sensorless controlof direct-drive PM synchronous motors for washing machineapplicationsrdquo IEEE Transactions on Industry Applications vol45 no 2 pp 582ndash590 2009
[3] V Delli Colli R di Stefano and F Marignetti ldquoA system-on-chip sensorless control for a permanent-magnet synchronousmotorrdquo IEEE Transactions on Industrial Electronics vol 57 no11 pp 3822ndash3829 2010
[4] S Bolognani R Oboe andM Zigliotto ldquoSensorless full-digitalpmsm drive with ekf estimation of speed and rotor positionrdquoIEEE Transactions on Industrial Electronics vol 46 no 1 pp184ndash191 1999
[5] M C Huang A J Moses and F Anayi ldquoThe comparison ofsensorless estimation techniques for PMSM between extendedKalman filter and flux-linkage observerrdquo in Proceedings of the21st Annual IEEE Applied Power Electronics Conference andExposition (APEC rsquo06) pp 654ndash659 March 2006
[6] WWang M Zhang and Q Wu ldquoApplication of reduced-orderextended kalman filter in permanent magnet synchronousmotor sensorless regulating systemrdquo in Proceedings of the Inter-national Conference on Digital Manufacturing and Automation(ICDMA rsquo10) pp 271ndash274 December 2010
[7] J-S Jang B-G Park T-S Kim D M Lee and D-S HyunldquoParallel reduced-order extended Kalman Filter for PMSMsensorless drivesrdquo in Proceedings of the 34th Annual Conferenceof the IEEE Industrial Electronics Society (IECON rsquo08) pp 1326ndash1331 November 2008
[8] Y-S Kung and M-H Tsai ldquoFPGA-based speed control IC forPMSM drive with adaptive fuzzy controlrdquo IEEE Transactions onPower Electronics vol 22 no 6 pp 2476ndash2486 2007
[9] L Idkhajine and E Monmasson ldquoDesign methodology forcomplex FPGA-based controllersmdashapplication to an EKF sen-sorless AC driverdquo in Proceedings of the 19th International Con-ference on Electrical Machines (ICEM rsquo10) pp 1ndash6 September2010
[10] H-H Chou Y-S Kung N Vu Quynh and S Cheng ldquoOpti-mized FPGA design verification and implementation of aneuro-fuzzy controller for PMSM drivesrdquo Mathematics andComputers in Simulation vol 90 pp 28ndash44 2013
[11] Y S Kung and T H Nguyen ldquoSimulinkModelsim Co-simu-lation of EKF-based Sensorless PMSM drivesrdquo in Proceedingsof IEEE International on Power Electronics and Drive Systems(PEDS rsquo13) pp 709ndash713 2013
[12] Y Li J Huo X Li J Wen YWang and B Shan ldquoAn open-loopsinmicrostepping driver based on FPGA and the co-simulationof modelsim and simulinkrdquo in Proceedings of the InternationalConference on Computer Mechatronics Control and ElectronicEngineering (CMCE rsquo10) pp 223ndash227 August 2010
[13] The Mathworks ldquoMatlabSimulink Users Guide ApplicationProgram Interface Guiderdquo 2004