• No results found

Investigation of Sensorless Control of Permanent Magnet Synchronous Motor Using High Frequency Injection

N/A
N/A
Protected

Academic year: 2021

Share "Investigation of Sensorless Control of Permanent Magnet Synchronous Motor Using High Frequency Injection"

Copied!
71
0
0

Loading.... (view fulltext now)

Full text

(1)

IN THE FIELD OF TECHNOLOGY DEGREE PROJECT

VEHICLE ENGINEERING

AND THE MAIN FIELD OF STUDY MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM SWEDEN 2020,

Investigation of Sensorless

Control of Permanent Magnet

Synchronous Motor Using High

Frequency Injection

LUCAS BERGSTRAND

KTH ROYAL INSTITUTE OF TECHNOLOGY

(2)
(3)

Investigation of Sensorless Control of

Permanent Magnet Synchronous Motor

Using High Frequency Injection

Lucas Bergstrand

Master of Science Thesis MMK TRITA-ITM-EX 2020:451 IPUC KTH Industrial Engineering and Management

Machine Design SE-100 44 STOCKHOLM

(4)
(5)

Master of Science Thesis MMK TRITA-ITM-EX 2020:451

Investigation of Sensorless Control of Permanent Magnet Synchronous Motor Using High Frequency Injection

Lucas Bergstrand

Approved

2020-07-10

Examiner

Hans Johansson

Supervisor

Bengt Eriksson

Commissioner

Atlas Copco

Industrial Technique AB

Contact person

Henrik Öhrlund

Abstract

This thesis implements and analyses a sensorless control method for permanent magnet synchronous motors. The purpose is to investigate if the results presented in a study performed by Millinger et al. can be replicated on an industrial grade embedded control system. The sensorless control method uses a high frequency signal injection to estimate the rotor position. The rotor is modified with copper plates in order to increase the inductance variation and the modified motor shows a 45% inductance variation. The sensorless control algorithm is implemented on an embedded control system designed for use in one of Atlas Copco’s handheld battery tools. The control system is modified by the removal of an analogue filter. The results show that the position and speed estimation is accurate enough to enable speed control for high and low speeds but the results from Millinger’s study has not been replicated.

(6)
(7)

Examensarbete MMK TRITA-ITM-EX 2020:451

Undersökning av sensorlös motorstyrning med högfrekvent signalinjektion

Lucas Bergstrand

Godkänt

2020-07-10

Examinator

Hans Johansson

Handledare

Bengt Eriksson

Uppdragsgivare

Atlas Copco

Industrial Technique AB

Kontaktperson

Henrik Öhrlund

Sammanfattning

Detta examensarbete avhandlar implementering och analys av en sensorlös motorstyrning för permanent magnet synkronmotorer. Projektets fokus är att undersöka om resultatet från en tidigare studie av Millinger et al. kan reproduceras på ett industriellt inbyggt reglersystem.

Motorstyrningen baseras på att rotorns position estimeras med högfrekvent signalinjektion. För att metoden ska fungera måste rotorns induktans variera avsevärt beroende av positionen. Motorn modifieras med kopparplattor för att öka induktansvariationen och efter modifikation uppvisade motorn en induktansvarians på 45%. Implementeringen av den sensorlösa motorstyrningen gjordes på ett befintligt reglersystem som designats för användning i ett av Atlas Copcos handhållna batteriverktyg. Hårdvaran modifierades genom att ta bort ett analogt filter. Resultatet visar att den sensorlösa motorstyrningen estimerar rotorns position och hastighet med tillräcklig precision för hastighetsreglering i både höga och låga hastigheter. Resultaten från Millingers studie har inte reproducerats.

(8)
(9)

FOREWORD

During my work with the thesis, I have been helped and supported by a number of people. I would like to thank my supervisor at Atlas Copco, Staffan Molinder and my manager Henrik Öhrlund for their support. I would also like to thank the rest of my colleagues who has assisted with technical expertise. A special thanks is extended to Jonas Millinger for sharing his expertise.

I would like to thank Bengt Eriksson, my academic supervisor for his support during the project.

Finally, I would like to thank my fellow thesis workers, Simon, Jakub, Marin and Zhan-Juan for some great coffee breaks

Lucas Bergstrand Nacka, June 2020

(10)
(11)

NOMENCLATURE

This chapter introduces the abbreviations used in the report

Abbreviations

PMSM Permanent Magnet Synchronous Motor

IPMSM Internal Permanent Magnet Synchronous Motor

SPMSM Surface-mounted Permanent Magnet Synchronous Motor

SNR Signal-to-Noise Ratio

ADC Analog-to-Digital Converter

DMA Direct Memory Access

IIR Infinite Impulse Response dq-axis Direct and Quadrature axis

(12)
(13)

TABLE OF CONTENTS

FOREWORD ... 5

NOMENCLATURE ... 7

TABLE OF CONTENTS ... 9

1. INTRODUCTION ... 11

1.1 B

ACKGROUND

... 11

1.2 P

URPOSE

... 11

1.3 D

ELIMITATIONS

... 11

1.4 M

ETHOD

... 12

1.5 R

EPORT OUTLINE

... 12

2. FRAME OF REFERENCE ... 13

2.1 P

ERMANENT

M

AGNET

S

YNCHRONOUS

M

OTORS

... 13

2.2 C

LARKE

-P

ARK TRANSFORMATION

... 13

2.3 S

ENSORLESS POSITION ESTIMATION

... 15

2.4 A

NALYSIS OF

M

ILLINGER

S STUDY

... 20

3. IMPLEMENTATION ... 23

3.1 T

ARGET PLATFORM

... 23

3.2 V

ERIFICATION AND

V

ALIDATION

... 25

3.3 T

ESTS

... 25

3.4 M

OTOR PARAMETERS

... 27

3.5 M

OTOR

P

ROTOTYPE

... 28

3.6 M

ODELLING OF THE

PMSM

WITH SIGNAL INJECTION

... 29

3.7 S

OFTWARE

I

MPLEMENTATION

... 30

4. RESULTS ... 34

4.1 M

EASURING MOTOR INDUCTANCE

... 34

4.2 S

IMULATION RESULTS

... 34

(14)

4.3 L

OCKED ROTOR TEST

... 37

4.4 S

ENSOR CONTROL MODE

... 39

4.5 S

ENSORLESS CONTROL MODE

... 41

4.6 V

ARYING THE SIGNAL INJECTION AMPLITUDE

... 44

4.7 H

IGH SPEED TEST IN SENSORLESS CONTROL MODE

... 44

5. DISCUSSION AND CONCLUSIONS ... 49

5.1 D

ISCUSSION

... 49

5.2 C

ONCLUSIONS

... 50

6. ... 53

7. RECOMMENDATIONS AND FUTURE WORK ... 53

7.1 R

ECOMMENDATIONS

... 53

7.2 F

UTURE WORK

... 53

8. REFERENCES ... 55

APPENDIX A: MOTOR PARAMETERS ... 57

APPENDIX B: PICTURES OF SIMULINK MODEL ... 59

APPENDIX C: LOCKED ROTOR MEASUREMENTS ... 63

