Main Content


Run model order reduction algorithm

Since R2023b


    Use process to analyze a model and compute derived properties, such as the Hankel singular values or modal components, for the model order reduction (MOR) task. For the full workflow, see Task-Based Model Order Reduction Workflow.

    Using this function is optional in the workflow, and is only necessary when you want to:

    • Compute or update the derived properties in the specification object R to see the values.

    • Avoid recomputing the data multiple times. This is critical for sparse models. For example, if your application calls view once and getrom twice, then the computation happens three times in the workflow. To avoid this, use the process function.


    Rout = process(R) analyzes the model order reduction specification object R and computes the derived information needed to generate reduced-order models. R is a model order reduction task created using reducespec.


    collapse all

    This example shows how to avoid recomputing derived properties in a model order reduction workflow. This is beneficial when working with sparse models because such operations can be computationally expensive.

    This examples uses sparse state-space model of a cantilever beam obtained from linearizing a structural model. For more information, see Linear Analysis of Cantilever Beam.

    Load the model.

    load linBeam.mat
    Sparse second-order model with 1 outputs, 1 inputs, and 3303 degrees of freedom.

    Create a model order reduction task and set the Focus option to compute the eigenvalues only in the specified frequency range.

    R = reducespec(sys,"modal");
    R.Options.Focus = [0 1e6]
    R = 
      SparseModalTruncation with properties:
             Mode: []
          Damping: []
        Frequency: []
        Component: []
           DCGain: []
               TL: []
               TR: []
          Options: [1x1 mor.SparseModalTruncationOptions]

    Notice that reducespec does not perform any computation and creates only the object.

    If you call the view and getrom functions without first calling process, the workflow computes derived twice, once each for view and getrom. To avoid this, call the process function first.

    R = process(R)
    R = 
      SparseModalTruncation with properties:
             Mode: [46x1 double]
          Damping: [46x1 double]
        Frequency: [46x1 double]
        Component: [1x1x46x1 ss]
           DCGain: [46x1 double]
               TL: [6606x92 double]
               TR: [6606x92 double]
          Options: [1x1 mor.SparseModalTruncationOptions]

    The fields of R now contain the computed properties. Unless you further change any options of R.Options, subsequent calls to view or getrom do not recompute these properties.


    rsys = getrom(R,MinDC=1e-6);

    Input Arguments

    collapse all

    Model order reduction specification object created using reducespec, specified as one of the following.

    Output Arguments

    collapse all

    Updated model order reduction specification object, returned as the same object as R. Rout contains the computed values of the read-only properties of the object.

    Version History

    Introduced in R2023b