# Mixed time/frequency domain data

I'm afraid this might be a bit of an elementary question, but I'm afraid I'm a little new to this. I've got a system that measures a frequency spectrum to find resonant frequencies. It does this by applying an impulse, and then performs a linear sweep through a range of frequencies measuring the amplitude of the response.

As far as I can tell, this seems to produce data that contains both frequency- and time-domain information, because the frequency being measured changes over time. The results seem to agree with this: the initial impulse decays over "time", with individual excitations being visible at various frequencies. See here for an example (frequency on the horizontal axis, amplitude on the vertical): I would like to remove from this data the "time" component, leaving just the resonant responses. I have tried mirroring the data, then deconvolving a "top hat" function, and FTing the result, but I am not convinced this corresponds to anything meaningful. Could anyone provide any insight?

• What are you trying to achieve with the decolvolution you mention? – user7358 Mar 16 '14 at 22:28

this is John BG

1.- You have to work with Signal Power, not just input or output:

Circuit resonance is measured with the quality factor Q and does not only have to do with the signal you send in, or the signal that bounces back, but with those AND the impedance that such signals find.

Literature reference Microwave Engineering (Pozar) 1 defines Circuit Resonance the following way 2.- Measure the impedance:

Without the impedance, there's no way you can assess Q.

You are focusing your effort on the test signal and it's spectrum, but there's not a single reference to the impedance of the circuit you are measuring.

There's no way you can measure Q without at least an additional signal, than can be the impedance that the test input faces, or alternatively the reflected signal, that again you haven't mentioned.

3.- Narrow band or wide band? doesn't really matter

Despite the definition of resonance is done with a central frequency f0, it may be the case that the circuit resonates on each of the frequencies within the Chirp signal you use to poke the system.

4.- Use Chirp with constant amplitude

From the amplitude of the signal you shown in the question, the amplitude decreases with increasing frequency, that complicates calculations.

5.- Wrapping Suggestion:

Why don't you

• measure the return signal

• from there get the impedance

• calculate the 'sharpness' of the impedance notch over frequency, which is actually what defines how resonant is a circuit,

• from there you can tell whether the circuit under test is resonant throughout the chirp signal frequency band or only on certain frequencies.

• Once you have all this working, you may want to start playing with the amplitude of the chirp input signal.

If you follow the above steps, please let us know the results you obtain updating this QA with further comments, whether it worked for you, or if not what code have you written on such regard.

If you send me by email the MATLAB code you used to generate the question signal, I will have a look and look for a way to get the reflected signal.

John BG

Literature Reference (1):

https://www.amazon.co.uk/Microwave-Engineering-Written-Publisher-Hardcover/dp/B00SLRKBV2/ref=sr_1_1?ie=UTF8&qid=1529281040&sr=8-1&keywords=David+Pozar+Microwave+Engineering

Excerpts of the book can be read here: http://www2.electron.frba.utn.edu.ar/~jcecconi/Bibliografia/Ocultos/Libros/Microwave_Engineering_David_M_Pozar_4ed_Wiley_2012.pdf

There's also a solutions manual available here: https://www.scribd.com/doc/176505749/Microwave-engineering-pozar-4th-Ed-solutions-manual

Once you performed the FFT, there are no time components left. If you don't need the entire spectrum image you got from the transform but only the main resonants, try smoothing the data and then apply some kind of peak-finding.

Ideally, you would excite with a sine and then measure the amplitude. Often, this is not practical, so you just try to measure the impulse response as good as possible.

You will not have to modify the recorded impulse response to measure resonant frequencies. They will naturally stand out in a spectrogram. There is no time component left that you would have to remove. However, the result probably will be complex, and the phase information relates to time. Adding a mirror image might cancel some part of the signal, you would not want that.

In any case you should isolate single excitations. The result will get distorted if you transform more than a single pulse. You could probably undo that, but I think it's not worth the hassle. I don't know what you're trying to achieve by deconvolving a box function.

I believe that if you are already using measurements with sweep sine, then the whole procedure of obtaining frequency response is pretty straightforward. Let me describe whole procedure from the beginning.

1. You need to generate sweep sine signal, logarithmic seems to be the best choice. It is governed by following equation:

$x(t)= \sin{\left[\dfrac{2\pi f_1T}{\ln{\dfrac{f_2}{f_1}}}\cdot \left( e^{\dfrac{t}{T} \ln{\left( \dfrac{f_2}{f_1}\right)}}-1\right) \right]}$,

where: $f_1,$,$f_2$ - initial and final frequency of sweep, $T$ - total duration of sweep signal.

2. You feed this signal into your system and record output - let's call this $y(t)$. This is in fact you sweeping signal changed your model.

3. Now you must calculate the impulse response $h(t)$ of your system. It can be done by doing following convolution:

$h(t)=y(t)\star f(t)$,

where: $f(t)$ - so called "inverse filter" that is calculated by time-reversing your original excitation signal $x(t)$ and applying amplitude envelope. The amplitude modulation must reduce the level of your signal by 6dB/oct., starting from 0dB and ending at $-6\log_2{\left( \dfrac{f_2}{f_1} \right)}$. This is done because spectrum of logarithmic sweep is similar to the one of pink noise. In order to compensate that you must apply this modulation. Below you can see some plots targeting this problem.

4. Now you have the impulse response $h(t)$ of your system. According to the properties of LTI systems, frequency response can be obtained by taking the Fourier Transform of impulse response. Basically you just have to take the obtained impulse response, calculate it's DFT and plot the amplitude spectrum in order to obtain what you need. You might also want to consider applying window to your impulse response, having it's beginning just before initial spike and also ending before the noise is only present.

Plots:    P.S. Why the image descriptions do not appear?

• This may be a stupid question. Why impulse response is calculated using recorded sweep sine y(t) and original sweep sine x(t)? Why not just send an impulse and record the response? – Kaifei Apr 7 '14 at 20:30
• This is not a stupid question at all! If you are testing some system on your computer, i.e. in Simulink, such procedure of feeding Kronecker delta and investigating output would be absolutely correct. Although sweep-sine technique will give you even more informations, you can also easily calculate for example THD. And above everything, in real life conditions (OP did not specified what system it is) as in measurements of microphones, room acoustics, etc., you cannot produce ideal Dirac's delta (I know, I know - some people are using balloons and so on). That's why we are using MLS or sweeps. – jojek Apr 7 '14 at 20:36
• About the P.S., "For the screen readers of visually impaired, for browsers that don't show images, for cases where Imgur is blocked, and for search engine indexes: please enter a good description." meta.stackexchange.com/questions/75491/… What I do and dunno if it is optimal is write after the image: <br>Figure X. Blablablabla so that people can refer to the image number X if there will be discussion. – Olli Niemitalo Nov 9 '16 at 7:15
• @OlliNiemitalo Interesting point you just made. I will keep that in my mind for any future answers. – jojek Nov 19 '16 at 9:58
• remember jojek that it is the derivative (w.r.t. $t$) of the argument of $\sin(\cdot)$ that is the instantaneous frequency, not generally whatever multiplies $t$ in the argument. – robert bristow-johnson Apr 7 '17 at 7:05