Support

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

FIR to IIR converter

Post any examples or modules that you want to share here

FIR to IIR converter

Postby KG_is_back » Sun Feb 23, 2014 8:06 pm

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.
Attachments
least squares method2.fsm
(57.73 KiB) Downloaded 1169 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

Postby KG_is_back » Mon Feb 24, 2014 2:49 pm

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 :cry: 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 1177 times
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: FIR to IIR converter

Postby Jay » Mon Feb 24, 2014 5:38 pm

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
Jay
 
Posts: 276
Joined: Tue Jul 13, 2010 5:42 pm

Re: FIR to IIR converter

Postby KG_is_back » Mon Feb 24, 2014 6:15 pm

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

Postby digitalwhitebyte » Mon Feb 24, 2014 7:26 pm

I hope this can help,
here is PURE RUBY - CLASS MATRIX / VECTOR
PURE RUBY - CLASS MATRIX_VECTOR - DWB~2014.fsm
(18.87 KiB) Downloaded 1154 times
User avatar
digitalwhitebyte
 
Posts: 106
Joined: Sat Jul 31, 2010 10:20 am

Re: FIR to IIR converter

Postby digitalwhitebyte » Mon Feb 24, 2014 7:30 pm

HERE some example of Least Squares Implementation in ruby
http://nick-campbell.co.uk/matrixes-and ... ementation
User avatar
digitalwhitebyte
 
Posts: 106
Joined: Sat Jul 31, 2010 10:20 am

Re: FIR to IIR converter

Postby Jay » Tue Feb 25, 2014 3:12 am

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?
Jay
 
Posts: 276
Joined: Tue Jul 13, 2010 5:42 pm

Re: FIR to IIR converter

Postby digitalwhitebyte » Tue Feb 25, 2014 8:56 am

User avatar
digitalwhitebyte
 
Posts: 106
Joined: Sat Jul 31, 2010 10:20 am

Re: FIR to IIR converter

Postby Jay » Tue Feb 25, 2014 10:05 am

lol never mind my last post! i was drunk and confused ha ha :mrgreen: i think what i saw was a popup site banner saying that their downloadable Ruby had been updated and not my Ruby within FloweStone :oops: 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

Postby KG_is_back » Tue Feb 25, 2014 4:45 pm

digitalwhitebyte wrote:I hope this can help,
here is PURE RUBY - CLASS MATRIX / VECTOR
PURE RUBY - CLASS MATRIX_VECTOR - DWB~2014.fsm


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


Return to User Examples

Who is online

Users browsing this forum: No registered users and 11 guests