Académique Documents
Professionnel Documents
Culture Documents
Implementation of Fast and Slow time constants in the dBFA software suite............................................... 21
The purpose of time weightings, which are also called time constants, was initially to
facilitate the reading of sound pressure levels on measuring instruments like sound
level meters. Sound pressure levels do indeed usually fluctuate and it can be difficult
to follow the motion of an analogue or a digital level meter.
Overload
detector
Microphone
Frequency
weightings RMS detector Display in
Preamplifier Amplifier dB
(A, B, C) Pa
In a sound level meter, the time constant principle resides in the red ellipse on the
above diagram. Time weightings are based on the principle of a RC (resistor
condenser) electric circuit.
An input voltage called Vin, which is usually proportional to the square of the voltage
originated from the microphone, i.e., to the square of the sound pressure (Pa), is
applied to a 2-terminal circuit made of a resistor (R) and a condenser (C). The output
voltage Vc (that to be displayed) is read at the terminals of the condenser. A
logarithmic operation is applied to this voltage to get the value in decibels, according
to the following formula:
The reference voltage V0 is related to the sound pressure through the microphone
sensitivity S, which is expressed in mV/Pa, with formula:
Equation 2: V0 = S p 0
In a sound level meter, when the signal that is proportional to the sound pressure is
periodic, e.g., sinusoidal, its square is also periodic.
t
t
This circuit is of interest for time-variable voltages only since the current going
through the condenser depends on the tension variation only. We shall consider here
that the voltage variation is a sinusoidal function with an pulse (or frequency f with
=2f; or period T with T=1/f=2/ ).
Vin
The same current goes through the resistor and the condenser. The following
relations can be easily derived from electricity laws:
I
Equation 3: Vin = RI +
jC
I
Equation 4: Vc =
jC
Equation 5: I = jC Vc
Since our purpose is to define output voltage Vc from input voltage Vin, we get
Equation 7:
1
Equation 7: Vc = Vin( )
1 + jRC
The frequency response function (FRF) of the RC circuit is a complex function (the
impedance of the condenser is a complex function). It represents the response curve
as the amplitude and the phase of the circuit under study, i.e., the ratio of the output
voltage Vc to the input voltage Vin versus frequency.
Vc 1
Equation 8: =
Vin 1 + jRC
The graphs below are an example of the representation for a 100k resistor and a
1F condenser:
10
0
-10
-20
Modulus (dB)
-30
-40
-50
-60
-70
-80
0.1 1 10 100 1000 10000
Frequency (Hz)
-40
-50
-60
-70
-80
-90
-100
0.1 1 10 100 1000 10000
Frequency (Hz)
The two graphs constitute the Bode diagram of the frequency response function. It is
to be noted that the representation of the modulus on a logarithmic frequency scale
regularly decreases toward higher frequencies. A -20 dB/decade slope (-6 dB/octave)
is then observed.
The phase tends to -90 (- /2) toward high frequencies. The output voltage Vc is late
by one phase quadrature with respect to the input voltage Vin.
The RC circuit acts then a low-pass filter (which lets lower frequencies through),
called a first-order filter.
The cut-off frequency of a filter is the frequency at which the output signal is reduced
by half in dB (-10log10(2), about -3 dB), i.e., its amplitude is reduced by a 2 factor
and drops to about 71% (1/ 2 ) of the amplitude of the input signal (and, at
equivalent current, the power is then reduced by a half).
In the case of a first-order filter (RC filter), i.e., of a filter made up of a resistor and a
condenser, the cut-off frequency can be expressed as follows:
1
Equation 11: Fc =
2RC
In the above example, the cut-off frequency Fc will be equal to 1.59 Hz and for this
frequency, voltage Vc will have a -/4 (-45) phase difference with respect to V in.
At high frequency, i.e., if >> 1/RC, the condenser has no time to charge and the
voltage at its terminals remains low.
Hence: VR Vin
The voltage at the condenser terminals integrates then the input voltage and the
circuit behaves like an integrating set-up for high frequencies.
At low frequency, i.e., if << 1/RC, the condenser has time for an almost
complete charge and:
Vc = Vin
Integrating circuit
The RC circuit behaves then as an integrating circuit. For a sinusoidal input signal,
the output signal will be a sinusoidal signal with the same frequency and with a
different phase.
Only sinusoidal voltages are taken into account to study the RC circuit. The
behaviour would be the same for random signals (e.g., white or pink noise),
assuming that they consist of an infinite number of frequencies.
For pulse signals, which by definition have large amplitude and a short period, one
can assume that the input voltage Vin has only two states (0 or Vin) for a better
understanding of the behaviour of the RC circuit.
V
Vin
0
0 t1
t (s)
Figure 8: Example of a pulse signal
At instant t = 0s, the condenser is initially discharged. At this moment, the input
voltage goes from 0 to Vin. Let I(t) be the current going through the circuit at instant t.
Electrons (negative electric charge) move in the opposite direction to I. They leave
the upper frame of the condenser, which then becomes positively charged, to go to
the lower frame, which becomes negatively charged. Let q(t) and Vc(t) be the charge
of the upper frame and the potential difference at the terminals of C, respectively (by
convention I, q, Vc, Vin are positive values).
+++++++
--------
-
Circulation of electrons e
Knowing that q=CVc and that I=dq/dt (dq is the charge increase during dt), one can
define the first-order differential equation:
dq
Equation 14: VinC q = RC
dt
Or:
dt dq
Equation 15: =
RC VinC q
The primitive function (the function, the derivative of which is Equation 15) is then:
Let
t
Equation 17: VinC q = Ae RC
Again for a 100 k resistor and a 1 F condenser, the voltage Vc evolution curve is
represented below for a value of t1 = 2 s and an input voltage of Vin = 1 V.
Vc 0,8
0,6
0,4
0,2
0
0 0,2 0,4 0,6 0,8 1 1,2 1,4 1,6 1,8 2
s
One can see on this curve that it takes some time for voltage Vc to reach its
maximum value, without reaching it entirely though. The charging time depends on
the RC product. This time is determined by time constant expressed in seconds:
Equation 20: = RC
In our example of a 100 k resistor and a 1F condenser, the time constant will be
equal to 0.1 s.
Upon charging, the time constant indicates the time required for condenser C to be
charged at 63% of the input voltage (in our example: 0.63 V). The charge current has
decreased by 63% after a time . When t = in Equation 19, the exponential term
becomes indeed e-1 (1/e with e = 2.718, hence e-1 = 0.37).
During the next time period, the condenser gets charged with 63% of the remaining
voltage value (0.37 x 63% = 0.2331 V, hence 0.63 + 0.2331 = 0.8631 V total), and so
on until voltage Vin, i.e., 1 V in our example.
In practice, one can assume that the condenser is fully charged after a time of 5 (0.5
s in the present example). The condenser having reached its limit charge of q0 = VinC
= VcC, the input voltage goes from Vin to 0 at t1. In order to make the next
explanations simpler, we shall consider that this operating phase is a new sequence.
The value of t1 is then equal to 0.
The current has then changed its direction: the electrons leave the lower frame to go
toward the upper frame; charge q(t) decreases in time.
---------
-
Circulation of electrons e
Figure 11: The current and the electrons circulate in opposite directions
Still using convention that I, q, Vc are positive, Ohms rule can be written as:
Equation 21: RI = Vc
dq q
Equation 22: R =
dt C
i.e.,
dq dt
Equation 23: =
q RC
t
t
Equation 24: ln q = + cst q = Be RC
RC
The condenser voltage Vc can be written taking into account initial conditions:
t
Equation 26: Vc = Vine RC
In the present example (100 k resistor and 1F condenser), the Vc voltage evolution
curve will be as shown in Figure 12 when voltage Vin goes from 1 V to 0 V.
0,8
Vc
0,6
0,4
0,2
0
0 0,2 0,4 0,6 0,8 1 1,2 1,4 1,6 1,8 2
s
One can observe on this curve that it takes some time for voltage Vc to reach the
minimum value.
The discharge time depends on the RC product. Like for the charge, this time is
determined by the time constant of Equation 21, expressed in seconds.
In the present example (100 k resistor and 1F condenser), the time constant is
equal to 0.1 s.
During the discharge process, the time constant indicates the time required by
condenser C to discharge down to 63% of the initial voltage (i.e., 0.37 V in our
example). The discharge current has decreased by 63 % after a time period of .
During the next time period , the condenser gets discharged with 63% of the
remaining voltage (0.37 x 63% = 0.2331V, hence 0.37 0.2331 = 0.1369 V total),
and so on down to practically 0 V in the above example.
In practice, it is assumed that the condenser is fully discharged after a time period of
5 (0.5 s in the example).
Integrating circuit:
A system is known thanks to its response (amplitude and phase) to all sinusoidal
excitations, regardless of the frequency. The pulse response of a system h(t), i.e., the
response to a Dirac pulse (t), allows then identifying the system and predicting the
response to any excitation.
The Dirac pulse, which is also called distribution and noted as (t), is the
mathematical modelling of a signal with infinite amplitude over an infinitely short
time at date 0 and obeying:
It is represented as follows:
1
t
Value 1 on the y axis corresponds to the pulse area and not to its amplitude since it
is infinite. The amplitude is then represented with an arrow.
h(t) is then defined as the response to a Dirac pulse (see Fig. 15).
System
under
study
Figure 15: h(t) is the impulse response of the system under study
The previous equations (see Eqs. 12 and 13) show that the following differential
equation can be written:
dVc
Equation 28: RC + Vc = Vin
dt
Setting out Vin = (t), the impulse response of the RC circuit (solution of first-order
differential equation 28) is expressed as:
t
e RC
Equation 29: Vc ( t ) = h( t ) = y( t )
RC
With y(t) defined as the grade function: y(t)=1 if t 0 and y(t)=0 if t<0.
One can easily derive that voltage Vc is the result of the convolution between the
input voltage Vin and the impulse response.
Time inversion
h(-u) h(-t)
ut
Figure 17
Time shift t
h(t-u)
tu
0 t
Figure 18
Combining the previous two figures allows expressing the convolution product for an
input signal Vin as defined by Figure 8. The convolution calculation illustrated in
Figure 19 consists then in calculating the area of product Vin(u)h(t-u). The pulse
response h(t-u) is simply the initial pulse response h(u), reversed in time to give h(-u),
then translated by t.
By calculating then all areas obtained by shifting h, i.e., for all t shifts, one gets the
convolution product for any t, hence the output voltage Vc(t):
It is to be noted that the FOURIER transform of the impulse response will yield the
transfer function as expressed in Equation 8.
As shown above, the RC circuit behaves like a low-pass filter in the frequency
domain and like an integrating circuit with a time constant of =RC in the time
domain.
Most acoustic measurements are now performed by digital systems based on signal
sampling, i.e., that transform the continuous analogue signal in a series of signal
samples with variable amplitudes and recorded on a regular time basis (sampling
period Ts).
sampler
0 Ts 2Ts
Figure 20: The continuous input signal e(t) is transformed into a discrete digital signal e*(t)
Since the implementation of time weightings will be achieved digitally, one will then
need to characterise digital models for RC circuits.
Addition (+)
Multiplication (x)
Time shifting
Input
Entre Output
Sortie
FILTER
FILTRE
xn yn
If the output depends on input signals and on the previous output values, the filter is
called recursive filter. The recurrence equation is expressed as follows:
yn=f(yn-1,yn-2,...,xn,xn-1,...)
To each sample of the input signal corresponds a sample of the output signal.
dVc( t )
RC + Vc( t ) = Vin( t )
dt
Sampling of the analogue input voltage Vin(t) allows getting numerical values at
instants nTs. When the sampling period Te is small, it is easy to approximate the
derivative of the output voltage Vc(t) with a finite difference:
Vc ( nTs Vc (( n 1)Ts )
Equation 33: Vin ( nTs ) = Vc ( nTs ) + RC
Ts
The following recurrence allows calculating the nth term of Vc knowing its (n-1)th term
and the nth term of Vin.
Equation 34:
RC Ts
Vc ( nTs ) = Vc (( n 1)Ts )( )+( )Vin ( nTs )
Ts + RC Ts + RC
RC
Setting out = , V ( nT ) = yn and Vin ( nTs ) = xn , Equation 34 becomes:
Ts + RC c s
Equation 35 defines the recurrence equation of the integrating circuit (low-pass filter)
and will be implemented into the dBFA software suite. It is to be noted that constant
depends on the desired time constant and on the signal sampling frequency. This
equation is equivalent to a sliding exponential average and will allow respecting the
characteristics (frequency response function, time constant, pulse response, etc.) of
the RC circuit behaviour, as explained previously.
In Standard IEC 61672-1 relative to sound level meter specifications, nominal time
constants are equal to 0.125 s for the F (Fast) time weighting and 1 s for the S (Slow)
time weighting.
For time weighted sound pressure levels, the decay time constant is specified based
on the response to the sudden removal of a 4 kHz permanent sinusoidal electrical
input signal. Further to this deletion, the decay rate for the displayed sound pressure
level, plus the extended measurement uncertainty, must be at least 25 dB/s for the F
time weighting and must range from 3.4 dB/s to 5.3 dB/s for the S time weighting.
This prescription applies to all calibres.
Many sound level meters available on the market also include time constant I
(Impulse), which is equal to 35 ms. The standard mentions that different
investigations have concluded that the I time weighting was not convenient to assess
impulse sounds noise with respect to their loudness. Also, this weighting is suitable
neither to assess the risk of hearing loss nor to determine the impulsive character of
a sound. Because of possible erroneous results, using the I time weighting is not
recommended.
This time weighting is therefore not implemented in the real time part of the dBFA
software suite.
Time constant 1-
RC = = 125 ms 0.999843774 1.56225589e-4
RC = = 1s 0.999980469 1.95308685e-5
The sound pressure level can be calculated using the real-time processing called
Leq, as shown in the figure below.
9 processings are available in the real time part of dBRTA, among which the linear
average Leq.
2. All energy values are then processed according to the recurrence equation
(Eq. 35): y i = y i 1 + (1 )x i . 5120 weighted values are thus obtained.
4. For the next 100-ms time block, the value of the previous block obtained in
step 3, is stored in the memory and integrated in step 2 as the 1st value of the
new time block. There are then 5121 values, and so on.
The time step (ms) corresponds to the time elapsed between the storage of two
results. It is characteristic of the period over which the calculation is performed.
The step number (#) is the number of results recorded at the end of the analysis.
When its value is zero, the processing can only be stopped manually.
The signal presented below corresponds to one of the test signals used by Standard
IEC 61672-1. It is composed of bursts of 4 sinusoidal periods of 4 kHz, lasting 1 ms
and at 1 s intervals.
0.10
0.05
0.00
-0.05
-0.10
-0.15
0.0185 0.0190 0.0195 0.0200 0.0205 0.0210
FastLeq and SlowLeq calculations using the A time weighting are performed on
this signal with a 10-ms step. The result is plotted below.
50
40
30
20
10
0 5 10 15 20 25 30 35 40 45 50 55
Envelop [ID=16] Ch. 5 - Enregistrement - Leq s;dB(A) [2.000e-05 Pa] 0 8.0 59.74 42.7
40
30
20
10
0 5 10 15 20 25 30 35 40 45 50 55
Figure 28: The entire FastLeq calculation (top) and SlowLeq calculation (bottom)
55
50
45
40
35
30
25
20
15
10
5
0
-5
11.6 11.8 12.0 12.2 12.4 12.6 12.8 13.0 13.2 13.4 13.6
One can easily note a 13.5 dB attenuation for the Fast time constant over a 40-ms
time period, hence 34 dB/s, i.e., compliant with the standard (> 25 dB/s).
45
40
35
30
25
20
15
10
5
0
-5
Again, for the Slow time constant, the attenuation is 1.8 dB for 400 ms, i.e., 4.5 dB/s,
which falls between 3.4 and 5.4 dB/s, in accordance with the standard.