Documentation

Control Design in Simulink

Specify time- and frequency-domain requirements, tune controller parameters such as PID gains

Graphical Tools

Response Optimization ToolOptimize model response to satisfy design requirements, test model robustness

Blocks

Check Against ReferenceCheck that model signal tracks reference signal during simulation
Check Custom BoundsCheck that signal satisfies upper and lower bounds during simulation
Check Step Response CharacteristicsCheck that model signal satisfies step response bounds during simulation

Functions

Create Simulation Scenario

sdo.SimulationTestSimulation scenario description

Specify Time-Domain Requirements

sdo.requirements.SignalBoundPiecewise-linear amplitude bound
sdo.requirements.SignalTrackingReference signal to track
sdo.requirements.StepResponseEnvelopeStep response bound on signal
sdo.requirements.PhasePlaneEllipseImpose elliptic bound on phase plane trajectory of two signals
sdo.requirements.PhasePlaneRegionImpose region bound on phase plane trajectory of two signals

Specify Variable Requirements

sdo.requirements.FunctionMatchingImpose function matching constraint on variable
sdo.requirements.MonotonicVariableImpose monotonic constraint on variable
sdo.requirements.RelationalConstraintImpose relational constraint on pair of variables
sdo.requirements.SmoothnessConstraintImpose bounds on gradient magnitude of variable

Specify Frequency-Domain Requirements

sdo.requirements.BodeMagnitudeBode magnitude bound
sdo.requirements.ClosedLoopPeakGain Closed loop peak gain bound
sdo.requirements.GainPhaseMarginGain and phase margin bounds
sdo.requirements.OpenLoopGainPhaseNichols response bound
sdo.requirements.PZDampingRatioDamping ratio bound
sdo.requirements.PZNaturalFrequencyNatural frequency bound
sdo.requirements.PZSettlingTimeSettling time bound
sdo.requirements.SingularValueSingular value bound
sdo.optimizeDesign optimization problem solution
sdo.OptimizeOptionsOptimization options
sdo.getParameterFromModelDesign variable for optimization
sdo.setValueInModelSet design variable value in model
sdo.getValueFromModelGet design variable value from model
sdo.getModelDependenciesList of model file and path dependencies
sdoupdateUpdate model containing Signal Constraint block
getboundsGet bounds specified in Check block
sdo.setCheckBlockEnabledEnable or disable all check blocks in model

Topics

Optimization Basics

How the Optimization Algorithm Formulates Minimization Problems

When you optimize parameters of a Simulink® model to meet design requirements, Simulink Design Optimization™ software automatically converts the requirements into a constrained optimization problem and then solves the problem using optimization techniques.

Design Optimization to Meet Step Response Requirements (GUI)

Optimize controller parameters using the Response Optimization tool.

Design Optimization to Track Reference Signal (GUI)

Optimize parameters without adding Signal Constraint blocks to the model.

Design Optimization to Meet Frequency-Domain Requirements (GUI)

This example shows how to tune model parameters to meet frequency-domain requirements using the Response Optimization tool.

Design Optimization to Meet Frequency-Domain Requirements (Code)

This example shows how to tune model parameters to meet frequency-domain requirements, using the sdo.optimize command.

Design Optimization Using Frequency-Domain Check Blocks (GUI)

Optimize model parameters to meet frequency-domain design requirements using the Response Optimization tool.

Design Optimization to Meet Time- and Frequency-Domain Requirements (GUI)

This example shows how to tune a controller to satisfy time- and frequency-domain design requirements using the Response Optimization tool.

Design Optimization to Meet Step Response Requirements (Code)

Optimize controller parameters at the command line.

Write a Cost Function

Write a cost function for parameter estimation, response optimization, or sensitivity analysis. The cost function evaluates your design requirements using design variable values.

Design Requirements

Supported Design Requirements

Time- and frequency-domain requirements.

Specify Time-Domain Design Requirements in the Tool

Specify time-domain requirements such as lower and upper amplitude bounds, step response bounds, reference signals, elliptical bounds, and custom bounds.

Specify Variable Requirements in the Tool

Specify monotonic, smoothness, and relational constraints on variables in your model.

Specify Frequency-Domain Design Requirements in the Tool

Specify frequency-domain requirements, such as gain and phase margin bounds, closed-loop peak response bounds, step-response bounds, and custom bounds.

Speed Up Optimization

Skip Model Simulation Based on Parameter Constraint Violation (GUI)

This example shows how to optimize a design and specify parameter-only constraints that prevent the model from being evaluated in an invalid solution space.

Speed Up Response Optimization Using Parallel Computing

Scenarios when you can speed up optimization using parallel computing, and how the speedup happens.

Use Parallel Computing for Response Optimization

Use parallel computing for response optimization in the tool, or at the command line.

Use Fast Restart Mode During Response Optimization

This topic shows how to speed up response optimization using Simulink fast restart.

Use Accelerator Mode During Simulations

Simulink Design Optimization software supports Normal and Accelerator simulation modes.

Response Optimization Tool Tasks

Specify Design Variables

This topic shows how to specify design variables for optimization.

Specify Signals to Log

Specify signals to log in the Response Optimization tool.

Create Linearization I/O Sets

Create linearization input/output sets in the Response Optimization tool or Sensitivity Analysis tool.

Compare Requirements and Design Variables Using Spider Plot

This example shows how to use a spider plot to compare requirement evaluations before and after optimizing the response.

Code Generation

Generate MATLAB Code for Design Optimization Problems (GUI)

This example shows how to automatically generate a MATLAB function to solve a Design Optimization problem.

Troubleshooting

Optimization Does Not Make Progress

What to do if the optimization stalls or no changes are seen in parameters values.

Optimization Convergence

What to do if the optimization does not satisfy design requirements or takes a long time to converge near a solution, or if the system response becomes unstable.

Optimization Speed and Parallel Computing

What to do if no speedup is seen with parallel computing, if the results are different, or if the optimization stalls.

Undesirable Parameter Values

What to do if optimization gives undesirable parameter values or violates bounds on values.

Reverting to Initial Parameter Values

How to quit optimizing and revert to original values.

Was this topic helpful?