Skip to main content
added 82 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143

This was done using the same transfer function as the OP used in his own answer for for direct comparison to his results (as well as those responses to this question Why does this transfer function estimation not work? System identification) instead of the original one given in the question, repeated here as:

This was done using the same transfer function as the OP used in his own answer for comparison given as:

This was done using the same transfer function as the OP used in his own answer for direct comparison to his results (as well as those responses to this question Why does this transfer function estimation not work? System identification) instead of the original one given in the question, repeated here as:

deleted 12 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143

Deriving this for phase versus sample time $n$ including a constant frequency at the start and end results in the following formulas specific to DFT parameters with the resulting sinusoidal frequency ramp given as $\cos(\phi(n))$. Expressing in units of phase versus time ensures phase continuity at the transitions:

$\phi(n)=\begin{cases}\omega_1n,&n \le n_1\\ \omega_1 n+\frac{\Delta \omega}{\Delta n}\big(\frac{n^2+n_1^2}{2}-n_1n\big),&n_1<n<n_2\\\omega_2n+(\omega_1-\omega_2)n_2+\frac{\Delta \omega}{\Delta n}\big(\frac{n_2^2+n_1^2}{2}-n_1n_2\big),&n\ge n_2\end{cases}\tag{2}\\\\$

With the resulting frequency ramp as $cos(\phi(n)$), in the time interval $[n = 0,N-1]$

Where:
$n_1$ : index for start of ramp with frequency $\omega_1$ radians/sample
$n_2$ : index for end of ramp with frequency $\omega_2$ radians/sample

The parameters for the frequency ramp are further detailed in the graphic below:

chirp parameters

Windowing Windowing will be important to minimize distortion in the DFT results. However given we are sweeping the input frequency with time, tapering the signal at the boundaries will reduce the signal levels at these test frequencies. An excellent window choice for this application is the Tukey window as we can selectively taper just the outer edges, while the majority of the window is flat, offering significant performance in frequency even with a relatively small $\alpha$ which is the ratio of the taper portion of the window to the flat portion. Additionally with a low $\alpha$ the resolution bandwidth is minimally impacted.

Windowing Windowing will be important to minimize distortion in the DFT results. However given we are sweeping the input frequency with time, tapering the signal at the boundaries will reduce the signal levels at these test frequencies. An excellent window choice for this application is the Tukey window as we can selectively taper just the outer edges, while the majority of the window is flat, offering significant performance in frequency even with a relatively small $\alpha$ which is the ratio of the taper portion of the window to the flat portion. Additionally with a low $\alpha$ the resolution bandwidth is minimally impacted.

Deriving this for phase versus sample time $n$ including a constant frequency at the start and end results in the following formulas specific to DFT parameters with the resulting sinusoidal frequency ramp given as $\cos(\phi(n))$. Expressing in units of phase versus time ensures phase continuity at the transitions:

$\phi(n)=\begin{cases}\omega_1n,&n \le n_1\\ \omega_1 n+\frac{\Delta \omega}{\Delta n}\big(\frac{n^2+n_1^2}{2}-n_1n\big),&n_1<n<n_2\\\omega_2n+(\omega_1-\omega_2)n_2+\frac{\Delta \omega}{\Delta n}\big(\frac{n_2^2+n_1^2}{2}-n_1n_2\big),&n\ge n_2\end{cases}\tag{2}\\\\$

With the resulting frequency ramp as $cos(\phi(n)$), in the time interval $[n = 0,N-1]$

Where:
$n_1$ : index for start of ramp with frequency $\omega_1$ radians/sample
$n_2$ : index for end of ramp with frequency $\omega_2$ radians/sample

The parameters for the frequency ramp are further detailed in the graphic below:

chirp parameters

Windowing Windowing will be important to minimize distortion in the DFT results. However given we are sweeping the input frequency with time, tapering the signal at the boundaries will reduce the signal levels at these test frequencies. An excellent window choice for this application is the Tukey window as we can selectively taper just the outer edges, while the majority of the window is flat, offering significant performance in frequency even with a relatively small $\alpha$ which is the ratio of the taper portion of the window to the flat portion. Additionally with a low $\alpha$ the resolution bandwidth is minimally impacted.

deleted 12 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143

The reason this works so well is due to the excellent flatness in the DFT of the chirp signal through careful planning in generating such a signal for use in the DFT. Following the considerations listed above, the chirp stimulus has the following characteristics versus frequency and time. The taper duration is greatly exagerated in this diagram below; a 5% ratio was actually used for the demonstration above. Importantly at no time during the chirp does the frequency repeat; given the requirement for a real signal, any repetition of a frequency later in time would result in deep nulls in the response. Going below $0$ or above $\pi$ would essentially create such a repetition, therefore the frequency was made to be constant at the edges while allowing the ramp to extend fully from $0$ to $\pi$ in normalized radian frequency (cylces/sample). Sidelobe ringing was minimized by extending the ramp 50% into the taper of the amplitude window.

Chirp Preparation

An FFT of the chirp signal itself shows these performance features including complete frequency coverage and overall flatness approaching that of an ideal impulse (while allowing for much larger overall signal power thus we would expect much better performance versus an impulse response test in the presence of noise.)

FFT of chirp

The reason this works so well is due to the excellent flatness in the DFT of the chirp signal through careful planning in generating such a signal for use in the DFT. Following the considerations listed above, the chirp stimulus has the following characteristics versus frequency and time. The taper duration is greatly exagerated in this diagram below; a 5% ratio was actually used for the demonstration above. Importantly at no time during the chirp does the frequency repeat; given the requirement for a real signal, any repetition of a frequency later in time would result in deep nulls in the response. Going below $0$ or above $\pi$ would essentially create such a repetition, therefore the frequency was made to be constant at the edges while allowing the ramp to extend fully from $0$ to $\pi$ in normalized radian frequency (cylces/sample). Sidelobe ringing was minimized by extending the ramp 50% into the taper of the amplitude window.

Chirp Preparation

An FFT of the chirp signal itself shows these performance features including complete frequency coverage and overall flatness approaching that of an ideal impulse (while allowing for much larger overall signal power thus we would expect much better performance versus an impulse response test in the presence of noise.)

FFT of chirp

deleted 12 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143
Loading
deleted 12 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143
Loading
added 62 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143
Loading
added 62 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143
Loading
added 1 character in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143
Loading
added 1009 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143
Loading
deleted 1228 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143
Loading
deleted 8 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143
Loading
added 2554 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143
Loading
added 155 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143
Loading
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143
Loading