DSPRelated.com
Forums

IIR filter coefficients

Started by Girish June 1, 2004
Hai all,

Can any one send me IIR filter direct form II
coefficients for this specifications for ADSP-2181
processor (quantised)

Low pass IIR filter

sampling freq. = 16000 Hz
pass band freq = 1000 Hz
stop band freq = 1200 Hz
pass band ripple = 1 db
stop band freq = 40 db

thanx
Bye
G ________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html



Hi Girish,

MATLAB's Filter Design and Analysis Tool says a 6th
order elliptic filter would do the job. However, the
quantization issue makes the actual response differ
from the specs, even if scaling the coeffs to be <=1.
So, you'll need to use second order sections (which
can be implemented in Direct Form II structure, as you
requested)

In that order of ideas, find attached the .fda file
which contains the full design as done by FDATool,
using second order sections. Also, will find a .txt
file which holds the coefficients, in case you don't
have access to FDATool. Keep in mind that to preserve
the response as done by FDATool you'll need to
implement the Direct Form II filter in a "complete"
form, rather than in a normalized form with respect to
a0 (a0 is not "1"). Don't forget that the denominator
coefficients (the "As", as delivered by FDATool have
normal, positive sign, so you'll have to either do the
substractions in your code, or change the signs. The
attached .bmp file shows the structure, and might help
in the implementation. Finally, keep in mind that
there will be some scaling at the input, read the .txt
file.

I hope this helps.

Write back if I can help any further.

Regards,

JaaC

--- Girish <> wrote:
> Hai all,
>
> Can any one send me IIR filter direct form II
> coefficients for this specifications for ADSP-2181
> processor (quantised)
>
> Low pass IIR filter
>
> sampling freq. = 16000 Hz
> pass band freq = 1000 Hz
> stop band freq = 1200 Hz
> pass band ripple = 1 db
> stop band freq = 40 db
>
> thanx
> Bye
> G >
________________________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html >
> _____________________________________
> Note: If you do a simple "reply" with your email
> client, only the author of this message will receive
> your answer. You need to do a "reply all" if you
> want your answer to be distributed to the entire
> group.
>
> _____________________________________
> About this discussion group:
>
> To Join: Send an email to > To Post: Send an email to
>
> To Leave: Send an email to > Archives: http://groups.yahoo.com/group/adsp
>
> Other Groups: http://www.dsprelated.com/groups.php3
>
> Yahoo! Groups Links >


=====

Jaime Andr Aranguren Cardona

__________________________________

Attachment (not stored)
DirectFormII.bmp
Type: image/bmp

Attachment (not stored)
Girish-LowPass.fda
Type: application/octet-stream

Quantized Direct form II filter
------- Section 1 -------
Numerator
QuantizedCoefficients{1}{1} ReferenceCoefficients{1}{1}
(1) 0.751556396484375 0.751565598185717330
(2) -0.728149414062500 -0.728144656969851640
(3) 0.751556396484375 0.751565598185725210
Denominator
QuantizedCoefficients{1}{2} ReferenceCoefficients{1}{2}
(1) 0.500000000000000 0.500000000000000000
(2) -0.870880126953125 -0.870871466612782250
(3) 0.389526367187500 0.389520122144654480
------- Section 2 -------
Numerator
QuantizedCoefficients{2}{1} ReferenceCoefficients{2}{1}
(1) 0.500000000000000 0.500000000000000000
(2) -0.873382568359375 -0.873385959642106970
(3) 0.500000000000000 0.499999999999937160
Denominator
QuantizedCoefficients{2}{2} ReferenceCoefficients{2}{2}
(1) 0.500000000000000 0.500000000000000000
(2) -0.899047851562500 -0.899045317345102850
(3) 0.456298828125000 0.456296429863366490
------- Section 3 -------
Numerator
QuantizedCoefficients{3}{1} ReferenceCoefficients{3}{1}
(1) 0.500000000000000 0.500000000000000000
(2) -0.906433105468750 -0.906418227494259600
(3) 0.500000000000000 0.500000000000062950
Denominator
QuantizedCoefficients{3}{2} ReferenceCoefficients{3}{2}
(1) 0.500000000000000 0.500000000000000000
(2) -0.915588378906250 -0.915586654923060240
(3) 0.490966796875000 0.490978759500423080

FilterStructure = df2
ScaleValues = [0.0078125 1 1 1]
NumberOfSections = 3
StatesPerSection = [2 2 2]
CoefficientFormat = quantizer('fixed', 'round', 'saturate', [16 15])
InputFormat = quantizer('fixed', 'floor', 'saturate', [16 15])
OutputFormat = quantizer('fixed', 'floor', 'saturate', [16 15])
MultiplicandFormat = quantizer('fixed', 'floor', 'saturate', [16 15])
ProductFormat = quantizer('fixed', 'floor', 'saturate', [32 30])
SumFormat = quantizer('fixed', 'floor', 'saturate', [32 30])



Hai have you implemented the same IIR dirct form 2
filter on ADSP-2181 ?

Hai i think its same like biquad implememntation wht
you have sent.

Is tht right ? Revert back

Bye
G --- Jaime Andres Aranguren Cardona
<> wrote: > Hi Girish,
>
> MATLAB's Filter Design and Analysis Tool says a 6th
> order elliptic filter would do the job. However, the
> quantization issue makes the actual response differ
> from the specs, even if scaling the coeffs to be
> <=1.
> So, you'll need to use second order sections (which
> can be implemented in Direct Form II structure, as
> you
> requested)
>
> In that order of ideas, find attached the .fda file
> which contains the full design as done by FDATool,
> using second order sections. Also, will find a .txt
> file which holds the coefficients, in case you don't
> have access to FDATool. Keep in mind that to
> preserve
> the response as done by FDATool you'll need to
> implement the Direct Form II filter in a "complete"
> form, rather than in a normalized form with respect
> to
> a0 (a0 is not "1"). Don't forget that the
> denominator
> coefficients (the "As", as delivered by FDATool have
> normal, positive sign, so you'll have to either do
> the
> substractions in your code, or change the signs. The
> attached .bmp file shows the structure, and might
> help
> in the implementation. Finally, keep in mind that
> there will be some scaling at the input, read the
> .txt
> file.
>
> I hope this helps.
>
> Write back if I can help any further.
>
> Regards,
>
> JaaC
>
> --- Girish <> wrote:
> > Hai all,
> >
> > Can any one send me IIR filter direct form II
> > coefficients for this specifications for ADSP-2181
> > processor (quantised)
> >
> > Low pass IIR filter
> >
> > sampling freq. = 16000 Hz
> > pass band freq = 1000 Hz
> > stop band freq = 1200 Hz
> > pass band ripple = 1 db
> > stop band freq = 40 db
> >
> > thanx
> > Bye
> > G
> >
> >
> >
>
________________________________________________________________________
> > Yahoo! Messenger - Communicate instantly..."Ping"
> > your friends today! Download Messenger Now
> > http://uk.messenger.yahoo.com/download/index.html
> >
> >
> >
> > _____________________________________
> > Note: If you do a simple "reply" with your email
> > client, only the author of this message will
> receive
> > your answer. You need to do a "reply all" if you
> > want your answer to be distributed to the entire
> > group.
> >
> > _____________________________________
> > About this discussion group:
> >
> > To Join: Send an email to
> >
> >
> > To Post: Send an email to
> >
> > To Leave: Send an email to
> >
> >
> > Archives: http://groups.yahoo.com/group/adsp
> >
> > Other Groups:
> http://www.dsprelated.com/groups.php3
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> > =====
>
> Jaime Andr Aranguren Cardona >
>
> __________________________________
>
> ATTACHMENT part 2 image/bmp name=DirectFormII.bmp


> ATTACHMENT part 3 application/octet-stream
name=Girish-LowPass.fda
> Quantized Direct form II filter
>
> ------- Section 1 -------
>
> Numerator
>
> QuantizedCoefficients{1}{1}
> ReferenceCoefficients{1}{1}
> (1) 0.751556396484375
> 0.751565598185717330
> (2) -0.728149414062500
> -0.728144656969851640
> (3) 0.751556396484375
> 0.751565598185725210
> Denominator
>
> QuantizedCoefficients{1}{2}
> ReferenceCoefficients{1}{2}
> (1) 0.500000000000000
> 0.500000000000000000
> (2) -0.870880126953125
> -0.870871466612782250
> (3) 0.389526367187500
> 0.389520122144654480
> ------- Section 2 -------
>
> Numerator
>
> QuantizedCoefficients{2}{1}
> ReferenceCoefficients{2}{1}
> (1) 0.500000000000000
> 0.500000000000000000
> (2) -0.873382568359375
> -0.873385959642106970
> (3) 0.500000000000000
> 0.499999999999937160
> Denominator
>
> QuantizedCoefficients{2}{2}
> ReferenceCoefficients{2}{2}
> (1) 0.500000000000000
> 0.500000000000000000
> (2) -0.899047851562500
> -0.899045317345102850
> (3) 0.456298828125000
> 0.456296429863366490
> ------- Section 3 -------
>
> Numerator
>
> QuantizedCoefficients{3}{1}
> ReferenceCoefficients{3}{1}
> (1) 0.500000000000000
> 0.500000000000000000
> (2) -0.906433105468750
> -0.906418227494259600
> (3) 0.500000000000000
> 0.500000000000062950
> Denominator
>
> QuantizedCoefficients{3}{2}
> ReferenceCoefficients{3}{2}
> (1) 0.500000000000000
> 0.500000000000000000
> (2) -0.915588378906250
> -0.915586654923060240
> (3) 0.490966796875000
> 0.490978759500423080 > FilterStructure = df2
>
> ScaleValues = [0.0078125 1 1 1]
>
> NumberOfSections = 3
>
> StatesPerSection = [2 2 2]
>
> CoefficientFormat = quantizer('fixed', 'round',
> 'saturate', [16 15])
> InputFormat = quantizer('fixed', 'floor',
> 'saturate', [16 15])
> OutputFormat = quantizer('fixed', 'floor',
> 'saturate', [16 15])
> MultiplicandFormat = quantizer('fixed', 'floor',
> 'saturate', [16 15])
> ProductFormat = quantizer('fixed', 'floor',
> 'saturate', [32 30])
> SumFormat = quantizer('fixed', 'floor',
> 'saturate', [32 30])
>

________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html



Yeah,

When they are second order sections, the Direct Form
II becomes the so called "biquad". However, as far as
I have seen in the literature, the biquad always has
a0 = 1 (in MATLAB nomenclature, a1 = 1). I recommend
you that to take full advantage of the coefficients as
they were delivered by MATLAB's FDATool you don't
rescale the coeffs by a0, for the reasons already
explained.

You'r filter had to go with 3 second order sections
just because of the fixed point issue with this DSP,
and your requeriments.

And yes, I've implemented IIR in Direct Form II for an
8th order elliptic passband filter, with Fc1 = 1000
Hz, Fc2 = 2500 Hz, Fs1 = 400 Hz and Fs2 = 3200 Hz,
sampling at 8000 Hz. I didn't have to go with second
order sections, so the "original" IIR subroutine
worked just fine. Anyway, I could have done it with
second order sections, too, and maybe the results
would have been more accurate (although the simulation
said it was OK).

And don't forget, the biquad is simply a 2nd order
Direct Form II implementation!!!

Write back if you want/need to.

Regards,

JaaC

--- Girish <> wrote:
> Hai have you implemented the same IIR dirct form 2
> filter on ADSP-2181 ?
>
> Hai i think its same like biquad implememntation wht
> you have sent.
>
> Is tht right ? > Revert back
>
> Bye
> G > --- Jaime Andres Aranguren Cardona
> <> wrote: > Hi Girish,
> >
> > MATLAB's Filter Design and Analysis Tool says a
> 6th
> > order elliptic filter would do the job. However,
> the
> > quantization issue makes the actual response
> differ
> > from the specs, even if scaling the coeffs to be
> > <=1.
> > So, you'll need to use second order sections
> (which
> > can be implemented in Direct Form II structure, as
> > you
> > requested)
> >
> > In that order of ideas, find attached the .fda
> file
> > which contains the full design as done by FDATool,
> > using second order sections. Also, will find a
> .txt
> > file which holds the coefficients, in case you
> don't
> > have access to FDATool. Keep in mind that to
> > preserve
> > the response as done by FDATool you'll need to
> > implement the Direct Form II filter in a
> "complete"
> > form, rather than in a normalized form with
> respect
> > to
> > a0 (a0 is not "1"). Don't forget that the
> > denominator
> > coefficients (the "As", as delivered by FDATool
> have
> > normal, positive sign, so you'll have to either do
> > the
> > substractions in your code, or change the signs.
> The
> > attached .bmp file shows the structure, and might
> > help
> > in the implementation. Finally, keep in mind that
> > there will be some scaling at the input, read the
> > .txt
> > file.
> >
> > I hope this helps.
> >
> > Write back if I can help any further.
> >
> > Regards,
> >
> > JaaC
> >
> > --- Girish <> wrote:
> > > Hai all,
> > >
> > > Can any one send me IIR filter direct form II
> > > coefficients for this specifications for
> ADSP-2181
> > > processor (quantised)
> > >
> > > Low pass IIR filter
> > >
> > > sampling freq. = 16000 Hz
> > > pass band freq = 1000 Hz
> > > stop band freq = 1200 Hz
> > > pass band ripple = 1 db
> > > stop band freq = 40 db


=====

Jaime Andr Aranguren Cardona

__________________________________


Hi there

In a dual 21065 system I try to access the Slaves' IOP registers from within
the Master. This in Multiprocessor space of course. It does not work, i.e.
the IOP registers in the Slave can not be written by the Master. Do the
MS0..MS3 lines have to be connected between the two DSPs? Aren't the
address/databus, the WR and RD lines and maybe the SW line enough to do what
I want? What about the DMAGn and DMARn signals?

Thanks for the help!

Daniel



On Tue, 1 Jun 2004, Daniel Weiss wrote:

> In a dual 21065 system I try to access the Slaves' IOP registers from within
> the Master. This in Multiprocessor space of course. It does not work, i.e.
> the IOP registers in the Slave can not be written by the Master. Do the
> MS0..MS3 lines have to be connected between the two DSPs? Aren't the
> address/databus, the WR and RD lines and maybe the SW line enough to do what
> I want? What about the DMAGn and DMARn signals?

You need the ID, BR, CPA and RPBA lines hooked up as well. Check the
chapter on multiprocessing for details.

Patience, persistence, truth,
Dr. mike





> -----Original Message-----
> From: Mike Rosing [mailto:]
> Sent: Tuesday, June 01, 2004 11:04 PM
> To: Daniel Weiss
> Cc:
> Subject: Re: [adsp] 21065 Multiprocessor troubles > On Tue, 1 Jun 2004, Daniel Weiss wrote:
>
> > In a dual 21065 system I try to access the Slaves' IOP
> registers from within
> > the Master. This in Multiprocessor space of course. It does
> not work, i.e.
> > the IOP registers in the Slave can not be written by the
> Master. Do the
> > MS0..MS3 lines have to be connected between the two DSPs? Aren't the
> > address/databus, the WR and RD lines and maybe the SW line
> enough to do what
> > I want? What about the DMAGn and DMARn signals?
>
> You need the ID, BR, CPA and RPBA lines hooked up as well. Check the
> chapter on multiprocessing for details.
>


Those I have connected as well, except for the RPBA, which the 21065 does
not have. Any other idea?

Daniel




On Wed, 2 Jun 2004, Daniel Weiss wrote:

> Those I have connected as well, except for the RPBA, which the 21065 does
> not have. Any other idea?

What are the ID's of each processor? I'm not familiar with actually doing
this, so I don't really know the problem that well. Doesn't each IOP
address show up in a different location depending on the ID? How are you
addressing the other processors IOP locations?

Patience, persistence, truth,
Dr. mike



On Wed, 2 Jun 2004, Daniel Weiss wrote:

> The IDs are fine. I can read them in the SYSTAT register of each processor and
they are as they should be. Maybe the MS0..3 lines are indeed required. I have
to try that.
> The IOPs of the processor with ID 10 are on addresses 0x200 upwards. The ones
of the processor with ID 01 are from 0x100 upwards.

Worth a try to hook them up. I don't see why, but I've never tried it
either! Keep us posted on how you find the solution.

Patience, persistence, truth,
Dr. mike


There is at least one anomaly for the ID lines for the 065 series. You
might want to take a look at that list and see if anything looks familiar.
At 08:12 PM 6/1/2004, Mike Rosing wrote:
>On Wed, 2 Jun 2004, Daniel Weiss wrote:
>
> > Those I have connected as well, except for the RPBA, which the 21065 does
> > not have. Any other idea?
>
>What are the ID's of each processor? I'm not familiar with actually doing
>this, so I don't really know the problem that well. Doesn't each IOP
>address show up in a different location depending on the ID? How are you
>addressing the other processors IOP locations?
>
>Patience, persistence, truth,
>Dr. mike >
>_____________________________________
>Note: If you do a simple "reply" with your email client, only the author
>of this message will receive your answer. You need to do a "reply all" if
>you want your answer to be distributed to the entire group.
>
>_____________________________________
>About this discussion group:
>
>To Join: Send an email to
>
>To Post: Send an email to
>
>To Leave: Send an email to
>
>Archives: http://groups.yahoo.com/group/adsp
>
>Other Groups: http://www.dsprelated.com/groups.php3
>
>Yahoo! Groups Links >
>

Steve Holle
Link Communications, Inc.
1035 Cerise Rd.
Billings, MT 59101