• No se han encontrado resultados

1 INTRODUCCIÓN

1.3 Objetivos de la Investigación

2.2.10 Control de calidad del azúcar

The above definition forms the basis for the so-called optimal Bayesian filter solution. In general however, it cannot be obtained analytically for non-linear and/or non-Gaussian noise systems. The only analytical solution that exists, is the so called Kalman filter and is restricted to linear, Gaussian noise systems. For the non-linear and/or non-Gaussian case, approximate methods are used such as PFs.

Particle filtering comes in a lot of flavors, but in its most general form, it is known as the Sequential Importance Sampling algorithm. It is a Monte Carlo (MC) based method, which implements the Bayesian filter by approximating the prior and posterior density functions, with a set of discrete samples. An estimate of the state and/or its variance is subsequently obtained from the ap- proximated posterior. As the number points increases, the SIS filter approaches the optimal Bayesian filter. In addition, a resampling step is introduced at the end of each PF iteration, resulting in the so-called Sequential Importance Resampling algorithm.

Without going in too much detail, a general iteration of the algorithm begins by generating a set of random samples,{xi}i=1,...,N, from a proposal importance density distribution q(xk|yk), such that xi ∼ q(xk|yk). Here N denotes the total number of samples used by the algorithm, while the ∼symbol indicates the probabilities of the samples on the left side, are proportional to the PDF on the right side. Then these samples are weighted, based on the likelihood PDF,p(yk|xk), and the importance sampling principle. Together these samples and weights form a set of tuples, called “particles”. The importance density, q(xk|yk), is chosen, so that it has the same support as the posterior distribution p(xk|yk). There is a wide choice of candidate distributions, but most commonly it is selected to be the distributionp(xk|xk−1), because of its simplicity and ease

of implementation. This choice is also adopted throughout this thesis, and the particular implementation as a result of this choice is detailed below.

Just like the analytical Bayesian filter, the PF has its own prediction and update steps. The prediction step involves the relations

x0,i∼p(x0)

where wk−1 is randomly generated noise sample from the process PDF, and

{xk,i}i=1,...,N are proposal samples of the future state. The procedure is similar to the Bayesian filter. The main difference is that instead of analytically deriving the prior state PDF (by evaluating the integral in Eq. 3.3), it is iteratively approximated, by randomly sampling the process noise PDF and using the state- transition relations. Hence why generating more random samples increases the similarity between the analytical solution and the discrete version.

Once a set of sample predictions are generated, each is assigned a weight wk,i during the update step, such that

w0,i= 1

N i= 1, ..., N

wk,i=wk−1,i p(yk|xk,i). (3.6) Similarly to the Bayesian case, the update step of the PF makes use of a newly acquired measurement,yk, to calculate the likelihoods of the prediction samples generated earlier, through the likelihood PDF,p(yk|xk,i)i=1,...,N. This is done by propagating the samples through the observation model defined in Eq. 3.2

(without the noise factor), using a distance measure to calculate the measure- ment mismatch error, and finally calculating the likelihoods using the PDF of the measurement noise. If the measurement noise,vk, is additive and its PDF is Gaussian with zero mean and covariance matrixΣ, then3.6can be simplified to wk,i=wk−1,i 1 p 2π|Σ|exp −kyk−hk(xk,i,0)k 2 Σ i= 1, ..., N, (3.7) [15, Chapter 15], wherekvk2

A=v>Avdenotes a weighted norm of some vector

v, and|A| – the determinant of a matrixA.

Note that the above-defined relations describe the special case, when the proposal importance density function,q(xk|yk), is chosen to be the state PDF p(xk|xk−1). For a definition of the more general case and a derivation for this

particular case, please refer to [14].

The calculated tuples {xk,i, wk,i}i=1,...,N form the resulting particle set, which can now be used to approximate the posterior PDF using a sequence of delta functions, such that

p(xk|yk)≈p(ˆxk|yk) =A −1 k N X i=1 wk,iδ(xk−xk,i) (3.8) whereAk=PN i=1w i

k is a weight normalization constant. An estimate, ˆxk, can be calculated using E(xk|yk)≈ˆxk=A−k1 N X i=1 wk,ixk,i, (3.9)

which is just a weighted average of the discrete posterior; or using

ˆ

xk=xk,j j= arg max

i wk,i, (3.10)

The overall operation of the SIS Particle filter is compactly described in Alg. 1. This description assumes that the algorithm is executed on a sequen- tial machine, which periodically acquires sensor measurements (as part of some sort of control system or filtering process), such as GPS location, ADC voltage measurements, radar or laser scanner range measurements, etc.

Algorithm 1SIS Particle Filter Algorithm 1: fori= 1 :N do

2: Initialize{x0,i, w0,i}, such thatx0,i∼p(x0) andw0,i=N1. 3: end for

4: foreach system iterationk∈N>0do

5: Acquire new measurementyk from sensors (GPS, Camera, ADC, etc..) 6: fori= 1 :N do

7: Draw a sample xk,i∼p(xk|xk−1) using Eq. 3.5

8: Assign a particle weight,wk,i, using Eq. 3.7 9: end for

10: Approximateˆxk using3.9or 3.10 11: end for

Documento similar