Contenu principal

sector

R2026b

Compute sector index as function of frequency

Since R2026b

    Description

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

    [index,wout] = sector(H,Q) returns the relative sector indices for the dynamic system H and a given sector matrix Q. These indices measure by how much the sector bound is satisfied (index less than 1) or violated (index greater than 1) at a given frequency. (See About Sector Bounds and Sector Indices for more information about the meaning of the sector index.) sectorplot automatically chooses the frequency range and number of points based on the dynamics of H.

    Let the following be an orthogonal decomposition of the symmetric matrix Q into its positive and negative parts.

    Q=W1W1T−W2W2T, W1TW2=0.

    The sector index plot is only meaningful if W2TH has a proper stable inverse. In that case, the sector indices are the singular values of:

    (W1TH(jω))(W2TH(jω))−1.

    index = sector(H,Q,w) returns the sector indices at the frequencies specified by w.

    sector(___) plots the sector indices of the dynamic system H as a function of frequency. For more plot customization options, use sectorplot.

    • To plot the sector indices for multiple dynamic systems on the same plot, you can specify G as a comma-separated list of models. For example, sector(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, sector(G1,LineSpec1,G2,LineSpec2) plots two models and specifies their plot style. For more information on specifying a LineSpec value, see sectorplot.

    Examples

    collapse all

    Create a linear dynamic system model.

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

    Define a sector geometry in the U/Y space.

    a = 0.1;  
    b = 10; 
    Q = [1 -(a+b)/2 ; -(a+b)/2 a*b];

    Compute the sector index for H = [G;1].

    [index,wout] = sector([G;1],Q);

    Find the maximum sector index value.

    max(index)
    ans =
    
        0.4065

    The sector index is less than 1 at all frequencies. Therefore, the trajectories of G(s) fit within the specified sector Q at all frequencies.

    Create a two-input, two-output linear model.

    A = [-4.557   0.1867  0.1719;
         -2.584  -4.788  -0.0812;
          0.3951 -3.422  -0.9666];
    B = [ 0.6635   -0.05083;
         -0.3502   -0.8127;
          1.62      0];
    C = [0.8586  0.8889  2.487;
         0.1952  0.06922 -1.666];
    D = [-0.4159  0.08925;
         -0.08422  1.456];
    G = ss(A,B,C,D);

    Define a sector geometry in the U/Y space.

    Q = [-5.12  2.16 -2.04  2.17
          2.16 -1.22 -0.28 -1.11
         -2.04 -0.28 -3.35  0.00
          2.17 -1.11  0.00  0.18];

    Compute the sector index for this sector geometry.

    [index,wout] = sector([G;eye(2)],Q);

    Because G represents a 2-by-2 system, there are two rows in index.

    Check the maximum index value in each row.

    max(index,[],2)
    ans = 2×1
          1.6352
          0.0646

    In the second row, all indices are less than 1.

    However, in the first row one or more indices are greater than 1. Therefore, H does not satisfy the sector bound represented by Q.

    If you examine the first row of index, the indices are greater than 1 for all frequencies below some threshold frequency.

    Calculate the threshold frequency.

    wg = wout(index(1,:)>1);
    max(wg)
    ans =
    
        3.1108

    The sector indices are greater than 1 for all frequencies less than about 3.11 rad/s.

    Input Arguments

    collapse all

    Model to analyze against sector bounds, specified as a dynamic system model such as a tf, ss, or genss model. H can be continuous or discrete. If H is a generalized model with tunable or uncertain blocks, sectorplot analyzes the current, nominal value of H.

    To analyze whether all I/O trajectories (u(t),y(t) of a linear system G lie in a particular sector, use H = [G;I], where I = eye(nu), and nu is the number of inputs of G.

    Sector geometry, specified as:

    • A matrix, for constant sector geometry. Q is a symmetric square matrix that is ny on a side, where ny is the number of outputs of H.

    • An LTI model, for frequency-dependent sector geometry. Q satisfies Q(s)’ = Q(–s). In other words, Q(s) evaluates to a Hermitian matrix at each frequency.

    The matrix Q must be indefinite to describe a well-defined conic sector. An indefinite matrix has both positive and negative eigenvalues.

    For more information, see About Sector Bounds and Sector 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

    Sector indices as a function of frequency, returned as a matrix. index contains the sector indices 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 as many rows as H has inputs. Thus the value index(:,k) gives the sector indices in descending order at the frequency w(k).

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

    H = [G;eye(3)]
    index = sectorplot(H,Q,w);

    The entry index(:,k) contains the three sector indices for H, in descending order, at the frequency w(k).

    For more information, see About Sector Bounds and Sector Indices.

    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