Hi! I would like to create a filter with an inverse sinc-like form in the passband using the most effective algoritm. For now I using fir2, but I suspect that it is not the most cost efficient method. Is it any? I provide the matlab script that shows the waveform, maybe you can show me how to make a FIR filter (linear) of that? s=0.001; %step size fc=[0:s:0.081]; %passband fs=[0.081+s:s:0.5]; %stopband f=[fc fs]; %frequency vector fr=zeros(1,length(fc)); fr(1)=8; %0Hz gain fr(2:end)=sin(pi*fc(2:end)*R*D)./sin(pi*fc(2:end)) fr=(fr/max(fr)).^N; %f.resp to compensate for fr_inv=1./fr; fr_inv=[fr_inv ones(1,length(fs))] plot(f,20*log10(abs(fr_inv))) ylim([-5 25]) Thanks in advance! /Carl
Arbitrary frequence response
Started by ●February 20, 2008
Reply by ●February 20, 20082008-02-20
>Hi! > >I would like to create a filter with an inverse sinc-like form in the >passband using the most effective algoritm. For now I using fir2, but I >suspect that it is not the most cost efficient method. Is it any? > >I provide the matlab script that shows the waveform, maybe you can showme>how to make a FIR filter (linear) of that? > >s=0.001; %step size > >fc=[0:s:0.081]; %passband >fs=[0.081+s:s:0.5]; %stopband >f=[fc fs]; %frequency vector > >fr=zeros(1,length(fc)); >fr(1)=8; %0Hz gain >fr(2:end)=sin(pi*fc(2:end)*R*D)./sin(pi*fc(2:end)) >fr=(fr/max(fr)).^N; %f.resp to compensate for >fr_inv=1./fr; >fr_inv=[fr_inv ones(1,length(fs))] >plot(f,20*log10(abs(fr_inv))) >ylim([-5 25]) > >Thanks in advance! >/Carl > >Sorry,forgot to set RD=8 ..
Reply by ●February 20, 20082008-02-20
Hi, You could use Remez design (the function is called firpm in matlab) or you could use least square based design (the function name is matlab is called "firls"). I had used firls over remez for performing inverse sinc filtering. and it gave me better results. this was in year 2001. hence i forgot. what improvement i had got. maybe it was more interms of closeness to the desired response with least amount of taps. Regards Bharat Pathak Arithos Designs www.Arithos.com
Reply by ●February 20, 20082008-02-20
On 20 Feb, 08:34, "kungcoccos" <c...@hallqvist.biz> wrote:> Hi! > > I would like to create a filter with an inverse sinc-like form in the > passbandWhat does 'inverse sinc' mean? Are you talking about time domain or frequency domain? Do you know how to design FIR filters by the window method? If so, how is what you want to do different from that method?> using the most effective algoritm. For now I using fir2, but I > suspect that it is not the most cost efficient method. Is it any?A somewhat unique problem. Cost efficiency is usually a very important issue at the *implementation* stage; cost efficiency has not been an issue in design stages for decades. There is no practical difference between a filter specification being computed in 1 s or 100 us. The filter is not computed very often, and a human often has to check afterwards how well the filters fits the application anyway. Rune
Reply by ●February 20, 20082008-02-20
Rune Allnor <allnor@tele.ntnu.no> writes:> On 20 Feb, 08:34, "kungcoccos" <c...@hallqvist.biz> wrote: >> Hi! >> >> I would like to create a filter with an inverse sinc-like form in the >> passband > > What does 'inverse sinc' mean? Are you talking about time domain > or frequency domain? Do you know how to design FIR filters by > the window method? If so, how is what you want to do different > from that method? > >> using the most effective algoritm. For now I using fir2, but I >> suspect that it is not the most cost efficient method. Is it any? > > A somewhat unique problem. Cost efficiency is usually a > very important issue at the *implementation* stage; cost > efficiency has not been an issue in design stages for > decades.You're being too pedantic/anal, Rune (good in design, bad in human interaction). The OP probably meant "implementation efficiency" - it seems to make more sense given the context. -- % Randy Yates % "With time with what you've learned, %% Fuquay-Varina, NC % they'll kiss the ground you walk %%% 919-577-9882 % upon." %%%% <yates@ieee.org> % '21st Century Man', *Time*, ELO http://www.digitalsignallabs.com
Reply by ●February 20, 20082008-02-20
On 20 Feb, 13:36, Randy Yates <ya...@ieee.org> wrote:> Rune Allnor <all...@tele.ntnu.no> writes: > > On 20 Feb, 08:34, "kungcoccos" <c...@hallqvist.biz> wrote: > >> Hi! > > >> I would like to create a filter with an inverse sinc-like form in the > >> passband > > > What does 'inverse sinc' mean? Are you talking about time domain > > or frequency domain? Do you know how to design FIR filters by > > the window method? If so, how is what you want to do different > > from that method? > > >> using the most effective algoritm. For now I using fir2, but I > >> suspect that it is not the most cost efficient method. Is it any? > > > A somewhat unique problem. Cost efficiency is usually a > > very important issue at the *implementation* stage; cost > > efficiency has not been an issue in design stages for > > decades. > > You're being too pedantic/anal, Rune (good in design, bad in human > interaction). The OP probably meant "implementation efficiency" - it > seems to make more sense given the context.If I need to use terms like 'probably' and 'seem' to understand a question, I ask for clarifications. If you think that is too pedantical then that's your problem. Rune
Reply by ●February 20, 20082008-02-20
kungcoccos wrote:> Hi! > > I would like to create a filter with an inverse sinc-like form in the > passband using the most effective algoritm. For now I using fir2, but I > suspect that it is not the most cost efficient method. Is it any?What is your cost efficiency function? Is there a zero in the part of the sinc-frequency response that you want to invert? Regards, Andor
Reply by ●February 20, 20082008-02-20
kungcoccos wrote:> Hi! > > I would like to create a filter with an inverse sinc-like form in the > passband using the most effective algoritm.Actually what you need is equalize the frequency rolloff of sinc up to some frequency, right? This is a typical problem and you can find many canned solutions. Or you can tackle the problem directly with Parks-Mclellan or by deconvolution in the time domain. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by ●February 20, 20082008-02-20
Rune Allnor <allnor@tele.ntnu.no> writes:> On 20 Feb, 13:36, Randy Yates <ya...@ieee.org> wrote: >> Rune Allnor <all...@tele.ntnu.no> writes: >> > On 20 Feb, 08:34, "kungcoccos" <c...@hallqvist.biz> wrote: >> >> Hi! >> >> >> I would like to create a filter with an inverse sinc-like form in the >> >> passband >> >> > What does 'inverse sinc' mean? Are you talking about time domain >> > or frequency domain? Do you know how to design FIR filters by >> > the window method? If so, how is what you want to do different >> > from that method? >> >> >> using the most effective algoritm. For now I using fir2, but I >> >> suspect that it is not the most cost efficient method. Is it any? >> >> > A somewhat unique problem. Cost efficiency is usually a >> > very important issue at the *implementation* stage; cost >> > efficiency has not been an issue in design stages for >> > decades. >> >> You're being too pedantic/anal, Rune (good in design, bad in human >> interaction). The OP probably meant "implementation efficiency" - it >> seems to make more sense given the context. > > If I need to use terms like 'probably' and 'seem' to understand > a question, I ask for clarifications. If you think that is > too pedantical then that's your problem.I think asking for clarification is good. However, I didn't see you asking anything with respect to the efficiency issue. What I saw is you hammering someone for not asking a question in precisely the right way. -- % Randy Yates % "She tells me that she likes me very much, %% Fuquay-Varina, NC % but when I try to touch, she makes it %%% 919-577-9882 % all too clear." %%%% <yates@ieee.org> % 'Yours Truly, 2095', *Time*, ELO http://www.digitalsignallabs.com
Reply by ●February 20, 20082008-02-20
On Feb 19, 11:34 pm, "kungcoccos" <c...@hallqvist.biz> wrote:> Hi! > > I would like to create a filter with an inverse sinc-like form in the > passband using the most effective algoritm. For now I using fir2, but I > suspect that it is not the most cost efficient method. Is it any? > > I provide the matlab script that shows the waveform, maybe you can show me > how to make a FIR filter (linear) of that? > > s=0.001; %step size > > fc=[0:s:0.081]; %passband > fs=[0.081+s:s:0.5]; %stopband > f=[fc fs]; %frequency vector > > fr=zeros(1,length(fc)); > fr(1)=8; %0Hz gain > fr(2:end)=sin(pi*fc(2:end)*R*D)./sin(pi*fc(2:end)) > fr=(fr/max(fr)).^N; %f.resp to compensate for > fr_inv=1./fr; > fr_inv=[fr_inv ones(1,length(fs))] > plot(f,20*log10(abs(fr_inv))) > ylim([-5 25]) > > Thanks in advance!A Sinc frequency response has a bunch of equally spaced zeros on the unit circle. The reciprocal would have a bunch of equally spaced poles on the unit circle: not stable, and not easy to approximate with a zeros only FIR filter. If you clip the zeros to above some floor, deconvolution of the reciprocal might give you something. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M






