• Aucun résultat trouvé

⎛⎝⎜⎜⎞⎠⎟⎟ ⎛⎝⎜⎜⎞⎠⎟⎟ wt Ewt !! !! !! xt xt yt Xt Xt ! () () () () () () () v v xt yt x y () () = = = () () () = = = t t w w !! yt ⎛⎝⎜⎜⎞⎠⎟⎟ () AXt w () y x w w () xt () T = t t () () () x y = t ⎛⎝⎜⎜⎞⎠⎟⎟ () () 0 t t + xt yt ! ! = Bwt () () xt ! ⎛⎝⎜⎜⎞⎠⎟⎟ () ()

N/A
N/A
Protected

Academic year: 2022

Partager "⎛⎝⎜⎜⎞⎠⎟⎟ ⎛⎝⎜⎜⎞⎠⎟⎟ wt Ewt !! !! !! xt xt yt Xt Xt ! () () () () () () () v v xt yt x y () () = = = () () () = = = t t w w !! yt ⎛⎝⎜⎜⎞⎠⎟⎟ () AXt w () y x w w () xt () T = t t () () () x y = t ⎛⎝⎜⎜⎞⎠⎟⎟ () () 0 t t + xt yt ! ! = Bwt () () xt ! ⎛⎝⎜⎜⎞⎠⎟⎟ () () "

Copied!
4
0
0

Texte intégral

(1)

Samia Ainouz, M2 GIME, SID

Lab Computer Vision : Kalman Filter

The objective of this lab is to become familiar with linear stochastic probabilistic filters, such as linear Kalman filter.

Problem 1

Write a Matlab function that implements the linear discrete Kalman filter algorithm which takes as its inputs, the measure vector y, the number of measures N, the errors var_e=R and var_w=Q and which returns the resulted state vector S and the final error matrix P.

Test your algorithm for a one dimentional case where A=1, B=0, C=1. Initialize your system to :

P=1

X=sqrt(P)*0.8

Test your algorithm for N=10, 50, 100. What is your conclusion w.r.t to the sample size.

Problem 2 : Switching from the continous to the discrete KF

Let a target displacing on a plane for what we could measure the position x t

( )

y t

( )

⎟ with some uncertainty. Consider that the target mouves with a constant unknown velocity

vx

( )

t vy

( )

t

⎟= x t!

( )

! y t

( )

⎟meaning in theory that accelerations !!x t

( )

=!!y t

( )

=0. In practice, there is a small variations in the acceleration such as : !!x t

( )

=wx

( )

t

!!

y t

( )

=wy

( )

t where

w t

( )

= wx

( )

t

wy

( )

t

⎜⎜

⎟⎟ is a random vector of zero mean and variance-covariance matrix defined by :

E w t

( ( )

wT

( )

t

)

= σ0x σ0

y

⎜⎜

⎟⎟=Qc

1) Show that such a modelisation admits the following state representation : X t!

( )

=AX t

( )

+Bw t

( )

Where X t

( )

=

(

x t

( )

x t!

( )

y t

( )

x t!

( ) )

with A, B two matrices to be precised.

To complete the model, we consider the following observation equation :

(2)

Samia Ainouz, M2 GIME, SID Z t

( )

=CX t

( )

+b t

( )

Where C is the measurment matrix to be precised and b t

( )

the random measure noise of zero mean and variance-covariance matrix:

E b t

( ( )

bT

( )

t

)

= θ0x θ0

y

⎜⎜

⎟⎟

2) The classical solution of the state equation is :

X t

( )

=eA t−t( 0)x t

( )

0 + eA t−u( )

t0 t

Bw u

( )

du t>t0

That we descritize by puting t0=nT and t=T+nT :

Using the matrix A found above and linearizing by the taylor devlopment, show that

eAt =

1 T 0 0 0 1 0 0 0 0 1 T 0 0 0 1

⎜⎜

⎜⎜

⎟⎟

⎟⎟

The last step of the discretisation is to find the variance-covariance matrix of w(n). Using the fact that w(t) is a white noise such that E w u

( ( )

w v

( ) )

=Qcδ

(

uv

)

show that :

Q n

( )

=E w n

( ( )

wT

( )

n

)

