high precision and low-cost stepper motor control for

65
IN DEGREE PROJECT ELECTRICAL ENGINEERING, SECOND CYCLE, 30 CREDITS , STOCKHOLM SWEDEN 2018 High Precision and Low-cost Stepper Motor Control for Industrial Implementation CHUYAO ZHOU KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF ARCHITECTURE AND THE BUILT ENVIRONMENT

Upload: others

Post on 17-Oct-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

IN DEGREE PROJECT ELECTRICAL ENGINEERING,SECOND CYCLE, 30 CREDITS

, STOCKHOLM SWEDEN 2018

High Precision and Low-cost Stepper Motor Control for Industrial Implementation

CHUYAO ZHOU

KTH ROYAL INSTITUTE OF TECHNOLOGYSCHOOL OF ARCHITECTURE AND THE BUILT ENVIRONMENT

TRITA TRITA-EECS-EX-2018:528

ISSN 1653-5146

www.kth.se

KTH ROYAL INSTITUTE OF TECHNOLOGY

MASTER THESIS

High Precision and Low-cost StepperMotor Control for Industrial

Implementation

Author:Chuyao Zhou

Supervisor:Dr. Bin Liu

Examiner:Dr. Oskar Wallmark

August 24, 2018

iii

Abstract

The industry is calling for a low-cost drive solution. The hybrid stepper motor isconsidered as a good candidate since it has much larger production than traditionalservo motor. In this thesis, the author comes up with a control solution of a hybridstepper motor based on a low-cost sensor, which reaches a high control resolutionwith a low cost. In the design, vector control is chosen and modified to be the con-trol strategy of the motor. An extended kalman filter (EKF), neural network (NN)and linear regression harmonic compensation (LRHC) are evaluated to improve theperformance of the low-cost sensor. In the experiments, the solution is tested byrunning the motor to simulate an industrial implementation. The experiments givea positive outcome so that the feasibility of the low-cost solution for the industrialdrive has been proved.

Sammanfattning

I industrin finns det ett behov av en lågkostnadslösning för motorstyrning. Denhybrida stegmotorn anses vara en bra kandidat eftersom den produceras i myckethögre utsträckning än den traditionella stegmotorn. I detta examensarbete har för-fattaren föreslagit en kontrollösning för en hybrid stegmotor baserad på en lågkost-nadssensor, vilken når en hög upplösning med en låg kostnad. Designen använ-der sig av vektorstyrning för att reglera motorn. Ett EKF (Extended Kalman Filter),ett NN (Neural Network) och LRHC (Linear Regression Harmonic Compensation)har utvärderats för att förbättra prestandan av lågkostnadssensorn. I experimententestades lösningen genom att köra motorn för att simulera användning i industrin.Experimenten gav positiva resultat, så möjligheten för att använda lågkostnadslös-ningen för industriell styrning har bevisats.

v

AcknowledgementsForemost, I would like to express my sincere gratitude to my supervisor Dr. Bin Liufor the continuous support of my master thesis project and research, for his patience,motivation, enthusiasm, and immense knowledge. His guidance helped me in allthe time of research and writing of this thesis.

Besides my supervisor, I would like to thank my examiner associate professor Dr.Oskar Wallmark for his expertise on electrical machines, the continuous followingof my project progress and his valuable advice on my thesis draft.

My sincere thanks also go to my ABB colleges, especially to Peter Fransson, whohelped me a lot in the laboratory, and to Pietro Falco, who offered me many criticalsuggestions on signal processing.

Last but not least, I would like to thank my family who is always the most solidbacking of me. And to my loved J.M.Walker, with whom I have spent the happiesttime in Sweden.

vii

Contents

Abstract iii

Acknowledgements v

1 Introduction 11.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Challenge and Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.4 Previous Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.5 Thesis Contribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.6 Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 System Modeling and Control Strategy 52.1 Hybrid Stepper Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 Open-loop Control and Microstepping . . . . . . . . . . . . . . . . . . . 52.3 Close-loop and Vector Control . . . . . . . . . . . . . . . . . . . . . . . . 62.4 Different Controller Structures . . . . . . . . . . . . . . . . . . . . . . . 72.5 Reverse Challenge and Friction Compensation . . . . . . . . . . . . . . 8

3 Extended Kalman Filter 113.1 EKF Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.2 Implementation of EKF . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.2.1 Introduction of the signal . . . . . . . . . . . . . . . . . . . . . . 123.2.2 Sensor Fusion Algorithm . . . . . . . . . . . . . . . . . . . . . . 133.2.3 Tuning of EKF Parameters . . . . . . . . . . . . . . . . . . . . . . 13

3.3 Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

4 Other Signal Processing Solutions 194.1 Linear Regression and Harmonics Compensation(LRHC) . . . . . . . . 19

4.1.1 Linear Regression Algorithm . . . . . . . . . . . . . . . . . . . . 204.1.2 Experiment Result . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.2 Neural Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.2.1 Neural Network Algorithm . . . . . . . . . . . . . . . . . . . . . 224.2.2 Experiment Results . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

5 Experimental Test Result 255.1 Test Rig Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.2 Controller Design Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5.2.1 Current Controller . . . . . . . . . . . . . . . . . . . . . . . . . . 265.2.2 Position Controller with Position Feedback . . . . . . . . . . . . 265.2.3 Position Controller with Position Feedback and Speed Feedback 30

viii

5.2.4 Position Controller with Position Feedback, Speed Feed For-ward and Acceleration Feed Forward . . . . . . . . . . . . . . . 33

5.2.5 Position Controller with Position Feedback, Speed Feedback,Speed Feed Forward and Acceleration Feed Forward . . . . . . 36

5.3 Friction Compensation Test . . . . . . . . . . . . . . . . . . . . . . . . . 395.4 Linear Regression Compensation Test . . . . . . . . . . . . . . . . . . . 405.5 Test Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435.6 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

5.6.1 Response Time and Bandwidth Selection . . . . . . . . . . . . . 445.6.2 The Effect of Detent Torque . . . . . . . . . . . . . . . . . . . . . 45

6 Conclusion and Future Work 476.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476.2 Further Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

6.2.1 Advanced Controller . . . . . . . . . . . . . . . . . . . . . . . . . 486.2.2 Parameter Identification . . . . . . . . . . . . . . . . . . . . . . . 486.2.3 Trial of More Sensors and EKF . . . . . . . . . . . . . . . . . . . 48

Bibliography 49

ix

List of Abbreviations

EKF Extended Kalman FilterHSM Hybrid Stepper MotorLRHC Linear Regression Harmonic CompensationMRPS Magnetic Rotary Position SensorNN Neural NetworkPMSM Permanent Magnet Synchronous Motor

xi

List of Symbols

uaub phase voltage of the motor Viaib phase current of the motor Aωr angular speed of the rotor rad/sθr position of the rotor radR phase resistance of the motor ΩL phase inductance of the motor HKm torque constant V s/radKv coefficient of viscous friction N m s/radJ system inertia kg m2

τ load torque N mN pole pair number 50

1

Chapter 1

Introduction

1.1 Purpose

This purpose of this research project is to develop a high precision position controlsolution for a hybrid stepper motor based on a low-cost sensor, and investigate thefeasibility of the solution for the high-end industrial implementation.

1.2 Challenge and Scope

The challenge of this project is how to properly control the motion of the motor withthe low-quality signal from the low-cost sensor. Thus, the main task of this projectwill be divided into two section. First, a motion control strategy of the stepper mo-tor should be developed. Second, the signal from the low-cost sensor needs to beprocessed to meet the demand of the control strategy.

1.3 Background

Nowadays, the industrial automation becomes more and more popular. There willbe more demand for high-end industrial implementations not only in the traditionalmanufacture such as autonomous industry but also in small business such as foodpackage. The food package implementation may not need as high precision as thatin the autonomous industry but it calls for a cheaper solution with a fairly highprecision. The main cost of an industrial implementation locates at its driving motorand the gearbox. A common solution is using a servo motor. A servo motor is fairlyexpensive and it usually operates at high speed with a gearbox, which increases itsbulk and the cost as well. If a cheaper motor can be used without a gearbox, thecost will decrease by a large margin. From this sense, the stepper motor will be aproper candidate. The stepper motor is widely used in industrial implementationsuch as motor roller conveyor and tape feeder. It can be easily controlled with anopen loop and achieves a fairly high torque volume ratio. However, for an industrialimplementation, the precision of a stepper motor under open loop control is not highenough. Thus, a new control strategy needs to be developed.

