32
THE DISSERTATION ENTITLED “Implementation of Sensor less Vector control of PMSM” SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE AWARD OF THE DEGREE OF BACHELOR OF TECHNOLOGY IN ELECTRICAL ENGINEERING SUBMITTED BY JAY M. PATEL (U09EE507) ABHISHEK D. GOLWALA (U09EE514) UDAY M. PANWALA (U09EE515) ROHIT KUMAR (U09EE520) NEELESH KUMAR GUPTA (U09EE541) SUPERVISOR: PROF. JANAK J. PATEL Department of Electrical Engineering SARDAR VALLABHBHAI NATIONAL INSTITUTE OF TECHNOLOGY, SURAT-395007, GUJARAT, INDIA 2012-2013

Implementation of Sensor less Vector control of PMSM

Embed Size (px)

DESCRIPTION

Compared to other motors, Permanent Magnet Synchronous Motor (PMSM) has higherefficiency. To maintain that efficiency, the control has to be efficient. In this work, study iscarried out on scalar and vector control of PMSM. Further, Sensor less vector control theoryusing Extended Kalman Filter (EKF) is discussed.An attempt is made to run the PMSM in open loop scalar control and in vector control bygenerating the sinusoidal supply from the inverter which can be generated by giving SpaceVector Pulse Width Modulation (SVPWM) pulses. These SVPWM pulses are generated withthe help of STM32F4 which has Cortex-M4 core.The speed and torque of the motor can be varied by varying frequency and amplitude of thesinusoidal supply using SVPWM. The performance of scalar and vector control is comparedin the study.

