Previous Thread
Next Thread
Print Thread
Page 43 of 55 1 2 41 42 43 44 45 54 55
Joined: Mar 2001
Posts: 17,239
Likes: 263
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,239
Likes: 263
Maybe run a program on hardware that lets you control the filter values. Then feed the audio output into the PC and show the frequency spectrum? I'm not great with math either smile

Joined: Jan 2005
Posts: 154
Senior Member
Senior Member
Joined: Jan 2005
Posts: 154
Originally Posted by Vas Crabb
it is possible to give input that will cause an IIR filter to go into self-sustaining oscillations.
How could a stable IIR filter go into oscillation? And if it's unstable, I'd think most inputs would drive it into oscillation (but I haven't done much with IIR filters myself).
Quote
That's why FIR filters are much more common in control systems. Unconditional stability is a big plus. FIR filters also have linear phase response. However, the transport delays introduced by an FIR filter can be problematic, too.
FIR filters can also have non-linear phase response. A minimum-phase FIR filter has most of the energy at the beginning, just like an IIR filter. I'm assuming this is what you mean by "transport delay".
Quote
Why use an IIR filter? An IIR filter with a given number of taps can be made to have much steeper roll-off than an FIR filter with the same number of taps.
This is about the only reason, efficiency. Otherwise, a (much higher order) FIR can virtually match response, since one can always take the impulse response of the IIR, window it, and make an FIR out of that.

Joined: Feb 2004
Posts: 2,608
Likes: 315
Very Senior Member
Very Senior Member
Joined: Feb 2004
Posts: 2,608
Likes: 315
Originally Posted by blargg
How could a stable IIR filter go into oscillation? And if it's unstable, I'd think most inputs would drive it into oscillation (but I haven't done much with IIR filters myself).
Well the issue is that a "stable" IIR filter is only stable for a subset of possible input conditions. Now you may design the system in such a way that it will never give the IIR filter an input that will cause it to oscillate, or you can design it so that non-ideal characteristics such as saturation will come in to play before it oscillates. But irrespective of that, it's still a design condition to think about.

Originally Posted by blargg
FIR filters can also have non-linear phase response. A minimum-phase FIR filter has most of the energy at the beginning, just like an IIR filter. I'm assuming this is what you mean by "transport delay".
The first filter will still have linear phase response. It has lower transport delay than the second one, but the transport delay is still constant across all frequencies. Since the phase response p = 2*pi*�*T/�s (� = input frequency, T = tap number with maximum amplitude, �s = sample frequency) for an FIR filter, you can't end up with anything but a linear phase response for an FIR filter - it's a simple linear equation with no tricks to pull.

(BTW - a transport delay in control systems is anything that has a transfer function anything like e^(-a*s) in s domain.)

Last edited by Vas Crabb; 01/09/09 09:29 PM. Reason: greek characters didn't work
Joined: Feb 2008
Posts: 107
D
Senior Member
Senior Member
D Offline
Joined: Feb 2008
Posts: 107
One would think there are tons of simple FIR/IIR design aids out there... not so. I mean sure, there are all kinds of *labs, octaves and whatnot, some of them free, but I don't need a full-blown higher math computation tool (and most definitely I don't want to learn how to use them first).

All I need is something that will eat a0-a2,b0-b2 and spit out a nice magnitude vs frequency plot. Possibly with an option to switch to log scaling on f axis. Native Windows GUI please.
Since this task requires complex numbers and I'm too lazy to code a GUI with pure Win32 (no RAD on my home PC), I figured I could modify kingshriek's script to output the data for gnuplot. Of course no python on Windows box either, so I'm using a nearby Linux for all the work. I realized I don't have gnuplot on my FC8 so I did "yum install gnuplot" - and yum asked me if I would like additional 67 packages with it, just above 35MB. Err... no, thanks.

Anyway - I've run some tests. Neill's filter is indeed a low-pass IIR but I still think it's not the correct one. The function that converts filter value to f coefficient is wrong. I'm having a hard time coming up with something that would both work and not requite floating point math functions...
Q values other than zero do create a resonance but not like AICA does it. The biggest difference it that AICA creates resonance a bit before f0, so cutoff point is basically unaffected. Neill's filter has the gain peak all over f0 and ends up with a different curve altogether.

The figures in SEGA docs are (for once) pretty much what I got from frequency spectrum analysis. The FEG timing is wrong though, or so I belive - it's basically the same table as AEG decay/release but multiplied by 4. There's even an obvious copy-paste bug that messes up the last part completely. FEG counter is not only wider than AEG, it also goes all the way up to all ones, whereas AEG ends at 960.

Eh, in short: nothing working yet.

Joined: Feb 2004
Posts: 2,608
Likes: 315
Very Senior Member
Very Senior Member
Joined: Feb 2004
Posts: 2,608
Likes: 315
Seriously, the simplest thing for that is MATLAB Simulink. You just draw the filter by dragging and dropping the gain, summing and delay blocks onto the workspace and drawing lines between them, and it gives you the time-domain and frequency domain responses of the system. It's the tool of choice in the industry.

Joined: Mar 2001
Posts: 17,239
Likes: 263
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,239
Likes: 263
What kinda ghetto are you in that 35 MB of packages is a problem? I've seen Windows Update pull down more than that on a good day smile

Joined: Dec 1969
Posts: 920
Likes: 3
R
Senior Member
Senior Member
R Offline
Joined: Dec 1969
Posts: 920
Likes: 3
Quite, even lowly Ireland has 20Mbit connections now.

[Linked Image from esatclear.ie]

Joined: Feb 2008
Posts: 107
D
Senior Member
Senior Member
D Offline
Joined: Feb 2008
Posts: 107
You people don't get it, do you smile

Vas: Let me explain this again. I got an IIR low-pass filter inside AICA, aka Black Box. It uses two values as parametres for variable cutoff.
Even if I now have some figures as to how the magnitude vs frequency curve should look like, I still don't know how to construct the filter itself. It's only a guess that it's 2nd order filter - and if it is there are 6 internal coefficients that can be anything, really.
I need to figure out how the 2 parameters make those 6 coefficients. I can do that only by trying various combinations, not exactly very scientific method. With a design tool I could probably create a filter but it will only have one, set cutoff value. Still no clue how to make it variable with two parameters. Given a set of such filters I could possibly figure out what it is they have in common and focus on that. But that is simply too much work.

As explained before - someone who actually gets this stuff would probably know which coefficient to poke, just by looking at the curve. I just see that it doesn't match what I need, so now I can add something. Anything. Or substract. To any of the 6 variables. Good luck with that.

RB: Okay, this is in Polish but you will get the idea:
Code
Rozwiązano zależności

================================================================================
 Pakiet                      Architektura
                                      Wersja             Repozytorium     Rozmiar
================================================================================
Instalowanie:
 gnuplot                     i386     4.2.2-1.fc8        updates-newkey   2.0 M
Instalowanie, aby rozwiązać zależności:
 ConsoleKit                  i386     0.2.3-3.fc8.1      updates-newkey    55 k
 GConf2                      i386     2.20.1-1.fc8       fedora           1.6 M
 ORBit2                      i386     2.14.10-2.fc8      fedora           187 k
 PolicyKit                   i386     0.6-2.fc8          updates-newkey    76 k
 PolicyKit-gnome             i386     0.6-1.fc8          fedora            34 k
 SDL                         i386     1.2.13-2.fc8       updates-newkey   222 k
 alsa-lib                    i386     1.0.16-3.fc8       updates-newkey   402 k
 atk                         i386     1.20.0-1.fc8       fedora           212 k
 audiofile                   i386     1:0.2.6-7.fc8      fedora           107 k
 avahi                       i386     0.6.21-8.fc8       updates-newkey   237 k
 avahi-glib                  i386     0.6.21-8.fc8       updates-newkey    17 k
 bluecurve-icon-theme        noarch   8.0.0-1.fc8        fedora           5.1 M
 cdparanoia-libs             i386     alpha9.8-27.2      fedora            50 k
 control-center-filesystem   i386     1:2.20.3-3.fc8     updates-newkey    34 k
 dmidecode                   i386     1:2.7-1.26.1.fc6   fedora            61 k
 esound-libs                 i386     1:0.2.38-6.fc8     fedora            73 k
 fedora-gnome-theme          noarch   8.0.0-2.fc8        updates-newkey    10 k
 fedora-icon-theme           noarch   1.0.0-1.fc8        fedora           115 k
 gail                        i386     1.20.2-1.fc8       updates-newkey   290 k
 gnome-keyring               i386     2.20.3-1.fc8       updates-newkey   210 k
 gnome-mime-data             noarch   2.18.0-2.fc7       fedora           724 k
 gnome-mount                 i386     0.7-1.fc8          fedora           126 k
 gnome-themes                noarch   2.20.2-1.fc8       updates-newkey   2.5 M
 gnome-vfs2                  i386     2.20.1-1.fc8       updates-newkey   1.1 M
 gstreamer                   i386     0.10.15-1.fc8      updates-newkey   689 k
 gstreamer-plugins-base      i386     0.10.15-4.fc8      updates-newkey   879 k
 gstreamer-tools             i386     0.10.15-1.fc8      updates-newkey    18 k
 gtk-nodoka-engine           i386     0.6.2-1.fc8        updates-newkey    47 k
 gtk2                        i386     2.12.8-2.fc8       updates-newkey   6.8 M
 gtk2-engines                i386     2.12.2-1.fc8       fedora           393 k
 hal                         i386     0.5.10-5.fc8       updates-newkey   461 k
 hal-info                    noarch   20080607-2.fc8     updates-newkey   118 k
 hal-libs                    i386     0.5.10-5.fc8       updates-newkey    61 k
 hicolor-icon-theme          noarch   0.10-2             fedora            32 k
 libIDL                      i386     0.8.9-1.fc8        fedora            87 k
 libXcomposite               i386     0.4.0-3.fc8        fedora            14 k
 libXcursor                  i386     1.1.9-1.fc8        fedora            29 k
 libXinerama                 i386     1.0.2-3.fc8        fedora            12 k
 libXrandr                   i386     1.2.2-1.fc8        fedora            21 k
 libXres                     i386     1.0.3-3.fc8        fedora            13 k
 libXv                       i386     1.0.3-3.fc8        fedora            19 k
 libart_lgpl                 i386     2.3.19-3.fc8       fedora            77 k
 libbonobo                   i386     2.20.3-1.fc8       updates-newkey   469 k
 libbonoboui                 i386     2.20.0-1.fc8       fedora           352 k
 libglade2                   i386     2.6.2-4.fc8        updates-newkey    64 k
 libgnome                    i386     2.20.1-2.fc8       fedora           966 k
 libgnomecanvas              i386     2.20.1-3.fc8       updates-newkey   228 k
 libgnomeui                  i386     2.20.1.1-1.fc8     fedora           1.0 M
 libnotify                   i386     0.4.4-8.fc8        fedora            33 k
 libogg                      i386     2:1.1.3-5.fc8      fedora            19 k
 liboil                      i386     0.3.12-11.fc8      fedora           158 k
 libsmbios-bin               i386     0.13.13-1.fc8      updates-newkey    58 k
 libsmbios-libs              i386     0.13.13-1.fc8      updates-newkey   237 k
 libtheora                   i386     1.0beta2-3.fc8     updates-newkey   138 k
 libvisual                   i386     0.4.0-4.fc8        fedora           150 k
 libvorbis                   i386     1:1.2.0-2.fc8      updates-newkey   192 k
 libwnck                     i386     2.20.3-1.fc8       updates-newkey   322 k
 libxslt                     i386     1.1.24-2.fc8       updates-newkey   526 k
 metacity                    i386     2.20.2-1.fc8       updates-newkey   2.2 M
 nodoka-metacity-theme       noarch   0.3.2-2.fc8        fedora           7.8 k
 notification-daemon         i386     0.3.7-6.fc8        fedora            48 k
 pm-utils                    i386     0.99.4-19.fc8      updates-newkey    44 k
 shared-mime-info            i386     0.23-2.fc8         updates-newkey   166 k
 startup-notification        i386     0.9-3.fc8          fedora            38 k
 wxBase                      i386     2.8.9-1.fc8        updates-newkey   688 k
 wxGTK                       i386     2.8.9-1.fc8        updates-newkey   3.9 M

Podsumowanie transakcji
================================================================================
Instalowanie      67 pakiet�w     
Aktualizowanie     0 pakiet�w     
Usuwanie           0 pakiet�w     

Całkowity rozmiar pobierania: 37 M

It's not about 35MB. It's about the 67 packages I don't need or have even heard of.
This is beyond sloppy. I mean c'mon - SDL? gtk2? Why not the whole KDE when at it?! What is the point of creating separate packages in the first place then?
This is just like the install process on the new distros - you can select "only the things you need" - to conserve disk space. Right. Pick one wrong program and the whole DVD will get installed anyway, as dependencies. It's like chain reaction. Linux sworn people laughing at Vista's size should really do du -hs on their /usr sometime.

I simply refuse to bloat my precious headless system. I'm pretty sure I would have to install much less devel libs when trying to compile gnuplot from sources (most of those I probably already have). And even then I'd never need any pm-utils. Sheesh.

Last edited by Deunan Knute; 01/10/09 11:36 PM. Reason: Too much log. Broke forum formatting.
Joined: Mar 2001
Posts: 17,239
Likes: 263
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,239
Likes: 263
Oh, yeah, that's a famous bug in FC8. gnuplot doesn't actually depend on all that stuff and they've fixed it since. FC8's end-of-lifed though so it's not gonna benefit. (Olivier bitches them out regularly when they do stuff that makes his large lab suck).

Also, I'm the guy who defends Vista on MAMEWorld, home of the Win98 holdout ;-)

ETA: you might try just getting the RPM itself and installing it with --nodeps.

Last edited by R. Belmont; 01/10/09 11:38 PM.
Joined: Feb 2004
Posts: 2,608
Likes: 315
Very Senior Member
Very Senior Member
Joined: Feb 2004
Posts: 2,608
Likes: 315
If you just want to design a filter given certain parameters, download DFDP and run it in DOSBox. It asks you for filter parameters and makes your filter coefficients for you. It also plots the response.

Page 43 of 55 1 2 41 42 43 44 45 54 55

Moderated by  R. Belmont, Richard Bannister 

Link Copied to Clipboard
Who's Online Now
0 members (), 58 guests, and 5 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,331
Posts122,197
Members5,077
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Powered by UBB.threads™ PHP Forum Software 8.0.0