IIR filters type 1 or 2 what is best? - diyAudio
Go Back   Home > Forums > Source & Line > Digital Source

Digital Source Digital Players and Recorders: CD , SACD , Tape, Memory Card, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 21st April 2004, 02:54 PM   #1
diyAudio Member
 
JensRasmussen's Avatar
 
Join Date: Jul 2002
Location: Denmark - Jutland
Send a message via ICQ to JensRasmussen Send a message via MSN to JensRasmussen
Question IIR filters type 1 or 2 what is best?

Hello,

Im making a dsp project at the moment. I was wondering what type of filter signal graph is the better one regarding truncating the numbers in internal registers of the DSP processor.

The problem is that with the type 1 signal graph you can implement the difference equation in one go, keeping the numbers in the 32 bit register of the CPU right until the time they are sent to the DA converter.

This however I find hard to do with the type 2 signal graph, since it needs 2 difference equations to work.

My question is simply, witch signal graph is the better one for precision. Theoretically they describe the same system, but in real life there must be a superior type?

Thanks

\Jens
  Reply With Quote
Old 21st April 2004, 03:21 PM   #2
ojg is offline ojg
diyAudio Member
 
Join Date: May 2003
Location: Norway
Type-1 is superior with respect to quantization errors at least with typical lowpass/highpass filters. However it needs more memory and more cycles than a type-2 implementation.
  Reply With Quote
Old 21st April 2004, 07:47 PM   #3
diyAudio Member
 
JensRasmussen's Avatar
 
Join Date: Jul 2002
Location: Denmark - Jutland
Send a message via ICQ to JensRasmussen Send a message via MSN to JensRasmussen
Ok thanks, That's what i figured just needed to be sure.

I'll go for the type one equations then....

What about limit cycle oscillation btw? witch one would be better (Suffer less)

\Jens
  Reply With Quote
Old 21st April 2004, 08:25 PM   #4
ojg is offline ojg
diyAudio Member
 
Join Date: May 2003
Location: Norway
Quote:
Originally posted by JensRasmussen
What about limit cycle oscillation btw? witch one would be better (Suffer less)
I am not sure what you mean by this, please elaborate.
  Reply With Quote
Old 21st April 2004, 09:49 PM   #5
diyAudio Member
 
JensRasmussen's Avatar
 
Join Date: Jul 2002
Location: Denmark - Jutland
Send a message via ICQ to JensRasmussen Send a message via MSN to JensRasmussen
Default limit cycle oscilation

Hello,

I may have this up side down, but I understand limit cycle oscilation as the main factor that the IIR (infinite inpulse response) is called what it is. I belive it to be the noice generated by the algorithme thus making an oscillation because some of the truncation noise is feed back into the summoning point via the a1 and a2 coeffecients.

\Jens
Attached Images
File Type: gif signalgraph.gif (2.2 KB, 147 views)
  Reply With Quote
Old 21st April 2004, 09:54 PM   #6
diyAudio Member
 
JensRasmussen's Avatar
 
Join Date: Jul 2002
Location: Denmark - Jutland
Send a message via ICQ to JensRasmussen Send a message via MSN to JensRasmussen
It can look like this with a step of input.

\Jens
Attached Images
File Type: gif osc.gif (5.7 KB, 142 views)
  Reply With Quote
Old 21st April 2004, 10:54 PM   #7
ojg is offline ojg
diyAudio Member
 
Join Date: May 2003
Location: Norway
Your first graph is correct, but the plot does not look too good! You are correct that the Infinite in IIR is because of feedback through a1 and a2, but not because of self-oscillation due to quantization noise. When a1,a2 and y is quantized this may raise the noisefloor, but should not create oscillation.

Are you using fixed or floating point? How many bits? What are your coefficients? If your a1 and a2 are very small, you might want to do the -a1*y(n-1)-a2*y(n-2) in double precision.
  Reply With Quote
Old 22nd April 2004, 10:35 AM   #8
diyAudio Member
 
JensRasmussen's Avatar
 
Join Date: Jul 2002
Location: Denmark - Jutland
Send a message via ICQ to JensRasmussen Send a message via MSN to JensRasmussen
Hello,


I have not implemented the signal graph on a platfor yet. All the work so fars is done on a PC in a mathprogram.

I't a 6'th order system with high Q making a bandstop filter. The freq response is as planned, and it also stops the wanted freq when I sweep it. so it schould be ok i think.

\Jens
  Reply With Quote
Old 22nd April 2004, 05:45 PM   #9
diyAudio Member
 
Join Date: Aug 2003
Location: Santa Cruz, California
Quote:
Originally posted by JensRasmussen
Hello,


I have not implemented the signal graph on a platfor yet. All the work so fars is done on a PC in a mathprogram.

I't a 6'th order system with high Q making a bandstop filter. The freq response is as planned, and it also stops the wanted freq when I sweep it. so it schould be ok i think.

\Jens

If you're using more than one Type I second order filter, you can use the denominator delays of one section as the numerator delays of the following section.


Francois.
  Reply With Quote
Old 22nd April 2004, 06:00 PM   #10
diyAudio Member
 
JensRasmussen's Avatar
 
Join Date: Jul 2002
Location: Denmark - Jutland
Send a message via ICQ to JensRasmussen Send a message via MSN to JensRasmussen
Hello Francois,

I'm note sure that I understand, can you explain it a bit further please?

\Jens

- not a DSP geek yet, but hope to be
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re : BL type & GR type of transistor for Aleph-Ono Arion Pass Labs 4 29th January 2007 06:15 PM
Ac filters jleaman Everything Else 17 31st May 2006 07:45 AM
PI filters Prune Tubes / Valves 3 26th September 2004 09:16 PM
Filters Mr. Bungle Solid State 2 31st July 2004 05:08 PM
dsl filters slackerbob Everything Else 1 22nd September 2003 12:20 AM


New To Site? Need Help?

All times are GMT. The time now is 06:34 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2