Simscape integrator is not working properly

조회 수: 2 (최근 30일)
Onur
Onur 2013년 7월 15일
When i was working on a project with simscape (matlab v: r2012b) .ssc files i have realized that the simscape equation for taking an integral of signal like:
x.der == input_signal;
output_signal == x;
is not taking the proper integral. To show this i have decided to use both of the simulink and simscape integrator blocks for the same signal to show there is a problem with the simscape integration
the part of the simulink test blocks:
and the output signals. on the left is the simscape integrator output a constant value 5.3776x10e4. Scope on the right is the simulink output that looks normal:
i have also tried to change solver conf settings or PS/S output signal types and nope nothing change!
  댓글 수: 4
Onur
Onur 2013년 7월 16일
i have uploaded a simplified version of simulation: https://docs.google.com/file/d/0B43Q5kQ4IopsTEx6ODFoZUpaZGM/edit
Still have the same weird output
Onur
Onur 2013년 7월 16일
ok i solve the problem. In the solver configuration box, the start simulation from steady state option should be unchecked. regards to the note in the help:
  • Note If the simulation fails at or near the start time when you use the Start simulation from steady state option,try clearing the check box and simulating with the default initialconditions computation only.
But what if my simulation needs a "steady state start" ?? (and so do i).

댓글을 달려면 로그인하십시오.

채택된 답변

Ryan G
Ryan G 2013년 7월 16일
From this page:
Finding an Initial Steady State When you select the Start simulation from steady state check box, the solver attempts to find the steady state that would result if the inputs to the system were held constant for a long enough time, starting from the initial state obtained from the initial conditions computation just described. If the steady-state solve succeeds, the state found is some steady state (within tolerance), but not necessarily the state expected from the given initial conditions. Steady state means that the system variables are no longer changing with time. Simulation then starts from this steady state.
So what's happening is, with simscape, the solver is grouping that integrator with the physical system. When that box is checked it's 'running' the simulation for a long time and determining the initial condition of the integrator based on that result, overriding the initial condition you input.
Simulink is not part of the 'physical system' and as a result is not effected by what the solver config is doing.
Steady-state for the integrator would mean that dx/dt of the state is 0. This can only happen once the input to the integrator is 0. If this condition does not occur with your current setup, then you cannot achieve steady state for this particular block. That is why the value is so large. One way to test this is to manually run the simulation for a long time, does it reach steady state? If not you need to modify parameters that would allow it to achieve this. If you have Simulink Control Design, you can use the linearization tool to find a trim (steady state) condition.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by