Pages: [1]   Go Down
Author Topic: Guidance with MATLAB compatibility  (Read 1017 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everybody, this is my first post in this forum lots more to come I hope smiley
I am an engineering student in my final year at college and I am supposed to make a project (which will greatly affect my grades). I am planning on doing something related to Sound enhancement or noise reduction technique. I will be implementing it using MATLAB so the while testing my matlab code I will be giving it some sound signal with noise in it as input and should get enhanced sound as output.

Now, I was wondering if I can give the input, and get an output in hardware using ARDUINO maybe? Is it possible to burn the MATLAB code to ARDUINO ? All the help I get is appreciated. Thanks alot smiley
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 613
Posts: 49287
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I will be implementing it using MATLAB so the while testing my matlab code I will be giving it some sound signal with noise in it as input and should get enhanced sound as output.
You use "it" in this sentence three times - presumably to refer to three different things. It would be much better if you refrained from using "it" unless it is quite clear what "it" is.

The first "it" presumably refers to the project you are developing, but the second "it" could be any number of things. The third "it" presumably refers to the sound signal, but it is not clear what is getting the sound signal.

Quote
Now, I was wondering if I can give the input, and get an output in hardware using ARDUINO maybe?
The Arduino is not very good at audio processing. It is far too slow, for the most part.

Quote
Is it possible to burn the MATLAB code to ARDUINO ?
No.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am very sorry I will refrain from using "it" I promise  smiley
You are right my first "it" refers to the project which I am developing which is basically reduction of noise in any sound signal through adaptive and subtraction methods.

Second "it" refers again to my project and since I will be implementing this method in Matlab i will be testing my code on a pre-recorded noisy speech in .wav format so if everything works fine I should get noiseless speech as output. 
 
Correct,third "it" refers to the sound signal.

Now, All of this will be done in software my guide says it is mandatory I use Matlab. But I have always been more of a hardware guy so,I want to take speech(with noise in the surrounding) as input through a microphone give it "some hardware" and get noiseless speech as output on a speaker.

I know that I can do this using a DSP. But I'll have to learn how to use one and code again (As I am already going to code in matlab).

So, Is there any option by which I can interface MATLAB to a hardware device? I know I can directly give input to the computer and process it using matlab but I'd still prefer an independent module. Please help. Thanks smiley 
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13705
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is it possible to burn the MATLAB code to ARDUINO ?
Last year we have had a student who developed a PID system (+some more) in MATLAB and generated code for the Arduino from MATLAB. So although PaulS is technically right that you cannot run native MATLAB code on the Arduino directly, Matlab seems to have means to port a design to Arduino. Be aware that restrictions apply, e.g. the float datatype in Arduino is smaller than in MATLAB.  I do not know which version of MATLAB was used, you can check MATLAB site for that
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 613
Posts: 49287
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So, Is there any option by which I can interface MATLAB to a hardware device?
MatLab connects to the Arduino via a serial port, so the Arduino can send data to MatLab, and get data from MatLab.

The question, then, is what kind of data do you want to get from the Arduino? Audio data is not going to work. It takes too long to get a sample, and the send information about that sample to MatLab. The time it takes means that you will get a very poor representation of the audio data, due to far too few samples per second.

Audio data contains harmonics and frequencies that contribute to the sound quality (or lack thereof). Using a microphone as input to the Arduino will give you an average reading over some (small) period of time. The smaller the period of time, the closer you'll come to replicating, elsewhere, the data that you get from the microphone. The problem is that the time over which you sample is too long, and the time between samples is way too long.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13705
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So PaulS, as the original project goal was doing "Sound enhancement", the rough / low bits / low freq sound data from the Arduino might be just the opportunity the OP is looking for.
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: