How can I simulate an electric circuit to show the steady-state response in Simscape Electrical R2022b?

1 view (last 30 days)
I have an RC (resistor-capacitor) electric circuit with a rectangular pulse as a voltage supply. I intend to observe the voltage in the resistor, but I only want to get the response in the steady-state time, i.e., without the transient response. I checked the option “Start simulation from steady state” in the "Solver Configuration" block that the model includes. However, the transients are still shown. In fact, I observed that selecting or deselecting the option “Start simulation from steady state” has no effect on removing the transients from the results displayed in the "Scope" block I used to observe the voltage in the resistor.
How can I setup and simulate an electric circuit to show the steady-state response in Simscape Electrical R2022b?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 11 Aug 2023
This behavior in the simulation result showing the transient is expected for the settings applied in the “Solver Configuration” block and the given voltage supply. The option “Start simulation from steady state” in the “Solver Configuration” block will only work if the voltage source is a sinusoid or a constant value. This explains why the simulation result displayed in the “Scope” block doesn’t change with or without the “Start simulation from steady state” checked. More information about the estimation of the steady-state time is provided in the following documentation page:
To simulate the circuit from the steady state time, operating points are recommended. Operating points obtained from an initial simulation determines the steady state time from its results, and can be used to set the second simulation which suppresses the display of the transient response. The link below points to the documentation page describing the use of operating points in Simscape.
The following steps allow to simulate a circuit from steady state:
  1. Have your Simulink model open. The variable “bdroot” will call its file name.
  2. Set the stop time by estimation, ensuring that this stop time will include the steady state.
  3. Create an operating point with the function “simscape.op.create”.
  4. Configure your Simulink model to enable usage of operating points.
  5. Configure your Simulink model to setup the operating point defined in Step 3.
These steps are coded below as a reference, considering that the Simulink model is open, so it can be called through the command "bdroot".
stopTime = 10;
sim(bdroot,[0 stopTime]);
op = simscape.op.create(simlog, stopTime);
set_param(bdroot,'SimscapeUseOperatingPoints','on');
set_param(bdroot,'SimscapeOperatingPoint','op');

More Answers (0)

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!