I have recorded an ultrasonic wave from a microphone using MATLAB command. After plotting that recorded wav file, the graph shows the amplitude between $1$ and $-1$.

  • Can anyone tell that what is does mean?
  • How can we convert that data into pressure?

I read from the detail of audiowrite() here that the data should be normalized between $1$ and $-1$. But my question is in what form it reads and stores in the wav file. Either it is voltage or something else.

  • Why it is normalized?
  • 3
    $\begingroup$ Your signal is simply stored as float32 samples. In order to convert the samples to physical quantities you need a calibration factor for your microphone. For that you could for example use a reference measuring device, which will listen at the same time as you record and will show you that this particular signal as x dB SPL. Without measuring/knowing that factor it's impossible to retrieve the actual pressure value. $\endgroup$
    – jojek
    Nov 2 '16 at 13:54

I'd say it's extremely difficult to obtain the sound pressure from a WAV file.

Consider what happens to the sound signal between the microphone and the WAV file. Pressure is applied to the mike. It is converted to an electrical signal, with power that depends on the properties of the mike transducer. Then it is attenuated on its way to the sound card, where it is amplified, filtered, sampled, quantized, encoded, and further massaged by the sound card driver and the OS sound system.

(Furthermore, if the signal is ultrasonic, the frequency response of your sound-card front-end may very well come into play too).

Then, in software, the samples are further processed to fit a particular WAV format (the details of which are amply documented in Wikipedia and other sources).

One possible way to proceed is to obtain experimental readings with your particular set-up: generate a set of known, controlled sound pressures on your microphone, and correlate them with the numbers you get in the WAV file.

  • $\begingroup$ When we plot the graph of a wav file, what is the unit of amplitude. If it is Voltage then according to the description written in this link Sound Intensity we can convert the data into pressure by taking two readings, one reading represent the point where we want to know the pressure and the other represent the reference point. Is this true? $\endgroup$
    – Ahsan Raza
    Nov 3 '16 at 1:48
  • $\begingroup$ Not directly -- those calculations assume a direct measure of the sound, whereas (as I explained) the measurement through a soundcard+driver+OS is not direct. You have to do something like what jojek describes in his comment above. $\endgroup$
    – MBaz
    Nov 3 '16 at 13:00

I don't have any experience with ultra sound so i expect it is basically the same as standard sound.
So you have a soundwave true the air what is basically a pressure variation(Pa or dB). When recording with a microphone you converting the sound pressure to a voltage based on the specs of your microphone(Pa/V or dB/V).
During the recording of you're sound it is amplified and converted by you're soundcard to a binary signal. And this binary signal you scaled up from -1 to + 1.

So if you want to calculate back you're pressure have to know how all steps before work/ do. If you have just an consumer soundcard probably the step between the microphone and binary signal is unknown. in this case you want a known situation to work relative to(dB meter with a single frequency).
Otherwise you can set different amplification levels.

  • Normalisation is nothing else that you set all the signals to the same amplifacation. most of the time it is +/-1 so you have the whole bandwidth of you're amplitude.

  • A wav file is the saved binary signals. Containg a array of 16 bit values with for every value a amplitude. to convert this to a real world pressure you need former convertion and amplifications


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.