Guy on Simulink

Simulink & Model-Based Design

Automatically Improving Model Performance

Since I joined the technical support department at MathWorks, one of the questions I received the most often is:

Can you make my model go faster?

Over the years I gained experience with model performance and I now have a list of things in my head that I know can help.

Some of us tried to share what we have learned in different ways. A couple years ago I wrote this post about tips for simulation performance, and Seth recently published this article about improving simulation performance.

The Dream

For a long time, many people at MathWorks have been dreaming of a tool that could incorporate all the tips and tricks users have developed to automatically tune model settings and provide advice for maximum performance.

I am pleased to introduce the Performance Advisor.

With the Simulink Performance Advisor, you will be able to focus on your modeling work, instead of reading about performance improvement tips.

Starting the Performance Advisor

You can start the performance advisor for your model using the command performanceadvisor('modelName') or from the Analysis menu:

Launching the Performance Advisor

When the window opens, you will probably get a familiar feeling since the Performance Advisor is built on the Model Advisor engine.

Performance Advisor

Creating a Baseline

To measure the performance of your model, we first need a baseline. The baseline consists of the signals marked for logging and the time it takes to simulate the model.

With this information, we will be able to verify if the simulation takes less time to run, and if the changes suggested by the advisor affect the results.

Running the checks

For each check, you can decide if the advisor recommendations are applied automatically or manually. You can also decide if a check needs to be validated or not.

Performance Advisor Checks

If you decide to take actions manually for a check, the advisor will show you the list of things it verified and proposed actions. When possible, the advisor will offer you a Modify All button to apply the recommendations:

Performance Advisor Checks

Future

R2012b is the first version of the Performance Advisor. We are planning to add more and more checks every release. We are also thinking about giving users the ability to write their own tests.

Now it's your turn

I would be very happy to hear what kind of features you expect from a performance advisor and if you have suggestions for specific checks.

Please give it a try and let us know what you think by leaving a comment here.

|
  • print

Comments

To leave a comment, please click here to sign in to your MathWorks Account or create a new one.