matlab distortion testing script to play with - diyAudio
Go Back   Home > Forums > Loudspeakers > Multi-Way

Multi-Way Conventional loudspeakers with crossovers

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 20th June 2006, 04:23 AM   #1
mazurek is offline mazurek  United States
diyAudio Member
 
Join Date: Aug 2005
Default matlab distortion testing script to play with

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
Attached Files
File Type: txt impulsetest.txt (710 Bytes, 45 views)
  Reply With Quote
Old 20th June 2006, 05:04 AM   #2
jcx is offline jcx  United States
diyAudio Member
 
Join Date: Feb 2003
Location: ..
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/A...Parameters.pdf

don't miss the papers too!

pseudorandom sequence frequency identification should be easy in MatLab/SciLab
  Reply With Quote
Old 20th June 2006, 12:27 PM   #3
mazurek is offline mazurek  United States
diyAudio Member
 
Join Date: Aug 2005
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.
  Reply With Quote
Old 21st June 2006, 10:52 PM   #4
Svante is offline Svante  Sweden
diyAudio Member
 
Svante's Avatar
 
Join Date: Feb 2004
Location: Stockholm
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?n...1751&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.
__________________
Simulate loudspeakers: Basta!
Simulate the baffle step: The Edge
  Reply With Quote
Old 22nd June 2006, 12:27 AM   #5
mazurek is offline mazurek  United States
diyAudio Member
 
Join Date: Aug 2005
Thanks, I will play with the scripts this weekend.
  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
Testing Harmonic Distortion in a enclosure ocool_15 Multi-Way 6 7th December 2007 12:25 AM
Matlab mikeks Everything Else 3 2nd May 2007 08:30 PM
Matlab eag The Lounge 1 10th March 2006 05:19 PM
testing distortion/noise on a X'd amp? rif Pass Labs 1 18th August 2004 07:23 PM
Non Linear Distortion testing - Harmonic Distortion JMB Multi-Way 0 20th July 2004 03:54 PM


New To Site? Need Help?

All times are GMT. The time now is 07:28 AM.


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