Frequency response estimation requires an input signal to excite the model at frequencies of interest. The software then measures the response at the specified output, using the input signal and measured response to estimate the frequency response.

When you perform frequency response estimation, you specify what type of input signal to use and what its properties are.

The following table summarizes the types of input signals you can use for offline
estimation in **Model Linearizer** or at the MATLAB^{®} command line for use with `frestimate`

.

Signal | Description |
---|---|

Sinestream | A series of sinusoidal perturbations applied one after another. Sinestream signals are recommended for most situations. They are especially useful when your system contains strong nonlinearities or you require highly accurate frequency response models. |

Chirp | A swept-frequency signal that excites your system at a range of frequencies, such that the input frequency changes instantaneously. Chirp signals are useful when your system is nearly linear in the simulation range. They are also useful when you want to obtain a response quickly for a lot of frequency points. |

PRBS | A deterministic pseudorandom binary sequence that shifts between two values and has white-noise-like properties. PRBS signals reduce total estimation time compared to using sinestream input signals, while producing comparable estimation results. PRBS signals are useful for estimating frequency responses for communications and power electronics systems. |

Random | A random input signal. Random signals are useful because they can excite the system uniformly at all frequencies up to the Nyquist frequency. |

Step | A step input signal. Step inputs are quick to simulate and can be useful as a first try when you do not have much knowledge about the system you are trying to estimate. |

Arbitrary | A MATLAB timeseries with which you can specify any time-varying signal as input. |

In general, the estimated frequency response is related to the input and output signals as:

$$Resp=\frac{FFT\left({y}_{est}(t)\right)\text{\hspace{0.17em}}}{FFT\left({u}_{est}(t)\right)}.$$

Here, *u _{est}*(

`frestimate`

.For online estimation with the Frequency Response Estimator block, you can use two types of input signals:

Sinestream — A series of sinusoidal perturbations applied one after another

Superposition — A set of sinusoidal perturbations applied simultaneously

For online estimation, using a sinestream signal can be more accurate and can accommodate a wider range of frequencies than a superposition signal. The sinestream mode can also be less intrusive. However, due to the sequential nature of the sinestream perturbation, each frequency point you add increases the experiment time. Thus the estimation experiment is typically much faster with a superposition signal with satisfactory results.

To specify which type of input signal to use for online estimation, use the
**Experiment mode** parameter of the Frequency Response
Estimator block.

For details about the structure of sinestream signals and how to create them, see Sinestream Input Signals.

For details about the structure of chirp signals and how to create them, see Chirp Input Signals.

For details about the structure of PRBS signals and how to create them, see PRBS Input Signals.

Random signals are useful because they can excite the system uniformly at all frequencies up to the Nyquist frequency. To create a random input signal for estimation:

In the

**Model Linearizer**, on the**Estimation**tab, select**Input Signal**>**Random**.At the command line, use

`frest.Random`

to create the random signal and use it as an input argument to`frestimate`

.

The random signal comprises uniformly distributed random numbers in the interval
`[0 Amplitude]`

or `[Amplitude 0]`

for positive and
negative amplitudes, respectively. You can specify the amplitude, sample time, and number of
samples directly when you create the input signal. Alternatively, if you have a relevant
linear time-invariant (LTI) model such as a state-space (`ss`

) model, you
can use it to initialize the random signal parameters. For instance, if you have an exact
linearization of your system, you can use it to initialize the parameters.

When you use a random input signal for estimation, the frequencies returned in the
estimated `frd`

model depend on the length and sampling time of the
signal. They are the frequencies obtained in the fast Fourier transform of the input signal
(see the Algorithm section of `frestimate`

).

Step inputs are quick to simulate. Like a random signal, a step signal can excite the system at all frequencies up to the Nyquist frequency. For those reasons, a step input can be useful as a first try when you do not have much knowledge about the system you are trying to estimate. However, the amplitude of the excitation decreases rapidly with increasing frequency. Therefore, step signals are best used to identify low-order plants where the slowest poles are dominant. Step inputs are not recommended for estimation across a wide range of frequencies.

To create a step input signal for estimation, use `frest.createStep`

. This function creates a MATLAB
`timeseries`

that represents a step input having the sample time, step
time, step size, and total signal length that you specify when you call
`frest.createStep`

.

To use the step input signal you created in the MATLAB workspace:

In the

**Model Linearizer**, on the**Estimation**tab, select it from the**Existing Input Signals**section of the**Input Signal**drop-down list.At the command line, use it as an input argument to

`frestimate`

.

When you use a step input signal for estimation, the frequencies returned in the
estimated `frd`

model depend on the length and sampling time of the
signal. They are the frequencies obtained in the fast Fourier transform of the input signal
(see the Algorithm section of `frestimate`

).

If you want to use a signal other than a sinestream, chirp, step, or random signal, you
can provide your own MATLAB
`timeseries`

object. For instance, you can
create a `timeseries`

representing a ramp, sawtooth, or square wave
input.

To use a `timeseries`

object as the input signal for estimation, first
create the `timeseries`

in the MATLAB workspace. Then:

In the

**Model Linearizer**, on the**Estimation**tab, select it from the**Existing Input Signals**section of the**Input Signal**drop-down list.At the command line, use it as an input argument to

`frestimate`

.

When you use an arbitrary input signal for estimation, the frequencies returned in the
estimated `frd`

model depend on the length and sampling time of the
signal. They are the frequencies obtained in the fast Fourier transform of the input signal
(see the Algorithm section of `frestimate`

).

Superposition signals are available only for online estimation with the Frequency Response
Estimator block. For frequency response estimation at a vector of frequencies
*ω* = [*ω*_{1}, … ,
*ω _{N}*] at amplitudes

$$\Delta u={\displaystyle \sum _{i}{A}_{i}\mathrm{sin}\left({\omega}_{i}t\right)}.$$

The block supplies the perturbation Δ*u* for the duration of the experiment (while the **start/stop** signal is positive). The block determines how long to wait for system transients to die away and how many cycles to use for estimation as shown in the following illustration.

*T _{exp}* is the experiment duration that you specify
with your configuration of the start/stop signal (See the

To use a superposition signal for estimation, in the Frequency Response
Estimator block, set the **Experiment mode** parameter to
**Superposition**. For details, see Frequency Response
Estimator.

`frest.Chirp`

| `frest.PRBS`

| `frest.Random`

| `frest.Sinestream`

| `frest.createStep`

| `frestimate`