<< Chapter < Page Chapter >> Page >
Explanation of the Kalman Filter implementation for digital rocket apogee detection.

Kalman Filter

The Kalman filter is a time domain method of incorporating knowledge of the physical model of the system and of the reliability of the sensors to accurately estimate the state of the system. Implementation of the Kalman filter first requires the creation of an accurate physical model of the system. The two equations which are used to determine the estimate of the current state from that of the previous state are:

x k Ax k 1
x k x k K m H x k
x s v a

Near apogee, the physical equations governing the rocket’s flight are simple, which makes A simple. The only force acting on the rocket is gravity only (because drag forces vary with the square of the velocity they can be neglected near apogee, where the velocity is close to zero).

s v t 1 2 a t 2
v a t
a g
1 Δt Δt 2 2 0 1 Δt 0 0 1

Where ∆t is the time between x k and x k+1 .

m is a vector of the measured values from the sensors. Position is measured with the barometer and acceleration by the accelerometer.

s m a m

H is a matrix which maps x k to m:

1 0 0 0 0 1

Finally, K , the Kalman gain matrix, weights the difference between the measured values and the estimated values. K is typically computed in real time as the system changes. However, the formula for K is rather complicated and therefore difficult to implement on a microcontroller in real time. Luckily, because the rocket’s flight can be approximated over the whole flight by the system and because the sensor variances do not change, K can be precomputed via the following recursive process:

K P H T H P H T R 1

In a small number of repetitions, K will converge. In these equations, R is the measurement noise covariance matrix which holds the variances for each sensor:

σ p 2 0 0 σ a 2

P is called the error covariance matrix, and it is first approximated with a guess, and then recursively defined like the K matrix. Finally, Q is the process noise covariance matrix, and is associated with the amount of noise added to the estimate in each time step. The code for calculating the K matrix is shown below:

.% Calculates the Kalman gain H = [1 0 0; 0 0 1]; % maps x (state variables) to z (sensor data) R = [35.8229 0; 0 .0012]; % measurement noise covariance Q = [0 0 0; 0 0 0; 0 0 1]; % process noise covariance matrix T = .05; % time stepA = [1 T 1/2 * T^2; 0 1 T; 0 0 1]; % maps previous state to next state% these three equations recursively define k (matrix of kalman gains) % and P (error covariance matrix)P = eye(3); % initial guess for p for i = 1:20K = P*H'/(H*P*H' + R); % Kalman gainsP = (eye(3) - K *H)*P; P = A*P*A' + Q;end display(K)display(H) display(P)

The last piece of code demonstrates the actual implementation of the Kalman filter in Matlab.

.% implements Kalman filter on altitude and accelerometer data. Required vectors are alt and accel, which are vectors cointaining the altitude and accelerometer data at times corresponding to the time vector t. t = .05:.05:15;estimate = zeros(3,length(t)); estimate(:,1) = [alt(1); 0; accel(1)]; for i = 2:length(t)estimate(:,i) = A*estimate(:,i-1); estimate(:,i) = estimate(:,i) + K*([alt(i);accel(i)]- H *estimate(:,i));end

Questions & Answers

How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
scanning tunneling microscope
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
The nanotechnology is as new science, to scale nanometric
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
what school?
biomolecules are e building blocks of every organics and inorganic materials.
anyone know any internet site where one can find nanotechnology papers?
Damian Reply
sciencedirect big data base
Introduction about quantum dots in nanotechnology
Praveena Reply
what does nano mean?
Anassong Reply
nano basically means 10^(-9). nanometer is a unit to measure length.
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
Damian Reply
absolutely yes
how to know photocatalytic properties of tio2 nanoparticles...what to do now
Akash Reply
it is a goid question and i want to know the answer as well
characteristics of micro business
for teaching engĺish at school how nano technology help us
How can I make nanorobot?
Do somebody tell me a best nano engineering book for beginners?
s. Reply
there is no specific books for beginners but there is book called principle of nanotechnology
how can I make nanorobot?
what is fullerene does it is used to make bukky balls
Devang Reply
are you nano engineer ?
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
what is the actual application of fullerenes nowadays?
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
what is the Synthesis, properties,and applications of carbon nano chemistry
Abhijith Reply
Mostly, they use nano carbon for electronics and for materials to be strengthened.
is Bucky paper clear?
carbon nanotubes has various application in fuel cells membrane, current research on cancer drug,and in electronics MEMS and NEMS etc
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, Digital detection of rocket apogee. OpenStax CNX. Dec 18, 2013 Download for free at http://cnx.org/content/col11599/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Digital detection of rocket apogee' conversation and receive update notifications?