• 沒有找到結果。

Chapter 1 Introduction

1.4. Dissertation organization

Chapter 1 introduces the motor applications in the industrial and automotive fields Speed reference

FOC

EKF

ω

θ

Estimated ω

Estimated θ Motor drive

Fig. 1.3 EKF open loop test.

particularly the PMSM together with the advantages provided by sensorless control.

Chapter 2 derives the dynamic model of a PMSM on the arbitrary rotating d-q frame.

The dynamic model is easily mounted on the stationary frame via the rotating d-q frame.

Understanding the FOC, EKF and d-q inductance measurement is of fundamental importance.

Chapter 3 introduces the EKF algorithm as applied to the parameter estimation of a PMSM. This chapter includes the nonlinear model for the EKF and the recursive steps for calculating the optimum solution.

Chapter 4 summarizes the simulation results for both FOC and the EKF using Matlab/simulink. The function blocks are illustrated in detail.

Chapter 5 illustrates the software realization using assembly language including how the macros reduce the execution time and simply the software structures. Scaling, software flowchart and timing analysis are also demonstrated clearly.

Chapter 6 details the experiment results including the detection of the initial rotor position, rotor alignment and the EKF estimation results. The detection of the initial rotor position identifies the rotor position within 60 electrical degrees and the rotor alignment forces the rotor to stay at a known position. These two approaches help start the motor successfully.

Chapter 7 states the conclusions and future research tasks.

Chapter 2

Modeling and Parameters Measurement of A Permanent Magnet Synchronous Motor

In the control of a sinusoidal PMSM, the most commonly adopted control schemes are the field-oriented vector control (FOC) and direct torque control (DTC). These decoupling control schemes can decouple those nonlinear coupled physical variables to linear decoupled pseudo variables. A PMSM under well decoupled FOC control can behave just like an external excited dc motor, within base speed control range, the developed torque is proportional to the phase current. It decomposes complicated 3-phase stator current vectors into q-axis and d-axis, and the rotor only have d-axis (magnet axis). The Kalman filter technique will use these mathematical models to estimate the parameters of motors. This chapter examines two kinds of the motor state equations and one of them has been chosen for the EKF estimation.

2.1. Machine model in arbitrary d-q reference frame

bs

ω q

ω

r

br ar

θ

θ

r

as

as, bs, cs are stator flux axes.

ar, br, cr are rotor flux axes q, d are rotating axes d

cs cr

Fig. 2.1 Arbitrary d-q reference frame

To realize how the field-oriented control works, here below are the motor stator and rotor phasers. “as”, “bs” and “cs” mean a , b and c phase of a motor stator and “ar”, “br” and

“cr” mean a , b and c phase of a motor rotor respectively. Each of them means the force vector caused by the stator current and rotor current (magnets). “q” and “d” axes are orthogonal and at arbitrary position. To control a PMSM as a DC motor, those phasers need to project onto the arbitrary d-q frame, that is, three-phase to two-phase transformation.

To simplify mathematical model deriving, assume that (1) The air gap is even,

(2) The magnetic circuit is linear,

(3) The stator winding is arranged to generate sinusoidal inductive voltage.

Now, project those phasers onto d-q reference frame, we need three phase to two phase transformation as below:

⎥ ⎥

The stator phase voltage equation:

. (2.2)

Use (2.1) to transfer abc coordinate to d-q coordinate:

Substituting (2.4) into (2.3), we get

We can get rotor phase voltage in d-q coordinate in similar way:

. (2.6)

Stator flux linkage equation:

(

rabc

)

Stator inductance:

⎥⎥

inductance

Mutual inductance between stator and rotor:

⎥ ⎥

( )

( ) ( )

It’s similar to get

0

It follows that

⎥⎥

For BLDC or PM motors,

i

rq = 0 and

pi

rd = 0,

According to (2.18), we get an equivalent circuit as below:

The air gap is not even for an interior magnet synchronous motor, so Ld is not equal to Lq . See the rotor structure below.

r

s

Fig. 2.2 Equivalent circuit of a PMSM.

Fig. 2.3 Interior magnet type rotor Ld ≠Lq.

Fig. 2.4 Surface mount type rotor Ld

= L

q

= L

ss.

2.2. L d and L q measurement

The d-axis and q-axis inductance, Ld and Lq,of a PMSM in which the magnets are buried in the rotor as shown in Fig. 2.3 can be measured with a single phase ac voltage source, see the connection below.

