Rate Transition Data Control

2 visualizaciones (últimos 30 días)
Fawad Farooq Ashraf
Fawad Farooq Ashraf el 6 de Jun. de 2023
Respondida: Joel Van Sickel el 7 de Jun. de 2023
I'm implementing an Extended Kalman Filter on SIMULINK for sensor fusion. I have Accelerometer, Gyroscope, GPS and a magnetometer. Accelerometer and Gyroscope are giving data at a high rate i.e., at 10 msec whereas GPS and magnetometer are giving outputs at 100 msec.
To handle this sampling rate, I have used rate transition blocks as shown in figure below.
I was expecting that in the EKF block, GPS data would be empty for the time steps that come in between 100 msec, but I see that it is holding the value at the previous time step of 100 msec. How can I handle this? I want GPS/Magnetometer output at 100, 200, 300, ... and so on and they should be empty at 110, 120, 130 etc

Respuestas (1)

Joel Van Sickel
Joel Van Sickel el 7 de Jun. de 2023
Simulink signals don't support an 'empty' value. They will simply stay at whatever value they were at previously. This is the same behavior you would see in a variable if you updated it at a slower rate than a different variable by writing code by hand. If you want, you can set their values to 0 for other moments, but that would require you to leave them at a faster rate and require much more logic to write a value of 0 anytime you aren't at an interval of 100 msec. This is the concept of a zero order hold and it does not prevent you from using a kalman filter.

Etiquetas

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by