You are on page 1of 28

Report For Project 5 Kalman Estimation of the State of a DC Motor

ASIF AL RASHEED EE 5521

Page 1 of 28

The state of a large dc motor, the shaft angle and the angular velocity of the shaft, is estimated from noisy measurements of the shaft angle. The input to this motor is the applied voltage u(t) plus noise on this voltage signal w(t). The output y(t) is the motor shaft angle (t) plus additive measurement noise v(t). The transfer function for the motor is:

( s) U ( s)

2 . s( s 0.02)

Estimates of both states are required to monitor the status of the motor. Now,

( s 2 0.02s) ( s) 2U ( s) (t ) 0.02 (t ) 2u (t )

Let,

x1 x2

x1 x2

x2 0.02 (t ) 2u (t ) 0.02 x2 2u (t )

The state model

x1 x2
y (t ) y (t )

0 0

1 0.02

x1 x2

0 u (t ) 2

(t ) v(t ) 10 x1 x2

x(t ) v(t ) 10 v(t )

Initial condition for all of the simulations,

(0) (0)

0 deg 0 deg . sec

Page 2 of 28

Case a:

2 w

deg 2 ; sec4

2 v

20 deg 2 ;

(0) (0)

0 deg 0 deg ; sec


e

0 deg 2 (0) 0 deg 2 sec

deg 2 sec . deg 2 0 sec 2 0

Simulation results:

Fig 1: Plot of Kalman filter gain.

Page 3 of 28

Fig 2: Plot of estimation error standard deviation.

Fig 3: State and Estimation for shaft angle Page 4 of 28

Fig 4: Estimation error for shaft angle

Fig 5: State, Estimation and Error for shaft angle Page 5 of 28

Fig 6: State and Estimation for angular velocity

Fig 7: Estimation error for angular velocity Page 6 of 28

Fig 8: State, Estimation and Error for angular velocity

Page 7 of 28

Case b: The same as case a, except Simulation results:

2 w

10

deg 2 sec4

Fig 9: Plot of Kalman filter gain.

Page 8 of 28

Fig 10: Plot of estimation error standard deviation.

Fig 11: State and Estimation for shaft angle Page 9 of 28

Fig 12: Estimation error for shaft angle

Fig 13: State, Estimation and Error for shaft angle Page 10 of 28

Fig 14: State and Estimation for angular velocity

Fig 15: Estimation error for angular velocity Page 11 of 28

Fig 16: State, Estimation and Error for angular velocity

Page 12 of 28

Case c: The same as case a, except Simulation results:

2 v

200 deg2 .

Fig 17: Plot of Kalman filter gain

Page 13 of 28

Fig 18: Plot of estimation error standard deviation

Fig 19: State and Estimation for shaft angle Page 14 of 28

Fig 20: Estimation error for shaft angle

Fig 21: State, Estimation and Error for shaft angle Page 15 of 28

Fig 22: State and Estimation for angular velocity

Fig 23: Estimation error for angular velocity Page 16 of 28

Fig 24: State, Estimation and Error for angular velocity

Page 17 of 28

Case d: The same as case a, except

(0) (0)

5 deg 1 deg ; Se (0) sec

100 deg 2 0 deg 2 sec

deg 2 sec . deg 2 10 sec2 0

Simulation results:

Fig 25: Plot of Kalman filter gain

Page 18 of 28

Fig 26: Plot of estimation error standard deviation

Fig 27: State and Estimation for shaft angle

Page 19 of 28

Fig 28: Estimation error for shaft angle

Fig 29: State, Estimation and Error for shaft angle Page 20 of 28

Fig 30: State and Estimation for angular velocity

Fig 31: Estimation error for angular velocity Page 21 of 28

Fig 32: State, Estimation and Error for angular velocity

Page 22 of 28

Case e: The same as case a, except use the steady-state Kalman gain. Simulation Results:

Fig 33: Plot of Kalman filter gain

Page 23 of 28

Fig 34: Plot of estimation error standard deviation

Fig 35: State and Estimation for shaft angle Page 24 of 28

Fig 36: Estimation error for shaft angle

Fig 37: State, Estimation and Error for shaft angle Page 25 of 28

Fig 38: State and Estimation for angular velocity

Fig 39: Estimation error for angular velocity Page 26 of 28

Fig 40: State, Estimation and Error for shaft angle

Page 27 of 28

Comparison of the five cases: Cases Kalman Filter Gains Estimation error standard deviations e1 e2 Mean of Estimation Error Rate of convergence (s) G1 G2 Standard Deviation of Estimation

G1

G2

Shaft angle 0.4861 -0.114 -0.436 -0.288 0.0625

Angular velocity 1.6044 0.2775 0.3904 0.0773 0.1256

Shaft angle 311.3252 776.0154 286.7357 163.0103 116.5068

Angular velocity 4.3741 9.1066 3.0982 3.6302 4.8030

a b c d e

0.4806 0.6992 0.3007 0.4806 0.6004

0.1515 0.3738 0.05312 0.1515 0.2707

3.1 4.25 7.755 3.1 1.735

1.718 3.74 2.219 1.718 1.457

15 9 26 17 1

13 9 24 9 1

Comments: A common trend that we observe among all cases is that the shaft angle estimate more accurately tracks than the angular velocity estimate. From the results we see that using the steady-state Kalman gain yields the best filter evident by the fastest rate of convergence, the lowest estimation error standard deviations, and the lower values of mean and standard deviation of estimation and estimation errors. Also cases a and d give almost identical results in terms of gains, convergence rates and estimation error standard deviations but approach the steady state from opposite directions. Increasing the plant noise in case b increases the output resulting in increase in gain. But increasing the output noise in case c reduces the output, decreasing the gain. So we can conclude that the gain is proportional to the plant noise and inversely proportional to the output noise.

Page 28 of 28

You might also like