The applied voltage and current are recorded to calculate the inductance. The d-q axis inductance can be calculated as the equation shown below by varying the applied voltage from 0 to 100 volts approximately:

(2.19)

where is is the measured current and vs is the measured voltage.

variable ac voltage source

voltage meter

current meter

r

s

r

s

r

s

L

a

L

a

L

a

Fig. 2.5 Ld and Lq

measurement.

( )

2

2

3 1 2 60 2

or 1 s s

s q

d

v s r i

L i

L

⎟ −

⎜ ⎞

= ⎛

π

Chapter 3

Kalman Filter Estimator for A PMSM

y(k)

z-1

) ˆ k( z-1

y

+ +

+

v(k) w(k)

K

x(k)

PMSM

B(k) C(k)

A(k)

+ +

u(k)

C(K)

_

e(k)

+

+ +

+

A(k) B(k)

Fig. 3.1 Structure of EKF.

Fig. 3.1 shows the basic block diagram of the extended Kalman filter (EKF) [9]. It shows that the EKF is based on the state equations of a PMSM. The upper block shows the PMSM state equations which looks like the lower block except the Kalman gain K and noise vectors v(k) and w(k). The actual output y(k) and estimated output

y)

(k)would be the same with the same input u(k) neglecting v(k) and w(k) which results e(k) to zero. In fact, this would not happen in reality and e(k) is not zero due to v(k) and w(k) which represent system and measurement noises respectively. In the experiment, u(k) and y(k) are voltage commands and motor phase currents decoupled on stationary frame respectively, see Fig. 1.2. The states

vector x(k) is defined as [ ,

i

αs

i

sβ, θ , ω ] in which the unknown states, rotor position r θ r and speed ω , are to be estimated according to the known currents and . The Kalman gain K will try to minimize e(k) to estimate the speeds and positions with the covariance matrices P, Q, R of the system state vector, system noise vector, and measurement noise vector respectively.

α

i

s

i

sβ

3.1. Kalman filter on rotor reference frame for a PMSM

β q

ω

r

d

θ

r

α

Fig. 3.1 Rotor Reference Frame.

Rewrite (2.18) as below

. (3.1)

The equation above is derived from an arbitrary d-q reference frame. To apply EKF algorithm, (3.1) needs to be present in differential equations which the state variables should be defined first. Let the state variables be , where and are stator current projecting to arbitrary d-q frame,

t current referring to

i

t

i

y = [

α β

] i

α

i

β

αβ

reference frame. The input is , where and are stator input voltage referring to

t

There are two different coordinates, d-q and

αβ

frames. It’s also necessary to know the relation between these two frames:

. (3.2)

State equation forms:

Bu

Represent (3.1) in state equations:

⎥ ⎥

Rewriting the differential equations (3.5) and (3.6) in the form

Bu Ax dt x

d

= + ,

Cx y

= . and applying (3.2) in (3.7) yields

⎥⎥

The output equation is

. (3.9)

Now the complete state equations are

⎥⎥

3.2. Kalman filter on stator reference frame for a PMSM

Fig. 3.2 Stator Reference Frame.

In the arbitrary rotating frame, as shown in Fig. 2.1,

θ

is set to 90 electrical degrees to get a fixed coordinate

αβ

frame. Axis q and axis d are rotor quadrant and direct axes respectively. The (2.5) is presented below for quick reference ,

0

. (3.16)

Rewrite (3.14), we get

βα

In (3.20), the

ω

rterm comes from the differentiation of (3.19) Represent(3.20)as below,

, (3.21) Transfer (3.21) and (3.22) into state equation form:

s

s

Another differential equation form,

x f ( ) x Bu

dt

d = + ,

is introduced with state vector

,

input and output state variables , then the complete state equations are

t

These matrices will be discussed in detail in chapter 4.

3.3. Selection of the time-domain machine model

Comparing (3.10), (3.11), and (3.12) with (3.25), (3.26), and (3.27) we can observe some differences. It is possible to have EKF implementations using time-domain machine models expressed in the stationary or rotor reference frame. Obviously the selection of the reference frame has a great effect for the execution time in real time implementation using a DSP. In (3.26) and (3.27), the elements of these matrices are constants which can make coding easier and reduce calculation time needed, especially in view of the computational intensity of the EKF.

As discussed above, the EKF model would be based on (3.25), (3.26) and (3.27) derived from the stationary frame for the purpose of faster calculation.

Chapter 4

