nonparametric filter
play

Nonparametric Filter Quan Nguyen November 16, 2015 1 Outline 1. - PowerPoint PPT Presentation

Nonparametric Filter Quan Nguyen November 16, 2015 1 Outline 1. Hidden Markov Model 2. State estimation 3. Bayes filters 4. Histogram filter 5. Binary filter with static state 6. Particle filter 7. Summary 8. References 2 1. . Hidden


  1. Nonparametric Filter Quan Nguyen November 16, 2015 1

  2. Outline 1. Hidden Markov Model 2. State estimation 3. Bayes filters 4. Histogram filter 5. Binary filter with static state 6. Particle filter 7. Summary 8. References 2

  3. 1. . Hidden Mark rkov Mod odel Bayesian Network - Graphical model of conditional probabilistic relation - Directed acyclic graph (DAG) 𝑯 = 𝑾, 𝑭 V: set of random variables E: set of conditional dependencies http://www.intechopen.com/books/current-topics-in-public-health/from-creativity-to-artificial-neural- networks-problem-solving-methodologies-in-hospitals 3

  4. 1. . Hidden Mark rkov Mod odel Hidden Markov Model - Particular kind of Bayesian Network - Modelling time series data http://sites.stat.psu.edu/~jiali/hmm.html 4

  5. 1. . Hidden Mark rkov Mod odel Hidden Markov Model https://en.wikipedia.org/wiki/Viterbi_algorithm#Example 5

  6. 1. 1. Hidd idden Mar arkov Mod odel el Hidden Markov Model Observing a patient for 3 days: + Day 1: Cold + Day 2: Normal + Day 3: Dizzy Question: 1) Most likely sequence of health condition of the patient in last 3 days ? Most likely health condition of the patient in the 4 th day ? 2) 6

  7. 2. . State es esti timati tion on State space - Quantities that cannot be directly observed but can be inferred from sensor data - Examples: position and direction of robot in a room - Notation: π‘Œ = 𝑦 1 , 𝑦 2 , … 𝑦 𝑒 𝑄 π‘Œ = 𝑦 𝑒 : π‘žπ‘ π‘π‘π‘π‘π‘—π‘šπ‘’π‘§ 𝑝𝑔 𝑑𝑏𝑒𝑓 π‘“π‘Ÿπ‘£π‘π‘šπ‘‘ 𝑒𝑝 𝑦 𝑏𝑒 𝑒𝑗𝑛𝑓 𝑒 7

  8. 2. . St State es esti timati tion on Measurement (Observation) - Environment data provided by robot sensor - Examples: distance to ground, camera images - Notation: π‘Ž = 𝑨 1 , 𝑨 2 , … , 𝑨 𝑒 𝑄 π‘Ž = 𝑨 𝑒 : π‘žπ‘ π‘π‘π‘π‘π‘—π‘šπ‘’π‘§ 𝑝𝑔 π‘›π‘“π‘π‘‘π‘£π‘ π‘“π‘›π‘“π‘œπ‘’ π‘“π‘Ÿπ‘£π‘π‘šπ‘‘ 𝑒𝑝 𝑨 𝑏𝑒 𝑒𝑗𝑛𝑓 𝑒 8

  9. 2.S .State es esti timati tion on Control data - Information about the change of state in the environment - Examples: velocity of robot, temperature of a room, an action of robot on environment objects - Notation: 𝑉 = 𝑣 1 , 𝑣 2 , … , 𝑣 𝑒 𝑄 𝑉 = 𝑣 𝑒 : π‘žπ‘ π‘π‘π‘π‘π‘—π‘šπ‘’π‘§ 𝑝𝑔 π‘›π‘“π‘π‘‘π‘£π‘ π‘“π‘›π‘“π‘œπ‘’ π‘“π‘Ÿπ‘£π‘π‘šπ‘‘ 𝑒𝑝 𝑨 𝑏𝑒 𝑒𝑗𝑛𝑓 𝑒 9

  10. 2.S .State es esti timati tion on Probabilistic Generative Laws β€’ State can be constructed on all past states, measurements and controls: 𝑄 π‘Œ = 𝑦 𝑒 = 𝑄 π‘Œ = 𝑦 𝑒 𝑦 0:π‘’βˆ’1 , 𝑨 0:π‘’βˆ’1 , 𝑣 0:π‘’βˆ’1 ) β€’ Markov assumption: 𝑄(π‘Œ = 𝑦 𝑒 ) = 𝑄(π‘Œ = 𝑦 𝑒 | 𝑦 π‘’βˆ’1 , 𝑣 𝑒 ) 𝑄(π‘Ž = 𝑨 𝑒 ) = 𝑄(π‘Ž = 𝑨 𝑒 | 𝑦 𝑒 ) 10

  11. 2.S .State es esti timati tion on Belief distribution β€’ Belief: - Internal knowledge of the robot about the true state - Represent probability to each possible true sate - Notation: π‘π‘“π‘š 𝑦 𝑒 = π‘ž(𝑦 𝑒 | 𝑨 1:𝑒 , 𝑣 1:𝑒 ) β€’ Prediction: π‘π‘“π‘š 𝑦 𝑒 = π‘ž(𝑦 𝑒 | 𝑨 1:π‘’βˆ’1 , 𝑣 1:𝑒 ) β€’ Correction: π‘π‘“π‘š 𝑦 𝑒 = F(π‘π‘“π‘š 𝑦 𝑒 ) 11

  12. 3. . Bay Bayes Filter Bayes Filter algorithm (continuous case) 1: πΊπ‘£π‘œπ‘‘_π‘‘π‘π‘œπ‘’π‘—π‘œπ‘π‘£π‘‘_𝐢𝑏𝑧𝑓𝑑_π‘”π‘—π‘šπ‘’π‘“π‘  (π‘π‘“π‘š 𝑦 π‘’βˆ’1 , 𝑣 𝑒 , 𝑨 𝑒 ) 𝑔𝑝𝑠 π‘π‘šπ‘š 𝑦 𝑒 𝑒𝑝 2: π‘π‘“π‘š 𝑦 𝑒 = π‘ž( 𝑦 𝑒 | 𝑣 𝑒 , 𝑦 π‘’βˆ’1 )π‘π‘“π‘š 𝑦 π‘’βˆ’1 𝑒𝑦 3: π‘π‘“π‘š 𝑦 𝑒 = π‘œπ‘π‘ π‘›π‘π‘šπ‘—π‘¨π‘“π‘  βˆ— π‘ž(𝑨 𝑒 | 𝑦 𝑒 ) π‘π‘“π‘š 𝑦 𝑒 4: π‘“π‘œπ‘’ 5: 6: π‘ π‘“π‘’π‘£π‘ π‘œ π‘π‘“π‘š(𝑦 𝑒 ) 12

  13. 3. . Bay Bayes Filter Bayes Filters algorithm (discrete case) 1: πΊπ‘£π‘œπ‘‘_𝑒𝑗𝑑𝑑𝑠𝑓𝑒𝑓_𝐢𝑏𝑧𝑓𝑑_π‘”π‘—π‘šπ‘’π‘“π‘ (π‘ž 𝑙,π‘’βˆ’1 , 𝑣 𝑒 , 𝑨 𝑒 ) 𝑔𝑝𝑠 π‘π‘šπ‘š 𝑙 𝑒𝑝 2: π‘ž 𝑙,𝑒 = π‘ž( 𝑦 𝑒 | 𝑣 𝑒 , π‘Œ π‘’βˆ’1 = 𝑦 𝑗 )π‘ž 𝑗,π‘’βˆ’1 3: 4: π‘ž 𝑙,𝑒 = π‘œπ‘π‘ π‘›π‘π‘šπ‘—π‘¨π‘“π‘  βˆ— π‘ž(𝑨 𝑒 | 𝑦 𝑒 ) π‘ž 𝑙,𝑒 π‘“π‘œπ‘’ 5: 6: π‘ π‘“π‘’π‘£π‘ π‘œ π‘ž 𝑙,𝑒 13

  14. 4.His .Histogram filter Histogram Filter β€’ Discrete Bayes filter estimation for continuous state spaces β€’ State space decomposition: - π‘†π‘π‘œπ‘•π‘“ π‘Œ 𝑒 = {𝑦 1,𝑒 βˆͺ 𝑦 2,𝑒 βˆͺ … 𝑦 𝑁,𝑒 } - 𝐺𝑝𝑠 𝑓𝑀𝑓𝑠𝑧 𝑗 β‰  𝑙: 𝑦 𝑗,𝑒 ∩ 𝑦 𝑙,𝑒 = βˆ… β€’ In each region the posterior is a piecewise constant density: β€’ 𝐺𝑝𝑠 𝑓𝑀𝑓𝑠𝑧 𝑑𝑒𝑏𝑒𝑓 𝑦 𝑒 π‘π‘“π‘šπ‘π‘œπ‘•π‘‘ 𝑒𝑝 𝑙 π‘’β„Ž π‘ π‘“π‘•π‘—π‘π‘œ: π‘ž 𝑙,𝑒 π‘ž 𝑦 𝑒 = 𝑦 𝑙 𝑒 14

  15. 4.His .Histogram filter Histogram filter β€’ Problem: prior information is defined for individual states, not for region ! - Refer to line 3, 4 of discrete Bayes filter algorithm β€’ Solution: approximating density of a region by a representative state of that region. 𝑦 𝑙,𝑒 𝑦 𝑒 𝑒𝑦 𝑒 𝑦 𝑙,𝑒 = 𝑦 𝑙,𝑒 15

  16. 4.His .Histogram filter Histogram filter β€’ Approximation of density values for regions: π‘ž 𝑨 𝑒 |𝑦 𝑙,𝑒 β‰ˆ π‘ž 𝑨 𝑒 𝑦 𝑙,𝑒 π‘ž 𝑦 𝑙,𝑒 |𝑣 𝑒 , 𝑦 𝑗,π‘’βˆ’1 β‰ˆ π‘œπ‘π‘ π‘›π‘π‘šπ‘—π‘¨π‘“π‘  βˆ— π‘ž( 𝑦 𝑙,𝑒 |𝑣 𝑒 , 𝑦 𝑗,π‘’βˆ’1 ) β€’ Precondition: all regions must have the same size. β€’ Now discrete Bayes filter algorithm is applicable ! 16

  17. 5. . Bi Binary filter r with th stati tic state Binary Bayes filter with Static State β€’ Belief is a function of measurement: π‘π‘“π‘š 𝑒 𝑦 = π‘ž 𝑦 𝑨 1:𝑒 , 𝑣 1:𝑒 = π‘ž(𝑦|𝑨 1:𝑒 ) β€’ General algorithm: 1: πΊπ‘£π‘œπ‘‘_π‘π‘—π‘œπ‘π‘ π‘§_𝐢𝑏𝑧𝑓𝑑_π‘”π‘—π‘šπ‘’π‘“π‘ (π‘š π‘’βˆ’1 , 𝑨 𝑒 ) π‘ž(𝑦|𝑨 𝑒 ) π‘ž(𝑦) π‘š 𝑒 = π‘š π‘’βˆ’1 + log βˆ’ log 2: 1 βˆ’π‘ž 𝑦 𝑨 𝑒 1βˆ’π‘ž(𝑦) 3: π‘ π‘“π‘’π‘£π‘ π‘œ π‘š 𝑒 17

  18. 5. . Bi Binary filter r with th stati tic state β€’ Log odds ratio π‘ž(𝑦) π‘š 𝑦 = log 1 βˆ’ π‘ž(𝑦) - Avoids truncation problems when probabilities close to 0 or 1 β€’ Inverse measurement model: - Reduce complexity by using probability of state given measurement data - Example: infer state of a door in an image is much easier than infer an image from all other images of a close/open door. 18

  19. 5. . Bin Binary fil ilter r with ith stati tic state Example of Binary filter: Occupancy grid mapping - Estimate (generate) map from (noisy) sensor measurement data and robot position - General algorithm: 𝒒 𝑡𝒃𝒒 = 𝑡 π’œ 𝟐:𝒖 , π’š 𝟐:𝒖 = 𝒒(π‘«π’‡π’Žπ’Ž = 𝒅 𝒋𝒕 𝒑𝒅𝒅𝒗𝒒𝒋𝒇𝒆|π’œ 𝟐:𝒖 , π’š 𝟐:𝒖 ) 𝒅 𝒒(π‘«π’‡π’Žπ’Ž = 𝒅 𝒋𝒕 𝒑𝒅𝒅𝒗𝒒𝒋𝒇𝒆|π’œ 𝟐:𝒖 , π’š 𝟐:𝒖 ) is a binary estimation problem 19

  20. 6. . Parti article filter Particle filter algorithm β€’ Represent the posterior density by a set of weighted random particles β€’ General algorithm: 1: πΊπ‘£π‘œπ‘‘_π‘„π‘π‘ π‘’π‘—π‘‘π‘šπ‘“_π‘”π‘—π‘šπ‘’π‘“π‘ (π‘Œ π‘’βˆ’1 , 𝑣 𝑒 , 𝑨 𝑒 ) 2: π‘Œ 𝑒 = π‘Œ 𝑒 = βˆ… 3: 𝑔𝑝𝑠 𝑗 = 1 𝑒𝑝 𝑁 𝑒𝑝 𝑗 ~ π‘ž(𝑦 𝑒 |𝑦 π‘’βˆ’1 𝑗 π‘‘π‘π‘›π‘žπ‘šπ‘“ 𝑦 𝑒 ) 4: 𝑗 = π‘ž(𝑨 𝑒 |𝑦 𝑒 𝑗 ) 5: π‘₯ 𝑒 𝑗 , π‘₯ 𝑒 𝑗 ) 6: π‘Œ 𝑒 = π‘Œ 𝑒 + (𝑦 𝑒 7: π‘“π‘œπ‘’π‘”π‘π‘  8: 𝑔𝑝𝑠 𝑗 = 1 𝑒𝑝 𝑁 𝑒𝑝 𝑗 𝑒𝑠𝑏π‘₯ 𝑗 π‘₯π‘—π‘’β„Ž π‘žπ‘ π‘π‘π‘π‘π‘—π‘šπ‘—π‘’π‘§ ∝ π‘₯ 𝑒 9: 𝑗 𝑒𝑝 π‘Œ 𝑒 10: 𝑏𝑒𝑒 𝑦 𝑒 π‘“π‘œπ‘’π‘”π‘π‘  11: π‘ π‘“π‘’π‘£π‘ π‘œ π‘Œ 𝑒 12: 20

  21. 6. . Parti article filter Particle filter algorithm http://www.juergenwiki.de/work/wiki/doku.php?id=public:particle_filter 21

  22. 6. 6. Par article fil filter Properties of Particle filter algorithm β€’ Degree of freedom: - Because of normalization we lost one degree of freedom: deg = 𝑁 βˆ’ 1 β€’ Identical particles after resampling phase : - Resampling with probability proportional to weight: after every iteration we failed to draw one or more state sample 22

  23. 6. . Parti article filter Properties of Particle filter algorithm β€’ Deterministic sensor: - Sensor with noise-free range: measurement data is zero for most of state ! οƒž All weights become zero. β€’ Particle deprivation problem: - Resampling can wipe out all particles near the true state οƒž incorrect states have larger weight ! 23

  24. 6. . Parti article filter Application of Particle filter - Tracking the state of a dynamic system modeled by a Bayesian Network: Robot localization, SLAM, robot fault diagnosis. - Image segmentation: by generating a large number of particles and gradually focus on particle with desired properties οƒž Image processing, Medial image analysis 24

Recommend


More recommend