If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
FIR to IIR converter
10 posts
• Page 1 of 1
FIR to IIR converter
This schematic can approximate IIR filter that has response as close as possible to filter that was used on the test tone.
Test tone can be practically anything (typically an impulse, sine sweep or white noise). You provide the schematic with DRY test tone and WET test tone (one passed through filter you desire to model...in case you have IR then input it here and input impulse to the DRY).
The schematic will preform Least Squares Method to approximate IIR filter coefficients. You can select the order of the filter (higher order, more precise the result, but also the filter will have to be more complex). In the output float array the filters are arranged as [b0,b1,...bn,a1,a2,...a,n] Note that A coefficients are inverse of standard IIR filter coefficients. that is because in standard IIR the an*y(n) is subtracted, but Least squares method assumes they are added.
EDIT: added the stable version of the filter. Old one using trogs float array to mem conversion was crashing.
Test tone can be practically anything (typically an impulse, sine sweep or white noise). You provide the schematic with DRY test tone and WET test tone (one passed through filter you desire to model...in case you have IR then input it here and input impulse to the DRY).
The schematic will preform Least Squares Method to approximate IIR filter coefficients. You can select the order of the filter (higher order, more precise the result, but also the filter will have to be more complex). In the output float array the filters are arranged as [b0,b1,...bn,a1,a2,...a,n] Note that A coefficients are inverse of standard IIR filter coefficients. that is because in standard IIR the an*y(n) is subtracted, but Least squares method assumes they are added.
EDIT: added the stable version of the filter. Old one using trogs float array to mem conversion was crashing.
- Attachments
-
- least squares method2.fsm
- (57.73 KiB) Downloaded 1234 times
Last edited by KG_is_back on Sun Mar 02, 2014 9:15 pm, edited 1 time in total.
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: FIR to IIR converter
I've added Filter that handles any given order and array of coefficients. I've noticed that filter orders of 6+ are likely to get unstable. That is partially caused by low precision of matrix solver (ruby version might fix that) and the fact that 6+order filters are generally unstable Separating the High order filters into smaller biquad sections might improve it, but I would need help with that. I know it is possible by deflation (made in ruby would be awesome).
- Attachments
-
- least squares method2.fsm
- (55.29 KiB) Downloaded 1241 times
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: FIR to IIR converter
hi
that last one crashes FS for me m8! the only way i can open it is to start FS in safe mode and drag n drop the fsm onto the workspace! i even tries saving it out with another name but get the same problem!
Regards
that last one crashes FS for me m8! the only way i can open it is to start FS in safe mode and drag n drop the fsm onto the workspace! i even tries saving it out with another name but get the same problem!
Regards
- Jay
- Posts: 276
- Joined: Tue Jul 13, 2010 5:42 pm
Re: FIR to IIR converter
I think I know why... I used trogs experimental array to mem system, that saves array in ruby code and sends the address of the array to assembly component. I shoud've used traditional method to load the coefficient array into the filter. I will fix it later OK?
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: FIR to IIR converter
I hope this can help,
here is PURE RUBY - CLASS MATRIX / VECTOR
here is PURE RUBY - CLASS MATRIX / VECTOR
-
digitalwhitebyte - Posts: 106
- Joined: Sat Jul 31, 2010 10:20 am
Re: FIR to IIR converter
HERE some example of Least Squares Implementation in ruby
http://nick-campbell.co.uk/matrixes-and ... ementation
http://nick-campbell.co.uk/matrixes-and ... ementation
-
digitalwhitebyte - Posts: 106
- Joined: Sat Jul 31, 2010 10:20 am
Re: FIR to IIR converter
DWB, when i opened your fsm and clicked help matrix, ruby got updated automaticly to a new version! i went to screen cap its messagbox but it closed before i could, message at the top of my browser said ruby updated to 2.1.0.something!
is that supposed to happen?
is that supposed to happen?
- Jay
- Posts: 276
- Joined: Tue Jul 13, 2010 5:42 pm
Re: FIR to IIR converter
are simple links to a web address
http://www.ruby-doc.org/stdlib-1.9.3/li ... atrix.html
http://www.ruby-doc.org/stdlib-1.9.3/li ... ector.html
http://www.ruby-doc.org/stdlib-1.9.3/li ... atrix.html
http://www.ruby-doc.org/stdlib-1.9.3/li ... ector.html
-
digitalwhitebyte - Posts: 106
- Joined: Sat Jul 31, 2010 10:20 am
Re: FIR to IIR converter
lol never mind my last post! i was drunk and confused ha ha i think what i saw was a popup site banner saying that their downloadable Ruby had been updated and not my Ruby within FloweStone well i had consumed 2 thirds of a bottle of Macallan
- Jay
- Posts: 276
- Joined: Tue Jul 13, 2010 5:42 pm
Re: FIR to IIR converter
digitalwhitebyte wrote:I hope this can help,
here is PURE RUBY - CLASS MATRIX / VECTOR
ah too bad I have super-low ruby basics, so I do not know how to use this. Can you post an example of how to use this?
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
10 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 89 guests