In the last two years, two research projects have been conducted at ABB Corpo-ration Research Center and the results have been published as master theses [Ron-quist et al., 2016], [Wallin and Varagnolo, 2017], some solutions had been proposedin these research projects. Unfortunately, only a few practical results came out due tovarious reasons. Thus, this thesis will be the follow-up work of the previous researchprojects.

2 Chapter 1. Introduction

1.4 Previous Work

Thought the study of stepper motor has been done for years, no reference was foundconsidering the stepper motor and low-cost sensor together. One reason may be thelimited usage of the stepper motor in high-end applications. It has its significantdrawback such as low precision and detent torque, which results in its less usagethan the permanent magnet synchronous motor (PMSM) and brushless direct cur-rent (BLDC) motor. However, in recent years, some industrial research projects suchas [Karlsson, 2016] had been done to investigate the feasibility of replacing the exist-ing solutions with stepper motor solutions.

As for the control of stepper motor, research works have been taken in differentaspects. For many years, references such as [Zhang, He, and Sheng, 2005], [Baluta,2007] focused on improving the microstepping algorithm to increase the precision ofthe open-loop control of the stepper motor. Some following works such as [Der-ammelaere et al., 2014], [Derammelaere et al., 2017] have made progress in the loadangle compensation, trying to reach a higher precision in open-loop mode. Inspiredby this, a research in ABB [Liu et al., 2017] implemented the load compensation algo-rithm in a close-loop mode. In another way, some researchers tried to implement theclose-loop control based on a sensorless control strategy using estimation algorithmsuch as Linearization [Zribi and Chiasson, 1991], neural network(NN) [Feng, 2000]and extended kalman filter(EKF) [Persson and Perriard, 2003a], [Persson and Per-riard, 2003b]. And different damping strategies have been developed to eliminatethe detent torque of the stepper motor [Schweid, McInroy, and Lofthus, 1995], [Le,Hoang, and Jeon, 2017]. In general, many projects have been done to overcome thenature drawback, low precision and detent torque. These works will offer a lot ofvaluable information for this thesis, the details will be further discussed in Chapter2.

In previous research projects at ABB, a low-cost Magnetic Rotary Position Sen-sor (MRPS) was selected to provide the position information of the rotor. However,its signal quality can not meet the requirement of the control strategy so it needs tobe compensated. The previous student theses had already given a good summaryfor this specific MRPS and some compensated methods were proposed. For exam-ple, [Ronquist et al., 2016] proposed methods such as linear regression and adap-tive notch filter, but this research did not totally eliminate the variation problem ofthe MRPS signal. The next student thesis [Wallin and Varagnolo, 2017] proposed amethod using EKF, however, the result is not so reliable. In this thesis, these meth-ods will be reevaluated and new methods such as neutral network will be tested.Further details will be discussed in Chapter 3 and Chapter 4

1.5 Thesis Contribution

Based on the previous work, this thesis proposed a complete solution of a steppermotor control for high-end industrial implementations, combining the stepper mo-tor and a low-cost sensor. This solution improves the precision of the low-cost sensorby linear regression harmonic compensation, and control the motor’s motion by aVector Control strategy through a properly designed controller. The final solutiongreatly reduces the cost of the drive system of a stepper motor and keeps a fairlyhigh precision of position control.

1.6. Thesis Outline 3

1.6 Thesis Outline

The following contents will begin with the system modeling and go on with thetheories of controller design and signal processing. Some simulation results relatedto method choice will be shown with the theories. In the end, there are experimentalresults followed by the conclusion and discussion.

5

Chapter 2

System Modeling and ControlStrategy

2.1 Hybrid Stepper Motor

Stepper motor is a kind of motor which can translate switched excitation changesinto precisely defined increments (‘Step’) of rotor position [Acarnley, 2002]. Thestepper motor can be divided into two basic types: hybrid stepper motor (HSM)and the variable-reluctance motor (VRM). The main difference is that the magneticflux in VRM is purely excited by the exciting current that applied to the stator wind-ing. However, for the HSM, magnetic flux is mainly induced by the permanentmagnet. In this thesis, a two-phase hybrid stepper motor is used on the test rig. (Allthe ‘stepper motor’ refers to the hybrid stepper motor in the following text if not specified).This stepper motor has two phase winding perpendicular to each other, which arereferred as a and b phase, respectively. The coordination based on these two phasesis called αβ frame. The schematic of a hybrid stepper motor can be seen in Fig.2.1. Adisassembled stepper motor provided by ABB is shown in Fig.2.2.

2.2 Open-loop Control and Microstepping

Conventionally, stepper motors were always controlled by a series of step signals oneach phase, which induced a series of magnetic force on the stator to attract the rotorto a certain position. Since it is open-loop control, this control strategy needs a largenumber of rotor teeth to achieve a high resolution. Typically, a stepper motor has

FIGURE 2.1: Schematicof Hybrid Stepper Mo-tor Structure [Ronquist

et al., 2016].

FIGURE 2.2: Disas-sembled Stepper Mo-

tor From ABB

6 Chapter 2. System Modeling and Control Strategy

200 teeth with the resolution of 1.8 mechanical degrees. However, this discrete stepcontrol will naturally induce a cogging problem, i.e. the detent torque, which mayaffect the performance of the motor in some implementation. This phenomenon isan essential drawback of the stepper motor.

To reach a higher position resolution, the size of exciting steps can be reduced, forexample, the half-step algorithm can reach a double resolution. The step size can bereduced even further by an algorithm named microstepping [Zhang, He, and Sheng,2005], [Baluta, 2007]. The microstepping algorithm uses sinusoidal excitation currentto generate flux and torque. The more steps the controller generates, the higherresolution it will reach and more sinusoidal the control signals will be. The positionreference information is provided by the excitation current as shown in (2.1).

ia = I0 cos(θe) = I0 cos(Nrθre f )

ib = I0 sin(θe) = I0 sin(Nrθre f )(2.1)

Note that even with microstepping algorithm, the effect of detent torque can notbe totally eliminated. Usually, the magnitude of detent torque is only 10% of theholding torque. Thus, most of the references neglect it in the system model andconsider it as a disturbance of the system [Bellini et al., 2007].

2.3 Close-loop and Vector Control

Since the microstepping algorithm can only reduce the error but not eliminate theerror in open-loop mode, a close-loop control algorithm may be taken into account.However, if the control is done directly under αβ frame, a PI controller can not con-trol the current without a static error in close-loop mode, which has been proven bythe previous thesis work [Wallin and Varagnolo, 2017]. This problem can be solvedby the Vector Control algorithm.

Vector control, sometimes known as field oriented control (FOC), allows the con-trol process to be performed on a synchronous rotation coordination aligning withthe rotor position, which names dq frame. A schematic of dq coordination is shownin Fig.2.3. The currents and voltages under dq frame can be easily derived from theαβ frame by applying a transformation call Park transformation as shown in (2.2).After applying Park transformation, both AC current and voltage are changed intoDC current and voltage, which can be easily controlled by a simple PI controllerwithout static error. The mathematical dynamic model of the hybrid stepper motorin dq frame can be commonly described [Bendjedia et al., 2012] as (2.3). It couldbe remarked that the equation is similar with the one of non-salient PMSM due tothe existence of the permanent magnet rotor. Another point is that there is no mu-tual inductance in this two-phase HSM due to the orthogonality between the twophases. In this case, this HSM can be controlled as a PMSM through vector control.Conventionally, the reference of d-axial current will be set as zero, trying to reachthe maximum power output of the machine [Fitzgerald, 2003, p.583-587]. And thetorque will be proportional to the q-axial current output of the machine with coeffi-cient Km. This control algorithm will also be used in this thesis project.[

id(t)iq(t)

]=

