# damp

Natural frequency and damping ratio

## Syntax

```damp(sys)[Wn,zeta] = damp(sys)[Wn,zeta,P] = damp(sys)```

## Description

`damp(sys)` displays a table of the damping ratio (also called damping factor), 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. Frequencies are expressed in units of the reciprocal of the `TimeUnit` property of `sys`. Time constants are expressed in the same units as the `TimeUnit` property of `sys`.

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

```[Wn,zeta,P] = damp(sys)``` returns the poles of `sys`.

## Input Arguments

 `sys` Any linear dynamic system model.

## Output Arguments

 `Wn` Vector containing the natural frequencies of each pole of `sys`, in order of increasing frequency. 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 (see Algorithms). If `sys` has an unspecified sample time `(Ts = -1)`, then the software uses ```Ts = 1``` and calculates `Wn` accordingly. `zeta` Vector containing the damping ratios of each pole of `sys`, 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 (see Algorithms). If `sys` has an unspecified sample time `(Ts = -1)`, then the software uses ```Ts = 1``` and calculates `zeta` accordingly. `P` Vector containing the poles of `sys`, in order of increasing natural frequency. `P` is the same as the output of `pole(sys)`, except for the order.

## Examples

collapse all

### Natural Frequency, Damping Ratio, and Poles of Continuous-Time System

Calculate the natural frequency, damping ratio, time constant, and poles of the continuous-time transfer function:

$H\left(s\right)=\frac{2{s}^{2}+5s+1}{{s}^{2}+2s+3}.$

```H = tf([2 5 1],[1 2 3]); ```

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

```damp(H) ```
``` Pole Damping Frequency Time Constant (rad/seconds) (seconds) -1.00e+00 + 1.41e+00i 5.77e-01 1.73e+00 1.00e+00 -1.00e+00 - 1.41e+00i 5.77e-01 1.73e+00 1.00e+00 ```

Obtain vectors containing the natural frequencies and damping ratios of the poles.

```[Wn,zeta] = damp(H); ```

Calculate the associated time constants.

`tau = 1./(zeta.*Wn);`

### Natural Frequency, Damping Ratio, and Poles of Discrete-Time System

Calculate the natural frequency, damping ratio, time constant, and poles of a discrete-time transfer function.

```H = tf([5 3 1],[1 6 4 4],0.01); ```

Display information about the poles of H.

```damp(H) ```
``` 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.

Obtain vectors containing the natural frequencies and damping ratios of the poles.

```[Wn,zeta] = damp(H); ```

Calculate the associated time constants.

`tau = 1./(zeta.*Wn);`

expand all

### Algorithms

The natural frequency, time constant, and damping ratio of the system poles are defined in the following table:

Continuous TimeDiscrete Time with Sample Time Ts
Pole Location

$s$

$z$

Equivalent Continuous-Time Pole

$s=\frac{ln\left(z\right)}{{T}_{s}}$

Natural Frequency

${\omega }_{n}=|s|$

${\omega }_{n}=|s|=|\frac{ln\left(z\right)}{{T}_{s}}|$

Damping Ratio

$\zeta =-cos\left(\angle s\right)$

$\begin{array}{lll}\zeta \hfill & =-cos\left(\angle s\right)\hfill & =-cos\left(\angle ln\left(z\right)\right)\hfill \end{array}$

Time Constant

$\tau =\frac{1}{{\omega }_{n}\zeta }$

$\tau =\frac{1}{{\omega }_{n}\zeta }$