Contenido principal

roomCriteria

R2026b

Evaluate room background noise using room criteria (RC) curves

Since R2026b

    Description

    RC = roomCriteria(audioIn,fs) returns the room criteria (RC) level according to the ANSI/ASA S12.2-2019 standard [1]. The function designates an RC curve and a spectrum classification based on the procedure outlined in the standard.

    example

    RC = roomCriteria(Leq) computes the RC level using equivalent continuous sound pressure level (SPL) measurements across octave bands.

    example

    RC = roomCriteria(___,Name=Value) specifies options using one or more name-value arguments.

    [RC,LMF] = roomCriteria(___) also returns the mid-frequency average (LMF).

    [RC,LMF,QAI] = roomCriteria(___) also returns the quality assessment index (QAI).

    [RC,LMF,QAI,rattleRisk] = roomCriteria(___) also returns a structure detailing the likelihood of acoustically induced vibrations and rattles.

    roomCriteria(___) without any output arguments plots the octave band SPL measurements against RC curves and displays the RC level.

    Examples

    collapse all

    Load a recording of a room with background noise.

    [audioIn, fs] = audioread("office_kitchen_44p1_20s.wav");

    If possible, enter the calibration factor for the microphone used to make the recording or calculate it using calibrateMicrophone. The microphone in this example has an associated reference recording at 1 kHz with an SPL meter reading of 64 dB.

    [audioRef, fsRef] = audioread("1khz_64db_44p1.wav");
    SPLreading = 64;
    calibrationFactor = calibrateMicrophone(audioRef,fsRef,SPLreading)
    calibrationFactor = 
    2.0836
    

    Plot the room criteria (RC) level for the room recording.

    roomCriteria(audioIn,fs,CalibrationFactor=calibrationFactor)

    Figure contains an axes object. The axes object with title Room Criteria, xlabel Octave-Band Center Frequency (Hz), ylabel Sound Pressure Level (dB) contains 14 objects of type line, text. These objects represent Measurement, RC-41.

    This room has an RC level of 41, with a spectrum imbalance characterized by hiss caused by high frequencies. Additionally calculate the mid-frequency average (LMF), quality assessment index (QAI), and analyze the room for spectrum imbalances and rattle risk.

    [RC, LMF, QAI, rr] = roomCriteria(audioIn,fs,CalibrationFactor=calibrationFactor)
    RC = 
    "RC-41 (H)"
    
    LMF = 
    40.9815
    
    QAI = 
    10
    
    rr = struct with fields:
        Summary: "No acoustically induced vibrations and rattles issues detected."
        Details: [3×3 table]
    
    

    Collect equivalent continuous sound level (Leq) measurements of a room using a sound pressure level (SPL) meter with octave band filters centered at 16, 31.5, 63, 125, 250, 500, 1000, 2000, 4000, and 8000 Hz.

    Leq = [59,61,54,47,38,37,30,24,19,12]; % readings from meter

    Use roomCriteria to calculate the room criteria (RC) level using the readings from the SPL meter.

    RC = roomCriteria(Leq)
    RC = 
    "RC-30 (R)"
    

    Input Arguments

    collapse all

    Audio input, specified as a column vector of real finite numbers. If audioIn is not calibrated, you can determine the calibration factor using calibrateMicrophone. Specify either audioIn or Leq.

    For guidance on taking compliant measurements, see Calibration Factor for Audio Recordings.

    Data Types: single | double

    Sample rate in Hz, specified as a scalar equal to or greater than 16 kHz.

    fs is required when you specify the first argument as audioIn. This argument is invalid when you specify the first argument as Leq.

    Data Types: single | double

    Octave-band equivalent continuous sound level (Leq) measurements in decibels (dB), specified as a 10-element row vector. Each element must correspond to a measurement at nominal octave band center 16, 31.5, 63, 125, 250, 500, 1000, 2000, 4000, and 8000 Hz, respectively.

    If the SPL for a given band is unknown, specify it as missing. An RC level calculated with missing Leq values might not be compliant with ASA S12.2-2019.

    Specify either audioIn or Leq.

    For guidance on taking compliant measurements, see Obtaining Standard Compliant Sound Level Measurements.

    Dependencies

    Data Types: single | double

    Name-Value Arguments

    collapse all

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: roomCriteria(audioIn,fs,CalibrationFactor=1.5)

    Microphone calibration factor, specified as a positive scalar. audioIn is multiplied by CalibrationFactor before analysis. To compute the calibration factor specific to your system, use the calibrateMicrophone function.

    CalibrationFactor is valid only when you specify the first argument as audioIn.

    Data Types: single | double

    Reference pressure for dB calculation in pascals, specified as a positive scalar. The default value, 20 micropascals, is the common value for air.

    PressureReference is valid only when you specify the first argument as audioIn.

    Data Types: single | double

    Output Arguments

    collapse all

    RC level, returned as a string. RC has the form RC-LMF (SC), where LMF is the mid-frequency average value of the input rounded to the nearest decibel and SC is the spectrum classification.

    For more information on the calculating the RC value, see Calculating the RC Level and Spectrum Imbalance.

    Mid-frequency average, returned as a scalar. The mid-frequency average is the average of the SPL measurements in the 500, 1000, and 2000 Hz octave bands.

    For more information, see Mid-Frequency Average.

    Quality assessment index, returned as a scalar. The QAI is a measure of the degree to which the shape of the spectrum of the input deviates from the selected RC curve.

    For more information on spectrum imbalance determination, see Quality Assessment Index.

    Risk of acoustically induced vibrations and rattles, returned as a structure. rattleRisk contains a summary of octave bands that can contain perceptible rattle and the table of values used by the function to determine the risk.

    For more information on rattle risk, see Rattle Risk

    More About

    collapse all

    References

    [1] Acoustical Society of America. Criteria for Evaluating Room Noise. ANSI/ASA S12.2-2019 (R2023). Acoustical Society of America, 2019.

    [2] Blazier, Jr., Warren E. “RC Mark II: A Refined Procedure for Rating the Noise of Heating, Ventilating, and Air-Conditioning (HVAC) Systems in Buildings.” Noise Control Engineering Journal 45, no. 6 (1997): 243. https://doi.org/10.3397/1.2828446.

    Version History

    Introduced in R2026b