I am new to dsp and just have a vague understanding of fft process. i know fft is used to convert time to freq domain.... i need to generate a sequence of frequencies such that F=[F1,F2,.....Fn-1] where n=16 and then need to do the ifft of it.... i need these freq sequences to be random... My friend told me that the sequence should have both Cos and sin wave making up (a+ib) an complex waveform.... Because i chose random signal in matlab using command rand and he told it generates random signals but only in positive x axis... he said something about choosing any random points from a circle.. i didn't quite understand what he meant by circle... can someone pls explain in simple words... I browsed all over and found fft only for sin or cos wave... how can i input a complex waveform to the fft so that i get a complex freq sequence becoz i read a fft returns a complex value... so am i supposed to input either sin or cos wave and get a complex output or should i input a complex wave... can someone give me a brief code in matlab since i'm trying to implement on matlab so that i can build on the code.. Also i know we input a time domain signal and th signal is sampled and we get bins which builds the freq.. i'm not quite clear in wat way we r supposed to sample and how it is build.. can someone also give an explanation not involving too much maths... Thank you
The FFT converts a time-domain signal, which is a series of real numbers, into the frequency domain, as a series of complex numbers. The IFFT converts back again - from the frequency to the time domain.
If I understand correctly, you are trying to produce a series of random amplitudes in the frequency domain, so that you get a random signal back in the time domain when you apply the IFFT. However, convential random numbers are all real-valued, not complex.
The result of an FFT is a sequence of complex numbers of the form (x + iy). This is equivalent to the Cartesian coordinates (x, y). However, it is often easier to think of the FFT results in terms of polar coordinates (r, θ). Here, r represents the amplitude and θ the phase.
So one way to do what you want is to generate a random amplitude r, and a random phase 0 ≤ θ < 2π. Then convert that from polar to Cartesian form. Convert the Cartesian pair to a complex number.
As for the circles - once you've picked your amplitude r, then picking the phase θ is effectively picking one point at random around a circle of radius r.
Aside: The only difference between a sine wave and a cosine wave is the phase. If you feed a pure sine wave into an FFT, you will get a particular complex number out. If you feed in a cosine wave of the same frequency and amplitude, the FFT result will have the same amplitude but a different phase.