Top Banner
IN DEGREE PROJECT MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS , STOCKHOLM SWEDEN 2016 Sensorless Control of a PMSM Evaluation of Different Speed and Position Estimation Methods Suitable for Control of a PMSM ISAK WESTIN KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF INDUSTRIAL ENGINEERING AND MANAGEMENT
84

Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

Mar 29, 2018

Download

Documents

vuongxuyen
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

IN DEGREE PROJECT MECHANICAL ENGINEERING,SECOND CYCLE, 30 CREDITS

, STOCKHOLM SWEDEN 2016

Sensorless Control of a PMSMEvaluation of Different Speed and Position Estimation Methods Suitable for Control of a PMSM

ISAK WESTIN

KTH ROYAL INSTITUTE OF TECHNOLOGYSCHOOL OF INDUSTRIAL ENGINEERING AND MANAGEMENT

Page 2: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

ii

Page 3: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

.

Master of Science Thesis MMK 2016:168 MDA569

Sensorless Control of a PMSM

Isak Westin

Approved: Examiner: Supervisor:

2016-09-29 Hans Johansson Bengt Eriksson

Commissioner: Contact person:

Husqvarna AB Martin Larsen.

Abstract.This thesis is done together with KTH and Husqvarna AB. Husqvarna is one of the leadingproducers of outdoor power equipment in the world. A chainsaw developed by Husqvarna,that is driven by a permanent magnet synchronous motor (PMSM), is currently controller bya sensorless brushless DC-based controlling strategy. But to increase efficiency of the motorand to get a more flexible current control, Husqvarna wants to explore the feasibility to usea sensorless PMSM-based controlling strategy instead, called field-oriented control (FOC).Sensorless control is achieved when the speed and position information used in the control isgiven by an estimator instead of a sensor. The aim of this thesis is thus to evaluate differentrotor speed and position estimators that are applicable to the FOC scheme.

The thesis will include a case study which is a PMSM that is suitable to actuate a batteryoperated chainsaw. The thesis is then conducted in two steps. First, a literature study wasperformed to get an overview of different speed and position estimation methods and to getenough knowledge to determine which methods that are applicable to the case study. Thedifferent methods are compared based on a few predefined performance aspects that representsdesired characteristics in an estimator. The second step is to model and simulate the one ortwo methods that according to the literature study seems best suited. In the simulations,each method will be controlling the motor while running through a set of test cases. The testcases are designed to imitate real potential scenarios for the motor that could occur whenusing the end-product. The different methods are also modelled both in continuous mode,to see if it works, and discrete mode to get closer to reality. The combined results from thesimulations and literature study should indicate which method that is most appropriate touse in a sensorless control strategy for the motor of this case study.

From the literature study, the model reference adaptive system (MRAS) and the slidingmode observer (SMO) were chosen to be modelled and simulated. Both methods show goodresults in continuous mode simulations. When designed for discrete mode however, the SMOstruggles and causes the whole control system to go unstable. The MRAS on the other hand,shows almost as good results as in continuous mode. The MRAS also shows an overall betterestimation performance, both for different load cases and for motor parameter variations.Considering the MRAS is also better suited to include a resistance estimation, which is auseful feature, it will be proposed as the better option in the sensorless control of this casestudy.

iii

Page 4: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

iv

Page 5: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

.

Examensarbete MMK 2016:168 MDA569

Sensorlos reglering av en PMSM

Isak Westin

Godkant: Examinator: Handledare:

2016-09-29 Hans Johansson Bengt Eriksson

Uppdragsgivare: Kontaktperson:

Husqvarna AB Martin Larsen.

Sammanfattning.Det har examensarbetet ar gjort tillsammans med KTH och Husqvarna AB. Husqvarna aren av varldens framsta tillverkare av utomhusprodukter. En motorsag som ar utveckladav Husqvarna, som drivs av en permanent magnet synchronous motor (PMSM), reglerasfor tillfallet med en sensorlos brushless DC-baserad regleringsstrategi. For att oka motornseffektivitet, och for att fa en mer flexibel stromreglering, sa vill Husqvarna utforska mojlighetenatt anvanda en sensorlos PMSM-baserad regleringsstrategi istallet som kallas field-orientedcontrol (FOC). En reglering klassas som sensorlos nar informationen om motoraxelns positionoch hastighet som anvands i regleringen ges av en estimator istallet for en sensor. Malet meddet har examensarbetet ar alltsa att utvardera olika hastighets- och positionsestimatorer somgar att tillampa i en FOC.

Arbetet kommer att innefatta en fallstudie som bestar av en PMSM som ar lamplig for attdriva en batteridriven motorsag. Arbetet ar sedan uppdelat i tva steg. Forsta steget ar attgora en litteraturstudie for att fa en overblick over olika hastighets- och positionsestimatoreroch for att fa tillrackligt med kunskap for att kunna avgora vilka metoder som kommer fungerai den har fallstudien. De olika metoderna jamfors i forhallande till nagra forbestamda aspektersom ska representera onskade egenskaper hos en estimator. Nasta steg ar att modellera ochsimulera de en eller tva metoderna som verkade mest lampliga enligt litteraturstudien. Isimuleringarna sa reglerar varje metod motorn nar den kor igenom ett antal testfall. Testfallenar konstruerade att avbilda riktiga anvandningsscenarion for motorn som skulle kunna intraffavid anvandande av slutprodukten. De olika metoderna modelleras i bade kontinuerlig form, foratt se att de fungerar, och diskret form for att komma narmare verkligheten. De kombineraderesultaten fran simulationerna och litteraturstudien ar tankta att indikera vilken metod somskulle passa bast i en sensorlos regleringsstrategi for motorn i den har fallstudien.

Baserat pa litteraturstudien sa valdes model reference adaptive system (MRAS) och slid-ing mode observer (SMO) till att bli modellerade och simulerade. Simuleringarna for badametoderna visar bra resultat i kontinuerlig form. Men nar SMO simuleras i diskret form sablir den valdigt brusig och gor sa att hela reglersystem blir instabilt. MRAS visar a andrasidan lika bra resultat i diskret form som i kontinuerlig. MRAS visar ocksa en overlag battreestimeringsprestanda, bade for olika lastfall och for parametervariationer i motorn. EftersomMRAS aven lampar sig for resistansuppskattning, vilket ar en anvandbar funktion, sa kommerden att bli foreslagen som det battre valet i det sensorlosa reglersystemet for fallstudien.

v

Page 6: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

vi

Page 7: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

Acknowledgements

This master thesis was done by a single student from the Machine Design department at KTHRoyal Institute of Technology, Stockholm. It was made in cooperation with Husqvarna ABin Huskvarna. I would like to sincerely thank my supervisor from Husqvarna, Martin Larsen.His experience and commitment has been a valuable support throughout the project. I wouldalso like to thank my supervisor and examiner at KTH, Bengt Eriksson and Hans Johansson,for the help and feedback they have given me during this project. Finally I would like tothank the opponent at my final presentation, Yuchao Li, for pointing out different ways toimprove the research and the final report.

vii

Page 8: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

viii

Page 9: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

Contents

Abstract iii

Sammanfattning v

Acknowledgements vii

List of Figures xi

List of Tables xiii

Acronyms xv

Nomenclature xvii

1 Introduction 1

1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.2 Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.3 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.4 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.5 Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Theory 5

2.1 PMSM model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.1.1 Clark and Park Transformations . . . . . . . . . . . . . . . . . . . . . . 6

2.1.2 PMSM model in abc-frame . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.1.3 PMSM model in αβ-frame . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.1.4 PMSM model in dq-frame . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.2 Field-Oriented Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3 Literature Study 13

3.1 Back-EMF Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.2 Model Reference Adaptive System . . . . . . . . . . . . . . . . . . . . . . . . . 16

3.3 Extended Kalman Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.4 Sliding Mode Observer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

3.5 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

ix

Page 10: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

4 Simulation 274.1 Simulink Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.2 Field-Oriented Control Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284.3 Test Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.4 MRAS Estimation Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

4.4.1 Model Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314.4.2 Simulink Model with Variable Time Step Simulation . . . . . . . . . . . 324.4.3 Simulink Model with Fixed Step Size . . . . . . . . . . . . . . . . . . . . 36

4.5 SMO Estimation Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414.5.1 Model Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414.5.2 Simulink Model with Variable Step Size . . . . . . . . . . . . . . . . . . 434.5.3 Simulink Model with Fixed Step Size . . . . . . . . . . . . . . . . . . . . 46

4.6 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

5 Conclusion 555.1 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Bibliography 57

A Matlab script of the PMSM 61

B Popov hyper-stability theorem 63

x

Page 11: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

List of Figures

2.1 Different PMSM rotor designs. SPMSM to the left and IPMSM to the right. . 5

2.2 Stator-fixed abc- and αβ-reference frames. . . . . . . . . . . . . . . . . . . . . . 6

2.3 Rotor-fixed dq-reference frame in relation to the stator-fixed αβ-reference frame.ωel is the rotor electrical speed and θel is the rotor electrical position. . . . . . 7

2.4 field-oriented control (FOC) control scheme. . . . . . . . . . . . . . . . . . . . . 9

2.5 Sensorless version of FOC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.1 Illustration of the model reference adaptive system. . . . . . . . . . . . . . . . . 16

3.2 Illustration of the model reference adaptive system using the permanent magnetsynchronous motor (PMSM) as reference model. . . . . . . . . . . . . . . . . . 17

3.3 Illustration of the sliding mode observer (SMO) principle. x is the estimatedstate variable and x is the real (or measured) state variable. . . . . . . . . . . . 20

4.1 Simulink model of PMSM and FOC. . . . . . . . . . . . . . . . . . . . . . . . . 27

4.2 Error between mathematical model and Simulink model of PMSM and FOC. . 28

4.3 Speed response of the tuned FOC. . . . . . . . . . . . . . . . . . . . . . . . . . 29

4.4 The Simulink model of model reference adaptive system (MRAS) estimator. . . 32

4.5 Simulink model of PMSM and FOC extended with a MRAS estimation. . . . . 32

4.6 Speed response for the MRAS control running test cases 1, 2, and 6. . . . . . . 33

4.7 Estimation errors for the MRAS control running test cases 1, 2, and 6. . . . . . 33

4.8 Speed response for the MRAS control running test cases 3, 4, and 5. . . . . . . 34

4.9 Estimation errors for the MRAS control running test cases 3, 4, and 5. . . . . . 35

4.10 Speed response for the MRAS control running test case 7. . . . . . . . . . . . . 35

4.11 Estimation error for the MRAS control running test case 7. . . . . . . . . . . . 36

4.12 Simulink model of the discrete MRAS-based FOC. . . . . . . . . . . . . . . . . 37

4.13 Simulink model of the PMSM extended with a discrete MRAS-based FOC. . . 37

4.14 Speed response for the discrete MRAS control running test cases 1, 2, and 6. . 38

4.15 Estimation errors for the discrete MRAS control running test cases 1, 2, and 6. 38

4.16 Speed response for the discrete MRAS control running test cases 3, 4, and 5. . 39

4.17 Estimation errors for the discrete MRAS control running test cases 3, 4, and 5. 39

4.18 Speed response for the discrete MRAS control running test case 7. . . . . . . . 40

4.19 Estimation error for the discrete MRAS control running test case 7. . . . . . . 40

4.20 Simulink of the SMO. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

4.21 Simulink model of PMSM and FOC extended with a SMO estimator. . . . . . 43

4.22 Speed response for the SMO control running test cases 1, 2 and 6. . . . . . . . 43

4.23 Estimation errors for the SMO control running test cases 1, 2 and 6. . . . . . . 44

4.24 Speed response for the SMO control running test cases 3, 4 and 5. . . . . . . . 44

4.25 Estimation errors for the SMO control running test cases 3, 4 and 5. . . . . . . 45

4.26 Speed response for the SMO control running test case 7. . . . . . . . . . . . . . 45

xi

Page 12: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

4.27 Estimation errors for the SMO control running test case 7. . . . . . . . . . . . . 464.28 Simulink model of the discrete SMO-based FOC. . . . . . . . . . . . . . . . . . 464.29 Speed response for the discrete SMO. . . . . . . . . . . . . . . . . . . . . . . . . 474.30 Estimation errors of the SMO using different low-pass filter (LPF)s. . . . . . . 484.31 Estimation errors of the discrete MRAS using different sample frequencies. . . 494.32 Speed response of discrete MRAS controller running test case 4 with different

values for the start load. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504.33 Speed response of SMO controller running test case 4 with different values for

the start load. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504.34 Speed response of discrete MRAS controller running test case 4 with different

values for the start load and a anti-windup functionality for the FOC speedcontroller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

4.35 Speed response of SMO controller running test case 4 with different values forthe start load and a anti-windup functionality for the FOC speed controller. . . 51

4.36 Speed response of discrete MRAS controller running test cases 4 and 5 combinedwith different values for the start load. . . . . . . . . . . . . . . . . . . . . . . . 52

4.37 Estimation errors of discrete MRAS controller running test cases 4 and 5 com-bined with different values for the start load. . . . . . . . . . . . . . . . . . . . 53

xii

Page 13: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

List of Tables

1.1 Motor characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3.1 Summary of literature study results. Green means the estimation method per-forms good in relation to respective performance aspect, yellow means themethod performs satisfactory and red means it performs bad. . . . . . . . . . . 23

4.1 Computational power evaluation. . . . . . . . . . . . . . . . . . . . . . . . . . . 49

xiii

Page 14: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

xiv

Page 15: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

Acronyms

AC alternating current.

ANFIS adaptive neuro-fuzzy inference system.

ANN artificial neural network.

back-EMF back electromotive force.

BLDC brushless DC.

DC direct current.

EKF extended kalman filter.

FIR finite impulse response.

FIS fuzzy inference system.

FOC field-oriented control.

IPMSM interior permanent magnet synchronous motor.

LPF low-pass filter.

MRAS model reference adaptive system.

PMSM permanent magnet synchronous motor.

PSO particle swarm optimization.

Q-PLL quadrature-phase locked loop.

SGA simple genetic algorithm.

SMO sliding mode observer.

SPMSM surface permanent magnet synchronous motor.

SVM space vector modulation.

xv

Page 16: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

xvi

Page 17: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

Nomenclature

vsabc Phase voltage for respective phase a, b and c.

vα, vβ α and β components of the phase voltages when expressed in αβ-coordinates.

vd, vq d and q components of the phase voltages when expressed in dq-coordinates.

isabc Stator winding current for respective phase a, b and c.

iα, iβ α and β components of the stator currents when expressed in αβ-coordinates.

id, iq d and q components of the stator currents when expressed in dq-coordinates.

eabc Induced electromotive force in the stator by the rotor for each phase a, b and c.

eα, eβ α and β components of the Back-EMF when expressed in αβ-coordinates.

ed, eq d and q components of the Back-EMF when expressed in dq-coordinates.

φsabc Total flux induced in the stator windings for respective phase a, b and c.

φrabc Flux induced in the stator by the rotor magnets for each phase a, b and c.

φr Amplitude of the flux induced in the stator by the rotor permanent magnets.

ωel Electrical rotation speed of the rotor.

ωr Mechanical rotation speed of the rotor.

θel Electrical position of the rotor.

θr Mechanical position of the rotor.

Lss Stator inductance matrix.

Ls Stator inductance.

Rs Resistance in the stator windings in the PMSM.

p Number of pole-pairs of the permanent magnet in the rotor.

J Rotor inertia.

f Viscous damping constant.

Tem Electromagnetic torque produced by the motor.

TL Load torque applied to the motor.

xvii

Page 18: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

currKFOCp Proportional gain constant of the current controller in the FOC.

currKFOCi Integral gain constant of the current controller in the FOC.

spdKFOCp Proportional gain constant of the speed controller in the FOC.

spdKFOCi Integral gain constant of the speed controller in the FOC.

KMRASp Proportional gain constant of the MRAS estimator.

KMRASi Integral gain constant of the MRAS estimator.

kSMO Switching gain constant of the SMO estimator.

lSMO Observer gain constant of the SMO estimator.

Ts Time of sampling period.

xviii

Page 19: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

Chapter 1

Introduction

AC electrical motors are widely used in industry. An AC motor is a machine that convertsalternating current (AC) into torque, contrary to the DC motor which produces torque fromdirect current (DC). Transportation (like trains or cars), washing machines and industrialcranes are some applications where AC motors are used [1].

There are two main classifications of AC motors: induction and synchronous [1]. Thedifference is that for an induction motor, current are induced in the rotor windings wheneverthe speed of the rotor differs from the speed of the rotating magnetic field generated fromthe currents in the stator windings. While for synchronous motors, the rotor always rotatesat the same speed as the rotating magnetic field. The synchronous speed can be achieved byeither injecting current into the rotor or using permanent magnets in the rotor.

Of the two, induction motors are the most popular in industry, mainly because they aresmall, robust and cheap [2]. The drawback with the induction motor is that it is difficult tocontrol because of its complexity and nonlinear behavior. One particular synchronous motor,the PMSM, are however gaining in popularity due its better power/mass ratio and higherefficiency. Due to the permanent magnets, there are no energy losses in the rotor. However,the PMSM is still more expensive and thus mostly used for high performance applications [3].

A motor that is very similar to the PMSM, and perhaps more used, is the brushless DC(BLDC) motor. Both have permanent magnets in the rotor and require alternating statorcurrents to produce constant torque [4]. The difference is that the back electromotive force(back-EMF) in the BLDC motor has a trapezoidal waveform while the counterpart in thePMSM is sinusoidal. This gives a difference in the operating requirements of the two motors.The BLDC motor is controlled with a six-step current and the implementation of such acontroller is relatively straight forward The PMSM is harder since it should be controlledwith a three-phase sinusoidal current. This requires a much faster control loop which puts alot of demands on the hardware. Additionally, all three phases are used simultaneously whichmakes it harder to do correct measurements. The rotor position must also be accuratelyknown.

A mature and well-used control strategy for PMSMs is the FOC. The idea with FOCis to separately control the motor flux and torque [5]. This is done by transforming thethree stator currents, represented in a three-coordinate reference frame, into a rotating two-coordinate reference frame. To do this, the exact position of the rotor needs to be known. Thetwo current components are then controlled independent on each other. The control output,that is the new motor voltage command, is then transformed back and instructs the voltageinverter to produce the sinusoidal voltages that will be fed to the motor. This way, FOCmakes the AC control behave like a DC control [6].

