Optimizing system using Simulink Design Optimization 

 August 8, 2020

By  Edward Rodriguez


Let's imagine that you want a system to be controlled. Therefore, you go to Simulink, you build the model, you simulate it, you compare the response obtained in simulation with your real measured data, and you see that they do not match, what happened? Are you sure that you have found the correct parameters for your model? No? Don't worry about it, with Simulink Design Optimization it is straight forward to discover this, you will only need actual measured data from your system, and then we will see how to estimate the parameters of your model. Actually, if you want more, we could use the same toolbox to get a proper response from the system according to your requirements.

Simulink Design Optimization is an exciting toolbox since it allows you to use some optimization methods to minimize a cost function. This toolbox is commonly used for dynamical systems, as seen in control systems. It can help you in improving your system response and estimate the parameters of your model. On this blog, the most important features of Simulink Design Optimization will be covered to give you a complete insight. Two important topics which will be discussed here:

  • Parameter estimation
  • Response optimization

First, we will use Parameter estimator app to match the response of a simulated model in Simulink comparing its response with real measured data, we will see that some previous steps will need to be done until estimate the model parameters like do preprocessing data.

Then, for the other approach, we are using the Response optimizer app to get a proper system response for some user-given requirements, there will be different ways to do this, and we will see the main ones.

Note: You must have Simulink Design Optimization Toolbox installed in your MATLAB. To check if it is present, use >>ver in MATLAB Command Window and locate this toolbox.

Simulink Design Optimization for parameter estimation

Simulink design optimization allows us to find some parameters of our model if they are missed or even give us an insight into possible parameter values according to the system's response (measured data). Next, we will introduce the model that we are using for parameter estimation.


In this case, we have chosen a MATLAB built-in model: Engine Throttle model. The throttle system controls the flow of air and fuel mixture to the engine cylinders. There is a butterfly valve that opens when a driver presses the accelerator pedal. Opening this valve and depending on how the valve opens the engine speed will increase or decrease.

Simulink Design Optomization

As you see, there are two subsystems:

Motor subsystem

Throttle subsystem

Preprocessing data

Comparing real data vs simulated data

Extract Data

Replacing outliers

Filtering data

Estimating parameters

Validating parameters

Simulink Design Optimization for Response Estimation

Now, we are exploring some approaches that could be used for response estimation.

Using time-domain specifications

We are using a MATLAB built-in model: watertank_stepinput, so you can open or create this model from the command window.

Simulink Design Optimization

The Water-Tank system is given by:

A \dot{H}=b V-a\sqrt(H)

  • A= cross-sectional area
  • b= flow rate constant
  • a= flow rate constant
  • H= height of the water in the tank
  • V= voltage applied to the pump

This is a nonlinear model with single-input and single-output (SISO), where the height of the water is the output. We are starting with adding the model parameter values:

Go to the model workspace and add the model values:

Simulink Design Optimization

Now, there are different forms to specify the time-domain requirement, let's use the most friendly one! We are using Check Step Response Characteristics block, only be sure that this block is connected to the system output.

Simulink Design Optimization

And add your time-domain requirements:

Simulink Design Optimization

Now click on Ok and open response optimizer app

Simulink Design Optimization

Click on plot model response

Simulink Design Optimization

Black lines show the boundary constraints for time-domain requirements (settling time, rise time, so on) so, when optimization finishes, the model response should accomplish these boundaries.

Now it is time to select the parameters of the controller to obtain the desired response. Select Ki and Kp.

Simulink Design Optimization

Next step is to click on optimize, and finally, the result is shown:

Simulink Design Optimization

The final response (blue) met all the requirements, and Kp and Ki values are updated!

Specifying a tracking signal

The optimized response is:
Simulink Design Optimization


Simulink Design Optimization is an excellent tool if you are looking for how to estimate parameters of a model, you can both estimate and validate the obtained parameters, and this will help you to notice if there is any overfitting or underfitting as well. On the other side, you can use the estimating Parameter not only for your model but also to find your best controllers for any requirements and even if you need to track some user-defined reference.

Did you find some helpful content from our video or article and now looking for its code, model, or application? You can purchase the specific Title, if available, and instantly get the download link.

Thank you for reading this blog. Do share this blog if you found it helpful. If you have any queries, post them in the comments or contact us by emailing your questions to [email protected]. Follow us on LinkedIn Facebook, and Subscribe to our YouTube Channel. If you find any bug or error on this or any other page on our website, please inform us & we will correct it.

If you are looking for free help, you can post your comment below & wait for any community member to respond, which is not guaranteed. You can book Expert Help, a paid service, and get assistance in your requirement. If your timeline allows, we recommend you book the Research Assistance plan. If you want to get trained in MATLAB or Simulink, you may join one of our training modules. 

If you are ready for the paid service, share your requirement with necessary attachments & inform us about any Service preference along with the timeline. Once evaluated, we will revert to you with more details and the next suggested step.

Education is our future. MATLAB is our feature. Happy MATLABing!

About the author 

Edward Rodriguez

My Name is Edward Rodriguez, I am 22 years old and I am from Cúcuta, Colombia (not Columbia). I studied Electronics Engineering at the Industrial of Santander University (UIS) in Bucaramanga, Colombia. I like listening to Salsa music and playing soccer in my free time!!!

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Connect with MATLAB Helper ®

Follow: YouTube Channel, LinkedIn Company, Facebook Page, Instagram Page

Join Community of MATLAB Enthusiasts: Facebook Group, Telegram, LinkedIn Group

Use Website Chat or WhatsApp at +91-8104622179