<<

Mechanical Dynamics of a Sensorless PMSynRel Drive

Yingbei Yu

Degree project in Electrical Machines and Drives

Stockholm, Sweden 2013

XR-EE-E2C 2013:004

Mechanical dynamics of a sensorless PMSynRel drive

by

Yingbei Yu

Master Thesis

Royal Institute of Technology School of Electrical Engineering Dept. Electrical Energy Conversion

Stockholm 2013 XR-EE-E2C 2013:004 Mechanical dynamics of a sensorless PMSynRel drive YINGBEI YU

c YINGBEI YU, 2013.

School of Electrical Engineering Department of Electrical Machines and Electronics Kungliga Tekniska H¨ogskolan SE–100 44 Stockholm Sweden To my family iv Abstract Hybrid electric vehicle (HEV) concept has, combining conventional internal combustion engines and electric drives, gained more and more interest due to its environmental friendly features. A PMSynRel based electric drive is considered as a good option due to its high density and high efficiency. To reduce the overall cost of HEVs, the position resolvers can be replaced by Hall-sensors or using sensorless control. However, the dynamics of such electric drives may be degraded. The main objective of this MSc project is to develop torque dynamics of such electric drives when operating with/without a position sensor. The developed torque dynamic can be used to analyze the limits of hall senor/sensorless strategy when, e.g. anti-oscillation control is required. The torque dynamic is presented as a based extracted from the speed responses and torque responses using Identification Tool Box in Matlab. Firstly, the transfer function was derived by means of simulations in both time and frequency domains. Secondly, similar procedures were applied to extract the transfer functions based on the experimental results.

Keywords: Bode plot, Hall-effect sensor, Matlab Identification Toolbox, MIMO, PMSynRel, sensorless control, transfer function.

Sammanfattning Elektriska hybridfordon, där en konventionell förbränningsmotor kombineras med ett elektriskt drivsystem, uppmärksammas mer och mer på grund av de miljömässiga fördelarna. En eldrift baserad på en permanentmagnetiserad synkron reluktansmaskin (PMSynRel) är ett bra alternativ tack vara den höga momenttätheten och den höga verkningsgraden. För att minska systemkostnaden kan positionsgivarenen (resolver) ersättas med Hall-givare eller att motorn styrs med, så kalla, sensorlös reglering. En nackdel med dessa alternativ är att den mekaniska dynamiken kan försämras. Huvudmålet med detta examensarbete är att studera hur momentdynamiken kan kvantifieras med och utan en positionsgivare. De framtagna modellerna kan användas till att utvärdera huruvida tex svängningar i fordonets drivlina kan dämpas ut med hjälp av det elektriska drivsystemet i de fall då positionen mäts med en Hall-givare eller skattas via den sensorlösa algoritmen. I detta arbete modelleras momentdynamiken med hjälp av en matrisbaserad överföringsmatris var element identifierats i en simuleringsmodell implementerad i Matlab/Simulink. I examensarbetets sista skede jämfördes den modellerade dynamiken med tidiga experimentella försök i en laborativ försöksrigg.

Nyckelord: Bodediagram, Hall-givare, MIMO, PMSynRel, sensorlös reglering, överföringsfunktion.

V vi Acknowledgements

In the first place, I would like to thank Phd student Shuang Zhao and my supervisor and examiner Dr. Oskar Wallmark for providing me with thorough technical explanation and guidance through the whole thesis work. I’ve learned a lot during each discussion and meeting for this thesis work. Especially thanks to Shuang Zhao, he was very patient to help me with any questions I had related to this project.

I am also very grateful to Mats Leksell for introducing me to this valuable opportu- nity to work on this project at the Department of Electrical Energy Conversion.

I also want to thank the people who work at this department at KTH for assisting me in different questions and problems.

In addition, I’d like to appreciate my manager Vidar Grimelind working at FM- CTechnologies AS for the permission on my temporary study leave. Thanks for his kind- ness, generousness and understanding.

Finally, I would like to express my deepest gratitude to my parents for all the sup- ports and love, not only during the period I am abroad, but through all my life. They are the greatest parents in the world! Last but not least, I would like to thank my husband Xu Yuan for all the encouragements, understandings and love.

Yingbei Yu Stockholm, Sweden April 2013

vii viii Contents

Abstract v

Acknowledgements vii

Contents ix

1 Introduction 1 1.1 BackgroundandObjectives...... 1 1.2 MotivationofHybridElectricVehicles ...... 1 1.3 ConfigurationsofHEVs ...... 2 1.3.1 SeriesHEVConfiguration ...... 2 1.3.2 ParallelHEVConfiguration ...... 2 1.4 PMSynRelmachineinHEVapplications...... 2 1.5 ControlofPMSynRelinHEVapplications...... 4 1.6 OutlineofThesis ...... 4

2 PMSynRel Control 5 2.1 FieldOrientedControl ...... 5 2.2 ResolverandHall-effectsensor...... 6 2.2.1 Resolver ...... 6 2.2.2 TheHall-Effectsensor ...... 6 2.3 TheSensorlessControl ...... 8

3 Simulation Models 13 3.1 Matlab/Simulink ...... 13 3.1.1 BasicSimulinkModel ...... 13 3.1.2 AdvancedSimulinkModel/Fluxmapmodel ...... 14

4 Implementation of rotor position detection in Simulink 15 4.1 Modelingofrotatorypositionsensors ...... 15 4.1.1 Resolvermodeling ...... 15 4.1.2 Hall-effectsensormodeling ...... 15

ix Contents

4.2 Modelingofsensorlesscontrol ...... 17 4.2.1 SignalInjection...... 17 4.3 Result of the Hall-effect sensor and sensorless control ...... 18

5 Transfer Function 23 5.1 Setinputandoutput ...... 23 5.2 Identificationandevaluationprocess ...... 24 5.2.1 Transfer functions identification and evaluation process in time domain 24 5.2.2 Transfer functions identification and evaluation process in frequency domain 26

6 Experimental Result 43 6.1 Experiment ...... 43

7 Conclusion and future work 47 7.1 Summary ...... 47 7.2 Futurework...... 48 7.2.1 SensorlesscontrolandHall-effectsensors ...... 48 7.2.2 Torque dynamics in frequency domain from the experiment ... 48

A Laboratory Setup 49

References 51

x Chapter 1

Introduction

This chapter briefly introduces the background and the outline of this thesis. The moti- vation, configuration and principle of hybrid electric vehicles is also presented in this chapter.

1.1 Background and Objectives

HEV applications have gained more and more interest due to its environmental friendly features. A PMSynRel based electric drive is considered as good option due to its high torque density and high efficiency. The main objectives of this thesis work is to develop torque dynamics of such electric drives when operating without a position sensor. The developed torque dynamic can be used to analyze the limits of sensorless strategy when, e.g. anti oscillation control is required.

1.2 Motivation of Hybrid Electric Vehicles

As the concerns of environmental degradation are growing, many countries have made na- tional plans to significantly reduce the oil consumption. More and more strict regulations are pronounced by governments, which manufactures to find alternatives to replace conventional vehicles. Besides the environmental feature, relatively low operational costs is another main motivation of the HEV technology. HEV has the great potential to fulfill the emission requirement while still being able to meet the power demand. The HEV consists of an internal combustion engine (ICE) and at least one electrical machine in the power train. With the help of the ICE, HEVs have larger driving ranges in comparison to the pure electric vehicles (EVs) [8].

1 Chapter 1. Introduction 1.3 Configurations of HEVs

HEVs are typically classified into two basic configurations, series or parallel.

1.3.1 Series HEV Configuration

A series HEV configuration is shown in Figure 1.1 where there is no physical connection between the ICE and transmission. The generator converts the mechanical power (deliv- ered from ICE) to electrical power which can be used either for charging the battery or for propelling the vehicle. The advantages of this configuration is listed as follows: 1. Since the ICE is only used to charge the battery, the operating point can be optimized to achieve a high efficiency. 2. Since electrical machine is used to propel the wheels, which can operate in a wide speed range, the multi-gear transmission can be removed from the power train. However, this configuration requires several energy conversions which lead to a low over- all efficiency. Furthermore, this HEV configuration requires a large electrical machine, therefore, all drivetrain components have to be designed to match the peak power of the electrical machine.

1.3.2 Parallel HEV Configuration

A parallel HEV configuration is shown in Figure 1.2, where the propulsion power is pro- vided by the ICE and/or electrical machine. The major advantage of the parallel HEV configuration compared to the series HEV configuration is that the electrical machine can be used to convert the mechanical power to the electrical power. Thus, the generator can be eliminated. Since the vehicle is propelled by electric-machine and ICE(provided the battery is never be depleted), both of them can be downsized.

1.4 PMSynRel machine in HEV applications