Traditionally for speed dependent applications, some kind of sensor is used to read the

1

Page 20: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

motor speed and feed the value back to the controller. The rotor position is also needed whenusing FOC. However, extra sensors require extra physical space in the application and it alsointroduces another source of failure in the system. So, with the additional purposes of reducingcost and maintenance needs, the sensor can be replaced by an estimator that mathematicallyestimates the speed or position of the rotor. This is called sensorless control [2], [3].

1.1 Background

Husqvarna AB is among the worlds biggest producers of outdoor power equipment. Theydevelop and sell products like chainsaws, lawn mowers and blowers. One of the electricalchainsaws developed by Husqvarna is driven by a PMSM which is currently controlled with asensorless BLDC six-step controlling approach. In an attempt to improve the performance ofthe PMSM in this application, Husqvarna wants to investigate the feasibility to replace theBLDC controller with a sensorless PMSM based controlling method.

By using a PMSM based controlling method, the current control, using FOC, and motordynamics get more flexible. So if applied correctly, the application should improve in efficiencyand different driving behaviors will be enabled. The implementation is however more complexand has higher demands on the time frame of the controller and the computational power.

By switching controlling method, there will also be a need to design a new speed andposition estimator. This thesis will thus evaluate different speed and position estimationmethods in order to propose the method that would be most suitable for the new controllingmethod.

1.2 Problem Definition

The field of motor speed and position estimation is not new. There exists a lot of literatureof this technique with several different methods used in applications. However, there are fewcomparisons made and there are no general guideline to follow for different applications. Thisthesis will therefore contribute with such a guideline for a specific application and aim toanswer following questions:

1. What is the difference between the speed and position estimator solutions for sensorlesscontrol of a PMSM used today?

2. Which solution is best suited for the platforms used by Husqvarna in regard to accuracyand computational efficiency?

The first objective in this thesis is a comprehensive literature study. The result of theliterature study will be an analysis and evaluation of different position and speed estimatorsthat can be used to provide the position and speed information of the rotor to the controllerin all situations. The literature study aims to answer research question 1 and parts of researchquestion 2.

The performance of the estimation methods that, according to the analysis, seems suitablefor the application in this thesis will then be further studied. The methods will be modeledand simulated in Simulink and compared by a few predefined test cases that should representthe application in use. The simulations aims to provide further answers to research question 2.

2

Page 21: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

1.3 Scope

The research area of sensorless control is huge and in order to achieve a valuable result intime, there need to be some delimitations. Since the literature study will be the base of thethesis, that is where most delimitations will be applied.

The primary estimation methods that will be studied are the ones that are designed for thehigh speed range. It is a common problem for high speed estimators to perform unsatisfactoryat low speed and vice versa. Since low speed estimators and high speed estimators are twodifferent (but related) research areas, this thesis will focus on the latter one. Also, both rotorspeed and rotor position estimators will be investigated since one can be derived from theother.

Considering the application in this thesis involves a surface permanent magnet synchronousmotor (SPMSM), only estimation methods that can be applied to such a motor will be stud-ied. Many methods is applicable to both interior permanent magnet synchronous motors(IPMSMs) and SPMSMs but methods that are applicable to IPMSMs only will be disre-garded.

When talking about sensorless control, it is preferable to separate the motor control andthe speed estimation. Since the focus in this thesis is the estimation part, the motor controlis decided to be FOC, see Section 2.2. Thus, only methods that are applicable to FOC willbe considered.

If the result from the literature study shows that several estimation methods could besuitable for the application, only the two methods with highest potential will be furtherinvestigated. This limitation is needed to ensure efficiency in the simulation analysis.

The literature study focus on finding both theory and applications of the different esti-mation methods. Theory is necessary to understand the equations and how they are used toestimate the rotor speed or position. Applications are useful to discover practical limitationsand to get a hint of the overall performance of each method.

1.4 Methodology

Since this area of research is somewhat established, this thesis will mostly be based on existingtheory. Thus, a deductive researching approach is suitable. First, a set of research questionswill be defined, see Section 1.2. The objective of this thesis is to find answers to thesequestions. Based on the research questions, the literature study and simulations, one optimalsolution for the given application will be suggested as the best solution.

This thesis outline suggests a mixed methods approach to be adopted [7]. The literaturestudy will be purely qualitative and will be the greater part of this thesis. The methods fromthe literature study will be compared using certain performance aspects that are qualitativelychosen. The comparison result should indicate which methods are most suitable to be subjectfor the following case study. The testing in the case study will then be conducted in aquantitative manner. Test cases will be qualitatively predefined and the results will summarizethe performance of each estimation method.

The case study will be based on a motor specification that is suited for a battery oper-ated chainsaw driven by a SPMSM and controlled by FOC. The motor characteristics aresummarized in Table 1.1.

The result from this thesis will then serve as a guideline for sensorless control in similarapplications. Similar applications include sensorless speed control of a SPMSM using a low-cost microprocessor.

3

Page 22: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

Table 1.1: Motor characteristics.

Number of poles in the rotor 14

Number of slots in the stator 12

Rated power output 1.2 kW

Rated torque output 1.5 Nm

Rated speed 8500 rpm

No load speed 11000 rpm

Rated DC link voltage 30 V

Maximum current 60 A

Before conducting this study, some potential ethical issues are considered. Firstly, plagia-rism is not acceptable and will be considered throughout the whole project. Also, since theend user of Husqvarna’s products mostly are humans, there should always be some concernabout their safety and integrity when using the final product.

1.5 Content

The rest of the report is organized as follows. Chapter 2 presents some previous knowledgeand theory that this thesis will build upon. The theory includes PMSM dynamical equations,Clarke and Park vector transformations and the FOC. Chapter 3 presents different sensorlesscontrol methods found in the literature. Different applications for these methods will bediscussed and the feasibility for this case study is evaluated. The simulation procedure,simulation model, test cases and simulation results will be presented in Chapter 4. The workwill then be concluded and future work will be presented in Chapter 5.

4

Page 23: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

Chapter 2

Theory

In this chapter, theories and equations are presented that will be used throughout this thesis.This will be a mixture of former knowledge and knowledge acquired for the purpose of thisthesis. These equations will form the ground on which following control system and estimationmethods will be based upon.

2.1 PMSM model

There are many different kinds of PMSMs that differ in the physical structure of the machine.Two of the most used types can be seen in Figure 2.1 and are the SPMSM and the IPMSM [2].

(a) SPMSM (b) IPMSM

Figure 2.1: Different PMSM rotor designs. SPMSM to the left and IPMSM to the right.

For the SPMSM, the magnets are placed on the surface of the rotor. The magnets areevenly distributed on the surface so the stator inductances does not depend on the rotorposition. This type of motor is the easier one to produce and control but the magnets aremore exposed for damage and the machine lack the saliency information that could be usedto find the rotor position. In the IPMSM, the magnets are integrated in the rotor whichcontributes to more mechanical durability and robustness. This motor is a saliency poletype and the inductance do depend on the rotor position. However, it is more expensive tomanufacture and more complex to control.

For the case study in this thesis, a SPMSM motor type is used and it will be the only typestudied. Therefore, for the rest of this report, when referring to a PMSM it is the SPMSM

5

Page 24: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

type that is meant if nothing else is stated.

2.1.1 Clark and Park Transformations

The three-phase motor dynamics can be described from different point of views by usingdifferent reference frames. The most standard frame is the three-phase stationary referenceframe, also called abc-frame. This is the physical reference frame of the motor where thethree axes a, b and c represents the three electrical phases in the stator. Current and voltagemeasurements are also done in this reference frame. The abc-frame is thus fixed to the stator.

When using FOC as the control structure, the measured three-phase stator currents needsto be transformed into the rotating two-coordinate reference frame, called dq-frame. Thistransformation is called the Park transformation [1]. Furthermore, the voltage control signalneeds to be transformed back into abc-coordinates. Estimators usually also use transformedvalues.

The Park transformation is done in two steps. The first step is to project the the three-phase variable onto the complex two-coordinate αβ-reference frame, called the Clark trans-formation. Like the abc-frame, the αβ-frame is also fixed to the stator but the number of axesare reduced to two as seen in Figure 2.2.

b

c

β

Figure 2.2: Stator-fixed abc- and αβ-reference frames.

The Clark transformation is defined as follows [1]

[xαxβ

]=

√2

3

[1 −1

2 −12

0√32 −

√32

]xaxbxc

. (2.1)

The second step in the Park transformation is to transform the αβ- representation of thevariable into the rotating dq-reference frame which is fixed to the rotor. This transformationis dependent on the rotor electrical position which is defined as the angle between the statorα-axis and the rotor d-axis, see Figure 2.3. The ”direct” d-axis is aligned with the rotor fluxand the ”quadrature” q-axis is positioned at 90◦ in the positive rolling direction[8].

6

Page 25: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

α

β

d

q

θel

elω

Figure 2.3: Rotor-fixed dq-reference frame in relation to the stator-fixed αβ-reference frame.ωel is the rotor electrical speed and θel is the rotor electrical position.

The rotation transformation is defined as [1][idiq

]=

[sin θel cos θelcos θel − sin θel

] [iαiβ

]. (2.2)

Depending on the method, the speed and position estimator may use both Clarke transformedor Park transformed variables.

2.1.2 PMSM model in abc-frame

The three-phase stationary frame representation of a PMSM is given by [2]

vsabc = Rsisabc +d

dtφsabc (2.3)

where vsabc is the stator voltage in respective phase, Rs is the stator winding resistance, isabcis the current in the stator windings in respective phase and φsabc is the flux within the statorwindings in respective phase. The stator flux is given by

φsabc = Lssisabc + φrabc. (2.4)

The first term is the flux produced by the currents in the stator windings; Lss is the statorinductance matrix which depend on the type of machine. Since this thesis only deals with theSPMSM, the inductance of the d-axis is equal to the inductance in q-axis. This means thata constant value can be used for the stator inductances in the transformed representations ofthe machine [2]. The second component, φrabc, is the flux induced in each stator phase bythe permanent magnets in the rotor. It has a sinusoidal waveform and depends on the rotorposition.

Equation (2.3) can then be rewritten as

vsabc = Rsisabc +d

dt(Lssisabc) + ωel

d

dθelφrabc. (2.5)

The last component represents the back-EMF induced by the rotor according to

eabc = ωeld

dθelφrabc. (2.6)

7

Page 26: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

Both electrical speed and position has the same relation to their mechanical counterparts, seeEquations (2.7) and (2.8).

ωel = pωr (2.7)

θel = pθr (2.8)

where ωr is the mechanical speed of the rotor, θr is the mechanical position of the rotor andp is the number of pole pairs of the magnets in the rotor.

2.1.3 PMSM model in αβ-frame

By using Equations (2.5) and (2.1) the current dynamic equations of the PMSM expressed inαβ-coordinates can be obtained as

d

dtiαβ = −Rs

Lsiαβ +

1

Ls(vαβ − eαβ) (2.9)

where iαβ = [iα iβ]T are the currents in the stator windings, vαβ = [vα vβ]T are the appliedstator voltages, Ls is the constant value of the stator inductance in d- and q-axes, and eαβ =[eα eβ]T is the induced back-EMF for each axis and is given by

eα = −√

3

2φrωel sin(θel) = −keωel sin(θel) (2.10)

eβ =

√3

2φrωel cos(θel) = keωel cos(θel) (2.11)

where φr is the amplitude of the flux produced by the rotor magnets.

2.1.4 PMSM model in dq-frame

By using Equations (2.5), (2.1) and (2.2) the current dynamics of the PMSM in dq-coordinatescan be expressed as

d

dtidq = −Rs

Lsidq +

1

Ls(vdq − edq) (2.12)

where idq = [id iq]T are the currents in the stator windings, vdq = [vd vq]

T are the appliedstator voltages and edq = [ed eq]

T are the induced back-EMF for each axis and are given by

ed = −Lsiqωel (2.13)

eq = Lsidωel + φrωel. (2.14)

Equations (2.12)-(2.14) can also be represented in state space form with state vector x =[id iq]

T according to

x = Ax+Bu

y = Cx(2.15)

with

A =

[−RsLs

ωel−ωel −Rs

Ls

];Bu =

[ 1Lsvd

1Ls

(vq − φrωel)

];C =

[1 00 1

].

8

Page 27: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

The electro magnetic torque produced by the PMSM in dq-coordinates, Tem, is given by

Tem =3

2pφriq. (2.16)

The mechanical dynamic equation of the PMSM is given as

Jd

dtωr = Tem − fωr − TL (2.17)

where J is the rotor inertia, f is the viscous damping constant and TL is the load torque.

2.2 Field-Oriented Control

The principle with field-oriented control is that it controls the motor current in dq-frame,instead of directly in abc-frame. The benefit with this is that since the dq-frame rotatestogether with the rotor, the electrical state of the motor does not depend on the rotor position.The currents is thus perceived as DC currents which are easier to control. Another advantagewith FOC is that in the PMSM, the d-component of the current is proportional to the fluxand the q-component is proportional to the torque [5], [9]. The FOC can thus manage tocontrol both flux and torque by controlling the currents in d- and q-coordinates separately. AFOC control scheme applied on the PMSM is illustrated in Figure 2.4.

SVM

PMSM

PI

PIPI

d_dt

Voltageinverter

abc

dq ia

positionspeed

speed ref

id

vq

vd

iq

i refq

i refd

ib

ic

_+

_+_+

Figure 2.4: FOC control scheme.

The measured three-phase currents are transformed into dq-coordinates using the rotorposition as described in Section 2.1.1. The d and q components of the current are then fedto respective d and q current controller. Both current controllers are usually traditional PIcontrollers. The PI controllers outputs the dq-components of the voltages which are fed to aspace vector modulation (SVM) function. The SVM instructs the voltage inverter to producethe sinusoidal voltages that should be applied on the motor.

9

Page 28: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

As can be seen in Equation (2.16), the q component of the current alone controls the motortorque. Thus, it is clear that to get maximum torque, the d component of the current shouldbe zero and this is often the case in applications. However, if the d-axis is controlled with anon-zero current, the speed range of the motor changes at the cost of torque. This techniqueis called flux-weakening control [8].

When using FOC as a speed controller, an extra speed PI controller is added which decidesthe reference signal for the q current controller, as seen in Figure 2.4. The feedback signal forthe speed controller is often obtained by differentiating the position signal from an encodermounted on the motor.

For a sensorless control scheme, the position encoder on the motor is replaced by an esti-mator that only uses measurable electrical quantities like current and voltage. The sensorlessFOC scheme is illustrated in Figure 2.5. The estimator then provides rotor position for thetransformations as well as rotor speed for the speed control.

SVM

PMSM

PI

PIPI

Voltageinverter

abc

dq ia

iabc

vabc

speed ref

position

speed

id

vq

vd

iq

i refq

i refd

ib

ic

_+

_+_+

Speed andposition estimator

Figure 2.5: Sensorless version of FOC.

To make it easier for the controller a feed-forward part can be added to the FOC. The feed-forward compensates each component of the voltage control signal for known disturbances.The compensation is calculated with Equations (2.13) and (2.14).

2.3 Summary

In this chapter the theoretical background for this thesis is presented. Usually, the equationsof a three-phase AC motor is described in a two dimensional three-axis coordinate system,called abc-frame, where each axis represents one phase in the stator. To make the controlof such a motor easier, the control system called FOC transforms the motor quantities (e.g.stator current and stator voltage) into a two dimensional two-coordinate rotating frame called

10

Page 29: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

dq-frame.In dq-frame, the current control resembles the easy control of a DC motor. Also, d- and q-

currents relates to different motor characteristics independent on each other. This also meansthat they can be controlled separately.

The FOC control needs the value of the rotor position for a successful coordinate trans-formation. Typically this value is given by a position encoder mounted on the motor shaft.To remove the weight, space and source of failure given by an encoder, the FOC can insteadreceive values of the rotor position from an estimator that mathematically approximates therotor position using measured motor states (i.e. stator current and stator voltage). By usingan estimator to produce rotor position values, the FOC operates completely sensorless.

11

Page 30: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

12

Page 31: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

Chapter 3

Literature Study

In this chapter several different existing sensorless control methods for PMSMs will be an-alyzed and discussed. The methods are found in existing literature and only methods thatare applicable for this case study will be included, as described in Section 1.3. Also, methodswith small coverage, i.e. methods that are immature or unusual, will be disregarded. Thisis because it is hard to do a proper analysis based on literature without sufficient amount ofdata.

In the analysis, the different methods will be compared through some specific aspects.The aspects are chosen together with supervisors to best expose the benefits and drawbacksfor each method in relation to the case study. The considered aspects are:

• The requirements put on the processor. Determine how much computational power isneeded. To decrease the cost of the final product, the hardware cannot be too expensive.Thus, the lower computational power needed, the better.

• The ability to estimate position and speed of the rotor at all speed ranges. This doessomewhat correspond to the estimation performance of the method. The estimationerror should be as low as possible.

• Sensitivity to motor parameter variations. Since the motor parameters varies whenthe motor operates, mainly because of the temperature increase, it could affect thecorrectness of the estimation. If the methods are too reliant on the motor parameters,it will introduce a problem when implemented on a real motor.

– A favorable feature of a method would be the ability to estimate the stator re-sistance. The knowledge of the stator resistance could be used to improve theestimation accuracy and to estimate the temperature of the motor. This will how-ever not exclude any method, it will only be considered a benefit.

• The capability to re-tune for different motors. If the implementation of a method isfound beneficial there might be an interest to incorporate it into other products as well.In that case, the method cannot depend too much on tuned parameters. That will makethe integrating process too time consuming.

Sensorless control can be divided into three main strategies according to [10]. The firstone is open loop methods. The methods in this category are straight forward and relativelyeasy to implement. They are however not really reliable since they have no real protectionagainst parameter variations and measurement noise. These methods are thus seldom usedin applications. The second category is closed loop methods that are superior to open loop

13

Page 32: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