[cos(θe(t)) sin(θe(t))− sin(θe(t)) cos(θe(t))

] [ia(t)ib(t)

](2.2)

2.4. Different Controller Structures 7

FIGURE 2.3: Coordination Rotation of dq frame based on αβ frame.

ud = Rid + Ldidt− LNωriq

uq = Riq + Ldidt− LNωrid + Kmωr

Kmiq − τ = Jdω

dt+ Kvωr

dθr

dt= ωr

(2.3)

The drawback of this method is that a very accurate position information shouldbe provided for the Park transformation. Otherwise, the transformation will not bebeneficial to the position control. Hence, it calls for a high-resolution position signalfrom the sensor. This is the main challenges of signal processing for this thesis.

2.4 Different Controller Structures

There can be different structures of the controller design. Intuitively, the first struc-ture is a simple PID controller with position feedback as shown in (2.4), where KP,KI and KD are PID controller parameters. The torque reference τre f can be calcu-lated based on the position reference θre f and the position measurement θr. Since thetorque is proportional to the q-axial current by a coefficient Km, the iqre f can be givenas the input of the current controller.

τre f = Kmiqre f = KP(θre f − θr) + KI

t∫0

(θre f − θr)dt + KD(.

θre f −·

θr) (2.4)

Also, an additional speed feedback controller as (2.5) may improve the perfor-mance. KPω is the proportional gain of the controller.

τre f = Kmiqre f = KP(θre f − θr) + KI

t∫0

(θre f − θr)dt + KD(.

θre f −·

θr) + KPω(ωre f −ωr)

(2.5)However, as a mechanical system, the other important variables such as friction

and moment of inertia should be considered. Thus, the controller structure pro-posed in reference [Kim, Yang, and Chung, 2011] is interesting to be discussed and

8 Chapter 2. System Modeling and Control Strategy

compared with other simpler controllers. Expect the PID component, this controllerstructure has other two additional terms to compensate for the viscous friction andthe torque induced by acceleration. It has been proved in the same reference thatthis controller structure is stable and will converge to zero error when the time in-crease to infinite. The equation of the controller is (2.6), where KP, KI and KD canbe determined by a stability analysis of the control matrix. Kv is the coefficient offriction. J is the inertia of the motor.

τre f = Kmiqre f

= KP(θre f − θr) + KI

t∫0

(θre f − θr)dt + KD(.

θre f −·

θr) + Kvωre f + J.

ωre f

Moreover, it is possible to add a speed controller on this structure as (2.6). Thespeed controller may contribute to the control of transience.

τre f = Kmiqre f =KP(θre f − θr) + KI

t∫0

(θre f − θr)dt + KD(.

θre f −·

θr)

+ KPω(ωre f −ωr) + Kvωre f + J.

ωre f

These four controller structures will all be tested on the test rig and the resultswill be evaluated in Chapter 5.

2.5 Reverse Challenge and Friction Compensation

For the dynamic process in industrial implementations, one of the most importantchallenges is the compensation of the position error in the reverse process, i.e, whenthe motor changes its rotation direction in a short time. The reverse process is similarto the restart-up of the machine. For example, the q-axial current will vanish froma positive value to zero and then increase in the negative direction or vise versa.Thus, the motor will lose the driving force in an instant and regain it after. Thelargest error in the whole running period of the motor will be induced by this reverseprocess (see Chapter 5). This problem may be eliminated in different ways, suchas high-order compensator [Krishnamurthy and Khorrami, 2004] to overcome thedisturbance, optimized controller bandwidth to shorten the reverse time, etc. Dueto the time limit, a simple friction compensation is proposed in this thesis instead ofother advanced methods.

The term of in Kvω in (2.6) is for the compensation of friction. However, thisterm only considers the common running process. According to the Coulomb’s law,the friction needed to start a motion is larger than that needed to maintain it, i.e, thefriction will change from the static friction to the kinetic friction when a mass startsits motion [“Friction” 2011]. A schematic illustration is shown in Fig.2.4. Thus, thecontroller design should take static friction into account.

2.5. Reverse Challenge and Friction Compensation 9

FIGURE 2.4: Schematic of Static Friction and Kinetic Friction (“Fric-tion” 2011).

The friction can be modeled in different ways, for the simplest as Morin’s model,the static friction is assumed to be a constant value [Morin, 1833]. In this case, thefriction model can be described by (2.6).

f (v, τ) =

τ ωr = 0, |τ| < fs

fssgn(τ) ωr = 0, |τ| > fs

Kvωr ωr 6= 0,

(2.6)

where fs is the static friction and the sign function is defined as (2.7):

sgn(x) =

1 x < 00 x = 0−1 x > 0

(2.7)

From the control aspect, if the compensation term is constructed by the simplemodel, the discontinuity of the reference signal at the original point will induce alarge step of reference, which will result in a larger error. Thus, a tanh function isconsidered to construct the compensation term Kvω. The modified model is shownas (2.8).

f (v) =

m · tanh(v) |ωr| < ωth

Kvωr |ωr| > ωth(2.8)

where m is the magnitude of the tanh function and ωth is the speed thresholdto limit the implementation range of the tanh term. These two parameters can bedetermined if the material and running scenario of the motor is known. However,in engineering application, it can be tuned through trial-and-error method.

The experimental results of this friction compensation algorithm can be seen inChapter 5.

11

Chapter 3

Extended Kalman Filter

Extended kalman filter (EKF) and unscented kalman filter (UKF) have been pro-posed in a previous student thesis [Wallin and Varagnolo, 2017] for the sensor fusionsolution, i.e, fusing two position signals (MRPS+back-emf), to improve the signalquality from the low-cost sensor MRPS. However, the outcome of that student thesisseems to be unreasonable. Thus, the EKF algorithm will be reexamined in this thesis.

3.1 EKF Algorithm

Kalman Filter (KF) is a recursively calculation algorithm to predict a signal and filterthe white noise. In the original paper of R.E.Kalman [R.E, 1960], he only raised upthe algorithm on the linear system. In the later works such as [Persson and Perri-ard, 2003a] and [Zawirski, Janiszewski, and Muszynski, 2013], people applied thisalgorithm on non-linear systems by linearizing the system, which is the so-calledextended kalman filter (EKF).

Usually, a system can be modeled in state space as (3.1).

xk+1 = Φxk + Γuk + wk

zk+1 = Hxk + vk

wk ∼ N(0, Qk)

vk ∼ N(0, Rk)

(3.1)

where the subscripts k + 1 and k stand for the sample time instant in a discretesystem. The other symbols are listed in Table.3.1.

In this stepper motor implementation, based on the system model of steppermotor in Chapter 2, the (2.3) can be discretized in a matrix form as (3.2).

idk+1

iqk+1

ωrk+1

θrk+1

τk+1

=

1− Ts

RL 0 0 0 0

0 1− TsRL Ts

KmL 0 0

0 TsKm

J 1− KvJ 0 − Ts

J0 0 Ts 1 00 0 0 0 1

idk

iqk

ωrk

θrk

τk

+

Ts/L 0

0 Ts/L0 00 00 0

[

u∗dk

u∗qk

]

(3.2)where u∗dk

and u∗qkare the decoupled voltage as described in (3.3). This method

is proposed in reference [Persson and Perriard, 2003b], which make it easier to buildthe EKF model and avoid the coupling problem between d and q axis.

udk = u∗dk− LNωrkiqk

uqk = u∗qk+ LNωrkidk

(3.3)

12 Chapter 3. Extended Kalman Filter

Symbol Meaning Content

x state of interest[

id iq ωr θr τ]T

z measurement matrix[

id iq θr1 θr2 · · · θrS

]T

Φ system matrix see 3.2

Γ control input matrix see 3.2

H measurement input matrix see 3.9

u control matrix[

u∗d u∗q]T

w system modeling error matrix Need to be tuned

v measurement error matrix Need to be tuned

Q covariance of w Need to be tuned

R covariance of v Need to be tuned

Ts sample time 5e−5(s)

TABLE 3.1: Symbols in state space modeling and EKF algorithm

Thus, the system model can be easily written in the way of (3.1) and perform theEKF algorithm as follows.