(15)

1. INTRODUCTION

In this chapter, the purpose of the report is presented together with the delimitations and the method. Lastly, an outline of the report is introduced.

1.1 Background

Control of permanent magnet synchronous motors requires precise knowledge of the rotor position at all times. The rotor position is commonly measured with rotary encoder, resolver or hall position sensors. The result is knowledge of the rotor position at all times. The position feedback enables very robust and accurate control. These sensors can be expensive and increases the motor complexity. The additional sensors also reduces the overall robustness of the system. For some applications, especially in harsh environments, sensors are not possible to implement or have poor performance. Using a sensorless motor control approach the position sensor is removed and the position is instead estimated. The most common methods of sensorless control is back-EMF measurement, high-frequency signal injection and extended Kalman filter. These methods have their own strengths and weaknesses. For instance, back-EMF is not measurable at low speeds.

High-frequency signal injection works only for magnetically anisotropic rotors and extended Kalman filters are difficult to tune properly.

The master thesis involves implementation of the high-frequency signal injection, and rotor position estimation on an existing embedded control platform, developed for use in one of Atlas Copco’s handheld battery tools. The estimation algorithm is defined as the observer, demodulator and signal injection. These parts are described further in the next chapter. The estimation algorithm is evaluated by comparing the estimated position with the measured rotor position while running the motor with speed control.

1.2 Purpose

The purpose of the master thesis is to investigate if the results of the study conducted by Millinger et al. can be replicated on an industrial grade embedded control platform. The sensorless control method under investigation uses high-frequency signal injection together with an observer to estimate the rotor position. The industrial grade embedded control system is an embedded system developed for use in Atlas Copco’s handheld battery tools. The results of the implementation are to be compared with the results presented in a study by Millinger et al. (Millinger, Bacco, Manzolini, Wallmark, & Bianchi, 2019). The focus of the master’s thesis is to compare the estimation error to the results shown by Millinger et al.

The research question is formulated as follows, “Can the results from the study described by Millinger et al. (2019) be reproduced when implementing the control methods on an industry- standard embedded system”.

1.3 Delimitations

Discussions with the company supervisor resulted in a couple of limitations for the thesis, mainly due to the limited time available. These limitations are stated below

(16)

 The control algorithm was implemented on an already existing control system, with a built- in inverter.

 The observer performance is evaluated only by comparing the estimated position with the measured position. The difference between the estimated and measured position is evaluated when the motor was controlled with speed control.

 The signal injection frequency was only evaluated theoretically, and different frequencies are not tested on the motor.

 The system is tested without load.

 The estimation algorithm needs to be sufficiently fast and have a large enough bandwidth to estimate the position accurately. However, these parts are not of interest to this project.

1.4 Method

The project started with a literature review of the relevant area. Control of PMSM was studied together with the mathematical foundation of a PMSM. Sensorless control methods was studied.

The mathematical foundation of the signal injection was reviewed. The implementation of control methods on embedded control systems were also studied. In parallel with the literature review, a time and implementation plan were made.

A thorough analysis of Millinger’s study was done in order to identify the important decisions and parameters to be able replicate the results. Similar tests to the tests performed by Millinger et al.

was designed and design decisions were made to make the comparison as fair as possible. The motor prototype is manufactured.

The implementation phase started with development of a Simulink model of the motor and the control system. Different parameters were evaluated in order to make implementation on the target platform easier. Implementation on the target platform began once the simulations were finishing, and in parallel verification of the different components was started.

Tests were performed and the results were analysed, discussed and compared to the results presented in Millinger’s study. The comparisons was analysed thoroughly with the assistance of Jonas Millinger and the industrial supervisor, Staffan Molinder.

1.5 Report outline

The report is structured into five main chapters, not including the introduction. Chapter 2 is the frame of reference where the background information and mathematical foundation is presented together with a thorough analysis of Millinger’s study. The verification and validation are introduced in this chapter. Chapter 3 describes the implementation and design decisions, including an analysis of the signal injection frequency and motor modification. The target platform is introduced, and the software implementation is described together with the performed tests. The results of the tests and simulations are presented in chapter 4. Chapter 5 discusses the results and presents the conclusions. The final chapter is chapter 6 where recommendations on future work are put forth.

(17)

2. FRAME OF REFERENCE

The frame of reference chapter presents the literature review of the sensorless control technique used. Further, the mathematical foundation behind the signal injection and motor response is described together with the control scheme. An analysis of Millinger’s study is also performed.

2.1 Permanent Magnet Synchronous Motors

A permanent magnet synchronous motor (PMSM) is a synchronous AC machine, generally driven by an inverter, generating AC of variable frequency and amplitude to control the speed and the power output of the motor (Giri F. , 2013). As the name implies, the rotor is fitted with permanent magnets, either mounted on the surface of the rotor or integrated into the rotor. The stator consists of the housing and phase windings. Different motors have different number of pole pairs, meaning the number of magnetic poles on the rotor. The motor used in this project has two poles, thus one pole pair. The number of pole pairs defines how the electrical and the mechanical rotations interact.

As the mechanical angle is defined as

𝜃𝑚 = ( 𝑝

2 ) 𝜃𝑒 (1)

Where 𝜃𝑚 is the mechanical angle 𝜃𝑒 is the electrical angle and p is number of poles on the rotor.

The permanent magnet generates a magnetic field. The inverter induces a rotating magnetic field that the rotor locks into and follows. The frequency of the AC current defines the speed of the PMSM. . Synchronous machines rotate with synchronous speed. Synchronous speed is speed exactly proportional to the frequency of the magnetic field (Encyclopedia Britannica, 2020). Due to the rare earth metals used for the permanent magnet in the PMSM, the PMSM tends to be more expensive but have higher efficiency and power-to-weight ratio compared to their induction counterparts (Glumineau & de León Moraled, 2015, p. 6)

The mechanical construction is different for different manufacturers, as highlighted in chapter two of (Mevey, 2006). Regardless of number of poles or mechanical solutions, the working principals are the same and the control of the motor does not change.

2.2 Clarke-Park transformation

In order to control a PMSM, a rotating magnetic field is used. In order to generate a precise field, the rotor position relative to the stator must be known, the rotor position is generally measured with a sensor (Briz & Degner, 2011). The sensors used for measuring the rotor position are Hall Effect sensors, rotary encoders or resolvers. The different sensors are used depending the application, for high-accuracy position control, encoders or resolvers are preferred.

The control structure is generally cascaded, with an inner current control loop and an outer speed or position control loop. For the inner control loop, the phase currents are measured and used as feedback. Feedback is necessary to achieve closed loop control, in order to minimize the effects of noise and disturbances. The outer loop can be either speed control, position control or both, in a cascaded structure. The feedback is generally calculated from a rotor position sensor. A rotor

(18)

position sensor is also important during start-up as PMSM are not self-starting. If the speed of the stator magnetic field is too high, the rotor magnetic field cannot lock into the field and the rotor will start to vibrate. Thus, the stator magnetic field needs to start slow for the rotor to catch up to.

