Simulink Design Optimization

Key Features

  • Model parameter estimation from test data
  • Simultaneous optimization of time-domain and frequency-domain responses of Simulink models (with Simulink Control Design™)
  • Graphical specification of response requirements and visual monitoring of the optimization progress
  • Optimization of parameters to meet requirements specified by Model Verification blocks
  • Custom constraints and cost functions for response optimization
  • Scripting interface for programmatic specification of design optimization problems
  • Robust design optimization, accounting for parameter variation or uncertainty
Using Simulink Design Optimization with measured data for parameter estimation of Transfer Fcn and Mean Speed blocks.
Using Simulink Design Optimization with measured data for parameter estimation of Transfer Fcn and Mean Speed blocks (top, red). You can assess the results of the estimation by comparing plots of measured versus simulated data before the estimation (bottom left) and after the estimation (bottom right).

Estimating Model Parameters from Test Data

Simulink Design Optimization lets you configure, manipulate, and run parameter estimations. It provides a graphical tool that lets you:

  • Import and preprocess measured data
  • Perform parameter estimations
  • Compare and validate estimation results

Importing and Preprocessing Data

Simulink Design Optimization can use measured input-output data from hardware to estimate and validate the parameters of a Simulink model. The product lets you import measured data from the MATLAB® workspace, as well as from MATLAB, Microsoft® Excel®,ASCII, and CSV files. Measured data often has offsets, outliers, missing values, and other anomalies that can lead to inaccurate parameter estimation.Simulink Design Optimization lets you preprocess your measured data to remove these sources of error. You can:

  • Detrend to remove data drift and offset
  • Filter noise and band-limited disturbances
  • Interpolate to fill in missing values
  • Exclude questionable data
Dialog box for preprocessing data in Simulink Design Optimization to remove outliers and unwanted trends.
Dialog box for preprocessing data in Simulink Design Optimization to remove outliers and unwanted trends. You can exclude outliers and unwanted trends graphically (inset) or by using exclusion rules.

Performing Parameter Estimations

Simulink Design Optimization lets you estimate parameters for Simulink models that include nonlinear effects, multiple sampling rates, and fixed-point calculations. Models built using any blocks from Simulink and related products are supported.

You can estimate multiple model parameters at the same time. The parameters can be scalars, vectors, matrices, or fields of structured variables defined in the MATLAB or Simulink model workspace. For each parameter, you can specify minimum and maximum values that are not to be exceeded during estimation.

Simulink Design Optimization provides a variety of optimization algorithms that can be used for parameter estimation, including gradient descent, nonlinear least squares, simplex search, and, with Global Optimization Toolbox, pattern search. You can fine-tune optimization performance by adjusting optimization algorithm settings, such as convergence tolerances and number of iterations. You can accelerate the parameter estimation process using Simulink Design Optimization with Parallel Computing Toolbox™.

Estimating DC Motor Parameters from Test Data 8:00
Use optimization algorithms to automatically estimate DC motor parameter values from transient test data.

Simulink Design Optimization lets you set up and maintain multiple estimation tasks. For each task, you can specify the model parameters and initial conditions to estimate and the measured data to use. This approach lets you estimate parameters for one section of your model using one combination of data sets and independently estimate parameters for other model sections using different combinations of data sets. You can refine the parameter-tuning process by using parameter values from previous estimation tasks as initial values for subsequent estimations or by setting ranges for estimated parameters.

Estimating the Parameters of a Hydraulic System 3:22
Automatically tune parameters until simulation results match measurement data. Optimization algorithms are used to obtain realistic parameter values for a hydraulic system.

In addition to estimating model parameters, Simulink Design Optimization estimates static lookup table values and provides a Simulink block for implementing adaptive lookup tables. You can connect your adaptive lookup table directly to a physical system by compiling your Simulink model and implementing the code using an appropriate host, such as Simulink Real-Time™.

