# calibrate

Calibrate meter using calibration tone with known level

## Syntax

``calibrate(SPL,micRecording,SPLreading)``

## Description

``` `calibrate(SPL,micRecording,SPLreading)` sets the `CalibrationFactor` property of the `splMeter` object. The calibration factor is based on the computed sound pressure level (SPL) of `micRecording` and the known `SPLreading`.To calibrate, first set the SampleRate property of the `splMeter` object to match the `micRecording`, and the PressureReference and FrequencyWeighting properties to match the values from the physical SPL meter.```

## Input Arguments

collapse all

`splMeter` System object to be calibrated.

Audio signal used to calibrate microphone, specified as a column vector. `micRecording` must be acquired from the microphone you want to calibrate. The recording should consist of a 1 kHz test tone.

Data Types: `single` | `double`

Sound pressure level (SPL) reported from physical meter in dB, specified as a scalar.

Data Types: `single` | `double`

## Algorithms

To set the `CalibrationFactor` property on an `splMeter` object, the `calibrate` function uses:

• A calibration tone recorded from the microphone you want to calibrate

• The sample rate used by your sound card for AD conversion.

• The known loudness, usually determined using a physical SPL meter.

• The frequency weighting used by your physical SPL meter.

• The atmospheric pressure at the recording location.

The diagram indicates a typical physical setup and the locations of required information.

The `CalibrationFactor` property is set according to the equation:

`$\text{CalibrationFactor}=\frac{{10}^{\left(\left(\text{SPLreading}-k\right)/20\right)}}{\mathrm{rms}\left(\text{x}\right)}$`

where `x` is the microphone recording passed through the weighting filter specified by the FrequencyWeighting property of the `splMeter` object. k is 1 pascal relative to the reference pressure calculated in dB:

`$k=20{\mathrm{log}}_{10}\left(\frac{1}{\text{PressureReference}}\right).$`

## Version History

Introduced in R2018a