The stator magnetic field can then speed up to the desired speed. Compared to an asynchronous motor where the stator field induces a voltage, causing a current to flow and the current carrying capacitor in a magnetic field experiences a torque and starts rotating. There is no need for a special start up sequence.

A three-phase system is complex and difficult to analyse as well as control. The Clarke-Park transformation transforms the stationary three-phase reference frame A, B, C into a rotor fixed frame, the direct-quadrature frame (dq-frame). The dq-frame is fixed to the rotor flux, meaning that the dq-quantities are DC variables rather than AC variables. Control in the dq-frame simplifies control of the motor and enables the use of conventional control methods to control the motor. The transformation also simplifies the analysis of the system.

The Clarke-Park transformation is divided into two parts. The first Clarke transformation is a geometric transformation, transforming the three-phase system into a two-phase orthogonal system. The orthogonal system is fixed to the stator. The phases, are separated by 2𝜋/3 rad, and the transformation is defined as

[𝑖𝛼 𝑖𝛽] = [

sin(ϕa) sin (ϕb−2𝜋

3 ) sin (ϕc +2𝜋 3) cos(ϕa) cos (ϕb−2𝜋

3 ) cos (ϕc+2𝜋 3)

] [ 𝑖𝐴 𝑖𝐵 𝑖𝐶

] (2)

Here iA, iB and iC are the stator phase currents in the three-phase stationary frame, 𝑖𝛼 and 𝑖𝛽 are the phase currents in the two-phase stationary orthogonal frame and 𝜙𝑎,𝑏,𝑐 are compensations for non- ideal winding symmetry. If the windings are considered ideal, 𝑖𝛼 and 𝑖𝛽 can be simplified into

𝑖𝛼= 𝑖𝐴 𝑖𝛽 = 1

√3𝑖𝐴+ 2

√3𝑖𝐵 (3)

The Park transformation is used to transform 𝑖𝛼 and 𝑖𝛽 from the stationary frame to a rotor fixed system. This transformation is defined as

𝑖𝑑 = 𝑖𝛼 cos(𝜃) + 𝑖𝛽sin(θ)

𝑖𝑞 = 𝑖𝛼sin(𝜃) − 𝑖𝛽cos(𝜃) (4)

Where 𝜃 is the rotor flux angle, measured in counter clockwise direction (𝜃𝑟 in Figure 1), 𝑖𝑑 and 𝑖𝑞 are the two-phase currents in the rotation rotor flux. The dq-frame is illustrated in Figure 1.

The rotor in the figure is principally the same as the rotor in the motor used for this project. The rotor flux is the magnetic field generated by the permanent magnets on the rotor. The direction of the dq-axis can be seen in Figure 1.

The direct axis is the flux-producing axis and the quadrature axis is the torque-producing axis, it leads the direct axis by 90°. Only current in the q-direction produces torque, although the d- and q-axis are in practice somewhat coupled, the coupling is small and is neglected. The d-axis current is commonly regulated to be as close to zero as possible, to minimize losses (Giri &

Fouad, 2013).

(19)

Figure 1. PMSM with illustrated direct and quadrature axis, source: MathWorks (The MathWorks Inc., 2020).

2.3 Sensorless position estimation

The term sensorless motor control corresponds to motor control without a rotor position sensor.

Reviewing the most common sensorless control methods has been done by Acarnley and Watson (2006). These methods are divided into three categories, motional electromotive force or back- EMF, inductance and flux linkage-based methods. EMF methods does not work during low speeds, because the signal-to-noise ratio of the EMF is too low. If the motor is connected in a Y- connection, meaning that all three phases are connected to a neutral point, the neutral point needs to be accessible in order to measure the voltage over each phase meaning there needs to be another wire to the motor. Induction based methods are more suitable for low and zero speeds, although they require the rotor needs to show salient behaviour , saliency is the quotient of the q-axis inductance and the d-axis inductance, defined in equation 5, but does not necessarily require any more connection points on the motor. There is also an issue with polarity, as the induction undergoes two cycles per electrical rotation, meaning that the position is ambiguous. The polarity in this case means the magnetic polarity, the maximum inductance occurs when the north or south pole are at the rotor position of 90° electrically, making it impossible to distinguish between the north and the south pole of the magnet. Flux linkage-based methods is a combination of using EMF and inductance variations to estimate the position. However, the method requires measuring both the phase voltages and phase currents. The approach is common to use with extended Kalman filters and require a mechanical model of the system. The computational requirements are very large compared to the EMF and induction methods (P. Acarnley & F. Watson, 2006).

𝑆𝑎𝑙𝑖𝑒𝑛𝑐𝑦 = 𝐿𝑞

𝐿𝑑 (5)

Induction based methods monitor the rate of change of the winding currents and require the rotor to be salient, and also requires high frequency signal injection as a mean to extract the rotor position information from the motor. The motor responds to the high frequency injection with a signal containing the rotor position information in the magnitude and/or phase. The response signal is extracted from the phase currents. The different high frequency injection methods are investigated by Briz and Degner (2011). Where the types of injection are either continuous or discrete, where the continuous injection means that the signal is always injected and the discrete injection is done periodically. However, both are implemented on time discrete systems. The difference depends on the application, for instance the injection should affect the normal motor operation as little as possible, or in order to save energy. The downfall is the loss of position estimation during periods without injection. The injection signal can also differ, there are

(20)

according to Briz and Degner two types, periodic injection and PWM injection. The periodic injection signals is typically a sinusoid, generated by the inverter. The injection signal, being either discrete or continuous, needs to be distinct from the inverter switching frequency and superimposed on the fundamental output of the inverter.

The rotor position information is embedded into the phase currents. Namely the dq-axis currents.

In order to extract the information, one method is to use the inverse tangent function. The phase can then be calculated. However, this will only estimate the rotor position and is not suitable for all applications (Briz & Degner, 2011)4. The second method is to use a state observer, where the estimation error is fed into an observer that will minimize the error and can output both rotor position and speed. This is also more computationally demanding, and the observer needs time to minimize the error. The observer used in this project is shown in Figure 4.

In this project, the rotor position and speed are estimated with an induction-based method, using a continuous high frequency sinusoidal injection in the d-axis. A similar approach has been tested by Corley and Lorenz (1998), where the signal is injection in the q-axis and the d-axis current is used for estimating the position and Manzolini et al. (2016), where the signal is injection the d- axis and the d-axis current is used to estimate the position. (Corley & Lorenz, 1998) states that”

The motor acts as the electromagnetic resolver and the power converter applies carrier-frequency voltages to the stator which produces high-frequency currents that vary with position”. Meaning that the motor acts as its own rotor position sensor, and the motor current changes with the rotor position.

The control and estimation structure are shown in Figure 2. The structure is similar to a regular cascaded control structure, where there is an outer speed controller loop, coupled with an inner current control loop. One loop for the d-axis current and one loop for the q-axis current. The high frequency signal is added to the output of the current controllers, but before the conversion to the three-phase reference frame. The dq-axis voltages, output from the controllers, are transformed into their three-phase equivalences with the estimated position rather than the measured position.

The desired three-phase voltages are sent to the inverter, which in turn generates the desired output.