methods. Since these methods use the error signal between measured and estimated quantities,the convergence can be guaranteed. Here some of the most used high speed estimation methodsare found. The main drawback is that most of the methods depends on the motor parametersor the back-EMF which is small at low speed. Hence, they are mostly used for high speedapplications only. The last category targets control of the standstill and low speed region ofthe motor. This is the methods not based on the motor fundamental equations. These methodsare however not suitable for high speed control.

This thesis will focus on the closed loop methods since they usually performs best and areby far the most used methods in high speed applications.

3.1 Back-EMF Estimation

The idea with the back-EMF estimation method is to use the electrical equations of themachine to estimate the induced back-EMF. As seen in Equations (2.10) and (2.11), the back-EMF contains information about the rotor position and speed. Combining these equationsgives the rotor position according to

θel = − tan−1(eαeβ

). (3.1)

The back-EMF estimation method is probably the most common method for sensorlessPMSM control [1], [11]. It is simple and easy to calculate while still showing great performanceat high speed control applications [12], [13], [14].

However, a well known problem with this type of method is that the back-EMF is depen-dent on the rotor speed. This means that at low speeds, the back-EMF is very small and hencedifficult to estimate correctly [12], [13], [14], [15], [16]. The most common way to solve thisproblem is to use some kind of start-up strategy or another type of estimation method thatprovide the control with rotor speed and position information in the low-speed range. Whenthe back-EMF value is large enough, at a specific speed, the back-EMF method takes overthe estimations. In [16] for example, a simple start-up strategy is designed using a predefinedreference speed input. The rotor position is estimated by integrating the reference speed.This method can only be used in the start of an operation. The estimations will deviate withtime and a better estimator will be needed. In [15], an active flux observer is used for positionestimation at low speed. Here, the flux is estimated and used to calculate the rotor position.

Other mentioned disadvantages with the back-EMF estimation method are the sensitivityagainst parameter uncertainties, measurement noise and inverter irregularities [11], [13], [14].

The most straightforward approach to use the back-EMF for speed and position estima-tions is by using it as an open loop method, i.e. using the motor equations to directly calculatethe back-EMF from measured values as in [16]. But as mentioned above, this is not a reliablechoice since it heavily depends on correct motor parameters and noise-free measurements.Neither of these problems are discussed and the method is only verified through simulations.

Another, more robust, way is to use an observer, making it a closed loop method. Whenusing an observer to estimate the back-EMF there are two different approaches: indirect anddirect estimation [17].

In indirect estimation, the back-EMF is considered a disturbance and is obtained byobserving the stator currents and matching them with the measured currents. In [18], aLuenberger observer is observing the stator currents in αβ-frame, using Equation (2.9). Theobserver is defined as

d

dtiαβ = −Rs

Lsiαβ +

1

Ls(vαβ − eαβ) +K1(iαβ − iαβ) (3.2)

14

Page 33: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

where iαβ = [iα iβ]T are the observed currents, iαβ = [iα iβ]T are the measured currents,vαβ = [vα vβ]T are the measured voltages and eαβ = [eα eβ]T are the estimated back-EMF.K1 is the observer gain.

The back-EMF is here treated like a disturbance and are estimated using the currentobserver error according to

d

dteαβ = K2(iαβ − iαβ) (3.3)

where K2 is the estimation gain.

The rotor position and speed are then extracted from the back-EMF estimations by themeans of quadrature-phase locked loop (Q-PLL) [18]. This is to reduce the risk of noiseissues that could occur when calculating the rotor position directly from the back-EMF, as inEquation (3.1).

Similarly, in [11] the back-EMF is seen as a disturbance and the currents are estimated bya simple observer. The estimation error is then used to derive the back-EMF. The observeris defined using the electrical equations of the PMSM in a specific Park δγ-reference frame.A thorough robustness study of the method shows that it is sensitive to motor parameteruncertainties, specifically the stator resistance variations. It is also sensitive to measurementerrors and inverter irregularities, especially at low speeds. An estimator of stator resistanceis added to address these uncertainties which makes the method more robust.

In direct estimation, the back-EMF is considered a state variable and is directly estimatedby the observer. In [15], the PMSM is presented in state space form in αβ-frame using thestate vector x = [iα iβ eα eβ]T . The state vector, and thus the back-EMF components, areestimated using a Luenberger observer. The approach seems stable and accurate for lowspeeds. It is however only tested up to 150 rad/s which is less than 32% of the rated speed ofthe used motor. The switch between low speed control and high speed control also causes anovershoot.

In [19], the PMSM is modeled in αβ-frame with the same state vector as above. Twodifferent observers are then used to estimate the state vector: Luenberger observer and SMO.The performance of both observers are then compared and the SMO comes out as the betterchoice (Section 3.4 will give a closer look at the SMO). A Kalman filter is also used to filterout noise from the estimated back-EMF components and and estimate the rotor speed.

Looking at the performance aspects, the back-EMF estimation method is seen as one of thekinder methods in terms of computational requirements. Since it only consists of one observerand some straight forward calculations, it is not so heavy for the processor. The method alsoseems to perform satisfactory at high speed but requires a complementary estimation methodfor standstill and low speed.

According to many [11], [13], [14], the back-EMF method is highly sensitive to variations ofthe motor parameters. Since the motor parameters varies during operation, the performancedepends quite a lot on this problem. There are however some proposed solutions. For example,[18] calculates the speed and position using the Q-PLL which reduces the dependability onparameter correctness. In [16], an artificial neural network (ANN) is added to the FOC toimprove accuracy and robustness.

In [11], an additional reference model is used to estimate the stator resistance. Theestimated resistance is adjusted on-line when estimating the back-EMF. Results shows thatwhile the resistance estimation is erroneous, it still improves the performance of the control.

For the aspect of using the control on several different motors, the back-EMF estimationmethod seems neither bad nor perfect. Of course, the motor parameter used in the motorequations has to be updated. The gain-values for the observer will probably also have to be

15

Page 34: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

re-tuned. If some other method is used together with the back-EMF method, the parametersof that method might also need to be changed.

Overall, the back-EMF estimation method seems good much because of its simplicity.However, it struggles a lot at standstill and low speed region and will in most cases requirean additional method for that purpose. Since it is based upon the motor equations, thedependability on correct motor parameters are somewhat inevitable. To improve in theseareas, some extra methods are preferable. If that is the case, the simplicity of this method issomewhat lost and it seems rather difficult to get it working correctly.

3.2 Model Reference Adaptive System

Another closed loop method to estimate the speed and position of the rotor is the MRAS. Thebasics of MRAS is to use two independent models: One reference model which is independenton the variable to be estimated and one adjustable model which is dependent on the variableto be estimated. The two models uses different sets of inputs to calculate the same statevariables which are in turn fed to a certain adaption mechanism. The adaption mechanismuses the difference between the two signals to tune the estimated variable and feed it back tothe adjustable model. The estimated value will this way be driven to its true value [10], [13].The MRAS scheme is illustrated in Figure 3.1.

Reference model

Adjustable model

Adaptation mechanism

Input

Output

Estimated variable

Error

Figure 3.1: Illustration of the model reference adaptive system.

The MRAS can be implemented in several different ways depending on the state variableto be estimated, choice of reference model, choice of adjustable model and choice of adaptivemechanism. When using MRAS to estimate the rotor speed and position of a PMSM, a motorvariable, e.g. stator current or power, should be chosen as the state variable [9]. Two differentmodels are then used: The reference model calculates the state variable without using therotor speed or position and the adjustable model calculates the same state variable with thehelp of the rotor speed or position value given by the adaptive mechanism.

Similar to the back-EMF method, the MRAS thrives on its simplicity. The method ispopular because of its simple structure and good dynamic performance while its still easy

16

Page 35: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

to implement [3], [20], [21], [22]. It is regarded as a good estimator for both speed andposition [12] and it requires low computational effort [23].

The most frequent criticism against MRAS is its sensitivity to motor parameter varia-tions [24], [25]. Since the models used mostly includes mathematical equations of the motorthe parameter accuracy is important. However, according to [10], this problem can be some-what reduced by using the motor itself as a reference model, see Figure 3.2. This makes theimplementation easier and the stability can be guaranteed. This strategy is also well adoptedin studies and applications.

Plant (PMSM)

Adjustable model

Adaptation mechanism

Input

Output

Estimated variable

Error

Figure 3.2: Illustration of the model reference adaptive system using the PMSM as referencemodel.

The by far most common approach is to use the electrical model of the PMSM in dq-frame,see Equation (2.12), as the adjustable model. As can be seen, the equations depend on therotor electrical speed. In the adjustable model, the rotor speed is replaced by the estimatedvalue of the rotor speed, ωel. The electrical motor equations estimate the stator currentswhich are then compared to the measured ones [20].

There are other solutions as well. In [26], the adjustable model is given by the PMSMelectrical equations in dq-frame together with a Luenberger observer. A somewhat differentapproach can be found in [9]. In the reference model, the measured currents and voltages ofthe motor are used to calculate the active power, P , according to

P = vdid + vqiq. (3.4)

The same equation is then also used in the adjustable model. The voltages are given bythe PMSM electrical equations supplied with the measured currents. The two values of actualpower is then used to estimate the rotor speed.

The choice of adaptation mechanism shows a little more diversity. The simplest and mostcommon method in applications is to tune the estimated speed value with a PI adaptive mech-anism [13], [24], [26]. This is basically a PI controller executing on a specific expression givenby the actual and estimated state variables. By using Popov’s hyper-stability theorem [27],

17

Page 36: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

this rule can be chosen such that the stability of the estimator is guaranteed. This is onereason why the PI adaptation mechanism is so popular [25].

As an attempt to improve the estimation performance, some other approaches for theadaptation mechanism can be found. In [9], an ANN is used as adaptation mechanism totune the speed estimation value. In the ANN, measured stator currents and voltages togetherwith the previous speed value and the active power estimation error goes through a networkof neurons that is capable of machine learning and pattern recognition. The network thenoutputs one single value, the estimated rotor speed, and feed it back to the adjustable model.The ANN based speed estimation is also compared to the PI and the particle swarm optimiza-tion (PSO) based PI estimation method. Results show that the ANN estimation performsbetter than its competitors.

Another type of adaptive mechanism is employed in [20] and is based on sugeno fuzzy in-ference system (FIS). The sugeno FIS uses the error and derivative error between the referencemodel and adjustable model to estimate the rotor speed.

In [12], a combination of sugeno FIS and a hybrid learning algorithm, named adaptiveneuro-fuzzy inference system (ANFIS), is used as the adaption mechanism. The mechanismuses the estimated currents from the adjustable model to estimate the rotor speed. The errorbetween measured and estimated current is then used to tune the estimation parameters.

As already mentioned, the MRAS estimation method uses relatively straight forward cal-culations which makes it simple and not so demanding for the processor. This will of coursedepend on the choice of adaptation mechanism. The MRAS should also give a good perfor-mance at all speed range.

A well known problem with this method is the sensitivity for parameter variations whichcould also affect the estimation performance, especially at low speed. One way to handle thisproblem is presented in [26] where the MRAS is used to estimate the rotor speed and thestator resistance simultaneously and adjust the resistance parameter on-line. The approachis simply to let the adaptation mechanism tune both speed and resistance in the adjustablemodel.

The same approach is taken in [23]. The stator resistance parameter in the adjustablemodel is seen as an estimated value which is tuned by the adaptation mechanism. Thestability of this estimator is here guaranteed by the Popov hyper-stability theorem.

As for the ability to tune for different motors, this also depends on the choice of adaptationmechanism. When using PI adaptation, the proportional and integral gain constants affectthe tracking performance of the estimation and will probably have to be re-tuned. Whenusing artificial intelligence adaptation, the estimator parameters are often decided by someoff-line training. If the motor is changed, this training will probably have to be done again.It is however often done automatically.

In summary, the MRAS estimation method seems like a good choice for a simple andgood performing rotor speed and position estimator. It also seems viable for the entire speedrange. Since the stability can be guaranteed when using the motor as reference model, whichis applicable in this case study, this method looks promising. A big advantage is also of courseif it is relatively easy to estimate the stator resistance and adjust it on-line, without sacrificingtoo much processing time, since this will most certainly improve the performance.

3.3 Extended Kalman Filter

The kalman filter is a state observer which estimates the states of a dynamic linear systembased on least-square optimization. The extended kalman filter (EKF) is an extension of thekalman filter that handles nonlinear systems [10]. The nonlinearity is handled by linearizing

18

Page 37: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

the system at each sample point. The keystone of the EKF is that it takes care of modelinaccuracies and measurement noise in a system by assuming them to be zero-mean whiteGaussian noise [25].

The EKF uses a nonlinear system of the form

x(t) = f(x(t), u(t)) + w(t)

y(t) = h(x(t)) + v(t)(3.5)

where x(t) is the state vector, u(t) is the input vector and y(t) is the output vector. Bothw(t) and v(t) are zero-mean white Gaussian noise. w(t) is related to model uncertainties andv(t) is related to measurement noise.

The estimation is then conducted in two steps: [28]

1. Prediction step. The state estimate is predicted based on previous state and new inputvalues. The state covariance matrix is also predicted using the linearized system.

2. Correction step. The EKF gain matrix is calculated using the linearized output of thesystem. The state estimate and state covariance matrix is then corrected based on thepredicted values and the EKF gain matrix.

Since EKF is a state observer, the rotor speed and position has to be added as statevariables in order to get estimated. Furthermore, the EKF has the option to be implemented inboth αβ-frame (state vector x = [iα iβ ωel θel]

T ) or dq-frame (state vector x = [id iq ωel θel]T ).

It is not clear, however, which frame is best. By implementing in αβ-frame, the EKF mightconverge to the wrong solution [29]. Some hardware implementation solutions for sine andcosine functions will also be required [25]. On the other hand, when implementing in dq-framethe measured currents need to be transformed using the estimated position from previoussample time. This will result in a constant position estimation error [29].

Since the EKF is based on least-square optimization, it finds the optimal values for thestate variables. This generally gives a very good estimation [25], [30]. Additionally, the EKFbehaves like a LPF, it efficiently reduces input noise. This includes both system noise andmeasurement noise [10], [25], [31]. The filtering is so efficient that in some cases, the estimatedcurrents are used as feedback in the FOC control, instead of the measured ones [28].

Other mentioned advantages with the EKF is robustness against parameter variations [10],[32], good performance against load interference [25] and that it does not need knowledgeabout mechanical parameter or initial position [33].

One acknowledged disadvantage with the EKF regarding applications on a PMSM is thehigh requirements on the processor. Since there are several matrix multiplications, the EKFis very computationally costly and time inefficient compared to other methods [10], [29], [30].This will make it hard to implement on an electrical drive if the processor used is not veryhigh performing.

The tuning of the EKF is done by choosing initial values for the state and noise covariancematrices. This is perhaps the most important part of the EKF design, especially the tuning ofthe noise covariance matrices [10], [32]. The tuning is also one of the most common criticismdirected towards the EKF. There is no obvious procedure to do the tuning. The most commonapproach is the tune it in a trial and error process [28], [33], [34]. Since there are a lot ofinitial values to set, this process is really hard and time consuming [25], [30].

There is however one attempt to establish a defined tuning process to cope with thisproblem [35]. By normalizing the system and the EKF algorithm, an effective initial guessof the covariance matrices can be found. It is claimed that if a coherent normalization ofboth the system and the EKF is accomplished, the found covariance matrices will fit almost

19

Page 38: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

all standard PMSM drives. The normalization is done by first defining a set of base values,then dividing each variable of interest by the respective base value. This approach has beenrecognized in [34] where it is combined with the simple genetic algorithm (SGA) to optimizethe covariance matrices on-line.

With good accuracy on estimating the rotor speed and position and the good robustnessagainst motor parameter variations, the EKF seems a profitable estimation method. Asnoticed in [25], the EKF can struggle at very low speeds since, at that point, the noise isalmost as large as the control signals.

No specific stator resistance estimation using the EKF has been found. It should howeverbe possible to add the stator resistance as a state variable and assume it constant during thesample period. This is similar as [28] has done to estimate the torque load. At the sametime, by increasing the amount of state variables, the tuning of the EKF will get heavier. Thetuning problem will also make it harder to apply the filter on other motors as well since thetuning has to be done for each motor.

With regard to the requirements put on the processor, the EKF seems unfavorable for thiscase study. The heavy calculation made by the EKF does not fit into the picture of using anefficient low-cost micro-controller. An attempt to improve in this aspect is a solution wherethe EKF gain matrix is calculated off-line [28]. This will however add the need of a secondparallel computing device which is not really applicable in this case.

3.4 Sliding Mode Observer

The idea of the SMO is to define a sliding mode equation, use the sliding mode equation todefine a so called sliding surface, which represents the real state variables, and let a high-frequency, discontinuous switching function force the state variables of the observer towardsthe sliding surface until sliding mode occurs [36]. SMO principle can be seen in Figure 3.3.

Sliding surface

Sliding modereached

Sliding modeequation

x

x

Figure 3.3: Illustration of the SMO principle. x is the estimated state variable and x is thereal (or measured) state variable.

As can be seen, with an infinite switching frequency in the sliding mode, the sliding surfaceis reached and the observed state variables equals the real ones. However, infinite frequency

20

Page 39: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

is not realistic and therefore there will always exist a high frequency switching component insteady state [36].

In the case of speed and position estimation of a PMSM, the SMO estimation methodbelongs to the back-EMF indirect estimation category [17]. The induced back-EMF is treatedas a disturbance and estimated when observing the stator currents. The currents are in thiscase observed using the SMO, rather than a Luenberger observer as described in Section 3.1.With the estimated values of the back-EMF the SMO utilizes the relationship given by Equa-tion (3.1), to calculate the rotor position.

The sliding mode equation is generally defined as the difference between observed valueand measured value of the stator currents, see Equation (3.6) [10], [14].

σ = iαβ − iαβ (3.6)

Here, iαβ = [iα iβ]T is the observed currents in αβ-frame and iαβ = [iα iβ]T is the measuredcurrents in αβ-frame. By defining the sliding surface to σ = 0 the observed currents willconverge to the real ones due to the switching function [37]. The estimated back-EMF valuesare then extracted from the equivalent control, which is a component of the observer functionin Equation (3.7) [38].

The design of the SMO is based on the electrical model of the PMSM in αβ-frame givenby Equation (2.9). The observer equation is obtained by replacing the back-EMF componentswith an observer function according to Equation (3.7).