First, compute the predicted state estimate and measurement:

xk|k−1 = Φk xk−1|k−1ΦTk + Γk−1uk−1

zk = Hk xk|k−1(3.4)

Then compute the prior covariance matrix, Kalman gain and the posterior co-variance matrix:

Pk|k−1 = ΦkPk−1|k−1ΦTk + Qk

Kk = Pk|k−1HTk (HkPk|k−1HT

k + Rk)−1

Pk|k = (I − Kk Hk)Pk|k−1

(3.5)

At last, correct the predicted estimate on the measurement:

xk|k = xk|k−1 + Kk(zk − zk) (3.6)

3.2 Implementation of EKF

3.2.1 Introduction of the signal

There will be two signals(MRPS+back-emf) involved in the implementation of EKF.The MPRS signal and the other is back-emf position signal. The MRPS sensor isintroduced in a previous student thesis [Wallin and Varagnolo, 2017], it provides aposition signal with some variation as shown in Fig.3.5. The challenge is to eliminatethis variation as much as possible to provide accurate position information to thecontroller.

3.2. Implementation of EKF 13

The back-emf is the abbreviation of back electromotive force, which is inducedby the inductance in the winding of the motor by Lenz’s law. As shown in Fig.2.3,the back-emf is always aligning with the q axis. Thus, it can be easily derived fromthe figure that the projection of back-emf in αβ frame as (3.7).

ea = −Kmωr sin(θe) = −Kmωr sin(Nθr)

eb = Kmωr cos(θe) = Kmωr cos(Nθr)(3.7)

Since ea, eb can be measured, so that the position θr can be calculated through(3.8).

θr =1N arctan(−ea

eb) (3.8)

3.2.2 Sensor Fusion Algorithm

Senor fusion is a good solution if a better output of the system is expected whenseveral inputs are available simultaneously. Basically, the information contained indifferent input signals are fused together to generate a better output signal. Thus,sensor fusion is frequently used in robotics’ implementations [Li et al., 2012], [Zhouand Liu, 2016]and the optimization of localization problems [Lee et al., 2012], [Yoon,Park, and Kim, 2015] as well.

Sensor fusion algorithm is an extension implementation of EKF, the key point onthis implementation is the number of position measurement signal. In general cases,considering there are S measurements of position, then the measurement equation,i.e, the second one in (3.1) will be rewritten as:

idk+1

iqk+1

θr1k+1

θr2k+1...θrSk+1

=

1 0 0 0 00 1 0 0 00 0 0 1 00...0

0...0

0...0

1...1

0...0

idk

iqk

ωrk

θrk

τk

(3.9)

In this way, several position signals can be fused by the EKF algorithm. If theavailable position signals can calibrate each other, the outcome of EKF will be betterthen the one which has single position input. Note that the number of position inputdepends on the specific implementation but at least one position signal is needed.In this thesis S = 2 so that the back-emf signal will be taken into account besides theMRPS signal.

3.2.3 Tuning of EKF Parameters

Once the EKF is formulated according to the algorithm described before, the matrixw and v need to be tuned based on the real system parameters. The tuning methodare described in many references such as [M et al., 2015] and [Bendjedia et al., 2012].The system error matrix can be tuned based on the measurements and the EKF es-timation results, i.e, the estimation results should be as close to the measurementsas possible. In this sense, if a measurement is available, a larger coefficient shouldbe put on the corresponding place in the system error matrix rather then the mea-surement error matrix. It can be explained as the error from system modeling islarger than the error from measurement, thus, the measurement should be given

14 Chapter 3. Extended Kalman Filter

more credit. However, the difference of the coefficients can not be too large. Other-wise, the estimation results can not gain benefits from both the system model andthe measurements.

The effect of the EKF parameters can be easily observed by tuning the systemmodeling error matrix w and the measurement error matrix v. If the system mod-eling error of Id and Iq is in w are set to be 1 and the corresponding value in v isset to be 0.001, 0.1, 1, respectively. The result is shown in Fig.3.1. Note that in thisexperiment, the Encoder signal is taken as the position signal and only one positionsignal is involved (no sensor fusion).

FIGURE 3.1: EKF tuning of single position input(Encoder); Error ofsystem modeling is 1 and measurement is 0.001, 0.1, 1, respectively.

3.3 Experimental Results

The system structure can be seen in Fig.3.2.

3.3. Experimental Results 15

FIGURE 3.2: EKF system work flow chart.

A estimation result of EKF is shown in Fig.3.3 and the error of estimation isshown in Fig.3.4. It can be seen from the figures that EKF can give a good estimationof current and position but have a relatively large error for the speed estimation.This error may result in problems when a speed close-loop controller is applied, seeexperiment result in Chapter 5. And this will be an important further work to do,see discussion in Chapter 6.

16 Chapter 3. Extended Kalman Filter

FIGURE 3.3: EKF estimation result and reference when the speed is-300rpm, Controlled in open-loop mode.

3.3. Experimental Results 17

FIGURE 3.4: EKF estimation error between result and reference whenthe speed is -300rpm, Controlled in open-loop mode.

The sensor fusion result is shown in Fig.3.5. Note that the Encoder signal is takenas the true reference here. It can be seen that from the figure that the matrix v can befurther tuned when sensor fusion is applied. The principle is the same with the basicEKF tuning described before, i.e, when a larger error is put in the correspondingplace of a signal, that signal gain less ‘’credit” in EKF algorithm. However, it canbe clearly observed that the fusion signal is not better than the back-emf positionsignal, which means that the fusion signal can only provide a signal as best as back-emf position signal rather than taking advantage from both signals. Thus, the EKFsensor fusion algorithm is not an appropriate choice to improve the MRPS signalquality in this situation.

18 Chapter 3. Extended Kalman Filter

FIGURE 3.5: Sensor fusion result of EKF; The p-p value of positionerror of fusion signal is 0.51, 0.61, 0.71 corresponding to 0.1, 0.5, 1 ofemf error value in matrix v with MRPS error value as 1, respectively.

3.4 Conclusion

EKF algorithm has its advantage in the signal filtering and observation/estimation.And it has been proved in many references and this thesis that it is very robust andeasy to implement. If it is formulated properly, it can contribute a lot to the sensor-less control of speed and torque. However, the EKF algorithm is very sensitive to theparameters and need to be properly tuned. Otherwise, it will lose its accuracy andcan only be used for rough observation. As for the sensor fusion, the MRPS signalcan not get many benefits from the back-emf signal. There is no evidence that thefusion signal is better than both of the original signals. Moreover, the back-emf hasits nature that it will vanish at the low-speed region. Thus, the sensor fusion algo-rithm will not valid in the low-speed region. Besides, there should be a realignmentbetween the MRPS and back-emf signal when the motor accelerates. Due to the lowquality of the MRPS signal, the realignment problem severely reduces the feasibilityof this solution in industrial implementations.

19

Chapter 4

Other Signal Processing Solutions

After the EKF sensor fusion algorithm, the linear regression and harmonics com-pensation (LRHC) and neural network (NN) algorithm are proposed in this chapterto improve the quality of the MRPS signal. Thus, a slightly different structure isproposed in this chapter as Fig.4.1.

FIGURE 4.1: LRHC/NN system work flow chart.

4.1 Linear Regression and Harmonics Compensation(LRHC)

If the Encoder signal is taken as the true value of the rotor position, the spectrum ofthe error between the Encoder and MRPS signal is shown in Fig.4.2. Some obviousharmonic components can be seen from the spectrum. They are the main reason forthe MRPS signal variation. The linear regression harmonic compensation algorithmwas proposed by the previous student research [Ronquist et al., 2016] to solve thisproblem.

20 Chapter 4. Other Signal Processing Solutions

FIGURE 4.2: Spectrum of the error between the Encoder and MRPSsignal.

4.1.1 Linear Regression Algorithm

The signal error between the MRPS and Encoder can be modeled as a combinationof a bias term and several sinusoidal and cosinusoidal terms. The number of sinu-soidal and cosinusoidal terms will represent the harmonic components in the error,therefore it is determined by the number of harmonics needed to be compensated.If the linear regression problem is modeled in the standard form as AX = B. Themodel can be presented in matrix form in (4.1).

