# narrow band frequency response creation and general FR question

i need some guidance with understanding frequency response characteristics.

i have the a signal A with is played on speakers and recorded via microphone which is signal B. then i apply a window function, shift both signals to frequency domain and analyze the magnitudes, but the peak for the most dominant frequency is not at nearly the same index. it jumps.

to do further analyzation of the signal my plan was to create the frequency response of my audio system, multiply my frequency domain signal A with the FR and the peaks should align.
am i roughly right with this?

if yes, additional question:
as my processing power is limited i want to analyze only a certain frequency band. what would be the best approach to generate an frequency response for a certain frequency band? and if i consider only a few frequencies, is it possible, that other frequencies outside my "scope" affect my observed ones and make my results unpredictable again?

thanks for any help in advance! cheers

• When you say "the peak for the most dominant frequency is not at nearly the same index" you mean that you're observing a frequency shift? This could happen if your system is nonlinear (overdriven microphone) or the microphone is moving fast (Doppler shift). If neither is the case, there's probably something wrong with your analysis. Do A and B have the same length? – Deve Dec 18 '12 at 9:23
• In addition to what Deve said, what does the signal you're playing look like? Is it a pure tone, voice, some modulated sinusoid, etc.? – Jason R Dec 18 '12 at 14:12
• @JasonR its music in signal A which is recorded after playback into signal B – Maximilian Körner Dec 18 '12 at 22:05
• @Deve so you say the main frequency pattern should remain the same if i dont have one of the 2 mentioned problems? now you say that i see, that my dominant frequencies in A are mostly in very low frequencies and most likely my very small speaker (mono) isnt able to reproduce this frequencies and others become more dominant in recorded B? – Maximilian Körner Dec 18 '12 at 22:08
• The frequency spectrum of A might be changed by a linear system, of course. What you describe in your last comment is most probably the effect of the transfer functions of speaker and microphone that can be described by linear systems. – Deve Dec 19 '12 at 8:13

Let's assume that speaker, free space and microphone can be modeled as linear systems and that the overall system transfer function is given by $H(\omega)$. Then the received signal is given by $$B(\omega) = A(\omega)H(\omega),$$ where $A(\omega)$ is the signal sent to the speaker. So, yes, if you know the transfer function $H(\omega)$ you can calculate $B(\omega)$ and it should align with what you record with the microphone.
To determine $H(\omega)$ in practice you will have use discrete-time signals and play a unit impulse $a(n) = \delta(n)$, record the received signal $b(n)$ and calculate the transfer function with help of the discrete Fourier transform (DFT): $$B(k) = DFT[b(n)]$$ Now the maximum frequency $\omega_m$ you are able to analyze depends on the sampling rate $\omega_s$ with which the samples of $b(t)$ are acquired after the microphone to obtain $b(n)$: $\omega_m = \omega_s/2$. Frequencies greater than $\omega_m$ can neither be measured nor calculated and will influence your result because of the Aliasing effect unless they're filtered with a low pass filter before sampling. An alternative approach is to transmit a signal $A(k)$ that only contains frequencies in the range you're interested. The transfer function for this limited frequency range can then be calculated by $$H(k) = \frac{B(k)}{A(k)}$$ In this case frequencies lying outside this range won't affect your result as long as it's a linear system.
A comment on processing power: the sampling rate influences the clock rate in a real-time system and doesn't affect complexity otherwise. The cost of the DFT operation (implemented by the FFT algorithm) increases with the length $N$ of the recorded signal $b(n)$. The greater $N$ the greater the frequency resolution of $B(k)$.