Integrator problem

2 visualizzazioni (ultimi 30 giorni)
Maxime Journot
Maxime Journot il 2 Dic 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

Risposta accettata

Guy Rouleau
Guy Rouleau il 2 Dic 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.

Più risposte (1)

Maxime Journot
Maxime Journot il 5 Dic 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.

Categorie

Scopri di più su Event Functions in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by