4

The ripples in the amplitude spectrum of a linear spectrum is undesirable. I desire to obtain a flat spectrum response. Hence, how can I remove these ripples? Also, which factors (like time bandwidth product, chirp rate) are affecting the ripples, and how?

I designed a chirp with a frequency from 10 to 90 Hz in MATLAB. However, I obtained Fresnel ripples (which normally occurs) in the passband, along with overshoots at the band edges. I need to study the application of chirps on a material and use it for defect analysis. For this, I need to optimize the whole energy applied to the chirp. Hence, I want to get rid of these ripples. So, what parameters like chirp rate and time of sweep will affect the system?

Peter Mortensen
  • 219
  • 1
  • 8
deboshree
  • 101
  • 1
  • 8
  • 3
    Hello, welcome to DSP.se. We will be glad to help you, but it would help us if you could add some examples in your questions, and also tell us what you already know and what you already tied. You can edit your questions to add more detail. – penelope Dec 19 '13 at 12:03
  • What can you learn from a chirp that you can not learn from an impulse response? – C. Towne Springer Jan 19 '14 at 06:00
  • 2
    Could the ripples be an artifact of the way you are computing the spectrum of the chirp? – John Feb 18 '14 at 02:34
  • can you show a graph of the ripples you are talking about? @C.TowneSpringer: Chirps have their energy spread over a longer time period, so they aren't as susceptible to nonlinearities, SNR issues, etc. Impulses are fine in theory, but not in practice. somewhat related: https://gist.github.com/endolith/5322734 – endolith Mar 19 '14 at 21:06
  • 3
    The Fourier transform of a chirp has ripples. Why do you want to remove them? The standard chirp has been used for many years to good effect in the oil industry (search for vibroseis). So long as all relevant frequencies are contained in the chirp, and you know the chirp's initial amplitude, and post-processing you do can take account of the variations in spectral magnitude. – Peter K. Mar 20 '14 at 01:38
  • 2
    @PeterK, the Fourier transform of just the real (cos) or just the imaginary (sin) part of the chirp has ripples. but the complex chirp is flat in magnitude. – robert bristow-johnson May 18 '14 at 22:37
  • 1
    @robertbristow-johnson : Does the same hold true for finite-frequency range chirps? The OP is asking about a finite-duration, finite-frequency range chirp with a frequency changing from 10Hz to 90Hz. The result you quote below has frequencies from $-\infty$ to $+\infty$. – Peter K. May 19 '14 at 12:25
  • 1
    of course not, @PeterK. what you have to do for finite-frequency chirps (which are sorta all of them), is model it with the inf-freq chirp and apply a rectangular (or some other) window. a Gaussian window does not ever really go to zero, but it gets down to $10^{-8}$ pretty damn fast and the theoretical treatment of Gaussian-windowed-linearly-swept-frequency chirps is quite elegant. essentially $\mathcal{F}\left{ e^{a t^2 + b t + c} \right} \ = \ e^{A f^2 + B f + C}$ where $A,B,C$ are some functions of $a,b,c$. so you oughta be able to sweep whatever freqs you want and taper it. – robert bristow-johnson May 19 '14 at 17:44
  • Hmm. @robertbristow-johnson : that still doesn't gel with the way I've plated with chirps in the past. This wikipedia (gack) page is closer to what I would expect. And the ripples are very much in evidence there. – Peter K. May 19 '14 at 18:20
  • "gack" is right. never knew that page existed (but i shouldn't be surprized), nor how bad the formatting is (but i shouldn't be surprized). if the chirp is only the real or imag part of the complex chirp, there will be ripples. if the chirp does not cover all frequencies from $-\infty$ to $+\infty$, (i.e. a rectangular window is multiplying the $\infty$-frequency chirp, which means convolution with a sinc() in the $f$ domain), there will be other ripples. the math in that wikipedia page looks frightful. for the case of the Gaussian-windowed chirp, the math is nice and elegant. – robert bristow-johnson May 19 '14 at 20:05
  • If you want your answer in more scientific way please read the paper http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1444857&tag=1. This work has been done to reduce the side lobes by removing the ripples of linear FM waveform. –  Oct 28 '14 at 16:25

3 Answers3

5

Another thing the OP can do is use the "complex" chirp. What you really have to do is (at two different times and both times sweeping all frequencies from -Nyquist through DC to +Nyquist) pass the real part, $x_r(t)=\cos(\pi \beta t^2)$ and then pass the imaginary part $x_i(t)=\sin(\pi \beta t^2)$ of the complex chirp through the material under test and synchronously measure the two real results ($y_r(t)$ and $y_i(t)$), then assemble them as the real and imaginary parts of the response.

Let $$ \begin{align} x(t) & = e^{j \pi \beta t^2} \\ & = \cos(\pi \beta t^2) + j \sin(\pi \beta t^2) \\ & = x_r(t) \qquad + j \ x_i(t) \\ \end{align} $$

Then $$ X(f) \ \triangleq \ \mathscr{F}\left\{ x(t) \right\} \ = \ \sqrt{\frac{j}{\beta}} e^{-j\frac{\pi}{\beta} f^2} $$

