Accelerating the pace of engineering and science

# frest.Chirp

Package: frest

Swept-frequency cosine signal

## Syntax

input = frest.Chirp(sys)
input = frest.Chirp('OptionName',OptionValue)

## Description

input = frest.Chirp(sys) creates a swept-frequency cosine input signal based on the dynamics of a linear system sys.

input = frest.Chirp('OptionName',OptionValue) creates a swept-frequency cosine input signal using the options specified by comma-separated name/value pairs.

To view a plot of your input signal, type plot(input). To obtain a timeseries for your input signal, use the generateTimeseries command.

## Input Arguments

sys

Linear system for creating a chirp signal based on the dynamic characteristics of this system. You can specify the linear system based on known dynamics using tf, zpk, or ss. You can also obtain the linear system by linearizing a nonlinear system.

The resulting chirp signal automatically sets these options based on the linear system:

• 'FreqRange' are the frequencies at which the linear system has interesting dynamics.

• 'Ts' is set to avoid aliasing such that the Nyquist frequency of the signal is five times the upper end of the frequency range.

• 'NumSamples' is set such that the frequency response estimation includes the lower end of the frequency range.

Other chirp options have default values.

'OptionName',OptionValue

Signal characteristics, specified as comma-separated pairs of option name string and the option value.

Option NameOption Value
'Amplitude'

Signal amplitude.

Default: 1e-5

'FreqRange'Signal frequencies, specified as either:
• Two-element vector, for example [w1 w2]

• Two-element cell array, for example {w1 w2}

Default: [1,1000]

'FreqUnits'

Frequency units:

• 'Hz'—Hertz

Changing frequency units does not impact frequency response estimation.

'Ts'

Sample time of the chirp signal in seconds. The default setting avoids aliasing.

Default: $\frac{2\pi }{5*\mathrm{max}\left(FreqRange\right)}$

'NumSamples'

Number of samples in the chirp signal. Default setting ensures that the estimation includes the lower end of the frequency range.

Default: $\frac{4\pi }{Ts*\mathrm{min}\left(FreqRange\right)}$

'SweepMethod'

Method for evolution of instantaneous frequency:

• 'linear' (default)—Specifies the instantaneous frequency sweep fi(t):

${f}_{i}\left(t\right)={f}_{0}+\beta t\text{\hspace{0.17em}}\text{\hspace{0.17em}}where\text{\hspace{0.17em}}\text{\hspace{0.17em}}\beta =\left({f}_{1}-{f}_{0}\right)/{t}_{f}$

β ensures that the signal maintains the desired frequency breakpoint f1 at final time tf.

• 'logarithmic'—Specifies the instantaneous frequency sweep fi(t) given by

${f}_{i}\left(t\right)={f}_{0}×{\beta }^{t}\text{\hspace{0.17em}}\text{\hspace{0.17em}}where\text{\hspace{0.17em}}\text{\hspace{0.17em}}\beta ={\left(\frac{{f}_{1}}{{f}_{0}}\right)}^{\frac{1}{{t}_{f}}}$

• 'quadratic'—Specifies the instantaneous frequency sweep fi(t):

${f}_{i}\left(t\right)={f}_{0}+\beta {t}^{2}\text{\hspace{0.17em}}\text{\hspace{0.17em}}where\text{\hspace{0.17em}}\text{\hspace{0.17em}}\beta =\left({f}_{1}-{f}_{0}\right)/{t}_{i}^{2}$

Also specify the shape of the quadratic using the 'Shape' option.

'Shape'

Use when you set 'SweepMethod' to 'quadratic' to describe the shape of the parabola in the positive frequency axis:

'InitialPhase'

Initial phase of the Chirp signal in degrees.

Default: 270

## Examples

Create a chirp input signal:

```input = frest.Chirp('Amplitude',1e-3,'FreqRange',[10 500],'NumSamples',20000)
```