In HEV applications, together with the ICE, the electrical machine is a key component providing driving torque to propel the vehicle. As a known fact, the electrical machine can provide full torque at low speeds (even at stand still) which significantly enhances ac- celeration. [10]. Permanent magnet synchronous machines (PMSMs), induction machines (IMs) and synchronous reluctance machines (SRMs) are the most common types for the HEV applications. Compare to IMs and SRMs, PMSMs provide higher efficiency and higher torque density. However, PMSMs are relatively expensive due to the high price of rare-earth materials. The SRMs provide better efficiency and torque density compared to induction machines and lower cost compared to PMSMs. Furthermore, the operating per- formance of SRM can be improved by adding permanent-magnet in the rotor [12], which

2

1.4. PMSynRel machine in HEV applications

¡¢ £¤ ¥ ¦ §

¨ ©

£



§¤

     © 

£ §¤£

£ `:JI11QJ

  © £

Figure 1.1: Series-HEV configuration: the arrows indicate the possible directions of en-

ergy flow.

 

  

 *



'(# # !)  !  " # ! $ %"&

 

 `:JI11QJ

+(" , %$ 

Figure 1.2: Parallel-HEV configuration. The arrows indicate the possible directions of energy flow.

3 Chapter 1. Introduction known as the permanent-magnet assisted synchronous reluctance (PMSynRel) machines. The permanent magnet in the rotor provides additional permanent torque and therefore increases the torque density. The field-weakening capability of PMSynRel machines is better than PMSMs due to less permanent-magnet.

1.5 Control of PMSynRel in HEV applications

Field oriented control (FOC) is commonly used to control PMSynRel machines to achieve high performance. However, knowledge of the rotor position is required for correct opera- tion. Mechanical resolvers are often mounted on the rotor shaft to detect the rotor position. However, this additional components and their associated cabling may degrade the reli- ability of the overall system and increase the cost. One solution to remove the resolvers is to implement position estimation technology (known as sensorless control). Therefore, reduction of the cost and an improved reliability can be achieved.

1.6 Outline of Thesis

The outline of the thesis is summarized as: Chapter 2: The theory of Field Oriented Control (FOC), Resolver, Hall-effect sensor and strategies of different types of sensorless control are briefly introduced. Chapter 3: Matlab Simulink is introduced in this chapter. Two Simulink models for the PMSynRel are briefly discussed. Chapter 4: Different rotor position detection methods are simulated in Simulink and studied. PLL bandwidth is adjusted to see the impacts on different rotor position detec- tion methods. Harmonic order is also taken into consideration for modeling the Hall-effect Sensor. Chapter 5: The torque dynamics is presented as a matrix based transfer function extracted from the spped responses and torque responses using Identification Tool Box in Matlab. The transfer function was derived in both time and frequency domain. Evaluations and the result of the torque dynamics are also included in this chapter. Chapter 6: The experimental set-up in the lab are stated in this chapter, the experimental results are listed and studied. Chapter 7: This chapter summarizes the conclusion of the work and provides the future work proposals.

4 Chapter 2

PMSynRel Control

In this chapter, the field oriented control strategy is briefly introduced. The resolver and the Hall-effect sensor are studied and presented. Sensorless control strategies for high- speed and low-speed position estimation are also introduced in this chapter.

2.1 Field Oriented Control

Field Oriented Control (FOC), also known as vector control,is to control the stator cur- rents represented by vector. The three phase quantities, e.g. the currents, are measured and converted into α β system by applying Clarke transformation as follows [5]: −

iα = ia (2.1) 1 2 iβ = ia + ib (2.2) √3 √3

Next, the quantities in the α β frame are transformed to the d-q system by applying the − Park transformation provided by the knowledge of the rotor position. The d-q reference frame rotates synchronously with the stator flux, and the d-axis is defined as it is aligned to the rotor flux. The Park transformation is shown as:

id = iα cos θ + iβ sin θ (2.3)

iq = iα sin θ + iβ cos θ (2.4) − where θ is the rotor position. Then the id and iq are controlled to follow the references ref ref id (flux reference) and iq (torque reference). The differences between the measured cur- rents and the references are forced to zero by the PI regulators. The output of the PI ref ref regulators areud and uq , which are transformed to the abc reference frame using the inverse Park transformation [5]. The equations of inverse Park transformation are stated

5 Chapter 2. PMSynRel Control as:

uref = uref cos θ uref sin θ (2.5) α d − q ref ref ref uβ = ud sin θ + uq cos θ (2.6)

2.2 Resolver and Hall-effect sensor

As shown in(2.3)(2.4) and (2.5),(2.6), the rotor position is required to perform FOC. The rotor position can be measured by rotary position sensors. Rotary position sensors can be divided into two groups, absolute and incremental. Absolute sensors can detect the current position of the shaft at any given time, while the incremental sensors can only indicate the motion of the shaft. The rotary position sensors can be mounted either on the shaft, partial-through-shaft or end-of-shaft and the position readings can be either axially or radially [3]. In this work, resolver and Hall-Effect sensors are modeled and studied as examples of the absolute and incremental rotary position sensors, respectively, are studied and modeled. The impacts of both sensors are illustrated and compared in Chapter 4.

2.2.1 Resolver

Resolver is a very common type of rotary position sensor used in PMSynRel. It is usu- ally mounted on the rotor shaft and provides rotor angle information required in FOC. The most common type of resolver may consider as as a small electrical motor having both stator and rotor. The wire winding configuration inside of the resolver, illustrate in Figure 2.1, makes it different than a normal motor. The resolver consists of two stator windings and one rotor winding. The rotor winding refer as the excitation winding will be applied an excitation signal on and the signal will be induced to the stator windings. ref Assume the excitation signal is: U = E sin(ωextt) with a frequency ofωext and ampli- tude E. As shown in Figure 2.1, two stator windings are configured at 90 degrees from each other, the induced excitation signal can be expressed as: Usin = E sin(ωextt) sin(θ),

Ucos = E sin(ωextt) cos(θ), where θ is the actual rotor position and can be determined by dividing Usin and Ucos, (the value of tan(θ) will be given) [3] [9]. The resolver is an analogue device which requires demodulation to achieve digital sig- nals. Resolver-to-Digital Conversion (RDC) is used for demodulating and generating the excitation signals for resolvers [3].

2.2.2 The Hall-Effect sensor

The Hall effect was discovered in 1879 by Dr. Edwin Hall [3]. The principle states that if a conductor, conducting a constant current is exposed into a magnetic field, a voltage will

6

2.2. Resolver and Hall-effect sensor

-

./

0 .

Figure 2.1: Working principle of resolver.

be generated which is perpendicular to the magnetic field and varies with the change-rate of the magnetic field. A Hall-effect sensor measures magnetic field strength, and it used to measure speed as well (e.g.the angular speed of turning shaft), when place the sensor besides the moving magnet (e.g rotor). The sensor will be triggered and a pulse will be produced once the rotor magnet passes. In the meanwhile, the pulse signals will be fed into a counter and the counter will count the number of pulses obtained in a specific time interval. Furthermore, by integration of the angular speed the electrical angular position can be found. The machine system normally consists of three Hall-effect sensors and are placed axially outside the rotor with 120 electrical degree apart. According to this arrangement, the Hall- effect sensors can only provide the position information every 60◦ (electrical degree) [3]. Compared to resolver, Hall-effect sensor can be made very cheap and small. However the low resolution causes the inaccuracy which is not recommended to use in the system with high demanding of the accuracy. Another disadvantage of Hall-effect sensor is the difficulty to operate in strong external magnetic fields environment. On the contrary, The absolute position capability is one of the resolver’s main advantage over incremental Hall- effect sensor, which means the high precision is guaranteed in the system. On the other hand, resolvers are capable of operating in relatively high temperature and shock environ- ments since the configuration is similar to the motor itself. However, resolvers must be calibrated to meet the requirements of the drive systems.

7 Chapter 2. PMSynRel Control 2.3 The Sensorless Control

By using absolute rotatory sensors, required rotor position to FOC can be obtained. Un- fortunately, several drawbacks to have sensors in the system need to be concerned. First of all, the drive train has a limited space. Therefore, when designing the motor, the factor of the physical size needs to be considered. In addition, the reliability of the sensors re- lies on several respects, such as vibrations, dirt and disturbance. Cost is another issue for manufactures to premeditate. To reduce the cost and to improve the reliability, many rotor position estimation methods (or sensorless control) have been proposed to remove the ro- tary sensors. All the presented methods utilize the machine itself as a sensor and observe the rotor position from the electrical quantities (voltages or currents). In principle, there are two main sensorless control approaches. One is to use the back electromotive force (EMF) estimation. This method has high accuracy from the medium to high speed range, but may fail at the low or zero speed since the back EMF is gradually reduced when speed decreases. The other one, known as signal injection method, injects high frequency sig- nals to the stator voltage, so that the rotor position can be detected from the corresponding results of the interaction of the high frequency signal and the rotor saliency [11]. Theoret- ically, signal injection method can be used for all speeds, including standstill. However, this method might introduce additional noise, torque ripple and losses [12]and therefore, only considered at low-speed range.

Back EMF method

The back emf is defined from the PMSynRel model which is given by a set of equations [6]:

did ud = Rsid + Ld ωrLqiq (2.7) dt − di u = R i + L q + ω L i + e (2.8) q s q q dt r d d f

Where, the back emf ef is ef = ωψpm. ud and uq, id and iq are the stator voltages and cur- rents in the rotor reference frame, respectively, and can be measured. R is the resistance,

Ld,Lq are the machines inductances. ψpm is the flux generated by permanent magnets.

Thoses are all approximately known quantities. Therefore, ωr, electrical rotor speed can be solved from the motor equations. Using the estimated rotor coordinates, (2.7) and (2.8) are transformed into the estimated rotor reference frame by applying a position error θ˜r. The voltage components in the estimated rotor frame are expressed by the following equa-

8 2.3. The Sensorless Control tions [4]:

2 2 ude = Rside ωˆr(ide cos θ˜r(Ld Lq)+ iqe(Lq cos θ˜ + Ld sin θ˜r)) ωrψm sin θ˜r − − − (2.9) 2 2 uqe = Rsiqe ωˆr( ide(Lq sin θ˜r + Ld cos θ˜r) iqe cos θ˜r(Ld Lq)) + ωrψm sin θ˜r − − − − (2.10) where θ˜r=θr θˆr is an unknown value while motor parameters are precisely known. ”de” − and ”qe” denote the quantity is in the estimated rotor reference frame. The estimator can estimate the steady state voltage by the following expression:

uˆde = Rˆside ωˆrLˆqiqe (2.11) − uˆqe = Rˆsiqe +ˆωrLˆdiqe +ˆωrψˆm (2.12)

The voltage errors for the d,q axes can be obtained by subtracting(2.11)(2.12) from (2.9)(2.10):

ude uˆde =u ˜de = ωˆr sin θ˜r((Ld Lq)(ide cos θ˜r + iqe sin θ˜r) ωrψm sin θ˜r (2.13) − − − − uqe uˆqe =u ˜qe = ωˆr sin θ˜r((Ld Lq)(ide cos θ˜r iqe sin θ˜r) ωrψm cos(θ˜r 1) − − − − − − (2.14)

Assuming no parameter errors and the machine is non-salient( L = 0), u˜de can be sim- △ plified as:

ude uˆde =u ˜de = ωrψm sin θ˜r (2.15) − − Therefore, the position error used for the back-EMF estimator is:

u˜de sin θ˜r = (2.16) −ωrψm according to(2.16), it is not difficult to find out once the motor speed is low or at standstill,

θ˜r is significant. In another word, the back-emf method might fail in such conditions.

Signal Injection Method

The main drawback of back-emf estimator is the instability when operating at low and zero speed. Therefore, in the low speed range, high frequency signal injection methods are studied and presented. The injected voltages can be either rotating or pulsating to ex- tract the information of rotor position [7]. A transient state of the machine is created when injecting a high frequency voltage. The resultant currents contain the rotor position infor- mation provided by the inductance variations (Ld = Lq). Figure 2.2 describes the general 6 idea of signal injection method. The details are given for pulsating voltage injection method in this chapter as an example to show the mathematical model of this signal injection scheme. When pulsating voltage

9 Chapter 2. PMSynRel Control

vector signal uc = vccos(ωct)+ j0 is applied to the estimated dˆ-direction with the am- plitude of injected voltage vc and frequency ωc, Rs is negligible compared to ωcL, since the injection frequency is in the kHZ region. Therefore, the PMSynRel can be modeled as pure inductive load:

dicde ucde Ld ωrLqicqe (2.17) ≈ dt − dicqe ucqe Lq + ωrLdicde + ef (2.18) ≈ dt here, ef can be omitted since it is rather small. Equations (2.17) and (2.18) elaborates that the qˆ axis current also oscillates even without any injected signal when the rotor rotates. (dˆ and qˆ axis are coupled) This should be avoided since when the position error is zero, the goal is to have current only in the dˆ axis oscillate. This problem can be solved by adding a suitable signal in the qˆ axis which makes icqe =0. Now zero icqe is substituded into (2.17) and (2.18),which gives:

vc sin(ωct) icde = (2.19) ωcLd

ucde = vc cos(ωct) (2.20) ωr ucqe = vc sin(ωct) (2.21) ωc ucqe is assumed to 0, since the study only focuses at the low speed region (ωc ωr). ≫ Therefore, the high frequency flux in the estimated reference frames can be expressed as:

vc sin(ωct) ψcde = (2.22) ωc

ψcqe =0. (2.23)

When transform ψd and ψq from rotor reference frame to α, β stationary reference frame with the frequency of the injected voltage, ωc, following equations can be obtained:

ψcα =(L0 + L2 cos2θr)icα + L2 sin 2θricβ (2.24)

ψcβ = L2 sin 2θricα +(L0 L2 cos2θr)icβ (2.25) − where iαβ are the measured current vector of the injection frequency components, L0 = Ld+Lq Ld−Lq 2 and L2 = 2 . Equation (2.22) and (2.23) can be transformed in to the station- ary reference frame and together with (2.24) and (2.25), the measured current vector in stationary reference frame can be expressed as:

vc Ld + Lq Ld Lq ıcα = sin(ωct) ( cos θˆ) − cos(2θr θˆ)) (2.26) 2ωc LdLq − LdLq − vc Ld + Lq Ld Lq ıcβ = sin(ωct) ( sin θˆ) − sin(2θr θˆ)) (2.27) 2ωc LdLq − LdLq −

10 2.3. The Sensorless Control afterward, equations (2.26) (2.27) are transformed to the estimated rotor reference frame as:

vc Ld + Lq Ld Lq ıcde = sin(ωct) ( − cos(2θ˜r) (2.28) 2ωc − LdLq − LdLq vc Ld Lq ıcqe = sin(ωct) ( − sin 2θ˜r) (2.29) − 2ωc LdLq

Now the error information θ˜r is contained into the current component of estimated q-axis, the high frequency from the injected voltage can be extracted by applying a band pass filter. Then, followed by the demodulation process to get a pulsating DC signal. In the end the error signal will be filtered by a low pass filter and the result is the input signal for phase locked loop (PLL). For rotating voltage vector injection method, instead of pulsating signal, the injected volt- age is a rotating voltage vector and inject in the stator reference frame. In this thesis work, pulsating voltage vector injection is mainly studied.

Phase locked loop structure

The phase locked loop structure is to extract the rotor position. The algorithm of a PLL observer is as follows [13]:

ωˆ˙ r = k1ε (2.30) ˙ θˆr =ω ˆr + k2ε (2.31) where ωˆr is the estimated rotor speed, θˆr is the estimated rotor position, k1,k2 are esti- mator gains. ε, is the error signal can be obtained from using either back-EMF estimate or using signal injection method. The detail information have been given in the first two parts of this section. Generally, for both two methods, the error signal information is in the form of: ε = θ˜r. The control method of PLL can be explained as follows. Assume the angular error signal is small, therefore ε can be expressed as: ε θ˜r. In this case, if ≈ θr > θˆr, then k1 > 0 provides ωr will increase. The system will continually follow and update ωˆr as long as θ˜ = 0. Moreover, as stated in equation (2.31), θˆ is updated as the 6 integral of speed estimate together with the correction of error signal, k2ε. The characteristic polynomial, c(p), indicating the error dynamics [13], is found as

2 c(p)= p + k2p + k1. (2.32)

To obtain a well damped system, the poles are placed at p = ρ, where ρ is a positive − constant, provided by selecting k1,k2 as [13]:

2 k1 = ρ ,k2 =2ρ (2.33)

11

Chapter 2. PMSynRel Control

12 3 4 56738 59

:;985<7

=><359 >3? 7@8 74 U

A BC

AC

D 76; 4 2 958; E

1E 7F2 73@ G

HI8>658; E

Figure 2.2: Signal injection in PMSynRel Model.

12 Chapter 3

Simulation Models

In this chapter, the simulation environment including the simulation tools and methods are introduced. Two different simulation models for the vector controlled PMSynRel are briefly presented.

3.1 Matlab/Simulink

To study the impacts of different rotatory position sensors and the sensorless control strat- egy, a simulation model is implemented in Matlab/Simulink.

3.1.1 Basic Simulink Model

As a starting point, a simple simulation model, shown in Fig.3.1 , was implemented in Matlab/Simulink. As seen, this model consists of a current controller (FOC) and a PM- SynRel model. The impacts of discretisation and PWM are disregarded which means the voltage references commanded by the current controller are directly sent to the PMSynRel model. The PMSynRel machine is modeled as follows:

ψd = Ldid + ψpm (3.1)

ψq = Lqiq (3.2) 1 ψd = (ud Rid + ωψq) (3.3) s − 1 ψq = (uq Riq + ωψd) (3.4) s − id =(ψd ψpm)/Ld (3.5) − iq = psiq/Lq (3.6)

This basic model is used to get familiar with the modeling methods and Simulink program, saturation effect, cross couplings effects are neglected in this basic model. How-

13

Chapter 3. Simulation Models

M N L M N WKc

]

Y MR R PKN Y Z K N R Z XXPR

J K L M N OPQPRPKS P TUVKWX

WS UKP UKPWR

_ ` ` a b

PPcdWSe fUVKWX

\

Y

[\] ^

Figure 3.1: Basic Simulation Model. ever, those effects are exists in the real life, which means in order to obtain a precise machine model those phenomena have to be taken into account.

3.1.2 Advanced Simulink Model/Flux map model In this advanced Simulink model, FEM method is used to identify the nonlinearity of the machine and define the data of ”flux-map”. ”Flux map” which contains the nonlinearity (such as saturation, cross saturation and slot effects) of the machine is included in the advanced Simulink model. Further more, the current controller is implemented in the C- code to include the effect of discretized sampling instead of using Simulink blocks. In addition, Pulse Width Modulation (PWM) is implemented in the system to supply the voltage to the PMSynRel machines.

14 Chapter 4

Implementation of rotor position detection in Simulink

In Chapter 2, different rotor position detection methods of the PMSynRel have been discussed theoretically. Modeling of these methods in Simulink environment is presented in this Chapter. Hall-effect sensor and sensorless control are mainly studied.

4.1 Modeling of rotatory position sensors

4.1.1 Resolver modeling

As described in chapter 2.2.1, the resolver provides the absolute rotor position at a fairly high resolution. If the measurement noises are disregarded the rotor position given by resolvers can be assumed the same as the real rotor position. Therefore, for modeling the resolver in Simulink, the real rotor position, θr, obtained from the PMSynRel model is directly used as an input to the current controller (FOC).

4.1.2 Hall-effect sensor modeling

The Hall Effect sensor provides the rotor position every 60◦. Figure 4.1 shows a com- parison of the electrical angle measured by the Hall-effect sensor θhall and the real rotor position θr. As can be seen from Figure 4.1, the difference between the real rotor position and the measurements from the Hall-effect sensor are significant. In another word, if the measured rotor position from hall sensor, θhall, is given to the current controller as an input without any further processing, PMSynRel performance will be very poor(e.g. lots of torque rip- ple and the ripple frequency increases with speed [3]). To improve this, Fourier analysis is used to derive an equation in the propose of subtracting certain harmonics from the

15 Chapter 4. Implementation of rotor position detection in Simulink

6

5

4 (rad)

all 3 h θ r θ 2

1

0 0 0.1 0.2 0.3 0.4 0.5 0.6 t (s)

Figure 4.1: Comparison of θhall and θr:θhall is plotted by dashed green line and θr is plotted by solid blue line.

Hall-effect sensor measurement. This equation is stated as following [?].

k th ( 1) π F = − sin(k(θˆr + ) 6) (4.1) dif 3k 6 × This equation demonstrates at kth harmonic order, the way to calculate the difference ( th ˆ Fdif ) between the Hall-effect sensor measurement and real rotor position, where θr is the estimated rotor position estimated in PLL. In theory, if k is infinite, and θˆr is as accurate th as the real rotor position, the sum of Fdif is exactly the same as the difference between the rotor position detected by Hall-effect sensor and the real rotor position. The comparison th between θhall θr and F is illustrated in Figure 4.2. The Hall-effect sensor mea- − dif surements can be optimizedP by using (4.1). The sum of (4.1) with all harmonic orders is subtracted from the original measurements θhall to obtain the optimized Hall-effect rotor position signal. The equation is expressed as :

th θopth = θhall Fdif (4.2) − X where θopth can be seen as the optimized Hall-effect sensor signal. The optimized rotor position from Hall-effect sensor is compared with the real rotor position in Figure 4.3.

Compared to Figure 4.1, Figure 4.3 indicates much better consistency between θhall and

θr. However, some noises exists every 60 electrical degree which is caused by the resolu- tion of the Hall-effect sensor and this can be improved with PLL estimator. The optimized Hall-effect sensor rotor position can be used for calculating the error signal ε, to input to PLL estimation. The algorithm of PLL estimator has already been introduced in the last

16 4.2. Modeling of sensorless control

0

−0.1

−0.2

−0.3 (rad) r θ −0.4

−0.5

−0.6

0 0.1 0.2 0.3 0.4 0.5 0.6 t (s)

th th Figure 4.2: Comparison of θhall θr and F :θhall θr is plotted by blue line, F − dif − dif is plotted by green line P P

part of section 2.3. Figure 4.4 presents the comparison θr, θhall and θhopt with PLL es- timation. In this Figure, θhopt with PLL estimation gives a comparably best ”follow-up” result. Even though, this method is not recommended since the performance will not be stable, especially while, for example, with fast and frequent speed variations, Hall-effect sensor can not respond fast enough to keep up with the changes.

4.2 Modeling of sensorless control

4.2.1 Signal Injection

In this study, only low-speed region is considered. Therefore, the signal injection method is implemented in Simulink. As described in section 2.3, pulsating voltage vector injection method is mainly studied and is the sensorless control algorithm implemented on the Simulink Model. How this method is achieved in Simulink model is described in Figure 4.5, this logic can be implemented by adding blocks in Simulink as well as by C-code (S-function).

17 Chapter 4. Implementation of rotor position detection in Simulink

6

5

4 (rad)

r 3 θ

2

1

0 0 0.1 0.2 0.3 0.4 0.5 0.6 t (s)

Figure 4.3: Comparison of real rotor position and the optimized hall sensor rotor position . θopth is plotted in green line, θr is plotted in blue line

4.3 Result of the Hall-effect sensor and sensorless control

ω˜r is the difference between the real rotor speed ωr and the estimated speed ωˆ. The elec- trical angle θr is the integration of ωr. With the implementations of different control meth- ods into the Simulink model, either by comparing the simulation result of ω˜r or θ˜r is a good reference to observe the impacts of implementing different rotor position detection models. Hall-effect sensor and sensorless control (based on pulsating signal injection) are implemented in Simulink. They are compared with respect to ω˜r. The PLL bandwidth ρ is an important parameter to the system by using different control methods. In this section, only the Hall-effect sensor and the sensorless control(based on the pulsat- ing voltage vector injection method) is compared due to the high resolution of resolver ensure the the resolver gives absolutely a better performance. Sensorless Control By giving a step torque reference and varying the PLL bandwidth ρ, how ρ impacts the simulation results are observed in Figure 4.6. Although Figure 4.6 illustrates the lower

ρ, the better ω˜r is obtained (ω˜r approaching to 0), this does not mean it has the absolute positive impact for the whole system. PLL requires more responding time with the small ρ. Meanwhile, when ρ is big, the system will be more sensitive which means more noises are detected. In this simulation case, with ρ reaches 107, the model is unstable.

18 4.3. Result of the Hall-effect sensor and sensorless control

6

5

4

(rad) 3 r θ

2

1

0 0 0.1 0.2 0.3 0.4 0.5 0.6 t (s)

Figure 4.4: Comparison of θr, θhall and θhopt with PLL θr : blue line, θhall : green slash PLL line ,θhall : red dot line

Hall-effect sensor In the Hall-effect sensor simulation, the same step torque reference as used in signal injection modeling is given.Both ρ and harmonic orders, k, varies sequently to observe the impacts from different parameters. As shown in Figure 4.7, When different ρ are applied to the system, ω˜r is getting smaller while ρ becomes small. Again this does not mean it has better influences to the system. Some pulses are appeared in this figure, which is caused by (4.1). θˆr estimated from PLL is using in this equation, which might cause some periodic errors. Once θr is substituted in this equation, the pulses vanish. When different harmonic order numbers, k, applies to the Hall-effect sensor modeling, different results of ω˜r can be obtained. Ideally, high harmonic order number gives more accurate result, if uses real electrical angle θr as the input to (4.1). However, it is not realistic, since the real angle is not known. Instead, estimated angle θˆr is used in (4.1) to subtract the certain harmonics. Therefore, if the position error is significant, and k is th large, Fdif might not accurate which impacts the result of ω˜r at the same time. From FigureP 4.8, when ρ=60, k = 9, 7, 5, 3, 1 is applied. Better results are found when k=3 and 5. Anyhow, it is difficult to predict the value of k to achieve the smallest ω˜r, and to summarize how does the value of k vary with different PLL parameters applied to the model. Simulation is required to obtained the suitable k.

19

Chapter 4. Implementation of rotor position detection in Simulink

g hij

v w v

l q

U y~

v wv w t t wu t

klmno p mqr yz h{ m| |} ~ hz k yll l zhip kl {

stuvw v t v t uu v wv w

im q n l lmqp q p l ml mz h{ m| o} ~ hz

x wu hip

w uv

g hij  zz € h ml

 t uwv t

m{ | n h p

‚tƒ w uv

 zz € h ml

t „ v v t v t

 l q mzzm| n n l l

‚‚



t wu t v t

mll l zhip zh h p

Figure 4.5: Logic diagram for voltage vector injection method

1 0 (rad/s) ˆ ω −1 1.5 2 2.5 3 3.5 4 4.5 5 t (s),ρ=100 1 0 (rad/s) ˆ ω −1 1.5 2 2.5 3 3.5 4 4.5 5 t (s),ρ=80 1 0 (rad/s) ˆ ω −1 1.5 2 2.5 3 3.5 4 4.5 5 t (s),ρ=10

Figure 4.6: Impact of ρ to ω˜r by sensorless control.

20 4.3. Result of the Hall-effect sensor and sensorless control

ρ=100 10 5 r ˜ ω 0 −5 0.5 1 1.5 2 2.5 ρ=70 10 r ˜

ω 0 −10 0.5 1 1.5 2 2.5 3 ρ=50 10 r ˜

ω 0 −10 0.5 1 1.5 2 2.5 3 ρ=30 10 r ˜

ω 0 −10 0.5 1 1.5 2 2.5 3 t(s)

Figure 4.7: Impact of ρ to ω˜r by using Hall-effect sensor modeling.

21 Chapter 4. Implementation of rotor position detection in Simulink

harmonic order=9 2

0 (rad/s) r ˜ ω −2 0.5 1 1.5 2 2.5 3 harmonic order=7 2

0 (rad/s) r ˜ ω −2 0.5 1 1.5 2 2.5 3 harmonic order=5 2

0 (rad/s) r ˜

ω −2 0.5 1 1.5 2 2.5 3 harmonic order=3 2

0 (rad/s) r ˜ ω −2 0.5 1 1.5 2 2.5 3 harmonic order =1 (without Fourier) 2

0 (rad/s) r ˜ ω −2 0.5 1 1.5 2 2.5 3 t(s)

Figure 4.8: Impact of k to ω˜r by Hall-effect sensor modeling

22 Chapter 5

Transfer Function

Transfer functions are used to capture the dynamics of systems. For the PMSynRel model, anti-oscillation controller can be designed based on the identified torque dynamic (trans- fer functions). The transfer functions identified in this chapter are based on the simulation results in Matlab environment. The same methodology can be used in real application to identify the PMSynRel system. The PMSynRel model is seen as a MIMO system and the transfer function is derived from the simulation results by using System Identification Toolbox. The comparison of results from the transfer function and the full simulation will be conducted. All the simulations in this chapter are based on the basic Simulink model introduced in Chapter 3.

5.1 Set input and output

In HEVs applications, the PMSynRel machine is torque controlled. And the position is required in FOC control which results the speed ωr. Torque reference has impact on both torque output and ωˆr. Likewise, speed reference has certain impact on torque output as well. The system input and output of transfer function can be presented as below: Input: U1: Torque reference U2: Speed reference Output: Y1: Output torque Y2: Output speed (estimated speed) The modeling system can be defined as:

Y1(s)= G11U1(s)+ G12(s)U2(s) (5.1)

Y2(s)= G21U1(s)+ G22(s)U2(s) (5.2)

23 Chapter 5. Transfer Function where G11,G12,G21andG22 are the transfer functions derived from different simulations.

G11 is the transfer function between Tref and the output of torque, Tout. G12 is the transfer function from ωref to Tout. G21 represents the relationship between Tref and ωˆr. Last, G22 defines the transfer function of ωref and ωˆr. The layout of the whole system is shown in Figure 5.1.

Figure 5.1: Transfer function system layout

5.2 Identification and evaluation process

Matlab Identification Toolbox is used to derive the transfer functions G11,G12,G21,G22. And this toolbox can be used to analyze the data in both frequency domain and time domain. In this thesis work, both methods are studied. The sequence of how to identify and evaluate the transfer functions for both time domain and frequency domain can be described in Figure 5.2.

5.2.1 Transfer functions identification and evaluation process in time domain In this section, procedures described in Figure 5.2 are presented in details for time domain data. Certain simulations with the selected input reference signals need to be conducted for the input to the identification toolbox. To model the time domain data, step reference signals are selected as the reference signals. To obtain each transfer functions, different reference signals are defined in Table 5.1. Then, based on the simulation results (full simulation), Matlab Identification tool box is used to derive the transfer functions. The general procedure for using Matlab Identification tool box is briefly introduced as below, in Figure 5.3. For example to identify G11, Tref and Tout are the input and output for

24

5.2. Identification and evaluation process

†‡ˆ‰ Š‹Œ‡Ž ‡Œ ‘ ’“‡”Ž’‘ ‡Ž• ‰Œ

–‰Œ • ‰Œ “‡”Ž‹Š“

—‹ŒŠ‹˜ ™‘ ’ŽŒ ‡š‡›‹Œ‡Ž œ Š˜

œž‹Ž“š’ž š‰Ž › Œ ‡Ž “  ˜Œ ‹‡Ž’‘

’ž‡š‡›‹Œ‡Ž  š Œ  ’ Œ ž ‹Ž“š’ž

Ÿ š‰Ž › Œ ‡Ž “ ‡Ž †‡ˆ‰ Š‡Ž

Figure 5.2: Identification and evaluation process for transfer functions

”work space variable”. ”Process models” is the estimation method to use for identifying G11. The procedure showing in Figure 5.3 can only identify one transfer function at a time, repeat work is required for identifying the rest of the transfer functions, i.e. G12, G21 and G22. Afterwards, once G11, G12, G21 and G22 are defined, the transfer function matrix G(s)= (G11(s) G12(s) can be determined. Therefore, G(s) can be modeled in Simulink with  G21(s) G22(s) reference signals Tref ,ωref by using equations (5.1) and (5.2). The output signals Tout, ωˆr can be compared with the full simulation by using the same input reference signals. The results of the output signals between the full simulation and the transfer function matrix simulation are shown in Figure 5.4 and 5.5. Figure 5.4 compares the result of Tout with step reference on both Tref and ωref . The step reference signals are already defined in

Table 5.1. Tout of the transfer function matrix model tracks the full simulation model in the steady state.(when the torque reach 5 Nm). The consistency at the transient state is poor.(at step time 1.2s). In the same way, ωˆr is compared in Figure 5.5. The consistency of speed output, ωˆr is better than torque output Tout at both transient and steady states.

25 Chapter 5. Transfer Function

Table 5.1: Reference signals in time domain Tref (U1) Nm ωref (U2) (Hz) Tout(Y1) (Nm) ωˆr(Y2) (Hz) G11(s) step signal (0-5) 2 (constant) output value – at step time 1.2s G12(s) 5 (constant) step signal (0-2)at output value – step time 1.2s G21(s) Step signal (0-5) 2 (constant) – output value at step time 1.2s G22(s) 5 (constant) step signal (0-2)at – output value step time 1.2s

5.2.2 Transfer functions identification and evaluation process in fre- quency domain

The transfer function matrix, G(s) derived within the time domain can only fit the time domain input reference (step reference, constant reference etc). However, if frequency domain input references are applied in the full simulation models(sinusoidal references), G(s) must be derived again in frequency domain from Matlab Identification Toolbox. Similar as section 5.2.1, reference input need to be identified to the full simulation model. Table 5.2 contains the information of selected reference input. Here Amp=1 is used for the reference inputs. Unlike in section 5.2.1, reference inputs and output can not be used directly at frequency domain in Matlab Identification Toolbox. Instead, amplitude (gain) and phase shift of the input reference and output are used as the input information in Mat- lab Identification Toolbox.

Bode plot With the amplitude (gain) and phase shift information provided, Bode plots can be gen- erated. Bode plots are a very useful way to present the gain and phase of a system as a function of frequency [1]. It is a usually a combination of a magnitude plot and a phase plot. The Bode magnitude plot is expressing the gain of the transfer function, and the Bode phase plot expresses the frequency response phase shift [2]. Bode plots are an ef- ficient evidence to evaluate if the system have lost a lot of gain or have a lot of changes on phase shift with a certain frequency range. Several simulations with different cut-off frequencies of low-pass, high-pass filters and different bandwidth of the PLL estimator have been conducted to optimize the PMSynRel model which is evaluated by Bode plots. The PMSynRel model considered in this chapter is the basic PMSynRel for simplicity. Furthermore, reference input signal is given at low speed range which is from 0-40 Hz. The speed at 25 Hz is set as reference checking point point. The gain and phase shift is compared at 25 Hz with different settings of the cutoff frequencies (high-pass filter ωnh, low-pass filterωnl)and PLL bandwidth ρ. The initial values of ωnh, ωnl and ρ are 5 Hz, 40

26

5.2. Identification and evaluation process

¡¢££¤¥¦ §¨¦ ¤¥© ª

« ¬­ ®­¯ ° ­±

¥ © © ¢ © ©

²³°

© ¤£

« «´«µ ­ « ¶ ®

¦ ¤¥© © ¢¥ ¢ ¢

° ¶«

¡· ¢ ¢ ¤ £ ¤

¸ ­« « ¹ ±

¢ £ ¥ ¥ §¨£ ¢ ©

­ ­ ° µ « ­

¦ © ª ¤ © ¢¥ ¥ ¦

« ¹ º » ± ¼

¥ © © · ¤ ¢

°¹­µ ½­±«­¯®

¤ ¤

°

¡· ¢ ¢ ¤ © · ¤

° « ­ °

¤ © £ © ¤ £ ¤©· ¢ ¦

± ° ´«

Å ¢ ¢ Ƥ © © ÂÃÄ

° « ­ ± ­ °´ ± ´º µ « ­ ­®º­

¾ © £ © ¤ © · ¤ © ¥ ¤ ¥ © ¢¥ ¥ ¦ ¤¿ © ¤ © · ¤

± °º® ¯³ µ µ ¼« À ¬ ® º ¹ º Á« ¯ °

¤ © · ¤ ¥ § ¢¦ ¤ ¢ © © ª © · © · ¤ ¤ ©

´« º ¯ ±°

© ¥ £ ¤ ÂÃÄ

Ç ¯ ° ´«

¢ ¢¦ ¤ © © ÂÃÄ

È µ ± ± ­ °´ ±

¤ ¢ ¦ © · ¤ © ¥ ¤

´º µ «

¥ © ¢¥

Figure 5.3: Procedure for using Matlab Identification tool box in time domain

Hz and 94.25 rad/s, and the Bode plots obtained in Figure 5.6. This figure shows one ex- ample for the Bode lots at the initial values, it is found that when the speed is at reference checking point (25 Hz), the gain ratio is only 0.2655, too low to the system. To increase the gain, several combinations of ωnh, ωnl and ρ are adjusted and the results are shown in Table 5.3. The magnitude and the phase shift is highlighted at the reference checking point (25 Hz). Table 5.3 indicates that the PLL estimator bandwidth has a great impact on the gain but rather small impact on the phase shift. When ρ is increased from 15 2π rad/s to 20 × 2π rad/s, the value of magnitude gain increases nearly 3 time, from 0.26 to 0.68. It also × increases the phase shift, though not as much as the gain. The Bode plots in Figure 5.7 shows the change of the gain and phase shift when ρ is increasing from 15 2π rad/s to × 20 2π rad/s with applying the same cut-off frequencies. When ρ=30 2π rad/s, with × × the same cut-off frequencies, the sensorless control becomes unstable, but with adjusting the cut-off frequencies of ωnl and ωnh, higher gain and less phase shift can be obtained.

27 Chapter 5. Transfer Function

7 Full Simulation 6 TF

5

4

3 Torque (Nm) 2

1

0

1.16 1.18 1.2 1.22 1.24 t (s)

Figure 5.4: Comparison of Tout in full simulation model and transfer function matrix model

For this system, the maximum PLL bandwidth can be reached is 35 2π rad/s, otherwise, × the system is unstable. Figure 5.8 presents the magnitude change while vary the cut-off frequency of low and high pass filter with keeping ρ unchanged. The carrier frequency of the injection signal has a great impact on the phase shift. However, the frequency of the carrier signal is limited in the lab which means to keep ωc to 500 2π is more reasonable. × ωnh=5 2π rad/s, ωnl=70 2π rad/s and ρ=30 2π rad/s are selected to the simulation × × × based on the Bode plot evaluations. The Bode plots corresponding to G11, G12, G21 and G22 are plotted in Figure 5.9 and 5.10 to derive the transfer functions. From Figure 5.9, it shows the impact from Tref to ωˆr is rather small which can be assumed the impact is zero.

Results and Evaluations When the cut-off frequencies of the high pass and low pass filters are selected and with the determined bandwidth of PLL estimators, full simulations can be done in Smulink to obtain the magnitude gain and phase shift from input reference to output. The method of using Matlab Identification tool box to identify the transfer functions with frequency domain are more or less the same as the method used for time domain. The main dif- ferences between the procedures of using identification toolbox for identify the system in frequency domain and the procedures described in Figure 5.3 for time domain system

28 5.2. Identification and evaluation process

16

14

12

10

Full Simulation 8 TF (rad/s) ˆ ω 6

4

2

0

0.5 1 1.5 2 2.5 t (s)

Figure 5.5: Comparison of ωˆr in full simulation model and transfer function matrix model estimation are listed: 1. select ”Frequency Domain” in ”Import Data” section with ”Fre- quency Function (Amp/phase) as ”Data Format for Signals”. 2. Evaluate the results by clicking ” Frequency resp” instead of ”Model output”. By using the Matlab Identification tool box, the system can be identified as:

G11(s)= GTref Tout (5.3)

KpT T (1 + T zT T (s)) = × × 2 (5.4) 1+(2 (ZetaT T ) (TwT T )) (s)+(TwT T (s)) × × × ×

Here, KpT T =0.99959 and TwT T =0.0060441 ZetaT T =3.4924 and T zT T =0.041354

G21(s)= GTref ωˆr (5.5)

KpTwh (1 + T zTwh (s)) = × × 2 1+(2 (ZetaTwh) (TwTwh)) (s)+(TwTwh (s)) (1 + Tp3Twh (s) × × × × × × (5.6)

KpTwh =4.327e 007 and TwTwh =0.0091269 − ZetaTwh =0.25546, T zTwh =6.235 and Tp3Twh =0.015478

29 Chapter 5. Transfer Function

Table 5.2: Reference signals in frequency domain Tref (U1) Nm ωref (U2) (Hz) Tout(Y1) (Nm) ωˆr(Y2) (Hz) G11(s) Amp cos(ωt) ω 2 (constant) output value – range:0-40Hz· in- creasing rate: 0.5 Hz G12(s) 5 (constant) Amp sin(ωt) ω output value – range:0-40Hz· in- creasing rate: 0.5 Hz G21(s) Amp cos(ωt) ω 2 (constant) – Measured value range:0-40Hz· in- creasing rate: 0.5 Hz G22(s) 5 (constant) Amp sin(ωt) ω – Measured value range:0-40Hz· in- creasing rate: 0.5 Hz

G22(s)= Gωref ωˆr (5.7)

KpTwwh (1 + T zwwh (s)) = × × 2 1+(2 (Zetawwh) (Twwwh)) (s)+(Twwwh (s)) (1 + Tp3wwh (s) × × × × × × (5.8)

Kpwwh =1.0026, TwTwh =0.0051808, ZetaTwh =0.45176

T zTwh = 0.0015445 and Tp3Twh =0.0050678. − The estimation result of G12 is quite poor by using ”process model” estimation method. Therefore, another simulation method ”Linear Parametric Models” from identification tool box is selected. And the transfer function of G12 can be identified as:

G12(s)= Gωref Tout = arx[datasource, orders,’Focus’,’Simulation’,’InitialState’,’Estimate’] (5.9)

Again, as described in section 5.2.1, G(s) can be modeled in Simulink, and the out- put can be compared with the full simulation results when the same input references are given to the full simulation model. The comparing results for each transfer function G11,G12,G21,G22 are shown in Figure 5.11. Further more, various simulations are car- ried out with different reference input signals to evaluate G(s) in this stage, and the details of reference input signals are listed in Table 5.4 with Amp=1.

30 5.2. Identification and evaluation process

1.5

1

gain (−) X: 25 0.5 Y: 0.2655

0 0 5 10 15 20 25 30 35 40 Hz

0

−100

degree −200

−300 0 5 10 15 20 25 30 35 40 Hz

Figure 5.6: bode plot for compare ωref to ωˆ at ωnh=5 Hz, ωnl =40 Hz,ρ =94.25 rad/s

Table 5.3: ωref -ωˆ at sinusoidal input signal is 25 Hz ◦ ωc (rad/s) ωnh (rad/s) ωnl (rad/s) ρ (rad/s) Magnitudegain (–) Phase shift ( ) 500 2π 5 2π 40 2π 15 2π 0.2655 -217.4 500×2π 5×2π 40×2π 20×2π 0.6861 -208.5 × × × × 500 2π 10 2π 40 2π 20 2π 0.6601 -208.1 500×2π 25×2π 40×2π 20×2π 0.5543 -212.3 500×2π 25×2π 50×2π 20×2π 0.4745 -187.4 × × × × 500 2π 5 2π 15 2π 30 2π outofcontrol outofcontrol 1000× 2π 40× 2π 80×2π 30×2π 0.7672 -81.06 × × × × 1000 2π 50 2π 100 2π 30 2π 0.7294 -83.16 1000×2π 30×2π 70 ×2π 30×2π 0.794 -79.2 500 ×2π 5 ×2π 70×2π 30×2π 0.98 -117.7 × × × ×

31 Chapter 5. Transfer Function

1.5 ρ=15

1 ρ=20

0.5

0 0 5 10 15 20 25 30 35 40

0

−100

degree −200

−300 0 5 10 15 20 25 30 35 40 Hz

Figure 5.7: Bode plot for ρ =15 2π rad/s and 20 2π rad/s. × ×

32 5.2. Identification and evaluation process

1.5

1

0.5

0 0 5 10 15 20 25 30 35 40

0

−100 ωnh =15Hz, ωnl =90Hz

degree −200 ωnh =15Hz, ωnl =70Hz

ωnh =5Hz, ωnl =70Hz −300 0 5 10 15 20 25 30 35 40 Hz

Figure 5.8: bode plot for ρ =30 2π rad/s, under ωnh=5 2π,15 2π rad/s ωnl =70 2π,90 2π rad/s × × × × ×

33 Chapter 5. Transfer Function

1.5 0.03 ω-ˆω ω-T 1 0.02

0.5 0.01

0 0 0 10 20 30 40 0 10 20 30 40

0 0

−50 −100

−100 −200 degree −150 −300

−200 −400 0 10 20 30 40 0 10 20 30 40 Hz

Figure 5.9: bode plot for ω-ωˆ and ω-T ρ=30 2π rad/s,ωnh=5 2π rad/s, ωnl =70 2π rad/s × × ×

x 10−4 1.01 6 Tref -T T ω 1 ref -ˆ 4 0.99 2 0.98

0.97 0 0 10 20 30 40 0 10 20 30 40

0 0

−100 −5 −200 −10 −300

−15 −400 0 10 20 30 40 0 10 20 30 40 Hz Hz

Figure 5.10: bode plot for Tref -T and Tref -ωˆ ρ=30 2π rad/s,ωnh=5 2π rad/s, ωnl =70 2π rad/s × × ×

34 5.2. Identification and evaluation process

G11: Tref -T G12: ωref -T 1 5.05

0.5

0 5 Full Simulation Full Simulation −0.5

Torque (Nm) TF Torque (Nm) TF −1 4.95 0.05 0.1 0.15 0.2 0.25 0.3 0.1 0.2 0.3 0.4 t (s) t (s) G21: Tref -ˆω G22: ωref -ˆω 13 1

0.5

12.5 0 (rad/s) Full Simulation (rad/s)

ˆ ˆ Full Simulation ω ω −0.5 TF TF 12 −1 0.05 0.06 0.07 0.08 0.05 0.1 0.15 0.2 0.25 0.3 t (s) t (s)

Figure 5.11: Comparison of G11,G12,G21,G22

Table 5.4: Simulations on evaluating the transfer functions Tref (U1) Nm ωref (U2) (Hz) Tout(Y1) (Nm) ωˆr(Y2) (Hz) Case 1 sinusoidal signal:Amp sinusoidal signal:Amp output result output result cos(ωt) · sin(ωt) · 1 ω=5 Hz ω=5 Hz Fig 5.9 Fig 5.12 2 ω=15 Hz ω=15 Hz Fig 5.13 Fig 5.13 3 ω=25 Hz ω=25 Hz Fig 5.14 Fig 5.14 4 ω=40 Hz ω=40 Hz Fig 5.15 Fig 5.15 5 ω=50 Hz ω=50 Hz Fig 5.16 Fig 5.16 6 ω=60 Hz ω=60 Hz Fig 5.17 Fig 5.17 Case 2 Step signal: 0-5 Nm Step signal:0-10 rad/s output result output result 1 step time: 0.1s step time: 0.1s Fig 5.18 Fig 5.18 2 step time: 0.2s step time: 0.1s Fig 5.19 Fig 5.19 3 step time: 0.1s step time: 0.2s Fig 5.20 Fig 5.20 Case 3 Step signal/sinusoidal Step signal/sinusoidal output result output result signal:0-5 signal:0-10 Nm/Amp cos(ωt) rad/s/Amp sin(ωt) · · 1 sinusoidal signal: ω = step signal: step time Fig 5.21 Fig 5.21 5 rad/s 0.1s 2 step signal: step time sinusoidal signal: ω = Fig 5.22 Fig 5.22 0.1s 5 rad/s

35 Chapter 5. Transfer Function

2 Full Simulation 1 TF

0

−1 Torque (Nm) −2 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 t (s) 2 Full Simulation 1 TF

0 (rad/s) ˆ ω −1

−2 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 t (s)

Figure 5.12: Transfer function result for Torque and ωˆr at ω=5 Hz, case 1.

2 Full Simulation 1 TF

0

−1 Torque (Nm) −2 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 t (s) 2 Full Simulation 1 TF

0 (rad/s) ˆ ω −1

−2 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 t (s)

Figure 5.13: Transfer function result for Torque and ωˆr at ω=15 Hz, case 1.

36 5.2. Identification and evaluation process

1 Full Simulation TF 0.5

0

−0.5 Torque (Nm) −1 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 t (s) 1 Full Simulation TF 0.5

0 (rad/s) ˆ ω −0.5

−1 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 t (s)

Figure 5.14: Transfer function result for Torque and ωˆr at ω=25 Hz, case 1.

37 Chapter 5. Transfer Function

1 Full Simulation 0.5 TF

0

−0.5 Torque (Nm) −1 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 t (s) 1 Full Simulation 0.5 TF

0 (rad/s) ˆ ω −0.5

−1 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 t (s)

Figure 5.15: Transfer function result for Torque and ωˆr at ω=40 Hz, case 1.

In case 1 of Table 5.4, sinusoidal reference signals are given for both torque ref- erence and speed reference. Figure 5.12 to Figure 5.7 present the results of case 1, the output results from transfer function matrix model have agreed with the results from full simulation model when the frequency ω of the sinusoidal reference signals is low. The transfer functions are derived when ω is from 0-40 Hz. Even though, the output results of transfer function matrix model can still follow the full simulation when ω is 50 Hz. The deviations of the magnitude and phase is obvious when ω reaches 60 Hz. Step reference is applied on both torque and speed reference in case 2 of Table 5.4, as shown in Figure 5.18, the agreement with the output from transfer function matrix model and the full simulation model is nice. However, from Figure 5.19 and 5.20, when the step time of two step references is inconsistent (0.1s step time on one reference input and 0.2 s step time on the other), the output results from the transfer function matrix model can not follow the transient which exists in the full simulation which is caused by another step reference signal. Simulation of using step reference to one input reference and sinusoidal reference to the other input applied in case 3. From Figure 5.21, the output from transfer function matrix model matches the output from the full simulation mode. Anyhow, the output results between transfer function matrix model and full simulation model can not coincide on ωˆr in Figure 5.22.

38 5.2. Identification and evaluation process

1 Full Simulation 0.5 TF

0

−0.5 Torque (Nm) −1 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 t (s) 0.5 Full Simulation TF

0 (rad/s) ˆ ω

−0.5 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 t (s)

Figure 5.16: Transfer function result for Torque and ωˆr at ω=50 Hz, case 1.

1 Full Simulation 0.5 TF

0

−0.5 Torque (Nm) −1 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 t (s) 0.6 Full Simulation 0.4 TF

0.2 (rad/s) ˆ ω 0

−0.2 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 t (s)

Figure 5.17: Transfer function result for Torque and ωˆr at ω=60 Hz, case 1.

39 Chapter 5. Transfer Function

6

4

2 Full Simulation TF Torque (Nm) 0

0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 t (s)

10 Full Simulation TF 5 (rad/s) ˆ ω 0

0.05 0.1 0.15 t (s)

Figure 5.18: Transfer function result for Torque and ωˆr, case 2.

6 Full Simulation 4 TF

2

Torque (Nm) 0

0.05 0.1 0.15 0.2 0.25 0.3 t (s)

10

5 (rad/s) Full Simulation ˆ ω TF 0

0.05 0.1 0.15 0.2 0.25 0.3 t (s)

Figure 5.19: Transfer function result for Torque and ωˆr, case 2.

40 5.2. Identification and evaluation process

6

4

2 Full Simulation

Torque (Nm) 0 TF

0.05 0.1 0.15 0.2 0.25 0.3 t (s)

10 Full Simulation TF 5 (rad/s) ˆ ω 0

0.05 0.1 0.15 0.2 0.25 0.3 t (s)

Figure 5.20: Transfer function result for Torque and ωˆr, case 2.

1 Full Simulation TF 0 Torque (Nm) −1 0.05 0.1 0.15 0.2 t (s)

10 Full Simulation TF 5 (rad/s) ˆ ω 0

0.05 0.1 0.15 0.2 t (s)

Figure 5.21: Transfer function result for Torque and ωˆr, case 3.

41 Chapter 5. Transfer Function

6 Full Simulation 4 TF

2

Torque (Nm) 0

0.05 0.1 0.15 0.2 0.25 0.3 t (s)

1 Full Simulation TF 0 (rad/s) ˆ ω −1

0.05 0.1 0.15 0.2 0.25 0.3 t (s)

Figure 5.22: Transfer function result for Torque and ωˆr, case 3.

42 Chapter 6

Experimental Result

From Chapter 5, transfer functions are possible to be estimated in Simulink program which initialize the thoughts to get the transfer function in the real case to design the controller to the system. Measurements are taken in the laboratory and recorded as inputs to Matlab identification Tool box. And the transfer functions obtained from the laboratory will be compared and analyzed from the one stated in the last chapter. The experimental set up and information is presented in Appendix A.

6.1 Experiment

The laboratory set-up is described in Appendix A where a load machine is driven by the PMSynRel via a coupling torque meter. Ideally in Figure 6.1, the output torque from

PMSynRel T1 shall be equal to Ts and TL. This is indeed valid at steady state operation.

However, due to the induced by the finite stiffness kt, Ts does not follow T1 during transients. This requires a closer investigation of the effect of the practical set-up.

The torque measurement Ts is plotted in Figure 6.2. It is obvious that a large amount of harmonics present in this measurement and it does indicate the right torque dynamics. Naturally, Fourier analysis is applied to this measurement and three dominant harmonics are found, as shown in Figure 6.3. The Three dominant harmonic orders are identified at 48 Hz, 240 Hz and 500 Hz (1 Hz is used as a reference frequency for Fourier analysis). The 48 harmonics is identified to be the slot harmonics which is speed dependent due to the fact that the electrical angle is set to 2 Hz, therefore the mechanical angle is 4 Hz since the pole pair number is 2. And the harmonic at 48 Hz is the 12th harmonic order of the mechanical angle. This harmonic varies with different electrical speed. The 240 harmonics is identified to be a speed independent resonance and this harmonic is not changing while the speed changes. The 500 harmonics is clearly the torque ripple caused by the injection frequency. Based on the above investigation, it is practically very difficult to identify a transfer function based on Ts due to the speed dependent harmonics. Therefore, iq,PM is instead investigated since it is directly coupled (by a different gain)

43 Chapter 6. Experimental Result

Q%]C1J$ :JR Q`_%V IV V`

7JVC Q:R

7JVC Q:R I:H.1JV

kT

 TL

cT

Jeq1 Ts Jeq2

Figure 6.1: Laboratory set-up and physical coupling

with T1. iq,PM is plotted in Figure 6.4. And the low-pass filtered iq,PM is plotted in Figure 6.5. The conclusion from Figure 6.5 is that the slot harmonics can neither be decoupled from time domain, nor be identified by the identification toolbox. Therefore, a frequency domain approach shall be investigated as a further step.

44 6.1. Experiment

Figure 6.2: Torque measurements Ts

Figure 6.3: Harmonic spectrum of Ts

45 Chapter 6. Experimental Result

Figure 6.4: Ts and iq,PM

Figure 6.5: Low-pass filtered iq,PM

46 Chapter 7

Conclusion and future work

The conclusion from this thesis is made in this chapter. Some suggestions for future re- search related to the thesis are also stated.

7.1 Summary

The first half of the thesis illustrates and compares different methodologies of acquiring rotor position information which are essential for the realization of field oriented control: Resolver • Hall-effect sensor • Sensorless (based on Signal Injection) • Full scale simulations have been performed taking into account nonlinearity of the motor, discretized sampling, and the PWM switching. Therefore, the simulations shall be closest possible theoretical results to reality. The main discovery from the simulation work is that the PLL bandwidth have quite significant impact to the error of estimation of the rotor position. The value of PLL bandwidth can neither be too high nor too low. High PLL bandwidth causes additional sensitivity to the system while low value increases system responding time. Experience is that the bandwidth has to be customized. For Hall-effect sensor, other than PLL bandwidth, the harmonic order number introduced in Chapter 4 has a great impact on the error estimation. Theoretically, the larger k the better result. However, the theory is based on the rotor information is known and can be used as an input to equation (4.1). In reality, only estimated rotor position can be used for (4.1) cal- culation, large number of k might cause the accumulation of error information. However, it is difficult to summarize which k or PLL bandwidth is the most suitable for each spe- cific systems. Experience is that simulations need to be run to obtain the most appropriate values. The second half of the thesis (from Chapter 5 onwards) investigates the representation of sensorless torque dynamics (considered as a MIMO system) in form of transfer function. With use of the Identification Toolbox, transfer function can be identified with sufficient

47 Chapter 7. Conclusion and future work

”Best Fit” for each simulated input/output. Identification Tool box can be used to derive the transfer functions from both frequency domain data and time domain data. The trans- fer function matrix derived based on the frequency domain data is also applicable to the time domain system in the study. In this work, the accuracy of the transfer functions G11

(From Tref to Tout) and G22 (From ωref to ωˆr) are the highest since those input and out- put are directly effected. Good agreement is achieved on G12 which means Identification Tool Box have a great possibility to derived the cross effected objects. The result of G21 is poor. Although based on the Bode plots, the impacts from Tref is rather small, it has certain impacts in the full simulations.

However, it has to be noted that the simulated data is based on a Basic Model (sen- sorless), which could be quite ”different” from a laboratory set-up. It is doubted that this difference is so large that it makes a transfer function impossible to identify applying the same methodology to the measured input/output data. In the laboratory work, measure- ments of torque output are taken in time domain and found out the slot harmonic is the dominated harmonic which cannot be decoupled in time domain. In this case, frequency domain should be considered for the experimental measurements.

7.2 Future work

7.2.1 Sensorless control and Hall-effect sensors Research may be done to summarize if there is any general rules to identify the range of PLL bandwidth with different system set up. This might save a lot of work for others and it can also be a guidance to the other for selecting a efficient ρ in the system.

7.2.2 Torque dynamics in frequency domain from the experiment In the experimental part of this thesis, data can be collected in frequency domain to see if the efficient input to the identification toolbox can be obtained. To achieve the measure- ments frequency domain, the speed controller of SERVO drive needs to be improved to achieve a high bandwidth.

48 Appendix A

Laboratory Setup

The laboratory setup is shown in Fig.A.1. The PMSynRel is connected to a servo ma- chine via a torque meter. A torque meter is mounted on the interconnected shaft to record the torque data. The resolver mounted on the servo machine is used to obtain rotor posi- tion information for both controllers. Both PMSynRel and SERVO drive are powered by voltage source inverters (VSIs). The sensorless control method is implemented for PM- SynRel. All control algorithms are implemented in C-code in dSPACE system (DS1005).

Figure A.1: Experimental Setup

Slave boards used in this dSPACE system are listed in in Table A.1.Asymmetrical PWM is considered in this work and the sampling frequency and switching frequency are 10 kHz and 5 kHz respectively on the PWM used in the VSIs. Some of the technical data of PMSynRel in consideration are listed in Table A.2.

49 Appendix A. Laboratory Setup

Table A.1: Configuration of the hardware of system setup. Boardnumber Function DS1005 Controlboard DS5101 PWM generation DS4001 32digitalI/O DS2001 5analoginputs

Table A.2: Nominal values of the PMSynRel Value Unit Windingtype Y-Connection Numberofpolepairs 2 - Rated current 30 A Rated frequency 50 Hz Rated power 21 kW RatedTorque 107 Nm

50 References

[1] (2005) Bode plots overview. [Online]. Available: http://lpsa.swarthmore.edu/Bode/Bode.html

[2] (2013) Bode plots. [Online]. Available: http://en.wikipedia.org/wiki/Bode plot

[3] C. Ebbesson, “Comparative study of different rotary position sensors for electrical machines used in an hybrid electric vehicle application,” Master Thesis, Lund uni- versity, Lund, Sweden, 2011.

[4] M. Eskola, Speed and Position Sensorless Control of Permanent Magnet Syn- chronous Motors in Matrix Converter and Voltage Source Converter Applications. Tampere, Finland: Tampere University of Technology, 2006.

[5] T. I. Europe, “Field orientated control of 3-phase ac-motors,” Texas Instruments Eu- rope, Feb. 1998.

[6] F.Genduso and R.Miceli, “Back emf sensorless-control algorithm for high-dynamic performance pmsm,” IEEE, 2010.

[7] D. G.El-Murr and J. Finch, “Sensorless speed estimation of pmsm near zero speed using online short time fourier transform ridges,” World Congress of Engineering, 2007.

[8] J.Ottosson, “Energy management and control of electrical drives in hybrid electrical vehicles,” Doctoral Thesis, Lund University., Lund, Sweden, 2007.

[9] R.Andersson and A.Gillstr¨om, “Sensorless control of a permanent magnet syn- cronous machine using signal injection,” Master Thesis, Chalmers University of Technology., G¨oteborg, Sweden, 2008.

[10] S. S.A, “Simulation of a pmsm based electric motor propulsion system for hev ap- plication using fixed inverter switching frequency,” Power, Signals, Controls and Computation(EPSCICON),2012 International Conference, Jan. 2012.

[11] Y. S.Wu and X.Miao, “Two signal injection methods for sensorless control of pmsm at very low speeds,” IEEE, 2007.

51 References

[12] S.Zhao, “Modeling and control of a pmsynrel drive for a plug-in hybrid electric vehicle,” Doctoral Thesis, Royal Inst. Technol., Stockholm, Sweden, 2011.

[13] O. Wallmark, “On control of permanent-magnet synchronous motors in hybrid elec- tric vehicle applications,” Doctoral Thesis, Chalmers University of Technology., G¨oteborg, Sweden, 2004.

52