Professional Documents
Culture Documents
Report
Report
Kalman Filter
Presented by:
Ezgi Koçak
Abdelrahman Genidy
Contents
Objective..........................................................................................................................................................2
System Modelling............................................................................................................................................2
Kalman Filter....................................................................................................................................................4
Simulations......................................................................................................................................................4
Appendix..........................................................................................................................................................4
1
Objective
This lab aims to design a Kalman filter that provides estimates of some unknown variables - parameters -
of DC motor given the measurements observed over time. The Kalman filter considers the DC motor
mathematical model. The model will start from a continuous state space into a discrete state space form.
Inputs of the system are the armature voltage, and the output of the system is the estimated speed. Kalman
filter is used to estimate the speed without noise interference.
System Modelling
A DC motor is considered as a case study. We created continuous time state space model. For this, we have
considered the state space model of dc motor which are given below.
The angular position of the rotor θ(t) is measured with an incremental encoder such that the observation y n
provided by the incremental encoder is a quantization of the actual angular positionθn .
y n = round (θn *L/2/pi) *2*pi/L
The DC motor is driven by the input voltage u(t). The input voltage u(t) is characterised with:
2
A MATLAB function (inputvoltage) is created to provide this sampled input for a duration D; the output
of this function - U - is a column vector which contains the sampled input voltage.
Another MATLAB function (simulate) is created to provide the evolution of the output y n, and the
evolution of the state vector x(t).
These two functions are simulated given x1 (the initial state vector) = (00 )
System Response
3
Input Voltage
Kalman Filter
Simulations
Appendix
1. Inputvoltage
o function U = inputvoltage(D,A,Delta,Ts)
t = 0:Ts:D;
u = A/2*square(t*2*pi/Delta);
U = u.';
End
2. Simulate
A = [0 1;0 -1/T];
B = [0 ;G/T];
C = [1 0];
X(1,:) = x1;
for i = 1:(size(U,1)-1)
X_new = Ad *(X(i,:).') + Bd * U(i,1);
X(i+1,:) = X_new.';
end
Y = X(:,1);
Y = round(Y*L/2/pi)*2*pi/L;
end