d

dtiαβ = −Rs

Lsiαβ +

1

Ls(uαβ − ναβ(σ)) (3.7)

The observer function, ναβ(σ), is usually based on the discontinuous signum function whichgenerates the switching behavior.

The SMO estimation method is considered simple [13] and has good performance i relationto its non-complex implementation [21]. The main reason why the SMO is widely used isbecause of its robustness against parameter variations, disturbances and noise [12], [17], [30],[37], [39].

As mentioned above, the SMO will always cause high frequency noise in the system dy-namics since it is impossible to switch with an infinite frequency. This will also introduce aconstant error to the estimation [10]. This phenomenon is called the chattering effect and isa well known disadvantage with the SMO estimation approach [12], [13], [20], [39].

A common and simple approach to reduce the chattering problem is to filter out the highfrequency noise with a LPF. However, the LPF is known to introduce a phase delay in thedynamic response. Thus, there will always exist a chattering versus phase delay trade-off [30].

Another disadvantage with the SMO is that it aims to estimate the back-EMF inducedin the stator windings, similar to the back-EMF estimation method described in Section 3.1.In fact, the SMO is considered a back-EMF estimation method. This also means that theSMO shares some characteristics with the back-EMF method, particularly the unsatisfactoryperformance at low speed [17], [37].

According to [10], another, not as highlighted, problem to deal with is the trade-off betweenconvergence rate and estimation accuracy. If the observer is designed for an accurate speedestimation result, the convergence rate is hard to properly assure.

Since the design of the SMO is more or less straight forward, different implementationsreflect distinct attempts to improve particular aspects of the observer. One of the most criticalissues to improve is the chattering problem and most implementations differ in how to dealwith that specific problem.

21

Page 40: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

In [39], the discontinuous signum function is replaced by the continuous sigmoid function.The sigmoid function approximates the signum function in a small area near zero, making itcontinuous, and thereby avoids the requirement of a LPF. This method is considered suitablefor constant speed applications. Results show a clear improvement of the chattering problem.

Another similar solution is proposed by [38] who designs a controller for a PMSM on awashing machine. The signum function is here replaced with a saturation function insteadof a sigmoid function. A linear relationship is approximating the signum function in theneighborhood of zero. A LPF is also used before the back-EMF are extracted.

A different approach is to focus on the design of the LPF. In [40], the cut-off frequency ofthe LPF is made dependent on the speed of the PMSM. This will minimize the phase delayat different speeds.

Yet another solution could be to compensate for the phase delay on the filtered signal.In [30], a 10-order finite impulse response (FIR) filter is used to smooth the chattering. Theproposed filter introduces a phase delay which is linearly proportional to the operating speedof the PMSM. When always knowing the value of the phase delay, it is easily compensated.

An attempt to combine the two approaches is found in [37] where a speed controller ofa high-speed PMSM driving a dental hand-piece is designed. Since the controller should beimplemented in a fixed-point micro-controller, a sigmoid function solution was considered toocomplex. The sigmoid function involves exponential operations which is hard to implement.The signum function is however simple and effective to implement. To reduce the chatteringeffect, a speed adaptive LPF is used instead. The phase delay introduced by the LPF iscompensated in the final calculation of the estimated rotor position.

A totally different solution is found in [17]. Here, the sliding mode equation is defined asa PI controller working on the current estimation error. This is supposed to give the observerless steady state error at low speed and eliminate the need for a LPF.

Other approaches to reduce the chattering include using an iterative SMO [38] or to filterwith a kalman filter [19]. Both approaches are however very computational heavy.

A more difficult matter is to improve performance at low speed. By allowing the observergain to depend on the speed of the motor, this problem can be somewhat improved [17], [38].Alternatively, other estimation methods can be employed at the low-speed region [30]. To dealwith this problem at start-up, the most simple and common methods are to do an open-loopstart of the motor [17] or let the motor follow a predefined ramp input signal [37], [38]. Whenthe rotor speed has reached a certain value, the control is taken over to the SMO.

The requirements from SMO on the processor are not really high. As above suggests, itdepends somewhat on which approach that are used. If the sigmoid function, or some advancedfiltering technique, is used, the processor has to be quite powerful. Easier calculations likesignum function and first order LPFs are not as demanding for the processor.

The overall perception of the SMO estimation method is that it gives a good estimation.The advantage with having such known problems, as the chattering problem, is that it is wellexplored and many different solutions exists. The stability of the SMO can also be proven byusing the so called Lyapunov stability theorem [30], [37]. Since the method is based on theback-EMF, some kind of start-up sequence for the standstill and low speeds will most likelybe required.

According to many, the SMO is robust against parameter variations. Of course, the motorparameters are used in the electrical model of the PMSM and will definitely have an impact.It is however possible to tune the parameters in the model in a MRAS-fashion using a paralleladaption mechanism as in [41].

For the possibility to tune for different motors, as always, the motor parameter in theelectrical model has to be updated. Otherwise, the Lyapunov stability theorem derives a

22

Page 41: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

condition on the observer gain constant for the guaranteed stability. Such a condition shouldbe applicable for any motor of the same kind, i.e. with the same dynamic equations.

The SMO is another method that is promising because of its simplicity. Since it is a back-EMF method, it has the obvious problems of standstill and low speed estimation. However,the SMO seem to perform better than most other back-EMF methods and the fact that itis commonly used implies its viability. The SMO theory ensures a good estimation and thecommon problems are not too complex to fix.

3.5 Discussion

To evaluate which methods that seem most suitable for this case study, each performanceaspect will be discussed with regard to all methods. The performance aspects are describedin the beginning of this chapter. The discussion aims to select the one or two best suitedmethods as well as answering the research questions from Section 1.2. Table 3.1 presents asummary of the result for each method in relation to respective performance aspect.

Table 3.1: Summary of literature study results. Green means the estimation method per-forms good in relation to respective performance aspect, yellow means the method performssatisfactory and red means it performs bad.

Back-EMF MRAS EKF SMO

Requirements on processor Low Low High Low

Estimation accuracy Satisfactory Good Excellent Good

Sensitivity to parameter variations Bad Can be fixed Decent Decent

Resistance estimation No Yes Probably No

Ability to be re-tuned Decent Decent Bad Decent

Concerning computational efficiency, the estimation process should execute on the sameunit as the rest of the PMSM controller. This means that in one sampling period, boththe entire FOC and the estimation must have time to run. Whether it is possible or notdepends both on which processor is used and at what sampling frequency it operates in.A high sampling frequency will make it easier for the controller to perform good, with theassumption that all other operations fit in that time frame. Seeing that a high frequency alsorequires a more expensive processor it will also increase the cost of the end-product.

That said, a too computational heavy estimation method might be hard to implementon a low-cost microprocessor. Considering that one of the major drawbacks with the EKFis the computational load indicates that this method might not be suitable despite its goodestimation performance. The EKF requires several matrix multiplications and one matrixinverse calculation in one sample period.

In contrast, the other methods seem more convenient. All methods are using the electricalmotor model. Additionally, the back-EMF methods are mostly based on an observer and themost simple MRAS is using a PI-controller. All these calculations are fairly basic operationson a microprocessor and does not add significantly to the computational load.

To increase the performance, the method can in many cases be extended, making it more

23

Page 42: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

complex. The adaptive mechanism in the MRAS can for example be changed, or the filteringapproach in the SMO may be enhanced. In this event, the requirements on the processor willof course change and tests must be made to determine whether it is feasible or not.

Moving forward, the estimation performance of a method is another important aspect. Theestimation performance include how well the method estimates the real value (low estimationerror), how stable the estimation response is and how fast is converges. Small estimationerror is probably hard to avoid but they should be kept to an minimum for all speed ranges.With too big estimation errors, the FOC might have difficulty converging. Also to facilitatethe FOC the estimation should be as stable as possible and not have too much oscillations.Otherwise, the oscillations might propagate into the control system.

In this aspect, all the different methods look sufficiently good. The EKF appears togive the best estimation, which perhaps explains its computational requirements. The EKFproduces a noise-free and correct estimation at all speeds. The SMO, which is the betterof the different back-EMF estimation methods, and the MRAS also has a good estimationresults even though they have their individual drawbacks. The chattering effect of the SMOintroduces a lot of noise into the system but it can be filtered out. The SMO will howeveralways have a problem at low speed. The MRAS is supposed to perform good at all speeds butit is somewhat sensitive to motor parameter variations and this will probably be needed takingcare of. In some cases it is also noted that using a non-zero reference on the d-axis currentwill improve the estimation performance. This is discovered in both MRAS estimation [23]and back-EMF estimation [18].

The next performance aspect consider the sensitivity for parameter variation of the meth-ods. When the motor operates, the temperature in the motor will change, especially in lowspeed, modifying the circumstances of the electrical components. Particularly, the statorresistance Rs, will deviate a lot mainly because of the temperature variations [19]. An ap-proximation of the resistance variation is presented in Equation (4.6) in Section 4.3. Also,the permanent magnet flux, φr, may be reduced by over 20% as the temperature varies [30].

Depending on the application, this problem can be more or less urgent. Since this casestudy should manage to maintain a relatively high speed during varying load conditions,the operation temperature will probably be high. Considering the outdoor environment theapplication will operate in, the surrounding temperature will also have an impact on theoperating conditions.

Since all the estimation methods more or less uses the electrical model of the PMSM,parameter variations will affect their performances negatively if not treated correctly. Insome cases, the parameter deviation may not be a big problem. The EKF, for example,automatically takes care of model uncertainties, making it less impactful. There is no unitedopinion about whether the SMO is robust against parameter variations but it is said to bethe best of the back-EMF estimation methods. The MRAS is however recognized weak inthis aspect.

In such event, there are solutions that deals with this problem. A more advanced adaptivemechanism can be used in the MRAS estimator or the stator resistance can be estimated inaddition to the rotor speed and position. A resistance estimation will not only improve theestimation performance, it will also provide an option to estimate the motor temperature. Itwill however also increase the computational load. A resistance estimator should be possiblein all methods, in some cases by using an additional estimator.

The last aspect regards the ability to apply the control system on other similar motors.As mentioned, if the control system seems profitable, it might be of interest to implement itin other products as well. However, if this should be an option, the control system cannotrely too much on the conditions of one particular motor. That way the integration process

24

Page 43: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

for a new motor will be too hard.

The feasibility to change motor depends much on how the tuning process of each methodand how many parameters that have to be tuned. In the SMO a condition on the observergains can be derived which guarantees the observer stability. The same applies when usinga Luenberger observer to estimate the back-EMF. When using the PI-controller approachin the MRAS, a stability structure can also be derived. The only parameters to tune is thePI-gains. All these methods seem rather easy to integrate on another motor since the stabilityconditions applies on all motor with the same fundamental equations. By using different formsof these estimation methods will however change the circumstances.

In contrast, the EKF is known to be hard-tuned. Three matrices of the same dimensionas the system has to be tuned. These matrices represents the initial conditions of the system.Since there is no mature process to design these matrices, they have to be tuned manually; avery time-consuming activity.

To choose which methods that advances to simulations all aspects need to be considered.Firstly, even though the EKF is a good estimation, the computational requirements and thetuning problems makes it unprofitable for this case study. To apply the EKF, the processorneeds to be greatly updated.

The MRAS however looks really promising and will be further investigated. It is easilyimplemented and seems satisfactory in all aspects. The motor will be used as reference modelsince this supports the robustness of parameter variations. It will also make the implemen-tation easier and lowers the demands on the processor. The adjustable model will be theelectrical motor equations in dq-frame and the adaptation mechanism will be the standardPI-controller. This is because a PI-controller does not require too much from the processorand because the stability of such design can be guaranteed. This also makes it easier tointegrate the control structure in other products. Another advantage with the MRAS is theability to estimate the stator resistance without using a lot of extra calculations. The needfor a resistance estimator will be investigated in the simulations.

The SMO will also advance to simulations on more or less the same grounds as the MRAS.Similar to the MRAS, the SMO is easy to implement and has low requirements on the processor(somewhat dependent on the design). The stability of the SMO can also be guaranteed bysetting a condition on the observer gains. It also seems like the best back-EMF estimationmethod. The SMO will estimate the back-EMF in αβ-frame because they easily give the rotorposition. The best choice of switching function and filtering technique will be decided in thesimulations.

3.6 Summary

This chapter describes the literature study of this thesis. Different estimation methods arepresented and discussed to find the methods that are best suited for this case study. Onlymethods that are applicable for this case study are considered and these are: the MRASestimator, the EKF estimator and the SMO estimator which is on of the many back-EMFestimation methods.

To decide which methods that is best suited for this case study, a set of performanceaspects were defined. The aspects should represent favorable requirements and behaviorsof the estimators such as processor speed requirements, estimation accuracy and parametersensitivity. The methods are presented and discussed based on the performance aspects. Theyare then also compared with each other based on those aspects.

Results show that even though regular back-EMF methods are simple, they often notperform satisfactory with the exception of the SMO estimator. The SMO seemingly gives a

25

Page 44: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

good estimation but has a well known drawback of high frequency noise. There are howeverseveral ways to reduce this problem.

The EKF shows a really good estimation accuracy since it is based on least-square ap-proximation. It is however marginally computationally heavy compared to the other methods.Since this case study is characterized by low cost and low power consumption, the EKF seemsunfavorable.

The MRAS estimator is also a simple method which shows some clear advantages forthis particular case study. The MRAS also shows positive results in all performance aspects.Thus, the MRAS together with the SMO estimators will be further explored in simulations.

26

Page 45: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

Chapter 4

Simulation

To find the estimating method that is best suited for the case of this study, two methods fromthe literature study in Chapter 3 were modeled and simulated, the MRAS and the SMO.These methods are the ones that, according to the literature study, seemed most favorablefor this case study.

A simulation is a good and effective way to see the overall performance of a system.With an ideal model, the results from the simulation should mirror the results on the realhardware. The model used in this simulation is not ideal but should give a strong indicationof the estimator performances. The simulations are made in Simulink.

For each method connected to the PMSM, the simulation will go through a few test casesthat represents different operating situations of the application. The methods will then becompared based on these test cases and the results should reveal which method that is mostsuitable for this case study.

4.1 Simulink Model

The model of the PMSM was made in dq-frame using Equations (2.15)-(2.17). To simulatethe real application, the motor model takes voltage input in abc-coordinates and transformsthem into dq-coordinates. The current output is then transformed back into abc-coordinates.The FOC control scheme described in Section 2.2 was also modeled and connected to thePMSM model, see Figure 4.1.

u_a

u_b

u_c

speed

i_a

i_b

i_c

position

speed

Tem

PMSM electrical dq0

Tem

LoadmechSpeed

PMSM mechanical

PI(s)

PI(s)PI(s)[rotorSpeed]

[rotorPosition]

i_d

speed

i_q

u_d*

u_q*

Decoupling

[motorTorque]

dCurrent_ref

[dCurrent]

[rotorSpeed]

[qCurrent] [qCurrent][dCurrent]

load

speed_ref

dq0

wtabc

[rotorPosition]

0

abc

wtdq0

Figure 4.1: Simulink model of PMSM and FOC.

27

Page 46: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

In Figure 4.1, the rotor position (signal called ”rotorPosition”) is used for the coordinatetransformations while the rotor speed (signal called ”rotorSpeed”) is used as feedback for thespeed controller. The block called ”Decoupling” is the feed forward of the FOC to compensatefor the back-EMF induced by the rotor, as explained in Section 2.2. When controlling thePMSM sensorless, the position and speed signals are not coming from the motor itself, as theydo in the figure. Instead, there will be an additional block, the speed and position estimator,that supplies the speed and position to the controller.

To prove the correctness of the model a second model was implemented mathematically inMATLAB and solved numerically with the same solver as used in Simulink. The MATLABmodel is based on the motor parameters given by the case study and will basically correspondto the behavior of the real motor. The outputs from the different models (i.e. dq-currentsand mechanical speed) was compared and the difference is shown in Figure 4.2. The error issufficiently small. The Matlab .m-script can be seen in Appendix A.

0 0.5 1 1.5 2 2.5 3-0.1

-0.050

0.050.1

Cur

rent

[A]

d-current error

0 0.5 1 1.5 2 2.5 3-0.1

-0.050

0.050.1

Cur

rent

[A]

q-current error

0 0.5 1 1.5 2 2.5 3Time [s]

-0.1-0.05

00.050.1

Spe

ed [r

ad/s

]

rotor mechanical speed error

Figure 4.2: Error between mathematical model and Simulink model of PMSM and FOC.

4.2 Field-Oriented Control Design

To get a good system response, both current controllers and the speed controller in the FOCcontrol scheme has to be tuned correctly. The tuning process used is well adopted in industryand is given by [42].

The basic FOC has three PI-controller and hence 6 different controller gains that has tobe tuned. The purpose of this tuning process is to decrease the number of parameters thathas to be tuned to two: δ and τ .

Firstly, by using the series PI topology for the current controllers the proportional andintegral gains are given by the constant values in Equations (4.1) and (4.2) respectively.

currKFOCp = Ls ·BWc (4.1)

currKFOCi =

RsLs

(4.2)

BWc is the bandwidth of the current controller. The same values are used for both currentcontrollers.

28

Page 47: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

The speed controller is dependent on the tuning parameters δ and τ . δ is supposed torepresent how fast the system is and τ reflects the system damping. The proportional andintegral gains of the speed controller are given by Equations (4.3) and (4.4) respectively.

spdKFOCp =

1

δKτ(4.3)

spdKFOCi =

1

δ2τ(4.4)

In Equation (4.3), K is a combination of the motor and load parameters and is given by

K =3pφr4J

. (4.5)

To tune the FOC the parameters δ and τ are chosen such that the system response issatisfactory. This approach makes the tuning process easier since the parameter values canbe chosen somewhat more intuitive.

Test case 1 from Section 4.3 was used to manually tune δ and τ since this reflects the basicoperation of the motor. The result can be seen in Figure 4.3.

0 0.5 1 1.5 2 2.5 3Time [s]

-1000

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Mec

hani

cal s

peed

[rpm

]

Speed response of FOC.

Reference speed

Actual speed

Figure 4.3: Speed response of the tuned FOC.

As can be seen, the step up to reference speed gives a small overshoot of 2.9% and itconverges relatively quickly. When the load is applied, the speed deviates with at most 450rpm.