The phase currents are measured, converted into the dq-frame using the estimated position. The dq-axis currents are low-pass filtered in order to remove the high frequency injection, and fed into the respective controllers. The unfiltered q-axis current is demodulated and fed into the observer where the rotor position and speed are estimated.

(21)

Figure 2. Simplified control scheme for high frequency injection sensorless control

The motor used in the project is a surface mounted PM motor and the saliency is very low for these motors (Batzel & Lee, 2000). Methods to increase the saliency of the rotor has been proposed by (Nondahl, Ray, & Schmidt, 1998) and Millinger et al. (2019), where the rotor was modified with two thin copper sheets, mounted symmetrically on the rotor magnetic poles. The result is a difference between the d-axis inductance and the q-axis inductance, and the induced current will vary over a rotation and the q and d axis current will be different depending on the rotor position.

The copper plates are then short-circuited at each end of the rotor. The mounting of the copper plates is shown in Figure 3.

Figure 3. Simplistic cross section view of rotor with copper plates

The mathematical model for a PMSM can be represented in several ways, described in chapter 3.5 in (Giri F. , 2013). Giri states that the phase voltages, in the rotating dq-frame can be described as follows

[𝑣𝑠𝑑𝑞] = 𝑅𝑠 [𝑖𝑠𝑑𝑞] + [𝐿𝑑𝑞] 𝑑[𝑖𝑠𝑑𝑞]

𝑑𝑡 + 𝑝𝜔𝑄[𝐿𝑑𝑞][𝑖𝑠𝑑𝑞] + 𝑝𝜔𝑄[𝜙𝑟𝑑𝑞] (6) Where vsdq is the stator voltage in the dq-frame, Rs is the stator phase-winding resistance, isdq is the dq-frame stator currents, Ldq is the inductance matrix in the dq-frame, p is the motors pole pairs, ω is the mechanical angular velocity and ϕrdq is the rotor flux in the dq-frame, Q′ is defined as follows

Q= [0 −1

1 0 ] (7)

The above model provides the necessary dynamics in order to simulate the PMSM with the desired results. The s in the subscript sdq represents a stator quantity. Equation 6 describes the motor in the rotation reference frame noted as 𝜃, meaning the actual or measured rotor position.

The high-frequency injection signal proposed by (Manzolini, Moadin, & Bolognani, D-axis polarity detection for IPM synchronous motor drives by high frequency voltage injection, 2016) are the same as used in (Millinger, Bacco, Manzolini, Wallmark, & Bianchi, 2019). The voltage injection signal is defined as

[uhdθ̂

uhqθ̂ ] = Uh[cos(ωht)

0 ] (8)

(22)

Where Uhis the injection amplitude and ωhis the angular injection frequency, ωh= 2πfh, where fh is the injection frequency, in the estimated rotor position reference frame, where θ̂ is the estimated rotor position. The subscript h in the subscript dq or hq denotes signal injection. Note that the signal is only injected into the d-axis. In order to understand how the system responds the analytical expression for the high frequency current will be shown below.

A number of assumptions are made, the first assumption is that the resistive terms can be ignored because of the high frequency. The second assumption is that the injection frequency is distinct from the fundamental frequency, the frequency of the AC current, and thus the EMF can be neglected (Jansen & Lorenz, 1995). The result is that the high frequency injection can be seen as a purely inductive load. The derivation of the motor response is a modified version of the derivation shown in (Corley & Lorenz, 1998), the modification being a different injection signal and the signal being injection in the d-axis only.

Rewriting equation 6, the dq-axis voltages can be described in the stator reference frame as

[𝑣𝑠𝑑𝑠

𝑣𝑠𝑞𝑠 ] = [𝑅𝑠 0 0 𝑅𝑠] [𝑖𝑠𝑑𝑠

𝑖𝑠𝑞𝑠 ] + [ 𝑑

𝑑𝑡 𝜔

𝜔 𝑑

𝑑𝑡 ] [𝜆𝑠𝑑𝑠

𝜆𝑠𝑞𝑠 ] (9)

Where 𝑑

𝑑𝑡 corresponds to the derivate operation and 𝜆𝑠𝑑, 𝜆𝑠𝑞 are the dq-axis d- and q-flux linkage.

The stator reference frame is the dq-axis transformed with the counter clockwise rotation to the fixed stator reference frame. The flux linkage corresponds to the coupling between the stator and the rotor. Where the dq-axis flux linkage is defined as

[𝜆𝑠𝑑𝑠

𝜆𝑠𝑞𝑠 ] = [𝐿𝑑 0 0 𝐿𝑞] [𝑖𝑠𝑑𝑠

𝑖𝑠𝑞𝑠 ] + [ 0

𝜆𝑝𝑚 ] (10)

Where 𝜆𝑝𝑚 is the rotor permanent magnet flux. The stator frame is fixed to the stator and the transformation is done with the counter clockwise rotation matrix.

As the high frequency component of the dq-axis current can be represented as a purely inductive load, equation 9 can be simplified into

[𝑣𝑠𝑑𝑠 𝑣𝑠𝑞𝑠 ] ≈ [

𝑑

𝑑𝑡 𝜔

𝜔 𝑑

𝑑𝑡 ] [𝜆𝑠𝑑𝑠

𝜆𝑠𝑞𝑠 ] (11)

Rewriting equation 11 once more on the following form [𝑣𝑠𝑑𝑠

𝑣𝑠𝑞𝑠 ] = 𝑳𝑠𝑑𝑞𝑠 𝑑 𝑑𝑡[𝑖𝑠𝑑𝑠

𝑖𝑠𝑞𝑠 ] (12)

Where the stator currents and voltages are in the stator reference frame. Where 𝑳𝑠𝑑𝑞𝑠 is the induction matrix, transformed from the rotor reference frame to the stator reference frame (Jansen

& Lorenz, 1995), 𝑳𝑠𝑑𝑞𝜃 , the induction matrix in the rotor reference frame is defined as 𝑳𝑠𝑑𝑞𝜃 = [𝐿𝑑 0

0 𝐿𝑞] (13)

(23)

Where the transformation to the stator reference frame with the measured rotor position, 𝑳𝑠𝑑𝑞𝑠 is defined as

𝑳𝑠𝑑𝑞𝑠 = [ −ΔLsin (2𝜃𝑒) 𝐿 − Δ𝐿𝑐𝑜𝑠(2𝜃𝑒)

𝐿 + Δ𝐿𝑐𝑜𝑠(2𝜃𝑒) −Δ𝐿𝑠𝑖𝑛(2𝜃𝑒) ] (14)

Where L and Δ𝐿 are the average and differential inductances, defined in equation 15 𝐿 =𝐿𝑞+ 𝐿𝑑

2 , Δ𝐿 =𝐿𝑞− 𝐿𝑑

2 (15)

Transforming the injection voltage shown in equation 16 from the rotor frame to the stator frame, with the estimated position, θ̂

[𝑢ℎ𝑑𝑠

𝑢ℎ𝑞𝑠 ] = 𝑈cos (𝜔𝑡) [ cos (θ̂)

−sin (θ̂) ] (16)

