Main Content

damp

Natural frequency and damping ratio

Description

damp(sys) displays the damping ratio, natural frequency, and time constant of the poles of the linear model sys. For a discrete-time model, the table also includes the magnitude of each pole. The poles are sorted in increasing order of frequency values.

example

[wn,zeta] = damp(sys) returns the natural frequencies wn, and damping ratios zeta of the poles of sys.

example

[wn,zeta,p] = damp(sys) also returns the poles p of sys.

example

___ = damp(___,Name=Value) computes the damping ratio and natural frequency for a subset of poles of the sparse model sys based on one or more specified name-value arguments. If you do not specify any name-value arguments, the function computes damping ratio and natural frequency for up to first 1000 poles with smallest magnitude. The function ignores name-value arguments when sys is a nonsparse model. (since R2025a)

example

Examples

collapse all

For this example, consider the following continuous-time transfer function:

sys(s)=2s2+5s+1s3+2s-3.

Create the continuous-time transfer function.

sys = tf([2,5,1],[1,0,2,-3]);

Display the natural frequencies, damping ratios, time constants, and poles of sys.

damp(sys)
                                                                       
         Pole              Damping       Frequency      Time Constant  
                                       (rad/seconds)      (seconds)    
                                                                       
  1.00e+00                -1.00e+00       1.00e+00        -1.00e+00    
 -5.00e-01 + 1.66e+00i     2.89e-01       1.73e+00         2.00e+00    
 -5.00e-01 - 1.66e+00i     2.89e-01       1.73e+00         2.00e+00    

The poles of sys contain an unstable pole and a pair of complex conjugates that lie in the left-half of the s-plane. The corresponding damping ratio for the unstable pole is -1, which is called a driving force instead of a damping force since it increases the oscillations of the system, driving the system to instability.

For this example, consider the following discrete-time transfer function with a sample time of 0.01 seconds:

sys(z)=5z2+3z+1z3+6z2+4z+4.

Create the discrete-time transfer function.

sys = tf([5 3 1],[1 6 4 4],0.01)
sys =
 
     5 z^2 + 3 z + 1
  ---------------------
  z^3 + 6 z^2 + 4 z + 4
 
Sample time: 0.01 seconds
Discrete-time transfer function.
Model Properties

Display information about the poles of sys using the damp command.

damp(sys)
                                                                                    
         Pole             Magnitude     Damping       Frequency      Time Constant  
                                                    (rad/seconds)      (seconds)    
                                                                                    
 -3.02e-01 + 8.06e-01i     8.61e-01     7.74e-02       1.93e+02         6.68e-02    
 -3.02e-01 - 8.06e-01i     8.61e-01     7.74e-02       1.93e+02         6.68e-02    
 -5.40e+00                 5.40e+00    -4.73e-01       3.57e+02        -5.93e-03    

The Magnitude column displays the discrete-time pole magnitudes. The Damping, Frequency, and Time Constant columns display values calculated using the equivalent continuous-time poles.

For this example, create a discrete-time zero-pole-gain model with two outputs and one input. Use sample time of 0.1 seconds.

sys = zpk({0;-0.5},{0.3;[0.1+1i,0.1-1i]},[1;2],0.1)
sys =
 
  From input to output...
          z
   1:  -------
       (z-0.3)
 
            2 (z+0.5)
   2:  -------------------
       (z^2 - 0.2z + 1.01)
 
Sample time: 0.1 seconds
Discrete-time zero/pole/gain model.
Model Properties

Compute the natural frequency and damping ratio of the zero-pole-gain model sys.

[wn,zeta] = damp(sys)
wn = 3×1

   12.0397
   14.7114
   14.7114

zeta = 3×1

    1.0000
   -0.0034
   -0.0034

Each entry in wn and zeta corresponds to combined number of I/Os in sys. zeta is ordered in increasing order of natural frequency values in wn.

For this example, compute the natural frequencies, damping ratio and poles of the following state-space model:

A=[-2-11-2],B=[112-1],C=[10],D=[01].

Create the state-space model using the state-space matrices.

A = [-2 -1;1 -2];
B = [1 1;2 -1];
C = [1 0];
D = [0 1];
sys = ss(A,B,C,D);

Use damp to compute the natural frequencies, damping ratio and poles of sys.

[wn,zeta,p] = damp(sys)
wn = 2×1

    2.2361
    2.2361

zeta = 2×1

    0.8944
    0.8944

p = 2×1 complex

  -2.0000 + 1.0000i
  -2.0000 - 1.0000i

The poles of sys are complex conjugates lying in the left half of the s-plane. The corresponding damping ratio is less than 1. Hence, sys is an underdamped system.

Since R2025a

For this example, compute the natural frequencies, damping ratio and poles of a sparse state-space model of an optical filter. For sparse state-space models, you can determine the damping ratio of a subset of computed poles in a frequency range of interest.

Load the model.

load sparseFilter.mat
size(sys)
Sparse state-space model with 5 outputs, 1 inputs, and 1668 states.

Sparse models are often large-scale and computing all poles may be infeasible or computationally expensive. By default, the damp function computes up to first 1000 poles with the smallest magnitude.

