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

ˆ(0) ˆ(0) 0 deg 0 deg . sec e 0 deg 2 (0) 0 deg 2 sec deg 2 sec .Case a: 2 w 1 deg 2 . deg 2 0 sec 2 0 Simulation results: Fig 1: Plot of Kalman filter gain. sec4 2 v 20 deg 2 . 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 .

Page 8 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.

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 .

Estimation and Error for angular velocity Page 12 of 28 .Fig 16: State.

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 .

Estimation and Error for shaft angle Page 15 of 28 .Fig 20: Estimation error for shaft angle Fig 21: State.

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 .

deg 2 10 sec2 0 Simulation results: Fig 25: Plot of Kalman filter gain Page 18 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 .

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 .

Estimation and Error for angular velocity Page 22 of 28 .Fig 32: State.

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 .

Estimation and Error for shaft angle Page 25 of 28 .Fig 36: Estimation error for shaft angle Fig 37: State.

Fig 38: State and Estimation for angular velocity Fig 39: Estimation error for angular velocity Page 26 of 28 .

Estimation and Error for shaft angle Page 27 of 28 .Fig 40: State.

735 1.4806 0.25 7.3007 0. Page 28 of 28 .755 3.436 -0.1066 3.3252 776.0103 116.1515 0.5068 Angular velocity 4.1256 Shaft angle 311.6004 0.288 0. But increasing the output noise in case c reduces the output.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.718 3. convergence rates and estimation error standard deviations but approach the steady state from opposite directions.6044 0.8030 a b c d e 0.1 4. Increasing the plant noise in case b increases the output resulting in increase in gain.7357 163.2775 0.2707 3. From the results we see that using the steady-state Kalman gain yields the best filter evident by the fastest rate of convergence.3741 9.6992 0.0625 Angular velocity 1.0773 0.3738 0.1 1.718 1.114 -0. So we can conclude that the gain is proportional to the plant noise and inversely proportional to the output noise.6302 4.4806 0.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. decreasing the gain.4861 -0. the lowest estimation error standard deviations.1515 0.05312 0. Also cases a and d give almost identical results in terms of gains. and the lower values of mean and standard deviation of estimation and estimation errors.74 2.0982 3.219 1.3904 0.0154 286.