matlab distortion testing script to play with

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
A lot of people have access to free Matlab for school, I was browsing through it to see whether we could develop a free automated distortion tester, and an easy means by which to measure gated impulse frequency response.

Here is an initial script I have, I have issues understanding what the best frequency response impulse is to test the loudspeaker, a single raised bit is not an adequate impulse response. I am curious what the favorite testing function is, for example what does speaker workshop use when doing pulse test.

I may just do a brute force script, doing single tone testing at many tones, and gating the response to account for room reflections in the frequency response plot. Then on the ungated response, I can have matlab automatically detect the levels of the first, second, third, etc harmonic, and compute average broadband noise. Could probably even compare gated and ungated to gage room effects.

Here's an initial script for proof of concept. I have way too much to do, and not so much time, so this may or may not see the light of day, but I thought I'd release the initial script, and others can play with their own versions.


EDIT: changed from inline to attachment, too many sad faces appeared in my code block:(
 

Attachments

  • impulsetest.txt
    710 bytes · Views: 79
you might consider Scilab/Scicos free open source matlab workalike - m file translation is supported

http://www.scilab.org/

SciLab also has links to one audio dev project:
http://www.mnt-aq.it/english/dsp_tut.htm

and the downloads page has 24/32 bit wav extension code



also anyone interested in measuring and predicting speaker performance needs to spend some time cruising Klippel's site

http://www.klippel.de

from: know how>application notes

http://www.klippel.de/download/bin/AN17 - Credibility of Nonlinear Parameters.pdf

don't miss the papers too!

pseudorandom sequence frequency identification should be easy in MatLab/SciLab
 
Thanks a lot for the info, I haven't done enough homework yet, but was intrigued to play with the idea. This will prove to be excellent reading - I was looking through the intro books at partsexpress, and I'm not sure if there are any good measurement books. I suppose I ought to get the appolito measurement book too.
 
There has been some discussion on a Matlab script called "trolldist" made by a swede (lilltroll) on a swedish forum:

http://www.faktiskt.se/modules.php?name=Forums&file=viewtopic&t=11751&list=full

It measures distortion using logaritmic sine sweeps. A sweep of some 5 seconds is enough to nearly completely map the harmonic distortion of a system. I have seen it in action and it is really impressive. It does require a bit of matlab skills to get it running, though.

Even if swedish is hard to read for a non-swede, i think you can find the links to the source code in the text.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.