Simulations of EKF

The Matlab/simulink has been used throughout all the analysis, design and simulations.

It’s easier to simulate the EKF using Matlab language files (M files) instead of transfer functions in Matlab/simulink. Besides, the advantage of the M file is that it is easily converted into an assembly program. So the PMSM models of stator reference frame are adopted for the S-function and so are the EKF models.

As mentioned in section 3.2, the state vector, , have to be estimated.

The input is defined as and the output vector is . The state variables form of the equations will be obtained by assuming that the rotor inertia has an infinite value (thus the derivative of the rotor speed is negligible compared with the other system variables, and any mechanical load parameter, as well as the load torque,

t

ω =

. Although in practice the rotor inertia is not infinite, the required correction is performed by the Kalman filter algorithm. Thus the following state-variable equation is obtained:

( ) x Bu f

dt x

d = +

(4.1)

and the output vector is

Cx

Furthermore, the input matrix B is defined as

⎥ ⎥

and the output transformation matrix is

. (4.5)

As mentioned in section 3.3, in contrast to the transformation matrix of the model expressed in the rotor reference frame, see (3.10), the matrix as shown in (4.4) and (4.5) contains only constant elements, and it results in simplifications in the implementation of the EKF. The system described by (4.3) is a non-linear system. It is this non-linearity which ensures that the EKF has to be used, and not the conventional, linearized Kalman filter. It should be noted that the time-discrete model is now put into the following form where the noise vectors have also been added to obtain a system model required by the EKF:

)

The motor behavior with real position feedback and the EKF will be illustrated in simulation and experiments.

4.1. The steps of the discretized EKF algorithm on stator reference frame

The steps of the discretized EKF algorithm are as follows:

Step 1: Initialization of the state vector and covariance matrices

The initial values of the state vector x0=x(t0) and noise covariance matrices Q0 and R0

are set, together with the starting value of the state covariance matrix P0. It is important to note that in general, if incorrect initial values are used, the EKF algorithm will not converge to the correct values. For the initial position of the PMSM,

θ

r, which can be obtained using the method of aligning the rotor by applying stator current at “as” axis, then the rotor will be aligned at “as” (or

α

) axis. For a brushless DC motor, the rotor initial position can be obtained by examining the stator currents applied by a certain duty cycle of the output phase voltages, this method will be discussed in detail in chapter 4.

Step 2: Prediction of the state vector

Prediction of the state vector at sampling time (k+1) from the input u(k), the state vector at previous sampling time x(k), by using f and B, is obtained by performing

] [

] [

) ( ) 1 ( ) 1

