The Kalman filter
- and other methods
Anders Ringgaard Kristensen
Slide 1
The Kalman filter - and other methods Anders Ringgaard Kristensen - - PowerPoint PPT Presentation
The Kalman filter - and other methods Anders Ringgaard Kristensen Slide 1 Outline Filtering techniques applied to monitoring of daily gain in slaughter pigs: Introduction Basic monitoring Shewart control charts DLM and the
Anders Ringgaard Kristensen
Slide 1
Slide 2
Slide 3
Landscentret (as shown)
Slide 4
xxxx
−xxxx
+xxxx
−xxxx
yyyy
Slide 5
Slide 6
2)
Slide 7
2) Slide 8
Slide 9
The model is necessary for any meaningful interpretation of calculated production results. The standard deviation on the sample error, σs , depends on the natural individual variation between pigs in a herd and the herd size. The standard deviation of the observation error, σo , depends on the measurement method of valuation weights. For the interpretation of the calculated results, it is the total uncertainty, σ ,
Slide 10
For the interpretation of the calculated results, it is the total uncertainty, σ , that matters (σ2 = σs
2 + σο 2)
Competent guesses of the value of σ using different observation methods (1250 pigs):
Slide 11
Slide 12
750 800 850 900 950 g
Slide 13
600 650 700 750
Quarter
We extend our model to include time. At time n we model the calculated result as follows: κn = τsn + eon = θ + esn + eon Only change from before is that we know we have a new result each quarter. We can calculate control limits for each quarter and plot everything in a
Slide 14
We can calculate control limits for each quarter and plot everything in a diagram: A Shewart Control Chart …
κ1 τ1 θ κ2 τ2 κ3 τ3 κ4 τ4 …
750 800 850 900 950 g
Slide 15
600 650 700 750
Period Observed gain Expected Upper control limit Lower control limit
750 800 850 900 950 g
Slide 16
600 650 700 750
Period Observed gain Expected Upper control limit Lower control limit
Something is wrong! Possible explanations:
deviations).
Slide 17
Slide 18
valuation weight at the start of Quarter n+1
Developed and described by Madsen & Ruby (2000). Principles:
slaughter (typically weekly)
2)
2) Slide 19
remove random noise (sample error + observation error)
Slide 20
Raw data to the left – filtered data to the right Figures from:
changes in the slaughter pig production unit. Computers and Electronics in Agriculture 25, 261-270. Still: Results only available after slaughter
κn = θn + vn , vn ∼ N(0, σv
2)
θn = θn-1 + wn, wn ∼ N(0, σw
2)
Slide 21
θ1 κ1 τ1 θ2 κ2 τ2 θ3 κ3 τ3 θ4 κ4 τ4
Slide 22
Daily gain
700 750 800 850 900 950 g
Slide 23
600 650 700 2 . k v a r t a l 9 7 4 . k v a r t a l 9 7 2 . k v a r t a l 9 8 4 . k v a r t a l 9 8 2 . k v a r t a l 9 9 4 . k v a r t a l 9 9 2 . k v a r t a l 4 . k v a r t a l Quarter
Daily gain
20 40 60 80 100
Slide 24
20 2 . k v a r t a l 9 7 4 . k v a r t a l 9 7 2 . k v a r t a l 9 8 4 . k v a r t a l 9 8 2 . k v a r t a l 9 9 4 . k v a r t a l 9 9 2 . k v a r t a l 4 . k v a r t a l Quarter g
Slide 25
If we wish to analyze the daily gain of a herd you need to:
the precision).
Without professional knowledge you may conclude anything. Without a model you may interpret the results inadequately. Through the structure of the model we apply our professional knowledge to the problem.
Slide 26
knowledge to the problem.
Slide 27
Slide 28
Figure by Teresia Heiskanen
Slide 29
Technique:
Dynamic Linear Model (DLM) embedded. Every week, the average weight and the standard deviation is observed After each observation the parameters of the DLM are opdated using Kalman filtering:
Slide 30
Decisions based on (state space):
Decision: Deliver all pigs with live weight bigger than a threshold Uncertainty of knowledge is directly built into the model through the DLM
Slide 31
rather narrow interval)
insert a new batch of weaners)
Slide 32
insert a new batch of weaners)
Slide 33
Slide 34
Slide 35
2) be the true average
Slide 36
Slide 37
Slide 38
L = 1,00
0,95 1,05 1,15 1 2 3 4 5 6 7 8 9 10 11 12
L= 0,85
0,85 0,95 1,05 1,15 1 2 3 4 5 6 7 8 9 10 11 12
Slide 39
0,85 Sand værdi Lært værdi 0,85 Sand værdi Lært værdi
L = 1,07
0,85 0,95 1,05 1,15 1 2 3 4 5 6 7 8 9 10 11 12 Sand værdi Lært værdi
L = 1,12
0,85 0,95 1,05 1,15 1 2 3 4 5 6 7 8 9 10 11 12
Sand værdi Lært værdi
Spredning = 3
21
Spredning = 11
21
Slide 40
3 6 9 12 15 18 21 1 2 3 4 5 6 7 8 9 10 11 12 Sand værdi Lært værdi 3 6 9 12 15 18 21 1 2 3 4 5 6 7 8 9 10 11 12 Sand værdi Lært værdi