Accelerating the pace of engineering and science

# getPeakGain

Peak gain of dynamic system frequency response

## Syntax

• gpeak = getPeakGain(sys) example
• gpeak = getPeakGain(sys,tol) example
• gpeak = getPeakGain(sys,tol,fband) example
• [gpeak,fpeak] = getPeakGain(___) example

## Description

example

gpeak = getPeakGain(sys) returns the peak input/output gain in absolute units of the dynamic system model, sys.

• If sys is a SISO model, then the peak gain is the largest value of the frequency response magnitude.

• If sys is a MIMO model, then the peak gain is the largest value of the frequency response 2-norm (the largest singular value across frequency) of sys. This quantity is also called the L norm of sys, and coincides with the H norm for stable systems.

• If sys is a model that has tunable or uncertain parameters, getPeakGain evaluates the peak gain at the current or nominal value of sys.

• If sys is a model array, getPeakGain returns an array of the same size as sys, where gpeak(k) = getPeakGain(sys(:,:,k)) .

example

gpeak = getPeakGain(sys,tol) returns the peak gain of sys with relative accuracy tol.

example

gpeak = getPeakGain(sys,tol,fband) returns the peak gain in the frequency interval fband.

example

[gpeak,fpeak] = getPeakGain(___) also returns the frequency fpeak at which the gain achieves the peak value gpeak, and can include any of the input arguments in previous syntaxes.

## Examples

expand all

### Peak Gain of Transfer Function

Compute the peak gain of the resonance in the transfer function

$sys=\frac{90}{{s}^{2}+1.5s+90}.$

```sys = tf(90,[1,1.5,90]);
gpeak = getPeakGain(sys);```

The getPeakGain command returns the peak gain in absolute units.

### Peak Gain with Specified Accuracy

Compute the peak gain of the resonance in the transfer function $sys=\frac{90}{{s}^{2}+1.5s+90}.$ with a relative accuracy of 0.01%.

```sys = tf(90,[1,1.5,90]);
gpeak = getPeakGain(sys,0.0001);```

The second argument specifies a relative accuracy of 0.0001. The getPeakGain command returns a value that is within 0.01% of the true peak gain of the transfer function.

### Peak Gain Within Specified Band

Compute the peak gain of the second resonance in the transfer function

$sys=\left(\frac{1}{{s}^{2}+0.2s+1}\right)\left(\frac{100}{{s}^{2}+s+100}\right).$

sys is the product of resonances at 1 rad/s and 10 rad/s.

```sys = tf(1,[1,.2,1])*tf(100,[1,1,100]);
fband = [8,12];
gpeak = getPeakGain(sys,0.01,fband);```

The fband argument causes getPeakGain to return the local peak gain between 8 and 12 rad/s.

### Frequency of Peak Gain

Identify which of the two resonances has higher gain in the transfer function

$sys=\left(\frac{1}{{s}^{2}+0.2s+1}\right)\left(\frac{100}{{s}^{2}+s+100}\right).$

sys is the product of resonances at 1 rad/s and 10 rad/s.

```sys = tf(1,[1,.2,1])*tf(100,[1,1,100]);
[gpeak,fpeak] = getPeakGain(sys)```
```gpeak =

5.0502

fpeak =

1.0000```

fpeak is the frequency corresponding to the peak gain gpeak. The peak at 1 rad/s is the overall peak gain of sys.

## Input Arguments

expand all

### sys — Input dynamic systemdynamic system model | model array

Input dynamic system, specified as any dynamic system model or model array. sys can be SISO or MIMO.

### tol — Relative accuracy0.01 (default) | positive real scalar

Relative accuracy of the peak gain, specified as a positive real scalar value. getPeakGain calculates gpeak such that the fractional difference between gpeak and the true peak gain of sys is no greater than tol.

### fband — Frequency interval[0,Inf] (default) | 1-by-2 vector of positive real values

Frequency interval in which to calculate the peak gain, specified as a 1-by-2 vector of positive real values. Specify fband as a row vector of the form [fmin,fmax].

## Output Arguments

expand all

### gpeak — Peak gain of dynamic systemscalar | array

Peak gain of the dynamic system model or model array sys, returned as a scalar value or an array.

• If sys is a single model, then gpeak is a scalar value.

• If sys is a model array, then gpeak is an array of the same size as sys, where gpeak(k) = getPeakGain(sys(:,:,k)).

### fpeak — Frequency of peak gainnonnegative real scalar | array of nonnegative real values

Frequency at which the gain achieves the peak value gpeak, returned as a nonnegative real scalar value or an array of nonnegative real values. The frequency is expressed in units of rad/TimeUnit, relative to the TimeUnit property of sys.

• If sys is a single model, then fpeak is a scalar.

• If sys is a model array, then fpeak is an array of the same size as sys, where fpeak(k) is the peak gain frequency of the kth model in the array.

expand all

### Algorithms

getPeakGain uses the algorithm of [1]. All eigenvalue computations are performed using structure-preserving algorithms from the SLICOT library. For more information about the SLICOT library, see http://slicot.org.

## References

[1] Bruisma, N.A. and M. Steinbuch, "A Fast Algorithm to Compute the H-Norm of a Transfer Function Matrix," System Control Letters, 14 (1990), pp. 287-293.