(

k |k x k x k | k T f (k | k) Bu(k) x(k) T f (k) Bu(k)

x

+ = + = + x + = + x + . (4.11)

On the right side equation, the simplified notation has been used, and a simple rectangular integration technique is used by using the previous state estimate x(k|k), and also the mean voltage vector u(k) which is applied to the motor in the period

t

kto

t

k+1.

Step 3: Covariance estimation of prediction

The covariance matrix of prediction is estimated as

Q

where F is the gradient matrix:

x

Step 4: Kalman filter gain computation

. (4.15)

Step 5: State vector estimation

The state vector estimation at time (k+1) is performed through the feedback correction scheme, which makes use of the actual measured quantities (y):

x

ˆ(

k

+1

|k

)=

x

(

k

+1

|k

)+

k

(

k

+1)[

y

(

k

+1)

-Cx

(

k

+1

|k

)]. (4.16)

Step 6: Covariance matrix of estimation error

. (4.17)

It should be noted that this scheme requires the measurement of the stator voltages and currents. In a PWM voltage-source inverter, it is possible to reconstruct the stator voltage according to the DC bus voltage and switching states of the power switches. If so, we need a voltage sensor to detect the DC bus voltage and connect it to A/D interface of the DSP. As we know, PWM type inverter can be a noisy source which means you will pick up noises when you measure the motor phase voltages. To avoid the noises, using some filtering is necessary

but it will lead to another problem, phase lag, and this would cause some inaccuracies and convergence problem during the calculations of EKF algorithm. Another possible way is to use stator voltage references instead of the real phase voltages, thus we can get rid of the voltage sensor and simply the software and hardware.

4.2. Matlab/simulink simulation of the EKF

Fig. 4.1 PMSM with EKF simulink model.

4.2.1. Description of the function blocks

In Fig. 4.1, the descriptions of the blocks are as below:

dq2abc: Transform d-q current references to abc current references.

INPUT:

¾ iqref: q-axis current reference coming from PI speed regulator.

¾ idref: d-axis current reference, set to 0.

¾ ioref: Set to 0.

¾ thetae: Rotor position, it is needed for coordinates transformation.

OUTPUT:

¾ iabcr: Motor three phase current references.

PWM inv 2: Current regulator.

INPUT:

¾ iref: Three phase currents reference input.

¾ iabc: Three phase currents feedback coming from the motor.

OUTPUT:

¾ va,vb,vc: Motor three phase voltages.

Stator reference: Motor model in stator reference (alpha-beta),which is based on s functions.

INPUT:

¾ va,vb,vc: Motor three phase voltages input.

¾ Friction: Friction input coming from mechanical parts like bearings and loads.

OUTPUT:

¾ iabc: Motor three phase current outputs which can be used as monitor and feedback.

¾ w_e: Motor speed in electric degrees.

¾ theta_e: Rotor position in electric degrees.

¾ Te: Motor output torque.

EKM: Extended Kalman filter model.

INPUT :

¾ va,vb,vc: The inputs comes from the motor phase voltages.

¾ ia,ib,ic: The inputs comes from the motor phase currents.

OUTPUT:

¾ i_alpha_e: Estimated alpha axis current output from EKM.

¾ i_beta_e: Estimated beta axis current output from EKM.

¾ w_e: Estimated rotor speed in electric degrees from EKM.

¾ theta_e: Estimated rotor position in electric degrees from EKM.

¾ torque_es: Estimated torque from EKM.

4.2.2. Description of the motor simulink model in stator reference frame

Fig. 4.2 A PMSM Simulink model in stator reference frame.

Fig. 4.2 shows the block diagram of PMSM in stator reference frame. The inputs are the motor three phase voltages like the real motor. The outputs are three phase currents, motor speed and rotor position. It’s easy to simulate motor behavior using matrix Matlab/simulink S function. According to (3.23) and (3.24), the state equations for simulation in S function is shown below:

⎥ ⎥

where T means torque, is the system inertia. The output torque equation is presented as below:

J

)

The motor model is based in the stator reference frame, so we need to convert and to and . The transfer matrix:

Apply (4.20) to (4.19), it yields

)

The equation (4.21) will be used to calculate the output torque in the simulation. The output states variables:

⎥ ⎥

We will use (4.18) and (4.22) in the file pmstator.m

pmstator1.m file

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Motor model in stator reference frame

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function [sys,x0,str,ts]=pmstator(t,x,u,flag);

Rs=5;

switch flag case 0,

sizes=simsizes;

sizes.NumDiscStates=0;

sizes.NumOutputs=4;

sizes.NumInputs=4;

sizes.DirFeedthrough=0;

sizes.NumSampleTimes=1;

str=[];

ts=[0 0];

x0=[0; 0; 0; 0];

sys =simsizes(sizes);

case 1,

U=[u(1);u(2);u(3)];

A=[-Rs/Ld 0 Fm/Ld*sin(x(4)) 0;

0 -Rs/Lq -Fm/Lq*cos(x(4)) 0;

0 0 0 0;

0 0 1 0];

B=[ 1/Ld 0 0;

0 1/Lq 0;

0 0 1/(J+u(4));

0 0 0 ];

sys=A*x+B*U;

case 3, sys=C*x;

case 4, sys=[];

case 9, sys=[];

end

4.2.3. Description of the EKF simulink model in stator reference frame

Fig. 4.3 The EKF model on stator reference frame.

Examining Fig. 4.3 finds the structure is quite similar to the model in Fig. 4.2, the input v_alpha, v_beta and the output i_aplha, i_beta, w_e, theta are the same with Fig. 4.2. The major differences are EKF needs currents feedback to calculate Kalman gain and there are white noises inputs injected to the voltages v_alpha, v_beta and currents i_alpha, i_beta.

The white noise is appeared as Fig. 4.4.

Fig. 4.4 White noises.

According to section 3.1, we can compose Matlab language as below:

EKM6a.m file

function [sys,x0,str,ts]=EKM6a(t,x,u,flag,P,Q,R);

%global Rs Ld Lq Fm v_alpha v_beta i_alpha i_beta;

%global P Q R fid;

%global out fit;

Rs=5;

Ld=10e-3;

Lq=10e-3;

Fm=0.175;

T=5e-4;

%i=0;