Control and Estimation Tools Manager for configuring, manipulating, and running parameter estimations in Simulink Design Optimization.
Control and Estimation Tools Manager for configuring, manipulating, and running parameter estimations in Simulink Design Optimization. Parameters with check marks have been selected for estimation.

Comparing and Validating Estimation Results

Simulink Design Optimization can generate comparative plots of estimation results to help you determine which model parameter values result in the best model and measured data fit. Plots include views of parameter sensitivity, measured versus simulated model outputs, and residual values.

Validation involves comparing the model output with an independent set of measured data to determine whether the calibrated model accurately captures the system dynamics. Simulink Design Optimization lets you compare multiple model outputs against the validation data set to select the best estimation and parameter sets.

Optimizing Simulink Model Responses

With Simulink Design Optimization, you can tune Simulink model parameters to meet time-domain requirements, frequency-domain requirements, or both simultaneously. Using the Design Optimization tool in Simulink Design Optimization, you can add and edit design requirements graphically or by entering tabular data, and then run the optimization. The graphical tool also lets you monitor optimization progress. It shows plots for each requirement as well as the optimization status in a single view.

As with parameter estimation, you can simultaneously optimize multiple model parameters, including scalars, vectors, matrices, or fields of structured variables defined in the MATLAB or Simulink model workspace. You can also specify minimum and maximum values for each parameter.

You can choose from a variety of optimization algorithms, such as gradient descent, nonlinear least squares, simplex search, and, with Global Optimization Toolbox, pattern search. You can adjust optimization algorithm settings, such as convergence tolerances and number of iterations, to improve optimization performance. To accelerate the process by performing the optimization on multiple cores or processors, you can use Parallel Computing Toolbox with Simulink Design Optimization.

Tuning Simulink Model Parameters to Meet Time-Domain Requirements

You can add a new time-domain design requirement by selecting a requirement type and specifying the model signals to use for evaluating the requirement. Simulink Design Optimization lets you specify time-domain design requirements on a signal by:

  • Enforcing upper and lower amplitude bounds
  • Specifying step response characteristics
  • Tracking a reference signal
  • Specifying a custom signal requirement

You can edit requirements graphically or by entering numeric values. For example, to edit a step response envelope requirement, you can graphically adjust the bounds or enter values for rise time, overshoot, settling time, and other parameters that define step response characteristics.

You can set up the optimization to meet time-domain design requirements directly from the graphical tool, without adding any blocks to the model. You can also use several design requirements simultaneously to optimize multiple design criteria.

During the optimization, the product updates the plots for each design requirement so you can visually monitor optimization progress in one window.

Nonlinear model for which parameters are optimized using the Design Optimization tool to meet several time domain requirements simultaneously.
Nonlinear model (top) for which parameters are optimized using the Design Optimization tool (bottom) to meet several time-domain objectives (orange box) simultaneously. Optimization minimizes the cross-sectional area (design variable AC), while satisfying constraints on pressure and piston position.

Tuning Simulink Model Parameters to Meet Frequency-Domain Requirements

For frequency-domain optimization, you can use Simulink Design Optimization with Simulink Control Design to linearize a Simulink model and use the resulting linear model to evaluate the following requirements:

  • Frequency-dependent upper and lower magnitude bounds
  • Gain and phase margin bounds
  • Natural frequency and damping ratio bounds
  • Bounds on the magnitude of the system’s singular values

You can optimize not only the frequency-domain characteristics of the control system, but also the frequency response of the plant model.

Simulink model with a rectifier filter, for which parameters R (resistance), L (inductance), and C (capacitance) are optimized using the graphical tool to meet frequency-domain requirements.
Simulink model with a rectifier filter (top, red block), for which parameters R (resistance), L (inductance), and C (capacitance) are optimized using the graphical tool (bottom) to meet frequency-domain requirements.

Optimizing Time-Domain and Frequency-Domain Responses Simultaneously

Simulink Design Optimization lets you manage tradeoffs among requirements, such as stability, robustness, and performance, as you fine-tune your design.

Optimizing a Flight Control System 4:53
Optimize the parameters of a flight control system to simultaneously meet time-domain and frequency-domain design requirements.

