DSPRelated.com
Forums

Arbitrary Amplitude FIRs

Started by westocl March 10, 2008
Phase cloning claims to be able to trace out any arbitrary amplitude
response with an FIR linear phase filter.

I am still working with 200 coefficents to do it (granted most dont take
that many but that how the code is set up).

To prove it. Send a function of your choosing.  i.e.
5*exp(-3w)*cos(2pi*w). it doesnt matter. And i will send the coeffiencts
back that approximately trace out that function vs w (up until nyquest) of
course.  

(obviously, the fuction cant take on negative vaues or cant go to exactly
zero).
westocl wrote:
> Phase cloning claims to be able to trace out any arbitrary amplitude > response with an FIR linear phase filter.
I hope you realize that a linear-phase FIR (transversal) filter necessarily has end-for-end symmetry, and that such symmetry guarantees linear phase.
> I am still working with 200 coefficents to do it (granted most dont take > that many but that how the code is set up). > > To prove it. Send a function of your choosing. i.e. > 5*exp(-3w)*cos(2pi*w). it doesnt matter. And i will send the coeffiencts > back that approximately trace out that function vs w (up until nyquest) of > course.
Try exp(-Kn), where n is the sample number -- analog of time -- and K is a constant of your choosing. (Didn't you write that you were through posting here?)
> (obviously, the fuction cant take on negative vaues or cant go to exactly > zero).
Why not? It isn't obvious to me. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
>westocl wrote: >> Phase cloning claims to be able to trace out any arbitrary amplitude >> response with an FIR linear phase filter. > >I hope you realize that a linear-phase FIR (transversal) filter >necessarily has end-for-end symmetry, and that such symmetry guarantees >linear phase. > >> I am still working with 200 coefficents to do it (granted most dont
take
>> that many but that how the code is set up). >> >> To prove it. Send a function of your choosing. i.e. >> 5*exp(-3w)*cos(2pi*w). it doesnt matter. And i will send the
coeffiencts
>> back that approximately trace out that function vs w (up until nyquest)
of
>> course. > >Try exp(-Kn), where n is the sample number -- analog of time -- and K is
>a constant of your choosing. (Didn't you write that you were through >posting here?) > >> (obviously, the fuction cant take on negative vaues or cant go to
exactly
>> zero). > >Why not? It isn't obvious to me. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >???????????????????????????????????????????????????????????????????????
Ok. I used K = .009. Can we do another?? this one is too easy. I want one thats wacky. (remember this is dual sideband so multiply the amplitude by 2). and compare it to our origional function exp(-Kn) -0.001662246192822 -0.001680173414496 -0.001698484370503 -0.001717191595429 -0.001736308175191 -0.001755847777658 -0.001775824685331 -0.00179625383024 -0.001817150831258 -0.001838532034004 -0.001860414553553 -0.001882816320207 -0.001905756128548 -0.001929253690085 -0.001953329689791 -0.001978005846858 -0.002003304980071 -0.002029251078177 -0.002055869375743 -0.002083186434958 -0.002111230233982 -0.002140030262414 -0.002169617624587 -0.002200025151434 -0.002231287521769 -0.002263441393915 -0.002296525548725 -0.002330581045167 -0.002365651389759 -0.002401782721333 -0.002439024012751 -0.002477427291418 -0.002517047880663 -0.002557944664324 -0.00260018037717 -0.00264382192415 -0.00268894073185 -0.002735613136009 -0.002783920809466 -0.002833951235531 -0.002885798232493 -0.002939562535807 -0.002995352445465 -0.003053284547202 -0.003113484517511 -0.003176088024015 -0.003241241734573 -0.003309104450694 -0.003379848383414 -0.003453660592875 -0.003530744616511 -0.003611322315161 -0.003695635971732 -0.003783950683381 -0.00387655709599 -0.003973774539026 -0.004075954630438 -0.004183485435247 -0.004296796278834 -0.004416363337344 -0.004542716154199 -0.004676445264939 -0.004818211154251 -0.004968754821525 -0.005128910297849 -0.005299619542134 -0.005481950252659 -0.005677117270317 -0.005886508431089 -0.006111715961462 -0.006354574819807 -0.006617209793786 -0.006902093702117 -0.007212119762994 -0.007550692140481 -0.007921839940599 -0.008330361594533 -0.008782008739858 -0.009283721473148 -0.009843930174561 -0.010472942624307 -0.011183437538904 -0.011991083442229 -0.012915285510601 -0.013980007093989 -0.015214455725849 -0.01665301303657 -0.018332667662928 -0.020283216309274 -0.022498185511985 -0.024855658045458 -0.026914626200277 -0.027492998834891 -0.02421019806972 -0.014058161772641 0.003128886613323 0.019860176101425 0.02720409682522 0.027141341231831 0.024993010396836 0.022595490273249 0.020336731659875 0.018352337913058 0.016654714452036 0.015206029327545 0.013965442230204 0.012897232284465 0.011971124115952 0.01116247824067 0.010451532173024 0.009822400831816 0.009262269032883 0.008760746255197 0.008309351282214 0.007901112279501 0.007530257977673 0.007191977968675 0.006882235994263 0.006597623810917 0.006335246080128 0.006092629102782 0.005867647986362 0.005658468142097 0.005463497991635 0.005281350498484 0.005110811690569 0.004950814755488 0.004800418604678 0.004658790042265 0.004525188857921 0.004398955304451 0.004279499530446 0.004166292623775 0.004058858988659 0.003956769831898 0.003859637575629 0.003767111047363 0.003678871324716 0.003594628133743 0.003514116717123 0.003437095102552 0.0033633417132 0.003292653271482 0.00322484295517 0.003159738771225 0.003097182118055 0.003037026511303 0.002979136451939 0.002923386418505 0.00286965996798 0.002817848931869 0.002767852695998 0.002719577554048 0.002672936126183 0.002627846835282 0.002584233434234 0.002542024578592 0.002501153439611 0.002461557353279 0.002423177501524 0.002385958622194 0.002349848744847 0.002314798949705 0.002280763147448 0.002247697877779 0.002215562124914 0.002184317148376 0.002153926327629 0.002124355019248 0.002095570425466 0.002067541473061 0.002040238701636 0.002013634160463 0.001987701313136 0.001962414949347 0.00193775110318 0.001913686977358 0.001890200872961 0.001867272124137 0.001844881037424 0.001823008835281 0.001801637603511 0.001780750242264 0.001760330420328 0.001740362532467 0.001720831659564 0.001701723531361 0.001683024491594 0.001664721465357 0.001646801928514 0.001629253879034 0.001612065810082 0.001595226684765 0.001578725912405 0.001562553326229 0.001546699162392 0.001531154040222 0.001515908943627 0.001500955203561 0.001486284481499
On Mar 10, 9:36 am, "westocl" <cwest...@hotmail.com> wrote:
> Phase cloning claims to be able to trace out any arbitrary amplitude > response with an FIR linear phase filter.
...
> (obviously, the fuction cant take on negative vaues or cant go to exactly > zero).
So you can't do notch filters? That's also a common problem when using Cepstral methods to design filters with various (min/max) phase characteristics. IMHO. YMMV.
"Jerry Avins" <jya@ieee.org> wrote in message 
news:A8WdnXbjufNP6UjanZ2dnUVZ_q2hnZ2d@rcn.net...
> westocl wrote: >> Phase cloning claims to be able to trace out any arbitrary amplitude >> response with an FIR linear phase filter. > > I hope you realize that a linear-phase FIR (transversal) filter > necessarily has end-for-end symmetry, and that such symmetry guarantees > linear phase. > >> I am still working with 200 coefficents to do it (granted most dont take >> that many but that how the code is set up). >> >> To prove it. Send a function of your choosing. i.e. >> 5*exp(-3w)*cos(2pi*w). it doesnt matter. And i will send the coeffiencts >> back that approximately trace out that function vs w (up until nyquest) >> of >> course. > > Try exp(-Kn), where n is the sample number -- analog of time -- and K is a > constant of your choosing. (Didn't you write that you were through posting > here?) > >> (obviously, the fuction cant take on negative vaues or cant go to exactly >> zero). > > Why not? It isn't obvious to me. > > Jerry > -- > Engineering is the art of making what you want from things you can get. > &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
We get so used to using the FFT or FT in constructing frequency domain functions that it's often overlooked that they can almost as readily be constructed using sincs. And, that way, we can view any frequency domain function (with suitable symmetry) as a sum of sincs whose inverse transform is a "window" or FIR filter with length corresponding to the particular sincs. It's the sampling theorem in reverse and the basis for the windowing method of filter design. But it's not limited to filter design. I often find it *much* easier to envision a frequency function built of sincs than one that's built of cosines. Each has their place. Of course, a sinc is a sum of cosines so it's only a matter of formulation and visualization and not one of any difference. It's the sampling theorem but expressed as a summation or transform. So, "arbitrary" isn't all that surprising and is only limited by the sampling interval. And, having zeros on the sample points is OK. And, having negative values is OK as well - as long as one decides to deal with a purely real frequency function - which implies symmetry in time ... linear phase that's zero. Then you have to decide if things are continuous or discrete / periodic, finite / of infinite extent, and use the formulations particular for those conditions; e.g. sinc or Dirichlet?? Obviously I've left out lots of details here.... Fred
>On Mar 10, 9:36 am, "westocl" <cwest...@hotmail.com> wrote: >> Phase cloning claims to be able to trace out any arbitrary amplitude >> response with an FIR linear phase filter. >... >> (obviously, the fuction cant take on negative vaues or cant go to
exactly
>> zero). > >So you can't do notch filters? That's also a common >problem when using Cepstral methods to design filters >with various (min/max) phase characteristics. > > >IMHO. YMMV. >
Send me 200 points from the plot of your favorite notch filter and we shall see what we can do. (remember amplitude, not the dB) number. The more resolution, the more your filter looks like your function! my problem isnt with notches(i dont think). my problem is with the number '0' LOL.
westocl wrote:
>> westocl wrote: >>> Phase cloning claims to be able to trace out any arbitrary amplitude >>> response with an FIR linear phase filter. >> I hope you realize that a linear-phase FIR (transversal) filter >> necessarily has end-for-end symmetry, and that such symmetry guarantees >> linear phase. >> >>> I am still working with 200 coefficents to do it (granted most dont > take >>> that many but that how the code is set up). >>> >>> To prove it. Send a function of your choosing. i.e. >>> 5*exp(-3w)*cos(2pi*w). it doesnt matter. And i will send the > coeffiencts >>> back that approximately trace out that function vs w (up until nyquest) > of >>> course. >> Try exp(-Kn), where n is the sample number -- analog of time -- and K is > >> a constant of your choosing. (Didn't you write that you were through >> posting here?) >> >>> (obviously, the fuction cant take on negative vaues or cant go to > exactly >>> zero). >> Why not? It isn't obvious to me.
...
> Ok. I used K = .009. Can we do another?? this one is too easy. I want > one thats wacky. (remember this is dual sideband so multiply the amplitude > by 2). and compare it to our origional function exp(-Kn) > > -0.001662246192822 > -0.001680173414496 > -0.001698484370503
...
> 0.001515908943627 > 0.001500955203561 > 0.001486284481499
The coefficients aren't end-for-end symmetric so this isn't linear phase. Nor are they end-for-end antisymmetric so this isn't linear phase with an extra 90-degree shift. It may be easy, but it isn't right. How do sidebands relate to this? I thought it was baseband. What modulates the signal? You haven't explained why the function must be everywhere greater than zero, or why that should be obvious. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
>westocl wrote: >>> westocl wrote: >>>> Phase cloning claims to be able to trace out any arbitrary amplitude >>>> response with an FIR linear phase filter. >>> I hope you realize that a linear-phase FIR (transversal) filter >>> necessarily has end-for-end symmetry, and that such symmetry
guarantees
>>> linear phase. >>> >>>> I am still working with 200 coefficents to do it (granted most dont >> take >>>> that many but that how the code is set up). >>>> >>>> To prove it. Send a function of your choosing. i.e. >>>> 5*exp(-3w)*cos(2pi*w). it doesnt matter. And i will send the >> coeffiencts >>>> back that approximately trace out that function vs w (up until
nyquest)
>> of >>>> course. >>> Try exp(-Kn), where n is the sample number -- analog of time -- and K
is
>> >>> a constant of your choosing. (Didn't you write that you were through >>> posting here?) >>> >>>> (obviously, the fuction cant take on negative vaues or cant go to >> exactly >>>> zero). >>> Why not? It isn't obvious to me. > > ... > >> Ok. I used K = .009. Can we do another?? this one is too easy. I
want
>> one thats wacky. (remember this is dual sideband so multiply the
amplitude
>> by 2). and compare it to our origional function exp(-Kn) >> >> -0.001662246192822 >> -0.001680173414496 >> -0.001698484370503 > ... >> 0.001515908943627 >> 0.001500955203561 >> 0.001486284481499 > >The coefficients aren't end-for-end symmetric so this isn't linear >phase. Nor are they end-for-end antisymmetric so this isn't linear phase
>with an extra 90-degree shift. It may be easy, but it isn't right. > >How do sidebands relate to this? I thought it was baseband. What >modulates the signal? > >You haven't explained why the function must be everywhere greater than >zero, or why that should be obvious. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >???????????????????????????????????????????????????????????????????????
We'll when i call my responses 'linear', i mean the groupdelay is approximately constant which indeed it is. They are not symmetric, thats why I feel that the responses are interesting.
>How do sidebands relate to this?
I just meant the function i tried to approximate had a max amplitude of 1 and the one created with the filter obviously creates a positive and negative frequency components whose amplitudes are each .5
>You haven't explained why the function must be everywhere greater than >zero, or why that should be obvious.
This is not so straight forward. but i shall try to explain....after other things happen, Im kinda piecing back together a fourier series with the added constraint that the phases must add up in a specific order. The algorithm treats every pice of the puzzle with equal importance., so if i shall allow it to go after this zero amplitude case its error in approximating the origional function at that point vs the point previous to it will be infinite and it will want to quit and give me something bogus., There are ways of getting around that, but at this point im more interested in seening what it can do vs what makes it quit. If i could get zero, I could build a brick wall linearphase filter. Currently i can get 300 dB from a 200pt filter with corner .25Fs given 200 taps. on another note, if we should allow it to run 2000 points... the phase cloning response will have been almost perfect.
westocl wrote:

   ...

>> The coefficients aren't end-for-end symmetric so this isn't linear >> phase.
...
>> How do sidebands relate to this? I thought it was baseband. What >> modulates the signal? >> >> You haven't explained why the function must be everywhere greater than >> zero, or why that should be obvious.
...
> We'll when i call my responses 'linear', i mean the group delay is > approximately constant which indeed it is. They are not symmetric, thats > why I feel that the responses are interesting.
A little advice: when you make a startling claim, give words their normal meanings. When you mean "almost", say so.
>> How do sidebands relate to this? > > I just meant the function i tried to approximate had a max amplitude of 1 > and the one created with the filter obviously creates a positive and > negative frequency components whose amplitudes are each .5
I'm not clear what you're doing. The coefficients of your filter are all real, so a real input will produce a real output. Moreover, filters modify the frequency content of a signal, but you asked for a time response and I gave you one. I'm not sure what you did with it or what you expect the result to represent. How do negative frequencies enter into this?
>> You haven't explained why the function must be everywhere greater than >> zero, or why that should be obvious. > > This is not so straight forward. but i shall try to explain....after other > things happen, Im kinda piecing back together a fourier series with the > added constraint that the phases must add up in a specific order. The > algorithm treats every pice of the puzzle with equal importance., so if i > shall allow it to go after this zero amplitude case its error in > approximating the origional function at that point vs the point previous > to it will be infinite and it will want to quit and give me something > bogus., There are ways of getting around that, but at this point im more > interested in seening what it can do vs what makes it quit. > > If i could get zero, I could build a brick wall linearphase filter. > Currently i can get 300 dB from a 200pt filter with corner .25Fs given 200 > taps.
You have numerical difficulties with zero that the standard workarounds won't deal with. What's with negative numbers?
> on another note, if we should allow it to run 2000 points... the phase > cloning response will have been almost perfect.
So why don't you? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Mar 10, 2:01 pm, "westocl" <cwest...@hotmail.com> wrote:
> ... i shall try to explain....after other > things happen, Im kinda piecing back together a fourier series with the > added constraint that the phases must add up in a specific order.
Have you checked the amplitude and phase response of these filters with frequencies between those of the Fourier series used in your construction? One problem with IFFT constructed filters and such is that the continuous response between the frequency bins can have a large amount of ripple not directly apparent at just the sample points. IMHO. YMMV.