Irregularly sampled data as an input to Simulink model
1 view (last 30 days)
Show older comments
I´m quite new to Simulink but I have searched for a solution for a similar problem online but haven found it.
I have measured data which has irregular sampling time that I use as an input to my simulink model from Matlab Workspace. It is meant to be a 20 Hz signal but the period time between the measured values is not always 0.05s. I trying to varify my model so I want to calculate the root mean square error between the model output and the measured data output. However, the output from the Simulink model does not have the same lenght as the input. I.e. it seems like simulink inpterolates the input to make it exactly 20Hz and then runs the simulation and therefore the model output has exacly 20Hz sampling. I would like it to run the simulation for exactly the input I feed into it (the irregularly sampeled data) but it seems like I always have to give the solver a Fixed step size.
(If I put the step size to Fixed out it gives me only a fraction of the measurment points needed and if I put it to Varying step size I get much more data points in the output than the measured output data has).
How would I achieve this? Is this possible?
0 Comments
Answers (0)
See Also
Categories
Find more on Programmatic Model Editing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!