Citation preview

  • THE DISSERTATION ENTITLED

    Implementation of Sensor less Vector control of

    PMSM

    SUBMITTED IN

    PARTIAL FULFILMENT OF THE REQUIREMENTS

    FOR THE AWARD OF THE DEGREE OF

    BACHELOR OF TECHNOLOGY

    IN

    ELECTRICAL ENGINEERING

    SUBMITTED BY

    JAY M. PATEL (U09EE507)

    ABHISHEK D. GOLWALA (U09EE514)

    UDAY M. PANWALA (U09EE515)

    ROHIT KUMAR (U09EE520)

    NEELESH KUMAR GUPTA (U09EE541)

    SUPERVISOR:

    PROF. JANAK J. PATEL

    Department of Electrical Engineering

    SARDAR VALLABHBHAI NATIONAL INSTITUTE OF

    TECHNOLOGY, SURAT-395007, GUJARAT, INDIA

    2012-2013

  • Department of Electrical Engineering,

    Sardar Vallabhbhai National Institute of

    Technology,

    Surat-395007, INDIA.

    CERTIFICATE

    This is to certify that the dissertation report entitled IMPLEMTATION

    OF SENSORLESS VECTOR CONTROL OF PMSM has been carried out by

    Mr. Jay M. Patel (U09EE507), Mr. Abhishek D. Golwala (U09EE514), Mr.

    Uday M. Panwala (U09EE515), Mr. Rohit Kumar (U09EE520) and Mr.

    Neelesh Kumar Gupta (U09EE541), students of B.Tech Electrical Engineering

    under our supervision. They completed this work within a period prescribed

    under the ordinances governing the leading to Bachelor Degree in Electrical

    Engineering in Sardar Vallabhbhai National Institute of Technology, Surat.

    DATE:

    PLACE: Surat

    (PROF. JANAK J. PATEL) (PROF. M.N.BHUSAVALWALA)

    GUIDE Head of Department

  • DECLARATION

    We hereby declare that the dissertation report entitled IMPLEMENTATION

    OF SENSORLESS VECTOR CONTROL OF PMSM is being submitted in

    partial fulfillment for the award of the degree in BACHELOR OF

    TECHNOLOGY IN ELECTRICAL ENGINEERING to Sardar Vallabhbhai

    National Institute of Technology, Surat is an authentic record of our own work

    done under the guidance of PROF. JANAK J. PATEL in Electrical Engineering

    Department. The matter reported in this dissertation has not been submitted at

    any other place for award of any degree or diploma.

    DATE:

    PLACE: Surat

  • Approval Sheet

    Project entitled IMPLEMENTATION OF SENSORLESS VECTOR

    CONTROL OF PMSM by Mr. Jay M. Patel (U09EE507), Mr. Abhishek D.

    Golwala (U09EE514), Mr. Uday M. Panwala (U09EE515), Mr. Rohit Kumar

    (U09EE520) and Mr. Neelesh Kumar Gupta (U09EE541) is approved.

    Examiners

    Supervisor

    Examiner : 1

    Examiner : 2

    Examiner : 3

    Date :

    Place : Surat

  • ACKNOWLEDGMENT

    We must acknowledge the strength, energy and patience that almighty GOD bestowed upon

    us to start & accomplish this work with the support of all concerned, a few of them we are

    trying to name hereunder.

    It has been great privilege for us to work under esteemed personality respected Janak J.

    Patel, experienced and qualified professor in Electrical Engg. Department, SVNIT, Surat. It

    is our achievement to be guided under him. He is a constant source of encouragement and

    momentum that any intricacy becomes simple. We gained lot of invaluable guidance and

    prompt suggestions from him during dissertation preliminary work. We will be indebted of

    him forever and we take pride to work under him.

    I express deep sense of regards to all those who directly or indirectly helped me during this

    dissertation preliminary work.

    hpHighlight

    hpSticky Notewe express...

  • i

    ABSTRACT

    Compared to other motors, Permanent Magnet Synchronous Motor (PMSM) has higher

    efficiency. To maintain that efficiency, the control has to be efficient. In this work, study is

    carried out on scalar and vector control of PMSM. Further, Sensor less vector control theory

    using Extended Kalman Filter (EKF) is discussed.

    An attempt is made to run the PMSM in open loop scalar control and in vector control by

    generating the sinusoidal supply from the inverter which can be generated by giving Space

    Vector Pulse Width Modulation (SVPWM) pulses. These SVPWM pulses are generated with

    the help of STM32F4 which has Cortex-M4 core.

    The speed and torque of the motor can be varied by varying frequency and amplitude of the

    sinusoidal supply using SVPWM. The performance of scalar and vector control is compared

    in the study.

  • ii

    TABLE OF CONTENT

    ABSTRACT ............................................................................................................................................. i

    TABLE OF CONTENT .......................................................................................................................... ii

    LIST OF SYMBOLS ............................................................................................................................. iii

    LIST OF FIGURES ................................................................................................................................ ii

    LIST OF TABLES .................................................................................................................................. ii

    1. INTRODUCTION .............................................................................................................................. 1

    2. SCALAR CONTROL OF PMSM ...................................................................................................... 3

    2.1 SCALAR CONTROL OF PMSM ................................................................................................ 3

    3. SPACE VECTOR MODULATION TECHNIQUE .......................................................................... 5

    3.1 TIME CALCULATION TO GENERATE VS ......................................................................... 6

    4. VECTOR CONTROL OF PMSM ...................................................................................................... 9

    4.1 DYNAMIC MODEL OF PMSM ............................................................................................... 10

    4.2 EXTENDED KALMAN FILTER .............................................................................................. 11

    4.2.1 DISCRETE-TIME PREDICT AND UPDATE EQUATIONS ............................................ 11

    4.3 SENSOR LESS DRIVE- BLOCK DIAGRAM AND ALGORITHM ....................................... 13

    5. INTRODUCTION TO STM32F4 ..................................................................................................... 15

    6. IMPLEMENTATION STEPS AND DIAGNOSTICS ..................................................................... 16

    6.1 SVM CODE TO RUN PMSM ................................................................................................... 16

    6.2 IMPLEMENTING OPEN LOOP SCALAR CONTROL .......................................................... 17

    6.3 IMPLEMENTING SENSORLESS VECTOR CONTROL ....................................................... 17

    6.4 APPLYING BAND PASS FILTER ........................................................................................... 20

    7. CONCLUSION ................................................................................................................................. 22

    8. REFERENCES ................................................................................................................................. 23

  • iii

    LIST OF SYMBOLS

    Mechanical synchronous angular

    speed

    Frequency of the currents

    Number of poles

    Emf induced in stator winding

    Stator turns

    Winding factor

    Flux in motor

    Applied voltage per phase

    Generated torque

    Flux linkage

    Resultant space vector for SVM

    DC link voltage

    SVM Pulses duration

    Time for state V1

    Time for state V2

    Time for state V0/7

    Modulation index

    Stator per-phase resistance

    Stator per-phase inductance

    Permanent magnetic flux linkage

    Rotor position angle

    Rotor speed

    Current in phase a

    Current in phase b

    Current in phase c

    , Rotating two phase current

    , Stationary two phase currents

    Voltage matrix

    State variable matrix

    Covariance matrix

    Control matrix

    System noise covariance matrix

    Kalman gain

    Measurement noise covariance

    matrix

    Output matrix

    Systems state matrix

    Partial derivative system matrix

    Sampling time

  • ii

    LIST OF FIGURES

    Figure 3.1: Phase voltages and resultant vector ( ) -----------------------------------------------------------5

    Figure 3.2: Space Vector Hexagon -------------------------------------------------------------------------------6

    Figure 3.3: Vector in sector 1 ----------------------------------------------------------------------------------6

    Figure 3.4: Switching waveforms for sector 1 ------------------------------------------------------------------8

    Figure 4.1: Vector representation of coordinate ----------------------------------------------------------------9

    Figure 4.2: Block diagram of Sensor less Vector control of PMSM ---------------------------------------13

    Figure 4.3: Flowchart of the control algorithm to be implemented on STM32F4 ------------------------14

    Figure 6.1: Currents and (for 25Hz) ---------------------------------------------------------------------16

    Figure 6.2: Current and (for 50Hz) -----------------------------------------------------------------------17

    Figure 6.3: Estimated rotor position by EKF ------------------------------------------------------------------18

    Figure 6.4: ADC currents and ----------------------------------------------------------------------------18

    Figure 6.5: Currents and ----------------------------------------------------------------------------------19

    Figure 6.6: Currents and ----------------------------------------------------------------------------------19

    Figure 6.7: Currents and ----------------------------------------------------------------------------------19

    Figure 6.8: Tracking profiles of and --------------------------------------------------------------------20

    Figure 6.9: Input and output currents for band pass filter ---------------------------------------------------21

    Figure 6.10: Currents and using band pass filter -------------------------------------------------------21

    Figure 6.11: Currents and using band pass filter ----------------------------------------------------21

    LIST OF TABLES

    Table 3.1: SVM switching states ---------------------------------------------------------------------------------5

    Table 5.1: Reading for open loop scalar control -------------------------------------------------------------17

    Table 6.2: Reading for vector controlled drive----------------------------------------------------------------20

    Table 6.3: Reading for vector controlled drive with band pass filter---------------------------------------20

  • 1

    1. INTRODUCTION

    A Permanent Magnet Synchronous Motor (PMSM) consists of a magnetic rotor and wound

    stator construction. Its wound stators can rapidly dissipate heat to the motor housing and

    environment. In contrast, a brush motor traps the heat under a non-conductive air gap,

    resulting in greater efficiency and power density for the PMSM design providing high torque-

    to-inertia ratios.

    A PMSM generates magnetic flux using permanent magnets in the rotors, which are driven

    by the stators synchronous rotational field. On the other hand, the flux that is applied by the

    stator (the armature-reaction flux) generates torque most effectively when it is perpendicular

    to the flux generated by the rotors.

    A PMSM abandons the excitation winding and the rotor turns at the same speed as the stator

    field. The PMSMs design eliminates the rotor copper losses, giving very high peak

    efficiency compared with a traditional induction motor. The power-to-weight ratio of a

    PMSM is also higher than induction machines. Advancements in power electronics and

    microelectronics have enabled the application of PMSMs for high-performance drives,

    where, traditionally, only DC motors were applied. Thanks to sophisticated control methods,

    a PMSM offers same control capabilities as high performance four quadrant DC drives. A

    PMSM is an excellent alternative in an appliance application like refrigerators, air

    conditioners etc.

    The scarcity of primary energy resources and the ecological pollution crisis have made

    energy saving practices unavoidable. Since most generated electricity is consumed by electric

    motors, their loss minimization has attracted much attention recently. Although interior

    permanent magnet (IPM) motors are inherently efficient, their optimum efficiency is highly

    reliant on their control strategy.

    Historically, several general controllers have been developed:

    Scalar controllers: Despite the fact that Voltage-Frequency (V/f) is simplest

    controller, it is the most widespread, and is utilized in majority of the industrial

    applications. It is known as a scalar control and acts by imposing a constant relation

    between voltage and frequency. The structure is simple and it is normally used

    without speed feedback. However, this controller does not achieve a good accuracy

    in both speed and torque responses, mainly due to the fact that the stator flux and

    torque are not directly controlled.

  • 2

    Vector Controllers: In these types of controller, there are control loops for

    controlling both the torque and the flux. The most widespread controllers of this type

    are the ones that use vector transform such as either Park or Ku. The main

    disadvantages are the huge computational capability required and the compulsorily

    good identification of the motor parameters.

    In chapter 2, we discuss scalar control theory. Chapter 3 discusses the theory and

    implementation of SVPWM. We discuss sensor less vector control technique and extended

    Kalman filter, a state variable estimator in chapter 4. Chapter 5 gives an introduction to

    STM32F4; a Cortex-M4 architecture controller used to implement the project. Chapter 6

    discusses the steps undertaken to implement the project and records the data taken during the

    experiments. In chapter 7 we derive a conclusion from observations taken in these

    experiments.

    hpHighlight

    hpSticky Noterecheck the chapter sequence

  • 3

    2. SCALAR CONTROL OF PMSM

    With scalar control, V/f tuning adjustments are used to provide a family of torque vs. speed

    curves that are equivalent to the utility power torque vs. speed curve over as wide a speed

    range as possible. The drives operating point is at the intersection of the selected drive torque

    vs. speed curve and the characteristic torque vs. speed curve of the driven equipment.

    Acceleration and deceleration, ramp time adjustments are used to prevent acceleration and

    deceleration currents from exceeding safe limits. Current limit adjustments are used to reduce

    the speed of the motor rather than shut down in the event that the load torque exceeds the safe

    limit of the drive.

    Current measurement can also be used to automatically trim various tuning adjustments to

    provide enhanced performance. Properly tuned scalar drives with the best control

    enhancements can provide 150% of rated torque to overcome static friction at zero speed and

    to accelerate the load. They can also provide relatively smooth full torque operation at any set

    speed down to about 10% of base speed.

    In this dissertation, open loop scalar control of PMSM is carried out and is used as basis to

    compare the performance of the vector control drive. In order to achieve open loop scalar

    control of PMSM, we need a technique through which we can control the terminal voltage

    and frequency of the voltage applied to the motor. The Space vector technique used in this

    project is discussed in the next chapter.

    2.1 SCALAR CONTROL OF PMSM

    The mechanical synchronous angular speed is proportional to the frequency of the

    supply voltage

    1

    The RMS value of the induced voltage of AC motors is given as

    2

    By neglecting the stator resistive voltage drop and assuming steady state conditions, the stator

    voltage is identical to the induced one and the expression of magnetic ux can be written as

    3

  • 4

    To maintain the stator ux constant at its nominal value in the base speed range, the voltage-

    to-frequency ratio is kept constant, hence the name V /f control. If the ratio is dierent from

    the nominal one, the motor will become over-excited or under-excited. The rst case happens

    when the frequency value is lower than the nominal one and the voltage is kept constant or if

    the voltage is higher than that of the constant ratio V/f. This condition is called over-

    excitation, which means that the magnetizing ux is higher than its nominal value. An

    increase of the magnetizing ux leads to a rise of the magnetizing current. In this case the

    hysteresis and eddy current losses are not negligible. The second case represents under-

    excitation. The motor becomes under-excited because the voltage is kept constant and the

    value of stator frequency is higher than the nominal one. Scalar control of the synchronous

    motor can also be demonstrated via the torque equation of SM, similar to that of an induction

    motor.

    After neglecting the stator resistance and rewriting the reactance and angular speed as a

    function of frequency, it is possible to rewrite the maximal torque as

    4

    All constant values in 4 can be replaced with constant C. Taking into account equation 4, the

    torque will be constant in a wide speed range up to the nominal speed if the ratio of stator

    voltage and frequency is kept constant. Expression 4 is valid only if can be neglected in

    comparison with the synchronous reactance . This is valid for big machines around the

    rated frequency. Since is proportional to the stator frequency, resistance cannot be

    neglected in the range of low frequencies (less than 10Hz). Therefore, keeping the constant

    ratio / is not enough during the full speed range. In the range of low frequencies, the

    decreasing of the voltage must be slower. This can be achieved by keeping the voltage at a

    constant value in the region of the low frequencies.

  • 5

    3. SPACE VECTOR MODULATION TECHNIQUE

    V/F control using the Sine PWM algorithm is popular. However, this algorithm has certain

    drawbacks like inability to fully utilize the DC link Voltage and more harmonic content

    which affect the overall system efficiency. The Space Vector Modulation (SVM) technique

    helps in reducing the drawback of SPWM and thereby increases the overall system

    efficiency.

    The SVM is a sophisticated, averaging algorithm which gives 15% more voltage output

    compared to the SPWM, thereby increasing the DC link utilization. It also minimizes the

    harmonic content as well as switching losses.

    120

    120

    120

    Vs

    van

    Vbn

    Vcn

    Figure 3.1: Phase voltages and resultant vector ( )

    The required balanced 3 phase voltages can be represented as a single space reference voltage

    ( ) (Figure 3.1). By controlling the amplitude and the frequency of , the motor voltage and

    motor frequency can be controlled. The technique gives rise to eight distinct switching states

    of the Voltage Switched Inverter (VSI). Table 3.1 lists all the possible VSI switching states

    and respective line to neutral voltages. States 1 through 6 are called the active states, as the

    energy is supplied from the supply to the motor. States 0 and 7 are called inactive states, as

    no energy is supplied from the supply to the motor. Each state can be represented as the

    voltage vector in space. Figure 3.2 shows the space vector representation of all the possible

    switching states.

    Table 3.1: SVM switching states

    Switching state On switches Van V bn V cn Space voltage vector

    0 S2,S4,S6 0 0 0

    1 S1,S4,S6 2/3 VDC -1/3 VDC -1/3 VDC

    2 S1,S3,S6 1/3 VDC 1/3 VDC -2/3 VDC

  • 6

    3 S2,S3,S6 -1/3 VDC 2/3 VDC -1/3 VDC

    4 S2,S3,S5 -2/3 VDC 1/3 VDC 1/3 VDC

    5 S2,S4,S5 -1/3 VDC -1/3 VDC 2/3 VDC

    6 S1,S4,S5 1/3 VDC -2/3 VDC 1/3 VDC

    7 S1,S3,S5 0 0 0

    Sector 2

    sector3

    Sector 4

    Sector 5

    Sector 6

    Sector 1

    V1(S1,S4,S6)

    V2(S1,S3,S6)(S2,S3,S6)V3

    (S2,S3,S5)V4

    (S2,S4,S5)V5

    Vs

    Figure 3.2: Space Vector Hexagon

    3.1 TIME CALCULATION TO GENERATE VS

    Let us take an example where is in sector 1 at a vector angle (), as shown in figure 3.3. It

    is assumed that during time , remains steady. For implementing the conventional SVM

    using SVM switching rules, is split as shown in Equation 5.

    Y Axis

    X Axis

    V0/7

    V2

    Vs

    V1

    /3

    Ta

    Vdc

    Figure 3.3: Vector in sector 1

  • 7

    (

    ) (

    ) (

    ) 5

    Equation 6 means that the VSI is in active state 1 for TA time and it is in active state 2 for TB

    time. For the remaining time of TS, no voltage is applied. This can be achieved by applying

    inactive state 0 (or 7) for the remaining time (or ).

    6

    The time intervals, , and , have to be calculated such that the average volt seconds

    produced by the vectors, , and along the X and Y axes, are the same as those

    produced by the desired reference space vector .

    The modulation index or amplitude ratio is defined as:

    | |

    7

    Resolving along the X and Y axes, we get:

    ( ) ( (

    ) | |

    8 (

    ) | |

    Solving for and , we get:

    (

    )

    9

    ( )

    can be found from Equation 6. For better THD, is split into two and then applied at

    the beginning and at the end of . The typical VSI switching waveforms in Sector 1, as

    defined by Equation 5-9 and the switching rules for the conventional SVM using centre

    aligned PWM, are as given in Figure 3.4.

  • 8

    Figure 3.4: Switching waveforms for sector 1

    We can observe the same axes of symmetry in all the waveforms as shown in Figure 3.4.

    These symmetries are mainly responsible for having lower THD in SVM compared to Sine

    PWM in the linear operating region.

    From Figure 3.4, it is clear that in the linear operating region, the maximum line-to-line

    voltage amplitude can be achieved when is rotated along the largest inscribed circle in the

    space vector hexagon. In mathematical terms, this is equivalent to:

    10

    From figure 3.3 and above equation can be

    (

    )

    (

    )

    11

    By solving equation 5, 8 & 11 we get:

    12

    Equation 8 shows that it is possible to get line-to-line voltage amplitude as high as VDC

    using the SVM algorithm in the linear operating range. This is the main advantage of the

    SVM algorithm when compared to the Sine PWM algorithm. Due to higher line-to-line

    voltage amplitude, the torque generated by the motor is higher. This results in better dynamic

    response of the motor.

  • 9

    4. VECTOR CONTROL OF PMSM

    Vector control of a motor is a technique in which a three phase motor is mathematically

    expressed as a DC motor to facilitate its control. By mathematically transforming the three

    phase currents into dc quantities helps to control flux and torque independently just like a DC

    motor. It has been proven that vector control gives better dynamic response than a scalar

    control.

    The 3 phase currents can be transformed into dc quantities by using Clark and Park

    Transformations [4].

    Clark Forward Transform:

    [

    ]

    [

    ] [

    ] 13

    Park Forward Transform:

    [

    ] *

    + [

    ] 14

    The above transformations are performed

    on three phase currents to obtain the

    following vector representation (Figure

    4.1). As shown in figure, component

    of the current is responsible for flux

    generation, whereas, component is

    responsible for torque generation. Thus,

    we have mathematically expressed three

    phase motor as a DC motor. The motor

    can then be controlled by individually

    controlling the flux and torque generating

    components of the currents.

    In case of PMSM, the air gap flux is generated by the permanent magnet. Thus, the flux

    generating component of the three phase stator winding should be zero.

    A sensor less vector control of a motor is a technique where a vector control is achieved

    without employing a rotor position sensor. Instead the rotor position is estimated by using a

    state variable estimator. Various techniques like Extended Kalman Filter and Sliding Mode

    Figure 4.1: Vector representation of coordinate

  • 10

    Observer are employed to estimate the rotor position and speed with the help of measureable

    state variables like currents and voltages.

    A sensor less drive has the following advantages:

    It is cost effective as the cost of sensor is eliminated.

    It gives high speed stability with load change

    It gives high torque even at low speeds.

    It has better dynamic response to load change.

    4.1 DYNAMIC MODEL OF PMSM

    The system considered is a permanent magnet synchronous motor with permanent magnets

    mounted on the rotor, and a sinusoidal flux distribution. A dynamic model for this motor in a

    stator fixed reference frame (, ), by choosing the current components , , the rotor speed

    , and the rotor position as state variables is as follows:

    ( )

    15

    ( )

    16

    17

    18

    The voltage components and are the deterministic control inputs of the system. Both

    the voltage and current components are measurable quantities. They are obtained from the

    three phase stator components by a linear (Clarke) transformation:

    (

    )

    19

    ( )

    20

    Similar equations are obtained for voltages.

  • 11

    4.2 EXTENDED KALMAN FILTER

    The Kalman filter dynamics results from the consecutive cycles of prediction and filtering.

    The dynamics of these cycles is derived and interpreted in the framework of Gaussian

    probability density functions. Under additional conditions on the system dynamics, the

    Kalman filter dynamics converges to a steady-state filter and the steady-state gain is derived.

    The innovation process associated with the filter, that represents the novel information

    conveyed to the state estimate by the last system measurement, is introduced. The filter

    dynamics is interpreted in terms of the error ellipsoids associated with the Gaussian

    Probability Distribution Function (PDF) involved in the filter dynamics.

    When either the system state dynamics or the observation dynamics is nonlinear, the

    conditional probability density functions that provide the minimum mean-square estimate are

    no longer Gaussian. The optimal non-linear filter propagates these non-Gaussian functions

    and evaluates their mean, which represents a high computational burden. A non-optimal

    approach to solve the problem, in the frame of linear filters, is the Extended Kalman filter

    (EKF). The EKF implements a Kalman filter for a system dynamics that result from the

    linearization of the original non-linear filter dynamics around the previous state estimates.

    4.2.1 DISCRETE-TIME PREDICT AND UPDATE EQUATIONS

    The EKF predict update equations are shown below with the above discussed model

    implemented on it [2].

    PREDICT

    Predicted state estimate:

    [ ( ) ] 21

    Predicted covariance estimate:

    [ ] 22

    UPDATE/INNOVATION

    Innovation step:

    ( ) 23

    Innovation covariance:

    24

  • 12

    Near-optimal Kalman gain:

    (

    )

    25

    Where means previous estimate and means estimated result,

    [ ]

    [ ]

    [ ]

    ( )

    [

    ]

    [

    ]

    *

    +

    [

    ]

    [

    ]

    [

    ]

    *

    +

    ,

    and

    Where, is the starting values given as

    input to EKF and updates in iteration.

  • 13

    4.3 SENSOR LESS DRIVE- BLOCK DIAGRAM AND ALGORITHM

    A schematic of the drive taken into consideration is shown in Figure 4.2. The power stage of

    the drive consists of a sinusoidal, isotropic, PM synchronous motor fed by a voltage source

    SV (State Vector) PWM inverter. The digital control and estimation system of the drive is

    also shown in Fig. For the sake of simplicity, unity gains for all the feedbacks and for the

    power converter have been assumed.

    The main control tasks are the speed control, the predictive current control and the generation

    of the PWM commands for the inverter switches. The speed controller delivers the q-axis

    current reference (torque reference). The d-axis current is kept equal to zero to maximize the

    torque/current ratio. The current controller evaluates the references of the stator voltages by a

    predictive algorithm. The estimation task is to derive the speed and position of the motor by

    means of an extended Kalman filter. Therefore the controller uses the predicted current

    estimates rather than the actual current feedbacks.

    In order to apply the Extended Kalman filter algorithm as described in the previous Section,

    the motor state equations and the output equations must be derived. To this purpose the motor

    is described in a stationary two-axis reference frame. The model voltages and currents are

    therefore related to the actual physical quantities by simple linear combinations with constant

    coefficients. In addition the motor equations are derived supposing rotor inertia of infinite

    value. As a consequence the torque equation reduces to a speed derivative equated to zero

    and any mechanical load parameter as well as the load torque disappears in the motor

    equations. This means, to assume a constant speed in the prediction step and to produce the

    entire speed dynamics by the innovation step.

    Figure 4.2: Block diagram of Sensor less Vector control of PMSM

  • 14

    Permanent Magnet Synchronous Motor is a fourth order nonlinear system. However it is

    linear with respect to the input and output. Such a linearity remains also with respect to the

    physical three-phase voltages and currents because of the linear transformations which relate

    physical quantities to stationary two-axis quantities. The description of the motor dynamics in

    a stationary reference frame is thus to be preferred to the description in a synchronous

    rotating reference frame, as the former does not introduce further nonlinearities besides those

    inherent to the motor.

    To implement the control algorithm using a microcontroller, the following flow chart (Figure

    4.3) needs to be implemented. According to the flowchart, the control scheme will use

    Extended Kalman filter to predict the state variable for the step k by using the data of step k-

    1. The predicted values will then be applied to the PI controller to calculate errors and do

    corrective action. Based on this, new voltage values will be generated which will be used to

    update the duty cycle of SVM. Now the three phase currents will be read next and is used by

    the innovation step. It is to be noted that the microcontroller should be powerful enough to

    process the loop as fast as possible in order to get required dynamic characteristics.

    Figure 4.3: Flowchart of the control algorithm to be implemented on

    STM32F4

  • 15

    5. INTRODUCTION TO STM32F4

    The STM32F405xx and STM32F407xx family is based on the high-performance ARM

    Cortex-M4 32-bit RISC core operating at a frequency of up to 168 MHz The Cortex-M4

    core features a Floating point unit (FPU) single precision which supports all ARM single

    precision data-processing instructions and data types. It also implements a full set of DSP

    instructions and a memory protection unit (MPU) which enhances application security. The

    STM32F405xx and STM32F407xx family incorporates high-speed embedded memories

    (Flash memory up to 1 MByte, up to 192 Kbytes of SRAM), up to 4 Kbytes of backup

    SRAM, and an extensive range of enhanced I/Os and peripherals connected to two APB

    buses, three AHB buses and a 32-bit multi-AHB bus matrix.

    Key features of the microcontroller kit:

    STM32F407VGT6 microcontroller featuring 1MB of Flash memory, 192 KB of

    RAM in an LQFP100 package running at 168 MHz (max) providing peak throughput

    of 210 MIPs

    On-board ST-LINK/V2 debugger for hardware level debugging (SWD connector for

    programming and debugging).

    312-bit, 2.4MSPS A/D converters: up to 24 channels (simultaneous sampling of all

    three ADCs is possible).

    212-bit D/A converters.

    General-purpose DMA: 16-stream DMA controller with FIFOs and burst support.

    Up to 17 timers: up to twelve 16-bit and two 32-bit timers up to 168MHz, each with

    up to 4 IC/OC/PWM or pulse counter and quadrature (incremental) encoder input.

    6 complimentary PWM channels with programmable dead time insertion.

    Up to 15 communication interfaces like UART, I2C, and SPI etc.

    5V tolerant GPIO pins

    Floating point unit

    Incremental Encoder interface

    Motor drive and application control

    Medical equipment

    Industrial applications: PLC, inverters, circuit breakers

    Printers and scanners

    Alarm systems, video intercom, and HVAC

    Home audio appliances

  • 16

    6. IMPLEMENTATION STEPS AND DIAGNOSTICS

    The implementation of the project is as follows. Firstly, the SVM code is written to generate

    the required magnitude and frequency of the voltage to be applied to the motor. The open

    loop scalar control is implemented next and is used to compare the performance of vector

    control. The proposed sensor less vector control technique is implemented and the results are

    compared.

    6.1 SVM CODE TO RUN PMSM

    As explained in article 3.1, the SVM code is written to obtain the required magnitude and

    frequency of the voltage at the output of the inverter. Figures 6.1 and 6.2 shows currents

    and for motor running at 25 Hz and 50Hz resp. It is to be noted that the currents are

    sinusoidal in nature. Thus, generalizing the SVM algorithm required magnitude and

    frequency of 3 phase balanced voltages were obtained.

    Figure 6.1: Currents and (for 25Hz)

  • 17

    Figure 6.2: Current and (for 50Hz)

    6.2 IMPLEMENTING OPEN LOOP SCALAR CONTROL

    The next step is to write an algorithm which allows the user to change the speed of motor via

    key press. While doing this, V/f ratio is maintained constant according to the scalar control

    theory. Once the algorithm is implemented the motor is run at 25 Hz and pull-out torque of

    the motor along with the corresponding current is measured and tabulated in table 6.1.

    Table 5.1: Reading for open loop scalar control

    DC link Voltage Load Phase Current

    16 V 1.9 Kg 2.2 Amp.

    6.3 IMPLEMENTING SENSORLESS VECTOR CONTROL

    In this process, the Extended Kalman Filter (EKF) is implemented to estimate the rotor

    position. The estimated rotor position is then used to convert the three phase currents into dc

    quantities which are required for vector control. The obtained dc currents are then fed into a

    pi controller which takes corrective action on the motor.

    Figure 6.3 shows the rotor position estimated by the EKF in synchronism with a phase

    current. Note that the current is not pure sinusoidal as the algorithm is designed to take

    corrective action every PWM cycle. As a result, the modulation index changes every PWM

    cycle. A significant change in modulation after every PWM cycle results in the current shown

    in Figure 6.3.

  • 18

    Figure 6.3: Estimated rotor position by EKF

    Figure 6.4 shows the two out of the three phase currents measured by the ADC. Figure 6.5

    shows the two phase currents ( and ) obtained by Clarke Transform. It can be noted that

    the two currents are 90 degree phase displaced with each other. Figure 6.6 shows and in

    phase, which corroborates with theory. Figure 6.7 shows and dc currents obtained using

    EKF and Park Transform.

    Figure 6.4: ADC currents and

  • 19

    Figure 6.5: Currents and

    Figure 6.6: Currents and

    Figure 6.7: Currents and

  • 20

    Table 6.2 contains the parameters and measurements for the vector controlled drive. Figure

    6.8 gives the tracking profile for currents and .

    Table 6.2: Reading for vector controlled drive

    DC Link Voltage Load Phase Current

    16 V 1.9Kg 1.7 Amp.

    Figure 6.8: Tracking profiles of and

    6.4 APPLYING BAND PASS FILTER

    As noted in 6.3 the currents in the motor is not pure sinusoidal. This can affect the

    performance of EKF. Thus, in order to study the effects of sinusoidal and non-sinusoidal

    currents on the drive we implemented a digital band pass filter on the currents to extract 25Hz

    component and studied its performance.

    Figure 6.9 shows the effect of band pass filter on current. The filter output has reduced noise

    which theoretically should improve the performance of EKF. Figure 6.10 shows and

    currents obtained after band pass filter is applied to the ADC currents. Figure 6.11 shows

    and currents with reduced noise and ripple as compared to figure 6.7. The table 6.3

    gives data acquired from the vector control drive for similar running conditions for the motor

    after introducing the band pass filter.

    Table 6.3: Reading for vector controlled drive with band pass filter

    DC Link Voltage Load Phase Current

    16 V 1.9Kg 1.7 Amp.

  • 21

    Figure 6.9: Input and output currents for band pass filter

    Figure 6.10: Currents and using band pass filter

    Figure 6.11: Currents and using band pass filter

  • 22

    7. CONCLUSION

    It can be inferred from tables 6.1, 6.2 and 6.3 that vector control techniques is more effective

    in efficiently running the motor than scalar control. The current drawn from source is less in

    vector control drive than in scalar control drive for a given DC link voltage, frequency and

    load. There is 22.7% reduction in the current drawn by the motor to drive 1.9Kg load at 16 V

    DC Link.

    Further, it is noted that the currents drawn by the drive with and without band pass filter is

    same (1.7 amp.). However, the drive using band pass filter has less current ripple compared

    to drive without band pass filter (Observed using the deflection in ammeter needle).

    For the experimental study presented above, the system performance was observed to be

    quiet good for a vector control drive with and without band pass filter. The experiment

    demonstrates that a sensor less vector control drive helps in increasing the efficiency of the

    motor while saving the cost of encoder and thus, reducing the overall cost of the drive.

  • 23

    8. REFERENCES

    [1]: Sensor less Full-digital PMSM Drive with EKF estimation of speed and rotor position-

    SilverioBolognani, Roberto Oboe, and Mauro Zigliotto

    [2]: Effective Estimation of speed and rotor position of a PM Synchronous Motor Drive by a

    Kalman Filtering Technique- A. Bado, S. Bolognani, M. Zigliotto

    [3]: An introduction of Kalman Filter Greg Welch and Gary Bishop

    [4]: VF Control of 3-Phase Induction Motor Using Space Vector Modulation- Rakesh Parekh,

    Microchip Technology Inc.

    [4]: Coordinate transform- www.fujitsu.com

    [5]: Sensor less PMSM Vector Control with a Sliding Mode Observer for Compressors

    Using MC56F8013- www.freescale.com

    [6]: Documents and reference manual of STM32f4-www.st.com