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

 채택된 답변

Guy Rouleau
Guy Rouleau 2011년 12월 2일

0 개 추천

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.

추가 답변 (1개)

Maxime Journot
Maxime Journot 2011년 12월 5일

0 개 추천

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.

카테고리

도움말 센터File Exchange에서 General Applications에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by