Substituting equation 16 as the dq-axis voltages into equation 12, an expression can be derived for the high frequency current from the motor, in the rotor reference frame, where the expression has been transformed back to the estimated rotor position reference frame, 𝜃̂.

𝑖ℎ𝑞θ̂ = − 𝑈

𝜔𝐿𝑑𝐿𝑞[ΔL 𝑠𝑖𝑛(2𝛥θ)] 𝑠𝑖𝑛(𝜔𝑡) (17) Where 𝛥𝜃 = 𝜃 − 𝜃̂, signifies the error between the estimated rotor position and the actual rotor position. The signal defined in equation 17 is demodulated, by multiplying the signal with a sinusoid of the same frequency as the injection frequency. Demodulation of the signal lets us pick out only the injected frequency and remove the rest of the signal. The demodulator structure is illustrated in Figure 4. The signal is first high pass filtered in order to remove any low frequency components, mainly the mechanical rotation frequency. The signal is multiplied by a sinusoid, named the demodulation signal, defined in equation 18,

𝑠𝑖𝑛(𝜔𝑡) (18)

After multiplication with the demodulation signal the q-axis current can be written as 𝑖ℎ𝑞𝜃̂ 𝑠𝑖𝑛(𝜔𝑡) = − 𝑈

2𝜔𝐿𝑑𝐿𝑞[𝛥𝐿 𝑠𝑖𝑛(𝛥𝜃)][1 − 𝑐𝑜𝑠(2𝜔𝑡)] (19) The low-pass filter in the demodulator will filter out the 2𝜔 component and the resultant signal is

𝑖ℎ𝑞𝜃̂ = − 𝑈𝛥𝐿

2𝜔𝐿𝑑𝐿𝑞 𝑠𝑖𝑛(2𝛥𝜃) (20)

For small angles, where the estimated position is close to the real position, using the approximation 𝑠𝑖𝑛 (𝜃) ≈ 𝜃, assuming that the estimated angle is close to measured angle, equation 20 can be written as

ihqθ̂ ≈ − 𝑈Δ𝐿

2𝜔𝐿𝑑𝐿𝑞Δθ (21)

(24)

After demodulation, the high frequency components are filtered away, while maintaining the rotor position information. The signal is then fed into the observer. The input to the observer is a constant multiplied with the estimation error.

Figure 4. Demodulator and Observer structure

The observer structure shown in Figure 4 is similar to a Luenberger Observer. A thorough investigation into the controller and observer gains is done by (Manzolini, Morandin, & Bolognani, 2016). The observer estimates the rotor position, and the rotor speed is an internal state which can be extracted in order to perform speed control without having to perform discrete derivation. The different cut-off frequencies, 𝜔𝑐, are shown next to the filters. The two high-pass filters in the demodulator are the same. Both the demodulation signal and the q-axis current is high-pass filter to ensure the signals are phase shifted equally.

2.4 Analysis of Millinger’s study

The study performed by Millinger et al. is quite comprehensive. The focus of the study is the analysis of the effects of a short-circuit rotor-ring on a high frequency injection based rotor position estimation algorithm. Millinger performs a number of tests and measurements to analyse the effects of the short-circuit rotor-ring. The tests conducted are divided into two groups. The first group is measurements of the electrical parameters of the motor. The second group of tests evaluate the estimation accuracy.

The first group of tests, performed by Millinger et al., was centred on measuring and verifying simulated motor parameters. The d- and q-axis inductance were measured in order to calculate the rotor saliency. These tests verified the effects of the motor modification.

The second group of tests centred on the position estimation and investigating its performance.

The first test performed was a locked rotor test. Where the rotor is locked in place with a moderate amount of current through the windings. The dq-axis currents can then be evaluated, and the performance of the phase-current sampling can be done. The estimation error was investigated in two parts, first the observer was evaluated with the motor starting from standstill and reaching a constant speed. Millinger also evaluated the estimation error with different injection amplitudes during motor retardation from 3000 rpm to standstill. Running the motor at constant speed, namely 300, 600 and 1200 rpm, was also done by Millinger as to evaluate the effects of different compensations, such as inverter dead-time and motor winding asymmetry.

The tests, which are of interest to this study, is varying the injection amplitude, Uh. Varying 𝑈 provides a good understanding of how the estimation algorithm behaves and how the implementation can be done in order to enable a fair comparison to Millinger’s study.

The results of Millinger’s study shows that a non-salient rotor can demonstrate high saliency, measured up to 1.55, and accurate position estimation. The position estimation without special

(25)

compensation was able to estimate the rotor position with a maximum error of ±3°, during acceleration from standstill to 1200 rpm. Compensation for non-ideal winding symmetry, see equation 2, decreased the maximum estimation error to ±2°. The authors also claim that this sensorless method enables accurate control capabilities for the motors full speed range.

The hardware used in Millinger’s study is based on a dSpace 1104 contorl system together with a MACNO TDE OPD F32A three-phase inverter. The current sensors used are LA55-P, and for reference a Kübler 5882 incremental encoder was used.

The electrical parameters used are presented in Table 1.

Table 1. Electrical parameters used in Millinger’s study

Parameter Value

PWM frequency 25 kHz

DC-bus voltage 42 V

Current sensor range ± 70 A

Signal injection frequency 3175 Hz

Motor max speed 36 kRPM

Motor peak phase current 20 A

Nominal DC-bus voltage 325 V

Motor phase-to-phase inductance 0.95 mH Motor phase-to-phase resistance 1.55 Ω

(26)
(27)

3. IMPLEMENTATION

This chapter discusses the implementation and the working process throughout the project. First the target platform is introduced, both hardware and software. Further, verification and validation are discussed. The important parameters of Millinger’s study are presented together with the motor prototype design decisions. A description of the Simulink model together with the implementation of the estimation and control algorithm in the software platform are presented.

3.1 Target platform

The control algorithm is implemented on an existing embedded platform, the target platform. The target platform includes software infrastructure and the necessary hardware. The target platform is developed for use in one of Atlas Copco’s handheld battery tools.

The target hardware includes a microcontroller, current sensors, inverter, sensor connections, filters etc. The microcontroller is a STM32F4 microcontroller with included peripherals such as an Analog to Digital Converter (ADC) and PWM generation. The ADC is a 12-bit ADC with variable sampling time. The rotor position sensor is a resolver, mounted on the motor and connected to the control hardware with a cable. Only one hardware modification has been made, removal of an analogue low-pass filter on the phase current measurement. The filter was used as an addiditional, external filter, on the output of the current sensor. The cut off frequency of the external filter was too low, at 4.8 kHz, resulting in a large attenuation of the injection signal at 6 kHz. The current sensor has a low-pass filter and after discussions with an electrical engineer at Atlas Copco, the external analogue low-pass filter could be removed without having large effects on the system as a whole.

Important hardware parameters of the system is listed below,

 DC-bus Voltage: 18V

 Current sensor bandwidth: 125 kHz

 PWM frequency, 𝑓𝑃𝑊𝑀: 48 kHz

 Current sampling frequency, 𝑓𝑐𝑠: 48 kHz

 12-bit ADC, input: 0 V – 3.6V