A =

1 sin(θr(1)) cos(θr(1)) sin(2θr(1)) · · · cos(kθr(1))1 sin(θr(2)) cos(θr(2)) sin(2θr(2)) · · · cos(kθr(2))...

......

......

...1 sin(θr(i)) cos(θr(i)) sin(2θr(i)) · · · cos(kθr(i))

X =

[c a1 b1 a2 · · · bk

]T B =[

ε1 ε2 ε3 . . . ε i]T

(4.1)

where i is the number of training data points, k is the harmonic number, c is thebias, ε is the error between MRPS and Encoder signal. X is the coefficient matrixthat needs to be solved. The position information θr is provided by MRPS. Once thecoefficient matrix X is solved, it can be used to calculate the error given a certainMRPS signal. By summing up the calculated error and that MRPS signal, the cor-responding Encoder signal will be given. Note that the bias c is determined by theorigin difference between MRPS and Encoder signal, which is further determinedby the installation of the hardware. Thus, a group of coefficients will only valid for

4.2. Neural Network 21

a certain installation. Once the setup is changed, the calculation process should bedone again.

4.1.2 Experiment Result

It has been proved in the same student research that if only the dominant harmoniccomponents, i.e, the 1st, 2nd, 4th order harmonics are compensated, the effect ofthis algorithm is not good enough to fulfill the requirement of the control strategy.Thus, in this thesis, the harmonics from the first order to the tenth order will allbe compensated by the same algorithm, i.e, k = 10. The simulation is carried inMatlab script and the formula is solved by the command ‘fsolve’. Half of the sampledsignals from the test rig is used to calculate the coefficient matrix X of the regression,another half of the signals is used to validate the regression result. The validationresult is shown in Fig.4.3a and Fig.4.3b.

(A) Spectrum of error between compensationoutcome and Encoder signal.

35 36 37 38 39 40 41 42-10

-8

-6

-4

-2

0

2

4

6

8

10

(B) Linear Regression Harmonic Compensa-tion validation error in electrical degree.

FIGURE 4.3: Linear Regression Harmonic Compensation experimentresults.

Fig.4.3a shows that all the big harmonic components are compensated and theremaining content may be induced by the other non-harmonic noises in the system.Since only the first ten harmonic components are compensated and there are othernon-harmonic noises in the system, the outcome signal can not be exactly the sameas the real Encoder signal. But it can be seen from the Fig.4.3b that the error ofbetween the compensated signal and the validation target is not so large in electricaldegrees, which means that the compensated signal is qualified for both the Parktransformation(αβ to dq frame) and motion control. The validation of this methodon the test rig will be presented in Chapter 5.

4.2 Neural Network

Neural network (NN) is a supervised learning algorithm inspired by the workingprinciple of the biological neural network. It has a good performance in dealing withnonlinear problems and has a wide scope of implementation. Concerning the mo-tor implementations, the neural network has been used in sensorless control [Feng,2000] and the controller design for nonlinear performance in motor start-up process[He, Zheng, and Fang, 2017]. Since the error between the Encoder signal and MRPSsignal has a nonlinear characteristic, the neural network is considered to directlymap the MRPS signal to the Encoder signal. Once the neural network is trained for

22 Chapter 4. Other Signal Processing Solutions

FIGURE 4.4: Schematic of a Neural network; [Source:webbew].

the mapping within the certain error range, it could be used to transfer the MRPSsignal to a signal similar to the Encoder signal, which will meet the requirement ofthe position precision.

4.2.1 Neural Network Algorithm

A neural network is constructed by an input layer, an output layer and several hid-den layers. A schematic of a neural network is shown in Fig.4.4.

The output of a layer will depend on the output of the previous layer, the weightof previous output and the bias, which can be described by (4.2).

~yk+1 = f (~yk, ~wk,~bk) (4.2)

If this layer is a hidden layer, then an additional nonlinear transformation willbe applied as 4.3

~zk+1 = h(~yk+1) (4.3)

where h is the nonlinear transformation function, usually will be a sigmoidalfunction such as 4.4

σ(a) =1

1 + exp(−a)(4.4)

The network is trained by calculation of the weight vector ~w and bias vector~b tominimize the error function as 4.5

4.2. Neural Network 23

E(~w) =12

N

∑n=1

(~y(~xn, ~w,~b

)−~tn

)(4.5)

where~tnis the target data set, from 1 to N, corresponding to the input trainingdata set ~xn, respectively. The weight and bias parameters can be further optimizedby the gradient descent algorithm and the error back propagation [Bishop, 2006,p.241-248].

4.2.2 Experiment Results

The simulation is carried by Matlab toolbox Neural Network Curve Fitting. The po-sition signals can be provided in two ways, one way is to keep the original valuefrom the sensors, i.e, between [0, 360]. Another way is to unwrapped the originalsignals into continuous signals from 0 to ∞ to avoid the discontinuity between 0

and 360.The simulation result for the discontinuous signals is shown in Fig.4.5. The input

signal is the MRPS signal, the target is the corresponding Encoder signal. There are70% data points used to train the neural network, 15% data points used for valida-tion for the training result and 15% used to test the result.

It can be seen that the mapping error concentrates on the discontinuity section ofthe signal. It appears that the neural network may not fit for the discontinuous signalmapping. Another possible reason for this phenomenon is the essential problem ofthe MRPS signal. Since the MRPS works based on the magnetic field, the signalcan not be so stable. Therefore, there will be the case when a few MRPS positionscorresponding to the same position from the Encoder. This multiple-map-to-oneproblem may also result in mis-mapping of the neural network.

FIGURE 4.5: The discontinuous signal fitted by neural network; Erroris shown in mechanical degrees.

24 Chapter 4. Other Signal Processing Solutions

The simulation result for the continuous signals is shown in Fig.4.6. The trainingprocess is the same with the first test, the difference locates only at the format ofthe signals. It can be seen that the mapping can not eliminate the variation of theMRPS signal. The reason may be the position value is too large in this way. So thateven the fitting result is very good in statistics (0.99 fitting data), the small variationfrom the MRPS can not be eliminated indeed. Thus, this result is not positive for thisimplementation.

FIGURE 4.6: The continuous signal fitted by Neural Network; Erroris shown in mechanical degrees.

4.3 Conclusion

Although the neural network algorithm has an advantage handling a nonlinearproblem, it may not be suitable for either format of the position signals. Hence thedirect mapping by neural network (NN) is not appropriate for this implementation.However, it is possible to improve the performance of the neural network by prepro-cessing the data or implement the neural network in another way. Due to the timelimit, only a rough trial of neural network is presented in this thesis, more flexibleneural network implementation could be tried in the future works.

The linear regression harmonic compensation (LRHC) appears to be a good so-lution due to the simple implementation and good validation result. It can eliminatethe error harmonics between the MRPS and Encoder signal, which make the com-pensated MRPS signal accurate enough for the Park transformation.

25

Chapter 5

Experimental Test Result

5.1 Test Rig Setup

The test rig is developed by previous thesis students and ABB [Ronquist et al., 2016,Wallin and Varagnolo, 2017, Liu et al., 2017]. The test system contents followingsections:

• i) Matlab/Simulink (host computer)

• ii) Speedgoat Real-time Target Machine (Link: Speedgoat)

• iii) MOSFET driving board

• iv) Motor test rig (Fig.5.1).

The principle of the test system is presented in Fig.5.2.

FIGURE 5.1: Test Rig Setup (ABB); The hysteresis brake is used toprovide the load.

26 Chapter 5. Experimental Test Result

FIGURE 5.2: Working Principle of the Test System.

5.2 Controller Design Test

In this section, the design of the controller is evaluated using the encoder signalfor the dq transformation and providing the position information. For the currentcontroller, a step will act as the reference. For the position controller, in general, if amachine will be implemented on the high-end industrial purpose at least it needs tobe qualified through the test of following movements: a) Acceleration b) Constantspeed (usually with it maximum speed) c) Reverse Direction. As an initial trial, aseries of steps from 50rpm to 250rpm are assigned to test a) and b), a sinusoidalreference with frequency 10