Bd=[1/Ld 0;

0 1/Lq;

0 0;

0 0];

H=[1 0 0 0;

0 1 0 0];

switch flag case 0, %ekmini;

sizes=simsizes;

sizes.NumContStates=0;

sizes.NumDiscStates=4;

sizes.NumOutputs=4;

sizes.NumInputs=4;

sizes.DirFeedthrough=0;

sizes.NumSampleTimes=1;

str=[];

ts=[0.0005 0];

x0=[0; 0; 0; 0];

sys = simsizes(sizes);

case 2,

% Step 1:Initialization of the state vector and covariance matrices

Uk=[u(1);u(2)];

Y=[u(3);u(4)];

% Step 2:Prediction of the state vector

fx=[-Rs/Ld*x(1)+Fm/Ld*x(3)*sin(x(4)) ;

-Rs/Lq*x(2)-Fm/Lq*x(3)*cos(x(4)) ;

0 ; x(3) ];

F=[-Rs/Ld 0 Fm/Ld*sin(x(4)) Fm/Ld*x(3)*cos(x(4));

0 -Rs/Lq -Fm/Lq*cos(x(4)) Fm/Lq*x(3)*sin(x(4));

0 0 0 0;

0 0 1 0];

x1=x+T*(fx+Bd*Uk);

% Step 3: Covariance estimation of prediction

P1=P+T*(F*P+P*F')+Q; % P1 is 4x4

% Step 4: Kalman filter gain computation

K1=P1*H'*inv(H*P1*H'+R);% K1 is 4x2

% Step 5: State vector estimation h=[x1(1);x1(2)];

sys=x1+K1*(Y-h);

% Step 6: Covariance matrix of estimation error

P=P1-K1*H*P1;

case 3, sys=x;

case 4,

sys=(round(t/T)+1)*T;

%sys=[];

case 9, sys=[];

end

4.3. Simulation results

Position error (deg)

Speed error (rad/s) Actual position

(deg)

Estimated position (deg)

Actual speed (rad/s)

Estimated speed (rad/s)

Fig. 4.5 Speed reference = 200 rad/s with EKF open.

Position error (deg)

Speed error (rad/s) Actual position

(deg)

Estimated position (deg)

Actual speed (rad/s)

Estimated speed (rad/s)

Fig. 4.6 Speed reference = 200 rad/s with EKF closed.

Actual speed (rad/s)

Estimated speed (rad/s)

Actual position (deg)

Estimated position (deg)

Position error (deg)

Speed error (rad/s)

Fig. 4.7 Speed reference = 100 rad/s with EKF open.

Actual speed (rad/s)

Estimated speed (rad/s)

Actual position (deg)

Estimated position (deg)

Position error (deg)

Speed error (rad/s)

Fig. 4.8 Speed reference = 100 rad/s with EKF closed.

Actual speed (rad/s)

Estimated speed (rad/s)

Actual position (deg)

Estimated position (deg)

Position error (rad)

Speed error (rad/s)

Fig. 4.9 Speed reference = 50 rad/s with EKF open.

Actual speed (rad/s)

Estimated speed (rad/s)

Actual position (deg)

Estimated position (deg)

Position error (rad)

Speed error (rad/s)

Fig. 4.10 Speed reference = 50 rad/s with EKF closed.

Fig. 4.5 to Fig. 4.10 show the results with EKF open and closed where the input commands come form 50 to 200 rad/s with a ramp of 200 rad/s at the beginning. The speeds and rotor positions can be easily estimated with EKF open for speed references from 50 to 200 rad/s. With EKF closed, which means the encoder feedbacks are replaced with the estimated speeds and positions by EKF, the EKF failed at a reference command of 200 rad/s.

Another speed reference is defined as below:

Rad/s

Sec Fig. 4.11 Speed reference.

Rad/s

Rad

Sec Fig. 4.12 Speed response and rotor position without load.

The speed reference ramps up at a slope of 200 rad/s, and it finally reaches to 50 rad/s. The motor behavior between field-oriented control (FOC) with and without sensor (EKF) are illustrated below. All the response comes out of the same PI controller which means the

proportional gain and integral gain are the same in order to see the differences if using the EKF instead. Fig. 4.12 is the speed and rotor position responses of FOC without load using

Rad/s

Rad

Sec Fig. 4.13 Speed response and rotor position with load 0.1N-m at t=1.5 seconds.

N-m

Sec Fig. 4.14 Torque response with load 0.1Nm at t=1.5 seconds.

