DSPRelated.com
Forums

Filter design pls help

Started by Unknown October 22, 2007
I was given a project to design, simulate and synthesize a digital low
pass filter with cutoff frequency 150 Hz and stop band attenuation of
80 db/decade

The filter i have chosen is iir Butterworth filter with order 4
I have relialized the filter using fdatool in matlab
Can any one pls help me with the vhdl code
thx in advance

On Mon, 22 Oct 2007 09:32:33 -0700, sunilammanabrolu wrote:

> I was given a project to design, simulate and synthesize a digital low > pass filter with cutoff frequency 150 Hz and stop band attenuation of > 80 db/decade > > The filter i have chosen is iir Butterworth filter with order 4 > I have relialized the filter using fdatool in matlab > Can any one pls help me with the vhdl code > thx in advance
That's an extremely general request, in that there's a whole bunch of steps to get from a filter definition to a working implementation on an FPGA or ASIC. You really need to tell us what step isn't working for you. In the absence of other information, I would suggest that you start by writing VHDL that implements the filter in simulation, but without trying to make it synthesizable. If you're really at a loss you may want to start by getting the algorithm to work in a spreadsheet, MATLAB, C, or whatever other language you are most comfortable in, then move to VHDL. At any rate, once you get the algorithm working in VHDL in simulation, then you should be able to rewrite it as something that's sythesizeable, and start debugging (and yes, you will be doing some debugging). If you're having trouble with the first step, i.e. going from the z-domain filter to an algorithm, look about 3/4 of the way down in http://www.wescottdesign.com/articles/zTransform/z-transforms.html or in a good reference on practical DSP such as Rick Lyons' "Understanding Digital Signal Processing", in Chapter 6 where he talks about IIR filters. Good luck, and check back here when you figure out just where it is in the process that you're getting stuck. -- Tim Wescott Control systems and communications consulting http://www.wescottdesign.com Need to learn how to apply control theory in your embedded system? "Applied Control Theory for Embedded Systems" by Tim Wescott Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html

