Integrator problem

3 Ansichten (letzte 30 Tage)
Maxime Journot
Maxime Journot am 2 Dez. 2011
Hello,
My question is about Simulink. I designed two systems: - 1. The first system computes an output A which is continuously integrated. The result is stored in B.
- 2. The second system takes A as an entry ("from workspace" block). A is continuously integrated. The result is stored in B2.
I used the same solver (ode4), same time step (4Hz), same initial conditions (0) for the integrator in system 1 and 2. Therefore B and B2 should be strictly equal...but there are differences (up to 10%) between them and I don't understand why. Any idea?
MJ

Akzeptierte Antwort

Guy Rouleau
Guy Rouleau am 2 Dez. 2011
This is probably because the input signal is different during minor steps. You can confirm that by trying:
- Try ode1 solver. This solver doe snot have minor time steps and should not be affected by that
- Try my central submissin "Minor Time Step Logging". This will allow you to observe the phenomenon.
To make the results match, you can try:
- Verify if the From Workspace is configured to interpolate or not. - Verify the sample time of all blocks in your model. Enable sample time colors. For a continuous system, everything should be black. Grey or Red can lead to the behavior you describe. - Note that minor time steps cannot be logged. Consequently when logging a continuous signal and reloading it, you loose information.

Weitere Antworten (1)

Maxime Journot
Maxime Journot am 5 Dez. 2011
Thanks a lot Mr Rouleau. I suspected the minor time steps of the RK4 but had no mean to monitor them. I used your "Minor Time Step Logging" Simulink block and the cause of the problem appeared obvious.

Kategorien

Mehr zu Event Functions finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by