主要内容

passive

R2026b

Compute passivity index as function of frequency

Since R2026b

    Description

    [index,wout] = passive(G) returns the relative passivity index at each frequency in the vector wout. The output index is a matrix, and the value index(:,k) gives the passivity indices in descending order at frequency w(k).

    example

    [index,wout] = passive(G,type) returns the specified type of passivity index at each frequency in the vector wout.

    example

    index = passive(G,w) return the passivity indices at the frequencies specified by w.

    index = passive(G,w, type) returns the specified type of passivity index at the frequencies specified by w.

    passive(___) plots the passivity indices of the dynamic system G as a function of frequency. For more plot customization options, use passiveplot.

    • To plot the passivity indices for multiple dynamic systems on the same plot, you can specify G as a comma-separated list of models. For example, passive(G1,G2,G3) plots the root locus for three models on the same plot.

    • To specify a color, line style, and marker for each system in the plot, specify a LineSpec value for each system. For example, passive(G1,LineSpec1,G2,LineSpec2) plots two models and specifies their plot style. For more information on specifying a LineSpec value, see passiveplot.

    Examples

    collapse all

    Create a linear dynamic system model.

    G = tf([1 2],[1 1]);

    Compute the relative passivity index as a function of frequency.

    [index,wout] = passive(G);

    Find the maximum passivity index value.

    max(index)
    ans =
    
        0.3326

    The relative passivity index is less than 1 at all frequencies. Therefore, the system is passive.

    Create a linear dynamic system model.

    G = tf([1 2],[1 1]);

    Compute the input passivity index as a function of frequency.

    [index,wout] = passive(G,"input");

    Find the minimum passivity index value.

    min(index)
    ans =
    
        1.0001

    The input passivity index is positive at all frequencies. Therefore, the system is input strictly passive.

    Input Arguments

    collapse all

    Model to analyze for passivity, specified as a dynamic system model such as a tf, ss, or genss model. G can be MIMO, if the number of inputs equals the number of outputs. G can be continuous or discrete. If G is a generalized model with tunable or uncertain blocks, passive evaluates passivity of the current, nominal value of G.

    Type of passivity index, specified as one of the following:

    • "input" — Input passivity index (input feedforward passivity). This value is the smallest eigenvalue of (G(s)+G(s)H)/2, for s = jω in continuous time, and s = ejω in discrete time.

    • "output" — Output passivity index (output feedback passivity). When G is minimum phase, this value is the smallest eigenvalue of (G(s)−1+G(s)−H)/2, for s = jω in continuous time, and s = ejω in discrete time.

    • "io" — Combined I/O passivity index. When I + G is minimum phase, this value is the largest τ(ω) such that:

      G(s)+G(s)H>2τ(ω)(I+G(s)HG(s)),

      for s = jω in continuous time, and s = ejω in discrete time.

    See About Passivity and Passivity Indices for details about these indices.

    Frequencies at which to compute and plot indices, specified as one of the following:

    • Cell array of the form {wmin,wmax} — Compute the plot indices at frequencies in the range from wmin to wmax. If wmax is greater than the Nyquist frequency of the system, the response is computed only up to the Nyquist frequency.

    • Vector of frequencies — Compute the plot indices at each specified frequency. For example, use logspace to generate a row vector with logarithmically spaced frequency values. The vector w can contain both positive and negative frequencies.

    • [] — Automatically select frequencies based on system dynamics.

    For models with complex coefficients, if you specify a frequency range of [wmin,wmax] for your plot, then in:

    • Log frequency scale, the plot frequency limits are set to [wmin,wmax] and the plot shows two branches, one for positive frequencies [wmin,wmax] and one for negative frequencies [–wmax,–wmin].

    • Linear frequency scale, the plot frequency limits are set to [–wmax,wmax] and the plot shows a single branch with a symmetric frequency range centered at a frequency value of zero.

    Specify frequencies in units of rad/TimeUnit, where TimeUnit is the TimeUnit property of the model.

    Output Arguments

    collapse all

    Passivity indices as a function of frequency, returned as a matrix. index contains whichever type of passivity index you specify, computed at the frequencies w if you supplied them, or wout if you did not. index has as many columns as there are values in w or wout, and

    • One row, for the input, output, or combined i/o passivity indices.

    • As many rows as G has inputs or outputs, for the relative passivity index.

    For example, suppose that G is a 3-input, 3-output system, and w is a 1-by-30 vector of frequencies. Then the following syntax returns a 3-by-30 matrix index.

    index = passiveplot(G,w);

    The entry index(:,k) contains the relative passivity indices of G, in descending order, at the frequency w(k).

    Frequencies at which the indices are calculated, returned as a vector. The function automatically chooses the frequency range and number of points based on the dynamics of the model.

    wout also contains negative frequency values for models with complex coefficients.

    Version History

    Introduced in R2026b

    expand all