Key Features

  • Parameter estimation from test data
  • Parameter tuning to meet time-domain, frequency-domain, and custom requirements
  • Design exploration and sensitivity analysis
  • Graphical requirement specification and optimization progress monitoring
  • 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 (top, cyan). 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).

Estimation of Model Parameters from Test Data

Simulink Design Optimization™ lets you configure, manipulate, and run parameter estimations. It provides a graphical tool and functions that let 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 data to remove these sources of error. You can:

  • Remove data drift and offset
  • Filter noise and band-limited disturbances
  • Fill in missing values
  • Exclude questionable data and outliers
Use the Parameter Estimation tool for preprocessing data to remove outliers and unwanted trends (top). Exclude outliers and unwanted trends graphically (bottom).

Performing Parameter Estimations

Simulink Design Optimization lets you estimate parameters for Simulink models that include nonlinear effects, multiple sampling rates, and fixed-point calculations. You can estimate multiple parameters at the same time for models built using blocks from Simulink and other related products. These parameters can be scalars, vectors, matrices, or fields of structured variables defined in the MATLAB or Simulink model workspace or in a Simulink data dictionary.

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 performance by setting parameter ranges, or adjusting the optimization algorithm settings, such as convergence tolerances and the number of iterations. You can find a good initial starting point and identify which model parameters you should focus on for the estimation process by using the Sensitivity Analysis tool. To accelerate the parameter estimation process, you can use Parallel Computing Toolbox™ and also enable the Simulink Fast Restart feature. By compiling the model only once and using this version for all subsequent simulations, the Fast Restart feature enables you to improve performance, especially in large and complex models.

Automatically estimate parameters of a DC motor from measured input-output data using Simulink Design Optimization.

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 independently estimate parameters for different sections of your model using various combinations of data sets. You can further refine the parameter-tuning process by using parameter values from previous estimation tasks as initial values for subsequent estimations.

Automatically tune parameters until simulation results match measurement data. Optimization algorithms are used to obtain realistic parameter values for a Simscape Fluids model.

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™.

Use the Parameter Estimation tool (top) to configure, manipulate, and run parameter estimations in Simulink Design Optimization. The parameters being estimated are used in the blocks highlighted in blue in the Simulink engine speed model (bottom).

Comparing and Validating Estimation Results

Simulink Design Optimization helps you determine which model parameter values result in the best fit for the measured data by comparing the measured data with the simulated model outputs. 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 model outputs with validation datasets and check residuals to select the best estimated parameter set.

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. 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 or in a Simulink data dictionary.

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. To improve performance, you can adjust optimization algorithm settings, such as convergence tolerances and number of iterations. Using the Sensitivity Analysis tool, you can explore your design space using techniques such as Monte Carlo simulations, and choose initial guesses for the optimization process.

To accelerate the process by performing the optimization on multiple cores or processors, you can use Parallel Computing Toolbox with Simulink Design Optimization. The Simulink Fast Restart feature allows you to improve performance, especially in large and complex models, by compiling the model only once and using this version for all subsequent simulations.

Tuning Simulink Model Parameters to Meet Time-Domain Requirements

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

  • Enforce upper and lower amplitude bounds
  • Constrain properties such as signal variance and final value
  • Meet step response characteristics
  • Track reference signals
  • Meet custom requirements

These requirements can be edited 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 optimize your model response for multiple design requirements at the same time. During the optimization process, the tool updates the plots for each design requirement so you can visually monitor the requirements and the parameters being tuned in a single window.

Optimize the nonlinear model parameters (top) to meet multiple time-domain objectives (bottom) using the Design Optimization tool. Here, the optimization minimizes the cross-sectional area (design variable Ac) while satisfying time 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 incorporate requirements such as:

  • 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

This enables you to optimize the frequency-domain characteristics of your control system as well as the plant model.

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

Optimizing Time-Domain and Frequency-Domain Responses Simultaneously

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

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 constraints, minimum bandwidth values, 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.

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 design the cross-sectional area of a hydraulic cylinder while limiting the pressure in the cylinder and ensuring the piston position meets the specified step response characteristics.

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

Use custom objectives and frequency-domain optimization to optimize the ride quality of a suspension system.
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.

Accounting for Parameter Variation or Uncertainty

Simulink Design Optimization lets you test and improve the robustness of your design against variations in model parameters using Monte Carlo simulations. You can set the nominal and bounding values for each uncertain parameter in the model and check the effects of these parameter variations on the system response and your design requirements.

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

Simulink Design Optimization enables you to analyze and explore your model’s design space using techniques such as Monte Carlo simulations and design of experiments. This helps you identify which parameters in your model have the greatest impact on a cost function, such as the model output or design requirements.

You can perform global sensitivity analysis to evaluate how changes in model parameters can affect your model’s behavior and also see how these parameters are correlated with the cost functions. Simulink Design Optimization provides you with a graphical tool in which you can:

  • Create sample sets of your model parameters using techniques such as Monte Carlo sampling

  • Define time and frequency domain model requirements as well as custom cost functions

  • Perform graphical and statistical analyses on the relationship between the parameter set and model requirements

  • Simulink Design Optimization provides you with parameter estimation and design optimization capabilities to tune model parameters based on test data or design requirements. If you have a large model with tens or hundreds of parameters, the optimization process may take a long time if you wish to tune the model parameters. Sensitivity analysis helps identify parameters that have the greatest impact on model behavior and, it determines how these parameters are correlated to the requirements. It can also help you find good initial estimates for the optimization process, which can significantly improve performance.

Perform sensitivity analysis to see how the cost function varies with model parameters (top). Compute statistics and create tornado plots (bottom) to determine which parameter has the greatest influence on a cost function.

Creating Sample Sets for Model Parameters

To explore your model’s design space or to perform sensitivity analysis using Simulink Design Optimization, you must first create a sample set describing the model parameter variations. You can create multiple sample sets and use techniques such as design of experiments to select one for analysis. The values for these parameters can be drawn randomly or can be a set of gridded values defined by the user. With Statistics and Machine Learning Toolbox™, you can access Latin hypercube and Copula sampling methods and also create custom probability distributions from which you can draw parameter values.

In the Generate Parameters dialog box, specify the number of samples, the sampling technique, and the probability distribution to draw parameter samples from (left). Visualize these samples in a scatter plot (right).

Defining and Evaluating Cost Functions

A cost function enables you to define a model requirement in terms of the behavior of a signal in the model, or the properties of a linear system obtained from the model. Once your cost function is defined, you can evaluate your parameter set against it to see how the value of the cost function varies across the parameter set. To speed up the performance of this evaluation, you can use Parallel Computing Toolbox and also enable the Simulink Fast Restart option. You can then export the results of this evaluation process to set up a parameter estimation or design optimization session.

Performing Graphical and Statistical Analysis

Once your cost functions have been evaluated against the parameter sample set, you can plot the results to gain insight into the behavior of your model. These plots help you identify trends, such as high cost function values for low values of certain model parameters. For more detailed analysis, you can compute statistics, such as the correlation and partial correlation, to determine the influence of different parameters on the cost functions.

Visualize the computed statistics using a tornado plot. The two cost functions shown (ConcVar and CoolMean) are influenced the most by the parameters A and h.