Hello folks, I need to find the cutoff frequency for an incoming audio spectrum 20-20kHz. I also need to know the amplitude. I tried to find info in books and web, ended up finding tons materials. Still dont know what I should be using since I have the info scattered all over the place. Now I am like a lost driver driving in circles, so thought of making a pit stop somewhere and ask for directions. I have couple of ideas in my mind like FFT, convolution, correlations, etc, but I am not sure how to go about it. Appreciate if anyone out there can give me some pointers about this topic. Also please tell what approach I should take to achieve this. Thanks in advance.
frequency response analysis
Started by ●July 8, 2006
Reply by ●July 8, 20062006-07-08
<0xsachin@gmail.com> wrote in message news:1152335470.248393.183570@m73g2000cwd.googlegroups.com...> Hello folks, > > I need to find the cutoff frequency for an incoming audio spectrum > 20-20kHz. I also need to know the amplitude. I tried to find info in > books and web, ended up finding tons materials. Still dont know what I > should be using since I have the info scattered all over the place. Now > I am like a lost driver driving in circles, so thought of making a pit > stop somewhere and ask for directions. > > I have couple of ideas in my mind like FFT, convolution, correlations, > etc, but I am not sure how to go about it. > Appreciate if anyone out there can give me some pointers about this > topic. Also please tell what approach I should take to achieve this. > > Thanks in advance.It appears that you are guaranteed that the bandwidth does not exceed 20kHz. You need to know *what*? amplitude? You've not specified. - Power level of the whole thing? - Amplitude as a function of frequency with what resolution? Spectral? Temporal? (the two compete) You also didn't say whether the "spectrum" or signal is continuous time or sampled. Quick answer: Sample at 50kHz. Take 4096 samples. Compute the FFT of those samples - a complex vector. The sample interval in frequency will be 50,000/4096 Hz. Compute the magnitude of the FFT samples - a real vector. What happens if you use more samples? Fewer samples? Fred
Reply by ●July 8, 20062006-07-08
> It appears that you are guaranteed that the bandwidth does not exceed 20kHz.Yes, because I want to pass a sine sweep input starting from 20kHz to 20Hz through the system that is under evaluation.> You need to know *what*? amplitude? You've not specified. > - Power level of the whole thing? > - Amplitude as a function of frequency with what resolution? Spectral? > Temporal? > (the two compete)I am interested in finding the frequency at which the system down by -3dB, that is I want to find the cutoff frequency. I need to know the amplitude (average or max) of the signal in passband.> You also didn't say whether the "spectrum" or signal is continuous time or > sampled.By "spectrum" I meant the sine sweep 20kHz-20Hz. What are the other signals that can be employed for such kind of evaluations?> Quick answer: > > Sample at 50kHz. > Take 4096 samples. > Compute the FFT of those samples - a complex vector. The sample interval in > frequency will be 50,000/4096 Hz. > Compute the magnitude of the FFT samples - a real vector.What's the reason behind chossing 50kHz sampling frequency? I think I am dealing with 48kHz. Can you please give me some references for this? What should I consider in the FFT that would help me in my findings?> What happens if you use more samples? Fewer samples?I am yet to figure out the buffer size in which the signal gets dropped into, then I would be able fix the number of samples.> Fred
Reply by ●July 8, 20062006-07-08
Responses interspersed below: "DSPing" <0xsachin@gmail.com> wrote in message news:1152390375.282224.204110@75g2000cwc.googlegroups.com...> >> It appears that you are guaranteed that the bandwidth does not exceed >> 20kHz. > > Yes, because I want to pass a sine sweep input starting from 20kHz to > 20Hz through the system that is under evaluation.***OK that makes sense then.> >> You need to know *what*? amplitude? You've not specified. >> - Power level of the whole thing? >> - Amplitude as a function of frequency with what resolution? Spectral? >> Temporal? >> (the two compete) > > I am interested in finding the frequency at which the system down by > -3dB, that is I want to find the cutoff frequency. I need to know the > amplitude (average or max) of the signal in passband.***OK. Well, I wouldn't necessarily call it a "passband" unless the system is a filter. But, OK.> >> You also didn't say whether the "spectrum" or signal is continuous time >> or >> sampled. > > By "spectrum" I meant the sine sweep 20kHz-20Hz. What are the other > signals that can be employed for such kind of evaluations?***It would have been better to say "sine sweep signal". One might use white noise but I'd prefer the sine sweep - as long as the sweep is slow enough. So, the output of the system is continuous I guess.....> >> Quick answer: >> >> Sample at 50kHz. >> Take 4096 samples. >> Compute the FFT of those samples - a complex vector. The sample interval >> in >> frequency will be 50,000/4096 Hz. >> Compute the magnitude of the FFT samples - a real vector. > > What's the reason behind chossing 50kHz sampling frequency? I think I > am dealing with 48kHz.***You need to sample at a rate that is greater than 2X the highest frequency component. You are controlling that part (well, except for noise). I chose 50kHz arbitrarily because it's easy to say you should have 20% or 25% guard band between the signal and half the sample rate so you can do filtering, etc. 50kHz gives 20% guard band - 5kHz of 25kHz. It's not a hard number at all.> Can you please give me some references for this? What should I consider > in the FFT that would help me in my findings? > >> What happens if you use more samples? Fewer samples? > > I am yet to figure out the buffer size in which the signal gets dropped > into, then I would be able fix the number of samples.***The buffer size would be the least of my worries unless I'm highly constrained by the machine doing the work. You don't seem to have a temporal resolution problem here so you might run the sweep so slowly that you can do a few thousand FFTs and have them be essentially at one frequency/band each. The problem with a fast sweep is that you continually generate transients - which is not a complication you need. You are looking for edges in the frequency response so I'd stay away from waveforms that will have their own edge effects. Once you've found the edges you might sweep slowly over the edge. Same as fixing the frequency and making a measurement. If you do that, then there's no need for an FFT at all - and maybe no need for sampling either. Just hook up a Ballantyne (do those still exist?) Fred
Reply by ●July 8, 20062006-07-08
Thank you Fred for the detailed analysis of my situation. Now you said "Just hook up a Ballantyne (do those still exist?)" What is a Ballantyne? Is it a test equipment(Pls forgive my ignorance)? But I need to write a software for a DSP (processor) to do all the findings. How can I do this? Can you recommend me some links where I can more info on this kind of stuff. Here is a rough sketch of the system. |-----------------| |---------------| |System generating| |Digital | |sine sweep |------------>|Signal | | | |Processor | |-----------------| |---------------| Rgds, Sacs
Reply by ●July 8, 20062006-07-08
DSPing wrote:>> It appears that you are guaranteed that the bandwidth does not exceed 20kHz. > > Yes, because I want to pass a sine sweep input starting from 20kHz to > 20Hz through the system that is under evaluation.... The customary (if time-honored) way is measuring and recording the amplitude at the output of the system during the progress of the sweep. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●July 8, 20062006-07-08
DSPing wrote:> Thank you Fred for the detailed analysis of my situation. > > Now you said "Just hook up a Ballantyne (do those still exist?)" > > What is a Ballantyne? Is it a test equipment(Pls forgive my ignorance)?An electronic RMS meter with a log scale. Nice piece of gear!> But I need to write a software for a DSP (processor) to do all the > findings. How can I do this? Can you recommend me some links where I > can more info on this kind of stuff. > > Here is a rough sketch of the system. > > |-----------------| |---------------| > |System generating| |Digital | > |sine sweep |------------>|Signal | > | | |Processor | > |-----------------| |---------------|The DSP should generate the (stepped) sweep as well as measure the network's response to it. Generate a frequency measure and record the response, and move on to the next. A log scale of frequencies is usually most convenient and adequately informative. I don't know what fractional resolution you might find appropriate, but a reasonably fine decade of frequencies might be 20, 22, 24, 27, 30, 33, 36, 39, 43, 47, 51, 56, 62, 68, 75, 82, 91, 100, 110, 120, 130, 150, 160, and 180 Hz. Multiply by ten for the decade 200 to 1800 and by 100 for the third decade. That's 3*24+1 (for the final frequency of 20 KHz). You need an array of 73 elements to record the responses at those frequencies. You can modify those frequencies to make the sequence more closely logarithmic, but there's little to be gained. You may notice that the values I chose differ by about ten percent, and they in fact represent standard values of five-percent resistors. For coarser resolution, use every other value -- the standard values of ten-percent resistors, and for finer resolution (not likely to reveal more significant information) you can use the 96 one-percent values (every other table entry gives two-percent values) in the table at http://www.rfcafe.com/references/electrical/resistor_values.htm. It's senseless to measure the responses at individual frequencies, mash them together somehow, then use a Fourier transform to get back to what you started with. Since the measurement won't be continuous, the sweep needn't be either. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●July 10, 20062006-07-10
in article 1152398846.118396.273340@75g2000cwc.googlegroups.com, DSPing at 0xsachin@gmail.com wrote on 07/08/2006 18:47:> > Here is a rough sketch of the system. > > |-----------------| |---------------| > |System generating| |Digital | > |sine sweep |------------>|Signal | > | | |Processor | > |-----------------| |---------------|Sacs, ASCII art and ASCII math is good on USENET. but you cannot assume someone else's font will match yours in spacing unless you assume everyone is using a monospaced font like "Monoco" (Mac) or, more commonly, Courier. i'm just guessing but i would say you meant it to be: |-----------------| |---------------| |System generating| |Digital | |sine sweep |------------>|Signal | | | |Processor | |-----------------| |---------------| -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by ●July 10, 20062006-07-10
robert bristow-johnson wrote:> in article 1152398846.118396.273340@75g2000cwc.googlegroups.com, DSPing at > 0xsachin@gmail.com wrote on 07/08/2006 18:47: > >> Here is a rough sketch of the system. >> >> |-----------------| |---------------| >> |System generating| |Digital | >> |sine sweep |------------>|Signal | >> | | |Processor | >> |-----------------| |---------------| > > Sacs, > > ASCII art and ASCII math is good on USENET. but you cannot assume someone > else's font will match yours in spacing unless you assume everyone is using > a monospaced font like "Monoco" (Mac) or, more commonly, Courier. > > i'm just guessing but i would say you meant it to be: > > |-----------------| |---------------| > |System generating| |Digital | > |sine sweep |------------>|Signal | > | | |Processor | > |-----------------| |---------------|He used a monospaced font, but with tabs instead of spaces, so when the ">" got tacked on in my response, the post got messed up, although it didn't show up in my composition window. Moral: eschew tabs. (Gesundheit) Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●July 10, 20062006-07-10