4.3 Test Cases

The test cases are derived together with supervisors and are supposed to demonstrate theoverall performance of the estimation method as well as represent real potential scenariosthat could occur in a real application of the motor. To decide the performance of the differentmethods, the estimated speed and position values are compared to the real ones. The differ-ence in real and estimated values should be as low as possible. Performance is also decidedby how stable the system is, at what sample frequency it is stable and how well it can keepup with the reference speed. The test cases are described below:

29

Page 48: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

1. Step load. Step up to reference speed. When steady, add a step load of 1 Nm forone second, then remove it. The load will be applied after 1.5 seconds. This is astandard operation of the motor which should show the basic performance of the controlsystem. This test case will also be used for manual tuning of the control and estimationparameters. Focus is to get a fast and steady response when the load is applied sincethe start-up dynamics easily can be modifies in an implementation, see Test case 5.

2. Periodic load. Step up to reference speed. When steady, add a periodic load (sinus) withan amplitude of 0.2 Nm for one second, then remove it. The load will be applied after1.5 seconds. This test case shows how the control system behaves during a non-constantload.

3. Step load in transient state. Step up to reference speed. Add a step load of 1 Nm beforesteady state is reached. The load will be applied when the speed has reached 4000 rpm.This test case shows how the control system behaves when disturbed in transient state.

4. Start load. Add a load from the start and step up to reference speed. Note the highestpossible load. The load will be restricted by the motor current until a certain point,which represents the highest possible load. This test case shows how the control systemresponds when the load is applied from the beginning and determines the maximumstart load as a percentage of the maximum motor load.

5. Acceleration limit. Add a limitation in acceleration of the system and step up to refer-ence speed. The acceleration limit is 30000 rpm/s. The test case shows how the controlsystem performs when limited in acceleration at start-up which is one way to make thestart-up more controlled.

6. Resistance variation. Step up to reference speed. After 1.5 s, change the value of thestator resistance in the motor model. This is to check the vulnerability of the estimatorfor resistance variations. A simple approximation of the resistance variation at theincrease of temperature can be obtained through

∆R

R0= ζ∆T (4.6)

where ∆R is the increase of resistance, R0 is the initial resistance value, ζ is the tem-perature coefficient of the resistance material and ∆T is the increase of temperature.This indicates a maximum increase of stator resistance with 55% for this case study. Tobe safe, the value of the stator resistance will in this test case be increased with 100%.

7. Low speed response. Step up to reference speed and step down to a low speed. Notethe lowest possible speed that the control manages. This shows how well the controlsystem performs in the low speed range. To sufficiently evaluate the performance, thesystem should also be loaded. This test case is thus combined with test case 4.

4.4 MRAS Estimation Model

As described in Section 3.2, the principle of MRAS is to have two models calculating thesame state variable and use the difference of these outputs to estimate the desired variable.In the case of estimating rotor speed and position of the PMSM, the usual approach is tolet the motor act as reference model to increase robustness against parameter uncertainties.

30

Page 49: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

The measured motor currents are then compared with the currents given from the adjustablemodel; the adjustable model consists of the electrical motor equation supplied with the samevoltage values as the real motor. The electrical equations also includes the rotor speed value.Given the different values for the current, the adaptation mechanism modifies the speed valuein the adjustable model to minimize the current estimation error. This is also the approachthat will be adopted in this thesis.

4.4.1 Model Design

The adjustable model will be the PMSM electrical equations in the dq-frame from Equa-tion (2.15) using estimated values for the currents and the rotor electrical speed. The ad-justable model is given in Equation (4.7).

˙x = Ax+ Bu

y = Cx(4.7)

with

A =

[−RsLs

ωel−ωel −Rs

Ls

]; Bu =

[ 1Lsvd

1Ls

(vq − φrωel)

].

The state vector x = [id iq]T consists of the estimated currents and ωel is the estimated speed.

The adaptive mechanism will be the commonly used PI-controller. This is because it issimple to implement while still performing good. Also because the stability of the estimatorcan be assured.

Given the measured state vector x = [id iq]T , the generalized error ε = x − x can be

introduced. By analyzing the generalized error together with the Popov hyper-stability theo-rem [27], the transfer function of the adaptive PI-mechanism can be derived as [23], [43]

ωel =

(KMRASp +

KMRASi

s

)[(iq − iq)(id +

φrLs

)− (id − id)iq]

+ ωel(0). (4.8)

To be sure about the system stability, the controller gains KMRASp and KMRAS

i should bechosen such that the system satisfies the Popov integral inequality [44]. The Popov hyper-stability theorem is described in detail in Appendix B. Given the speed, the rotor position isacquired by integration

θel =

∫ωel dt. (4.9)

The MRAS Simulink model is shown in Figure 4.4.

31

Page 50: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

1speed_out

1dVoltage_in

2qVoltage_in

3dCurrent_in

4qCurrent_in

u_d

u_q

speed

i_d*

i_q*

Adjustable model:PMSM model

fe/L_q

K_i

K_p

1s

1s 2

position_out

speed_estimate

Figure 4.4: The Simulink model of MRAS estimator.

To the left in Figure 4.4 is the adjustable model of the MRAS. It uses the applied statorvoltages in dq-frame together with a speed estimate to produce estimates of the currents indq-frame. The adaptation mechanism, to the right in the figure, is then using the estimatedcurrents together with the measured currents to tune the speed estimate. The speed esti-mate signal, called ”speed estimate,” is fed back to the adjustable model and outputted asthe estimated speed value. The speed estimate signal is also integrated to get a positionestimation.

4.4.2 Simulink Model with Variable Time Step Simulation

Extending the model from Figure 4.1 with the MRAS estimation model presented in Subsec-tion 4.4.1 gives the complete simulation model for sensorless FOC using MRAS estimation.The result can be seen in Figure 4.5.

u_a

u_b

u_c

speed

i_a

i_b

i_c

position

speed

Tem

PMSM electrical dq0

Tem

LoadmechSpeed

PMSM mechanical

PI(s)

PI(s)PI(s)[rotorSpeed]

[rotorPosition]

i_d

speed

i_q

u_d*

u_q*

Decoupling

[motorTorque]

dCurrent_ref

[dCurrent]

[MRAS_speed]

[qCurrent][qCurrent][dCurrent]

load

speed_ref

dq0

wtabc

[MRAS_position]

0

abc

wtdq0

u_d

u_q

i_d

i_q

speed_out

position_out

MRAS estimator

[dVoltage][qVoltage]

[qCurrent][dCurrent]

[MRAS_speed]

[MRAS_position]

[dVoltage]

[MRAS_position]

[qVoltage]

Figure 4.5: Simulink model of PMSM and FOC extended with a MRAS estimation.

The FOC control uses the rotor position and speed signals generated from the MRASalgorithm, instead of the signals given directly from the motor. Thus, the motor now oper-ates completely sensorless. The speed estimate, called ”MRAS speed,” is used as the speedfeedback signal while the position estimate, called ”MRAS position,” is used for the vectortransformations.

Test case 1 was used to manually tune the FOC parameters, δ and τ , as well as the

32

Page 51: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

estimator gains, KMRASp and KMRAS

i , and shows the basic performance of the control. Thetuned parameters are then kept throughout all test cases.

Test cases 1, 2, and 6 are simulating different load cases when the system is in steadystate. In all these test cases, the changes that defines each case take place at time 1.5 s. Fora description of the test cases, refer to Section 4.3. The speed response for these three casesare presented in Figure 4.6.

0 0.5 1 1.5 2 2.5 3Time [s]

-1000

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Mec

hani

cal s

peed

[rpm

]

Speed response. Test cases 1, 2 and 6.

Reference speed

Test case 1

Test case 2

Test case 6

Figure 4.6: Speed response for the MRAS control running test cases 1, 2, and 6.

Test cases 1 and 2 shows a clear disturbance in the steady state. The system is howeverkept stable and the actual speed value is close the to reference speed value, it differs withat most 6% for case 1 and 2.3% for case 2. For both cases, the actual speed value is goingtowards the speed reference. Test case 6 shows no visible difference. Figure 4.7 presents thedifference between the real and the estimated value, i.e. the estimation error, of rotor speedand position respectively when running test cases 1, 2, and 6.

0 0.5 1 1.5 2 2.5 3-8

-6

-4

-2

0

2

4

6

Ele

ctric

al s

peed

!el

[rad

/s]

Speed estimation error. Test cases 1, 2 and 6.

Test case 1Test case 2Test case 6

0 0.5 1 1.5 2 2.5 3Time [s]

-5

0

5

10

15

Ele

ctric

al p

ositi

on 3

el [r

ad]

#10-4Position estimation error. Test cases 1, 2 and 6.

Test case 1Test case 2Test case 6

Figure 4.7: Estimation errors for the MRAS control running test cases 1, 2, and 6.

Figure 4.7 shows that the speed estimation error is close to zero most of the time. Some

33

Page 52: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

small disturbances for all cases can be visible. What distinguishes itself is that the error fortest case 6 is rather large, 6.5 rad/s at time 1.5 s. This is at the same time that the resistancevalue of the model is changed. The error is eliminated quickly.

The same behavior can be seen in the position estimation error from Figure 4.7. At 1.5 s,test case 6 differs from the steady value with an estimation error of at most 0.001 rad. Thiserror also converges quickly. For test cases 1 and 2 the largest estimation error is 0.0008 radand for all test cases the position estimation error slowly converges to zero.

Moving on, test cases 3, 4 and 5 should illustrate how well the system handles differentdisturbances that are applied before steady state is reached. The speed response for testcases 3, 4 and 5 are shown in Figure 4.8.

0 0.5 1 1.5Time [s]

-1000

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Mec

hani

cal s

peed

[rpm

]

Speed response. Test cases 3, 4 and 5.

Reference speed

Test case 3

Test case 4

Test case 5

Figure 4.8: Speed response for the MRAS control running test cases 3, 4, and 5.

As can be seen, the system is stable and performs rather good for all cases. In test case 4,80% of the maximum load is added at the start which gives an overshoot of 10%. Simulationshave shown that adding a larger load will increase the overshoot, but will not make the systemunstable. The other test cases shows a stable and smooth response.

The speed estimation error is also close to zero at all times for all test cases. Figure 4.9shows that test cases 3 and 4 have some minor disturbances in the error response in transientstate of at most 3 rad/s, except for test case 4 which have a spike at −20 rad/s. The errorfor test case 4 is a little noisy during steady state as well. Any noise is however not shown inthe position estimation error. All three cases have a maximum position estimation error ofabout 0.0008 rad and are converging to zero.

34

Page 53: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

0 0.5 1 1.5-3

-2

-1

0

1

2

3

Ele

ctric

al s

peed

!el

[rad

/s]

Speed estimation error. Test cases 3, 4 and 5.

Test case 3Test case 4Test case 5

0 0.5 1 1.5Time [s]

0

2

4

6

8

10

Ele

ctric

al p

ositi

on 3

el [r

ad]

#10-4Position estimation error. Test cases 3, 4 and 5.

Test case 3Test case 4Test case 5

Figure 4.9: Estimation errors for the MRAS control running test cases 3, 4, and 5.

As for test case 7, the minimum speed should be decided. Since test case 7 is a combinationof test case 4 and a step down signal, it will have the same response in the first step commandas test case 4 in Figure 4.8. The speed response for test case 7 is presented in Figure 4.10where a step down to 30 rpm is commanded at 1.5 s. The system shows a good response withan overshoot of only 0.6%. When the second step up is commanded however, the system givesa greater overshoot than before of 14.7%.

0 0.5 1 1.5 2 2.5 3Time [s]

-1000

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Mec

hani

cal s

peed

[rpm

]

Speed response. Test case 7.

Reference speed

Actual speed

Figure 4.10: Speed response for the MRAS control running test case 7.

Figure 4.11 shows a clear speed estimation error for test case 7 of at most 1.2 rad/s afterthe step down command. The error response shows an oscillatory behavior which, by thelooks of it, slowly converges to zero. When the second step up is commanded, the speedestimation error spikes at 5.2 rad/s and quickly converges to zero.

The position estimation error also takes a hit from the step down command, as seen inFigure 4.11. The difference is at most 0.32 rad and is also shown to converge to zero.

35

Page 54: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

0 0.5 1 1.5 2 2.5 3-4

-2

0

2

4

6

Ele

ctric

al s

peed

!el

[rad

/s]

Speed estimation error. Test case 7.

Test case 7

0 0.5 1 1.5 2 2.5 3Time [s]

-0.4

-0.3

-0.2

-0.1

0

0.1

Ele

ctric

al p

ositi

on 3

el [r

ad]

Position estimation error. Test case 7.

Test case 7

Figure 4.11: Estimation error for the MRAS control running test case 7.

4.4.3 Simulink Model with Fixed Step Size

To get a closer look on how the MRAS control would perform in a real implementation, it ismodeled in discrete form in Simulink. The entire controller, FOC and MRAS, is now workingas a reference model in the original motor model from Figure 4.1.

This means that the motor model still executes in continuous time and the controller deliv-ers a voltage control signal at a specific rate. The motor of this case study has a stator currentfrequency of about 1 kHz at reference speed. A rule of thumb is to have a sampling frequencyof 5-40 times the current frequency to get a feasible approximation of the currents [45]. Thatsaid, the MRAS estimator and the FOC will execute, and provide the motor with voltagecommands, at a rate of 15 kHz. This is also the sampling frequency used for the presentcontroller at Husqvarna. The model of the discrete MRAS controller is shown in Figure 4.12.

The ”MRAS estimator”-block contains the same model as shown in Figure 4.4 but withdiscrete integrators. At each sample, the controller receives the measured stator currents inabc-frame and transforms them into dq-coordinates using the previous position estimationwhich is compensated according to

θ compel = θel + Tsωel. (4.10)

Ts is the length of the sample period. The position compensation approximates the distancethe rotor has traveled during the last sample period to get a more accurate position value forthe new transformations. In Figure 4.12, the ”Memory”-block causes one sample delay of thesignal.

36

Page 55: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

abc

wtdq0

1abcCurrent_in PI(z)

i_d

speed

i_q

u_d*

u_q*

Decoupling

dCurrent_ref

dq0

wtabc

0

[dCurrent]

[qCurrent]1

abcVoltage_out

dVoltage_in

qVoltage_in

dCurrent_in

qCurrent_in

speed_out

position_out

MRAS estimator

speed_ref PI(z)

PI(z)

[dCurrent]

[qCurrent]

Ts Ts*0.5

Figure 4.12: Simulink model of the discrete MRAS-based FOC.

The transformed currents are then used in the MRAS as well as given to the currentcontrollers in the FOC. The voltage signals for the MRAS are taken directly from the FOCoutput of previous sample period. There is no need for a ”Memory”-block here since theexecution order of the simulation blocks is chosen so that the old voltage values are used.The voltage output from the FOC are then transformed into abc-coordinates using the newposition estimation compensated according to

θ compel = θel +Ts2ωel. (4.11)

Since the new voltage command should be valid for an entire sample period, it is transformedwith a position value approximated to be in the middle of that sample period. Figure 4.13shows how the MRAS-controller is connected to the motor.

u_a

u_b

u_c

speed

i_a

i_b

i_c

speed

position

Tem

PMSM electrical dq0

Tem

LoadmechSpeed

PMSM mechanical

[rotorSpeed]

[rotorPosition]

[motorTorque]

MRAS_controller

abcCurrent_in abcVoltage_out

Reference model

load

Figure 4.13: Simulink model of the PMSM extended with a discrete MRAS-based FOC.

The discrete MRAS control goes through all the test cases from Section 4.3 and the sametuning on the FOC parameters is used. Test case 1 is however used to slightly tweak theestimator gains KMRAS

p and KMRASi . The speed responses for test cases 1, 2, and 6 are

shown in Figure 4.14.

37

Page 56: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

0 0.5 1 1.5 2 2.5 3Time [s]

-1000

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Mec

hani

cal s

peed

[rpm

]

Speed response. Test cases 1, 2 and 6.

Reference speed

Test case 1

Test case 2

Test case 6

Figure 4.14: Speed response for the discrete MRAS control running test cases 1, 2, and 6.

The result is similar to the continuous response. Disturbances from the loads in test cases 1and 2 are obvious. The controller does however keep the rotor speed close to the referencespeed which deviates with at most 5.8%. The estimation error in Figure 4.15 reveals the lesserperformance of a discrete controller.

0 0.5 1 1.5 2 2.5 3-60

-40

-20

0

20

40

60

Ele

ctric

al s

peed

!el

[rad

/s]

Speed estimation error. Test cases 1, 2 and 6.

Test case 1Test case 2Test case 6

0 0.5 1 1.5 2 2.5 3Time [s]

-0.05

0

0.05

0.1

Ele

ctric

al p

ositi

on 3

el [r

ad]

Position estimation error. Test cases 1, 2 and 6.

Test case 1Test case 2Test case 6

Figure 4.15: Estimation errors for the discrete MRAS control running test cases 1, 2, and 6.

In the speed step, the speed estimation error looks rather oscillatory during transient state.The error goes up to 39 rad/s. Despite that, the error seems to converge to zero in steadystate. Looking closer however, the speed estimation error will actually converge to a smallconstant error of 0.01 rad/s. When the loads are applied the speed estimation takes a hit butconverges quickly to the same value.

The position estimation suggests a similar behavior. In the start, the position estimationhas an error of −0.075 rad. This error then returns to zero when reference speed is reached.Looking closer here as well the position estimation error lands on a constant value of 0.0005rad. The resistance change in test case 6 increases the error further to 0.0016 rad.

38

Page 57: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

Moving on, the speed responses for test cases 3, 4, and 5 are presented in Figure 4.16.

0 0.5 1 1.5Time [s]

-1000

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Mec

hani

cal s

peed

[rpm

]

Speed response. Test cases 3, 4 and 5.

Reference speed

Test case 3

Test case 4

Test case 5

Figure 4.16: Speed response for the discrete MRAS control running test cases 3, 4, and 5.

This speed response also looks similar to the continuous case. In test case 4, 80% of themaximum load is applied in the start and this gives the same overshoot as the continuouscontroller, 10%. In the other test cases, the speed accelerates smoothly up to reference speed.The estimation errors are presented in Figure 4.17.

