Running Simulation in MATLAB 2018b with different sample time
5 views (last 30 days)
Show older comments
I have a *.fmu which runs at a time step of 0.1s and my overall model is running at a time step of 1ms. I have one working solution but looking for suggestions or better possibilities.
I used a rate transition block to convert the signal with a time step of 1 ms to 0.1s but the output response was with steps, then I used a transfer function to smoothen the output. As otherwise you see steps in your in output signal which is obvious.
Yellow is the signal with 1ms and blue is the signal after modifications. Is it possible to avoid these delays in the signal.
Looking forward for amazing ideas and improvements to this solution
0 Comments
Answers (1)
Animesh
on 3 Apr 2023
Hi,
According to my understanding you want to convert a signal with sample time of 1ms to a signal with sample time of 0.1s. This can be done with the help of Rate Transition block. If you want to increase the accuracy of the output by implementing an algorithm like the one provided below.
Connect a delay block and unit delay blocks on either side of the Rate Transition block and set the value of delay length to 100 in delay block and Output port sample time to 0.1 in Rate Transition block.
The output will now be much more accurate than before.
The output of the above implementation is: -
0 Comments
See Also
Categories
Find more on Sources 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!