You will see that $ |X(f)| = \sqrt{\frac{1}{\beta}} $ for all $f$.

The respective outputs that are synchronously measured with the two driving signals are $y_r(t)$ and $y_i(t)$:

$$ \begin{align} y_r(t) & \triangleq h(t) \circledast x_r(t) \\ & = h(t) \circledast \cos(\pi \beta t^2) \\ \\ y_i(t) & \triangleq h(t) \circledast x_i(t) \\ & = h(t) \circledast \sin(\pi \beta t^2) \\ \end{align} $$

Then this aggregate complex output, $y(t)$, can be assembled (in the mind of the computer) from the responses of the cosine sweep (the real part) and the sine sweep (the imaginary part):

$$ \begin{align} y(t) & = y_r(t) + j \ y_i(t) \\ & = h(t) \circledast x_r(t) + j \ h(t) \circledast x_i(t) \\ & = h(t) \circledast \left(x_r(t) + j \ x_i(t)\right) \\ & = h(t) \circledast x(t) \\ & = \int_{-\infty}^{+\infty} h(u) \, x(t-u) \ du \\ & = \int_{-\infty}^{+\infty} h(u) \, e^{j \pi \beta (t-u)^2} \ du \\ & = \int_{-\infty}^{+\infty} h(u) \, e^{j \pi \beta (t^2-2tu+u^2)} \ du \\ & = e^{j \pi \beta t^2} \int_{-\infty}^{+\infty} \left(h(u) \, e^{j \pi \beta u^2}\right) \, e^{-j 2 \pi \beta t u} \ du \\ & = e^{j \pi \beta t^2} \int_{-\infty}^{+\infty} \tilde{h}(u) \, e^{-j 2 \pi (\beta t) u} \ du \\ & = e^{j \pi \beta t^2} \tilde{H}(\beta t) \\ \end{align} $$

where $$ \tilde{H}(f) \triangleq \int_{-\infty}^{+\infty} \tilde{h}(t) e^{-j 2 \pi f t} \ dt = \mathscr{F}\left\{\tilde{h}(t) \right\} $$

and $$ \tilde{h}(t) \triangleq h(t) e^{j \pi \beta t^2} $$

So this is what you get: first consider making this adjustment (dechirping) in the measured output: $$ y(t) e^{-j \pi \beta t^2} = \tilde{H}(\beta t) $$

Now if the sweep rate $\beta$ is low enough, then $e^{j \pi \beta t^2} \approx 1$ for as long as $h(t)$ is not close to 0. Then $\tilde{h}(t) \approx h(t)$ and $\tilde{H}(f) \approx H(f)$ and $\tilde{H}(\beta t) \approx H(\beta t)$ and what you have measured in the output is another chirp, but with relative magnitude and phase changed by $\tilde{H}(\beta t) \approx H(\beta t)$.

Even if the sweep rate is not so low, you can compute either the true frequency response $H(f)$ by first computing

$$ \begin{align} \tilde{h}(t) & = \mathscr{F}^{-1}\left\{ \tilde{H}(f) \right\} \\ & = \int_{-\infty}^{+\infty} \tilde{H}(f) e^{j 2 \pi f t} df \\ & = h(t) e^{j \pi \beta t^2} \\ \end{align} $$

Or from that result you can get the true impulse response $h(t)$ and then $H(f)$ if that's what you want. It should be the same $H(f)$ you would get if you divided $Y(f) = \mathscr{F}\left\{ y(t) \right\} $ by $X(f) = \mathscr{F}\left\{ x(t) \right\} = \sqrt{\frac{j}{\beta}} e^{-j\frac{\pi}{\beta} f^2}$. And there is no division by zero, because there are no ripples in $X(f)$ because the magnitude is a constant $\sqrt{\frac{1}{\beta}}$.

That is how to remove ripples (and any danger of division by zero) in the spectrum of a linearly-swept chirp.

robert bristow-johnson
  • 20,661
  • 4
  • 38
  • 76
1

Depends on your application constraints. Easiest way would be the following

  1. Create chirp in the time domain
  2. Fourier Transform
  3. Set the spectrum amplitude to what you want it to be
  4. Inverse Fourier Transform

This produces a chirp-like time domain signal that has the exact frequency spectrum that you want

Hilmar
  • 44,604
  • 1
  • 32
  • 63
1

I might be wrong, but my guess is that these ripples appear as a result of your chirp function being finite in time, generating discontinuities at both ends of your signal. The classic way to reduce ripples caused by discontinuities is multiplying your signal by a window, making the transition smoother. In Matlab you could try something like:

smoothChirp = chirp.*hamming(l);

Where l is the length of your signal. Of course the spectrum of your chirp won't have a "flat" characteristic anymore, so in the end we have a trade-off between perfectly linear frequency variation and the appearance of ripples in the signal spectrum.

Felipe
  • 21
  • 1
  • i wasn't the person who dinged you, but the window you would want to use with a chirp is the gaussian window $$w(t) = e^{-\pi \alpha t^2}$$ where $\alpha > 0$. – robert bristow-johnson Jul 20 '14 at 06:59