= eAv

0 T

BQcBTeATvdv

and that by the Taylor devlopment that :

Q n( )=

σx2T3 3 σx2T

2

2

0 0

σx 2T

2

2

σx

2T 0 0

0 0 σy

2T3 3 σy

2T 2

2

0 0 σy

2T 2

2

σy 2T

Similarly, it is easy to show that

(3)

Samia Ainouz, M2 GIME, SID Z n

( )

=CX n

( )

+b n

( )

with

R= σx

2

T 0

0 σy 2

T

⎜⎜

⎜⎜

⎟⎟

⎟⎟ R is the variance-covariance matrix of b(t).

Write the final discret state equation model of the target.

Problem 3 : Simulation

We aim by this problem to estimate the angular velocity, the angular position (tilt) and the bias given respectively by the gyroscope and the accelerometer of an inertial unit.

The accelerometer role is to measure the tilt αM obtained by adding the acceloremeter noise b2 and the real value of the mobile tilt α

αM =α+b2

The gyroscope measures the velocity u of the mobile, obtained by adding the gyroscope noise b1 and the gyroscope bias b and the real angular velocity of the mobile α!

u=α!+b+b1

Assume that there is no acceleration, the parameters evolution could be modelled as follows :

Xk+1=AXk+wk Yk=CXk+vk

⎧⎨

⎩ Where

Xk= α! α b

⎜⎜

⎟⎟

k

, Y = u αM

⎜⎜

⎟⎟ A=

1 0 0 te 1 0 0 0 1

⎜⎜

⎟⎟

, C= 1 0

0 1

1 0

⎜⎜

⎟⎟,

v= b1 b2

⎝⎜ ⎞

⎠⎟, E vv

( )

T =R= σ1

2 0

0 σ2 2

⎜⎜

⎟⎟, E ww

(

T

)

=Q=

εα! 0 0 0 εα 0 0 0 εb

⎜⎜

⎜⎜

⎟⎟

⎟⎟

Hypothesis : Assume that

1- The sampling frequency fe (=1/Te) is equal to 50.

2- The ground truth (real measures without noise) are : α!=2π2sin 2πt

( )

, α =ππcos 2π

(

t

)

, b=10t+20sin 0.2πt

( )

Where t is the measurement time in second wich is put to 10 here 3-The sensors noises are assumed to be : σ1=0.6π2, σ2 =0.2π

4- In order to simulate a real noised measures, add a randn noise (multiplied by the respective sensor noises) to the ground truth.

(4)

Samia Ainouz, M2 GIME, SID

5-Initialisation :

A,C,R given

( )

. Diag Q

( )

= 10 0 2

P=zeros(3, 3), X(1)=0,X

( )

2 =0,X

( )

3 =0

Xestim=zeros temp

(

*fe

)

Xestim

( )

1,i =X i

( )

i=1:3

ü P is symmetric positive definite matrix. The final estimated errors on each state parameter is the diagonal of P.

ü Use the Kalman filter to estimate the three unknown parameters : the angular velocity, the tilt and the bias of the gyroscope.

ü Plot respectively the ground truth, the measures and the estimated state for each of the three unknowns.

Références

Documents relatifs

This design provides an 8-bit interface that is compatible with Novell’s 8-bit NE1000, while using the DP83902 (ST-NIC TM ) to interface to twisted pair Ethernet.. The ST-NIC also

Bitte die Leuchte ausschließlich mit einem trockenen Tuch reinigen.. Wir empfehlen Microfaser- tücher für

[r]

1) Ecrire la formulation mathématiques d’un problème de calcul de variations PCV à extrémités fixées puis libres. 2) Donner la définition d’une direction de

A more general example is the pair of positively homogeneous convex functions denned by Minkowski and known as the distance (or gauge) function and the function of support of a

This servo information is used as a control signal for the actuator to provide track-crossing signals during a seek operation, track-following signals during on cylinder

If the Byte Transfer Length is greater than available length plus four reported by the Read Buffer Command, the drive creates the CHECK CONDITION status with

(refer to Figure SA for general timing requirements).. PosItioning the DRIVE SELECT Jumper between the two appropriate pins on the drive printed circuit board