2π rad/s is assigned to test c). In the end, a test trajectorynamed cubic test provided by ABB will be run.

As mentioned in Chapter 2, several methods have been proposed for the posi-tion controller design. Thus, different designs will be tested in both steady modeand dynamic mode. The position controller designs that will be tested are listed asfollows:

• i) position feedback with PID controller (2.4)

• ii) position feedback (PID) + speed feedback (P) (2.5)

• iii) position feedback (PID) + speed feed forward + acceleration feed forward(2.6)

• iv) position feedback (PID) + speed feed forward + acceleration feed forward+ speed feedback (2.6)

and the friction compensation will be tested in sinusoidal and cubic case of the iii)and iv) method to prove its advantage in the motion dynamic process.

5.2.1 Current Controller

The current controller is tested with a q-axial current step from Iq = 0.5A to Iq =0.3A, the test result is shown in Fig.5.3. As the figure shows, the current controllercan respond to the step within a short dynamic period and induce zero error atsteady state.

5.2.2 Position Controller with Position Feedback

The test results are shown in Fig.5.4, Fig.5.5 and Fig.5.6. In the step response, a zeroerror can be seen at the steady state. However, an oscillation appears at the dynamic

5.2. Controller Design Test 27

FIGURE 5.3: Current response to step.

state, which is induced by the well-known trade-off between the fast convergenceand the stability in PID controller design. The PID parameters can be tuned accord-ing to the specific implementation. In an industrial implementation, the fast con-vergence has higher priority and the oscillation can be avoided by optimizing thetrajectory, speed, acceleration in the top layer optimization algorithm. In the sinu-soidal response, the error is reduced at the running period and the maximum errorappears at every reverse instant due to the vanishing of current and speed. Thisproblem will be compensated by the following design. In the cubic test, a dynamicprocess in the initial state induces a large error, in the common running process, theerror increases at every reverse instant as it is in the sinusoidal test.

28 Chapter 5. Experimental Test Result

FIGURE 5.4: Design(i): position response to a series steps from50rpm to 250rpm; The peak-peak position error of initial dynamic is1.07;The maximum peak-peak position error during running period

is 1.4.

5.2. Controller Design Test 29

FIGURE 5.5: Design(i): position response to a sinusoidal referencewith frequency 10

2π rad/s; The maximum peak-peak position errorduring running period is 1.89.

30 Chapter 5. Experimental Test Result

FIGURE 5.6: Design(i): position response to ABB cubic test reference;The peak-peak position error of initial dynamic is 2.68 (not fullyshown);The maximum peak-peak position error during running pe-

riod is 2.08.

5.2.3 Position Controller with Position Feedback and Speed Feedback

The test results are shown in Fig.5.7, Fig.5.8 and Fig.5.9. For the step reference, areduction of the dynamic process can be seen from the error waveform, which isthe advantage of the speed feedback compared with the single position feedback.However, there is a large steady state error at high-speed range due to the absenceof integral controller. Actually, if an integral controller is applied, the position errorwill increase. As it has been discussed in Chapter 3, one reason for this may be theinaccuracy of rotor speed estimation from EKF. Another reason is the detent torqueis not considered in the controller structure. For the sinusoidal reference, a largerposition error can be seen compared with the single position feedback. The samephenomenon can be seen from the cubic test as well. Thus, this kind of controllermay not be a proper choice for the industrial implementation.

5.2. Controller Design Test 31

FIGURE 5.7: Design(ii): position response to a series steps from50rpm to 250rpm; The peak-peak position error of initial dynamic is1.91;The maximum peak-peak position error during running period

is 1.08.

32 Chapter 5. Experimental Test Result

FIGURE 5.8: Design(ii): position response to a sinusoidal referencewith frequency 10

2π rad/s ; The maximum peak-peak position errorduring running period is 6.88.

5.2. Controller Design Test 33

FIGURE 5.9: Design(ii): position response to ABB cubic test refer-ence; The peak-peak position error of initial dynamic is 2.46 (notfully shown);The maximum peak-peak position error during running

period is 4.03.

5.2.4 Position Controller with Position Feedback, Speed Feed Forwardand Acceleration Feed Forward

The test results are shown in Fig.5.10, Fig.5.11 and Fig.5.12. A significant decrease inerror can be observed from all the dynamic process in these three tests. Hence, thiskind of controller is more suitable for the industrial implementation.

34 Chapter 5. Experimental Test Result

FIGURE 5.10: Design(iii): position response to a series steps from50rpm to 250rpm; The peak-peak position error of initial dynamic is1.20;The maximum peak-peak position error during running period

is 1.45.

5.2. Controller Design Test 35

FIGURE 5.11: Design(iii): position response to a sinusoidal referencewith frequency 10

2π rad/s ; The maximum peak-peak position errorduring running period is 1.67.

36 Chapter 5. Experimental Test Result

FIGURE 5.12: Design(iii): position response to ABB cubic test refer-ence; The peak-peak position error of initial dynamic is 3.65 (notfully shown);The maximum peak-peak position error during running

period is 1.11.

5.2.5 Position Controller with Position Feedback, Speed Feedback, SpeedFeed Forward and Acceleration Feed Forward

The test results are shown in Fig.5.13, Fig.5.14 and Fig.5.15. For the step reference,a decrease of error can be seen in the dynamic process due to the use of speed feed-back. For the sinusoidal reference, an error is eliminated more than the controllerwithout speed feedback. For the cubic reference, the error is larger than the onewithout speed feedback. The effect of speed feedback can be concluded to be help-ful to the dynamic process of position control.

5.2. Controller Design Test 37

FIGURE 5.13: Design(iv): position response to a series steps from50rpm to 250rpm; The peak-peak position error of initial dynamic is0.8;The maximum peak-peak position error during running period

is 1.01.

38 Chapter 5. Experimental Test Result

FIGURE 5.14: Design(iv): position response to a sinusoidal referencewith frequency 10

2π rad/s ; The maximum peak-peak position errorduring running period is 1.29.

5.3. Friction Compensation Test 39

FIGURE 5.15: Design(iv): position response to ABB cubic test refer-ence; The peak-peak position error of initial dynamic is 2.67 (notfully shown);The maximum peak-peak position error during running

period is 1.76.

5.3 Friction Compensation Test

The test results are shown in Fig.5.16a and Fig.5.16b. The figures focus on the revers-ing motion of the motor, a slight decrease of error can be seen from the compensatedmodel (black blocks in the figure). However, this kind of compensation can only takeeffect for a short instant but not contribute much to the whole dynamic process. Thesame phenomenon can be seen from the cases in design (iii). Another phenomenonis that the compensation works better in one direction than another(difference be-tween red and black blocks). An explanation for this phenomenon is the small un-symmetry of the motor itself or the motor support. As it has been discussed insection 2.5, the friction can be modeled in a more complex way and reach a betterperformance.

40 Chapter 5. Experimental Test Result

(A) Error Comparison of Design(iii). (B) Error Comparison of Design(iv).

FIGURE 5.16: Error Comparison in Sinusoidal Case of Design (iii) andDesign(iv).

5.4 Linear Regression Compensation Test

In this section, the linear regression compensation method described in Chapter 4will be tested with Design(iii). The position information is provided only by MRPSsignal and the signal will be compensated by the linear regression algorithm. Theresults are shown in Fig.5.17, Fig.5.18 and Fig.5.19, for steps, sinusoidal and cubicreference, respectively. And it can be seen from the figures that the test results don’thave an obvious difference with the one with tested with the encoder signal, whichproves that the linear regression method is valid for the industrial implementation.

5.4. Linear Regression Compensation Test 41

FIGURE 5.17: Linear Regression Harmonic Compensation Test of De-sign(iii): position response to a series steps from 50rpm to 250rpm;The peak-peak position error of initial dynamic is 1.15;The maxi-

mum peak-peak position error during running period is 1.52.

42 Chapter 5. Experimental Test Result

FIGURE 5.18: Linear Regression Harmonic Compensation Test of De-sign(iii): position response to a sinusoidal reference with frequency102π rad/s ; The maximum peak-peak position error during running

period is 1.58.