[wn,zeta,p] = damp(sys);
size(p)
ans = 1×2

        1000           1

To avoid computing a large number of poles, you can specify additional options such as a frequency range of interest. Typically, you specify a low-frequency band and the function computes only poles with natural frequency in the range.

damp(sys,Focus=[10 1000]);
                                                           
   Pole        Damping       Frequency      Time Constant  
                           (rad/seconds)      (seconds)    
                                                           
 -3.76e+01     1.00e+00       3.76e+01         2.66e-02    
 -7.78e+02     1.00e+00       7.78e+02         1.29e-03    
 -7.92e+02     1.00e+00       7.92e+02         1.26e-03    

Input Arguments

collapse all

Linear dynamic system, specified as a SISO, or MIMO dynamic system model. Dynamic systems that you can use include:

  • Continuous-time or discrete-time numeric LTI models, such as tf, zpk, or ss models.

  • Generalized or uncertain LTI models such as genss or uss (Robust Control Toolbox) models. (Using uncertain models requires Robust Control Toolbox™ software.)

    damp assumes

    • current values of the tunable components for tunable control design blocks.

    • nominal model values for uncertain control design blocks.

If sys is a sparse state-space model (sparss or mechss), the software computes damping ratio and natural frequency for a subset of poles in a specified frequency band of focus. For sparse models, use the name-value arguments to specify computation options. If you do not specify any options, the software computes up to the first 1000 poles with smallest magnitude. For mechss models with Rayleigh damping, the software computes poles from the eigenvalues of (K,M). Otherwise, the software computes the poles from the equivalent sparss model. (since R2025a)

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: [wn,zeta] = damp(sparseSys,Focus=[0 10],Display="off")

Since R2025a

Frequency range of interest, specified as a vector of form [fmin,fmax]. When you specify a frequency range of focus, the algorithm computes only the poles with natural frequency in this range. For discrete-time models, the software approximates the equivalent natural frequency through Tustin transform.

For symmetric semi-definite sparse models, you can specify any frequency range with 0 ≤ fmin < fmax. For nonsymmetric sparss models, you must specify frequency range as either [0,fmax] or [fmin,inf].

Since the software computes all poles in the specified frequency range, you typically specify a low-frequency range to limit computing a large number of poles. By default, the focus is unspecified ([0 Inf]) and the algorithm computes up to MaxNumber poles.

Since R2025a

Maximum number of poles and zeros to compute, specified as a positive integer. This value limits the number of poles computed by the algorithm.

Since R2025a

Spectral shift, specified as a finite scalar.

The software computes poles with the natural frequency in the specified range [0,fmax] using inverse power iterations for A-sigma*E, which obtains eigenvalues closest to shift sigma. When A is singular and sigma is zero, the algorithm fails as no inverse exists. Therefore, for sparse models with integral action (s = 0 or at z = 1 for discrete-time models), you can use this option to implicitly shift poles or zeros to the value closest to this shift value. Specify a shift value that is not equal to an existing pole value of the original model.

Since R2025a

Tolerance for accuracy of computed poles, specified as a positive finite scalar. This value controls the convergence of computed eigenvalues in inverse power iterations.

Since R2025a

Show or hide progress report, specified as either "off" or "on".

Output Arguments

collapse all

Natural frequency of each pole of sys, returned as a vector sorted in ascending order of frequency values. Frequencies are expressed in units of the reciprocal of the TimeUnit property of sys.

If sys is a discrete-time model with specified sample time, wn contains the natural frequencies of the equivalent continuous-time poles. If the sample time is not specified, then damp assumes a sample time value of 1 and calculates wn accordingly. For more information, see Algorithms.

Damping ratios of each pole, returned as a vector sorted in the same order as wn.

If sys is a discrete-time model with specified sample time, zeta contains the damping ratios of the equivalent continuous-time poles. If the sample time is not specified, then damp assumes a sample time value of 1 and calculates zeta accordingly. For more information, see Algorithms.

Poles of the dynamic system model, returned as a vector sorted in the same order as wn. p is the same as the output of pole(sys), except for the order. For more information on poles, see pole.

Algorithms

damp computes the natural frequency, time constant, and damping ratio of the system poles as defined in the following table:

 Continuous TimeDiscrete Time with Sample Time Ts
Pole Location

s

z

Equivalent Continuous-Time Pole

Not applicable

s=ln(z)Ts

Natural Frequency

ωn=|s|

ωn=|s|=|ln(z)Ts|

Damping Ratio

ζ=cos(s)

ζ=cos(s)=cos(ln(z))

Time Constant

τ=1ωnζ

τ=1ωnζ

If the sample time is not specified, then damp assumes a sample time value of 1 and calculates zeta accordingly.

For sparse-state space models, the software uses the Krylov--Schur algorithm [1] for inverse power iterations to compute poles in the specified frequency band. (since R2025a)

References

[1] Stewart, G. W. “A Krylov--Schur Algorithm for Large Eigenproblems.” SIAM Journal on Matrix Analysis and Applications 23, no. 3 (January 2002): 601–14. https://doi.org/10.1137/S0895479800371529.

Version History

Introduced before R2006a

expand all

See Also

| | | | |