This action might not be possible to undo. Are you sure you want to continue?
M. Bendjedia
*,**
, Y. AitAmirat
**
, B. Walther
*
and A. Berthon
**
*
HAUTE ECOLE ARC, ENGINEERING
Rue BaptisteSavoye 26, SaintImier,2610, Switzerland
**
L2ESUTBM/UNIVERSITY OF FRANCHECOMTE
13 rue Thierry MIEG, 90010, Belfort, France
Tel.: +41 / (32) – 930.22.37.
Fax: +41 / (32) – 930.22.43
EMail: Moussa.Bendjedia@hearc.ch
*
URL: http://www.hearc.ch
**
URL: http://l2es.utbm.fr
Acknowledgements
Special thanks to the Haute Ecole Arc, engineering, SaintImier, Switzerland for financial support.
Keywords
«Stepping motor drive», «Sensorless control», «Test bench», «DSP», «Real time processing».
Abstract
Today thanks to low cost and high performance DSP’s, Kalman filtering (KF) becomes an efficient
candidate to avoid mechanical sensors in motor control. We present in this work experimental results
by using a steady state KF method to estimate the speed and rotor position for hybrid stepper motor.
With this method the computing time is reduced. The Kalman gain is precomputed from numerical
simulation and introduced as a constant in the real time algorithm. The load torque is also online
estimated by the same algorithm. At startup the initial rotor position is detected by the impulse
current method.
Introduction
Hybrid stepper motor (HSM) can be driven by digital and open loop control. This simple control
shows a poor dynamic performance. The HSM is widely used in precise motions, which require a high
dynamic. However an open loop speed control is insufficient, so a closed loop control is required.
Mechanical sensors such as encoder increase cost and size of the motor. These position sensors are
temperature sensitive and show lower reliability. To use these sensors, a mechanical arrangement must
be done. Due to these limitations, sensorless control is more attractive to drive the HSM. With today’s
low cost and high performance DSP’s, manufactures of HSM are very interested to implement the
advanced control algorithms.
The most known methods are based on the detection of the position of the rotor starting from the
electromotive force of the motor (e.m.f). In [1], these methods are implemented and compared. The
major inconvenient of these methods is that they are not functional at low speeds where the e.m.f is
very weak. Another method uses a variation of motor inductance according to the rotor position. In
this case, the shape of the current gives us information on inductance as shown in [2]. In [3], the phase
inductance is calculated from voltage and phase current during different segments of electrical cycle.
The calculated value is then used to estimate the rotor position with a lookup table. The rotor position
can be estimated from the flux linkage, which is calculated form stator voltage and phase current [4].
Kalman filtering (KF) was used by many scientists to estimate the speed and rotor position [5] [6] [7].
The difficult step in KF design is the choice of its covariance matrices, because there is no exact rule
in literature to do that. In [8], the authors have tried to give a solution for tuning KF. The most
disadvantage of KF technique is the large computational cost. In order to overcome this problem a
reduced order extended KF (EKF) was proposed in [9]. In some related works (e.g.[6]), the authors
assume an infinite inertia of the motor; so all mechanical parameters are cancelled and the
computation is faster. Other solution based on steady state KF was presented in [10] but the algorithm
was verified only by numerical simulations. In [11], two observers are studied and compared with
EKF: Unscented Kalman filters (UKF) and Model Reference Adaptive System (MRAS). The UKF is a
new EKF introduced to avoid the use of complex Jacobian matrix. The MRAS is much simpler but the
estimated state of the system is noisier and less precise. In the other hand, MRAS can estimate only
one state or parameter simultaneously. The Matsui’s observer is proposed in [12]. This observer uses
only the two electrical equations of the motor model in dq axis to estimate speed and rotor position.
The qaxis is used for the estimation and daxis to cancel the error position with a PI controller.
Different works can be found in [13] and [14] to develop and implement Matsui’s observer. In this
work, we present experimental results obtained by using steady state EKF approach to estimate speed
and rotor position of HSM. First the overall EKF algorithm is used in computational simulation to
obtain Kalman gain, which is constant in steady state. This will reduce the computational time and
allows extending the estimation to load torque. The DSP System used for the implementation is based
on the powerful DS 1103 board from dSPACE.
Hybrid stepper motor model
The hybrid step motor (HSM) studied here is a synchronous motor with two phases. It can be
represented by the same model as the permanent magnet synchronous motor (PMSM). Following
[10], the state space representation of its model is given by:
¦
¦
¦
¦
¦
¦
¦
¦
¦
¦
¹
¦
¦
¦
¦
¦
¦
¦
¦
¦
¦
´
¦
=
− −
+ − =
+ + − =
+ + − =
) cos( ) sin(
) cos( . .
) sin( . .
ω
θ
ω
θ θ
ω
θ ω
θ ω
dt
d
J
T
J
K
N i
J
K
N i
J
K
dt
d
L
u
N
L
m
K
i
L
R
dt
di
L
u
N
L
K
i
L
R
dt
di
L v
b
m
a
m
b
b
b
a m
a
a
(1)
where:
i
a
and i
b
: Currents of phases A and B [ A ]
u
a
and u
b
: Phase voltages [ V ]
R : Phase resistance [Ω]
L : Phase inductance [ H ]
K
m
: Torque constant [ V.s/rad ]
K
v
: Coefficient of viscous friction [ N.m.s/rad ]
J : Rotor inertia [kg.m2]
ω : Angular velocity [rad/s]
θ : Mechanical rotor position [rad]
T
L
: Load torque [N.m]
N : rotor number teeth
Next, following [15], we apply the transformation
cos( ) sin( )
sin( ) cos( )
N N
P
N N
θ θ
θ θ
=
−
(2)
to electrical variables (u
a
, u
b
) and (i
a
, i
b
) in order to use them on (d,q) axis, i.e. rotor frame. We obtain
the following model:
d d
d q
q q
m
q d
m v L
q
d
dt
di u R
i N i
dt L L
di u
K R
i N i
dt L L L
K K T d
i
dt J J J
θ
ω
ω
ω ω
ω
ω
=
¦
= − + +
¦
¦
¦
= − − − +
¦
¦
´
¦
= − −
¦
¦
¦
¦
¹
(3)
The nonlinearities on the model are now reduced only to the product terms in the two first equations
(electrical equations) of (3).
The model (3) is represented by the following general form:
( , )
( )
x f x u
y h x
= ¦
¦
´
=
¦
¹
(4)
where: [ ]
t
d q
x i i ω θ = is a vector of state variables and [ ]
t
d q
y i i = is a vector of system outputs.
Extended Kalman Filter
The Kalman filter is an algorithm which is carried out in parallel with the system by using its state
model form. It makes it possible to rebuild or estimate all the state variables if the system is
observable by using the system inputs and outputs. The comparison between the system outputs and
that of the Kalman filter are multiplied by a gain matrix in order to correct the estimated state variable.
The extended Kalman filter (EKF) is a solution proposed for our nonlinear system case (3). We use
this EKF algorithm to compute the gain matrix by simulation and then one introduces the obtained
result in steady state case directly into the real time algorithm. To carry out this procedure, it is
necessary to have the discrete model of the motor in discrete state space vector form.
By using the first order Euler approximation, we obtain the discrete equivalent model of (4):
1
. ( , )
( )
k k k k k
k k
k
x x T f x u w
y h x v
+
= + + ¦
¦
´
= +
¦
¹
(5)
Where the terms w
k
and v
k
are added to consider noises on respectively the modeling structure and
measurement. The sampling period T must be small in front of the electrical time constant of the
motor in order to achieve a suitable performant control.
One of the advantages of the Kalman filter is the possibility to extend the estimation to several
parameters of the system. But it should not be forgotten that when the order of the system increases,
the computing time increases too. In this work, the order of the system is extended to 5 in order to
estimate the load torque. This fifth order model is used only during simulation to find the gain matrix
of the Kalman filter. If we suppose that the load torque does not change during one sampling period
time, its equation is given by:
( 1) L k Lk
T T
+
= (6)
The EKF algorithm contains five equations and can be divided into two phases: the prediction phase
and correction phase.
Prediction phase (Time Update): The state vector is initially estimated at the moment (k+1) according
to the state and of the measurements taken at the moment (k)
/ 1/ /
ˆ ˆ ˆ . ( , )
k k k k k k k
x x T f x u
+
= + (7)
The covariance matrix is also computed in this phase by the following equation:
1/ /
. .
t
k k k k k k k
P Fd P Fd Q
+
= + (8)
With Fd
k
the Jacobian matrix
Correction phase (Measurement Update): The gain matrix of Kalman filter is computed by:
( )
1
1 1/ 1/
. . . .
t t
k k k k k k k k k
K P H H P H R
−
+ + +
= + (9)
With Hd
k
the Jacobian matrix
The correction of the estimated state vector is done by the following equation:
( ) 1/ 1/ 1 1/ 1
1
ˆ ˆ ˆ . .
k k k k k k k k
k
x x K y H x
+ + + + +
+
= + − (10)
Note that the difference between the system outputs and that of the EKF is multiplied by the gain
matrix, obtained by equation (9). The result is added to the state vector obtained by equation (7).
Finally, the last equation of the correction phase consists in an update of the covariance matrix:
1/ 1 1/ 1 1/
. .
k k k k k k k k
P P K H P
+ + + + +
= − (11)
The Jacobian matrices Fd
k
and Hd
k
are the partial derivative matrices, defined by:
( )
/
. ( , )
ˆ
k k k
k
k k k
x T f x u
Fd
x x x
∂ +
=
= ∂
;
( )
/
( )
ˆ
k
k
k k k
h x
H
x x x
∂
=
= ∂
(12)
In our case, Fd
k
and Hd
k
are given by:
1 0 0
1 ( ) 0 0
0 1 0
0 0 1 0
0 0 0 0 1
k qk
m
k dk
k
m v
R
T TN TNi
L
K R
TN T T N i
L L
Fd
K K T
T T
J J J
T
ω
ω
−
− − − +
=
− −
;
1 0 0 0 0
0 1 0 0 0
k
H
=
(13)
The EKF tuning is done by the choice of the initial covariance matrices (Q and R), the initial state
vector x
0
and its covariance matrix P
0
. In our knowledge, there is no exact method for the choice of the
covariance matrices but only some indications and remarks in some papers like [8]. The covariance
matrices used in our algorithm are:
0.1 0 0 0 0
0 0.1 0 0 0
0 0 0.00001 0 0
0 0 0 0.00001 0
0 0 0 0 0.00001
Q
=
;
0.1 0
0 0.1
R
=
;
0
0.01. P I = (14)
where I is the identity matrix
In the equations (8), (9) and (11), we note that the covariance matrix and the Kalman filter gain matrix
are independent from the input signals. In the steady state, these matrices become constant; therefore
they can be computed off line. This can be done by solving the equation of Riccati using Matlab tool,
for example.
In our work, this gain matrix K is obtained by simulation on Matlab/Simulink. This simulation lets us
check that the algorithm is correct. Firstly, one carried out a simulation of the speed control of the
motor (discrete model) with sensor. The parameters of motor model used are:
R = 0.37Ω; L = 0.9 mH; Km = 0.153 Vs/rad;
K
v
= 0.00047 Nms/rad; J = 15.62 e5 Kgm
2
; N = 50.
When good results were obtained by simulation, we added the EKF algorithm in parallel. And, in
order to approach reality, we have added a noise to the EKF input signals and using the same sampling
period as the one in the real system case.
The EKF gain matrix remains almost constant in steady state case and it is given by:
0.6385 0.0011
0.0011 0.6432
0.1133 0.4276
0.0006 0.0030
0.0011 0.0057
K
−
−
= −
−
−
(10)
This K matrix is used by our real time algorithm which consists only in the two equations (7) and (10)
mentioned above.
Experimental results
Test bench
The laboratory experimental setup (Fig.1) consists of a DS1103 board from dSPACE, electronic
interface, hybrid stepper motor coupled with a DC motor and an incremental encoder of 2000
increments per revolution (used for comparison only!). The powerful DS1103 card is a complete real
time control system based on the Motorola PowerPC 604e processor running at 933MHz. More
information about this card can be found in [16]. The Matlab / Simulink models can be
implemented and tested in realtime. The RealTime Interface (RTI) contains a library of
Blocks which connects the Simulink model to the physical world. The RealTime Workshop
(RTW) converts the model to C code. The C code is then automatically compiled to the
assembly language of the target processors, assembled, linkedited and downloaded to the
DS1103 card. Finally, ControlDesk, an experimentation tool, is used to control, tune and
monitor the running process.
We carried out an electronic power card which contains a double Hbridge based on MOSFET
transistors, an interface for the amplification and the adaptation of the control signals generated by
DS1103 card and the measures of currents and voltages. The phase currents are measured with shunt
resistors attached to each Hbridge. In order to minimize the noises due to commutation, the analogto
digital converters inputs are synchronized with the low state of PWM signals. The HSM used is
characterized by a power about 10 W, a voltage supply of 2460 V and a rated current of 3 A. This
HSM is coupled with a DC motor controlled in current in order to vary the load torque.
Fig. 1: Experimental setup
Fig.2 shows a full digital implementation of current and speed control loops using the estimated values
of the speed and rotor position. The HSM control is carried out in a reference frame (d,q) related to the
rotor. In the frame (d,q), the current regulation is done as in the case of a traditional DC. The field
oriented control (FOC) is used to control the flux and the torque of the motor independently. The d
axis is chosen on the flux axis, so all the flux is aligned with this axis. The torque is controlled by the
current in the qaxis. In this case the dq frame is rotating synchronously with the magnetic field. So,
the HSM becomes a highdynamic ac servo drive and can loose its stepper behavior. The control
sampling period is 100µs and it is equal to the sampling period of EKF. The PWM frequency is 10
KHz. The total execution time is only 90µs.
Host Computer
Matlab/Simulik
RTI
and
RTW
PC Bus
PWM unit
12 bits
ADC unit
8
Gate
MOSFET
Signals
DS1103 card
Electronic card
4
HSM
DC Motor
Amplifier
Encoder
(Only for comparison)
ia
ib
va
vb
14 bits
ADC unit
Encoder
unit
Power Supply
Double
H
Bridges
Electronics
Interface
(e.g. Amplifier
and low pass
filters)
ib
ia
va
vb
ControlDesk
Fig. 2: Sensorless drive implementation
Start –up results
Many sensorless methods suffer from start up. If the rotor position is not estimated at standstill, the
motor starts from an unknown rotor position. In this case we can obtain a temporary reverse rotation or
a starting failure. The better solution to guarantee a good startup is the estimation of rotor position
with an algorithm at standstill. Based on the sensorless method known as "impulse current
technique"[17], we propose to implement the algorithm on the DSP system. We use the fact that the
phase inductances of HSM vary as a function of rotor position because of the saturation effect of the
core in magnet circuit. Instead of measuring the inductance, the amplitude of the current waveform
can give information about the initial rotor position. A suitable sequence of voltage pulses is applied to
the stator winding at standstill and the evaluation of the peak value of the current leads to the position
information. More information about this technique is given in [16]
Fig.3 shows an example of startup. The standstill algorithm detects initial rotor position with peak
current after few milliseconds (a). The motor starts rotating with estimated rotor position (b) with
steady state EKF algorithm.
i
a
0
*
=
d
I
+

+
dq
ab
I
d
I
q

*
d
U
*
q
U
V
q
I
q
*
b
v
v
a
V
d
I
d
PI
Steady State
EKF
Algorithm
ˆ
e
θ
*
q
I
PWM
Signals
ω
*
+
Initial
Position
Detection
+
N
PI
+

d
I
ˆ
ωˆ
θ
ˆ
q
I
ˆ
Software (DS1103)
θ
0
4 impulses
PWM Interrupt
(Synchronisation)
Currents
And
Voltages
Acquisition
8
L
T
ˆ
PI
i
b
v
b
Phase
currents
Phase
voltages
*
b
v
Park T.
dq
ab
dq
ab
θes
θes
θes
θes
(a) Phase currents
(b) Estimated electrical position
Fig. 3: Example of start –up
Sensorles results
In Fig.4.a, the measured position is compared with the estimated one, in steady state, with speed
reference of 50rad/s. The estimated position shows good Linearity. The electrical position error is less
than 0.1rad (Fig.4.b).
(a) Measured (θ ) and estimated (θes) rotor position
(b) Electrical error position (θesθ)
Fig. 4: Comparison between measured and estimated position
Fig.5 shows an example of speed response. We can see that the estimated speed is very close to the
reference one. The incremental encoder used in this experimental setup introduces a considerable
ripple in measured speed as we can see in Fig.5.b.
θes
θ
(b) Estimated speed
(b) Measured speed
Fig. 5: Comparison between measured and estimated speed
Load torque estimation
The sensorless algorithm can also estimate the load torque. Fig.6 shows an example of load torque
disturbance in steady state. We can see that when a load step is applied at t = 0, the estimated load
torque is about 0.2Nm (fig.6.a). The quadrature current iq (fig.6.b) is increased to compensate the load
torque.
(a) Estimated load torque (TL)
(b) Currents I
q
and I
d
Fig. 6: Load torque estimation
Conclusion
In this paper steady state EKF is implemented for hybrid stepper motor. The total execution time is
drastically reduced, which become only 90µs. The rotor position is detected from zero to nominal
speed without mechanical sensor. The incremental encoder used for comparison has a precision of 9
electric degrees and with a sampling period of 100µs, this encoder introduces a considerable ripple in
the speed as we can see in the experimental results.
In this paper, all motor parameters are assumed constant. The stator resistance is the most sensitive
parameter to the sensorless algorithm. Since the total execution time is reduced, we intend to estimate
the stator resistance in real time with the same method as load torque. The major application field of
HSM is the position control. In the next work we will also test a robust position controller such as the
RST controller
I
q
I
d
References
[1] Bonvin F., Perriard Y.: Sensorless Position Detection and Sinusoidal Supply for Small Brushless DC Motor,
29th Annual Symposium on IMCSD, Berkeley (Ca), July 2000, pp. 101108.
[2] Acarnley P. P., Hill R. J., Hooper C. W.: Detection of Rotor Position in Stepping and Switched Reluctance
Motors by Monitoring of the Current Waveform, IEEE Trans. Industrial Electronics, Vol IE32, no 3,
August 1985, pp. 21 5222
[3] Kulkarni A. B. Ehsani M.: A Novel Position Sensor Elimination Technique for the Interior Permanent
Magnet Synchronous Motor Drive, IEEE Transactions on Industry Applications, Vol 28, no 1,
January/February 1992, pp. 144150
[4] Ertugrul N., Acarnley P.P.: A New Algorithm for Sensorless Operation of Permanent Magnet Motors, IEEE
Transactions on Industry Applications, Vol 30, no 1, January February 1994, pp. 126133,
[5] Dhaouadi R., Mohan N., Norum L.: Design and implementation of an extended Kalman filter for the state
estimation of a permanent magnet synchronous motor, IEEE Trans. Power Electron., Vol 6, July 1991, pp .
491 497
[6] Bolognani S., Zigliotto L. M., Zordan M.,: ExtendedRange PMSM Sensorless Speed Drive Based on
Stochastic Filtering , IEEE Trans. Power Electron., Vol 16, no. 1, January 2001, pp. 110 117
[7] Obermeier C., Kellermann H., Brandenburg G., Heinzl J.: Sensorless Field Oriented Speed Control of a
Hybrid Stepper Motor Using an Extended Kalman Filter, EPE’ 97 European Conference on Power
Electronics and Applications, Vol 1, Trondheim 1997, pp. 238 – 243
[8] Bolognani S., Tubiana L., Zigliotto M.: Extended Kalman Filter Tuning in sensorless PMSM Drives, IEEE
Transactions on Industry Applications, Vol 39, no. 6, November/December 2003, pp.17411747
[9] Kim Y.H., Kook Y.S.: High Performance IPMSM Drives without Rotational Position Sensors Using
ReducedOrder EKF, IEEE Transactions on Energy Conversion, Vol 14, no 4, December 1999, pp. 868873.
[10] Persson J., Perriard Y.: Steady state Kalman filtering for sensorless control of hybrid stepper motors,
IEMDC'03, IEEE International Electric Machines and Drives Conference, Vol 2, June 2003, pp. 11741177
[11] Akin B.: A Comparative Study on NonLinear State Estimators Applied to Sensorless AC Drives: MRAS
and Kalman Filter, The 30th Annual Conference of the IEEE Industrial Electronics Society, November 2  6,
2004, Busan, Korea
[12] Matsui N.: Sensorless PM Brushless DC Motor Drives, IEEE Trans. Ind. Electron., Vo1 43, no 2, Apr.
1996, pp. 300308
[13] Mobarakeh B.N, MeibodyTabar F., Sargos F.M.: A Globally Converging Observer of Mechanical
Variables for Sensorless PMSM, Proc. of PESC’2000, Vol 2, pp. 885890
[14] Caux S., Fadel M.: Kalman Filter and Redundant Observer Comparison for Sensorless PMSM Velocity
Control, IEEE ISIE 2005, Vol 3, June 2003, pp. 887892, Dubrovnik, Croatia
[15] Kellermann H., Hildinger P., Brandenburg G., Heinzl J.: Field oriented position control of a hybrid stepper
motor, Proc. of the EPE Conference, Vol 3, Sevilla, September 1995, pp. 908913
[16] Bendjedia M., AitAmirat Y., Walther B., Berthon A.: DSP Implementation of Rotor Position Detection
Method for Hybrid Stepper Motors, IPEMC ’06. CES/IEEE, Vol 3, pp. 15, August 2006, Shanghai, China
[17] Cardoletti L., Cassat A., Jufer M.: Sensorless position and speed control of a brushless DC motor from start
up to nominal speed, EPE Journal, Vol 2, no 1, March 1992, pp. 2534
Hybrid stepper motor model The hybrid step motor (HSM) studied here is a synchronous motor with two phases.ω.m. In this work.cos( Nθ ) + b dt L L L K K dω = − m ia sin( Nθ ) + m ib cos( Nθ ) J J dt K T − vω− L J J dθ = ω dt (1) where: ia and ib : Currents of phases A and B [ A ] ua and ub : Phase voltages [ V ] R : Phase resistance [Ω] L : Phase inductance [ H ] Km : Torque constant [ V. we present experimental results obtained by using steady state EKF approach to estimate speed and rotor position of HSM.m2] ω : Angular velocity [rad/s] θ : Mechanical rotor position [rad] TL : Load torque [N. two observers are studied and compared with EKF: Unscented Kalman filters (UKF) and Model Reference Adaptive System (MRAS). following [15]. The MRAS is much simpler but the estimated state of the system is noisier and less precise. First the overall EKF algorithm is used in computational simulation to obtain Kalman gain.s/rad ] Kv : Coefficient of viscous friction [ N. In the other hand.s/rad ] J : Rotor inertia [kg. Different works can be found in [13] and [14] to develop and implement Matsui’s observer. The UKF is a new EKF introduced to avoid the use of complex Jacobian matrix. we apply the transformation . The Matsui’s observer is proposed in [12]. MRAS can estimate only one state or parameter simultaneously. The DSP System used for the implementation is based on the powerful DS 1103 board from dSPACE. which is constant in steady state.ω. the state space representation of its model is given by: dia R K u = − ia + m . It can be represented by the same model as the permanent magnet synchronous motor (PMSM). The qaxis is used for the estimation and daxis to cancel the error position with a PI controller. Following [10]. so all mechanical parameters are cancelled and the computation is faster.m] N : rotor number teeth Next. Other solution based on steady state KF was presented in [10] but the algorithm was verified only by numerical simulations.sin( Nθ ) + a L L L dt K dib u R = − ib + m . This will reduce the computational time and allows extending the estimation to load torque. This observer uses only the two electrical equations of the motor model in dq axis to estimate speed and rotor position. In [11].assume an infinite inertia of the motor.
The sampling period T must be small in front of the electrical time constant of the motor in order to achieve a suitable performant control.q) axis. If we suppose that the load torque does not change during one sampling period time. the order of the system is extended to 5 in order to estimate the load torque. rotor frame. By using the first order Euler approximation. The model (3) is represented by the following general form: x = f ( x. The comparison between the system outputs and that of the Kalman filter are multiplied by a gain matrix in order to correct the estimated state variable. Extended Kalman Filter The Kalman filter is an algorithm which is carried out in parallel with the system by using its state model form. we obtain the discrete equivalent model of (4): x k +1 = x k + T . it is necessary to have the discrete model of the motor in discrete state space vector form. i. This fifth order model is used only during simulation to find the gain matrix of the Kalman filter. We use this EKF algorithm to compute the gain matrix by simulation and then one introduces the obtained result in steady state case directly into the real time algorithm. But it should not be forgotten that when the order of the system increases. the computing time increases too. f ( x k . In this work. To carry out this procedure. its equation is given by: .e. It makes it possible to rebuild or estimate all the state variables if the system is observable by using the system inputs and outputs. u k ) + wk y k = h( x k ) + v k (5) Where the terms wk and vk are added to consider noises on respectively the modeling structure and measurement. cos( N θ ) sin( N θ ) P= − sin( N θ ) cos( Nθ ) (2) to electrical variables (ua. ib) in order to use them on (d. One of the advantages of the Kalman filter is the possibility to extend the estimation to several parameters of the system. We obtain the following model: ud R did dt = − L id + N ω iq + L uq K R diq = − iq − N ω id − m ω + dt L L L d ω = K m i − K v ω − TL q dt J J J dθ = ω dt (3) The nonlinearities on the model are now reduced only to the product terms in the two first equations (electrical equations) of (3). The extended Kalman filter (EKF) is a solution proposed for our nonlinear system case (3). ub) and (ia. u ) y = h( x) (4) where: x = [id iq ω θ ]t is a vector of state variables and y = [id iq ]t is a vector of system outputs.
H kt .Pk +1/ k The Jacobian matrices Fdk and Hdk are the partial derivative matrices. y k +1 − H k .Pk +1/ k .x k +1/ k ( ) (10) Note that the difference between the system outputs and that of the EKF is multiplied by the gain matrix. defined by: (11) Fd k = ∂ xk + T . u k ) The covariance matrix is also computed in this phase by the following equation: (7) Pk +1/ k = Fd k .H k .H kt + Rk ) With Hdk the Jacobian matrix −1 (9) The correction of the estimated state vector is done by the following equation: ˆ ˆ ˆ x k +1 / k +1 = x k +1/ k + K k +1 .Fd t k + Qk With Fdk the Jacobian matrix Correction phase (Measurement Update): The gain matrix of Kalman filter is computed by: (8) K k +1 = Pk +1/ k . Hk = T 0 1 0 0 0 − J 0 1 (13) . Fdk and Hdk are given by: R 1 − T L TN ωk −TN ω 1 − T R k L Fd k = K 0 T m J 0 0 0 0 TN iqk −T ( N idk + K 1− T v J T 0 0 Km ) 0 L 0 1 0 0 0 1 0 0 0 0 . f ( xk . obtained by equation (9). Finally. The result is added to the state vector obtained by equation (7). Prediction phase (Time Update): The state vector is initially estimated at the moment (k+1) according to the state and of the measurements taken at the moment (k) ˆ ˆ ˆ x k +1 / k = x k / k + T . Hk = ∂ ( h( x k ) ) ∂x ˆ x k = xk / k (12) In our case. f ( x k / k . the last equation of the correction phase consists in an update of the covariance matrix: Pk +1/ k +1 = Pk +1/ k − K k +1 .( H k .TL ( k +1) = TLk (6) The EKF algorithm contains five equations and can be divided into two phases: the prediction phase and correction phase.Pk / k . u k ) ∂x ( ) ˆ x k = xk / k .
(9) and (11). The Matlab / Simulink models can be implemented and tested in realtime. More information about this card can be found in [16].0006 −0.0011 −0.0030 −0.6432 K = 0.1133 −0. The parameters of motor model used are: R = 0. N = 50. Km = 0.4276 0.1 0 0 0. there is no exact method for the choice of the covariance matrices but only some indications and remarks in some papers like [8].The EKF tuning is done by the choice of the initial covariance matrices (Q and R).0011 0.9 mH. When good results were obtained by simulation. we have added a noise to the EKF input signals and using the same sampling period as the one in the real system case. we note that the covariance matrix and the Kalman filter gain matrix are independent from the input signals.00001 0 0 0 0 0 0 0. in order to approach reality.0057 (10) This K matrix is used by our real time algorithm which consists only in the two equations (7) and (10) mentioned above. this gain matrix K is obtained by simulation on Matlab/Simulink. for example. assembled. Experimental results Test bench The laboratory experimental setup (Fig. And.153 Vs/rad.62 e5 Kgm2. The RealTime Interface (RTI) contains a library of Blocks which connects the Simulink model to the physical world. In our knowledge. The RealTime Workshop (RTW) converts the model to C code. The covariance matrices used in our algorithm are: 0 0 0 0.00001 where I is the identity matrix (14) In the equations (8). one carried out a simulation of the speed control of the motor (discrete model) with sensor. electronic interface. linkedited and downloaded to the . This can be done by solving the equation of Riccati using Matlab tool.1 0 0 0.1 0 Q= 0 0 0. therefore they can be computed off line.1) consists of a DS1103 board from dSPACE. these matrices become constant. L = 0. The C code is then automatically compiled to the assembly language of the target processors.I 0 0.6385 −0. the initial state vector x0 and its covariance matrix P0.00001 0 0 . hybrid stepper motor coupled with a DC motor and an incremental encoder of 2000 increments per revolution (used for comparison only!). In our work.1 0 0 0 0. This simulation lets us check that the algorithm is correct.01. J = 15. Firstly.00047 Nms/rad.37Ω. we added the EKF algorithm in parallel. The EKF gain matrix remains almost constant in steady state case and it is given by: 0. In the steady state. R= . P0 = 0. The powerful DS1103 card is a complete realtime control system based on the Motorola PowerPC 604e processor running at 933MHz. Kv = 0.0011 0.
a voltage supply of 2460 V and a rated current of 3 A. ControlDesk. In this case the dq frame is rotating synchronously with the magnetic field. The phase currents are measured with shunt resistors attached to each Hbridge. is used to control. 1: Experimental setup Fig. This HSM is coupled with a DC motor controlled in current in order to vary the load torque. The torque is controlled by the current in the qaxis. So. Finally. an experimentation tool. . The HSM used is characterized by a power about 10 W.g. The field oriented control (FOC) is used to control the flux and the torque of the motor independently.q) related to the rotor. The PWM frequency is 10 KHz. The control sampling period is 100µs and it is equal to the sampling period of EKF.DS1103 card. so all the flux is aligned with this axis. tune and monitor the running process. the analogtodigital converters inputs are synchronized with the low state of PWM signals. The daxis is chosen on the flux axis. The total execution time is only 90µs. We carried out an electronic power card which contains a double Hbridge based on MOSFET transistors.2 shows a full digital implementation of current and speed control loops using the estimated values of the speed and rotor position. an interface for the amplification and the adaptation of the control signals generated by DS1103 card and the measures of currents and voltages. Amplifier and low pass filters) Amplifier Encoder (Only for comparison) Gate MOSFET Signals ia ib va vb DC Motor Double HBridges 4 HSM Fig. In the frame (d. Matlab/Simulik ControlDesk Host Computer RTI and RTW PC Bus PWM unit 12 bits ADC unit 14 bits ADC unit Encoder unit DS1103 card Power Supply Electronic card 8 ia ib va vb Electronics Interface (e.q). In order to minimize the noises due to commutation. the current regulation is done as in the case of a traditional DC. the HSM becomes a highdynamic ac servo drive and can loose its stepper behavior. The HSM control is carried out in a reference frame (d.
The standstill algorithm detects initial rotor position with peak current after few milliseconds (a). 2: Sensorless drive implementation Start –up results Many sensorless methods suffer from start up. . The motor starts rotating with estimated rotor position (b) with steady state EKF algorithm. the motor starts from an unknown rotor position. we propose to implement the algorithm on the DSP system.3 shows an example of startup. A suitable sequence of voltage pulses is applied to the stator winding at standstill and the evaluation of the peak value of the current leads to the position information. Instead of measuring the inductance. In this case we can obtain a temporary reverse rotation or a starting failure. the amplitude of the current waveform can give information about the initial rotor position. Based on the sensorless method known as "impulse current technique"[17]. va vb Phase voltages Fig. More information about this technique is given in [16] Fig. We use the fact that the phase inductances of HSM vary as a function of rotor position because of the saturation effect of the core in magnet circuit.Software (DS1103) * Id = 0 + Id + Iq PI * Ud dq ab * vb * vb ω* +  PI * Iq PI * Uq PWM Signals 8 θes θes 4 impulses Initial Position Detection θes N θˆe + + θ0 PWM Interrupt (Synchronisation) ˆ Id ˆ I q Id Steady State EKF Algorithm Iq Vd Vq dq ab ia ib Currents And Voltages Acquisition Phase currents θˆ ˆ ω ˆ TL θes dq ab Park T. The better solution to guarantee a good startup is the estimation of rotor position with an algorithm at standstill. If the rotor position is not estimated at standstill.
in steady state. θ θes (a) Measured (θ ) and estimated (θes) rotor position (b) Electrical error position (θesθ) Fig. . 3: Example of start –up Sensorles results In Fig.a.b).4.5 shows an example of speed response.1rad (Fig. The incremental encoder used in this experimental setup introduces a considerable ripple in measured speed as we can see in Fig.(a) Phase currents (b) Estimated electrical position Fig. The electrical position error is less than 0.b. 4: Comparison between measured and estimated position Fig. We can see that the estimated speed is very close to the reference one. with speed reference of 50rad/s. The estimated position shows good Linearity.4. the measured position is compared with the estimated one.5.
6 shows an example of load torque disturbance in steady state. this encoder introduces a considerable ripple in the speed as we can see in the experimental results. The total execution time is drastically reduced.6.(b) Estimated speed (b) Measured speed Fig. all motor parameters are assumed constant. In the next work we will also test a robust position controller such as the RST controller . we intend to estimate the stator resistance in real time with the same method as load torque. 6: Load torque estimation Conclusion In this paper steady state EKF is implemented for hybrid stepper motor. The rotor position is detected from zero to nominal speed without mechanical sensor.6.b) is increased to compensate the load torque.2Nm (fig. which become only 90µs. 5: Comparison between measured and estimated speed Load torque estimation The sensorless algorithm can also estimate the load torque. The major application field of HSM is the position control. Since the total execution time is reduced. the estimated load torque is about 0. We can see that when a load step is applied at t = 0. Iq Id (a) Estimated load torque (TL) (b) Currents Iq and Id Fig.a). The stator resistance is the most sensitive parameter to the sensorless algorithm. The quadrature current iq (fig. In this paper. Fig. The incremental encoder used for comparison has a precision of 9 electric degrees and with a sampling period of 100µs.
no 1.: A Globally Converging Observer of Mechanical Variables for Sensorless PMSM. Vol 30. 491.. Heinzl J. November 2 . August 2006.17411747 Kim Y. IEEE Trans. Persson J. pp.. Zordan M. Vol 1.N.: DSP Implementation of Rotor Position Detection Method for Hybrid Stepper Motors.. China Cardoletti L.. The 30th Annual Conference of the IEEE Industrial Electronics Society.: Steady state Kalman filtering for sensorless control of hybrid stepper motors.. pp.P. Acarnley P. Hildinger P. January/February 1992. July 1991. Vol IE32. Zigliotto M.: A Novel Position Sensor Elimination Technique for the Interior Permanent Magnet Synchronous Motor Drive. Vol 6. pp. December 1999. 2534 . Shanghai. Busan. Vol 39.. 126133. Walther B. IEEE Transactions on Industry Applications. Power Electron.References [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] Bonvin F... no. Vol 16. Vol 3..: Extended Kalman Filter Tuning in sensorless PMSM Drives. Kook Y.. Kellermann H... Sargos F. of the EPE Conference. Zigliotto L. September 1995. July 2000.. Vo1 43. Vol 3. EPE Journal. no 3. 101108.: Kalman Filter and Redundant Observer Comparison for Sensorless PMSM Velocity Control... Industrial Electronics.. IEMDC'03.. 144150 Ertugrul N. Vol 2. Ehsani M. pp. January. November/December 2003.: ExtendedRange PMSM Sensorless Speed Drive Based on Stochastic Filtering . Trondheim 1997. 29th Annual Symposium on IMCSD.: Sensorless Field Oriented Speed Control of a Hybrid Stepper Motor Using an Extended Kalman Filter. June 2003. Proc. Dubrovnik. 2004. Acarnley P. 1.497 Bolognani S. Vol 28.117 Obermeier C.: A Comparative Study on NonLinear State Estimators Applied to Sensorless AC Drives: MRAS and Kalman Filter. 908913 Bendjedia M. Power Electron. IEEE Trans. W. 11741177 Akin B. Heinzl J. Hooper C.: Sensorless position and speed control of a brushless DC motor from startup to nominal speed. Mohan N. CES/IEEE. no 2. IEEE Transactions on Energy Conversion. 887892. IEEE ISIE 2005. pp. Vol 2. pp. Berthon A. Norum L. IEEE Transactions on Industry Applications. pp. Vol 2. pp. Electron. pp ..: Sensorless PM Brushless DC Motor Drives.February 1994..: Design and implementation of an extended Kalman filter for the state estimation of a permanent magnet synchronous motor.. no 4. pp.H. Croatia Kellermann H.S. Fadel M. August 1985. Perriard Y. January 2001.... Korea Matsui N. no 1. Vol 3.6.. Tubiana L. Proc. Brandenburg G.: Field oriented position control of a hybrid stepper motor. 1996. IEEE Trans. Sevilla. P. J. 15.: Detection of Rotor Position in Stepping and Switched Reluctance Motors by Monitoring of the Current Waveform. B. Brandenburg G.. June 2003. pp. Perriard Y. pp.: High Performance IPMSM Drives without Rotational Position Sensors Using ReducedOrder EKF.: Sensorless Position Detection and Sinusoidal Supply for Small Brushless DC Motor.. 885890 Caux S.. pp. AitAmirat Y. Ind. 300308 Mobarakeh B. 6.M. pp. Jufer M.: A New Algorithm for Sensorless Operation of Permanent Magnet Motors. March 1992. Apr. Vol 14. Berkeley (Ca). pp. M. no. Cassat A. IEEE Trans. pp. IPEMC ’06. Hill R. IEEE Transactions on Industry Applications. no 1. of PESC’2000. MeibodyTabar F. 21 5222 Kulkarni A. EPE’ 97 European Conference on Power Electronics and Applications.. 110. 868873. 238 – 243 Bolognani S. Dhaouadi R.. IEEE International Electric Machines and Drives Conference.