How to design a filter with a given transfer function

I need to design a filter with a given transfer function (one zero, two polls) using filterbuilder. I need to use "Filter Design HDL Coder " toolbox. The spec is available here: http://twitpic.com/6o0ggg I cannot figure out how to do it from filterbuilder or fdatool

 채택된 답변

Honglei Chen
Honglei Chen 2011년 9월 22일
Hi Evgeni,
I guess I misunderstood your question. If you already know your zeros and poles, then you already have the coefficients. So all you need to do is to create a dfilt object based on that and then use generatehdl to generate the HDL code.
z = -1;
p = [0.0948+0.3094i;0.0948-0.3094i];
k = 0.4576;
[s,g] = zp2sos(z,p,k);
hf = dfilt.df2sos(s,g);
generatehdl(hf)
HTH,

댓글 수: 2

Thanks, that works.
Evgeni
how i can use this filter and how to create an axis frequency for that filter?

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Honglei Chen
Honglei Chen 2011년 9월 22일

0 개 추천

Hi Evgeni,
First of all, you will need to describe your response based on your frequency resposne curve. It looks like you know exactly what order you want for the filter, so you can fire up
filterbuilder('lowpass')
choose IIR and then type in those information as well as things like 3dB point.
Once you are happy with the design, you can then click 'Code Generation' panel on the GUI and there you will have option to generate the HDL code.
HTH

댓글 수: 1

Thanks for your answer. It helps, but only partially. I've experimented with parameters in the Lowpass IIR dialog, but wasn't able to get to the frequency response I need. The UI doesn't seem to allow me to specify the location of polls and zeros, and that's exactly what I need.
Sorry for the rookie question.
Evgeni

댓글을 달려면 로그인하십시오.

카테고리

질문:

2011년 9월 20일

댓글:

2021년 1월 13일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by