5.5. Test Summary 43

FIGURE 5.19: Linear Regression Harmonic Compensation Test of De-sign(iii): position response to ABB cubic test reference; The peak-peakposition error of initial dynamic is 3.69 (not fully shown);The maxi-

mum peak-peak position error during running period is 1.19.

5.5 Test Summary

The test results are summarized in Table.5.1. The position errors are given in me-chanical degrees with Peak-Peak value. Note that some of the extreme values of theinitial dynamic error do not show up in the previous section since the large errorin the initial transient is can be seen as a response to a big step reference. Thus theemphasis of those figures locates on the steady state.

44 Chapter 5. Experimental Test Result

Except for the content that has been discussed in previous sections, there aresome common rules that can be concluded from the table.

• i) The speed-feedback controller can contribute to reducing the error in thedynamic process. Even the inaccuracy of EKF speed estimation decreases theeffect of the speed-feedback controller. The existence of a speed-feedback con-troller in the system can still decrease the dynamic error. Thus the speed-feedback controller may be an important component in the control system ifthe EKF estimation has been improved.

• ii) The more ‘’smooth” the reference signal is, the better it could be controlledby the speed-feedback controller. An outstanding example is the sinusoidalreference. If the position reference is sinusoidal, the speed and accelerationreference are also sinusoidal, which means they are all differentiable and con-tinuous. This character is essential to a well-optimized reference signal, espe-cially in an industrial implementation.

