Running Simulation in MATLAB 2018b with different sample time

3 visualizaciones (últimos 30 días)
Ankit
Ankit el 15 de Mzo. de 2023
Respondida: Animesh el 3 de Abr. de 2023
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

Respuestas (1)

Animesh
Animesh el 3 de Abr. de 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: -

Categorías

Más información sobre Simulink en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by