position sensor. We can see the response is almost the same with the reference as shown in Fig 4.12. Next, a little bit loads is applied to the motor at 1.5 seconds which causes the speed response to change, as shown in Fig. 4.13. Actually the speed response can be better but the PI gain was adjusted only for the EKF instead of the FOC in the purpose of stability, so the PI gain is not suitable for the FOC here. As mentioned, the PI gains remain unchanged throughout the entire simulation. The torque response is shown in Fig. 4.14. We can see the applied torque is 0.1 Nm at 1.5 seconds. Fig. 4.15 is the current response.

A

Sec Fig. 4.15 Current response with load of 1.5 N-m at t = 1.5 seconds.

command

Rad/s

Rad

Sec Fig. 4.16 Speed response and rotor position using EKF.

Next is the motor behavior without position feedback which uses the EKF to calculate the rotor position. Fig. 4.16 is the speed response without any load using EKF. The speed response looks not so good compared to Fig. 4.12. Of course the response is poor in EKF, because the actual position sensor was not applied. The EKF will execute and output rotor position and speed every 500 us (2 KHz), because the TMS320LF2407 fixed-point DSP is adopted for the experiment, and a lot of matrices manipulation will be involved for EKF theory in real time. 2 KHz execution rate is acceptable for the DSP. The Kalman gain K will be adapted constantly, see below:

t= 0.000000 second,

K =

.

⎥⎥

⎥⎥

⎢⎢

⎢⎢

0.000000 0.000000

0.828697

-0.000000

0.487555 0.000000

0.000000 0.485420

t= 2.000000 seconds,

t= 3.000000 seconds,

K =

.

The initial covariant matrices for the simulations are :

⎥⎥

We can see Kalman gain changes all the time, especially the gain for rotor position and speed.

Fig. 4.17 and 4.18 are current and torque response of the EKF without loads.

A

Sec Fig. 4.17 Current response using EKF in no load condition.

N-m

Sec Fig. 4.18 Torque response without load using EKF.

Fig. 4.19 shows the speed and accumulated position errors compared with the actual speed and rotor position. The speed error will decade to zero and the rotor accumulated position error no longer increases after 1.5 seconds. The accumulated position error is about

2 π

or

6.24 radian. Fig. 4.20 shows that a light load at 1.5 seconds was applied which results the speed to oscillate a little bit compared with the Fig. 4.16. Fig. 4.21, 4.22 and 4.23 shows the same phenomenon due to a light load applied at 1.5 seconds.

Rad

Rad/s

Sec Fig. 4.19 Rotor position accumulated error and speed error without load.

command Rad/s

Rad

Sec Fig. 4.20 Speed response and rotor position using EKF with load 0.1 N-m at t=1.5 seconds..

N-m

Sec Fig. 4.21 Torque response using EKF with load 0.1 N-m at t=1.5 seconds.

A

Sec Fig. 4.22 Current response using EKF with load 0.1 N-m.

Rad

Rad/s

Sec Fig. 4.23 Rotor position accumulated error and speed error using EKF with load 0.1 N-m.

command

Rad/s

Rad

Sec Fig. 4.24 Speed and rotor position using EKF.

Rad

Rad/s

Sec Fig. 4.25 Rotor position and speed error using EKF.

The speed response is not good as shown in Fig. 4.16 due to the values of the covariance matrices P, Q and R. Another set of matrices which was derived by try and error is selected as below,

The speed response is much better compared with Fig. 4.16 in no load condition as shown in Fig. 4.24.

Chapter 5

Software Implementation of Kalman Filter Estimating Speed and Position

To implement the EKF algorithm in real time estimation by using a fixed-point DSP is not an easy task because there are a lot of numerical calculations involved such as signal conditioning, scaling, quantization noise, precision control, and all these computations must be completed within a very short specified time interval. First the motor parameters like inductances, constant of back EMF and resistances should be known. Next the numerical range of other parameter vectors that are phase currents and voltages, shaft speed and positions should be determined as well to decide the Q format. Then assembly language is adopted for this experiment for the purpose of reducing the calculation time.

5.1. Scaling for variables

Q format must be used to present a non-integer value for a fixed-point DSP using assembly language. For a 1024-pulse encoder with 1 KHz sampling frequency, there are 204

Q format must be used to present a non-integer value for a fixed-point DSP using assembly language. For a 1024-pulse encoder with 1 KHz sampling frequency, there are 204

相關文件