Hello, as I am not an expert I am asking help to transform the IIR Coefficients of a Low Pass Butterworth 6 poles filter to Band Pass and Stop. I coded my application in C and after performing the computation of the normalized coefficient with normalized frequency of 1 Hz, I performed the low pass to low pass transform and the low pass to high pass transform obtaining the new coefficients. (To that I used a commercial library but in it I am not able to find the others transform). Then I performed the filtering of data with success. After I need to transform the normalized coefficients to band pass and band stop but I have no idea of how to do it. Does anybody can help me with C code, examples, everything can help me, to transform the low pass normalized coefficients to band pass and stop ? Thanks in advance
Band Pass & Stop Band Filter Coef Transform from Low Pass
Started by ●October 27, 2009
Reply by ●October 27, 20092009-10-27
On Oct 27, 12:08=A0pm, "pdvmipv" <luigino.pagan...@agustawestland.com> wrote:> Hello, > as I am not an expert I am asking help to transform the IIR Coefficients > of a Low Pass Butterworth 6 poles filter to Band Pass and Stop. > I coded my application in C and after performing the computation of the > normalized coefficient with normalized frequency of 1 Hz, I performed the > low pass to low pass transform and the low pass to high pass transform > obtaining the new coefficients. (To that I used a commercial library but =in> it I am not able to find the others transform). Then I performed the > filtering of data with success. After I need to transform the normalized > coefficients to band pass and band stop but I have no idea of how to do > it. > Does anybody can help me with C code, examples, everything can help me, t=o> transform the low pass normalized coefficients to band pass and stop ? > Thanks in advanceThe book "Discrete-Time Signal Processing" by Oppenheim and Schafer has the transformation equations for converting lowpass to bandpass and highpass and bandstop filters. I have the 1989 version and the details you want start on page 430. IHTH, Clay
Reply by ●October 27, 20092009-10-27
On 27 Okt, 17:08, "pdvmipv" <luigino.pagan...@agustawestland.com> wrote:> Hello, > as I am not an expert I am asking help to transform the IIR Coefficients > of a Low Pass Butterworth 6 poles filter to Band Pass and Stop. > I coded my application in C and after performing the computation of the > normalized coefficient with normalized frequency of 1 Hz, I performed the > low pass to low pass transform and the low pass to high pass transform > obtaining the new coefficients. (To that I used a commercial library but in > it I am not able to find the others transform). Then I performed the > filtering of data with success. After I need to transform the normalized > coefficients to band pass and band stop but I have no idea of how to do > it. > Does anybody can help me with C code, examples, everything can help me, to > transform the low pass normalized coefficients to band pass and stop ? > Thanks in advanceThe book by Proakis and Manolakis has the transforms, but be warned that the editions up to and including the 3rd contain typos. The typos were corrected for the 4th edition. Rune
Reply by ●October 27, 20092009-10-27
>On 27 Okt, 17:08, "pdvmipv" <luigino.pagan...@agustawestland.com> >wrote: >> Hello, >> as I am not an expert I am asking help to transform the IIRCoefficients>> of a Low Pass Butterworth 6 poles filter to Band Pass and Stop. >> I coded my application in C and after performing the computation ofthe>> normalized coefficient with normalized frequency of 1 Hz, I performedthe>> low pass to low pass transform and the low pass to high pass transform >> obtaining the new coefficients. (To that I used a commercial librarybut in>> it I am not able to find the others transform). Then I performed the >> filtering of data with success. After I need to transform thenormalized>> coefficients to band pass and band stop but I have no idea of how todo>> it. >> Does anybody can help me with C code, examples, everything can help me,to>> transform the low pass normalized coefficients to band pass and stop ? >> Thanks in advance > >The book by Proakis and Manolakis has the transforms, but be >warned that the editions up to and including the 3rd contain >typos. The typos were corrected for the 4th edition. > >Rune >If anybody have already performed such a transformation and have a C code or in other language please send it to me. I have already took a look at the first book but as I am not an expert I do not understand how to implement the transfomation with a programming language. Thanks in advance
Reply by ●October 27, 20092009-10-27
On 27 Okt, 20:12, "pdvmipv" <luigino.pagan...@agustawestland.com> wrote:> >On 27 Okt, 17:08, "pdvmipv" <luigino.pagan...@agustawestland.com> > >wrote: > >> Hello, > >> as I am not an expert I am asking help to transform the IIR > Coefficients > >> of a Low Pass Butterworth 6 poles filter to Band Pass and Stop. > >> I coded my application in C and after performing the computation of > the > >> normalized coefficient with normalized frequency of 1 Hz, I performed > the > >> low pass to low pass transform and the low pass to high pass transform > >> obtaining the new coefficients. (To that I used a commercial library > but in > >> it I am not able to find the others transform). Then I performed the > >> filtering of data with success. After I need to transform the > normalized > >> coefficients to band pass and band stop but I have no idea of how to > do > >> it. > >> Does anybody can help me with C code, examples, everything can help me, > to > >> transform the low pass normalized coefficients to band pass and stop ? > >> Thanks in advance > > >The book by Proakis and Manolakis has the transforms, but be > >warned that the editions up to and including the 3rd contain > >typos. The typos were corrected for the 4th edition. > > >Rune > > If anybody have already performed such a transformation and have a C code > or in other language please send it to me. I have already took a look at > the first book but as I am not an expert I do not understand how to > implement the transfomation with a programming language.The trick is to keep the filter on a biquad representation (as a set of fractions of 2nd order polynomials) and not multiply out the whole expressions. If you do that, the transforms are trivial - albeit tedious. Rune
Reply by ●October 28, 20092009-10-28
>On 27 Okt, 20:12, "pdvmipv" <luigino.pagan...@agustawestland.com> >wrote: >> >On 27 Okt, 17:08, "pdvmipv" <luigino.pagan...@agustawestland.com> >> >wrote: >> >> Hello, >> >> as I am not an expert I am asking help to transform the IIR >> Coefficients >> >> of a Low Pass Butterworth 6 poles filter to Band Pass and Stop. >> >> I coded my application in C and after performing the computation of >> the >> >> normalized coefficient with normalized frequency of 1 Hz, Iperformed>> the >> >> low pass to low pass transform and the low pass to high passtransform>> >> obtaining the new coefficients. (To that I used a commerciallibrary>> but in >> >> it I am not able to find the others transform). Then I performedthe>> >> filtering of data with success. After I need to transform the >> normalized >> >> coefficients to band pass and band stop but I have no idea of howto>> do >> >> it. >> >> Does anybody can help me with C code, examples, everything can helpme,>> to >> >> transform the low pass normalized coefficients to band pass and stop?>> >> Thanks in advance >> >> >The book by Proakis and Manolakis has the transforms, but be >> >warned that the editions up to and including the 3rd contain >> >typos. The typos were corrected for the 4th edition. >> >> >Rune >> >> If anybody have already performed such a transformation and have a Ccode>> or in other language please send it to me. I have already took a lookat>> the first book but as I am not an expert I do not understand how to >> implement the transfomation with a programming language. > >The trick is to keep the filter on a biquad representation >(as a set of fractions of 2nd order polynomials) and not >multiply out the whole expressions. If you do that, the >transforms are trivial - albeit tedious. > >Rune >In fact it is what I do. I Comupute the normalized IIR Coefficient for a 6 order butterworth filter (Sample Rate 1Hz and Cutoff 1/2 pi=0.15915 Hz) giving the following biquad filter coefficients (b0,b1,b2,a1,a2): "1.267923e-01, 2.535845e-01, 1.267923e-01, -5.960975e-01, 1.032665e-01" "1.441050e-01, 2.882099e-01, 1.441050e-01, -6.774909e-01, 2.539108e-01" "1.887428e-01, 3.774856e-01, 1.887428e-01, -8.873498e-01, 6.423210e-01" "5.619045e-309, 5.271038e-309, 0.000000e+00, 2.529616e-321, -1.555730e+00" "-1.567740e+00, 3.667700e-01, 6.191000e-01, 9.555300e-01, -3.902100e-01" "8.353800e-01, -1.138500e-01, -7.781000e-02, -1.499000e-01, 9.041000e-02" Then I have two functions to transform from low pass to low pass and low pass to high pass. I do not have the source code of such a functions. But what I am not able to do are the others trasnformations: band pass and stop band. Starting from the array of the above normalized coefficients what are the steps to perform the transformation of the coefficient in order to filter, for example, a signal sampled at 512 sample per seconds with band stop cutoff freqs of fc1 40 Hz, fc2 80 Hz and similary a band pass filter with the same low and high cutoff frequencies ? Thanks
Reply by ●October 28, 20092009-10-28
On 28 Okt, 09:15, "pdvmipv" <luigino.pagan...@agustawestland.com> wrote:> Starting from the array of the above normalized coefficients what are the > steps to perform the transformation of the coefficient in order to filter,- Find the transforms in a textbook. - Analytically derive the transformed biquads. - Implement the derived formulas in a programming language of your choise. - Apply the functions to your prototype filter. - Use the resulting coefficients when filtering your data. Rune
Reply by ●October 28, 20092009-10-28
Rune Allnor <allnor@tele.ntnu.no> wrote in news:813a6fda-6508-4557-9999- b92243778e1f@z2g2000yqm.googlegroups.com:> On 28 Okt, 09:15, "pdvmipv" <luigino.pagan...@agustawestland.com> > wrote: > >> Starting from the array of the above normalized coefficients what are the >> steps to perform the transformation of the coefficient in order to filter, > > - Find the transforms in a textbook. > - Analytically derive the transformed biquads. > - Implement the derived formulas in a programming > language of your choise. > - Apply the functions to your prototype filter. > - Use the resulting coefficients when filtering > your data. > > Rune >Or buy a filter program that does everything for you. I ise QEDesign from Momentum Data Systems (www.mds.com) Al Clark www.danvillesignal.com
Reply by ●October 29, 20092009-10-29
>Rune Allnor <allnor@tele.ntnu.no> wrote in news:813a6fda-6508-4557-9999- >b92243778e1f@z2g2000yqm.googlegroups.com: > >> On 28 Okt, 09:15, "pdvmipv" <luigino.pagan...@agustawestland.com> >> wrote: >> >>> Starting from the array of the above normalized coefficients what arethe>>> steps to perform the transformation of the coefficient in order tofilter,>> >> - Find the transforms in a textbook. >> - Analytically derive the transformed biquads. >> - Implement the derived formulas in a programming >> language of your choise. >> - Apply the functions to your prototype filter. >> - Use the resulting coefficients when filtering >> your data. >> >> Rune >> > >Or buy a filter program that does everything for you. I ise QEDesign from>Momentum Data Systems (www.mds.com) > >Al Clark >www.danvillesignal.com >I posted precise questions (C code, code examples, ecc) and I obtained generic answers or suggestion to buy a library. Is this the spirit of the forum ? Thanks anyway for the help.
Reply by ●October 29, 20092009-10-29
On 29 Okt, 11:41, "pdvmipv" <luigino.pagan...@agustawestland.com> wrote:> >Rune Allnor <all...@tele.ntnu.no> wrote in news:813a6fda-6508-4557-9999- > >b92243778...@z2g2000yqm.googlegroups.com: > > >> On 28 Okt, 09:15, "pdvmipv" <luigino.pagan...@agustawestland.com> > >> wrote: > > >>> Starting from the array of the above normalized coefficients what are > the > >>> steps to perform the transformation of the coefficient in order to > filter, > > >> - Find the transforms in a textbook. > >> - Analytically derive the transformed biquads. > >> - Implement the derived formulas in a programming > >> � language of your choise. > >> - Apply the functions to your prototype filter. > >> - Use the resulting coefficients when filtering > >> � your data. > > >> Rune > > >Or buy a filter program that does everything for you. I ise QEDesign from > >Momentum Data Systems (www.mds.com) > > >Al Clark > >www.danvillesignal.com > > I posted precise questions (C code, code examples, ecc) and I obtained > generic answers or suggestion to buy a library. Is this the spirit of the > forum ?Yes, it is. If you want help with understanding DSP, then this is the place to ask questions. If you want canned code or ready-to-use solutions, try somewhere else. Rune






