Nonlinear State Estimation with Unscented Kalman Filter - Matlab

I am following the procedure proposed in Nonlinear State Estimation Using Unscented Kalman Filter and Particle Filter - MATLAB & Simulink (mathworks.com) in order to build an UKF, but I obtain a graph where there is no difference between the UKF estimate and the Measurements.
I have additive noise both in the process and in the meaurements. So, as suggested in the provided procedure, I didn't add the noise in the State-Transition function and in the Measurement function, because the additive noise should be provided by default.
The variables involved in the graph are xCorrectedUKF (UKF estimate) and yMeas (Measured), so I think that something went wrong during their definition on in their relationship. However, xCorrectedUKF is only defined in the for loop, so I have only to define yMeas before.
In the solution provided by Mathworks, the Measurements (yMeas) are defined in the following way (it is assumed to be non-additive noise in the example):
rng(1); % Fix the random number generator for reproducible results
yTrue = xTrue(:,1);
yMeas = yTrue .* (1+sqrt(R)*randn(size(yTrue))); % sqrt(R): Standard deviation of noise
Anyway, I don't know how to deal with the definition of yMeas in my case.
How can I write yMeas considering the presence of the additive noise?

Answers (0)

Asked:

on 8 Dec 2020

Commented:

on 8 Dec 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!