Hello, Surely somebody has already done this, using Matlab or Excel. 0. Providing Fs, the sampling frequency (usually 44100 Hz) 1. Providing a target structure like a 4-th order IIR highpass followed by a 4-th order IIR lowpass. This is the most complicated scenario. 2. Providing F1 in Hertz, the high-pass cutoff rough indication 3. Providing F2 in Hertz, the low pass cutoff rough indication 4. Providing a 32-points amplitude plot in degrees from (F1)/2 untill (F2)*2. 5. Providing a 32-points magnitude plot in decibels from (F1)/2 untill (F2)*2. Then Excel or Matlab would provide as output : 1. The IIR higpass numerator and denominator coefficients 2. The IIR lowpass numerator and denominator coefficients This would be obtained by mimimizing the "area error" on the phase plot and on the magnitude plot between (F1)/2 untill F2*(2). This is quite tricky. Currently, I don't see how to do it practically using Excel or Matlab. For systems that are low-order than the specified 4th hi / 4th lo, Excel or Matlab will output coefficients very close to zero. Up to the user to finalize the calculation by putting the coefficients to zero exacly. Or Excel and Matlab may assist him in doing this. Application is audio with loudspeaker enclosure modelization prior to correction and filtering. The 4th hi / 4th lo is the "Bose" tri-chamber design. A 2th hi / 1st lo is the "closed enclosure" design. A 4th hi / 1st lo is the "bass reflex" design. A 2th hi / 2nd lo" is the "dual chamber bandpass" design. Any suggestion welcome. Students & applicants welcome if this is not available yet on Excel (thin doubt !). Possible insertion in major enthusiast and semipro Electronics publication - paper & web. Unique opportunity. Steph
Bandpass system identification using IIRs (audio)
Started by ●March 17, 2008
Reply by ●March 17, 20082008-03-17
On Mar 17, 6:15�am, "steph_tsf" <stephanecnocka...@hotmail.com> wrote:> Surely somebody has already done this, using Matlab or Excel.FDLS will do approximately what you ask; I have occasionally used it to model individual loudspeaker drivers. Search comp.dsp for "FDLS" with author "Berchin". The article and the Matlab or C code are available from various places on the Web, including from me directly -- just ask. Greg Berchin
Reply by ●March 17, 20082008-03-17
Hello Greg, are we talking about this : http://groups.google.com/group/comp.dsp/msg/2c307e8e77fb5178 After this modelization - identification process, do we get "random" high-order IIRs or can we inject a constraint like setting a simple prototype structure like 4th-order highpass followed by a 1th-order lowpass ? Your work is very promising. Have you been published yet ? Do you have experience on SynthMaker ? Steph
Reply by ●March 17, 20082008-03-17
Hello Greg, Found this now : http://www.univ.trieste.it/~ramponi/teaching/DSP/materiale/ES_10_2.m Should I start working on that using Matlab and Signal Processing Toolbox ? Steph
Reply by ●March 17, 20082008-03-17
Try hz = yulewalk(N, frq, mag); matlab and scilab has this function and can be used to design arbitrary shaped iir filters given frequency and magnitude response. N is the input order which in your case is 4. Regards Bharat Pathak www.Arithos.com ~dsp Simplified -------DSP DESIGN CONSULTANCY AND TRAINING--------
Reply by ●March 17, 20082008-03-17
On Mar 17, 7:20�am, "steph_tsf" <stephanecnocka...@hotmail.com> wrote:> are we talking about this :http://groups.google.com/group/comp.dsp/msg/2c307e8e77fb5178Yes.> After this modelization - identification process, do we get "random" > high-order IIRs or can we inject a constraint like setting a simple > prototype structure like 4th-order highpass followed by a 1th-order > lowpass ?You specify the numerator and denominator order, the algorithm computes a least-squares fit to those orders. From the coefficients you can extract poles and zeroes and do with them whatever you please.> Your work is very promising. Have you been published yet ?Only in some ancient conference papers, and recently in a Signal Processing Magazine article and as a chapter in Rick Lyons' book.> Do you have experience on SynthMaker ?No. Greg
Reply by ●March 17, 20082008-03-17
On Mar 17, 7:30�am, "steph_tsf" <stephanecnocka...@hotmail.com> wrote:> Found this now : > > http://www.univ.trieste.it/~ramponi/teaching/DSP/materiale/ES_10_2.mThat's someone else's modification of my code.> Should I start working on that using Matlab and Signal Processing ToolboxYou only need the Signal Processing Toolbox for the plotting functions. The rest is standard Matlab code. Greg
Reply by ●March 18, 20082008-03-18
Hello Greg, Now I am using FLDS on Matlab with Signal Processing Toolbox. I am using Order = 2 to start with something simple. Therefore I am supplying data that is consistent with a 2nd-order IIR. FDLS is working nice (very nice should I write !) when modelling a 2nd order lowpass. but ... FDLS is not working nice when modelling a 2nd order highpass. FLDS is making big errors on highpass filter on low frequency. It doesn't deliver a nice 12dB/octave attenuation curve at low frequencies. Might this be caused by high frequencies having more weight in the algorithm ? Any suggestion welcome. I would like to send to you some files I have prepared for you, to be executed by Matlab. I have improved the template, now the model IIR is plotted using thousands of X points instead of the few points supplied at the input. This way one can see how much the model IIR is deviant. stephanecnockaertatremovehotmaildotcom Steph
Reply by ●March 18, 20082008-03-18
steph_tsf wrote:> FLDS is making big errors on highpass filter on low frequency. It doesn't > deliver a nice 12dB/octave attenuation curve at low frequencies. > > Might this be caused by high frequencies having more weight in the > algorithm ? > > Any suggestion welcome.First, try increasing the numerator and denominator orders. If you are attempting to match an s-domain frequency response with a z-domain model, then because of the nonlinear mapping from s to z you will need many extra degrees of freedom. Second, how many input points are you using? It is not uncommon to use thousands. A few tens or hundreds might not do the job. Third, if all else fails, the FDLS Matlab program is capable of weighted least squares. Increase the weight on points where it is not fitting well. Good luck, Greg
Reply by ●March 18, 20082008-03-18
Hello Greg, Now I am using FLDS on Matlab with Signal Processing Toolbox. I am using Order = 2 to start with something simple. Therefore I am supplying data that is consistent with a 2nd-order IIR. FDLS is working nice (very nice should I write !) when modelling a 2nd order lowpass. but ... FDLS is not working nice when modelling a 2nd order highpass. FLDS is making big errors on highpass filter on low frequency. It doesn't deliver a nice 12dB/octave attenuation curve at low frequencies. Might this be caused by high frequencies having more weight in the algorithm ? Any suggestion welcome. I would like to send to you some files I have prepared for you, to be executed by Matlab. I have improved the template, now the model IIR is plotted using thousands of X points instead of the few points supplied at the input. This way one can see how much the model IIR is deviant. stephanecnockaertatremovehotmaildotcom Steph