The hardware comes with a software platform. The software platform handles data sampling, data processing, motor control, communication with a computer interface, software oscilloscope and more. The software oscilloscope enables data sampling at a maximum of 8 kHz. The software oscilloscope samples up to four signals in parallel and the signals are read from the microprocessor’s memory, stored in a buffer and sent to the computer interface when the buffer is full. The data is then visualized on the computer. The oscilloscope reads the data from memory at the end of every slot. The computer interface can be used to control the motor, change variables and receive data.

(28)

Figure 5. Timing diagram

A scheduler controls the execution of all tasks during run-time. The scheduler has eight slots and a new slot starts executing every 125 microseconds. The scheduler ensures that the hard real-time deadlines are met. If one slot has not finished executing when the next slot starts, the motor is stopped. Each slot executes a number of tasks such as the current controller and signal processing.

Figure 5 illustrates two slots where 𝑡𝑠𝑙𝑜𝑡 is the time between two slots, 𝑡𝑃𝑊𝑀 is the PWM period and 𝑡𝑐𝑠 is the current sampling period and the current samples are illustrated as asterisks. Note that 𝑡𝑃𝑊𝑀 = 𝑡𝑐𝑠. The blocks in Figure 5, named SP, CC, SUP, SC and IDLE represents the tasks executed in each slot. SP is the signal processing, reading and converting the ADC-values into their respective physical quantities. The signal processing task also calculates the rotor speed and position. CC is the current controller. SC is the speed controller. SUP is supervision, monitoring critical parameters such as the inverter temperature. OSC is the software oscilloscope described above and the remaining time, the microcontroller is IDLE or handles background processes. The data is sampled and stored in a buffer using a direct memory access (DMA) module and does not affect the execution time of the tasks. The DMA has direct access to the microcontroller’s memory and places the values in a pre-defined location. The ADC is synchronised with the PWM clock in order to sample during a PWM high. The DMA is triggered and places the data in a predefined location. This allows for sampling in the background with next to no processing power being consumed. Because the controllers only executes with 8 kHz frequency, the controller extrapolates the position used for the inverse Clarke-Park transformation based on the speed in order to calculate six unique PWM duty-cycles per execution. The signal processing, current controller, supervision and oscilloscope executes in every slot and the speed controller executes in every other slot. There are more tasks executed every slot, they are however not of interest to this project. The time share of the remaining tasks are cumulatively around 1% of the total slot time, and are thus deemed to have very little or no effect on the system as a whole.

The important software parameters are

 Maximum oscilloscope sampling frequency: 8000 Hz.

 Current controller task frequency: 8000 Hz.

 Speed controller task frequency: 4000 Hz.

The motor to be used is a surface mounted PMSM, named SRB3. The motor is developed and manufactured by Atlas Copco. The motor data is published Appendix A. A picture of the motor is shown in Figure 6

(29)

Figure 6. Picture of the SRB3 motor

3.2 Verification and Validation

In order to verify that the system behaves as expected. The verification is divided into two segments, verification of the motor modification and verification of the observer and injection.

The motor modifications are done in order to increase the saliency of the rotor to a similar or the same level as presented by Millinger et al. The verification is done by measuring the motor inductances before and after modification. The observer and signal injection are verified by measuring the motor response and analysing the frequency components as well as running the motor with sensor control mode, with the estimation running in parallel. The estimated speed and position error should be stable, with acceptable accuracy. The tests are described in detail in section 3.3.

Validation of the system is done by comparing the results of the tests described in section 3.3 with the results presented by Millinger et al. The position estimation error should be comparable to the results presented by Millinger et al. The comparison is purely qualitative.

3.3 Tests

The goal of the project is to test and analyse the position and speed estimations and compare the results to the results presented by Millinger et al. All the tests were performed with speed control except for the locked rotor test, which was performed with current control. The electrical position of the rotor is referred to as the measured position and is simply the mechanical rotor position with an added offset to compensate for the mismatch between mechanical zero and electrical zero. The motor can be controlled in two modes, sensor control mode and sensorless control mode. In sensor control mode, the measured position is used in the Clarke-Park transforms and the measured speed is used as feedback for the speed controller. In sensorless control mode, the estimated position is used in the Clarke-Park transforms and the estimated speed is used as feedback for the speed controller. From the analysis of Millinger’s study in section 2.4, the following tests has to be performed.

 Measure motor inductance and resistance.

 Locked rotor test in current control mode.

 Position estimation in sensor control mode.

 Position estimation in sensorless control mode.

 Varying injection amplitude in sensorless control mode.

(30)

 Position estimation in sensorless control mode at high speeds

3.3.1 Measurement of motor inductance and resistance

The phase-to-phase inductance and phase-to-phase winding resistance are measured before and after modification of the SRB3. The inductances are measured in order to calculate the saliency and verify that the copper plates mounted on the motor has the desired effect. The phase-to-phase resistance is measured to model the motor in Simulink. The measurements are done with an RLC- meter. The inductance is measured at the injection frequency, 𝑓. The test is successful if the induction varies substantially during one revolution. The quotient between the maximum and the minimum inductance should be close to the desired saliency, discussed in section 3.4.

3.3.2 Locked rotor test

The locked rotor test is performed to observer the phase currents and their measurability. During the test, the rotor is mechanically locked in place and a current pulse is injected into the motor and the dq-axis currents are calculated and analysed. Analysing the frequency components of the currents should clearly show the presence of the injection signal.

3.3.3 Position estimation in sensor control mode

Position estimation in sensor control mode is performed in order to verify the functionality of the estimation algorithm. The estimation runs in the background and the motor is controlled with speed control and a smooth ramp reference, shown in Figure 10. The rotor position and speed estimations are analysed and the test is successful if estimation error is stable. Oscillations are expected but there should be no indications of drift. If a polarity issue is present, this should be clearly seen in this test. If the error is stable, the observer converges and behaves as expected. The magnitude of the estimation error is not important for this test.

3.3.4 Position estimation in sensorless control mode

Position estimation in sensorless control mode show how well the estimation works while controlling the system. The motor runs with speed control and a smooth ramp reference. The estimation error should be stable and show no indication of drift. Oscillations are expected but the motor should behave similarly compared to running the motor in sensor control mode.

Compensations for potential polarity issues and observer tuning is done before the test.

3.3.5 Varying injection amplitude in sensorless control mode

Investigating how 𝑈 effects the estimation error is done in order to analyse how the injection amplitude can be chosen to minimise the estimation error. The test is performed in sensorless control mode. The motor is run with speed control and a smooth ramp reference. The estimated position error is analysed together with the amplitude of the thee-phase output form the inverter in order to identify when or if the inverter output is saturated because of the DC-bus voltage. The test should indicate how 𝑈 can be chosen in order to minimise the estimation error.

3.3.6 Position estimation in sensorless control mode at high speeds

Millinger et al. also claims that the estimation method enables sensorless control over the full speed range. The motor is tested in sensorless control mode during high speeds. The motor runs with speed control and a smooth ramp reference. The estimated speed and position are analysed and compared to the measure speed and position.

(31)

3.4 Motor parameters

