Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mark Song
particles
Commits
ee6eaa84
Commit
ee6eaa84
authored
Jun 08, 2018
by
Frédéric Karamé
Browse files
Add the possibility of proposal approximated with Monte Carlo.
parent
427e88e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/gaussian_filter_bank.m
View file @
ee6eaa84
...
...
@@ -71,7 +71,11 @@ if isempty(init_flag2)
init_flag2
=
1
;
end
if
ParticleOptions
.
proposal_approximation
.
cubature
||
ParticleOptions
.
proposal_approximation
.
montecarlo
if
ParticleOptions
.
proposal_approximation
.
montecarlo
nodes
=
randn
(
ParticleOptions
.
number_of_particles
,
number_of_state_variables
+
number_of_structural_innovations
)
;
weights
=
1
/
ParticleOptions
.
number_of_particles
;
weights_c
=
weights
;
elseif
ParticleOptions
.
proposal_approximation
.
cubature
[
nodes
,
weights
]
=
spherical_radial_sigma_points
(
number_of_state_variables
+
number_of_structural_innovations
)
;
weights_c
=
weights
;
elseif
ParticleOptions
.
proposal_approximation
.
unscented
...
...
@@ -118,5 +122,5 @@ else
StateVectorMean
=
PredictedStateMean
+
KalmanFilterGain
*
PredictionError
;
StateVectorVariance
=
PredictedStateVariance
-
KalmanFilterGain
*
PredictedObservedVariance
*
KalmanFilterGain
'
;
StateVectorVariance
=
.
5
*
(
StateVectorVariance
+
StateVectorVariance
'
);
StateVectorVarianceSquareRoot
=
chol
(
StateVectorVariance
)
'; %reduced_rank_cholesky(StateVectorVariance)'
;
end
\ No newline at end of file
StateVectorVarianceSquareRoot
=
reduced_rank_cholesky
(
StateVectorVariance
)
'
;
end
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment