Balanced truncation computes a lower-order approximation of your model by neglecting
states that have relatively low effect on the overall model response. Using a
lower-order approximation that preserves the dynamics of interest can simplify analysis
and control design. In the balanced truncation method of model reduction, the software
measures state contributions by Hankel singular values (see
hsvd) and discards states with smaller values. You can compute a
reduced-order model by balanced truncation:
For more general information about model reduction, see Model Reduction Basics.
Model Reducer provides an interactive tool for performing model reduction and examining and comparing the responses of the original and reduced-order models. To approximate a model by balanced truncation in Model Reducer:
Open the app, and import an LTI model to reduce. For instance, suppose
that there is a model named
build in the MATLAB® workspace. The following command opens Model
Reducer and imports the model.
In the Data Browser, select the model to reduce. Click Balanced Truncation.
In the Balanced Truncation tab, Model Reducer displays a plot of the frequency response of the original model and a reduced version of the model. The frequency response is a Bode plot for SISO models, and a singular-value plot for MIMO models. The app also displays a Hankel singular-value plot of the original model.
The Hankel singular-value plot shows the relative energy contributions of each state in the system. Model Reducer computes an initial reduced-order model based on these values. The highlighted bar is the lowest-energy state in the initial reduced-order model. Model Reducer discards states that have lower Hankel singular values than the highlighted bar.
Try different reduced-model orders to find the lowest-order model that preserves the dynamics that are important for your application. To specify different orders, either:
Enter model orders in the Reduced model
orders field. You can enter a single integer or an
array of integers, such as
Click a bar on the Hankel singular-value plot to specify the lowest-energy state of the reduced-order model. Ctrl-click to specify multiple values.
When you change the specified reduced model order, Model Reducer automatically computes a new reduced-order model. If you specify multiple model orders, Model Reducer computes multiple reduced-order models and displays their responses on the plot.
Optionally, examine the absolute or relative error between the original and reduced-order model, in addition to the frequency response. Select the error-plot type using the buttons on the Balanced Truncation tab.
For more information about using the analysis plots, see Visualize Reduced-Order Models in the Model Reducer App.
If low-frequency dynamics are not important to your application, you can clear the Preserve DC Gain checkbox. Doing so sometimes yields a better match at higher frequencies between the original and reduced-order models.
When you check or clear the Preserve DC Gain checkbox, Model Reducer automatically computes new reduced-order models. For more information about this option, see Compare Truncated and DC Matched Low-Order Model Approximations.
Optionally, limit the Hankel singular-value computation to a specific frequency range. Such a limit is useful when the model has modes outside the region of interest to your particular application. When you apply a frequency limit, Model Reducer determines which states to truncate based on their energy contribution within the specified frequency range only. Neglecting energy contributions outside that range can yield an even lower-order approximation that is still adequate for your application.
To limit the singular-value computation, check Select frequency range. Then, specify the frequency range by:
In the text box, entering a vector of the form
[fmin,fmax]. Units are
TimeUnit is the
property of the model you are reducing.
On the response plot or error plot, dragging the boundaries of the shaded region or the shaded region itself. Model Reducer analyzes the state contributions within the shaded region only.
When you check or clear the Select frequency range checkbox or change the selected range, Model Reducer automatically computes new reduced-order models.
Checking Select frequency range automatically clears Preserve DC Gain. To enforce a DC match even when using frequency limits, recheck Preserve DC Gain.
When you have one or more reduced models that you want to store and analyze further, click . The new models appear in the Data Browser. If you have specified multiple orders, each reduced model appears separately. Model names reflect the reduced model order.
After creating reduced models in the Data Browser, you can continue changing the reduction parameters and create reduced models with different orders for analysis and comparison.
You can now perform further analysis with the reduced model. For example:
Examine other responses of the reduced system, such as the step response or Nichols plot. To do so, use the tools on the Plots tab. See Visualize Reduced-Order Models in the Model Reducer App for more information.
Export reduced models to the MATLAB workspace for further analysis or control design. On the Model Reducer tab, click Export.
To create a MATLAB script you can use for further model-reduction tasks at the command line, click Create Reduced Model, and select Generate MATLAB Script.
Model Reducer creates a script that uses the
balred command to perform
model reduction with the parameters and options you have set on the
Balanced Truncation tab. The script opens in the
Instead of working in the Model Reducer app, you can perform balanced truncation in other environments.
In the Live Editor, use the Reduce Model Order task to interactively perform balanced-truncation model reduction and generate code in your live script. For an example, see Model Reduction in the Live Editor.
At the MATLAB command prompt or in scripts and functions, use the
balred command. For