
#1
Jan1009, 12:11 AM

P: 6

Hello,
I am trying to understand how this graph http://en.wikipedia.org/wiki/File:Bandwidth_2.svg gets plotted. My goal is to write a small program that takes the center frequency/bandwidth and a (cut/boost) gain values and plot the curve. I initially assumed, all I needed to find was an equation of gain in terms of frequency to plot it. I have been searching for a few weeks now and I keep running into transfer functions and many different types of them. But I dont understand how this translates into a gain(yaxis) vs freq(xaxis) plot. For example, I found the following equation at http://www.musicdsp.org/files/AudioEQCookbook.txt b0 + b1*z^1 + b2*z^2 H(z) =  (Eq 1) a0 + a1*z^1 + a2*z^2 the a0,a1,a2,b0,b1,b2 are calculated in terms of frequency/gain/bandwidth. On plotting H(z) I get something that looks like a bandpass filter curve but what does H(z) and z represent? I dont have an electrical engineering/math background but am really interested in understanding how this bandpass curve gets drawn. Any advice on how to go about this would be greatly appreciated. Thanks! 



#2
Jan1009, 04:23 AM

P: 708

What programming language do you intend to use to write your plotting program?
The function H(z) is simply the transfer function itself. The z is the frequency variable. The symbol z is customarily used for digital filters. For analog filters, it's customary to use the variable s, so your transfer function might be denoted H(s). Do you understand complex arithmetic? The plotting of frequency responses from given transfer functions is most conveniently done using complex arithmetic. It is possible to convert typical transfer functions to a form that doesn't involve complex arithmetic, but they then become very much more complicated. 



#3
Jan1009, 10:23 AM

P: 6

Thanks for the response. I have done complex arithmetic in college, but have never found a use for it since. I dont mind dusting out the cobwebs if it makes plotting the curve simpler. I am just not very sure where to start.
As to the language, I would use C# or python. I have seen audio apps where the user interface allows graphical manipulation of the wave by picking a center frequency, setting a db level and the pass band. I would like to do something like that. 



#4
Jan1009, 03:14 PM

P: 708

How to plot frequency vs gain for a filter?
Have a look at this:
http://jegyzet.sth.sze.hu/ftp/!BSc/S...ika/BodePl.pdf This reference should help a lot. Usually one uses an application like Matlab to do these kind of plots. It has builtin functions for the purpose. It certainly can be done in C# or Python, but it won't be as easy. Here is a program to do Bode plots. I don't know if the author's source code is available, but maybe you can contact him about it. http://www.bode.cg.yu/ Part of your problem beyond just learning how to do the plots will be how to get the transfer function for your desired filter with explicit parameters for center frequency/bandwidth and (cut/boost) gain values. 



#5
Jan1209, 12:06 PM

P: 6





#6
Jan1309, 12:52 AM

P: 708

Have a look at this:
http://www.duncanamps.com/tsc/index.html and this: http://www.standrews.ac.uk/~jcgl/Sc...Java/twin.html They should give you some ideas for doing what you want to do. 


Register to reply 
Related Discussions  
Why is the bandwidth of the RF filter is wider compared to that of an IF Filter?  General Engineering  4  
DSP  Frequency Response of an FIR Filter  Engineering, Comp Sci, & Technology Homework  3  
more than one gain crossover frequency  Electrical Engineering  1  
Series RLC filter (trap filter)  Introductory Physics Homework  7  
Just one little question on the frequency band of the series RLC filter  Introductory Physics Homework  1 