<!-- canonical: https://jmrplens.github.io/phonometry/environment/assessment/spanish-noise-regulation/ -->
Source: https://jmrplens.github.io/phonometry/environment/assessment/spanish-noise-regulation/

# Spanish Noise Regulation (RD 1367/2007)

Acoustic assessment in Spain does not stop at an $L_\mathrm{Aeq}$. Real Decreto
1367/2007, which develops Ley 37/2003 del Ruido, defines an index of its own,
the **corrected equivalent continuous sound pressure level** $L_{\mathrm{Keq},T}$, and
builds the whole compliance chain on it: the day is split into evaluation
periods, each period into noise phases, each phase is corrected for tonal,
low-frequency and impulsive character, the result is integrated up to an
annual value, and that value is compared against three different criteria read
off the same limit table. This page implements that chain end to end.

The per-period levels that feed it come from
[Integrated & Statistical Levels](https://jmrplens.github.io/phonometry/signals/levels/levels/), and the European
$L_\mathrm{den}$/$L_\mathrm{dn}$ indicators they coexist with, from
[Environmental levels](https://jmrplens.github.io/phonometry/environment/assessment/environmental-levels/).

## The corrected level LKeq and its three corrections

The index of the regulation is (Annex I A.2 c):

$$
L_{\mathrm{Keq},T} = L_{\mathrm{Aeq},T} + K_\mathrm{t} + K_\mathrm{f} + K_\mathrm{i}
$$

where $L_{\mathrm{Aeq},T}$ is the A-weighted equivalent continuous sound pressure level,
already corrected for background noise, and the three corrections penalise the
character of the noise. Each is 0, 3 or 6 dB, and their sum is capped at 9 dB
(Annex IV A.3.3), a cap exposed as `RD1367_MAX_CORRECTION`. Although the index
derives from an A-weighted level, the regulation expresses it in dB.

| Correction | Input quantity | Thresholds | Function |
| :--- | :--- | :--- | :--- |
| $K_\mathrm{t}$, emergent tonal components | **Unweighted** one-third-octave spectrum; $L_\mathrm{t} = L_f - L_s$, with $L_s$ the **arithmetic** mean of the two adjacent bands | 8/12 dB (20 to 125 Hz), 5/8 dB (160 to 400 Hz), 3/5 dB (500 Hz to 10 kHz) | `tonal_correction()` |
| $K_\mathrm{f}$, low-frequency components | $L_f = L_{\mathrm{Ceq},Ti} - L_{\mathrm{Aeq},Ti}$ | 0 dB up to 10 dB, 3 dB for $10 < L_f \le 15$, 6 dB above | `low_frequency_correction()` |
| $K_\mathrm{i}$, impulsive components | $L_\mathrm{i} = L_{\mathrm{AIeq},Ti} - L_{\mathrm{Aeq},Ti}$ | the same 10 and 15 dB | `impulsive_correction()` |

$K_\mathrm{t}$ is evaluated band by band and, when several emergent tones are present,
the largest of the resulting $K_\mathrm{t}$ governs (step d):

```python
from phonometry import environment

freqs = [100, 125, 160, 200, 250, 315, 400, 500, 630, 800, 1000]
levels = [58.0, 60.0, 59.0, 61.0, 72.0, 62.0, 60.0, 58.0, 56.0, 54.0, 52.0]

kt = environment.tonal_correction(levels, freqs)
kt.correction              # 6 dB
kt.governing_frequency     # 250.0 Hz
kt.differences[4]          # Lt = 10.5 dB above the mean of the neighbours

environment.low_frequency_correction(lceq=76.0, laeq=63.0)   # Lf = 13 dB -> Kf = 3 dB
environment.impulsive_correction(laieq=68.0, laeq=63.0)      # Li = 5 dB  -> Ki = 0 dB
environment.corrected_level(63.0, kt=6, kf=3, ki=0)          # LKeq = 72.0 dB
environment.total_correction(kt=6, kf=6, ki=3)               # 9.0 dB: the cap
```

## Relationship with the ISO 1996 procedures

The corrections of the regulation resemble ISO 1996 procedures the library
already implements, but they are **not interchangeable**, which is why this
module implements the RD's own variants instead of delegating to them:

- `tonal_audibility()` / `tonal_adjustment()` are the engineering method of
  ISO 1996-2 Annex C, based on the audibility $\Delta L_\mathrm{ta}$ within the
  critical band around the tone, and return a **continuous** $K_\mathrm{t}$ between 0
  and 6 dB. The RD works on one-third-octave band differences and produces
  only 0, 3 or 6 dB.
- `tonal_seeking_survey()` (survey method, ISO 1996-2:2017 Annex K) is the
  closest relative, because it also splits the spectrum at 125 and 400 Hz, but
  it requires the band to exceed **both** neighbours by 15/8/5 dB and only
  returns a prominence flag; the RD compares against the **mean** of the
  neighbours with 8/5/3 dB thresholds and grades the result.
- `impulsive_sound_adjustment()` is the onset-rate method of ISO/PAS 1996-3 on
  a calibrated signal. The RD's $K_\mathrm{i}$ is the classic $L_\mathrm{AIeq} - L_\mathrm{Aeq}$
  difference read off a sound level meter, not the same quantity.
- $K_\mathrm{f}$ has no counterpart in ISO 1996 at all: the $L_\mathrm{Ceq} - L_\mathrm{Aeq}$
  difference is specific to the Spanish regulation.

## Evaluation periods and noise phases

The regulation defines three evaluation periods (Annex I A.1): day from 07:00
to 19:00 (12 h), evening from 19:00 to 23:00 (4 h) and night from 23:00 to
07:00 (8 h), with the durations and clock limits in `RD1367_PERIOD_HOURS` and
`RD1367_PERIOD_CLOCK_LIMITS`.

When emission varies within a period, the period is split into **noise phases**
$T_i$ of uniformly perceived level. $L_{\mathrm{Aeq},Ti}$ is measured over at least 5 s
in each phase and corrected, and the period level is the energy mean weighted
by phase duration (Annex IV A.3.4.2 b):

$$
L_{\mathrm{Keq},T} = 10 \log_{10} \left[ \frac{1}{T} \sum_i T_i \, 10^{L_{\mathrm{Keq},Ti}/10} \right]
$$

The annual average $L_{\mathrm{K},x}$ of each period is in turn the energy mean of the
daily $L_{\mathrm{Keq},x}$ over the year (Annex I A.2 d). The regulation also fixes its
own rounding: add 0.5 dB to the result and take the integer part, which is what
`round_reported_level()` does.

```python
from phonometry import environment

environment.RD1367_PERIOD_CLOCK_LIMITS["day"]     # (7, 19)
environment.RD1367_PERIOD_HOURS["day"]            # 12.0 h

day = [environment.NoisePhase(2, 0.0, label="cerrada"),
       environment.NoisePhase(6, 50.0, kt=6, kf=3),
       environment.NoisePhase(4, 48.0, kt=3, kf=3)]

lkeq_d = environment.evaluation_period_level(day)   # 56.82 dB, unrounded
environment.round_reported_level(lkeq_d)            # 57 dB

lk_d = environment.long_term_corrected_level([57.0, 0.0], weights=[303, 62])
environment.round_reported_level(lk_d)              # 56 dB (303 days open, 62 closed)
```

## Acoustic quality objectives and immission limit values

The regulation separates two families of values. The **acoustic quality
objectives** of Annex II are what the whole set of acoustic emitters reaching
an acoustic area or a room must meet; the **immission limit values** of Annex
III are what a single emitter is held to.

| Table | Content | Function |
| :--- | :--- | :--- |
| Annex II, Table A | Outdoor objectives by acoustic area type: e 60/60/50, a 65/65/55, d 70/70/65, c 73/73/63, b 75/75/65 dB (as amended by RD 1038/2012) | `outdoor_quality_objectives()` |
| Annex II, Table B | Indoor objectives by building use and room type | `indoor_quality_objectives()` |
| Annex II, Table C | Vibration objective $Law$ | `vibration_quality_objective()` |
| Annex III, Tables A1 and A2 | Limit values for new road, rail and airport infrastructure, and $L_\mathrm{Amax}$ | `infrastructure_limits()`, `max_infrastructure_limit()` |
| Annex III, Table B1 | Limit values for port infrastructure and activities | `activity_limits()` |
| Annex III, Table B2 | Noise transmitted by activities to acoustically adjacent premises | `adjacent_premises_limits()` |

Two details of Table A are worth keeping in mind. Acoustic area type f (general
transport-infrastructure systems and public facilities) carries no numeric
value: footnote 2 refers it to the objectives of the adjoining areas, which is
why `ACOUSTIC_AREA_TYPES` lists it but the limit functions do not accept it.
And in areas urbanised after the regulation entered into force (24 October
2007) the objective is 5 dB stricter (Article 14.2), which is what
`urbanisation="new"` applies.

```python
from phonometry import environment

environment.outdoor_quality_objectives("a")                       # 65 / 65 / 55 dB
environment.outdoor_quality_objectives("a", urbanisation="new")   # 60 / 60 / 50 dB
environment.indoor_quality_objectives("residential", "bedrooms")  # 40 / 40 / 30 dB
environment.infrastructure_limits("a")                            # 60 / 60 / 50 dB
environment.max_infrastructure_limit("a")                         # 85 dB (LAmax)
environment.activity_limits("a")                                  # 55 / 55 / 45 dB
environment.adjacent_premises_limits("residential", "bedrooms")   # 35 / 35 / 25 dB
environment.vibration_quality_objective("residential")            # 75 dB
```

Meeting an immission limit value is not simply staying below the number in the
table. For activities and port infrastructure, Article 25.1 b) demands three
things at once: no annual average $L_{\mathrm{K},x}$ above the table value, no daily
$L_{\mathrm{Keq},x}$ more than 3 dB above it, and no $L_{\mathrm{Keq},Ti}$ measured in a noise
phase more than 5 dB above it. For the inspection of an activity already in
operation, Article 25.2 applies only the last two.

## Worked example: a new activity on residential land

A new activity on residential land (acoustic area type a) opens continuously
from 9 to 21 h. A noisy machine runs only between 9 and 15 h; for the rest of
the opening hours the levels are steady, and while the activity is shut down it
emits nothing. The levels measured outdoors, already corrected for background
noise, are:

| Phase | $L_\mathrm{Aeq,5s}$ | $K_\mathrm{t}$ | $K_\mathrm{f}$ | $K_\mathrm{i}$ | $K$ | $L_\mathrm{Keq,5s}$ |
| :--- | ---: | ---: | ---: | ---: | ---: | ---: |
| With the noisy machine | 50 dB | 6 | 3 | 0 | 9 | 59 dB |
| Rest of the opening hours | 48 dB | 3 | 3 | 0 | 6 | 54 dB |

The day period splits into three phases (2 h closed, 6 h with the machine, 4 h
with the remaining sources) and gives $L_\mathrm{Keq,d} = 57$ dB; the evening period
splits into two (2 h open, 2 h closed) and gives $L_\mathrm{Keq,e} = 51$ dB. The
activity opens 303 days a year and closes 62 (July and August), from which
$L_\mathrm{K,d} = 56$ dB and $L_\mathrm{K,e} = 50$ dB. The limit values for area type a
(Annex III, Table B1) are 55/55/45 dB, so the applicable criteria are 60 dB on
each $L_{\mathrm{Keq},Ti}$, 58 dB on the daily $L_{\mathrm{Keq},x}$ and 55 dB on the annual
$L_{\mathrm{K},x}$:

```python
from phonometry import environment

day = [environment.NoisePhase(2, 0.0, label="cerrada"),
       environment.NoisePhase(6, 50.0, kt=6, kf=3),
       environment.NoisePhase(4, 48.0, kt=3, kf=3)]
evening = [environment.NoisePhase(2, 48.0, kt=3, kf=3),
           environment.NoisePhase(2, 0.0, label="cerrada")]

limits = environment.activity_limits("a")          # 55 / 55 / 45 dB
verdict = environment.assess_activity(
    {"day": day, "evening": evening}, limits, operating_days=303)

verdict.periods[0].reported_level        # 57 dB  (LKeq,d)
verdict.periods[0].reported_long_term    # 56 dB  (LK,d)
verdict.complies                         # False: LK,d exceeds 55 dB
```

<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/jmrplens/phonometry/main/.github/images/rd1367_activity_assessment_dark.svg"><img src="https://raw.githubusercontent.com/jmrplens/phonometry/main/.github/images/rd1367_activity_assessment.svg" alt="RD 1367/2007 activity assessment: per-period maximum phase level, daily LKeq,x and annual LK,x against the +5 dB, +3 dB and table limit values, with the day annual level exceeding its limit" width="80%"></picture>

<details>
<summary>Show the code for this figure</summary>

```python
import matplotlib.pyplot as plt
from phonometry import environment

day = [environment.NoisePhase(2, 0.0, label="cerrada"),
       environment.NoisePhase(6, 50.0, kt=6, kf=3),
       environment.NoisePhase(4, 48.0, kt=3, kf=3)]
evening = [environment.NoisePhase(2, 48.0, kt=3, kf=3),
           environment.NoisePhase(2, 0.0, label="cerrada")]

verdict = environment.assess_activity(
    {"day": day, "evening": evening},
    environment.activity_limits("a"),
    operating_days=303,
)
verdict.plot()
plt.show()
```

</details>

The verdict is the fine point of the example. The measured $L_{\mathrm{Keq},Ti}$ (59 and
54 dB) stay below 60 dB, and the daily values (57 and 51 dB) below 58 dB, but
the annual average of the day period, $L_\mathrm{K,d} = 56$ dB, exceeds the 55 dB of
the table. A **new** activity does not comply. An activity already in
operation, judged under Article 25.2, would comply, because only the phase and
daily values are required of it; building the verdict with
`new_activity=False` shows exactly that.

## Plots and the inspection report

`ActivityAssessment.plot()` draws the three indices of each period against
their three criteria, as in the figure above, and
`TonalCorrectionResult.plot()` draws the one-third-octave spectrum with the
$L_\mathrm{t}$ differences that justify the applied $K_\mathrm{t}$.

`ActivityAssessment.report()` goes one step further and renders a one-page
acoustic inspection fiche: identification header, per-phase measurement table
with the $K_\mathrm{t}$/$K_\mathrm{f}$/$K_\mathrm{i}$ corrections, per-period assessment against the
applicable limit values and the boxed verdict. The default language is Spanish,
the language of the regulation; `language="en"` translates it.

```python
from phonometry import environment

verdict = environment.assess_activity(
    {"day": [environment.NoisePhase(2, 0.0, label="cerrada"),
             environment.NoisePhase(6, 50.0, kt=6, kf=3),
             environment.NoisePhase(4, 48.0, kt=3, kf=3)],
     "evening": [environment.NoisePhase(2, 48.0, kt=3, kf=3),
                 environment.NoisePhase(2, 0.0, label="cerrada")]},
    environment.activity_limits("a"),
    operating_days=303,
)

verdict.plot()                       # the three criteria per period
verdict.report("acta.pdf")           # acoustic inspection fiche, in Spanish
```

The example fiche, regenerated with `make reports`, is kept rendered in the
repository. Click the preview to open the PDF:

[![RD 1367/2007 activity assessment example report, rendered in Spanish: an identification header, the noise-phase table of the five phases with their Kt, Kf and Ki corrections and the resulting LKeq,Ti (59,0 dB with the noisy machine running, 54,0 dB for the rest of the sources), the per-period assessment against the 55 dB of Annex III Table B1 (day 59/60, 57/58 and 56/55, evening 54/60, 51/58 and 50/55), the bar plot of each period's levels against its three criteria, and the boxed verdict that the activity exceeds the RD 1367/2007 immission limit values, with the day as the governing period, LKeq,x = 57 dB against a limit of 55 dB and LK,x = 56 dB](https://raw.githubusercontent.com/jmrplens/phonometry/main/.github/reports/rd1367_activity_example.webp)](https://raw.githubusercontent.com/jmrplens/phonometry/main/.github/reports/rd1367_activity_example.pdf)

*Acoustic inspection fiche (`ActivityAssessment.report`), the three per-period
criteria of RD 1367/2007 and the boxed verdict. The day period clears the
phase criterion (59 against 60) and the daily one (57 against 58) and fails
only the annual $L_{\mathrm{K},x}$ (56 against 55) — which is why the fiche prints all
three: any one of them is enough to fail.*

## What this guide covers

**Covered.** The corrected level $L_{\mathrm{Keq},T}$ and the $K_\mathrm{t}$, $K_\mathrm{f}$ and $K_\mathrm{i}$
corrections of RD 1367/2007 (Annex I A.2 c and Annex IV A.3.3), the evaluation
periods and the noise-phase and annual integration (Annex I A.1 and Annex IV
A.3.4.2 b) with the regulation's own rounding, the acoustic quality objective
(Annex II) and immission limit value (Annex III) tables, and the Article 25
compliance check of activities and port infrastructure.

**Not covered.** The acoustic zoning into acoustic areas, the noise maps and
the action plans of Ley 37/2003 are planning instruments rather than
calculations, and are out of scope. The measurement procedures themselves
(microphone positions, series duration, number of measurements of Annex IV) are
not implemented either: this page starts where the sound level meter ends.

## Quick answers

### What is the LKeq level of RD 1367/2007?

It is the **corrected** equivalent continuous sound pressure level:
$L_{\mathrm{Keq},T} = L_{\mathrm{Aeq},T} + K_\mathrm{t} + K_\mathrm{f} + K_\mathrm{i}$ (Annex I A.2 c), where $K_\mathrm{t}$, $K_\mathrm{f}$
and $K_\mathrm{i}$ penalise the presence of emergent tonal, low-frequency and impulsive
components with 0, 3 or 6 dB each. The sum of the three corrections never
exceeds 9 dB.

## See also

- [Environmental levels](https://jmrplens.github.io/phonometry/environment/assessment/environmental-levels/): the $L_\mathrm{den}$ and $L_\mathrm{dn}$
  indicators and the ISO 1996-2 adjustments the corrections of the regulation
  coexist with.
- [Integrated & Statistical Levels](https://jmrplens.github.io/phonometry/signals/levels/levels/): the per-phase $L_\mathrm{Aeq}$,
  $L_\mathrm{Ceq}$ and $L_\mathrm{AIeq}$ levels that feed the three corrections.
- [Spanish Building Code (CTE DB-HR)](https://jmrplens.github.io/phonometry/buildings/insulation/spanish-building-code/): the other half
  of the Spanish framework, which shares the site's day noise index $L_\mathrm{d}$ with
  this page.
- [Impulsive-sound prominence](https://jmrplens.github.io/phonometry/environment/assessment/impulsive-sound/): the ISO/PAS 1996-3
  impulsive adjustment, the relative of $K_\mathrm{i}$ that is not interchangeable with
  it.
- API reference: [`environment.assessment.spain`](https://jmrplens.github.io/phonometry/reference/api/environment/spain/).

## References

- Avilés López, R., & Perera Martín, R. (2017). *Manual de acústica ambiental
  y arquitectónica*. Paraninfo. ISBN 978-84-283-3814-1.
  Ejemplos 3.1 to 3.3 (pp. 171-176) are the worked case reproduced here, with
  the noise-phase breakdown, the annual integration and the Article 25 verdict.
- Jefatura del Estado (Spain). (2003). *Ley 37/2003, de 17 de noviembre, del
  Ruido* (BOE-A-2003-20976).
  [BOE consolidated text](https://www.boe.es/buscar/act.php?id=BOE-A-2003-20976).
  The act the RD develops: the acoustic area types of Article 7, the figure of
  the acoustic emitter and the inspection regime of Articles 25 to 27.
- Ministerio de la Presidencia (Spain). (2007). *Real Decreto 1367/2007,
  developing Ley 37/2003 del Ruido on acoustic zoning, quality objectives and
  acoustic emissions* (BOE-A-2007-18397).
  [BOE consolidated text](https://www.boe.es/buscar/act.php?id=BOE-A-2007-18397).
  The corrected level, the corrections, the evaluation periods, the quality
  objectives and the immission limit values implemented on this page.

## Standards

RD 1367/2007 (BOE-A-2007-18397), the regulation that develops Ley 37/2003 del
Ruido on acoustic zoning, quality objectives and acoustic emissions: the
corrected level $L_{\mathrm{Keq},T}$ and the corrections $K_\mathrm{t}$, $K_\mathrm{f}$ and $K_\mathrm{i}$
(Annex I A.2 c, Annex
IV A.3.3), the evaluation periods and the noise-phase integration (Annex I
A.1, Annex IV A.3.4.2 b), the acoustic quality objectives of Annex II (Table A
as amended by RD 1038/2012) and the immission limit values of Annex III, with
the compliance criteria of Article 25.
