Saturday, August 8, 2009

Convert to a frequency in Hz from a frequency domain?

A signal and system problem.



How%26#039;s it convert to a frequency in Hz from a frequency domain given in complex number format eg a+jb?



Please help



Convert to a frequency in Hz from a frequency domain?





Apologies for repeating my answer to another of your questions, but a complex number is just that - a number. It doesn%26#039;t contain a frequency, and so there is no conversion between the two.



From your other questions I%26#039;d hazard a guess that you%26#039;re learning Fourier transforms (and DFTs, FFTs etc.). Maybe I can answer your question best from that angle. That makes this a long answer, so if I%26#039;ve guessed wrong then you may not want to bother reading further. Oh, and apologies if this all sounds patronising...



A DFT is used to convert a set of data from one domain (e.g. time samples) into a set of data in another domain (e.g. frequencies). These %26quot;sets of data%26quot; are sets of numbers (which may be complex). The important thing is that the frequency domain is given by the _set_ of numbers, and not by any single number (complex or not).



The DFT is usually written out in text books for a single frequency (e.g. S(w) = sum[s(t) * exp(-jwt)], where the sum is over all t and * is %26quot;times%26quot;). This is a comparison (technically the %26quot;correlation%26quot;) of your input s(t) with a SINGLE (complex) sinewave of frequency w. However, to get a full spectrum you need to repeat this for all w (giving you one value of S for each w). The FFT does this very efficiently.



The magnitude of S that you get from one application of the DFT (i.e. one w) will tell you how similar s(t) is to sin(w) (well, actually exp(jwt)). This would be (a^2 + b^2) if S = a + jb.



There will also be a angle component (arctan(b/a)) which tells you the phase-difference between this reference sinewave and the component of your signal which has frequency %26quot;w%26quot;.



So, the closest I can get to an answer is this: given a SET of complex numbers (each one computed with a different value of w) find the one with the maximum magnitude (using (a^2 + b^2) for each one). The value of %26quot;w%26quot; that you used to compute this number is the frequency (assuming your input was a pure sinewave).



If you used something like an FFT, things are slightly trickier since %26quot;w%26quot; is hidden from you, but the frequencies are evenly spread between 0Hz and half the sampling rate - so if you have N values in your input, you%26#039;ll also have N values in your output, and the nth value will be n/N times the distance between 0 and Fs/2... so frequency = (n/N)*(Fs/2) = (n*Fs)/(2*N) (Fs = sampling frequency).



Convert to a frequency in Hz from a frequency domain?



http://www.pscpower.com/pages/frequency%...



That web site will convert it for you.



Other Replys:Multiply Hz by 2 pi and you%26#039;ll get omega.

0 comments:

Post a Comment