You are on page 1of 19

APPLICATION OF KALMAN

FILTER FOR ESTIMATED


ELEVATION WATER IN TANK

Nur Hasanah Ahniar


Singgih Yudya Setiawan
Sisca Dina N N
Sefi Novendra Patrialova
Nur Fitriyani
Iftihatur Rohmah

2414201003
2414201004
2414201006
2414201007
2414201010
2414201015

INTRODUCTION
Fluid level control is a basic control in all
industries. Inaccuracies of the measurement
data and the presence of noise in the
measurement can be harmful in a complex
process. Kalman filtering technique is a type of
filter to reduce measurement noise. This
application of Kalman Filter in control of the
water level is expected to reduce the risk of data
acquisition errors.

The problems definition of this Kalman Filter


application are as follows:
How to estimate the fluid level using Kalman
Filter
How to represent measurement data which is
filtered by Kalman Filter
How to simulate Kalman Filter in fluid level
control using MATLAB

STUDY LITERATURE
Overview of Kalman Filter
Kalman filtering, also known as linear quadratic
estimation (LQE), is an algorithm that uses a series of
measurements observed over time, containing noise (random
variations) and other inaccuracies, and produces estimates of
unknown variables that tend to be more precise than those
based on a single measurement alone
The Kalman filter has numerous applications in technology
The algorithm works in a two-step process
is a common misconception that the Kalman filter assumes
that all error terms and measurements are Gaussian
distributed

Kalman Filter Algoritm


Kalman Filter algoritm is used to estimate the dynamic linear
process such given following equation:
xk = Axk-1 + Buk-1 + wk-1
And measurement equation as following equation:
Zk= Hxk + vk

For which
wk and vk : random variable represent the process noise and
measurement noise. This kind of noise is assumed as white noise.
Covariance Q and R are assumed constant.
A : matrix which shows previous time state and current time state.
B : matrix shows control signal or input and current state time.
H : matrix shows current state time and picking measurement.

State of The Kalman Filter

Kalman filter is widely used in many applications.


Many applications of Kalman Filter can be applied
to various systems
In 2003, John Valasek and Wei Chen used an observer
of Kalman Filter to identified airplane online system
In 2004, Pratap R has done a research about EKF
which is used to filter noise into the biological reactor
In 2005, Kalman Filter has been used to estimate
internal temperature of linear hybrid system by L.
Boillereaux, H. Fibrianto and J. M Flaus
Mickael Hilairet, Francois Auger, dan Eric Berthelot
have modified Kalman Filter in 2007

MODELLING PROCESS
A process will be observed is
simple process, it is a
measurement height of water
in tank by using floating ball.
At this process, there are some
possibles:
Filling process, emptying, or
static, that is when the height
of tank increased, decreased,
or unchanged.
Mixing process or stagnant is
the relative height from buoys
at average height of tank
change to time or static.

The tank by the water height constant


(L = c)
State processing model
The level of water in the constant tank, L=c

Process model measurement


There are level of float that can be represented with y=y
Noise model
we assume the noise comes from measurement, i.e. R=r
Filtering testing
Filter was defined. Accordingly, for first measurement
we set the level of tank L=c=1

The tank by increasing water height


constant (dL/dt = c)
The tank is filled with constant debit. It causes
changing of water level constantly.
That Lt = Lt-1 + c.t. By assumption c = 0,1/s.
With the assumption r = 0,1 and
variation 0,001 q0,1

q = 0,001

q = 0,01

Filling Model
State Process Model
for the best results, Kalman Filter Model from Lt =
Lt-1 + c.t will be converted into a continous process
transition
x = (x1,xf)t
Measurement Process Model
still used the assumption that there is noise
H = (1,0)
y (y,0)T

Noise Model
Also still get the noise R = r

Filtering Testing
assumed that the noise r = 0,1 and the accuracy
of the noise process qf = 0,00001

Obtained result

The Constant Height

Mixing models
L = c.sin(2.r.t)+l
By
c =0.5 ; r = 0.05 ; l = 1
By using filters kalman get :

Matlab Program For Case 3.2 Constan


clc; clear;
L0 = 1; c = 0; x0 = [0; 0]; r = 0.1; qf = 0.00001;
tmax = 30;
H = [1 0]; Ft = [1 1; 0 1]; Q = qf*[1/3 1/2; 1/2 1]; P0 = [1000 0; 0 1000];
fprintf(' | L | x1 | y | x2 ');
for t=1:tmax
if (t==1)
L = L0;
x1 = Ft*x0;
P1 = Ft*P0*Ft' + Q;
else
L = L + c;
x1 = Ft*x2;
P1 = Ft*P2*Ft' + Q;
end
y = (L - r + 2*r*rand());
if (y<0)
y=0;
end
K = P1*H'*((H*P1*H'+r)^-1);
x2 = x1+K*(y-H*x1);
P2 = (1-K*H)*P1;
fprintf(' %2d | %9.4f | %9.4f | %9.4f | %9.4f\n', t, L, x1(1), y, x2(1));
measure= y; predict= x1(1); realvalue= L;
end
t =1:tmax;
plot(t,measure,t,predict,t,realvalue);

CONCLUSION
Kalman Filtration technique was introduced as a
reliable technique to diminish noise signal and
was succeed to improve data convergence.
Well preliminary initiation will also enhance
filtration data converging.
In linier system assumption and short time step,
linier modeling was quite enough.

You might also like