0 0.5 1 1.5-30

-20

-10

0

10

20

30

40

Ele

ctric

al s

peed

!el

[rad

/s]

Speed estimation error. Test cases 3, 4 and 5.

Test case 3Test case 4Test case 5

0 0.5 1 1.5Time [s]

-0.02

0

0.02

0.04

0.06

0.08

Ele

ctric

al p

ositi

on 3

el [r

ad]

Position estimation error. Test cases 3, 4 and 5.

Test case 3Test case 4Test case 5

Figure 4.17: Estimation errors for the discrete MRAS control running test cases 3, 4, and 5.

The speed estimation error for test case 5 is close to zero at all times. Test case 4 alsoshows a good estimation result with some error spikes of at most 21 rad/s. Test case 3 has alot of oscillations in transient state with an amplitude of at most 38 rad/s. It does howeverrecover quickly in steady state. All test cases shows the same small constant error convergenceas in Figure 4.15.

The position estimation error is also comparable with Figure 4.15. For all test cases thereseem to be a more or less constant estimation error during transient state which goes down

39

Page 58: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

to zero when reference speed is reached. The error also appears to be smaller when theacceleration of the motor is lower. Test case 3 shows the greatest error of 0.07 rad, test case 4has 0.012 rad and test case 5 is around 0.005 rad. This test group also shows that the smallconstant position estimation error in steady state depends somewhat on the motor load. Theerrors are 0.00052 rad, 0.00065 rad and 0.00074 rad for test cases 5, 3 and 4 respectively.

The performance at low speed in presented in Figure 4.18.

0 0.5 1 1.5 2 2.5 3Time [s]

-1000

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Mec

hani

cal s

peed

[rpm

]

Speed response. Test case 7.

Reference speed

Actual speed

Figure 4.18: Speed response for the discrete MRAS control running test case 7.

At 1.5 s, the reference speed steps down to 100 rpm. The speed response only shows a tinyovershoot of 0.9%. Decreasing the speed further results in an unstable system. The secondstep up gives an overshoot of 11.7%. The estimation errors are presented in Figure 4.19.

0 0.5 1 1.5 2 2.5 3-1500

-1000

-500

0

500

1000

Ele

ctric

al s

peed

!el

[rad

/s]

Speed estimation error. Test case 7.

Test case 7

0 0.5 1 1.5 2 2.5 3Time [s]

-0.3

-0.2

-0.1

0

0.1

0.2

Ele

ctric

al p

ositi

on 3

el [r

ad]

Position estimation error. Test case 7.

Test case 7

Figure 4.19: Estimation error for the discrete MRAS control running test case 7.

When the step down is commanded, the speed estimation error deviates momentarily with1100 rad/s. At the same time the position estimation looses its track but slowly gets back tothe right value in steady state. The second step up shows a smaller disturbance.

40

Page 59: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

4.5 SMO Estimation Model

The principle of SMO is to let a high frequency switching function drive the estimated statevariables to the actual ones. The state variables are in this case the stator currents in αβ-frame. Estimate values of the back-EMF components in αβ-frame are extracted from the SMOand used to estimate the rotor speed and position. For a closer description and backgroundstudy of the SMO, see Section 3.4.

4.5.1 Model Design

As a start, the sliding mode equation is defined as in Equation (3.6) and the sliding surfaceis set to σ = 0. Along the sliding surface, the estimated stator currents will thus equal themeasured ones, as mentioned in Section 3.4. So when the control enters sliding mode, therewill be a correct estimation of the currents.

The SMO is given by Equation (3.7) and the observer function is defined as

ναβ(σ) = −lSMOZeq −Z (4.12)

where lSMO is the feedback gain constant of the equivalent control Zeq. The control function,Z, defines the discontinuous behavior that forces the control signal into sliding mode. Theequivalent control function is only the control function filtered through a LPF with timeconstant τc. Z and Zeq are given by Equations (4.13) and (4.14) respectively.

Z = −kSMOsat(σ) = −kSMO

[sat(iα − iα)

sat(iβ − iβ)

](4.13)

Zeq = Z1

sτc + 1(4.14)

The switching gain, kSMO, is a positive constant. Since continuous-time simulations inSimulink struggles with discontinuous functions, such as the signum function, a saturationfunction according to Equation 4.15 defines the switching behavior of the SMO. This makesthe control continuous and thus also reduces the chattering effect.

sat(x) =

1, x ≥ 1

x, −1 < x < 1

−1, x ≤ −1

(4.15)

To ensure stability of the SMO, i.e. be sure the control enters sliding mode, the Lyapunovstability theorem can be used [37]. The Lyapunov stability theorem sets a condition on thedynamic sliding mode equation that guarantees its stability. Using Equations (2.9), (3.7)and (4.12), the dynamic sliding mode equation can be obtained as

σ = −RsLsσ +

1

Ls(eαβ + lSMOZeq +Z). (4.16)

The stability condition is given by [36], [38]

σT σ < 0 (4.17)

and puts the constraints on the two gain parameters, lSMO and kSMO, to

kSMO(1 + lSMO) >|eαβ |max . (4.18)

41

Page 60: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

This means that kSMO and lSMO has to be chosen to ensure that kSMO(1 + lSMO) is largerthan the maximum peak of the back-EMF. At reference speed, the back-EMF peak is around15 V so preferably kSMO(1 + lSMO) should be a few times larger than 15. Finally, the back-EMF estimation is calculated according to

eαβ = −(1 + lSMO)Zeq. (4.19)

Given the estimated back-EMF values and rotor position, the speed needs to be acquired.There are many different ways to estimate the speed but the two most common ways are givenby Equations (4.20) and (4.21).

ωel =d

dtθel (4.20)

|ωel |=

√e2α + e2β1.5φ2r

(4.21)

It is clear that one way to obtain the speed is to simply differentiate the estimated position asin Equation (4.20). However, differentiation is not always the best solution. Especially in adiscrete implementation it will introduce a lot of noise in the system [30], [36]. Also, it is notstraightforward how to differentiate the output signal of a tangent-function. The other way tocalculate the rotor speed comes directly from the back-EMF equations (2.10) and (2.11). It isa more simple calculation but it depends on the correctness of the flux parameter, φr, whichcan vary during operation [30]. For this simulation the second equation is used to estimaterotor speed.

The Simulink model of the SMO used in simulation is presented in Figure 4.20.

u_alpha

u_beta

Zeq

Z

i_alpha*

i_beta*

SMO

1u_alpha

2u_beta

3i_alpha

4i_beta

2position_out

-k

atan

1den(s)LPF

1den(s) LPF

pi/2*((abs(u(1))-u(1))/abs(u(1)) + 1)

position compensation

u(1)/u(2) -1

1speed_out

l

-(1+l)sqrt((u(1)^2+u(2)^2)/(fe^2))

speed calculation

-(1+l)-k

Figure 4.20: Simulink of the SMO.

The block called ”SMO” is the model given by Equation 3.7. It uses the stator voltagesin αβ-frame as well as the control signals Z and Zeq to calculate an estimate of the statorcurrents. The estimated currents are then compared to the measured ones and used to cal-culate the new control signals through the switching functionality. The back-EMF values arethen used to calculate the rotor position.

Since the image of the function tan−1(x) is −π2 ≤ x ≤

π2 , the value has to be compensated

to include the range 0 ≤ x ≤ 2π. This is the purpose of the function called ”position compen-sation.” The function ”speed calculation” calculates the speed according to Equation 4.21.

42

Page 61: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

4.5.2 Simulink Model with Variable Step Size

The model from Figure 4.1 is now extended with the SMO model designed in subsection 4.5.1.The rotor speed and position is thus given by the SMO estimator, see Figure 4.21.

u_a

u_b

u_c

speed

i_a

i_b

i_c

position

speed

Tem

PMSM electrical dq0

Tem

LoadmechSpeed

PMSM mechanical

PI(s)

PI(s)PI(s)[rotorSpeed]

[rotorPosition]

i_d

speed

i_q

u_d*

u_q*

Decoupling

[motorTorque]

dCurrent_ref

[dCurrent]

[SMO_speed]

[qCurrent][qCurrent][dCurrent]

load

speed_ref

dq0

wtabc

[SMO_position]

0

[SMO_speed]

[SMO_position]

[abcCurrent]

[abcCurrent]

u_alpha

u_beta

i_alpha

i_beta

speed_out

position_out

SMO estimator[abcVoltage] abc

αβ0

abc

wtdq0

[SMO_position][abcVoltage]

abcαβ0

Figure 4.21: Simulink model of PMSM and FOC extended with a SMO estimator.

The stator voltages and currents are transformed into αβ-coordinates before given to theSMO estimator. The speed estimation, called ”SMO speed,” is used as feedback in the FOCand the position estimation, called ”SMO position,” is used in the coordinate transformations.

As already said, test case 1 is used mainly to tune the estimator gains and to give aoverview of the basic performance of the control. In this case, it is the estimator gains lSMO

and kSMO that has to be tuned. The same parameter values are then kept for all test cases.

Figure 4.22 shows the speed response for the SMO control running test cases 1, 2 and 6.

0 0.5 1 1.5 2 2.5 3Time [s]

-1000

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Mec

hani

cal s

peed

[rpm

]

Speed response. Test cases 1, 2 and 6.

Reference speed

Test case 1

Test case 2

Test case 6

Figure 4.22: Speed response for the SMO control running test cases 1, 2 and 6.

The system behaves similar to the MRAS control for all test cases. At most, the speeddiffers from the reference speed with 5.9% which is right after the load is applied in test case 1.

43

Page 62: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

Looking closer at the estimation errors some imperfections are discovered, see Figure 4.23.

0 0.5 1 1.5 2 2.5 3-6

-4

-2

0

2

4

6

8E

lect

rical

spe

ed !

el [r

ad/s

]Speed estimation error. Test cases 1, 2 and 6.

Test case 1Test case 2Test case 6

0 0.5 1 1.5 2 2.5 3Time [s]

-0.01

0

0.01

0.02

0.03

Ele

ctric

al p

ositi

on 3

el [r

ad]

Position estimation error. Test cases 1, 2 and 6.

Test case 1Test case 2Test case 6

Figure 4.23: Estimation errors for the SMO control running test cases 1, 2 and 6.

For all test cases, the speed estimation error shows a noisy response in transient state.There is also a spike of 5 rad/s that occurs at the time the motor speed reaches the referencespeed. The error is however quickly converging in steady state to a value of 2 rad/s whichmeans there is a constant estimation error. Test cases 1 and 2 show small disturbances whenthe load is on, but are kept around the same value. Test case 6 changes value when theresistance change is applied, now it converges to an error of −4.5 rad/s.

The position estimation error shown in Figure 4.23 reveals a constant estimation error aswell. The position estimation gets an error in the start which does not go back towards zero.The position estimation error converges to a value of 0.025 rad with small disturbances fromthe load.

Figure 4.24 presents the speed response for test cases 3, 4 and 5.

0 0.5 1 1.5Time [s]

-1000

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Mec

hani

cal s

peed

[rpm

]

Speed response. Test cases 3, 4 and 5.

Reference speed

Test case 3

Test case 4

Test case 5

Figure 4.24: Speed response for the SMO control running test cases 3, 4 and 5.

44

Page 63: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

All test cases have a good response. Test case 4 applies a load that is 80% of the maximummotor load at the start and shows an overshoot of 9.4%. Figure 4.25 present the speed andposition estimation errors.

0 0.5 1 1.5

0

2

4

6

8

Ele

ctric

al s

peed

!el

[rad

/s]

Speed estimation error. Test cases 3, 4 and 5.

Test case 3Test case 4Test case 5

0 0.5 1 1.5Time [s]

-0.01

0

0.01

0.02

0.03

0.04

0.05

Ele

ctric

al p

ositi

on 3

el [r

ad]

Position estimation error. Test cases 3, 4 and 5.

Test case 3Test case 4Test case 5

Figure 4.25: Estimation errors for the SMO control running test cases 3, 4 and 5.

Similar as in Figure 4.23 the speed error is noisy in transient state. Test case 5 showsan improvement in that regard. All test cases are converging in steady state to a value of 2rad/s.

The position estimation error in Figure 4.25 reflects the speed estimation error response.Test case 4 shows a large error spike of 4.2 rad in the beginning. All test cases are thenconverging to a value of 0.025 rad.

The speed response of test case 7 is presented in Figure 4.26.

0 0.5 1 1.5 2 2.5 3Time [s]

-1000

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Mec

hani

cal s

peed

[rpm

]

Speed response. Test case 7.

Reference speed

Actual speed

Figure 4.26: Speed response for the SMO control running test case 7.

The system responds as expected on the first step up command. At 1.5 s, the referencespeed is stepped down to 130 rpm. A small overshoot of 1.5% can be seen. The second step

45

Page 64: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

up command gives an overshoot of 15.3%. Simulations has shown that at lower speed, thesystem gets unstable.

The speed and position estimation errors are presented in Figure 4.27.

0 0.5 1 1.5 2 2.5 3-5

0

5

10

Ele

ctric

al s

peed

!el

[rad

/s]

Speed estimation error. Test case 7.

Test case 7

0 0.5 1 1.5 2 2.5 3Time [s]

-0.01

0

0.01

0.02

0.03

0.04

0.05

Ele

ctric

al p

ositi

on 3

el [r

ad]

Position estimation error. Test case 7.

Test case 7

Figure 4.27: Estimation errors for the SMO control running test case 7.

As before, the speed estimation error converges to a value of 2 rad/s. After the step downhowever, the speed error looks to be zero after a small transition period. The error goes backup after the second step up. The same behavior is seen in the position estimation error. Itstarts with the known estimation error of 0.025 rad. In the low speed interval, the positionestimation error is also zero before increasing again with the next step up.

4.5.3 Simulink Model with Fixed Step Size

The SMO control was modeled in discrete form in the same manner as the MRAS. The discreteSMO-based FOC executes as a reference model at the frequency of 15 kHz and the model ispresented in Figure 4.28.

1abcCurrent_in

abcαβ0

αβ0

wtdq0

PI(z)

i_d

speed

i_q

u_d*

u_q*

Decoupling1

dCurrent_ref

0

1abcVoltage_out

speed_ref PI(z)

PI(z)

dq0

wtαβ0

αβ0abc

alphaVoltage_in

betaVoltage_in

alphaCurrent_in

betaCurrent_in

speed_out

position_out

SMO estimator

Ts*0.5

[dCurrent]

[qCurrent]

[dCurrent][qCurrent]

Figure 4.28: Simulink model of the discrete SMO-based FOC.

46

Page 65: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

The newly measured motor currents together with the voltage control signal from previoussample calculates the motor speed and position. The estimated position is then used totransform the measured current into dq-coordinates to use in the FOC. The voltage controlsignal is then transformed using the compensated position according to Equation (4.11).

A problem with the discrete model of the SMO is that the estimations consists of toomuch noise. Figure 4.29 presents the speed estimation when the motor is controlled by FOCand the discrete SMO is executed off-line, i.e. FOC is using the real speed and position, notthe estimated ones.

0 0.5 1 1.5Time [s]

-1000

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Mec

hani

cal s

peed

[rpm

]

Speed response.

Actual speed

Estimated speed

Figure 4.29: Speed response for the discrete SMO.

Aside from the big estimation spike in the start, the estimated speed is rather noisy thewhole time. This amount of noise also makes the FOC unstable when the SMO is included inthe control loop, i.e. FOC now uses the estimated speed and position. Due to the instability,the discrete SMO simulations have not yielded and results.

4.6 Discussion

To analyze the simulation performance of the different estimation methods, performance at-tributes, imperfections and differences will be identified and discussed. The results will alsobe compared and discussed with regard to each test case. This section also aims to answerthe research questions from Section 1.2.

First of all, the fact that the discrete SMO controller did not give any results points outone obvious problem with SMO: It is difficult to properly implement in discrete form. Theinstability can depend on many things and the noise presented in Figure 4.29 is probably oneof them. This noise is a consequence of the known chattering effect, see Section 3.4. Whenthe sampling frequency decreases, the amplitude of the switching error in sliding mode willincrease due to the high gain. This also explains the good estimation response in continuoustime simulations where the sampling frequency is very high.

The common way to reduce the chattering problem is by using a LPF, and that revealsanother problem with the SMO: It introduces a constant estimation error already in continuoussimulations. A LPF is known to introduce a phase delay in the signal and since the speedand position estimates are based on filtered signals it is natural that they suffer a small error

47

Page 66: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

for that reason. Figure 4.30 shows the speed and position estimation errors using differentvalues for the cut-off frequency in the LPF.

0 0.5 1 1.502468

10121416

Ele

ctric

al s

peed

!el

[rad

/s]

Speed estimation error.

fc = 5000 Hz

fc = 10000 Hz

fc = 15000 Hz

0 0.5 1 1.5Time [s]

-0.04

-0.02

0

0.02

0.04

0.06

Ele

ctric

al p

ositi

on 3

el [r

ad]

Position estimation error.

fc = 5000 Hz

fc = 10000 Hz

fc = 15000 Hz

Figure 4.30: Estimation errors of the SMO using different LPFs.

The amount of phase delay introduced by a LPF depends on its cut-off frequency. Largercut-off frequency gives a lower phase delay. This is reflected in Figure 4.30 where it is clear thatwhen the cut-off frequency of the LPF increases, the estimation errors are also reduced. In theSMO simulations, the LPF used has the cut-off frequency fc = 10000 Hz which gives a speedestimation error of 2 rad/s and a position estimation error of 0.025 rad which corresponds to0.4% of one electrical rotor revolution. So if the signal is filtered too hard to get rid of thechattering effect it will instead give a large phase delay in the position estimation, making theFOC unstable anyway.

Switching focus to the MRAS controller, in the continuous simulations (Subsection 4.4.2),both speed and position estimation error are converging to zero in all test cases. Yet, whenimplementing the MRAS in discrete form, a small constant estimation error is introducedin both position and speed estimations, see Subsection 4.4.3. Additionally, the constantestimation errors seem to depend on the applied load since the error increases together withthe load in Figure 4.17.

Surely there are a lot of different aspects that goes into play here. One potential sourceof failure could be the delay the sampling period introduces in the controller. Vector trans-formations are particularly vulnerable to this. It can also be seen in Figure 4.31 that thesampling frequency has a direct influence in the constant estimation errors.

