Spectral Analysis Method (System Identification Toolkit)
You can use the spectral analysis method with any input signal. However, the frequency bandwidth of the input signal must cover the range of interest.
Because the frequency response is the Fourier transform of the impulse response, applying the Fourier transform to both sides of the cross-correlation function yields the following equation.
Φuy(ejω) = Φuu(ejω)G(ejω)
G(ejω) is the frequency response of the system. Φuu(ejω) is the auto-spectral density of the stimulus signal. Φuy(ejω) is the cross-spectral density between the stimulus signal u(k) and the response signal y(k).
You then can use the following equation to compute the frequency response G(ejω).
You can compute Φuu(ejω) and Φuy(ejω) by applying a fast Fourier transform (FFT) to the autocorrelation function Ruu and the cross-correlation function Ruy, respectively. The number of data points you need to compute the autocorrelation function Ruu and the cross-correlation function Ruy decreases as the lag τ increases. Therefore, Ruu and Ruy become inaccurate for a large lag τ. In this situation, you can apply a lag window to counter the effects of a large lag τ and improve the accuracy of the frequency response estimation.