Running Simulation in MATLAB 2018b with different sample time
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Animesh
2023-4-3
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!