The currents are transformed into dq-coordinates using the compensated position estima-tion from previous sample. The compensated position value will most certainly include aminor error since it is just a linear approximation from the previous position value. This erroris expected to propagate through the estimator and to give a small estimation error. Thesame goes for the compensated position value that transforms dq-voltage to abc-coordinates.This error in the position estimation in turn causes the two current values compared in theestimator to not correspond to each other. This suggests that a higher sampling frequencyshould decrease the error, which according to Figure 4.31 is the case.

This also explains the influence of the load. As the load increases, the motor currentincreases and errors related to the current will thus be amplified. Moreover, in Figure 4.19 itis shown that the position estimation error is close to zero at low speed. Considering that a

48

Page 67: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

0 0.5 1 1.5-0.01

0

0.01

Ele

ctric

al s

peed

!el

[rad

/s] Speed estimation error.

fc = 15 kHz

fc = 20 kHz

fc = 25 kHz

fc = 30 kHz

0 0.5 1 1.5Time [s]

-1

0

1

Ele

ctric

al p

ositi

on 3

el [r

ad]

#10-3Position estimation error.

fc = 15 kHz

fc = 20 kHz

fc = 25 kHz

fc = 30 kHz

Figure 4.31: Estimation errors of the discrete MRAS using different sample frequencies.

decrease in speed also reduces the motor current this is only natural.

In fact, in a real implementation, this source of failure is hard to avoid since it has to beimplemented in discrete form. Instead, it should be determined how small the error have tobe. An error in the position estimation will also cause the motor to use a current differentfrom the one the controller have requested which probably means a loss in efficiency of themotor. The position estimation error here is around 0.0005 rad which corresponds to 0.008%of one whole electrical revolution of the rotor. Neither the position estimation error nor thespeed estimation error is visibly present in the speed response.

To get a simplified assessment of the computational power needed for each method in rela-tion to the other, the number of operations the method performs is counted. The operationsare classified into four groups: Additions, multiplications, integrals and higher order functions(such as square root, trigonometric functions, absolute value, etc.). Table 4.1 compares theamount of operators for each method.

Table 4.1: Computational power evaluation.

Additions Multiplications Integrals Higher order functions

MRAS 10 13 4 0

SMO 12 16 2 8

According to this simple evaluation, the MRAS appears less computational heavy com-pared to the SMO. Mainly since the MRAS does not use any higher order functions in itscalculations. The only aspect where SMO is superior is the number of integrals used. Butintegrals are relatively simple operations for a microprocessor.

Moving on to the test cases, test cases 1 and 2 are similar in the way that they representtypical examples of how a load can be applied to the motor by a real user of the end-product.In both cases, the motor starts up to steady state and then a load is applied which is eitherconstant or varying. These test cases might also be the easiest ones to control correctly.

This is also justified in the results for both methods. Aside from errors not related tothese specific test cases (like wrong convergence) the controllers behave as expected. Smalldisturbances in the estimations and the control is given by the appliance of the loads, but thecontrol is quickly regaining control for both cases.

49

Page 68: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

Test case 3 should portray an impatient end-product user that want to add load to themotor before it has reached its steady state speed. For a good application, it must be able tohandle such events. According to the simulation results there are no real problems identifiedrelated to this case. In Figure 4.17 an oscillatory behavior can be seen which is not presentin the speed response in Figure 4.16.

Another favored feature with the application is to be able to add the load before the motoris started. The motor should then be able to accelerate to rated speed without any weirdbehaviors. This is the functionality that test case 4 is evaluating.

For this case there are a small difference between the two methods. Both methods cancontrol increasing start load, but with different side effects, see Figures 4.32 and 4.33.

0 0.5 1 1.5 2 2.5 3Time [s]

0

2000

4000

6000

8000

10000

12000

Mec

hani

cal s

peed

[rpm

]

Speed response.

Reference speed

TL = 0.80"T

max

TL = 0.85"T

max

TL = 0.90"T

max

TL = 0.95"T

max

Figure 4.32: Speed response of discrete MRAS controller running test case 4 with differentvalues for the start load.

0 0.5 1 1.5 2 2.5 3Time [s]

0

2000

4000

6000

8000

10000

12000

Mec

hani

cal s

peed

[rpm

]

Speed response.

Reference speed

TL = 0.80"T

max

TL = 0.85"T

max

TL = 0.90"T

max

TL = 0.95"T

max

Figure 4.33: Speed response of SMO controller running test case 4 with different values forthe start load.

For both controllers, by increasing the start load, the speed response gets a greater over-

50

Page 69: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

shoot with pretty much equal amounts for both controllers. The difference is however thatat 95% start load, the MRAS controller has a really slow acceleration and converges to thewrong value, about 9000 rpm. The SMO controller converges to the right value but with thecost of a huge overshoot of 36.5%. However, simulations have shown that by simulating for alonger time period, the MRAS-speed eventually goes back to the right speed.

Further simulations have also shown that the overshots in Figures 4.32 and 4.33 is causedby the integral windup in the FOC speed controller. By adding a anti-windup functionalityto the controller the overshots can be eliminated, see Figures 4.34 and 4.35. The addedanti-windup does however not improve the estimation errors.

0 0.5 1 1.5 2 2.5 3Time [s]

-1000

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Mec

hani

cal s

peed

[rpm

]

Speed response.

Reference speed

TL = 0.80"T

max

TL = 0.85"T

max

TL = 0.90"T

max

TL = 0.95"T

max

Figure 4.34: Speed response of discrete MRAS controller running test case 4 with differentvalues for the start load and a anti-windup functionality for the FOC speed controller.

0 0.5 1 1.5 2 2.5 3Time [s]

-1000

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Mec

hani

cal s

peed

[rpm

]

Speed response.

Reference speed

TL = 0.80"T

max

TL = 0.85"T

max

TL = 0.90"T

max

TL = 0.95"T

max

Figure 4.35: Speed response of SMO controller running test case 4 with different values forthe start load and a anti-windup functionality for the FOC speed controller.

Test case 5 explore the option to limit the acceleration rate at start-up with the purpose

51

Page 70: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

of making the start-up easier to control. The acceleration rate of the motor is also somethingthat is preferable to manipulate in a real application, i.a. to make it comfortable for the user.

This test case should be relatively easy for the controller which is also demonstrated in thesimulation results. For the SMO controller, test case 5 shows a smooth and stable transitionup to reference speed. Figure 4.25 also shows a much less noisy speed estimation error responsein start-up, compared to test cases 3 and 4, while having the same steady state error in bothspeed and position estimations. Using the MRAS, test case 5 shows the same stable speedresponse for both the continuous and discrete controller.

The perhaps most interesting with test case 5 would be to combine it with another drivingcase to see if that could improve the performance of the controller. Since some form of anacceleration limit most likely will exist in a real implementation, this event would be interestingto analyze further.

One particular case where an acceleration limiter can do improvements, is the case ofstart load, given by test case 4, which is one of the harder cases for the controller. To see theinfluence of an acceleration limit, the two test cases of start load and acceleration limiter iscombined, that is test cases 4 and 5 respectively. Figure 4.36 presents the same speed responseas in Figure 4.34 but where test case 5 also is active.

0 0.5 1 1.5 2 2.5 3Time [s]

-1000

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Mec

hani

cal s

peed

[rpm

]

Speed response.

Reference speed

TL = 0.80"T

max

TL = 0.85"T

max

TL = 0.90"T

max

TL = 0.95"T

max

Figure 4.36: Speed response of discrete MRAS controller running test cases 4 and 5 combinedwith different values for the start load.

The response is similar as in Figure 4.34 but with slower acceleration of the motor. Inthe case of 95% start load the motor acceleration is slower that the limit. Therefore theacceleration limit does not really have an influence. Looking at the estimations errors inFigure 4.37, a significant enhancements in speed estimation is visible compared to Figure 4.17.First, the error spike in the start is eliminated. The constant transient state error is alsoreduced to about 1 rad/s. The constant position estimation error in transient state is alsoreduced by half.

The standstill interval shown in Figure 4.36 only represents the time it takes for thecontroller to feed the motor with sufficient current to start moving. This also reveals a side-effect with the acceleration limiter: It makes the controller slower in start-up.

The same simulations were also done using the SMO controller. But since that systemgot unstable very quickly for all different amounts of start load, there are no real results topresent. This only indicates that an acceleration limit might not improve the performance of

52

Page 71: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

0 0.5 1 1.5 2 2.5 3-2

-1

0

1

2

3

4

5

Ele

ctric

al s

peed

!el

[rad

/s]

Speed estimation error.

TL = 0.80"T

max

TL = 0.85"T

max

TL = 0.90"T

max

TL = 0.95"T

max

0 0.5 1 1.5 2 2.5 3Time [s]

-5

0

5

10

15

Ele

ctric

al p

ositi

on 3

el [r

ad]

#10-3Position estimation error.

TL = 0.80"T

max

TL = 0.85"T

max

TL = 0.90"T

max

TL = 0.95"T

max

Figure 4.37: Estimation errors of discrete MRAS controller running test cases 4 and 5 com-bined with different values for the start load.

the SMO controller.

Another important aspect of the controlling performance is the sensitivity to motor pa-rameter variations. The electrical motor parameters will change during operation; especiallythe stator resistance is known to change a lot due to temperature variations. If a controller istoo dependent on correct values for the motor parameters and cannot work properly if thosevalues change, then it is not a useful controller.

Test case 6 is supposed to illustrate changes of the stator resistance during operation toreveal any dependencies between the controlling method and correct stator resistance value.The change is applied as a step where the stator resistance is doubled.

When using the MRAS controller, the consequences for change of resistance value is rel-atively small. It can be seen that in both the continuous case (Figure 4.7) and discrete case(Figure 4.15) the speed and position errors takes a small hit but then quickly converges to avalue close to the one before. None of these error spikes can be noted in the speed responseshowever.

The SMO controller gives a different story. While not showing any reaction of the resis-tance change in either the speed response or the position estimation error response, the speedestimation error reveals a dependency. When the resistance change is applied, the speed esti-mation error increases and switches sign, see Figure 4.23. The stator resistance is present inthe SMO equations and one reason for the estimation error increase could simply be that theobserver has a poor performance when given the wrong information.

One way to improve the performance against resistance variations could also be to estimatethe resistance value in parallel to the speed and position estimations. However, as noted fromthe literature study in Chapter 3, this is more natural in the MRAS estimator. This optionshould anyway be further investigated.

One further way to evaluate a controller is to assess its performance at low speed. In animplementation there is typically a lower speed limit, at which the motor is turned off. This isboth out of caution, the motor is turned off when too much load is applied to avoid damage,and to remove the requirement on the controller to actively control at standstill.

As known from the literature study in Chapter 3, the SMO controller is based on back-EMF estimates and since the back-EMF is small at low speed, the controller will struggle to

53

Page 72: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

accurately estimate them. In fact, the simulated SMO controller gets unstable below 130 rpmcompared to the MRAS controller that keeps stable until 100 rpm. In both cases, decreasingthe speed further will cause the system to go unstable. That said, these simulations is kindin the way that there is no noise added to the signals. If the signals are influenced by noise,which will be the case in an implementation, the lowest controllable speed might increase.

Given the results from the simulations and the literature study (Chapter 3), there aremany factors suggesting that the MRAS control is best suited for this case study. Mainlybecause of the stable and smooth response given by the discrete controller, which is prettyclose to a real implementation. Also since a discrete SMO controller did not give any realresults. It is also a big advantage that the discrete MRAS works properly for all test cases ata sampling frequency of 15 kHz, which is the preferred sampling speed.

Another advantage with the MRAS controller is the improvement of the accelerationlimit, i.e. test case 5. Figure 4.37 shows a really good response which basically means that anacceleration limit can improve the motor start-up. On the other hand, the acceleration limitmade the SMO controller unstable which, again, suggests that the SMO is hard to correctlydesign. The low speed performance also shows a difference in the favor of the MRAS controller.

One problem that is identified with the MRAS estimator is that it has a poor off-lineestimation performance. If, for example, a start-up strategy is used up to a certain speedlimit where in the meantime the MRAS is disconnected from the FOC, then the MRASspeed estimation might converge to the wrong value during that period. Since the positionestimation is integrated from the speed estimation, the position estimation error will alwaysincrease. The main explanation for this is that the changes in speed and position estimationdone by the MRAS are not reflected in the measured current and thus it will struggle to findthe right value. Later, when the MRAS is activated into the FOC again, it will start of withan unknown error. Hence, if the MRAS is required to estimate off-line there will be a needfor a transition algorithm between off-line and on-line modes to ensure that the off-line errordoes not affect the on-line estimations.

4.7 Summary

This chapter presents the design and Simulink models of the motor, the FOC and the twoestimation methods that were chosen in the literature study in Chapter 3: The MRAS and theSMO estimators. The two models are modeled in both continuous and discrete time frames.All models are then in turn connected to the FOC and simulated.

To compare the performance of the two estimation methods a set of test cases were designedto illustrate operation conditions and course of events that could occur in a real application ofthis case study. All models then simulate these test cases and the results are used to determinethe estimation method that is best suited for this case study.

Simulations show that a discrete implementation of the SMO estimator is too noisy to getany results from and thus indicates the difficulty to implement such a controller. On the otherhand, the discrete MRAS estimator shows a stable and smooth response with the preferredsampling frequency of 15 kHz. The estimation errors of the discrete MRAS are also noisyand suffers large error spikes but it always converges in the end to relatively low error values.Also, by adding an acceleration limit for the start-up of the motor, the estimation errors aresignificantly reduced and all overshoots are eliminated.

That said, both the literature study and the simulation results suggest that the controllerusing the MRAS estimator is the better choice for this case study.

54

Page 73: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

Chapter 5

Conclusion

The aim of this thesis is to evaluate different sensorless control strategies of a PMSM anddetermine which of the methods that is best suited for a specific case study. The case studyis the application of a chainsaw produced by Husqvarna AB. The PMSM of the chainsaw iscurrently controlled with a BLDC controlling approach. To improve the performance and thedynamic control of the motor, Husqvarna is exploring the possibility to replace the currentcontrol strategy with a sensorless controlling technique customized for a PMSM.

Chapter 2 presents the theory behind this thesis. The mathematical model of the PMSM inabc-frame, αβ-frame and dq-frame is presented together with the definitions of the coordinatetransformation functions. FOC, which is the underlying control strategy is also presented. TheFOC needs information about the rotor speed and position in order to successfully control thePMSM. By definition of sensorless control, the speed and position information are producesby an estimator. These estimators are the focus of this thesis and several different estimationmethods will be compared to find the most suited method for this case study.

The evaluation is then done in two steps. First, the literature is explored to find differentspeed and position estimation methods, and to reveal the advantages and weaknesses with eachmethod (Chapter 3). The methods found was: the MRAS estimator, the EKF estimator andthe SMO estimator which is one of the many back-EMF estimation methods. The methodswas compared based on the literature with regard to a set of performance aspects. Theperformance aspects should represent favorable features and behaviors of the final estimationmethod.

The second step in the evaluation was to simulate the methods which, according to theliterature study, would be best suited for the case study (Chapter 4). The methods that wasfurther investigated in simulations were the MRAS and the SMO estimators. Mainly becauseof their simplicity and stability guarantees.

The PMSM, FOC and both estimator were modeled in Simulink. The estimators weremodeled in both continuous and discrete time frame. A predefined set of test cases were thensimulated using each estimation method. The test cases are supposed to driving conditionsand events that may occur in the real application of the case study. The results from thetest cases were then compared between the different model to determine the best performingestimation method.

Based on the results from the modeling and simulations, the MRAS estimation method isconsidered best suited in this case study. This is mainly because of the good response givenby the discrete MRAS while the response from the discrete SMO showed so much noise thatit was hard to accurately test. The MRAS control also responded good to an accelerationlimiter in the start-up where the SMO controller would fail.

Since the MRAS is the favored estimation method for this case study, it can also be

55

Page 74: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

considered favorable for other similar applications. In applications that include sensorlessFOC with flexible current control of a SPMSM using a low-cost microprocessor, the MRASwill be a good choice of estimator.

5.1 Future Work

Continued work on this thesis includes adding constraints to the model such as measurementnoise to see how the estimator manages that. To get the model even more realistic it wouldalso be good to model the SVM-function and the voltage inverter.

It would also be necessary to further analyze the requirements the controller and estimatorput on the processor and other hardware. Also to calculate what time frame the estimatorneeds in order to decide the final sampling frequency and determine how powerful the processorneeds to be.

There could also be beneficial to investigate the starting behavior of the motor. To analyzethe measurement accuracy and assess the possible need for complementing the closed loopestimator with another type of low speed estimator.

The next step would be to implement the controller on a hardware and and test againsta real motor. Maybe go through all the test cases with the real motor and analyze the motorbehavior. A preference would be if the motor had an encoder so the speed and position valuescould be properly compared.

Another interesting thing to investigate would be the feasibility of an additional statorresistance estimator. In MRAS, there are instances where the stator resistance is estimatedtogether with the speed and position. Stator resistance estimation could improve the perfor-mance further and also gives the opportunity to estimate the motor temperature.

56

Page 75: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

Bibliography

[1] F. Giri, Ed., AC ELECTRIC MOTORS CONTROL. John Wiley and Sons, Ltd, 2013.

[2] M. J. Grimble and M. A. Johnson, Eds., Sensorless AC Electric Motor Control, ser.Advances in Industrial Control. Springer, 2015.

[3] H. Abu-Rub, A. Iqbal, and J. Guzinski, HIGH PERFORMANCE CONTROL OF ACDRIVES WITH MATLAB/SIMULINK MODELS. John Wiley and Sons, Ltd, 2012.

[4] P. Pillay and R. Krishnan, “Application Characteristics of Permanent Magnet Syn-cronous and Brushless dc Motors for Servo Drives”, IEEE Transactions on IndustryApplications, vol. 21, no. 5, pp. 986–996, 1991.

[5] F. Yusivar, N. Hidayat, R. Gunawan, A. Halim, and A. M. Model, “Implementationof Field Oriented Control for Permanent Magnet Synchronous Motor”, in ElectricalEngineering and Computer Science (ICEECS), IEEE, 2014, pp. 359–362.