The most important parameter to replicate is the rotor saliency, if Δ𝐿 is small (equation 17), the high frequency response is not measurable. The rotor saliency depends on the mechanical construction of the rotor, as well as the injection frequency and the copper sheet dimensions. The mechanical construction of the rotor cannot be changed, but the injection frequency and the copper sheet dimensions can be altered to achieve the desired saliency. The dimensions of the copper sheet, the angle, 𝜉 and the thickness, 𝑡𝐶𝑢 are illustrated in Figure 7. The achieved rotor saliency in Millinger’s study is 1.45, with an injection frequency of 3125 Hz.

Figure 7. Rotor with copper sheet dimensions

The inverter switching frequency, inverter dead-band, the current sensor bandwidth, the DC-bus voltage and the injection amplitude are other aspects that influence the position estimation. The inverter dead-band causes non-linearly behaviour in the inverter and the DC-bus voltage restricts 𝑈. These parameters are deemed less impactful compared to the saliency but should be evaluated in future work. None of these quantities are investigated in this report.

The parameters presented in section 3.1 (DC-bus voltage, current controller task frequency etc.) are difficult and/or not possible to change, in the scope of this project. Comparing the target hardware to the hardware used by Millinger et al. the first differences is the PWM frequency.

Millinger et al. used 25 kHz PWM frequency whereas the SRB3 uses 48 kHz PWM frequency.

The current sensors used in Millinger’s study have a bandwidth of 200 kHz and are Hall effect current sensors, the current sensors used in this report have a bandwidth of 125 kHz and are shunt current sensors. The DC-bus voltage is lower, 18 V for the target hardware compared to 42 V used by Millinger.

The goal of modifying the motor is to achieve a rotor saliency of 1.45, the same as in Millinger’s study. The copper sheet dimensions are limited by the air gap between the rotor and the stator, the air gap in the SRB3 is 0.5 mm. The copper thickness used by Millinger was 0.3 mm. Copper, 0.3 mm thick, is readily available with copper levels of around 98%. Higher copper percentage is better because the electric conductivity is higher. The copper used for this prototype is the same copper used in Millinger’s study.

The injection frequency is limited by the phase current sampling frequency and the inverter switching frequency. The limiting factor in this case is the sampling frequency, the microcontroller supports sampling up to 125 kHz on three channels. Millinger et al. suggests at least eight samples per period resulting in a maximum injection frequency of 15 kHz.

According to Millinger et al. the injection frequency should be as high as possible. There is seemingly no upper limit and higher frequency results in lower losses.

(32)

Figure 8. Rotor saliency, 𝜉 = 30° for different thicknesses

A simulation was made with 𝜉 = 30° for 𝑡𝐶𝑢 ∈ [0.1, 0.2, 0.3]. The simulation was done by Jonas Millinger. The simulations are the same simulations as was performed in Millinger’s study. The results are shown in Figure 8. A saliency of 1.457 is theoretically achieved with 𝑓 = 6 𝑘𝐻𝑧, 𝜉 = 30°, 𝑡𝐶𝑢 = 0.3 𝑚𝑚. The 6 kHz injection frequency aligns well with the current sampling and allows for sampling of other necessary signals such as the DC-bus voltage and inverter temperature. The required sampling frequency is 48 kHz, one sample per PWM duty-cycle, meaning that the PWM frequency and the sampling can be synchronized in order to not sample too close to a PWM switching. This should allow the transients to be attenuated before sampling.

3.5 Motor Prototype

Figure 9 shows the rotor of the SRB3 with the two copper sheets mounted, symmetrically around the magnetic poles, see Figure 3. At the ends of the copper sheets, highlighted by the white ellipses, two copper wires are soldered between the two copper sheets to short-circuit the copper sheets.

Care was taken as to not demagnetize the rotor magnets during the soldering process.

Figure 9. Rotor with mounted copper sheets

(33)

A rudimentary analysis of the mechanical and thermal stress has been done in order to choose an appropriate glue to mount the copper sheets. The centrifugal and sheer stress, 𝜎𝑐𝑒𝑛𝑡𝑟𝑖𝑓𝑢𝑔𝑎𝑙, 𝜎𝑠ℎ𝑒𝑒𝑟 are defined in equation 22 and 23 respectively.

𝜎𝑐𝑒𝑛𝑡𝑟𝑖𝑓𝑢𝑔𝑎𝑙 = mCuω2rr

Acontact (22)

σshear = ECuAcrossΔαΔT

Acontact (23)

Where 𝑚𝐶𝑢is the copper sheet mass, 𝜔 the angular speed of the rotor, 𝑟𝑟the rotor radius, 𝐴𝑐𝑜𝑛𝑡𝑎𝑐𝑡 the contact area between the copper sheet and the rotor, 𝐸𝐶𝑢 is Young’s modulus for copper, 𝐴𝑐𝑟𝑜𝑠𝑠 is the axial cross-section, Δ𝛼 is the difference between the materials thermal expansion coefficients, Δ𝑇 is the temperature difference between the rotor and the ambient temperature.

The worst case for the centrifugal stress is during high rotational speeds. The motor is rates for speeds up to 40 kRPM. This will result in a centrifugal stress of 180 kPa. The worst case for the shear stress is during a large temperature difference. The rotor temperature increase can be as high as 150 °C. The worst-case shear stress is then 977 kPa.

The stresses, 180 kPa and 977 kPa are relatively low. The shear stress dominates and most glues lose strength as temperature increase, especially at high temperatures. The glue used is Loctite 648 that has a high temperature resistance, and good filling capacity. The glue retains around 60% of its initial strength at temperatures around 180 °C and one of the recommended uses is in electrical motors. The glue has been tested for temperature up to 200 °C, without failure.

3.6 Modelling of the PMSM with signal injection

A model of the system was made in Simulink to better understand of the system and evaluate the effect of different parameters, such as 𝑈 or 𝑓. The PMSM model is based on the models described in (Giri & Fouad, 2013). The signal injection and estimation model are based on a model provided by Jonas Millinger.

The model consists of the motor model, a simple inverter model, signal injection, demodulator, observer and speed/current controllers. The sampling frequencies from section 3.1 are used in the simulation. The motor parameters used in the simulation are presented in Appendix A, and an overview of the Simulink model is presented in Appendix B.

The motor is modelled in the dq-frame with continuous time. The current sensor is modelled using a 12-bit quantization block and a rate-transition block. The control structure is illustrated in Figure 2. The signal injection is modelled using a cosine source with the angular frequency 𝜔 and amplitude 𝑈. The injection signal is added to the d-axis voltage and transformed to the stator fixed alpha-beta frame with 𝜃̂ and then transformed back to the dq-frame with 𝜃. The result is that the sin (Δ𝜃) term, as seen in equation 17, is introduced.

There is also an additional low-pass filter for the d- and q-axis currents, in order to filter out the high frequency component for the current feedback. The inverter model is used to saturate the

(34)

magnitude of the dq-axis voltage. The d- and q-axis voltages can be represented as a complex number in the polar form and the magnitude can be saturated in order to limit the output voltage.

The motor is controlled with speed control and the speed reference is a smooth ramp. A smooth ramp limits the acceleration and minimizing transients. The reference is generated with the hyperbolic tangent function according to the equation below

