How do I freeze a Simulation in Simulink, close MATLAB

I would like to run a simulation in Simulink following the below steps:

1. Run the simulation from time 0 to 10s

2. Stop the simulation at time 10s and save all the states and operating points of the simulation at that timestep

3. Close MATLAB

4. Re-open MATLAB/Simulink and then re-run that same model starting from time 10s to 20s and starting from the operating point and states I saved at time 10s. I do not want the model to restart the simulation from time 0 and lose the final simulation state of step 1.

How can the above workflow be achieved?

ANSWER

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

This is an ideal application for a “ModelOperatingPoint” object. The “ModelOperatingPoint” object is a MATLAB object that stores information about the final state of the simulation at a given stop time. For this use case, that stop time is 10 seconds. You can then use the “ModelOperatingPoint” object to run the same model again but this time starting from the time-step and simulation state that was saved at 10 seconds till any new stop time you specify without losing the data that was generated during the initial run.

To get started on “ModelOperatingPoint”, please refer to the following documentation link:

https://www.mathworks.com/help/releases/R2020b/simulink/ug/saving-and-restoring-simulation-operating-point.html

Below are two scripts, executed in sequence, that should execute the above required workflow for the attached example Simulink model called “vdpOperatingPointExample.slx”. The attached model “vdpOperatingPointExample.slx” is a copy of one of the Simulink shipped examples called “vdp” that models the van der Pol equation. More resources on how to programmatically control and simulate the “vdp” shipped example can be found here:

https://www.mathworks.com/help/releases/R2020b/simulink/ug/using-the-sim-command.html

To demonstrate the use of model operating points for saving a model’s operating point and re-starting the simulation from that point, first, download the attached model: “vdpOperatingPointExample.slx”.

Then, in the same MATLAB working directory as the downloaded Simulink model, please execute the below script:

SEE COMPLETE ANSWER CLICK THE LINK

--

--

--

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Gentoo Portage Slot Conflict

Gentoo portage slot conflict bracket

Announcing Coherence CE 21.12

Completing the Ledge Grabbing System

How to use Graphviz in your rust code

SQL Scripts (useful for me anyhow)

Adding Algolia Search to your Flutter Application 🕵🏾‍♂️

ServiceNow bi-directional integration

Day10, CoreProgramming-2

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Technical Source

Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

More from Medium

Why do my UTM WGS84 calculations not match what MATLAB has calculated?

Loops In Python

Tensorflow nan hell

ADN: A Crazy Complicated Deep Learning Network that May Reduce Data Annotation Efforts Needed.