`````````````MethodReference

Steps(I/R) Sinusoidal Cubic(I/R) Sensor

θr Fb 1.07/1.4 1.89 2.68/2.08

Encoder(High-end)

θr Fb + ωr Fb 1.91/1.08 6.88 2.46/4.03

θr Fb + ωr Fw + α Fw 1.20/ 1.45 1.67 3.65/1.11

θr Fb + ωr Fw(FC) + α Fw - 1.64 4.22/1.1

θr Fb + ωr Fb + ωr Fw + α Fw 0.8/1.01 1.29 2.67/1.76

θr Fb + ωr Fb + ωr Fw(FC) +α Fw

- 1.16 2.61/1.66

θr Fb + ωr Fw(FC) + α Fw +LRHC

1.15/1.52 1.58 3.69/1.19MRPS

(Low-cost)

TABLE 5.1: Test result summary: Position error shown in mechanicaldegrees; (Fb = feedback, Fw = feed forward, θr = position, ωr = speed,α = acceleration, FC=friction compensation, LRHC=linear regression

harmonics compensation, I=initial dynamic, R=running process).

5.6 Discussion

5.6.1 Response Time and Bandwidth Selection

Usually, the response time of controllers follows this sequence

PositionLoop > SpeedLoop > CurrentLoop

If the position controller requires short response time, then the speed controller maybe deleted. If the speed needs to be controlled, then the controller bandwidth needto be properly designed and the position controller may suffer from a slow response.

5.6. Discussion 45

5.6.2 The Effect of Detent Torque

The stepper motor has a large number of pole pairs, and the rotor has a permanentmagnet component. Since the magnetic field intensity is not evenly distributed be-tween two teeth, the generated magnetic force will have a small variation that canbe observed as detent torque. If an EKF estimation result is presented with a timewindow that is equal to the fundamental time period Tf und as:

Tf und =2π

ωr(5.1)

where ωr is the angular speed of the rotor. An EKF estimation result taken at thespeed of 100rpm is shown in Fig.5.20. Here ωr = 100 · 2π

60 and Tf und = 0.6s. Notethat for this motor that has 50 pole pairs, 50 regular peaks can be seen from bothtorque and speed error, which is a proof of the relation between the detent torqueand the large pole pair number.

FIGURE 5.20: EKF estimation of torque and speed error at 100rpm.

The detent torque does not only affect the speed controller but also could be thehardware limitation of the position controller. For example, when the PID param-eters are increased to a certain range, the motor will begin to shake and make a bignoise, and the performance becomes worse, i.e. the peak-to-peak error increases.Thus, it should be an important future work to eliminate the effect of the detenttorque.

47

Chapter 6

Conclusion and Future Work

6.1 Conclusion

In this thesis, a complete stepper motor solution is proposed based on a low-costposition sensor (MRPS). From the motor control aspect, based on a careful study ofthe development of stepper motor control, vector control is chosen as the controlstrategy. And a controller is properly designed and compared with different con-troller structure. Then a friction compensation is proposed by the author to improvethe performance in the motor reverse process. In order to improve the quality of thelow-cost sensor signal, the extended kalman filter (EKF) is properly implementedwith the sensor fusion algorithm at the first trial. Although EKF performs well at fil-tering the signal and observing states without direct measurement, it can not showan advantage in improving the signal quality. The neural network is tested as thesecond trial and it has been proved that the neural network is not an appropriatemethod for handling the position information. Thus, linear regression harmoniccompensation (LRHC) is proposed to solve the problem and it leads to a positiveresult.

If the motor control strategy and the signal processing method is combined, itbecomes a complete low-cost solution for stepper motor control and fits for the in-dustrial implementation. Hence, the main conclusions are listed as follows.

First, the idea to combine the stepper motor and the low-cost sensor is valid forthe industrial implementation. In this thesis, the solutions for the two main sec-tions of this combination design, motor control and signal processing, have beenproposed and tested with real motor and sensor. The result is positive in generalcases and specific cases for industrial implementations. Thus, it can be claimed thatthis combination idea is valid for the industrial implementation.

Second, the present design can be further optimized. For the motion control ofthe motor, a valid structure of controller has been tested in this thesis and a frictioncompensation solution is proposed to improve the reverse performance of the mo-tor. However, due to the limited time, more complex controllers are not able to betested in the thesis. Thus, a relatively large error still exists in the start-up process ofthe motor. And the cogging problem (detent torque) of the stepper motor is not con-sidered in this thesis. Hence, there can be a lot of further works concerning relatedproblems to improve the motor performance.

Third, the result of this research may be transferred to a real product with furthertest and validation. One of the purposes of this thesis is to validate the feasibility oftransferring the theoretical scheme to the real product so that the product compe-tence will be increased and the cost will be reduced. Although those tests in thisthesis show positive results, it is too far to ensure the product feasibility. There needto be more strict tests with different scenarios such as various load, changeable iner-tia and so on.

48 Chapter 6. Conclusion and Future Work

6.2 Further Work

6.2.1 Advanced Controller

Due to the time limit, there are only junior controller designs are tested in this the-sis, some good designs such as [Krishnamurthy and Khorrami, 2004] can not betested. As discussed in Chapter 3 and Chapter 5, the cogging problem of steppermotor should be solved to build a better speed controller. And also a more adaptivecontroller for changeable load and inertia in industrial implementations should beconsidered in the future.

6.2.2 Parameter Identification

In this implementation, the EKF and the controller are both sensitive to the motorparameters (see (2.6) and (3.2)). Thus, if the parameters can be somehow identified,the performance will be further improved. If the EKF estimation is accurate enough,the speed controller may be implied as well(see section 5.2.3). Besides, consider-ing the mass production and the industrial implementation, an on-line parameteridentification seems to be interesting and promising.

6.2.3 Trial of More Sensors and EKF

The idea of sensor fusion is very interesting although it is not so appropriate for thisimplementation. In Chapter 3, it has been discussed that the back-emf and MRPSsignal can not give an advantage to each other. However, it does not deny that othersensors may be valid for sensor fusion algorithm with back-emf. Thus, more sensorsshould be evaluated to examine this feasibility.

49

Bibliography

Acarnley, Paul (2002). Stepping Motors: a guide to theory and practice. Institution ofEngineering and Technology. URL: http://digital- library.theiet.org/content/books/ce/pbce063e.

Baluta, G. (2007). “Microstepping Mode for Stepper Motor Control”. In: 2007 Inter-national Symposium on Signals, Circuits and Systems. Vol. 2, pp. 1–4. DOI: 10.1109/ISSCS.2007.4292799.

Bellini, A. et al. (2007). “Mixed-Mode PWM for High-Performance Stepping Mo-tors”. In: IEEE Transactions on Industrial Electronics 54.6, pp. 3167–3177. ISSN: 0278-0046. DOI: 10.1109/TIE.2007.905929.

Bendjedia, M. et al. (2012). “Position Control of a Sensorless Stepper Motor”. In: IEEETransactions on Power Electronics 27.2, pp. 578–587. ISSN: 0885-8993. DOI: 10.1109/TPEL.2011.2161774.

Bishop, Christopher M (2006). Pattern recognition and machine learning. eng. Informa-tion science and statistics. New York: Springer. ISBN: 978-0-387-31073-2.

Derammelaere, S. et al. (2014). “Load angle estimation for two-phase hybrid step-ping motors”. In: IET Electric Power Applications 8.7, pp. 257–266. ISSN: 1751-8660.DOI: 10.1049/iet-epa.2013.0333.

Derammelaere, Stijn et al. (2017). “Sensorless load angle control for two-phase hy-brid stepper motors”. In: Mechatronics 43, pp. 6 –17. ISSN: 0957-4158. DOI: https:/ / doi . org / 10 . 1016 / j . mechatronics . 2017 . 02 . 003. URL: http : / / www .sciencedirect.com/science/article/pii/S0957415817300168.

Feng, Gang (2000). “Position control of a PM stepper motor using neural networks”.In: Proceedings of the 39th IEEE Conference on Decision and Control (Cat. No.00CH37187).Vol. 2, 1766–1769 vol.2. DOI: 10.1109/CDC.2000.912117.

Fitzgerald, A. E. (Arthur Eugene) (2003). Electric machinery. eng. 6th ed.. McGraw-Hill series in electrical engineering. Power and energy. Boston, Mass.: McGraw-Hill. ISBN: 0-07-366009-4.

“Friction” (2011). In: Tribology of Ceramics and Composites. Wiley-Blackwell. Chap. 5,pp. 49–59. ISBN: 9781118021668. DOI: 10.1002/9781118021668.ch5. eprint: https://onlinelibrary.wiley.com/doi/pdf/10.1002/9781118021668.ch5. URL:https://onlinelibrary.wiley.com/doi/abs/10.1002/9781118021668.ch5.

He, Yanzhao, Shiqiang Zheng, and Jiancheng Fang (2017). “Start-up current adap-tive control for sensorless high-speed brushless DC motors based on inversesystem method and internal mode controller”. In: Chinese Journal of Aeronautics30.1, pp. 358 –367. ISSN: 1000-9361. DOI: https://doi.org/10.1016/j.cja.2016.12.006. URL: http://www.sciencedirect.com/science/article/pii/S1000936116302254.

Karlsson, Lina (2016). Sensorless Control of a Hybrid Stepper Motor. eng. Linköpingsuniversitet, Institutionen för systemteknik, Fordonssystem.

Kim, W., C. Yang, and C. C. Chung (2011). “Design and Implementation of Sim-ple Field-Oriented Control for Permanent Magnet Stepper Motors Without DQTransformation”. In: IEEE Transactions on Magnetics 47.10, pp. 4231–4234. ISSN:0018-9464. DOI: 10.1109/TMAG.2011.2157956.

50 Bibliography

Krishnamurthy, P. and F. Khorrami (2004). “Voltage-fed permanent-magnet steppermotor control via position-only feedback”. In: IEE Proceedings - Control Theory andApplications 151.4, pp. 499–510. ISSN: 1350-2379. DOI: 10.1049/ip-cta:20040622.

Le, K. M., H. Van Hoang, and J. W. Jeon (2017). “An Advanced Closed-Loop Controlto Improve the Performance of Hybrid Stepper Motors”. In: IEEE Transactions onPower Electronics 32.9, pp. 7244–7255. ISSN: 0885-8993. DOI: 10.1109/TPEL.2016.2623341.

Lee, In Seong et al. (Apr. 2012). “Kalman Filter-Based Sensor Fusion for Improv-ing Localization of AGV”. In: Key Engineering Materials II. Vol. 488. AdvancedMaterials Research. Trans Tech Publications, pp. 1818–1822. DOI: 10.4028/www.scientific.net/AMR.488-489.1818.

Li, T. H. S. et al. (2012). “Dynamic Balance Control for Biped Robot Walking UsingSensor Fusion, Kalman Filter, and Fuzzy Logic”. In: IEEE Transactions on Indus-trial Electronics 59.11, pp. 4394–4408. ISSN: 0278-0046. DOI: 10.1109/TIE.2011.2175671.

Liu, B. et al. (2017). “Compensation of load-dependent position error for a hybridstepper motor”. In: 2017 IEEE International Conference on Mechatronics and Au-tomation (ICMA), pp. 846–851. DOI: 10.1109/ICMA.2017.8015926.

M, Shyam Mohan et al. (2015). “Introduction to the Kalman Filter and Tuning itsStatistics for Near Optimal Estimates and Cramer Rao Bound”. In:

Morin, Arthur Jules (1833). “New friction experiments carried out at Metz in 1831-1833”. In: vol. 4, pp. 1–128.

Persson, J. and Y. Perriard (2003a). “An optimized Extended Kalman filter algorithmfor Hybrid Stepper Motors”. In: Industrial Electronics Society, 2003. IECON ’03. The29th Annual Conference of the IEEE. Vol. 1, 297–300 vol.1. DOI: 10.1109/IECON.2003.1279995.

— (2003b). “Steady state Kalman filtering for sensorless control of hybrid steppermotors”. In: Electric Machines and Drives Conference, 2003. IEMDC’03. IEEE Inter-national. Vol. 2, 1174–1177 vol.2. DOI: 10.1109/IEMDC.2003.1210389.

R.E, Kalman (1960). “A New Approach to Linear Filtering and Prediction Problems”.In: ASME. J. Basic Eng 82(1), pp. 35–45. DOI: 10.1115/1.3662552.

Ronquist, Anton et al. (2016). Estimation and Compensation of Load-Dependent PositionError in a Hybrid Stepper Motor. eng ; swe. Linköpings universitet, Institutionenför systemteknik, Reglerteknik.

Schweid, S. A., J. E. McInroy, and R. M. Lofthus (1995). “Closed loop low-velocityregulation of hybrid stepping motors amidst torque disturbances”. In: IEEE Trans-actions on Industrial Electronics 42.3, pp. 316–324. ISSN: 0278-0046. DOI: 10.1109/41.382143.

Wallin, Mattias and Damiano Varagnolo (2017). Multisensor fusion and control strate-gies for low cost hybrid stepper motor solutions. eng. Control group, Institutionen försystem- och rymdteknik, Signaler och system.

Yoon, Sang Won, Seong-Bae Park, and Jong Shik Kim (2015). “Kalman Filter Sen-sor Fusion for Mecanum Wheeled Automated Guided Vehicle Localization”. In:Journal of Sensors 2015. ISSN: 1687-725X.

Zawirski, K, D Janiszewski, and R Muszynski (2013). “Unscented and extendedKalman filters study for sensorless control of PM synchronous motors with loadtorque estimation”. eng. In: Polska Akademia Nauk. Bulletin of the Polish Academy ofSciences 61.4, pp. 793–801. ISSN: 02397528. URL: http://search.proquest.com/docview/1493424310/.

Bibliography 51

Zhang, Xiaodong, Junjun He, and Chunlei Sheng (2005). “An approach of micro-stepping control for the step motors based on FPGA”. In: 2005 IEEE Interna-tional Conference on Industrial Technology, pp. 125–130. DOI: 10.1109/ICIT.2005.1600622.

Zhou, Weidong and Mengmeng Liu (2016). “Robust interacting multiple model al-gorithms based on multi-sensor fusion criteria”. In: International Journal of Sys-tems Science 47.1, pp. 92–106. DOI: 10.1080/00207721.2015.1029566. eprint:https://doi.org/10.1080/00207721.2015.1029566. URL: https://doi.org/10.1080/00207721.2015.1029566.

Zribi, M. and J. Chiasson (1991). “Position control of a PM stepper motor by exactlinearization”. In: IEEE Transactions on Automatic Control 36.5, pp. 620–625. ISSN:0018-9286. DOI: 10.1109/9.76368.