sunilammanabrolu@gmail.com wrote:
> I was given a project to design, simulate and synthesize a digital low > pass filter with cutoff frequency 150 Hz and stop band attenuation of > 80 db/decade > > The filter i have chosen is iir Butterworth filter with order 4 > I have relialized the filter using fdatool in matlab > Can any one pls help me with the vhdl code > thx in advance
Do your homework yourself. VLV
On Oct 22, 10:52 pm, Tim Wescott <t...@seemywebsite.com> wrote:
> On Mon, 22 Oct 2007 09:32:33 -0700, sunilammanabrolu wrote: > > I was given a project to design, simulate and synthesize a digital low > > pass filter with cutoff frequency 150 Hz and stop band attenuation of > > 80 db/decade > > > The filter i have chosen is iir Butterworth filter with order 4 > > I have relialized the filter using fdatool in matlab > > Can any one pls help me with the vhdl code > > thx in advance > > That's an extremely general request, in that there's a whole bunch of steps > to get from a filter definition to a working implementation on an FPGA or > ASIC. You really need to tell us what step isn't working for you. > > In the absence of other information, I would suggest that you start by > writing VHDL that implements the filter in simulation, but without trying > to make it synthesizable. If you're really at a loss you may want to > start by getting the algorithm to work in a spreadsheet, MATLAB, C, or > whatever other language you are most comfortable in, then move to VHDL. > > At any rate, once you get the algorithm working in VHDL in simulation, > then you should be able to rewrite it as something that's sythesizeable, > and start debugging (and yes, you will be doing some debugging). > > If you're having trouble with the first step, i.e. going from the z-domain > filter to an algorithm, look about 3/4 of the way down inhttp://www.wescottdesign.com/articles/zTransform/z-transforms.htmlor in a > good reference on practical DSP such as Rick Lyons' "Understanding Digital > Signal Processing", in Chapter 6 where he talks about IIR filters. > > Good luck, and check back here when you figure out just where it is in the > process that you're getting stuck. > > -- > Tim Wescott > Control systems and communications consultinghttp://www.wescottdesign.com > > Need to learn how to apply control theory in your embedded system? > "Applied Control Theory for Embedded Systems" by Tim Wescott > Elsevier/Newnes,http://www.wescottdesign.com/actfes/actfes.html
Thanks Tim i have generated the vhdl cofe using matlab The working implementation our teacher has asked is on FPGAs I dont know anything about FPGAs.He has asked me to work on Modelsim thats all. Can anyone pls help me ...
sunny wrote:
> On Oct 22, 10:52 pm, Tim Wescott <t...@seemywebsite.com> wrote: > >>On Mon, 22 Oct 2007 09:32:33 -0700, sunilammanabrolu wrote: >> >>>I was given a project to design, simulate and synthesize a digital low >>>pass filter with cutoff frequency 150 Hz and stop band attenuation of >>>80 db/decade >> >>>The filter i have chosen is iir Butterworth filter with order 4 >>>I have relialized the filter using fdatool in matlab >>>Can any one pls help me with the vhdl code >>>thx in advance >> >>That's an extremely general request, in that there's a whole bunch of steps >>to get from a filter definition to a working implementation on an FPGA or >>ASIC. You really need to tell us what step isn't working for you. >> >>In the absence of other information, I would suggest that you start by >>writing VHDL that implements the filter in simulation, but without trying >>to make it synthesizable. If you're really at a loss you may want to >>start by getting the algorithm to work in a spreadsheet, MATLAB, C, or >>whatever other language you are most comfortable in, then move to VHDL. >> >>At any rate, once you get the algorithm working in VHDL in simulation, >>then you should be able to rewrite it as something that's sythesizeable, >>and start debugging (and yes, you will be doing some debugging). >> >>If you're having trouble with the first step, i.e. going from the z-domain >>filter to an algorithm, look about 3/4 of the way down inhttp://www.wescottdesign.com/articles/zTransform/z-transforms.htmlor in a >>good reference on practical DSP such as Rick Lyons' "Understanding Digital >>Signal Processing", in Chapter 6 where he talks about IIR filters. >> >>Good luck, and check back here when you figure out just where it is in the >>process that you're getting stuck. >> >>-- >>Tim Wescott >>Control systems and communications consultinghttp://www.wescottdesign.com >> >>Need to learn how to apply control theory in your embedded system? >>"Applied Control Theory for Embedded Systems" by Tim Wescott >>Elsevier/Newnes,http://www.wescottdesign.com/actfes/actfes.html > > > Thanks Tim > i have generated the vhdl cofe using matlab > The working implementation our teacher has asked is on FPGAs > I dont know anything about FPGAs.He has asked me to work on Modelsim > thats all. > Can anyone pls help me ... >
You aren't being clear about exactly what you need help with. Nobody here is going to hand you a solution to turn in. Tim's advice to you was correct. Start by trying to implement the filter in Matlab, then get it to work in some other form of code. C would likely be a good choice because its strucutre is in many ways similar to VHDL, though a spreadsheet would be a better first step to see the math. Modelsim is a VHDL simulator that will allow you to work with the VHDL to determine what kind of results you get without needing to worry about a particular FPGA. This has the advantage of allowing the full VHDL command set, some of which is not synthesizable to logic. If you are having trouble with this part then you should be looking for some tutorials on it. Start with something small. If you are completly over your head and none of this is making sense to you then most it would appear that you have taken on something that you aren't ready to do yet and you need to re-evaluate your courses.
Noway2 wrote:
> sunny wrote: >> On Oct 22, 10:52 pm, Tim Wescott <t...@seemywebsite.com> wrote: >> >>> On Mon, 22 Oct 2007 09:32:33 -0700, sunilammanabrolu wrote: >>> >>>> I was given a project to design, simulate and synthesize a digital low >>>> pass filter with cutoff frequency 150 Hz and stop band attenuation of >>>> 80 db/decade >>> >>>> The filter i have chosen is iir Butterworth filter with order 4 >>>> I have relialized the filter using fdatool in matlab >>>> Can any one pls help me with the vhdl code >>>> thx in advance >>> >>> That's an extremely general request, in that there's a whole bunch of >>> steps >>> to get from a filter definition to a working implementation on an >>> FPGA or >>> ASIC. You really need to tell us what step isn't working for you. >>> >>> In the absence of other information, I would suggest that you start by >>> writing VHDL that implements the filter in simulation, but without >>> trying >>> to make it synthesizable. If you're really at a loss you may want to >>> start by getting the algorithm to work in a spreadsheet, MATLAB, C, or >>> whatever other language you are most comfortable in, then move to VHDL. >>> >>> At any rate, once you get the algorithm working in VHDL in simulation, >>> then you should be able to rewrite it as something that's sythesizeable, >>> and start debugging (and yes, you will be doing some debugging). >>> >>> If you're having trouble with the first step, i.e. going from the >>> z-domain >>> filter to an algorithm, look about 3/4 of the way down >>> inhttp://www.wescottdesign.com/articles/zTransform/z-transforms.htmlor >>> in a >>> good reference on practical DSP such as Rick Lyons' "Understanding >>> Digital >>> Signal Processing", in Chapter 6 where he talks about IIR filters. >>> >>> Good luck, and check back here when you figure out just where it is >>> in the >>> process that you're getting stuck. >>> >>> -- >>> Tim Wescott >>> Control systems and communications >>> consultinghttp://www.wescottdesign.com >>> >>> Need to learn how to apply control theory in your embedded system? >>> "Applied Control Theory for Embedded Systems" by Tim Wescott >>> Elsevier/Newnes,http://www.wescottdesign.com/actfes/actfes.html >> >> >> Thanks Tim >> i have generated the vhdl cofe using matlab >> The working implementation our teacher has asked is on FPGAs >> I dont know anything about FPGAs.He has asked me to work on Modelsim >> thats all. >> Can anyone pls help me ... >> > You aren't being clear about exactly what you need help with. Nobody > here is going to hand you a solution to turn in. Tim's advice to you > was correct. Start by trying to implement the filter in Matlab, then > get it to work in some other form of code. C would likely be a good > choice because its strucutre is in many ways similar to VHDL, though a > spreadsheet would be a better first step to see the math. > > Modelsim is a VHDL simulator that will allow you to work with the VHDL > to determine what kind of results you get without needing to worry about > a particular FPGA. This has the advantage of allowing the full VHDL > command set, some of which is not synthesizable to logic. If you are > having trouble with this part then you should be looking for some > tutorials on it. Start with something small. > > If you are completly over your head and none of this is making sense to > you then most it would appear that you have taken on something that you > aren't ready to do yet and you need to re-evaluate your courses. > >
Or the prof was being unrealistic in his expectations, in which case everyone in the class* will bomb and he'll re-evaluate his assignment, or you'll need to re-evaluate who you take your classes from. * Except for that one irritating guy... -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html