You can specify a variety of time-domain and frequency-domain requirements to optimize system performance. Typical requirements include gain and phase margins, damping ratio, minimum bandwidth, high-frequency rolloff, and constraints on the step or impulse responses. You can optimize the poles, zeros, and gains of your compensators, or directly tune the parameters of the corresponding blocks in Simulink. Plots comparing the current response with your design requirements help you monitor progress while the optimization runs.

Meeting Requirements Specified by Model Verification Blocks

Simulink Design Optimization supports the optimization of model parameters to meet design requirements specified by Model Verification blocks in the Simulink, Simulink Control Design, and Simulink Design Optimization block libraries.

Model Verification blocks enable you to verify that your design meets time-domain and frequency-domain requirements such as time-dependent upper and lower bounds on signal value, frequency-dependent Bode plot magnitude constraints, step response bounds, and gain and phase margins. Model Verification blocks detect requirement violations. You can configure the blocks to stop the simulation when a violation is detected or log the event for further analysis.

You can use Simulink Design Optimization to automatically tune model parameters to ensure that all design requirements specified by Model Verification blocks are met.

Model Verification block libraries in Simulink Design Optimization and Simulink Control Design.
Model Verification block libraries in Simulink Design Optimization (top) and Simulink Control Design (bottom).

Using Custom Constraints and Cost Functions

Simulink Design Optimization lets you specify custom constraints and cost functions for optimizing the parameters of your Simulink model. For example, you can minimize the cross-sectional area of a hydraulic cylinder, while ensuring that pressures in the cylinder do not exceed a predetermined limit and that the cylinder piston position meets specified step response characteristics.

Specifying a custom requirement function in Simulink Design Optimization.
Specifying a custom requirement function in Simulink Design Optimization (left). The objective of this function (right) is to minimize the cross-sectional area of a hydraulic cylinder.

Custom requirements can be specified as an objective to be minimized, an equality constraint, or an inequality constraint. Custom requirements can be specified in both time domains and frequency domains. You can also include statistical properties in custom requirements. For example, you can optimize automotive suspension damping to minimize the mean value of suspension displacement for normal passenger weight distribution.

Optimizing Suspension System Performance 6:41
Use custom objectives and frequency-domain optimization to optimize the ride quality of a suspension system.

Programmatically Specifying Response Optimization Problems

In addition to providing a graphical tool for setting up and solving parameter optimization problems, Simulink Design Optimization lets you formulate and solve optimization problems programmatically. Using this approach, you can:

  • Specify the model parameters to be optimized
  • Specify the model signals to be logged from simulations
  • Specify standard objectives (such as step response characteristics)
  • Specify custom cost and constraint functions
  • Use sensitivity analysis to obtain a subset of the most sensitive parameters
  • Set optimization options
  • Run optimizations
  • Update model parameters with optimization results

You can create scripts for documenting your work and running optimizations in batch mode.

Script for specifying an optimization problem programmatically.
Script for specifying an optimization problem programmatically. The function evaluates a custom objective to be minimized during optimization, specifically the total energy for the piston position actuator.

Accounting for Parameter Variation or Uncertainty

Simulink Design Optimization lets you test the robustness of your design against variations in model parameters. You can use Monte Carlo simulations to improve the robustness of designs involving uncertain parameters. Simulink Design Optimization lets you set nominal and bounding values for each uncertain parameter in the model.

Using Simulink Design Optimization, you can check the effects of parameter variations and uncertainty on system response and account for these effects during optimization.

Tuning the parameters associated with a PID Controller block in the presence of parameter uncertainty in a Plant block.
Tuning the parameters associated with a PID Controller block (top, blue) in the presence of parameter uncertainty (bottom left) in a Plant block (top, pink). The step response and reference tracking plots (bottom right) show nominal response (solid blue line) and response with uncertainty (dashed blue lines).

Try Simulink Design Optimization

Get trial software

PID Control Made Easy

View webinar