Академический Документы
Профессиональный Документы
Культура Документы
By
Souvik Dasgupta
Registration No. 210606001 of 2006-07
Roll No. 160606001
Under the Guidance of
Dr. Kaushik Mukherjee
And
Dr. Mainak Sengupta
A thesis
Submitted in partial fulfillment of the requirements for the degree of
Master of Engineering (Electrical Engineering)
Specialization in Power Electronics and Drives
FOREWORD
We hereby forward the thesis entitled A FIELD PROGRAMMABLE
GATES ARRAY CONTROLLER BASED REAL TIME IMPLEMENTATION OF A PERMANENT MAGNET SYNCHRONOUS MOTOR
DRIVE submitted by Souvik Dasgupta(Registration No. 210606001of 20062007) under our guidance and supervision in partial fulfillment of the requirements
for the degree of Master of Engineering in Electrical Engineering (Specialization:
Power Electronics and Drives) from this University.
(Dr. S.P.Ray)
Professor and Head
Dept.of Electrical Engineering
Bengal Engineering and Science University
Howrah-711103
( Dr. M. Halder)
Professor and Dean, FEAT
Bengal Engineering and Science University
Howrah-711103
CERTIFICATE OF APPROVAL
The foregoing thesis entitled A FIELD PROGRAMMABLE GATES
ARRAY CONTROLLER BASED REAL TIME IMPLEMENTATION
OF A PERMANENT MAGNET SYNCHRONOUS MOTOR DRIVE
is approved as creditable study of an engineering subject carried out and presented
satisfactorily to warrant its acceptance as a pre-requisite to the degree of Master
of Engineering in Electrical Engineering (Specialisation: Power Electronics and
Drives) of this University. It is understood that by this approval the undersigned
do not necessarily endorse or approve any statement made, opinion expressed or
conclusion drawn therein, but approve the thesis paper only for the purpose for
which it is submitted.
BOARD OF EXAMINERS
ii
ACKNOWLEDGEMENT
The author wishes to record his deep sense of gratitude to his supervisors, Dr. Kaushik Mukherjee and Dr. Mainak Sengupta, who have introduced the
present area of work and guided in this work. The author also wishes to thank
Dr. Prasid Syem ,Prof. Debjani Ganguly for helping him with different suggestions. The author is also thankful to Prof. S. P. Ray for permitting him to use
the instruments of the department. The author is also indebted to his classmates
Mr. Bhaskaran Barman, Mr. Prasanta Patra and NaMPET Project Assistant
Mr. Utpal Samanta and Mr. Avijit Ghosh for different constructive criticisms in
different phases of the work .The author is also thankful to his seniors Mrs. Anindita Jamatia , Mr. Sudhin Roy, Mr. Pabitra Kumar Biswas for their criticism
in different technical subjects and for their teachings in different power electronic
tools. The author also wishes to thank the NaMPET-FSS project for the funding. Last but not the least, the author is strongly indebted to the almighty for
presenting him worlds best parents, who are not only supportive but also helpful
in different phases of his life.
(Souvik Dasgupta)
Reg. No. 210606001
Roll No. 160606001
Bengal Engineering and Science University
Date:
iii
Dedicated to my parents,
Sri Sankar Dasgupta
and
Smt. Mamata Dasgupta
iv
Abstract
This thesis is directed towards analysis, design, digital computer simulation
and practical implementation of a Permanent Magnet Synchronous Motor (PMSM)
drive. The drive is suited for a low voltage ( 48V ) high current ( 20A) application.
A three phase permanent magnet synchronous motor, having three hall position sensors, as available in laboratory, is used for the PMSM drive experiments.
The electrical parameters of this prototype machine is first experimentally determined. The adopted experimental method is deduced analytically on the basis of
coupled circuit concepts initially and experimentation has been performed accordingly.
Next, a basic PMSM drive, consisting of this machine and a self-commutated
IGBT based inverter, has been practically implemented. The inverter control
is done through field programmable gate array (FPGA) in 1200 conduction self
controlled mode by processing of the three position sensor signals inside FPGA
itself. A Detailed Numerical Model of this drive has been developed, by which
its starting, dynamic and steady-state performances are predicted. The steadystate performances are experimentally validated on the implemented prototype.
Subsequently, an Averaged Dynamic Model, based on an averaging technique, is
presented, which has the simplicity of that of a conventional separately excited DC
motor with mechanical commutator. This Averaged Dynamic Model is capable
of predicting both dynamic and steady-state behaviors of this drive. The performance as predicted by the Averaged Dynamic Model is validated experimentally,
as also with the Detailed Numerical Model. They are found to match closely.
Subsequent section of the thesis deals with the position sensorless operation
of the self controlled 1200 conduction VSI fed the PMSM drive. Two schemes are
proposed and simulated. One scheme uses two voltage and two current sensors to
sense any two phase voltages and any two phase currents of the PMSM to derive
the rotor position information of the PMSM. This scheme is found to start the
machine and operate at any speed. The main disadvantage of this scheme is that,
before starting the machine the rotor must be brought to a particular position.
This scheme does not require almost negligible real-time computational effort. The
second scheme requires a Luenberger Observer realization in FPGA platform
and information of DC link voltage and DC link current, that is one current sensor
and one voltage sensor would be required for experimental implementation. The
observer is realized on the basis of the Averaged Dynamic Model of the PMSM,
derived earlier, in the work. The observer-based method can start the machine
from any arbitrary rotor position and operate at any speed. The observer has
digitally been programmed in F P GA platform.
vi
Contents
1 Introduction
1.1 General discussions . . . . . . . . . . . . . . . .
1.2 Operation of PMSM under Self control . . . . .
1.3 Need of digital controllers in drives application
1.4 Relevance of the work undertaken . . . . . . . .
1.5 Outline of the present work . . . . . . . . . . .
1.6 Organizations of the thesis . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
vii
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
1
2
6
7
8
8
.
.
.
.
10
10
11
13
14
a three-phase,
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
15
15
15
16
16
17
17
18
19
19
20
21
22
24
25
42
42
42
43
46
57
57
57
61
61
62
62
66
72
75
7 Advanced aspects related to real time simulation and implementation of aspects of PMSM drive on FPGA platform
92
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
7.2 Real time simulation of RLC circuit and implementation of OBSERVER in FPGA . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
7.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 93
7.2.2 Simulating an RLC Circuit . . . . . . . . . . . . . . . . . . 93
7.2.3 Implementation of the Observer of PMSM . . . . . . . . . . 95
7.3 Towards the real-time implementation of VECTOR CONTROL WITH
SINE PWM INVERTER of Permanent Magnet Synchronous Motor
in FPGA environment . . . . . . . . . . . . . . . . . . . . . . . . . 98
7.3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 98
viii
7.3.2
7.3.3
7.3.4
7.3.5
7.3.6
100
103
105
113
117
129
130
A.1 Parameters and specifications of the machine . . . . . . . . 130
133
C.1 Matlab program to generate the look-up table of switching
pattern for encoder based 1200 conduction logic . . . . . . . 133
ix
List of Figures
1.1
1.2
1.3
1.4
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
3.10
3.11
3.12
3.13
3.14
3
4
5
6
16
17
18
19
20
21
22
23
24
25
26
27
27
28
4.2
4.3
4.4
4.5
4.6
4.7
5.1
5.2
5.3
28
29
30
31
32
xi
43
48
49
5.4
5.5
5.6
5.7
5.8
5.9
5.10
5.11
5.12
5.13
5.14
6.1
6.2
6.3
xii
49
50
50
51
52
53
53
54
54
55
56
58
59
60
6.4
6.5
6.6
6.7
6.8
6.9
6.10
6.11
6.12
6.13
6.14
6.15
6.16
6.17
xiii
61
62
63
64
64
65
66
67
68
69
70
71
72
73
xiv
74
75
76
77
78
79
80
81
82
xv
83
84
85
86
87
87
88
89
90
7.4
7.5
7.6
7.7
7.8
7.9
7.10
7.11
7.12
7.13
7.14
7.15
7.16
FPGA Design file for real time simulation of RLC circuit using
Eulers Integration method . . . . . . . . . . . . . . . . . . . . . .
FPGA Design file for real time simulation of RL circuit Eulers
Integration method . . . . . . . . . . . . . . . . . . . . . . . . . . .
Transient waveforms of per unit circuit current and per unit input
applied voltage for a R-L circuit of R = 10, L = 20mH for a step
voltage of, Vg = 100V = 1pu applied at t=0sec . . . . . . . . . . .
Transient waveforms of per unit capacitor voltage and per unit input
applied voltage for a R-L-C circuit of R = 10, L = 20mH,C =
4uF for a step voltage of, Vg = 100V = 1pu applied at t=0sec . .
FPGA design file showing clock and ADC outputs for observer implementation for observer based sensorless operation . . . . . . . .
FPGA design file showing Eulers method to solve variables to be
estimated for observer based sensorless operation . . . . . . . . . .
FPGA design file showing equation to estimate the DC link current
for observer based sensorless operation . . . . . . . . . . . . . . .
FPGA design file showing equation to estimate the electrical speed
for observer based sensorless operation . . . . . . . . . . . . . . .
FPGA design file showing equation to estimate the electrical rotor
position for observer based sensorless operation . . . . . . . . . . .
FPGA design file showing equation method to generate switching
signals for observer based sensorless operation . . . . . . . . . . . .
FPGA design files showing the digital inputs and outputs for the
program to evaluate the performance of the encoder . . . . . . . .
FPGA design files showing two sets of switching signals which are
multiplexed to switch the IGBTs of the two level inverter . . . . .
FPGA design files showing traditional programme segment to run
the motor under 1200 conduction mode with hall sensor outputs. .
FPGA design files showing the changeover process from hall sensor
to encoder mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FPGA design files showing traditional programme segment to run
the motor under 1200 conduction mode with single encoder output.
Switching signals are plotted individually with respect to the electrical rotor position when the PMSM was running under self controlled
1200 conduction algorithm with encoder. . . . . . . . . . . . . . . .
xvi
91
94
95
96
97
98
99
100
100
101
101
102
103
104
105
106
107
xvii
xviii
xix
xx
Chapter 1
Introduction
1.1
General discussions
1.2
(1.1)
(1.2)
Figure 1.1: Armature MMF and Field MMF Condition at zero starting for
a synchronous machines
vcn = ra ic + Ls pic + 0 r cos(r + 2/3)
(1.3)
where, van , vbn , vcn are three phase voltages, ia , ib , ic are three phase currents,0 is
the peak value of armature flux linkage due to permanent, ra and Ls are per phase
d
resistance and per phase synchronous inductance of the motor, p = dt
operator. r
is the electrical speed of the machine and the machine being synchronous is always
related to its mechanical rotor speed m by the expression shown in equation 1.4.
r =
P
m
2
(1.4)
(1.5)
(1.6)
(1.7)
van1 , vbn1 and vcn1 are fundamental components of the impressed phase voltages.
z is the constant angle maintained by the controller, i.e. this is the constant angle
set by the controller, by which the fundamental phase terminal voltage leads its
corresponding phase back emf.
Now, substituting equations 1.5, 1.6, 1.7 in equations 1.1, 1.2, 1.3 the fundamental
component of phase currents will be solved. Now, the form of solutions of those
currents will be of the forms as follows:
ia1 = Im cos(r + s)
(1.8)
(1.9)
(1.10)
If now three phase to two phase transformation [6] is applied, it is seen that the
q andd axis components of armature MMF space phasor, Maq and Mad are as
shown in equation 1.11:
Maq
Mad
2
= ( )K
3
ia
ib (1.11)
ic
Maq
Mad
= Im K
cos(s)
sin(s)
(1.12)
(1.13)
(1.14)
1.3
drive, equations 1.1, 1.2, 1.3 are implemented by feeding the motor through an
inverter with self commutated devices say IGBT. Now, generating the switching
signals depending on the rotor position feedback is a computation oriented work.
In most of the cases these computational works are done with the help of some high
performance processor. Previously Digital Signal Processors (DSP) were used for
this purpose [8]. But, as VLSI technology is improving, many more high performance controllers are emerging. Subsequently, the need of variable-architectureprocessor is felt in the field of drives research. The most successful variablearchitecture-processor came out with the name FIELD PROGRAMMABLE GATES
ARRAY (FPGA). The main advantage of this FPGA is that, this processor can be
arranged like the processor of our choice depending upon the computational burden
required in the specific derives application.The modern day embedded controllers
can perform online complex computation very fast. This has become a requirement in power electronic applications, where a decision making is often to be made
very fast depending on a faster online mechanical computation and accordingly a
power device is ultimately to be turned on or off based on the information. This
calls for a digital environment which can solve differential equations with very high
frequency. This invariably needs a processor, which processes in parallel way of
computation. An FPGA is a suitable platform for implementing such systems.
The basic advantage of an FPGA is that it can be programmed to process data
in parallel. Thus the implementation of system equations on an FPGA, results in
very short execution time. The controller model in equation form is realized as a
combination of sequential and combinational logic elements. This digital circuit is
then programmed in to FPGA.
1.4
Induction motors (IM) are widely used in variable speed electric drives due to
their ruggedness mainly. On the other hand, DC machines, although not that
rugged, present most ideal characteristics amenable to easy control. Amongst AC
motors IM continued to hold sway over the synchronous motor (SM) due to inherent absence of starting torque. To the user who is always in search of best of
all world type of solutions therefore a machine with the practical advantages of
the AC machines and ease of control of DC machines would be ideal. The PMSM
with a shaft mounted position sensor is one such machine. It is fundamentally a
synchronous machine without the starting problems and on the other hand appears like a DC separately excited machine with constant excitation as far as its
control is concerned. To top it all, the presence of high energy permanent magnets
(instead of field winding as in case of the conventional SM) in the rotor, reduces
its size and weight. Thus a lot of work in the area of adjustable speed drives
now center around this particular machine. Interestingly one such machine was
designed and fabricated in the Power Electronics laboratory of this institute dur-
ing a previous post-graduate thesis work. The present author could hardly resist
the temptation to work in the area of PMSM drives with such a machine already
available. Hence this work. One permanent magnet synchronous motor was designed and made during one of the previous ME thesis works [9]. The motor was
designed to be Sinusoidal Permanent Magnet Rotor Flux Distribution.
The ratings of the motor, based on which theoretical design was done, are as follows: Input Inverters DC Link Voltage,Vdc =48 Volts, Maximum Output
Power Rating, Pout =1kW, Maximum Mechanical Speed, Nr =3000rpm.
The motor was designed to drive one electric bi-cycle. During the design of the
machine, the temperature aspects and flux aspects of the machine were solved by
AN SY S software and the results were compared with that found from different
empirical formulae.
1.5
1.6
Chapter 2
Determination of electrical
parameters of the PMSM
2.1
Introduction
The PMSM drive is efficiently used in different servo drive application. Those
drives are essentially vector controlled and the torque is highly dependent on
proper field orientation. But, if the process of vector control is concerned, it
can be seen that the process needs a very accurate mathematical model of the
system. To determine the mathematical model, it is required to know the exact
experimental and true value of electrical and mechanical parameters of the PMSM.
Several methods are proposed but many of them are not even realistic from the
magnetic circuit point of view of the PMSM.
PMSM is essentially a special kind of synchronous motor. So, scientists tried first
Armature Short Circuit test [10] on PMSM for its electrical parameter determination. But during this process, the armature MMF has a tendency to totally
demagnetize the rotor permanent magnet. The parameters of the PMSM can also
be determined by measuring the torque or power output by some torque transducer
or dynamometer [11]. But, this process will give inaccurate results if iron losses
have to be taken into account, especially in high cupper resistance motors, such
as low power motors. In many papers [12], some parameter identification method
is utilized to determine the parameters of the PMSM. In those papers an ANN
based or KALMAN filter based adaptive model is developed for the PMSM. Subsequently, those adaptive models are trained based on known results (say torque,
power etc) of some tests done in different load conditions. This method can not
be used for very fast vector controlled motors as these training methods are very
time consuming exercises.
10
2.2
The general voltage-current equation (Fig. 1.2 and 1.3) of Phase -A of a PMSM
[6] is:
van = ra ia + pa
(2.1)
Wherea = Total flux linkage of Phase-A Expression of a can be written as in
terms of ia , ib and ic :
{Lls + LA LB cos(2r )}ia
+{0.5LA LB cos 2(r 2
3 )}ib
a =
+{0.5LA LB cos 2(r + 2
3 )}ic
+0 sin(r )
(2.2)
Where,
Lls = Leakage inductance of each phase of the motor.
Lmd = 32 (LA + LB )= Direct axis mutual inductance.
Lmq = 32 (LA LB )= Quadrature axis mutual inductance.
Differentiating equation 2.2 with respect to time and putting r = pr it is found
that:
{Lls + LA LB cos(2r )}pia
+{0.5LA LB cos 2(r 2
3 )}pib
2
pa = +{0.5LA LB cos 2(r + 3 )}pic
+2LB r [ia sin(2r ) + ib sin 2(r 2
3 ) + ic sin 2(r +
+0 r cos(r )
(2.3)
2
3 )]
Now, analytical findings of these equations applied to certain experimental conditions as follows
CASE 1:
A small DC voltage is applied in Phase-A terminals (i.e. terminals a-n of Fig 1.2
and Fig 3.1). Such that phase-A and main field (d-axis) aligns with each other.
Now, the DC is withdrawn without disturbing the rotor position. A single phase
variable AC source is connected across phase-A (a-n), a small voltage is applied
and phase-A current is checked. So, this condition can be analytically stated as
follows:
r = 0
r = 2
(2.4)
ib = pib = 0
ic = pic = 0
Using equation 2.3 and conditions of equations 2.4,
van = ra ia + (Lls + LA + LB )pia
11
(2.5)
LA + LB
)]pib
2
LA + LB
)]Ib
2
(2.8)
(2.9)
CASE 3:
Now, A small DC voltage is applied across phase-B (b-n), so that Phase-B axis
gets aligned with that of main field axis (d-axis). Now, the same AC single phase
voltage source is applied across phase-C and open circuited voltage of Phase- A is
noted and current of Phase-C is also noted. So, analytically this condition can be
stated as follows:
r = 0
r = 7
6
(2.10)
ia = pia = 0
ib = pib = 0
Using equation 2.3 and conditions of equations 2.10 it is obtained:
van = [
LA
+ LB ]pic
2
LA 2LB
)]Ic
2
(2.11)
(2.12)
CASE 4:
A small DC voltage is applied across phase-A (a-n) keeping other phases are kept
open and machine rotor field aligns with phase-A axis. Motor will not rotate
under this condition. The phase-A DC voltage and phase-A DC current is noted
and their ratio (van /ian ) gives the motor phase resistance.
12
2.3
RUN 1:
The following table reflects the test results of CASE 1 as mentioned in the previous
section. All the voltage and current data are taken from digital storage oscilloscope (Phase B and C kept open circuited):
Sl. No. Van(in mV) Ian(in Amps)
1.
220.4
2.02
2.
354.1
3.19
RUN 2:
The following table reflects the test results of CASE 2 as mentioned in the previous
section. All the voltage and current data are taken from digital storage oscilloscope (Phase A and C kept open circuited):
Sl. No. Van(in mV) Ibn(in Amps)
1.
24.46
1.81
2.
28.76
2.08
RUN 3:
The following table reflects the test results of CASE 3 as mentioned in the previous
section. All the voltage and current data are taken from digital storage oscilloscope (phase A and B kept open circuited):
Sl. No. Van(in mV) Icn(in Amps)
1.
16.06
1.23
2.
28.87
2.11
RUN 4:
The phase-A is excited with DC voltage and following data at the machine terminal are found by oscilloscope (Phase B and C were kept open circuited):
Sl. No. Van(in mV) Icn(in Amps)
1.
2.45
3.69
2.
1.99
3.04
From results of RUN 4, the DC resistance of per phase of the motor is as follows:
ra = 0.0655ohm. Due to skin effect ar 50Hz, ra (a.c.) = 1.1ra = 0.07205ohm.
Now, putting this value of per phase ac resistance and results of RUN 1, RUN
2 and RUN 3 ( at 50 Hz single phase AC source) in equations 2.6, 2.9 and 2.12
respectively it is found that the electrical parameters of the PMSM are as follows:
13
(2.13)
from the theory of PMSM, is concerned, the line voltage, in terms of peak permanent magnet rotor flux linkage and electrical frequency can be written as:
q
(2.14)
Now, solving equations 2.13 and 2.14, peak of permanent magnet rotor flux linkage
is found to be:
0 = 0.0533wb turns
It is to be mentioned here that, the designed value of 0 of the test machine was
reported as 0 = 0.06wb turns [9].
2.4
The description of the process suggests that, this process is very simple. There
is no chance of demagnetization of the permanent magnet in this test and yet
the significant machine inductance are found out. The calculations are also very
simple. The values of the parameters, thus obtained, would be in future used for
simulation and also for developing controllers for a complete PMSM drive. The
only demerit is that it can not account for the parameter uncertainties, which might
prove to be important while developing complex online indirect implementation
strategies viz. vector control, if based on value of a particular machines parameter.
14
Chapter 3
Development of PMSM drive
operated through a
three-phase, 1200 conduction
voltage source inverter
3.1
Introduction
This chapter is devoted to simulation studies, implementation details and experimental waveforms of the basic PMSM drive when the laboratory prototype PMSM
is fed from a self-controlled transistorized three-phase inverter operated under 1200
conduction of its devices. Initially each building block of the implemented drive
has been discussed. Afterwards the experimental results are presented and in the
last section some simulation details, to understand the significance of the observed
phenomena, are discussed.
3.2
System description
15
3.2.1
The machine
The PMSM prototype used here is existing in the laboratory and has armature in
the stator and field in the rotor. The field is made of a permanent magnet. The
parameters of the machine were experimentally determined and checked through
rigorous experiments. The machine is essentially a high current (20 Amps) and
low voltage (48 Volts) design. The parameters and the ratings of the machine are
provided in Appendix A.
3.2.2
16
3.2.3
Position sensors
Three Hall position sensors are connected in the stator. A +15V olts regulated
DC power supply is needed to power up the PCB containing the sensors.Each
sensor produces a binary signal, high for 1800 and low for the remaining 1800 .
Each sensor signal is shifted from the other by 1200 as shown in Fig. 3.2, when
the PMSM is run as a generator by an external prime-mover (i.e. by the shaft
connected DC machine acting as motor as shown in Fig. 3.8), at a constant speed,
the hall effect position sensor outputs and the PMSMs armature induced phase
(C-phase) voltage are shown in Figure 3.3.
If the position sensor signals are
3.2.4
Inverter controller
17
Figure 3.3: Experimental open circuit voltage of phase-C and three hall
position sensors output
the phase induced emf of a particular phase passes from its positive zero crossing,
the IGBT of the inverter, that is connected to that phase and the positive DC
bus will be gated just 300 electrical after that, viz at r = 900 , the positive
zero crossing of phase-A induced emf comes and IGBT T1 is gated at r = 600 .
Under this circumstances the phase induced emf and the fundamental current of
that phase becomes co-phaser. This is called switching algorithm for Sensor Lead
Angle=Zero degree. This fact is validated in the subsequent sections. In Fig.
3.5, p,q and r are respectively X1,Y1 and Z1 signals. Output signal of 555
Timer is the inverted version of the corresponding input signal. To nullify this
inversion these signals are again inverted inside FPGA. In Fig. 3.5, s1,s2,s3, s4,
s5, s6 are the six switching signals as per generated truth-table, but to nullify
unwanted glitches, which may be generated due to FPGA interfacing card layout,
each switching signals are ANDed with one of the position sensor signals or its
inverted version, whose low to high going edge coincides with that of the switching
signal. The timer outputs and the switching signals are interfaced through digital
pins of FPGA. These signals are shown in Fig. 3.6.
3.3
While powering up, the DC link voltage, Vdc (Fig. 3.1) is slowly increased, and
system is kept under no-load condition and PMSM is started. The DC link voltage
is increased or decreased by changing the three phase voltages VR , VY and VB with
the help of a three phase variac as shown in Figure 3.7. The DC link voltage is
further increased to test the conditions of the drive at higher speeds. Subsequently,
the PMSM is loaded with generator loading arrangement as shown in Figure 3.8.
18
3.4
3.4.1
Simulation studies
Introduction
The drive reported in this chapter is PMSM drive fed by an VSI inverter under
1200 conduction of switches. If the switching pattern of 1200 is concerned, it can
19
Figure 3.5: FPGA program to generate control pulses of the switches under
1200 conduction
be noted that, sometime two devices (two IGBTs) and sometimes three devices
(Two IGBTs and one freewheeling diode) are conducting. Hence all the three
phase voltages of the machine can not be predicted under this operating condition
at a time. So, d q axis modeling of the drive is difficult here. So, a Detailed
Numerical Model is developed. In this model the a-b-c frame equations of all
twelve switching (as will be described later) combinations are numerically solved
and the performance of the drive is predicted. In short, this Detailed Numerical
Model requires better insight of the drive under all possible switching conditions.
3.4.2
The sensor lead angle is defined by the variable, s. The definition and inner
meaning of sensor lead angle is described in previous section. These definitions
are depicted in Fig 3.15. Here 1200 conduction VSI fed PMSM is considered. Anti-
20
3.4.3
From the basic knowledge of 1200 conduction VSI fed load, the total electrical
conduction period can be divided into six conduction intervals. Each conduction
interval can be subdivided into two modes. In MODE 2 two switches, one from
three switches connected to positive DC bus and one from three switches connected
to negative DC bus, conduct. MODE 2 contributes to the maximum time of that
conduction period. Now, MODE 1 lasts for a very small time before MODE
2, when three devices (two of which are the switches already conducting and
will continue to do so in the incoming MODE 2 and one diode which is the
21
Figure 3.7: The arrangement by which the DC link voltage of the inverter is
controlled
freewheeling diode connected to the phase which is leaving conduction, not to
suddenly stop the conduction of the phase). Two such MODE1 and two such
MODE2 are shown in Figure 3.17. This MODE 1 is present when conduction is
switching from previous conduction interval to present conduction interval. This
MODE 1 is called Commutating Modeor Inter-switch Mode. MODE 1
lasts for the time up to which current through the phase which is outgoing persists
and free wheeling diode is on. When this current is zero operation is switched
to MODE 2. So, it is clear that throughout one complete electrical cycle there
are six MODE 1 and six MODE 2, which occur depending upon electrical rotor
positions. These six MODE 1 equations are similar but differ only w.r.t. some
functions relating electrical rotor position. The same can be told for six MODE
2 equations. The algorithm for simulating such drive is shown below in Fig.
3.16. In the algorithm shown the system equations are solved by FOURTH
ORDER RUNGE KUTTA method. And the variables like voltages, currents,
torque, and speed are updated in regular interval in each time step iteration. This
model is called DETAILED NUMERICAL MODEL [13] of PMSM drive. A
typical C code implementation of the above algorithm is done. The results of
the simulation is shown in subsequent sections.
3.4.4
System equations
Two Mode 1 and two Mode 2 conditions are shown in Fig. 3.17. Four more
similar Mode 1 and Mode 2 conditions exist. In Mode 2, only one loop current
22
ian = im + icom
ibn = im
icn = icom
Vdc = van vcn
van = vbn
(3.1)
Now, putting equation 3.1 in equations 1.1, 1.2 and 1.3 and using torque balance
equations it is found that the dynamic equations of M ode1 can be arranged as
follows:
pi
com = f21 (im , icom , r , r )
(3.2)
23
Figure 3.9: Experimental steady state waveforms of phase current and phase
voltage at Vdc = 15V olts, no-load and sensor lead angle = 00
ian = im
ibn = 0
icn = im
Vdc = van vcn
(3.3)
Now, putting equation 3.3 in equations 1.1, 1.2 and 1.3 and using torque balance
equations it is found that the dynamic equations of M ode2 can be arranged as
follows:
(3.4)
pr = f61 (im , r , r )
pr = f41 (r )
Where, currents im , icom are the currents as shown in Figure 3.17 and the functions
are discussed in Appendix B. These equation 3.4 are solved to get the variables
specified in M ode2 in the simulation.
3.4.5
Simulation results
The algorithm for the DetailedN umericalM odel is tested for different operating
conditions and DC link voltages. The steady-state simulated results are shown
in Fig. 3.18 and Fig. 3.19. The results are closely tallying with that of the
experimental ones. The simulated results also verifying that, at sensor lead angle
00 , the phase angle between the fundamental component of armature phase current
and corresponding phase induced emf is 00 . In detailed numerical model the beck
24
Figure 3.10: Experimental steady state waveforms of phase current and phase
voltage at Vdc = 30V olts, no-load and sensor lead angle = 00
emf profile of the machine is assumed to be sinusoidal as shown in equations 1.1,
1.2 and 1.3. But, in the designed experimental lab prototype PMSM, the induced
emf profile is flat-topped with the flatness span of around 540 electrical as found
experimentally (seen from Fig. 3.3). Hence, when the PMSM is run as a motor
with self controlled 1200 conduction VSI, this is reflected as the less sharp peak
phase voltages as shown in Fig. 3.13 and Fig. 3.14. The two consecutive 600
electrical conduction intervals of machine phase are not exactly symmetrical. This
can be explained from Fig. 3.3, which reflects that the position sensor outputs are
not exactly 1200 electrical apart mutually, due to slight misalignment of the hall
effect based position sensors, as discussed before.
3.5
Conclusion
It can be noted that the operation of the PMSM that is explained in this chapter
is mainly under self controlled 1200 conduction mode. Now, for BLDC mode
of operation of PMSM drive the switching sequence of the inverter is that of
the 1200 conduction mode of the switches of a VSI. As a result, as explained
any two switches at a time conduct (if inter-switch transients of each mode are
neglected)causing the same current to flow through the conducting phases. In
actual DC motor due to the presence of brush segments, the armature current
enters into the pseudo stationary coil through one brush and the same current
leaves the pseudo stationary coil through other brush. As DC motor rotates,
the terminals of the same pseudo-stationary coil are formed with different set of
actual armature coil. In 1200 conduction mode VSI fed PMSM, the armature
25
Figure 3.11: Experimental steady state waveforms of phase current and line
voltage at Vdc = 15V olts, no-load and sensor lead angle = 00
MMF phasor producing coil (at a time two phase coils are connected to form
the equivalent pseudo-stationary coil) set is changed as motor rotates due to the
presence of inverter. Other than this some extra advantages are also gained in
1200 conduction VSI fed PMSM. The main advantage of this is that, here as
soon as switch T 1 (Ref. Figure 4.14 starts conducting, the positive part of phaseA current will start building. Hence, if this start of conduction point of T 1 is
delayed or advanced, ia can be made to lead or lag the induced emf of phase A,
0 r cos(r ) . Thus the internal power factor (power factor w.r.t angle between
back emf and the corresponding phase current )of PMSM can be controlled directly
in 1200 conduction VSI configuration. The start of conduction point of T 1 can be
controlled by changings which is a constant of equation 1.8. In further analysis
it is shown that this s = sensor angle of 1200 conduction VSI fed of PMSM.
Analytically speaking this implies that, in this 1200 conduction VSI the angles
(Ref equation 1.8) which is the internal power factor angle (neglecting commutation
overlap), can be directly controlled, though it is a voltage source inverter. In effect
it can be seen that change on s can shift the space angle of armature MMF,
Ma (Ref.Figure 1.4). This is analogous to the space angle control of armature
MMF by brush shifting in conventional DC machine.
26
Figure 3.12: Experimental steady state waveforms of phase current and line
voltage at Vdc = 30V olts, no-load and sensor lead angle = 00
Figure 3.13: Experimental steady state waveforms of phase current and phase
voltage at Vdc = 25V olts, Viscous friction,f = 0.0016N m s/Rad, Load
Torque, TL = 1.3N m,sensor lead angle = 00
27
Figure 3.14: Experimental steady state waveforms of phase current and phase
voltage at Vdc = 35V olts, Viscous friction,f = 0.0016N m s/Rad, Load
Torque, TL = 1.5N m,sensor lead angle = 00
28
Figure 3.16: Algorithm for simulating 1200 conduction VSI fed PMSM
29
Figure 3.17: Conduction modes for PMSM drive (a) M ode1 with T 1T 2 pair,
(b) M ode2 with T 1T 2 pair, (c) M ode1 with T 3T 4 pair and (d) M ode2 with
T 3T 4 pair
30
Figure 3.18: Simulated steady state waveforms of phase current and phase
voltage at Vdc = 25V olts, Viscous friction,f = 0.0016N m s/Rad, Load
Torque, TL = 1.3N m,sensor lead angle = 00
31
Figure 3.19: Simulated steady state waveforms of phase current and phase
voltage at Vdc = 35V olts, Viscous friction,f = 0.0016N m s/Rad, Load
Torque, TL = 1.5N m,sensor lead angle = 00
32
Chapter 4
Development of an analytical
Averaged Dynamic Model of a
PMSM drive operated with a
1200 conduction self-controlled
inverter
4.1
Introduction
In the previous chapter Detailed numerical mode of the PMSM excited by a 1200
conduction self-controlled VSI has been developed. This model is more detailed as
each of 12 conduction modes are to device switchings is properly presented with
their guiding differential equations. But though detailed and more accurate, this
model is totally numerical in nature. Much physical insight inside the process is
not obtained with this model. Moreover the set differential equations itself changes
from one operating mode to another. Hence, if such an inverter controlled drive
is to be controlled for adjustable speed application, and the controller parameters
are to be ascertained, a transfer function and/ or state variable based linear timeinvariant model representing the inverter switched PMSM must be found out.
This necessitated the development of an analytical, state-space-based, averaged
dynamic model, which is discussed in this chapter [14, 15]. It is less accurate than
the detailed numerical model but much greater physical insight of the happening
phenomena is possible with this model. Additionally, if an adjustable speed drive
is planned, by varying the DC link voltage of the 1200 conduction inverter feeding
the PMSM with the help of a front-end controlled rectifier, then the overall drive
comprising of the controllers, the front-end rectifier, the inverter feeding the PMSM
can be analyzed mathematically and the controller gain settings can be analytically
33
determined.
4.2
Now since the system is fed by a 1200 conduction VSI, the following assumptions
has been made for developing the averaged dynamic model:
1. Only fundamental component of armature current and the permanent magnet field MMF are responsible for producing average torque.
2. The dynamic value of the DC link current is assumed to be the cyclic average
of its DC component. The dynamic state is therefore modeled as a quasi
steady state, i.e. the DC link current is assumed to remain constant for one
electrical cycle of the armature current and change thereafter.
3. The armature current waveform is rectangular and therefore,
2 3
ilink = 1.103ilink
iapk =
(4.1)
where,iapk and ilink are peak of the fundamental armature current and dynamic value of the averaged DC link current respectively. This assumption
is done based on Fig. 4.1.
4. Due to self-control principle, the fundamental radian frequency of the armature current (r ) is locked with the mechanical speed (m ) of the motor,
i.e.
r = 0.5P m
(4.2)
, where P is the number of poles.
5. Inter-switching transient period (freewheeling period) is assumed small and
neglected.
6. Inverter losses are neglected.
7. Saturation and hysteresis effects are neglected.
8. PMSM armature is star connected and non-salient in nature.
Now, following these assumptions it can be written that:
ia = 1.103ilink cos(r t)
(4.3)
34
(4.4)
Figure 4.1: Simulated steady state waveforms of phase current and DC link
current at Vdc = 35V olts, Viscous friction,f = 0.0016N m s/Rad, Load
Torque, TL = 1.5N m,sensor lead angle = 00
Where, r0 = Value of electrical rotor position,r when ia attains its peak value.
Now, refereing to Fig. 3.15, it can be concluded that:
r0 = s
(4.5)
Now, as inverter is taken to be lossless it is well accepted that, input power to the
system is:
Poi = van ia + vbn ib + vcn ic = term1 + term2 + term3
(4.6)
Using equations 1.1, 1.2, 1.3 and 4.3 in equation 4.6, it can be found that:
term1 = ra (i2a + i2b + i2c ) = 1.82ra ilink
(4.7)
(4.8)
(4.9)
(4.10)
Using equations 4.7, 4.8, 4.9 and 4.10, it can be obtained that:
2
35
(4.11)
(4.12)
(4.13)
So, the equivalent circuit is as shown in Fig. 4.2: So, from Fig. 4.2, mechanical
ra
0.90 cos(r0 )
0.55Vdc
ilink
r +
Ls
Ls
Ls
(4.14)
(4.15)
(4.16)
(4.17)
1 P 2
f
P TL
( ) 1.6550 cos(r0 )ilink r
(4.18)
J 2
J
2J
If equation 4.15 is closely scrutinized, it can be concluded that by changing sensor
angle, electromagnetic torque can be changed. This is similar to the process of
torque changing by brush shifting in a separately excited DC motor. The stateequations of the P M SM ( Equations 4.17 and 4.18) are found to be linear and
approximating the similarity of separately excited conventional DC machine with
constant excitation. The averaged dynamic model, thus poses the complex 1200
conduction inverter switched PMSM as a linear system.
pr =
36
4.3
In the previous chapter, the DetailedN umericalM odel is developed and validated.
If the previous chapter is noticed, it can be seen that the presence of all 12 complex conduction modes were validated. The detailed numerical model can predict
steady state as well as transient behavior of the PMSM drive under self controlled
1200 conduction mode. Now, equations 4.17 and 4.18, which are the equations of
the Averaged Dynamic Model, are solved numerically and the results are compared to that found from DetailedN umericalM odel under same dynamic conditions,viz same step voltage, same load torque condition as shown in Fig. 4.3, 4.4,
4.5 and 4.6.
It can be noted that plots obtained from dynamic average model have slightly
more value at steady state condition but in transient condition they are almost
same.The cause for this higher value is again hidden in Fig. 4.1. It is noted that
at commutating sections ia is more than ilink , but for simplicity, here it is taken
for granted that at those conditions also ilink is a replica of ia . This causes slightly
higher ilink value and consequently electromagnetic torque (DC component) is also
slightly higher causing the speed also to be slightly higher.
37
4.4
Now the PMSM is started under the self controlled 1200 conduction algorithm
and subsequently it is loaded with mechanical load torque under different DC
Link voltage, Vdc and SPEED-TORQUE characteristics at different DC link voltage were found out. The speed torque characteristics are shown in Figure 4.7.
Now, if best fit curves are drawn from these characteristics, equations of those
characteristics will be as shown in 4.19, 4.20 and 4.21. In the equations, mechanical speed is expressed in Rad/Sec (m ) and Load Torque is expressed in Nm (TL )
For , VDC = 35V olts,
m = 14TL + 180
(4.19)
For , VDC = 30V olts,
m = 18TL + 160
(4.20)
m = 10TL + 120
(4.21)
38
1.82ra
Vdc
TL +
P
2
(1.655 2 0 )
1.655 P2 0
(4.22)
Now, comparing equation 4.19, 4.20, 4.21 and 4.22, it can be calculated that:
0 = 0.0504wb m2 , ra = 0.2137ohm
If these parameters are compared with the measured (ref. chapter 2) it can be
concluded that the peak value of flux linkage of any phase due to permanent magnet
is almost same as that of the measured previously. But, the per phase resistance
found in the current chapter is nearly three times more than the measured value
at the previous chapter. This is not surprising, actually, during the determination
process of the speed-torque characteristics, motor parameter s that the inverter
will see are from the inverter terminals, and some electrical wires are connected
in between the motor phases and the inverter terminals. The PMSM armature
number is so small that resistance of wires seem comparable and even more. If
the proper length of the wire is taken into consideration the resistance found
is=ra (motorphase) + Rwire . The actual motor phase resistance, ra is so small
(as shown in previous chapter) that, the wire resistance, Rwire has eclipsed the
PMSMs armature resistance per phase.
39
40
41
Chapter 5
Study and simulation of
schemes for position sensorless
operation of a PMSM drive fed
from a 1200 conduction
self-controlled inverter
5.1
Introduction
5.2
The position sensorless operation of the PMSM drive calls for estimating the rotor
position of the motor from the terminal variables of the motor, such as motor
terminal voltages and terminal currents. Two such schemes have been described
here. In the first method a speed observer is utilized to estimate the speed of the
motor and that speed is utilized to integrate the position information of the motor.
In the second method the phase back emf of the motor is utilized to estimate the
rotor position of the motor.
42
5.2.1
Introduction:
Fig. 5.1 presents the schematic diagram of the speed observer based position
sensorless operation of the transistorized PMSM drive. The position estimator
43
be:
pilink
pr
213 157.73
257.18 16.03
ilink
r
1788.62
0
Vdc
(5.1)
1 0
y=
ilink
r
(5.2)
V =
C CA
C
CA
(5.3)
Where, A, C are the state matrices of the system. Putting values from equations
5.1 and 5.2, the determinant, det(V ) = 11.82 6= 0. So, it can be concluded that,
system (A,C) is fully observable.
Now, the eigenvalues of equation 5.1 are : 114.52 j175.69
The observer eigenvalues are chosen almost 10 times faster than that of the plant
eigenvalues, i.e. the observer eigenvalues are chosen at: -2000 and -3000.
4771
37276
pid
link
cr
p
213 157.73
257.18 16.03
id
link
cr
1788.62
0
Vdc +
4771
37276
(yyb)
(5.4)
yb =
1 0
id
link
cr
(5.5)
Where, the variables with hat are estimated value of the corresponding non-hatted
variables.
So, the equations implemented inside the block of Position Estimator as shown
in Fig. 5.1 are shown in equation 5.6:
cr + 1788.62Vdc + 4771ilink
pid = 4984id
link 157.73
link
d
cr 37276ilink
pr = 37533.18ilink 16.03
cr
pbr =
(5.6)
44
Actual DC Link voltage and DC Link Current, and the position estimator will
calculate the estimated electrical rotor position by solving the equation 5.6 online
and will give the switching signals to the inverter assembly.
Simulation of the scheme:
The proposed observer-based implementation is simulated using a C code. The
algorithm of the simulation sequence is shown in Fig. 5.2. The difference in
this algorithm from that of shown in Fig. 3.16 is that, in sensorless scheme,
the position estimator equations (equation 5.6) are simultaneously solved with
equations of each mode and the control sequences are changed on the basis of the
estimated rotor position. The initial rotor position of the estimator is taken as 00
irrespective of the initial rotor position of the PMSM.
Simulation results of the scheme:
Three phase currents information of the PMSM are required for taking different
protection measures. So, at least two current sensors are required. An additional
current sensor is required for sensing the DC link current. But, it is assumed in
the averaged Dynamic Model(Fig. 4.1) that, the DC link current is the replica
of each phase current, when that current is positive (i.e. into the armature). So,
a new variable idc is introduced which is the instantaneous summation of all the
positive parts of the phase currents. This idc is fed inside the position estimator
instead the actual DC link current.
idc = ia Sa + ib Sb + ic Sc
(5.7)
45
rotor position can not go beyond limit and stabilizes. It can also be noted that, if
initial position of the rotor is other than 00 , position estimator first reaches that
value and then speed build-up starts (Fig. 5.3, 5.6).
It can also be remembered that, inAveraged Dynamic mode the DC link current
is the cyclic average of the actual DC link current, but in the simulation, the
position estimator takes the raw DC link current along with all its ripples as
the input from the solution by Detailed Numerical Model. This phenomena is
reflected as the introduction of ripples in the estimated speed of the PMSM drive.
This is clear from the simulated result of the estimated speed (Fig. 5.6).
5.2.2
Introduction:
Fig. 5.7 presents the schematic diagram of emf sensing based position sensorless
operation of the 1200 conduction inverter fed PMSM drive. If ideal rectangular
currents are assumed for 1200 conduction of the devices, then Fig. 3.18 3.19,
3.13 and 3.14 suggest that, for s = 00 , the peak of the armature phase current
fundamental and the corresponding phase induced emf coincides. This indicates
that if s = 300 lead is maintained, the positive zero crossing of the induced emf
and the positive going edge of the rectangular armature current of a particular
phase coincide. Therefore it can be concluded that, whenever the induced emf of
a particular phase crosses zero, no current was flowing through that phase for the
past electrical 600 (as it is coming in conduction). At those instants, the terminal
voltage of that phase is same as its induced emf i.e. zero crossing of a terminal
voltage of a phase is same as that of the induced emf of that phase. This relation
is utilized for implementing the sensorless operation [18]. A zero crossing detector
(ZCD) signals for each phase will be derived from the phase currents and phase
voltages information. Each of this signals is a zero crossing detecting signal of the
corresponding phase back emf, i.e. for each phase, the ZCD signal is high when
back emf if 0 and ZCD signal is low when back emf if < 0. From these three
ZCD signals, six switching signals for six IGBT will derived for sensor lead angle,
s = 300 .
The difficulty in implementing such a scheme is the presence of commutation
spikes, which arise at the instant of switching after every 600 interval. So, zero
crossing detectors can not be very easily employed for detecting the zero crossing
of the phase back emf by detecting the zero crossing of the phase voltage. So,
some special additional techniques are used here to detect the zero crossing of the
back emf satisfactorily.
Strategy and simulation of the scheme:
46
Some boolean variables are introduced : pa , pb and pc . The status of these variables are changed when ia = 0, ib = 0 and ic = 0 respectively. Otherwise, their
values are not changed, their old values are retained. Now, if van 0, pa = 1
else pa = 0. This is applicable for other two phases also. These pa , pb and pc are
three ZCD signals of back emf, i.e. pa = 1 when phase-A back emf if 0 and
pa = 0 when phase-A back emf if < 0. The same is applicable for other two phases
also. Before starting the PMSM in this sensorless scheme, IGBT, T5 and IGBT, T6
will be initially switched, so the PMSM rotor will assume r = 00 position. Now,
boolean variables are given an initial value corresponding to the r = 00 position,
i.e. pa = 1, pb = 0 and pc = 0. Now, the PMSM is ready to start in this sensorless
scheme. The logic is formed in such a ways that at the advent of pa =1, pb =0 and
pc =0 edge, IGBT T2 will be switched on and subsequently other switches will be
made on /off depending on the status of ZCD signals.
The simulation results of this sensorless scheme are shown in Fig. 5.9, 5.10, 5.11,
5.12, 5.13 and 5.14.
Interpretation of results:
Fig. 5.9, 5.10 and 5.11 reflect that, the ZCD signals are exact substitutes of the
Hall position sensor output. These ZCD signals are also mutually 1200 electrical
apart. The speed buildup process is also very smooth as shown in Fig. 5.12. As
shown in Fig. 5.14, it can be noticed that, the fundamental component of armature
current is leading the corresponding phase back emf by 300 electrical.
47
Figure 5.2: Algorithm for simulating the observer based position sensorless
operation scheme of 1200 conduction VSI fed PMSM drive
48
Figure 5.3: Simulated waveforms actual rotor position and estimated rotor position of PMSM under observer based sensorless operation, at Vdc =
48V olts, f = 0.022N m sec/Rad, TL = 0N m
49
Figure 5.5: Simulated waveforms actual replica of DC link current and estimated DC link current of PMSM under observer based sensorless operation,
at Vdc = 48V olts, f = 0.022N m sec/Rad, TL = 0N m
50
Figure 5.7: Schematic diagram of back emf estimation based position sensorless operation of the PMSM drive
51
Figure 5.8: Algorithm for simulating the back emf estimation based position
sensorless operation scheme of 1200 conduction VSI fed PMSM drive
52
Figure 5.9: Simulated transient waveforms of phase-A back emf and phase-A
ZCD signal of PMSM under back emf estimation based sensorless operation
from starting to few cycles, at f = 0.022N m sec/Rad, TL = 0N m with the
application of step DC link voltage Vdc = 48V olts at t=0Sec
Figure 5.10: Simulated transient waveforms of phase-B back emf and phase-B
ZCD signal of PMSM under back emf estimation based sensorless operation
from starting to few cycles, at f = 0.022N m sec/Rad, TL = 0N mwith the
application of step DC link voltage Vdc = 48V olts at t=0Sec
53
Figure 5.11: Simulated transient waveforms of phase-C back emf and phase-C
ZCD signal of PMSM under back emf estimation based sensorless operation,
at f = 0.022N m sec/Rad, TL = 0N m with the application of step DC link
voltage Vdc = 48V olts at t=0Sec
Figure 5.12: Simulated mechanical speed of PMSM from starting till steady
state under back emf estimation based sensorless operation, at Vdc = 48V olts,
f = 0.022N m sec/Rad, TL = 0N m
54
Figure 5.13: Simulated DC link current of PMSM from starting till steady
state under back emf estimation based sensorless operation, at Vdc = 48V olts,
f = 0.022N m sec/Rad, TL = 0N m
55
Figure 5.14: Simulated steady state waveform of phase-A current and phaseA voltage of PMSM under back emf estimation based sensorless operation,
at Vdc = 48V olts, f = 0.022N m sec/Rad, TL = 0N m
56
Chapter 6
Study of FIELD ORIENTED
CONTROL of PMSM drive
6.1
Introduction
It is discussed in the previous chapters that how a PMSM drive can be used as
a variable speed drive. Researches are going[19, 8] on how to create an Electronically Commutated DC Motor, whose brush shifting effect can be easily achieved
only by changing the stator current command in the controller and the flux can
be easily controlled in magnitude and space angle. To be brief, by this sort of
control essentially the SPATIAL ANGLE of the machine is controlled. The SPATIAL ANGLE is actually the angle between FIELD FLUX and the ARMATURE
MMF.For FIELD ORIENTED CONTROL, the SPATIAL ANGLE is controlled
to the value of 900 . If SPATIAL ANGLE is controlled to some value other than
900 , it is called SPACE ANGLE CONTROL.
6.2
57
Figure 6.1: Fixed stator windings magnetic axis and rotating rotor windings
magnetic axis with rotor axis are rotating at electrical speed, r
rotor reference frame are shown in Figure 6.2 and 6.3[6].
The respective voltage equations are shown in equations 6.1. It is assumed
that rotor dampers are short circuited. All the primed quantities are taken to be
referred to stator.
0 i0 + p 0 = 0
vqr = rqr
qr
qr
0 = r 0 i0 + p 0 = 0
vdr
dr dr
dr
Equation set 6.2 is showing the flux linkage equations of q-axis Stator, d-axis
Stator, q-axis damper, d-axis damper and main field winding (in d axis) starting from the top.
dr
fr
0
0
0
(6.2)
0
dr = Lmd ids + L0dr i0dr + Lmd i0f r
f0 r = Lmd ids + Lmd i0dr + L0f r i0f r
Where, Lls =Leakage Inductance of the stator
58
Figure 6.2: d-axis equivalent circuit of the wound field synchronous motor
rotating at electrical speed, r in rotor reference frame
L0lr =Leakage Inductance of the rotor referred to stator
L0dr =Self Inductance of d-axis damper referred to stator
L0qr =Self Inductance of q-axis damper referred to stator
L0f r =Self Inductance of main field referred to stator
Lmd =d-axis Magnetizing Inductance
Lmq =q-axis Magnetizing Inductance
Lqs = Lls + Lmq =Self Inductance of q-axis stator
Lds = Lls + Lmd =Self Inductance of q-axis stator
rs =Per phase stator resistance
0 = r 0 =Per phase rotor resistance referred to stator
rr0 = rqr
dr
59
Figure 6.3: q-axis equivalent circuit of the wound field synchronous motor
rotating at electrical speed, r in rotor reference frame
The respective instantaneous electromagnetic torque equation is expressed in
equation 6.3.
3 P
(6.3)
Te = . (ds iqs qs ids )
2 2
Where P is number of poles of the motor. If equations 6.2, 6.1 and 6.3 are observed
closely, the torque production process can be expressed in a block diagram as shown
in Figure 6.4. The block diagram is clearly reflecting the coupling between the d
axis and q axis flux linkages and currents. Significant effect of induced currents
can also be seen in the generated torque. In brief it can be stated that a change in
either component of stator current, ids or iqs will induce rotor damper currents i0dr
or i0qr creating a lag in the torque response. Now if it can be ensured that ids = 0
for all operating conditions then the torque production block will change as shown
in Fig. 6.5. A change in iqs will induce transient q-axis component of damper
current, but torque will be unaffected provided ids remains zero. This ids is
measured with respect to synchronously rotating reference frame, so maintaining
ids = 0 inherently calls for flux (field) position information i.e. r as shown in
Fig. 6.1. Instantaneous torque is now directly proportional to iqs and ds as
in dc-machine with brushes in mechanical neutral position. So, modified torque
equation is shown in Fig. 6.4.
3 P
Te = . Lmd (i0dr + i0f r )iqs
2 2
(6.4)
So, SPATIAL ANGLE =900 is obtained with this ids = 0 operation. This is
called true FIELD ORIENTATION condition. Now, if main field current (i0f r )
of the synchronous motor is kept constant, the direct axis damper current (i0dr )
will also be constant and instantaneous torque will be directly proportional to
iqs . This effect can be gained from a synchronous motor if the rotor is made of
60
Figure 6.4: Block diagram showing the torque production process in a Synchronous Motor
a permanent magnet having no dampers. Now the instantaneous torque equation
will be changed as shown in Fig.6.5.
3 P
Te = . 0 iqs
2 2
(6.5)
Where 0 is maximum flux linkage of any of the armature phases due to permanent
magnet rotor.
If Field Orientation process is looked into more deeply, the steady state time-space
phasor of the motor under this true Vector Control can be viewed as shown in Fig.
6.6. Where Vs andIs are the terminal voltage and terminal current of the PMSM
at steady state.
It can be concluded from Fig.6.6 that under true vector control the motor operates
under lagging terminal power factor.
6.3
6.3.1
This section deals with the simulation studies of different Field Orientation processes of a PMSM excited by a voltage source inverter. First of all the current
control method of each of these processes are studied. Next Position Sensorless
61
Figure 6.5: Block diagram showing the torque production process in a Synchronous Motor at ids = 0
Operation of Field Orientation is studied[20].Then speed control method is discussed [8]. As it can be explained that the speed control is done by adjusting the
q-axis component of stator current in rotor reference frame.
6.3.2
True Vector Control calls for the the process so that, the d -axis component of
the stator current in rotor reference frame is zero. This has been ensured in this
work in two different ways. The most easy way is to implement this process with
a HYSTERESIS COMPARATOR and the second is to implement this with the
help of a SINE PWM INVERTER.
6.3.3
In this scheme the current is controlled with the help of a hysteresis comparator. The scheme is simulated totally in the MATLAB-SIMULINK environment.
The block diagram of the current control scheme is shown in Fig. 6.7. If Fig.
6.7 is concerned it can be seen that iq is given a finite reference value and id is
given a reference value zero. This current references are given to a TWO PHASE
TO THREE PHASE TRANSFORMATION BLOCK , where with the information electrical rotor position instantaneous phase current references are calculated
62
Figure 6.6: Steady State phasor diagram of the PMSM under true vector
control (neglecting stator resistance rs )
and these phase current references are passed to the input of the HYSTERESIS
PWM INVERTER block. The details of the block is shown in Fig. 6.8. It can
also be noted from this inverter block is that the DC LINK Voltage is taken as
Vdc =48Volts. It can be seen in the Inverter Block that, three hysteresis comparator
are used to generate the switching signals of each phase of the two-level inverter.
The logic inside the hysteresis is such that, say for phase A, when (ia ia ) > ,
upper switch of Ph-A of a two level inverter is switched on. When (ia ia ) < ,
lower switch of Ph-A of inverter is switched on. The equations that are realized
in the Inverter block are shown below:
van = Vdc 2Sa (S3 b +Sc )
vbn = Vdc 2Sb (S3c +Sa )
vcn = Vdc 2Sc (S3 a +Sb )
(6.6)
Where, Sa , Sb and Sc are the switching functions of the phase a, b and c respectively. So, the variable k, as shown in Figure 6.8, has a value of 13 .
Here, ia is instantaneous reference value of phase-A current, ia is actual instantaneous value of phase-A current and is the tolerance value within which actual
phase current can deviate from phase current reference. The same logic is followed
in other two phases also. Now, the phase voltages are fed to Permanent Magnet
Synchronous Motor block. The details of this block is shown in Fig. 6.9. The
speciality of this PMSM block is that, in this block three phase a-b-c frame equations of the cylindrical rotor PMSM are implemented. Next the PMSM is tuned
with the values of parameters of the existing lab-prototype PMSM, as shown in
appendix. In the torque generating function, instantaneous q-axis component of
63
Figure 6.7: Block diagram of current control method of VECTOR CONTROL by HYSTERESIS COMPARATOR
64
65
Figure 6.10: Simulated transient waveforms (zooming the transient) of qAxis and d-Axis currents (in Amps) of stator in rotor reference frame of the
PMSM under vector control with hysteresis controller in current control mode
with Dc Link Voltage, Vdc =48Volts, viscous damping friction,f=0.0016Nmsec/Rad, Passive load torque, TL =0.56Nm
6.3.4
Simulation of CURRENT CONTROL loop of VECTOR CONTROL by SINE PWM Voltage Source
Inverter
If equation 6.2 for a wound field synchronous motor are modified for the Permanent
Magnet Synchronous Motor the equations will change its form to equation 6.7.
qs = Lqs iqs
ds = 0 + Lds ids
(6.7)
Now the stator voltage equations for a PMSM are shown in equations 6.8.
66
(6.8)
Figure 6.11: Simulated transient waveforms of q-Axis and d-Axis currents (in Amps) of stator in rotor reference frame of the PMSM under vector control with hysteresis controller in current control mode with Dc Link
Voltage, Vdc =48Volts, viscous damping friction,f=0.0016Nm-sec/Rad, Passive load torque, TL =0.56Nm
The basic process of using SPWM inverter to make ids = 0 is to maintain equation
6.9.
vds = r Lqs iqs
(6.9)
It can be seen from equation 6.8 that, maintaining equation 6.9 will ensure ids = 0
right from startup. The value of iqs is controlled by controlling the voltage value
vqs . The block diagram for this scheme is shown in Fig. 6.15.
67
68
69
1
10 th
of the
Following the rules, the parameters of the Current PI controller of the PMSM
under test are found to be: Kpi = 1.9321 and Kii = 411.5530.
70
Figure 6.15: Block diagram of current control method of VECTOR CONTROL by SPWM INVERTER
The system is simulated and the results are noted. It can be seen from Fig.6.18
and 6.19 that, mean value both direct and quadrature axis currents are following
the reference values. The speciality of this SPWM VSI fed vector control is that,
the mean value of the quadrature axis stator current is reaching its reference value
after some finite delay unlike the Hysteresis Comparator fed Vector control as can
be seen from Fig. 6.18. But, the mean value of the direct axis stator current is zero
right from the startup. Fig. 6.20 is verifying the fact that phase-A back emf and
phase-A current are in phase almost right from startup. This is the verification of
true vector control. Generation of electromagnetic torque and speed build up are
shown in Fig. 6.21 and 6.22 respectively.
If pair of figures Fig. 6.11, 6.19 and Fig. 6.12, 6.20 are compared then it can be
concluded that the harmonics content of the phase current of the machine fed from
Sine PWM inverter is much higher. But, the switching frequency of the IGBTs
of the Sine PWM inverter is fixed to the frequency of the triangular wave used
for the PWM. One very interesting result with respect to Sine PWM Inverter fed
Vector Controlled PMSM is that, as mechanical speed is increasing the ripple span
is also increasing in currents. This is happening due to the shifting of harmonics
content towards high frequency range as the speed of the machine is increasing.
71
6.3.5
0
piqs = Lrss L
r + Lqss
s
pr = 1.5 J1 ( P2 )2 0 iqs Jf r
(6.12)
P
2J TL
!
rs
view, it can be concluded that, the state matrix is x =
, input matrix is u =
Ls
vqs
TL
, A =
213 173.33
233.09 1.166
, B =
72
3252
0
0
1457.7
, C =
1 0
Figure 6.17: Simplified structure of q-axis stator winding for the design of
current PI controller
and D = 0. Now, the state equations refereed are equations 6.13.
x = Ax + Bu
y = Cx + Du
(6.13)
The numerical values of the matrices can be found by placing numerical values
of the parameters of the PMSM under test as given in the appendix. It can also
be noticed that the system described by equation 6.12is observable. Now, if a
LUENBERGER OBSERVERis designed so that the value of electrical speed,
r can be continuously observed (estimated) by minimizing the error between
actual iqs and estimated iqs , i.e ic
qs . By integrating this estimated electrical speed,
cr , the electrical rotor position, r can be estimated (ref. Fig. 6.1). So, the use
c
cr + 4786iqs + 3252vqs
pic
qs = 4999iqs 173.33
c
c
c
p
=
34582
i
1.166
r
qs
r 34349iqs 1457.7TL
cr
pbr =
(6.14)
These equation 6.14 are implemented inside the block OBSERVER. The inside
of this observer block can be seen at the Figure 6.24. If Fig. 6.23 is noticed
closely, it can be seen that the actual iq is calculated with measured value of three
phase stator currents and with the estimated electrical rotor position, br . So, to
73
Figure 6.18: Simulated transient waveforms (Zooming the transient) of qAxis and d-Axis currents (in Amps) of stator in rotor reference frame of the
PMSM under vector control with Sine PWM Inverter in current control mode
with Dc Link Voltage, Vdc =48Volts, viscous damping friction,f=0.0016Nmsec/Rad, Passive load torque, TL =0.56Nm
start the machine in this method, the electrical rotor position has to be taken to
zero value. Since the observer is trained with initially zero electrical rotor position
value. In a previous section, one method is described to align the rotor to electrical
zero position. Now, this method is simulated and the actual and estimated q-axis
value of stator current is shown in Fig.6.25 and 6.26. It can be noted that the mean
value of the actual q axis stator current and the estimated q axis stator current
are same right from the start up. The true vector control operation is seen from
the phase current and phase back emf plot as shown in Figure 6.27 The comparison
of actual rotor position and estimated rotor position can be seen in Figure 6.28.
The result is as expected to be in mathematical relation, i.e. as the number of
poles of the PMSM is 4, the actual mechanical rotor position is exactly half of
the estimated electrical rotor position. The generated electromagnetic torque and
actual mechanical speed wave forms are shown in Figure 6.29 and 6.30 respectively.
The interesting feature of this sensorless vector control is that, here the actual
value of the q and d axis stator currents are calculated with estimated electrical
rotor position as shown in Fig. 6.23. But, as the estimated rotor position has
been merged with the actual rotor position (as shown in Fig. 6.28), the sensorless
process can be stated to be successful.
74
Figure 6.19: Simulated transient waveforms of q-Axis and d-Axis currents (in Amps) of stator in rotor reference frame of the PMSM under vector control with Sine PWM Inverter in current control mode with Dc Link
Voltage, Vdc =48Volts, viscous damping friction,f=0.0016Nm-sec/Rad, Passive load torque, TL =0.56Nm
6.3.6
In the previous parts of this section, it is discussed that how the PMSM can operate
as a motor whose direct and quadrature axis stator currents in synchronously rotating reference frame can be controlled independently. In short, by these methods
PMSM can operate as current fed machine, where the magnitude and phase angle
of the current can be independently controlled. In this part it will be discussed
that how the speed can be controlled in such a machine with true vector control in
operation. Actually, in such a method, the quadrature axis stator current reference
is generated from the output of the speed Proportional Integral controller. The
input of this sped PI controller will be the difference of mechanical speed reference
and actual mechanical speed reference. The block diagram of the scheme is given
in Fig. 6.31. Now, during the design process of the speed proportional-integral
controller, it is assumed that current loop is very fast with respect to speed loop
and as soon as one current reference is generated, immediately after that the actual stator currents follow that reference value. So, in the process of vector control
the mechanical loop of the PMSM can be approximated as shown in figure 6.32.
So the open loop transfer function of the system shown in Figure 6.32 is shown in
75
sKp + Ki 3 P
1
. . .0 .
(6.15)
s
2 2
Js
Where, Kp and Ki are the parameters of the speed proportional integral controller. Equation 6.15 can be further modified to equation 6.16.
GOL (s) =
GOL (s) =
1 + s
Ka
s2
(6.16)
Where, = Kp
and Ka = 32 . P2 .0 . KJi
i
So, the close loop transfer function of the system shown in figure 6.32 is given in
equation 6.17.
(1 + s )Ka
GCL (s) = 2
(6.17)
s + sKa + Ka
76
Ka
Ka 1
Ka
Ka 2 1
= 1 .
By using this approximation, the close loop transfer function can be further modified to the equation shown in Fig. 6.19.
GCL (s) =
(s + 1 )Ka
(s + Ka 1 )(s + 1 )
(6.19)
Now, pole-zero cancelation is possible. The only pole of denominator can be set
in such a way that the time-constant produces a close loop Bandwidth of 100Hz
77
(6.20)
By solving equations 6.20, the parameters of the speed controller can be found
out.
For the PMSM under test if the electrical and mechanical parameters are placed
properly, the parameters of the speed PI will come out to be Kpw = 5.43 and
Kiw = 3.44. Now the system shown in figure 6.31 is simulated with a step change
in mechanical speed reference 200rad/sec at t = 0Sec and the passive load torque
is changed from 0.56N m to 3N m at t = 0.5Sec. The mechanical speed and
electromagnetic torque are shown in figure 6.33. The transient and steady state
waveforms of the phase voltages are shown in figure 6.34 and 6.35 respectively. If
Figure 6.34 is viewed closely, it can be seen that in the starting parts (near about
78
Figure 6.23: Block diagram of current control method of POSITION SENSORLESS VECTOR CONTROL by SPWM INVERTER
t ' 0.1Sec) of the phase voltage waveform, there is no trace of modulation and
the shape has become like simple 1800 conduction inverter output phase voltage.
This is due to the fact that, at those time durations (near about t ' 0.1Sec)
the control signals of the SPWM was such that it was operating in the strong
overmodulation range of the Sine PWM inverter. Hence operation in those instants were highly non-linear due to over modulation and the limiter present in
the speed PI controller. The same non-linear phenomenas are also reflected in the
mechanical speed and generated EM torque waveforms in figure 6.33. Now, the
phase current and corresponding phase-back emf waveforms are shown in figure
6.36. The fact that is reflected from the figure 6.36 is that, the phase current and
corresponding phase back emf are in same phase. This ensures true vector control
operation of the PMSM.
79
80
Figure 6.25: Simulated transient waveforms (Zooming the transient) of qaxis actual and estimated currents (in Amps) of stator in rotor reference
frame of the PMSM under position sensorless operation of vector control
with Sine PWM Inverter in current control mode with Dc Link Voltage,
Vdc =48Volts, viscous damping friction,f=0.0016Nm-sec/Rad, Passive load
torque, TL =0.56Nm
81
82
83
Figure 6.28: Simulated steady state waveforms of actual mechanical rotor position (thm in Rad) and estimated electrical rotor position(the in
Rad) of the PMSM under position sensorless operation of vector control
with Sine PWM Inverter in current control mode with Dc Link Voltage,
Vdc =48Volts, viscous damping friction,f=0.0016Nm-sec/Rad, Passive load
torque, TL =0.56Nm
84
85
86
87
88
89
90
Figure 6.36: Simulated steady state waveforms of phase-A current (in Amps)
and phase-A back emf (in Volts) of the PMSM under vector control with Sine
PWM inverter in speed control mode with Dc Link Voltage, Vdc =48Volts,
viscous damping friction,f=0.0016Nm-sec/Rad, passive load torque, TL =
3N m
91
Chapter 7
Advanced aspects related to
real time simulation and
implementation of aspects of
PMSM drive on FPGA
platform
7.1
Introduction
In one of the previous chapters, FPGA is already introduced to run the PMSM
drive under self-controlled 1200 conduction mode. But, in that chapter only some
simple logics (say NOT, OR, AND etc.) are implemented to found out the switching signals of the IGBTs of the Inverter from the hall position sensors outputs.
But, the real power of the FPGA can be realized in the processes where, online
solving of differential equations, online calculations of complex functions (say realization of trigonometric functions) etc. are done. To tackle this high computation
burden high memory support as well as high digital word support are essential.
FPGA gives a perfect environment for this. In this sections these aspects of FPGA
will be discussed. The FPGA used in this project is an ALTERA Cyclone chip,
named EP 1C12Q240C8 with version 0 interfacing board.
92
7.2
7.2.1
In the current section the real-time simulation of the RLC circuit is done. The
differential equations are perunitized so that normalized state-variables are solved
through the programming in FPGA. In the last part of the section, the POSITION
OBSERVER is realized in FPGA to run the PMSM under self-controlled 1200
conduction mode.
7.2.2
Implementation method
The differential equations of a series RLC circuit are as shown in equations 7.1
and 7.2.
Vg = Ri + Lpi + vc
(7.1)
i = Cpvc
(7.2)
Where, Vg , R, L, C, i and vc are the applied voltage, series resistance, series inductance, series capacitance, the circuit current and capacitor voltages respectively.
Equations 7.1 and 7.2 are a pair of first-order linear differential equations that
can be solved using any of the numerical solution method. The equations are first
normalized with the help of arbitrary values Vb , Rb , where Ib = Vb /Rb .
R i
L i
vc
Vg
=
+
p +
Vb
Rb Ib Rb Ib Vb
(7.3)
i
vc
= CRb p
Ib
Vb
(7.4)
LR pi
CR pvc
R 1
1
0
i
vc
R
Rb
= R ,
1
0
vc
Vb
= vc ,
L
Rb
= LR ,
Vg
(7.5)
Say, the parameters of the circuit are: Vg = 100V , R = 10, L = 20mH, C = 4uF
So, the base values of the quantities are shown below:
Voltage(Vb )
100V
Current(Ib )
10A
Rb
100/10 = 10
LR
2e3
CR
40e6
Step time(dT )
25.6us
93
The p.u. (per unit) values chosen are shown below and the negative value are
taken as the ones complement of its corresponding positive value.
pu value Equivalent digital Value Equivalent decimal value
2pu
7F F Fh
32767d
1pu
3F F Fh
16383d
0pu
000h
0d
-1pu
C000h
49152d
-2pu
8000h
32768d
Figure 7.1: FPGA Design file for real time simulation of RLC circuit using
Eulers Integration method
Results
Different variables of the R-L circuit are shown in Fig. 7.3 and different variables
of the R-L-C circuit are shown in Fig. 7.4. The results of the variables are fed to
94
Figure 7.2: FPGA Design file for real time simulation of RL circuit Eulers
Integration method
DAC and seen in the oscilloscope as shown in Fig.7.4 and 7.3:
7.2.3
Implementation Method
If the equations 5.6 are rearranged it can be obtained:
d
cr + Vdc + 2.7ilink
0.0006pid
link = 2.7ilink 0.1
d
cr = ilink 0.0004
cr ilink
0.00003p
cr
pbr =
(7.6)
d
cr + Vdc + cilink
mpid
link = ailink b
d
cr = ilink d
cr ilink
np
b
cr
ypr =
95
(7.7)
Figure 7.3: Transient waveforms of per unit circuit current and per unit input
applied voltage for a R-L circuit of R = 10, L = 20mH for a step voltage
of, Vg = 100V = 1pu applied at t=0sec
Where, a, b, c, d, m, n and y are the parameters of the differential equations which
are to be per-unitized in order to implement in FPGA.
Different base values that chosen are shown below:
96
Figure 7.4: Transient waveforms of per unit capacitor voltage and per unit
input applied voltage for a R-L-C circuit of R = 10, L = 20mH,C = 4uF
for a step voltage of, Vg = 100V = 1pu applied at t=0sec
cr b
d
i
415Rad/s
Vdcb
20Amps
48V olts
c
rb
link b
Vdcb
ab
id
link b
=2.4
bb
Vdcb
=0.1
br
cb
ab =2.4
1 =
m
ab
0.0002sec
2 =
n
db
0.0006sec
3 = by
rb
0.015sec
r
b
dt
25.6us
The pu values chosen are shown below and the negative value are taken as the
ones complement of its corresponding positive value.
97
d
d c
+ 1.1i
0.0002pilink
= 1.1ilink
r + Vdc
link
(7.8)
c
c
0.0006p = ilink 0.008 i
c
0.015pcr =
r
link
Figure 7.5: FPGA design file showing clock and ADC outputs for observer
implementation for observer based sensorless operation
7.3
7.3.1
It is easily understood from the simulation results of the Vector Control process
that to implement this, continuous monitoring of the electrical rotor position is required. But, previously all the experiments are done with the help of three position
98
Figure 7.6: FPGA design file showing Eulers method to solve variables to
be estimated for observer based sensorless operation
hall sensors. With the help of three hall sensors, continuous monitoring of electrical
rotor position with good resolution is not possible. So, one incrementalencoder
giving 2500puls/mechanicalrevolution is installed with the shaft of PMSM drive.
This encoder gives very high resolution in the measurement of electrical rotor position. In the subsequent section experimental waveforms of different experiments
are presented. Those experiments are dedicated to the development of different
modules, that are required in Vector Control, in EP1C12Q240C8, CYCLONE,
FPGA environment. In the first section to get the feel of the encoder, some known
programs are rewritten and it is assumed that hall sensors are not there and the
same program is executed with single encoder signal.
99
Figure 7.7: FPGA design file showing equation to estimate the DC link
current for observer based sensorless operation
Figure 7.8: FPGA design file showing equation to estimate the electrical
speed for observer based sensorless operation
7.3.2
Finding the performance of the encoder in running the PMSM in 1200 conduction algorithm under self control
100
Figure 7.9: FPGA design file showing equation to estimate the electrical
rotor position for observer based sensorless operation
Figure 7.10: FPGA design file showing equation method to generate switching signals for observer based sensorless operation
relations of these hall sensor outputs with respective phase induced emfs are shown
in Figure 3.3. Two sets of switching signals arrays are generated. Those two sets
of arrays are mutually ORed to get the actual switching signals as shown in Figure
7.12. First array of switching signals (i.e. T[6..1]) are generated from the 1200 algorithm with the three hall sensor outputs. Second array of switching signals (i.e.
T/[6..1])are generated from the 1200 algorithm with the encoder output. When
one array will be giving the switching signals other array will be giving zero depending on which mode is selected.
Figure 7.13 is showing the traditional FPGA program to run the PMSM in self
controlled 1200 conduction algorithm. The same program is discussed in Chapter
3. The only difference that is undertaken in the program of the current chapter is
that, here, hall sensor outputs are directly inputted into FPGA and the glitches
of the hall sensor outputs are taken care of in the FPGA itself by passing those
three signals through a D F lipF lop unlike the program of chapter 3, where these
glitches are eliminated by an external 555 timer based SMITH TRIGGER circuit.
Now, all the inputs are given to FPGA except the changeover-signal as shown
101
Figure 7.11: FPGA design files showing the digital inputs and outputs for
the program to evaluate the performance of the encoder
in Figure 7.11, which is made floating. So, change signal, as shown in Figure
7.14, will be low. Hence D-FilpFlop bldc-dff3 will be disabled and subsequently
over will be low and notover will be high as shown in Figure 7.14. So, switching
signals coming from the hall sensor program will be active and this will start and
run the PMSM.
After PMSM is started, changeover-signal is given low externally. Now, if the
logic in Figure 7.14 is followed, it can be said that change goes high, then both
the blocks bldc-counter1 and bldc-dff3 become active. Now, comparator bldccompare0 gives a low to high transition when sen[2..0]=101Binary=5Decimal.
This condition occurs when hall sensor output take the shape that h1 = 1, h2 =
0, h3 = 1. This condition will take place when electrical rotor position of the
PMSM will be satisfying the condition, 00 r < 600 . Now, bldc-counter1 will
start counting. When its count value will be 2, output of lpm-compare2 will take
low to high transition. bldc-dff3 will be clocked for the first time and the output
of this instrument will be high for the first time and hold this condition for the
rest of the time of the program execution. The state of this instrument will be
sustained due to the reason that after this instant the clock of the D-F/F will
vanish and the clock will again come after one mechanical revolution, but then
input of the bldc-dff3 is held at VCC i.e high state. Hence, signal over will
be high and notover will be low. Thus program with hall sensor, as shown in
Figure 7.13, will be disabled and with the the advent of r = 00 , program with
the encoder, as shown in Figure 7.15 will be enabled. The reason for leaving the
first sen[2..0]=5D edge is that, it may so happen that when changeover-signal
is given, PMSM may be somewhere in the middle of 00 r < 600 interval, so
program with encoder signal can not be initialized with r = 00 if changeover takes
place at the first edge.
102
Figure 7.12: FPGA design files showing two sets of switching signals which
are multiplexed to switch the IGBTs of the two level inverter
Program with encoder signal, as shown in Figure 7.15, is utilizing the concept of
lookup table. Actually, the incremental encoder is giving 1250pules /electrical revolution. This fact is utilized to make one counter, bldc-counter4,which is counting
the electrical rotor position from 0 to 1249 pulses. This counting corresponds to
counting of electrical rotor position 00 to3600 . These 1250 pulses are divided in
six sections, each section corresponds to one 600 durable switching interval. So,
the counter bldc-counter4 is counting up and making the electrical rotor position
starting from zero. This digital electrical rotor position information if fed to a
ROM, bldc-rom0. The ROM is so formed that, six bit output of the ROM will
give six switching signals for different 600 intervals. The MATLAB program to
make the entries inside the ROM is given in the appendix. The LOOK-UP-TABLE
, that is burnt in the ROM is given below.
7.3.3
Experimental results
The programme is executed in both the modes under identical operating conditions
and the results can be seen from the waveforms. The variable theta, that is the
electrical rotor position information (as seen from Figure 7.15) are fed to a Digital
To Analog converter and six switching signals individually are plotted with this
electrical rotor position value. The switching signals can be seen from Figure 7.16.
103
POSITION(in DEGREE)
0-60
60-120
120-180
180-240
240-300
300-360
S1
1
0
0
0
0
1
S2 S3
1
0
1
1
0
1
0
0
0
0
0
0
S4 S5
0
0
0
0
1
0
1
1
0
1
0
0
S6 O/P(in DEC)
0
48
0
24
0
12
0
6
1
3
1
33
Table 7.1: The lookup table to run the PMSM under self controlled 1200
algorithm with encoder signal
The PMSM is started under self controlled 1200 algorithm with hall sensors
and then subsequently switched to self controlled 1200 algorithm with encoder.
Both the stages are noticed under similar operating conditions. The waveforms
are shown in Figure 7.17 and 7.18.
104
Figure 7.14: FPGA design files showing the changeover process from hall
sensor to encoder mode.
Now, the effect of encoder can be strongly viewed from Figure 7.18. From
Figure 7.17, it can be seen that, in both phase current and phase voltage waveforms, the two consecutive 600 conduction intervals of IGBT 5 (in Figure 4.14, it
is refereed as T5) are not symmetrical due to asymmetrical placing of hall sensors
as explained in chapter 3. But, from Figure 7.18, it can be concluded that those
asymmetry has been eliminated almost with the help of encoder. This is due the
the reason that, in encoder operation, the very high resolution of the encoder pulse
makes it possible to maintain the exact switching pattern in all six 600 electrical
switching intervals easily. This symmetry is expected as can be seen from the
simulated results shown in Figures 3.18, 3.19 etc.
7.3.4
Introduction
The full logic requirement of a total Speed Controlled Vector Controlled PMSM
drive can be seen from Figure 6.31. This process incorporates Sine PWM Inverter
for the true Field Orientation of the PMSM drive. If one short description of
the total process is taken, the total logic flow can be easily understood. The
true Vector control is ensured by the fundamental sine voltages impressed on the
machine phases. The magnitude and phases of the phase voltages are dependent on
the sinusoidal control signals of the SINE PWM process. These sinusoidal control
105
Deriving electrical rotor position from encoder output to get synchronized sine-waves as the control signals of the SINE PWM
It is explained that to run the PMSM in SPWM algorithm, the sine voltages that
are falling in each phase of the PMSM, have to be in synchronism with the electrical
rotor position. To sustain this condition, the control signals that will be used for
the SPWM control signals. Now, as explained, the encoder used is actually an
incremental encoder giving 2500 pules /mechanical revolution. So, electrically, it
will give 1250 pulses/electrical revolution for the lab-prototype 4pole PMSM. So,
106
Figure 7.16: Switching signals are plotted individually with respect to the
electrical rotor position when the PMSM was running under self controlled
1200 conduction algorithm with encoder.
total electrical 3600 will be divided into 1250 division and each division will be
of discreet 0.30 . So, the electrical rotor position that will be calculated will have
the resolution of 0.30 . The incremental encoder will give a TTL logic pulse-train.
Figure 7.19 is showing the inputs and outputs of the control block. The details
of this Control Block is given in the subsequent sections This pulse-train will be
taken inside FPGA with the help of digital i/o pin. This pulse-train will be used
as the clock of a MODULO UP COUNTER as shown in Figure 7.20. One very
interesting thing is that, this block shown in Figure 7.20 will derive the electrical
rotor position from electrical zero position (r = 00 ) and there after the theta will
be synchronized with actual electrical rotor position irrespective of the speed. It
will start calculating rotor position online from the instant when the rotor q axis
gets aligned with the a-phase axis (i.e.r = 00 ). Thereafter, add[10..0] variable
will be a measure of actual rotor position, i.e. thetar . Thus the add[10..0] variable
of Fig. 7.20 gets synchronized in space in real time. So, before starting the PMSM
with this SPWM algorithm machine has to be started with self-controlled 1200
conduction algorithm (with hall sensors) and subsequently switched to SPWM
algorithm at one r = 00 position and subsequently, encoder output will only be
used to find synchronized electrical rotor position. The change-over logic that is
to be used is similar to as shown and explained in Figure 7.14.
107
Figure 7.17: Experimental steady state waveform of phase current (in Amps)
and respective phase voltage(in Volts) for the PMSM running under self
controlled 1200 conduction mode with hall sensors in action at DC Link
Voltage, Vdc = 17V olts, viscous damping co-efficient, f = 0.0016N sec/Rad
and passive load torque, TL = 0.56N m
Generation trigonometric functions for PARKS transformation
The electrical rotor position information is used to generate different trigonometric
2
2
2
functions like cosr , cos(r 2
3 ), cos(r + 3 ), sinr , sin(r 3 ), sin(r + 3 ).
These trigonometric functions will generate these instantaneous outputs with the
input of r from modulo up counter, sync-upcounter0. The function generation
is shown in Figure 7.21.
108
Figure 7.18: Experimental steady state waveform of phase current (in Amps)
and respective phase voltage(in Volts) for the PMSM running under self
controlled 1200 conduction mode with encoder in action at DC Link Voltage,
Vdc = 17V olts, viscous damping co-efficient, f = 0.0016N sec/Rad and
passive load torque, TL = 0.56N m
It can be noted that these trigonometric functions are realized with six ROM
tables. The six roms that are shown in Figure 7.21 are changing the output values
of the function depending on the input, theta[10..0]. The values are changed in
each low-to-high going edge of the encoder-pulse-train. Other than that outputs
are latched. The functions that are used can be viewed in the order shown in
Table 7.2. These trigonometric functions would be utilized to form three phase
synchronized sine control signals from their two phase values instantaneously using
PARKS transformation as will be explained next.
FUNCTION
cosr
)
cos(r 2
3
2
cos(r + 3 )
sinr
sin(r 2
)
3
sin(r + 2
)
3
109
Figure 7.19: FPGA design file showing the input and output of the control
signal, generation block
Figure 7.20: FPGA design file showing the derivation of electrical rotor position add[10..0]
Development of two phase to three phase transformation block in
FPGA
It is explained previously that, the two phase stator voltages, in rotor reference
frame, vq and vd are transformed to three phase static (real) stator voltages by the
relation shown in equation 7.9.
!
cosr
sinr
va
vq
2
2
vb = cos(r 3 ) sin(r 3 )
vd
2
vc
cos(r + 2
3 ) sin(r + 3 )
(7.9)
But, to generate the desired phase voltages SINE PWM will be used. So, if the
d and q axis voltages are perunitized and the same PARKS transformation as
shown in equation 7.9 is used, the three voltages that will come out will be actually
perunitized and these three voltages can be utilized as the three control signals of
the SINE PWM. The hardware implementation of this two-phase to three-phase
110
Figure 7.21: FPGA design file showing the computation process of different
instantaneous trigonometric functions of electrical rotor position, add[10..0]
transformation block is shown in Figure 7.22 and 7.23. These three control signals
Figure 7.22: FPGA design file showing the computation process of two components of each phase control signals
will be used to generate the actual SPWM switching pulses of the INVERTER.
111
Figure 7.23: FPGA design file showing the addition of all the components
and generation of actual three phase control signals of SINE PWM
clock counter11, which is a 5KHz clock, in spwm-mux1 block to generate the
triangular wave triangular[11..0]. So, the triangular wave will be unidirectional
having a span from 0 (000 HEX) pu to 2pu (7FF HEX) and its frequency will
be 5KHz. So, the control sine waves that are generated in 32bit format (ref.
Figure 7.23) are truncated in 12bit format and they are also shifted 1pu (1023
DECIMAL=3FF HEX) to be compared with the triangular wave. The shifting of
these control sine-waves are shown in Figure 7.25. Now, these three control signals
are individually compared with this triangular wave giving rise to the switching
signals the upper IGBTs of the VSI which would feed PMSM armature( IGBT
1,3,5 as shown in Figure 4.14). The switching signals for the lower IGBTs are
generated primarily by inverting the switching signals of upper IGBTs respectively.
Subsequently, 10sec blanking time is given between the switching signals of the
IGBTs of each phase. The blanking time is given by delaying each switching signal.
These delayed switching signals are further ANDed with their mother signal and
the ultimate output switching signals are generated from the output of those AND
gates as shown in figure 7.26.
112
Figure 7.24: FPGA design file showing the generation of triangular wave for
implementing Sine-triangle PWM strategy.
7.3.5
Introduction
The incremental encoder is mounted on shaft of the permanent magnet synchronous motor. The PMSM is now rotated with the shaft connected DC machine
run as a motor. The encoder is powered up. Now, the Sine PWM program, as
described previously, is executed in the FPGA kit. DC motor is started in such a
way that the forward rotation of the PMSM is taken place. So, the FPGA SPWM
program is taking encoder digital pulse-train inside and giving six switching signals as output. Now, different blocks, as described, are generating intermediate
signals, those signals will be tested in different condition. Now, the FPGA program is generating the switching signals to develop the phase voltages depending
on the control signals and the electrical rotor position (calculated from encoder
output signal). Now, under this condition the blocks inside FPGA are tested and
the results are presented in the subsequent sections.
113
Figure 7.25: FPGA design file showing the comparison of triangular wave
with each sine control signal for SINE PWM
theoretically, va = vq cosr + vd sinr , now putting values of different constants, it
can be calculated that, va = cos(r 36.90 ). Now, if figure 7.27 is concerned, it
can be concluded that, va lags vq cosr by near about 36.90 . Figure 7.28 depicts
that, va leads vd sinr by near about 520 . Peak value of different sine waves are
also in accordance with the expectations.
Now, if electrical rotor position, add[10..0] and the phase-a sine control voltage
are given given to a DAC, the DAC outputs, as obtained are shown in figures
7.29 and 7.30. It can be concluded that online derived electrical rotor position
and the control sine waves are always synchronized irrespective of speed of the
motor. From both the figures 7.29 and 7.30, it can be summarized that, at both
the speeds, va is having its peak value at electrical rotor position, r 360 , which
is essentially the evidence of synchronous property of the control sine wave. From
figure 7.20, it can be noted that, add[10..0] can range between 0 to 1249 DECIMAL value. Now, DAC is programmed in such a way that, correspondingly 1249
DECIMAL input, which is equal to 1.23 pu (as 3FF HEX = 1pu = 5Volts), DAC
output will be 6 Volts. This can be observed in in the experimental waveform of
theta[10..0] presented in Fig. 7.29 and 7.30.
114
Figure 7.26: FPGA design file showing the blanking time between the upper
and lower switching signals of each phase of SPWM INVERTER
tional triangular waves as shown in Figures 7.24, 7.25. It can be concluded that
the switching signals are having correct phase relation with the phase-A control
signals.
Now, to test the switching signals further, one real-time inverter is real-time simulated inside FPGA and that real-time-inverter is switched with these generated
switching signals. The generated phase voltages of that real-time-inverter is shown
in the oscilloscope to check their relative phase relation and shape.
Now, if figure 3.1is noted,
vao = Vdc Sa
vbo = Vdc Sb
(7.10)
vco = Vdc Sc
where, vao is the voltage of point a with respect to -ve DC link bus. Similar
nomenclature is also applicable for other two phases. Now, Sa , Sb , Sc are switching
functions of the respective phases and also are the switching signals of T 1, T 3, T 5
respectively. So, Sa =1 when, T1 is ON and, Sa = 0 when, T4 is ON. Similar logic
is applicable for other two phases. Now,
van = vao vno
vbn = vbo vno
vcn = vco vno
van + vbn + vcn = 0
115
(7.11)
vab vac
3
vbc vba
3
vca vcb
3
(7.12)
vao +vbo +vco
3
(7.13)
Equation 7.10 is realized in FPGA as shown in figure 7.34. Equations 7.11, 7.12
and 7.13 are assembled and they are also realized in FPGA as shown in figure
7.35.
116
7.3.6
Conclusion
The test results of the algorithm of Sine PWM process suggests that, the PMSM
drive can be run with Sine PWM algorithm as described in this chapter.
117
118
119
120
121
Figure 7.34: FPGA program files to simulate the switching process of the
real-time-voltage source inverter
122
Figure 7.35: FPGA program files to simulate the generation of phase voltages
of the real-time-voltage source inverter
123
124
125
Chapter 8
Conclusions and scope of future
work
8.1
Conclusions
This thesis presents analysis, offline simulation, real-time simulation and experimental implementation of a permanent magnet synchronous motor drive operated
under self-control with different control strategies.
First, electrical parameters of a laboratory prototype PMSM are experimentally found out. The generalized three phase equations of the PMSM form the
basis of the analysis and procedure to determine the electrical parameters of the
PMSM. It is worth mentioning here that if this procedure is followed for determination of the electrical parameters, then there would be no chance of demagnetizing
of the permanent magnet material of the rotor.
Next, a detailed numerical model of the PMSM operating under self control with a voltage source inverter under 1200 conduction mode is developed. This
model is capable of predicting transient as well as steady-state behaviors of the
PMSM drive. The name suggests that, in this model, each of the twelve possible
complex switching modes of the inverter feeding the PMSM, is individually modeled with the guiding differential equations and solved numerically. The model is
quite accurate, but, physical understanding of the drive behavior is very difficult
as it is totally numerical in nature. An existing laboratory prototype PMSM is
subsequently made to run with the help of a voltage source inverter operating under 1200 conduction mode, under self-control with three hall-effect based absolute
position sensor. The control algorithm has been developed under an FPGA environment with an FPGA development board. The experimental results and the
ones as predicted by the detailed numerical model are compared.
126
127
8.2
Future work
The following activities related to the development of the PMSM drive, whose
foundation stone has been laid in this thesis, may be undertaken in future:
Real-time implementation of a vector-controlled PMSM drive incorporating
a SPWM VSI controlled through an FPGA-based controller platform.
Real-time implementation of the sensorless strategies proposed and simulated in this work on a PMSM drive through an FPGA-based controller
platform.
Estimating the torque of the PMSM specially at dynamic condition by FEM
based techniques.
128
129
Appendix A
A.1
130
Appendix B
Dynamic equations of the two
operating modes of the PMSM
under 1200 conduction mode
B.1
The phase voltages of a PMSM are denoted by, van , vbn and vcn . The corresponding
phase currents are denoted by, ia , ib and ic . Now, referring to Fig. 1.3, the basic
phase equations of the cylindrical rotor PMSM (LB =0) can be written as [6]:
van
vbn =
vcn
rs + (Lls + LA )p
12 LA p
21 LA p
12 LA p
rs + (Lls + LA )p
12 LA p
21 LA p
12 LA p
0 cosr
0 cos(r 2
3 )
rs + (Lls + LA )p 0 cos(r + 2
3 )
(B.1)
Significance of the parameters and the constants are discussed in the previous
chapters.
Now, the electromagnetic torque equation of the cylindrical rotor PMSM can be
written as[6]:
P
3
1
1
Te = 0 [(ia ib ic )cosr +
(ib ic )sinr ]
(B.2)
2
2
2
2
131
ia
ib
ic
r
B.2
Figure 3.17 shows two loop currents when two IGBTs T1, T2 and one freewheeling
diode D3 conduct. Application of Kirchoffs voltage law in these two loops yields:
)]
Vdc rs (im +icom )0 r [cosr cos(r + 2
3
= C1
Lls + 32 LA
2
r (2i +i
) [cos cos(r 3 )]
picom = s m com L 0+r3 L r
= C2
ls 2 A
pim + 2picom =
2pim +
C1 2
C2 1
1
2
1
2
!
!
2
1
!
C1
C2
1 2
2 1
(B.3)
(B.4)
(B.5)
P
2f
[Te TL
r ]
2J
P
pr = f41 (r ) = r
B.3
(B.6)
(B.7)
Figure 3.17 shows one loop current when two IGBTs T1, T2 conduct. Application
of Kirchoffs voltage law in this loop yields:
pim = f51 (im , r , r ) =
2
3 )]
(B.8)
Electromagnetic torque:
Te =
P
2 0 [ia cosr
+ ib cos(r 2
+ 2
3 ) + ic cos(
3 )
r
3
P
3
= 2 0 [ 2 im cosr + 2 im sinr ]
pr = f61 (im , r , r ) =
P
2f
[Te TL
r ]
2J
P
132
(B.9)
(B.10)
Appendix C
C.1
clear
clc
i=0;
k=1;
while i < 1250
if (i 0)and(i < 208)
a(k+i)=48;
end
if (i 208)and(i < 416)
a(k+i)=24;
end
if (i 416)and(i < 624)
a(k+i)=12;
end
if (i 624)and(i < 832)
a(k+i)=6;
end
if (i 832)and(i < 1040)
a(k+i)=3;
end
if (i 1040)and(i < 1250)
a(k+i)=33;
end
i=i+1;
end
c=abs(bin2dec(dec2bin(a,6)))
133
134
Bibliography
[1] D.P.M. Cahill and B. Adkins, The permanent magnet synchronous motor,
proc. Inst. Elec. Eng., Vol. 109, part A, no. 48, pp: 483 - 491, Dec 1962.
[2] N. Mohan, T. M. Undeland, W. P. Robbins, Power Electronics Converters,
Applications and Design, Second Edition, John Wiley and Sons, 1996
[3] M.A. Rahman, Modern Electric Motors in Electronic world, IEEE IECON
93 Conf. Rec,1993, pp. 644 -648.,
[4] R. Krishnan, Selection criteria for servo motor drives, IEEE Transactions
on Industry Application, Vol . IA-23, No .2, March/April 1987, pp 270 -275.
[5] Vas. P., Vector Control of AC Machines, Clarenden Press. Oxford, 1990.
[6] P. C. Krause, Analysis of Electric Machinery, McGraw Hill, New York,
1996.
[7] H.Le -Hey, A.Jakubowicz and R. Rerret, A self - controlled synchronous motor drive using terminal voltage system, IEEE Tran. Of Industry Application,
Vol. 8(1), pp. 44-55, Jan-Feb 1982
[8] Sun Pengwei, Shi Xinchun, Wang Aimeng, Yi Wang, DSP and CPLD based
field oriented control of PMSM using application specific IPM, Proceedings
of the Eighth International Conference on Electrical Machines and Systems,
2005. ICEMS 2005, Vol.1, pp:355 - 357 , 355 - 357
[9] S. Nanda,Design and Fabrication of a 48Volts DC, 1Kw, 2000rpm brushless
DC motor, ME Thesis, Dept. of Electrical Engineering, Bengal Engineering
and Science University, Shibpur, July 2006.
[10] E. Eitelberg and R.G. Harley, Estimating synchronous machine electrical parameters from frequency response tests, IEEE Trans. On Energy Conversion,
2(1), 198, pp. 132-138.
[11] B. Stumbertger, B. kreca and B. Hribernik, Determination of parameters
of Synchronous motor with permanent magnets from measurement of load
conditions, IEEE Int. Elect. Mach. Drives Conf., May 1997, pp. WB21.1WB21.3.
135
136