0.5ℎ tanh(2𝑘0(𝑡 − 𝑇0) + 1) (24)

Where ℎ is the final value, 𝑘0 is the slope at the mid-point, 𝑡 is the time and 𝑇0 is the midpoint time. Figure 10 shows the smooth ramp.

Figure 10. Smooth ramp

3.7 Software Implementation

The software infrastructure provides the necessary platform to ease the implementation of the control algorithm. The functionality available is discussed in section 3.1. As mentioned, a scheduler controls the tasks that needs to be executed in different slots. The scheduler starts executing a new slot every 125 microseconds. Meaning that the execution time for one slot may never be longer than 125 microseconds.

Figure 11 illustrates how the slots and the tasks are arranged in order of priority. The highest priority executes first. Note that the speed and position estimation is included in the illustration and that the signals processed in slot n is sampled in slot n-1.

The signal processing executes with 8 kHz frequency and the current is sampled with 48 kHz frequency. Every time a new slot is started, six current samples has been sampled. The speed and position estimation needs to handle all six current samples and performed one estimation per current sample. The signal processing task calculates the rotor speed and position and the observer and demodulator practically replaces parts of the signal processing task. The speed and position estimations are then executed after the data processing, but before the current controller and signal injection. The most recent estimations are used for speed and current feedback as well as in the Clarke-Park transformation. The delay between sampling and PWM output is minimised, but the delay between sampling and PWM output will not be less than two slots regardless. A as the current sampled in slot 0 is processed and the PWM duty cycles are written to the PWM registers

(35)

in slot 1. The PWM module will not use the PWM duty cycles until slot 2 starts executing. The delay is however predictable and can be compensated for.

Figure 11. Slots and task executing in each slot

The current controller does not only perform the PI-controller operations, but also calculates the PWM duty-cycles for the next slot. The signal injection is done in parallel with the current controller. A scheme of the implementation of the demodulation, speed and position estimation and signal injection are shown in Figure 12.

Figure 12. Estimation flowchart

First, the oldest phase currents (𝑖𝐴,𝐵,𝐶) are gathered and transformed to dq-frame using 𝜃̂. The q- axis current is demodulated according to Figure 4 as well as low-pass filtered for use in the observer. The filters are first order Butterworth IIR filters, designed with the Filter Designer Toolbox in MATLAB. The demodulated q-axis current is fed into the observer together with the low-pass filtered q-axis current. The estimated position and speed is then updated. This process is repeated six times, one time per current sample and the updated estimated position is used in the Clarke-Park transform. The most recent dq-currents are sent to the current controller.

(36)

The current controller executes with the most recent dq-currents and the injection and demodulation signals are calculated. The demodulation signal is stored to be used in the next demodulation and the injection signal is added to the output of the current controller. The dq-axis voltages are transformed to the three-phase stationary reference frame with the inverse Clarke- Park transform and the PWM duty-cycles are calculated. The position used in the inverse Clarke- Park transform is then extrapolated using the rotor speed, the extrapolated angle is noted as 𝜃̃𝑒𝑥𝑟𝑎𝑝𝑜𝑙𝑎𝑡𝑒𝑑. The processes of calculating the injection and demodulation signal, inverse Clarke-Park transform, calculating PWM duty cycles and extrapolating the rotor position is repeated six times. This is done in order to generate a new PWM output for every PWM period during the coming six slots, until six new duty cycles can be calculated.

The real-time implementation is shown in more detail in Figure 13. The blue asterisk’s are current samples, the red diamonds are new PWM outputs, where a new PWM-duty cycle is read from the PWM registers.

Figure 13. Real-time implementation with data samples

Figure 13 shows three slots, n, n + 1 and n + 2. Looking at slot n + 1, the signal processing is executed first, converting the ADC-values into SI-units. Following, the speed and position is estimated using the current samples from slot n, indicated by the blue arrows. The last current sampled is also used in the current controller. After the current controller executes, the PWM outputs are calculated according to the logic in Figure 12. The six PWM outputs, or duty cycles are then used in slot n+2, indicated by the red arrows. The speed controller is then executed, together with the supervision and the software oscilloscope as per Figure 5. The delay between the data sampling and the PWM output is predictable and the ∼ 250𝜇𝑠 delay between sampling and PWM output can be compensated for.

(37)
(38)

4. RESULTS

This chapter presents the results gathered in the project. The results include the effect of the motor modification and simulation results. The verification of the injection and estimation are presented.

The results of the sensorless control testing are presented.

4.1 Measuring motor inductance

The motor was modified with a short-circuit rotor-ring (Figure 9). The expected result is a distinct variation in inductance based on the rotor position. The phase-to-phase inductance was measured using an RLC-meter at 6 kHz and amplitude of 1 V and the phase-to-phase resistance was measured with a digital multimeter. The minimum and maximum inductance and resistance was noted. The motor was turned by hand in order to identify the maximum and minimum inductance and resistance. The results of the measurements are presented in Table 2.

Table 2. Measured motor parameters before and after modification

Property Minimum Maximum

Inductance before modification 0.0413 mH 0.0432 mH

Resistance before modification 0.101 Ohm 0.103 Ohm

Inductance after modification 0.0369 mH 0.0542 mH

Resistance after modification 0.102 Ohm 0.0128 Ohm

Before the modification, the inductance variation was very small, around 2% with a rotor saliency very close to 1. After modification the minimum inductance decreased slightly while the maximum increased by a factor of 1.3. The rotor saliency increased to 1.45. The resistance did not change. The desired saliency is achieved, and it corresponds very well with the theoretical analysis in section 3.4.

4.2 Simulation results

The simulation was run in order to further understand the system performance overall, and evaluate the effects of 𝑓 and 𝑈. Two tests were made, one test with different frequencies and one test with different injection amplitudes. The speed reference starts at 𝑡 = 0.5 𝑠. The final value is 600 rpm, 62.8 rad/s. The speed controller and its performance is not the main interest in the simulations.

The main interest is how well the speed and position are estimated.

References

Related documents

Att förhöjningen är störst för parvis Gibbs sampler beror på att man på detta sätt inte får lika bra variation mellan de i tiden närliggande vektorerna som när fler termer

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

So, in order to reduce the gap between Swedish governmental export support programs and cleantech firms’ expectations, the studied firms have suggested to implement a

We compared compassion and empathy on a component level in regards to altruism prediction, as well as replicated and expanded on the previous findings by Lim & DeSteno (2016)

Keywords: Constant Power Speed Range, Electric Vehicles, Field-weakening, Reference Flux Linkage, Iron Loss, Permanent Magnet Synchronous Motor, Thermal Analysis... Juliette

Support for the topographic control of the fronts in the Southern Ocean is provided by the strikingly similar posi- tions of the Southern Ocean frontal features in the inde-

Using electromagnetic simulations, the magnetic circuit of a neodymium- iron-boron, NdFeB, magnetised permanent magnet generator was redesigned to use ferrite permanent magnets..

Three different rotor topologies are optimised for torque production assuming identical stators, resistive load of a given current amplitude, and an equal amount of PM maximum