How to start a simulation in steady-state ?

Hi everyone,
I have a question regarding how to the start of a simulation in simulink with the steady state signal (voltage in my case) from t=0s.
I have done the power flow initialization as well the steady-state initial state with the help of powergui but I still have a oscillating voltage, power output from the synchronous machine.
Do you have any idea how to get read of this transient ? For instance I'd like to start my simulation at t=0s with the state of t=0.6s
Thanks in advance !
Antoine

 Accepted Answer

Paul
Paul on 11 Sep 2020

1 Comment

Hi Paul,
Thank you so much for your help, it works perfectly as you can see:
The blue curve is a simulation stopping at t=0.01s and the red curve is a second simulation starting off with the operating point of the blue curve at t=0.01s. We can see that the junction is continuous.
Success !!
Thanks again,
Antoine

Sign in to comment.

More Answers (2)

In Configuration Parameters, Data Import/Export, you can check and specify "Initial State".
You can also save "States" for your simulation. Do this first to figure out what are the states and their order and values.
In recent versions, there are "State Reader" and "State Writer" blocks. R2018a may not have it.

8 Comments

Thanks Fangjun Jiang for your answer.
Actually, I also thought about your suggestion by my previous research before to give up and ask here. I downloaded Matlab R2020a on purpose for a tool called Steady-state manager that allows to extract states of the system at a given time using snapshot. Then is is possible to initial the system with the found states values which I did and it automatically import the states in the configuration parameters that you mentionned.
I did this snapshot at t=3s of my computation where delta angle, active and reactive power output and voltage magnitude where constant values. One done I run the simulmation again giving this result:
and
So still not a steady state from t=0s.... Any suggestion ?
Thanks in advance
The methods I mentioned allow you to save/read and set/write state value, not necessarily the "steady state value". "Steady state" means the state values don't change, right? You don't have that in any of the above curves.
Hi again Fangjun Jiang,
I'm very sorry if I don't understand what you explaining, but it seems to me that we are saying the same things. Indeed, from my curves I don't have SS (steady-state) values of the system states at t=0s. That is my problem.
If I undestand well, you advise me to read the states of my system via the state-reader block in order to find their value corresponding to a time at which the system seems to be in SS, and then simulate again using this new found state values as initial state of my system. If I'm correct, this is what I'm doing but using the very pactical steady-state manager which gives me all states values at a chosen time (that I chose corresponding to a SS system t=3s) and allow me to initialize my system with this new found. Yet I obtained the curves I showed you that don't show expected result.
Plus from this description of state-reader block (https://fr.mathworks.com/help/simulink/slref/statereader.html) it seems that I can't use it with Simscape blocks (as I'm working on power system).
Kind Regards
First, in Data Import/Export, check the States as "xout" and set "Format" as "Array"
Then run the simulation for 0.6 seconds
Take the last row of "xout" and save it as "xInitial". This is the state value at t=0.6s.
Next, in Data Import/Export, check "Initial State" and specify "xInitial" as the value.
This is the way "to start my simulation at t=0s with the state of t=0.6s". It is not steady state because at the first simulation, it didn't reach steady state at t=0.6s.
Hi Fangjun,
I have understood you well, and after following your instruction I still don't get satisfying result. I even tried to take the state at t=10s to ensure a real SS. However it didn't work as the following picture can show:
From t=0s to t=0.01s it shows the regular simulation and from t=0.01s to t=0.02s it shows the restart of the simulation with the states value of simulation one at t=0.01s. One can observe that it is not continuous.
However, Paul provided me with usefool function that allow to save operating point. According to mathwork and the link it provided it saves the states value as well as hidden states. And after trying the process with this function, it works:
What I don't understand is that the steady state tool that I used is supposed to do this job but apparently I must have done something !
Anyway, thank you so much for your kind help.
The method that Paul pointed to is only available in later versions. It is certainly more convenient. I decided to try an example. It provded that this long available method worked perfectly. The example model is "f14".
The thing you might have missed is that, if you want to simulate only from 0.01s to 0.02s, you need to make sure that the model input is also the same. You might need to do some shifting on the input signals but the easist way to do this is to set the start time to be 0.1 and the stop time to be 0.2
Hi Fangjun Jiang,
From what I have read in mathwork, your method works perfectly indeed, but is limited in certain cases (including mine) because of specific block type.
This is very well explained here:
Great talking
Regards,
Antoine
Good to know. Thanks!

Sign in to comment.

Tony
Tony on 12 Dec 2025
Edited: Tony on 12 Dec 2025
Dear All,
I am having the same issue you have already solved here, however, the page you linked to your answers does not exist any longer, do you mind sharing the information again?, please
I just want to make my PV system starts from steady state simulation time, in order to avoid the noise you can see in the following graph.

2 Comments

Paul
Paul on 12 Dec 2025
Edited: Paul on 12 Dec 2025
Try starting from Speed Up Simulation Workflows by Using Model Operating Points and the doc pages linked therefrom. More generally, search the Simulink doc for "operating point" to find what's needed.

Sign in to comment.

Products

Release

R2018a

Asked:

on 10 Sep 2020

Edited:

on 12 Dec 2025

Community Treasure Hunt

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

Start Hunting!