Main Content

Reduce Model Order

Reduce complexity of linear time-invariant (LTI) models in the Live Editor

Description

TheReduce Model Ordertask lets you interactively compute reduced-order approximations of high-order models while preserving model characteristics that are important to your application. The task automatically generates MATLAB®code for your live script. For more information about Live Editor tasks generally, seeAdd Interactive Tasks to a Live Script

Working with lower order models can simplify analysis and control design. Simpler models are also easier to understand and manipulate. You can reduce a plant model to focus on relevant dynamics before designing a controller for the plant. You can also use model reduction to simplify a full-order controller. For more information about model reduction and when it is useful, seeModel Reduction Basics

To get started, select a model to reduce and a model-reduction method. For each method, the task gives you controls and plots that help you ensure that your reduced model preserves dynamics that are important for your application.

  • Balanced Truncation— Compute a lower order approximation of your model by removing states with relatively small energy contributions.

  • Mode Selection— Select modes by specifying a frequency range of interest.

  • Pole-Zero Simplification— Eliminate canceling or near-canceling pole-zero pairs.

Related Functions

The model-reduction code thatReduce Model Ordergenerates uses the following functions.

Open the Task

To add theReduce Model Ordertask to a live script in the MATLAB Editor:

  • On theLive Editortab, selectTask>Reduce Model Order

  • In a code block in your script, type a relevant keyword, such asreduce,balred, orminreal。SelectReduce Model Order从建议命令完成。

Parameters

Choose the model to reduce. The list of available models includes propertf,ss, orzpkmodels in the MATLAB workspace. The model can be SISO or MIMO, and continuous or discrete.

  • Continuous-time models cannot have time delays. To reduce a continuous-time model with time delays, first usepadeto approximate the time delays as model dynamics.

  • Discrete-time models can have time delays. For theBalanced Truncationreduction method, the task usesabsorbDelayto convert the delay into poles atz= 0 before reducing the model.

Note

Reduce Model Orderassumes that the model time unit (specified in theTimeUnitproperty of the model) is seconds. For theBalanced TruncationandMode Selectionmethods, if your model does not haveTimeUnit = 'seconds', usechgTimeUnitto convert the model to seconds.

For each method, theReduce Model Ordertask gives you controls and plots that help you ensure that your reduced model preserves dynamics that are important for your application.

  • Balanced Truncation— Compute a lower order approximation of your model by removing states with relatively small energy contributions. To use this method, specify the number of states (order) in the reduced model. The Hankel singular-value plot visualizes the relative energy contribution of each state in the original model. The task discards states with lower energy than the state you select in this plot. This method generates code that uses thebalredcommand.

    For discrete-time model that has time delays,Reduce Model OrderusesabsorbDelayto convert the delay into poles atz= 0 before reducing the model by balanced truncation. The additional states are reflected in the response plot and Hankel singular-value plot.

  • Mode Selection— Select modes by specifying a frequency range of interest. The task discards dynamics that fall outside the region you specify on the frequency-response plot. This method generates code that uses thefreqsepcommand.

  • Pole-Zero Simplification— Eliminate canceling or near-canceling pole-zero pairs. The task discards pole-zero pairs that cancel with the threshold specified by theToleranceparameter. Increase the tolerance to discard more states. This method generates code that uses theminrealcommand.

Balanced Truncation Parameters

Specify the number of states in the reduced-order model. You can use any value that falls between the number of unstable states in the model and the number of states in the original model. For more information, seeBalanced Truncation Model Reduction

Match the DC gain of the reduced model to that of the original model. SelectPreserve DC Gainwhen the DC behavior of the model is important in your application. Clear the parameter to get better matching of higher frequency behavior. For more information, seeBalanced Truncation Model Reduction

By default,Reduce Model Orderanalyzes Hankel singular values across all frequencies. Restricting this analysis to a particular frequency range is useful when you know the model has modes outside the region of interest to your particular application. When you apply a frequency limit,Reduce Model Orderdetermines which states are the low-energy states to truncate based on their energy contribution within the specified frequency range only.

To limit the analysis of state contributions to a particular frequency range, checkFrequency range。然后,拖上的垂直光标反应plot to specify the frequency range of interest. Alternatively, enter the minimum and maximum frequencies in the text boxes. The unit israd/s。If your model does not haveTimeUnit = 'seconds', usechgTimeUnitto convert the model to seconds.

Reduce Model Ordershows you a comparison of the frequency responses between the original and reduced models. You can use this plot to monitor the match between the original and reduced-order models while you experiment with model-reduction parameter values. Available comparison plots are:

  • Model response— Frequency response of the original and reduced models, shown as a Bode plot for SISO models and a singular-value plot for MIMO models.

  • Absolute error plot— Singular values ofG-Gr, whereGis the original model andGris the current reduced model. (For SISO models, the singular-value plot is the magnitude of the frequency response.)

  • Relative error plot— Singular values of(G-Gr)/G。This plot is useful when the model has very high or very low gain in the region that is important to your application. In such regions, absolute error can be misleading.

Mode Selection Parameters

Specify the lower and upper bounds of the frequency range in which to preserve dynamics. You can also use the vertical cursors on the response plot to specify the range.Reduce Model Orderdiscards dynamics outside the specified range.

For more information about this method, seeMode-Selection Model Reduction

Reduce Model Ordershows you a comparison of the frequency responses between the original and reduced models. You can use this plot to monitor the match between the original and reduced-order models while you experiment with model-reduction parameter values. Available comparison plots are:

  • Model response— Frequency response of the original and reduced models, shown as a Bode plot for SISO models and a singular-value plot for MIMO models.

  • Absolute error plot— Singular values ofG-Gr, whereGis the original model andGris the current reduced model. (For SISO models, the singular-value plot is the magnitude of the frequency response.)

  • Relative error plot— Singular values of(G-Gr)/G。This plot is useful when the model has very high or very low gain in the region that is important to your application. In such regions, absolute error can be misleading.

Pole-Zero Simplification Parameters

Specify the margin for pole-zero cancellation. Pole-zero pairs that cancel within this tolerance are removed from the reduced model. You can use the slider to change the tolerance and observe the results in a response plot.

Results Parameters

Reduce Model Ordergenerates code that shows the response of the original and reduced systems on the plot type you specify. Available plots include:

  • Step response

  • Impulse response

  • Bode plot

  • Singular value (sigma) plot

  • Pole-zero plot

Version History

Introduced in R2019b

See Also

Functions

Apps