[6] N. Li, Y. Ming, G. Xianguo, X. Dianguo, and A. B. D, “A Comparative Study of ModelPredictive Current Control and FOC for PMSM”, in 17th International Conference onElectrical Machines and Systems (ICEMS), IEEE, 2014, pp. 3143–3147.

[7] J. W. Creswell, Research Design, 3rd ed. SAGE Publications, 2009.

[8] STMicroelectronics, UM1052 User Manual, DocID: 18458. Rev 8., STMicroelectronics,Sep. 2015.

[9] H. Aygun, M. Gokdag, M. Aktas, and M. Cernat, “A novel sensorless field oriented con-troller for Permanent Magnet Synchronous Motors”, in IEEE International Symposiumon Industrial Electronics, IEEE, 2014, pp. 715–720.

[10] Y. Li and H. Zhu, “Sensorless control of permanent magnet synchronous motor - asurvey”, in Vehicle Power and Propulsion Conference, 2008. VPPC ’08. IEEE, 2008,pp. 1–8.

[11] B. Nahid-Mobarakeh, F. Meibody-Tabar, and F. M. Sargos, “Back EMF estimation-based sensorless control of PMSM: Robustness with respect to measurement errors andinverter irregularities”, in Industry Applications Conference, 2004. 39th IAS AnnualMeeting. Conference Record of the 2004 IEEE, vol. 3, 2004, pp. 1858–1865.

[12] M. Hassan, O. Mahgoub, and A. E. Shafei, “ANFIS based MRAS speed estimator forsensorless control of PMSM”, in 2013 Brazilian Power Electronics Conference, COBEP2013 - Proceedings, 2013, pp. 828–835.

[13] A. Mishra, V. Mahajan, P. Agarwal, and S. P. Srivastava, “MRAS based estimation ofspeed in sensorless PMSM drive”, in 2012 IEEE 5th Power India Conference, PICONF2012, 2012, pp. 1–5.

57

Page 76: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

[14] D. Xiao, D. Q. Guan, M. F. Rahman, J. Fletcher, and E. Systems, “Sliding Mode Ob-server Combined with Fundamental PWM Excitation for Sensorless Control of IPMSMDrive”, in IECON 2014 - 40th Annual Conference of the IEEE Industrial ElectronicsSociety, IEEE, 2014, pp. 895–901.

[15] L. An, D. Franck, and K. Hameyer, “Sensorless field oriented control using back-EMFand flux observer for a surface mounted permanent magnet synchronous motor”, Inter-national Journal of Applied Electromagnetics and Mechanics, vol. 45, no. 1-4, pp. 845–850, 2014.

[16] V. Nagarajan, M. Balaji, and V. Kamaraj, “Back-Emf-Based Sensorless Field-OrientedControl of PMSM Using Neural-Network-Based Controller with a Start-Up Strategy”,Advances in Intelligent Systems and Computing, vol. 325, pp. 449–457, 2015.

[17] F. Zhou, B. Li, J. Yang, and R. Yan, “A Sliding Model Speed / position Observer Inte-grated with a PI Controller for PM Synchronous Motors”, in 2007 IEEE InternationalConference on Robotics and Biomimetics, ROBIO, 2008, pp. 1372–1377.

[18] N. Bedetti, S. Calligaro, and R. Petrella, “A novel approach to the design of back-EMFobserver based sensorless control of non-salient PMSM: Theoretical analysis and ex-perimental investigations”, in 2013 IEEE Energy Conversion Congress and Exposition,ECCE 2013, 2013, pp. 3496–3503.

[19] M. Tursini, R. Petrella, and A. Scafati, “Speed and position estimation for PM syn-chronous motor with back-EMF observer”, Conference Record - IAS Annual Meeting(IEEE Industry Applications Society), vol. 3, no. 2, pp. 2083–2090, 2005.

[20] A. A. A. Samat, D. Ishak, S. Iqbal, and A. I. Tajudin, “Implementation of SugenoFIS in model reference adaptive system adaptation scheme for speed sensorless controlof PMSM”, in Proceedings - 4th IEEE International Conference on Control System,Computing and Engineering, ICCSCE 2014, IEEE, 2014, pp. 652–657.

[21] A. A. A. Samat, D. Ishak, P. Saedin, and S. Iqbal, “Speed- sensorless control of parallel-connected PMSM fed by a single inverter using MRAS”, in 2012 IEEE InternationalPower Engineering and Optimization Conference, PEOCO 2012, 2012, pp. 35–39.

[22] C. X. Lv and Q. Gao, “PMSM Sensorless Field-Oriented Control System Based onSliding-Mode Observer”, Applied Mechanics and Materials, vol. 667, pp. 411–416, 2014.

[23] W. Lipeng, Z. Huaguang, and L. Xiuchong, “Robust sensorless of ADRC controlledPMSM based on MRAS with stator resistance identification”, in Control Conference(CCC), 2011 30th Chinese, 2011, pp. 3575–3579.

[24] S. Fan, W. Luo, J. Zou, and G. Zheng, “A hybrid speed sensorless control strategy forPMSM Based on MRAS and Fuzzy Control”, in Conference Proceedings - 2012 IEEE 7thInternational Power Electronics and Motion Control Conference - ECCE Asia, IPEMC2012, vol. 4, 2012, pp. 2976–2980.

[25] J. K. J. Kang, B. H. B. Hu, H. L. H. Liu, and G. X. G. Xu, “Sensorless Controlof Permanent Magnet Synchronous Motor Based on Extended Kalman Filter”, in 2009IITA International Conference on Services Science, Management and Engineering, 2009,pp. 571–574.

[26] G. Faten and S. Lassaad, “Speed Sensorless IFOC of PMSM Based On Adaptive Luen-berger Observer”, International Journal of Computer, Electrical, Automation, Controland Information Engineering, vol. 4, no. 8, pp. 1256–1262, 2010.

[27] I. D. Landau, “A Hyperstability Criterion for Model Reference Adaptive Control Sys-tems”, IEEE Transactions on Automatic Control, vol. 14, no. 5, pp. 552–555, 1969.

58

Page 77: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

[28] M. Bendjedia, A. Khlaief, and M. Boussak, “Sensorless speed control of outrunnerPMSM drive connected to long cable for flying remote operative vehicle”, in 2012 20thInternational Conference on Electrical Machines, ICEM 2012, 2012, pp. 2252–2258.

[29] P. Borsje, T. F. Chan, Y. K. Wong, and S. L. Ho, “A Comparative Study of KalmanFiltering for Sensorless Control of a Permanent-Magnet Synchronous Motor Drive”, inElectric Machines and Drives, 2005 IEEE International Conference on, 2005, pp. 815–822.

[30] J. Gu, Y. Zhang, Z. Wu, and J. Ying, “Rotor Position Estimation for PMSM Basedon Sliding Mode Observer”, in IPEMC 2004: 4th International Power Electronics andMotion Control Conference, 2004, pp. 1351–1355.

[31] H. M. Kojabadi and L. Chang, “Sensorless PMSM drive with MRAS-based adaptivespeed estimator”, in Power Electronics Specialists Conference, 2006. PESC ’06. 37thIEEE, 2006, pp. 1–5.

[32] G. R. Gopinath and S. P. Das, “An extended Kalman filter based speed and positionestimator for Permanent Magnet Synchronous Motor”, in 2014 IEEE International Con-ference on Power Electronics, Drives and Energy Systems, PEDES 2014, 2014, pp. 1–5.

[33] B. Jiang, “A novel algorithm based on EKF to estimate rotor position and speed for sen-sorless PMSM drivers”, in 2009 International Conference on Information Engineeringand Computer Science, ICIECS 2009, 2009, pp. 1–4.

[34] T. Ming, G. Lin, L. Deliang, and X. J. Tong, “Sensorless Permanent Magnet Syn-chronous Motor drive using an optimized and normalized Extended Kalman filter”, in2011 International Conference on Electrical Machines and Systems, 2011, pp. 1–4.

[35] S. Bolognani, L. Tubiana, and M. Zigliotto, “Extended Kalman filter tuning in sensorlessPMSM drives”, IEEE Transactions on Industry Applications, vol. 39, no. 6, pp. 1741–1747, 2003.

[36] M. Djup and E. Allar, “Sensorless Control of Brushless DC Motor”, PhD thesis, 2015.

[37] W. C. Chi and M. Y. Cheng, “Implementation of a sliding-mode-based position sensor-less drive for high-speed micro permanent-magnet synchronous motors”, ISA Transac-tions, vol. 53, no. 2, pp. 444–453, 2014.

[38] S. Chi, Z. Zhang, and L. Xu, “Sliding-mode sensorless control of direct-drive PM syn-chronous motors for washing machine applications”, IEEE Transactions on IndustryApplications, vol. 45, no. 2, pp. 582–590, 2009.

[39] S. K. Kommuri, J. J. Rath, K. C. Veluvolu, M. Defoort, and S. Tatinati, “Performancecomparison of sliding mode observers for back EMFs based speed estimation in PMSM”,in Automation and Systems (ICCAS), 2015 15th International Conference on Control,2015, pp. 1612–1617.

[40] J. Owen, J. Strouse, and M. J. Marcel, “Sensorless field oriented control utilizing asliding mode observer for control of an actively-rectified permanent magnet synchronousgenerator”, in IEEE Applied Power Electronics Conference and Exposition - APEC,2011, pp. 1017–1021.

[41] W. Eom, I. Kang, and J. Lee, “Enhancement of the speed response of PMSM sensor-less control using an improved adaptive sliding mode observer”, in 2008 34th AnnualConference of IEEE Industrial Electronics, 2008, pp. 188–191.

59

Page 78: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

[42] T. Instruments, InstaSPIN Projects and Labs User’s Guide, Version 1.0.14, Texas In-struments.

[43] Z. Xingming, W. Xuhui, Z. Feng, G. Xinhua, and Z. Peng, “Wide-Speed-Range Sen-sorless Control of Interior PMSM Based on MRAS”, in International Conference onElectrical Machines and Systems (ICEMS), 2010, pp. 804–808.

[44] H. Sugimoto and S. Tamai, “Secondary resistance identification of an induction-motorapplied model reference adaptive system and its characteristics”, IEEE Transactions onIndustry Applications, vol. IA-23, no. 2, pp. 296–303, 1987.

[45] S.-L. Jung and Y.-Y. Tzou, “Discrete sliding-mode control of a PWM inverter for si-nusoidal output waveform synthesis with optimal sliding curve”, IEEE Transactions onPower Electronics, vol. 11, pp. 567–577, 4 1996.

60

Page 79: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

Appendix A

Matlab script of the PMSM

1 function [t, x] = ode_model(timespan)

2 x0 = [0 0 0]; % Initial values

3 opts = odeset(’RelTol ’,1e-5,’AbsTol ’,1e-5, ’MaxStep ’, 50e-6);

4 [t, x] = ode45(@pmsm , timespan , x0 , opts);

5

6 function dxdt = pmsm(t, x)

7 % Persistent variables to calculate integrals

8 persistent prev_t error_id error_iq error_omega

9

10 if isempty(prev_t)

11 prev_t = 0;

12 error_id = 0;

13 error_iq = 0;

14 error_omega = 0;

15 end

16

17 R = 0.0087; % Stator resistance [Ohm]

18 Ls = 19e-6; % Stator inductance [H]

19 ke = 2.13* sqrt (2); % Voltage constant [V_peak L-L / krpm]

20 const = 60/( sqrt (3)*1000*2* pi*7);

21 fe = ke*const; % Permanent Magnet flux [Vs/rad]

22 p = 7; % Pole pair of rotor

23 J = 0.3e-4; % Inertia of rotor [kg.m^2]

24 viscousDamping = 0.05e-3; % Viscous damping [N.m/(rad/s)]

25 Vmax = 30/ sqrt (3); % Maximum voltage through each phase [V]

26 Imax = 60; % Maximum current [A]

27

28 delta = 11; % Damping factor

29 tao = 1/200; % Time constant

30 K = 3/2*p*fe/J; % Motor constant variable

31

32 Kp = Ls*2*pi *15000/20; % Current controller Proportional gain

33 Ki = R/Ls; % Current controller Integral gain

34 spdKp = 1/( delta*K*tao); % Speed controller Proportional gain

35 spdKi = 1/( delta ^2* tao); % Speed controller Integral gain

36

37 %%%%%%%%%%% FOC control %%%%%%%%%%%%

38 id_ref = 0; % d-current reference

39 omega_ref = 8500*pi/30; % Speed reference

40

41 % Speed controller

61

Page 80: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

42 iq_ref = spdKp*(omega_ref -x(3)) + spdKi*spdKp*error_omega;

43 error_omega = error_omega + (omega_ref -x(3))*(t-prev_t );

44

45 if iq_ref > Imax

46 iq_ref = Imax;

47 elseif iq_ref < -Imax

48 iq_ref = -Imax;

49 end

50

51 % d-current controller

52 vd = -Ls*x(2)*x(3)*p + Kp*(id_ref -x(1)) + Kp*Ki*error_id;

53 error_id = error_id + (id_ref -x(1))*(t-prev_t );

54

55 if vd > Vmax

56 vd = Vmax;

57 elseif vd < -Vmax

58 vd = -Vmax;

59 end

60

61 % q-current controller

62 vq = x(3)*p*(fe+Ls*x(1)) + Kp*(iq_ref -x(2)) + Ki*Kp*error_iq;

63 error_iq = error_iq + (iq_ref -x(2))*(t-prev_t );

64

65 if vq > Vmax

66 vq = Vmax;

67 elseif vq < -Vmax

68 vq = -Vmax;

69 end

70

71 %%%%%%%%%%% Motor dynamics %%%%%%%%%%%%

72 id = 1/Ls*(-R*x(1) + vd + Ls*x(2)*x(3)*p);

73 iq = 1/Ls*(-R*x(2) + vq - Ls*x(1)*x(3)*p - fe*x(3)*p);

74 Tem = 3/2*p*(fe*x(2) + (Ls -Ls)*x(1)*x(2));

75 TL = 0;

76 omega = 1/J*(Tem - viscousDamping*x(3) - TL);

77

78 dxdt = [id; iq; omega];

79 prev_t = t;

80 end

81 end

62

Page 81: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

Appendix B

Popov hyper-stability theorem

By using the PMSM as reference model with measured currents x = [id iq]T and let the

adjustable model be defined as

˙x = Ax+ Bu

y = Cx(B.1)

with

A =

[−RsLs

ωel−ωel −Rs

Ls

]; Bu =

[ 1Lsvd

1Ls

(vq − φrωel)

]where x = [id iq]

T is the estimated currents and ωel is the estimated rotor speed.The generalized error is given by ε = x− x and using Equations (2.15) and (B.1) gives

ε = ˙x− x= Aε+ (A−A)x+ Bu−Bu= Aε+ w1.

(B.2)

Defining w = −w1 yields

w = −[(A−A)x+ Bu−Bu]

=

[−iq

id + φrLs

](ω − ω)

= G(ω − ω).

(B.3)

Introducing the generalized error output as v = DCε the generalized error dynamics can beobtained as

ε = Aε+ Iw1

v = DCε

w1 = −ww = G(ω − ω)

(B.4)

where I is the 2x2 identity matrix.Given a system of this form, three conditions must be met to guarantee that Equation (B.4)

is an asymtotically hyperstable system. These conditions are [23], [27]:

63

Page 82: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

1. The pair [DC, A] is completely observable and the pair [A, I] is completely controllable.

2. The transfer function Z(s) = DC(sI − A)−1 must be strictly positive real.

3. The nonlinear time-varying block satisfies the Popov’s integral inequality, see Equa-tion (B.5).

∫ t

0vTw dt ≥ −γ20 . (B.5)

Here, γ20 is a positive constant, independent of t.Since rank[I AI] = 2 and rank[(DC)T AT (DC)T ] = 2, condition 1 is fulfilled.According to [23], condition 2 is satisfied if there exist two definite symmetric matrices, P

and Q such that

ATP + PA = −Q. (B.6)

Choosing Q = I yields

P =

[Ls2Rs

0

0 Ls2Rs

].

Both P and Q are symmetrical and definite and condition 2 is thus proven.As for condition 3, according to [43], [44], to verify Equation (B.5), another integral

inequality can be used, given by∫ t

0

[df(t)

dt

](kf(t)) dt ≥ −1

2kf2(0) (B.7)

where k is a positive constant.Inserting v and w from Equation (B.4) into Equation (B.5) gives∫ t

0

[(iq − iq)(id +

φrLs

)− (id − id)iq]

(ωel − ωel) dt ≥ −γ20 . (B.8)

The value of the rotor speed, ωel, is estimated using a integral adaptive mechanism accordingto

ωel =

∫ t

0ψ dt+ ωel(0). (B.9)

Inserted in Equation (B.8) gives

∫ t

0

[(iq − iq)(id +

φrLs

)− (id − id)iq](∫ t

0ψ dt+ ωel(0)− ωel

)dt ≥ −γ20 . (B.10)

Comparing Equation (B.7) and Equation (B.10) gives the definition of f(t) according to

df(t)

dt= (iq − iq)(id +

φrLs

)− (id − id)iq (B.11)

kf(t) =

∫ t

0ψ dt+ ωel(0)− ωel. (B.12)

64

Page 83: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

By choosing

ψ = k(iq − iq)(id +φrLs

)− (id − id)iq (B.13)

condition 3 can be verified. This gives the adaptive mechanism the following definition

ωel =

∫ t

0

[(iq − iq)(id +

φrLs

)− (id − id)iq]dt+ ωel(0) (B.14)

or given as a transfer function

ωel =k

s

[(iq − iq)(id +

φrLs

)− (id − id)iq]

+ ωel(0). (B.15)

According to [43], the proportional regulation can be added into the adaptive mechanism toimprove the dynamic performance. Thus, the final adaptive mechanism is given by

ωel =

(Kp +

Ki

s

)[(iq − iq)(id +

φrLs

)− (id − id)iq]

+ ωel(0). (B.16)

65

Page 84: Sensorless Control of a PMSM - Simple search1032918/...DEGREE PROJECT IN MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM , SWEDEN 2016 Sensorless Control of a PMSM Evaluation

TRITA MMK 2016:168 MDA569

www.kth.se