On 10/13/2011 11:24 PM, manishp wrote:>> On 10/13/2011 1:59 PM, manishp wrote: >> >> ... >> >>> Can you answer one more question I have - >>> >>> Is sampling rate co-related to frequency components of the sampled > signal? >> >> I don't know what co-related means, and we can try to augment our >> vocabularies in another post. To make reconstruction possible, the >> sample rate must be at least a bit higher than the highest frequency in >> the signal being sampled. >> >> Jerry >> -- > > Jerry, > > I am not sure if I am articulating correctly ... > > Assume we get a digital signal by sampling at a specific rate. > Now we know that every signal can be synthesized from individual frequency > components. So, is there a relation between sampling rate and the max > frequency in the individual frequency component ... >I don't understand what you mean by "the max frequency in the individual frequency component". I should think that a "frequency component" is a component at a single frequency .. so there is no "max" involved. Did you say if your application is streaming or batch? You mention "sample rate conversion" and I guess you say the conversion is up and not down and simple or complex. i.e. I would say that 2x or 4x is simple and 3.14 is complex (entailing a step of up-conversion followed by a step of down-conversion or some clever combination of the two. If all you want to do is interpolation by an integer factor then you don't really need to do the zero stuffing in some cases. This works well (efficiently) if there are batch mode blocks and the arrays are large and if the interpolation factor "i" is an integer: Without zero-stuffing, FFT the array of length N. Sample rate is fs. The array starts at zero and ends at fs*(N-1)/N Create a new array that is made up of "i" contiguous versions of the result of the FFT. The new array ends at fs*(i*N-1)/i*N. Zero out all the samples in this new array from fs/2 to i*fs-fs/2. (This is a brute force way of lowpass filtering and is often fine. If there is really a lot of energy around fs/2 then one would question the original samples. If not, then OK. Alternately, multiply the first FFT results with a LPF function first if that seems necessary). IFFT the result. You will have to scale the transform or the result to match the effect of having a longer inverse transform compared to the forward transform. The new time array will have i times the samples and the frequency content will remain "the same as" (but I don't claim absolute equality) as in the original samples. Only you can know how much error can be tolerated. Fred
re-sampling - sample rate conversion
Started by ●October 13, 2011
Reply by ●October 14, 20112011-10-14
Reply by ●October 14, 20112011-10-14
Fred Marshall <fmarshallxremove_the_x@acm.org> wrote: (snip)> I don't understand what you mean by "the max frequency in the individual > frequency component". I should think that a "frequency component" is a > component at a single frequency .. so there is no "max" involved.If you only have one number, isn't it its own maximum? The Fortran MAX function requires at least two arguments, though you can have more. The Fortran MAXVAL function, which takes an array and gives the maximum value in the array, allows for arrays of length 0 or more. For an array of length zero, you get the most negative number of the appropriate type. I believe the confusion comes from the use of the term 'bin' regarding the result of an FFT, similar to the term used in describing histograms. The FFT is not a histogram, though. -- glen
Reply by ●October 14, 20112011-10-14
On 10/14/2011 1:13 PM, glen herrmannsfeldt wrote:> Fred Marshall<fmarshallxremove_the_x@acm.org> wrote: > > (snip) >> I don't understand what you mean by "the max frequency in the individual >> frequency component". I should think that a "frequency component" is a >> component at a single frequency .. so there is no "max" involved. > > If you only have one number, isn't it its own maximum? > > The Fortran MAX function requires at least two arguments, though > you can have more. > > The Fortran MAXVAL function, which takes an array and gives the > maximum value in the array, allows for arrays of length 0 or more. > For an array of length zero, you get the most negative number of > the appropriate type. > > I believe the confusion comes from the use of the term 'bin' > regarding the result of an FFT, similar to the term used in > describing histograms. The FFT is not a histogram, though. > > -- glenGlen, Somehow I think that departs from the OP's issue .. but maybe not. Fred
Reply by ●October 14, 20112011-10-14
Fred Marshall <fmarshallxremove_the_x@acm.org> wrote: (snip on the meaning of MAX, then I wrote)>> I believe the confusion comes from the use of the term 'bin' >> regarding the result of an FFT, similar to the term used in >> describing histograms. The FFT is not a histogram, though.> Somehow I think that departs from the OP's issue .. but maybe not.I don't know, either. Maybe some do consider the FFT output like a histogram, though. -- glen
Reply by ●October 15, 20112011-10-15
On Oct 14, 7:00�pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:>... > > Maybe some do consider the FFT output like a histogram, though. > > -- glenBin means "a large container or enclosed space for storing something in bulk, such as coal, grain, or wool " The use of "bin" for histograms borrows from this meaning. The use of "bin" for FFTs borrows from this meaning. We don't need to invent different terms for coal, grain, wool, amplitudes or frequencies. Dale B. Dalrymple






