1.2 Signals
1.2 Signals
2 Signals
ISVR6136 Fundamentals of Acoustics
Contents
1. What is a signal?
2. How big is a signal?
3. Adding signals
4. Sinusoids
5. Introduction to Python (Jupyter)
6. Signals in Python (Jupyter)
1.2.1 What is a signal?
Wave motion
Pressure signal – a function of time
pressure
𝑝 𝑡
time
Loud tone at 1000 Hz in still air
Quantity Ambient value Fluctuation Comments
Displacement ±0.4 × 10−6 m Vector
Velocity ±2.5 × 10−3 m s −1 Vector
Acceleration ±15 m s −2 Vector
Density 1.2 kg m−3 ±8.5 × 10−6 kg m−3 Scalar
Pressure 105 Pa ±1 Pa Scalar
Temperature 20 ℃ = 293 K ±0.9 × 10−3 K Scalar
Barely perceptible tone at 1000 Hz in
still air
Quantity Ambient value Fluctuation Comments
Displacement ±7.7 × 10−12 m Vector
Velocity ±49 × 10−9 m s −1 Vector
Acceleration ±0.3 × 10−3 m s −2 Vector
Density 1.2 kg m−3 ±0.17 × 10−9 kg m−3 Scalar
Pressure 105 Pa ±20 × 10−6 Pa Scalar
Temperature 20 ℃ = 293 K ±18 × 10−9 K Scalar
Pressure signals
Pressure signals zoomed in
Signal 𝑥(𝑡)
Deterministic Stochastic
e.g.
𝑥(𝑡) known Pr 𝑥 𝑡 = 𝑥0 known
Periodic Stationary
Non-
Aperiodic
𝑥 𝑡 + 𝑇 = 𝑥(𝑡) Pr 𝑥 𝑡1 = 𝑥0 = Pr 𝑥 𝑡2 = 𝑥0 stationary
Periodic signal
Period 𝑇
Period 𝑇
Frequency 𝑓 = 1Τ𝑇
Units: hertz (Hz)
Period 𝑇
Sampled signals
1.2.2 How big is a signal?
Signal statistics – random noise
Signal statistics – Cymbals clash
Signal statistics – bassoon clip
Signal ‘power’
𝑥 𝑡
𝑥2 𝑡
Average signal ‘power’ (mean square
value)
𝑡0 𝑡0 + Δ𝑡
𝑥2 𝑡
Equal areas
RMS – Root-Mean-Square value
RMS value
𝑥𝑅𝑀𝑆
Worked example 1: what is the RMS value
of a sine signal?
1000 watts
100
10 watts
watts
𝑥
log10 𝑥 − log10 𝑦 = log10
𝑦
𝑛 𝑛
1
log10 𝑥 = 𝑛 log10 𝑥 , log10 𝑥 = log10 𝑥
𝑛
log 𝑏 𝑥
log10 𝑥 = , log10 2 ≅ 0.3
log 𝑏 10
Level
• If signal 𝑥𝐵 𝑡 has ten times the average signal ‘power’ of signal
𝑥𝐴 𝑡 then the level of signal B is one bel higher than that of
signal A
• The number of bels between them can be found by
𝑝𝑟𝑒𝑓 = 20 × 10−6 Pa
𝑝2 𝑡 𝑝𝑅𝑀𝑆
𝐿𝑝 = 10 log10 2 = 20 log10
𝑝𝑟𝑒𝑓 𝑝𝑟𝑒𝑓
2
𝑝2 𝑡 = 𝑝𝑟𝑒𝑓 × 10𝐿𝑝 ∕10 , 𝑝𝑅𝑀𝑆 = 𝑝𝑟𝑒𝑓 × 10𝐿𝑝 Τ20
Worked example 2: what is the SPL of a
1 kHz tone whose amplitude is 1 pascal?
𝑝 𝑡 = 𝐴 cos 𝜔𝑡 + 𝜙 , 𝐴 = 1 Pa, 𝜔 = 2000𝜋 rad s−1, 𝜙 =?
1
𝑝𝑅𝑀𝑆 = ≅ 0.707 Pa, 𝑝𝑟𝑒𝑓 = 20 × 10−6 Pa
2
𝑝𝑅𝑀𝑆 1 105
𝐿𝑝 = 20 log10 = 20 log10 = 20 log10
𝑝𝑟𝑒𝑓 2 × 20 × 10−6 2×2
• 𝜔 and 𝜙 don’t come into the calculation but noise measurements are often
weighted by frequency to account for perception (see lab)
1.2.3 Adding signals
Adding sounds
Adding signals
𝑝1 𝑡
+
𝑝2 𝑡
=
𝑝2 𝑡 + 𝑝2 𝑡
Adding decibels
• Let 𝑥 𝑡 be a pressure signal with SPL 𝐿𝑥 dB
• Let 𝑦 𝑡 is a pressure signal with SPL 𝐿𝑦 dB
• What is 𝐿𝑥+𝑦 , the SPL of 𝑥 𝑡 + 𝑦 𝑡 ?
Adding RMS values
• If 𝑥 𝑡 has RMS value 𝑥𝑅𝑀𝑆 and 𝑦 𝑡 has 𝑦𝑅𝑀𝑆 what is the RMS value
of 𝑥 𝑡 + 𝑦 𝑡 ?
Special case 1: Two identical signals
• Let 𝑦 𝑡 = 𝑥 𝑡 so 𝑥 𝑡 + 𝑦 𝑡 = 2𝑥 𝑡
• Example: a mono recording when a second loudspeaker is plugged in
• What is the difference in SPL between 𝐿𝑥 and 𝐿2𝑥?
2𝑥𝑅𝑀𝑆 𝑥𝑅𝑀𝑆
𝐿2𝑥 − 𝐿𝑥 = 20 log10 − 20 log10
𝑝𝑟𝑒𝑓 𝑝𝑟𝑒𝑓
2𝑥𝑅𝑀𝑆 𝑝𝑟𝑒𝑓
= 20 log10 × = 20 log10 2 ≅ 20 × 0.3 = 6 dB
𝑝𝑟𝑒𝑓 𝑥𝑅𝑀𝑆
Special case 2: Two random signals
• Let 𝑥 𝑡 and 𝑦 𝑡 be stochastic signals such that:
• They have the same SPL, so 𝐿𝑥 = 𝐿𝑦 and therefore 𝑥 2 𝑡 = 𝑦 2 𝑡
• They are completely uncorrelated so 𝑥 𝑡 𝑦 𝑡 = 0
• Example: two vacuum cleaners at the same distance
• What is the difference in SPL between 𝐿𝑥 and 𝐿𝑥+𝑦 ?
Special case 3: Two random signals
(cont’d)
= 20 log10 21Τ2
= 12 × 20 log10 2
≅ 10 × 0.3 = 3 dB
General case: many random signals
• Uncorrelated sounds 𝑥1 𝑡 , 𝑥2 𝑡 , …, 𝑥𝑁 (𝑡) have SPLs 𝐿1, 𝐿2, …, 𝐿𝑁
• What is 𝐿Σ, the SPL of 𝑥Σ 𝑡 = 𝑥1 𝑡 + 𝑥2 𝑡 + ⋯ + 𝑥𝑁 𝑡 ?
2
𝑥Σ2 = 𝑥1 𝑡 + 𝑥2 𝑡 + ⋯ + 𝑥𝑁 𝑡 = 𝑥12 𝑡 + 𝑥22 𝑡 + ⋯ + 𝑥𝑁
2
𝑡
2 2 2
= 𝑝𝑟𝑒𝑓 10𝐿1∕10 + 𝑝𝑟𝑒𝑓 10𝐿2∕10 + ⋯ + 𝑝𝑟𝑒𝑓 10𝐿𝑁 ∕10
2
= 𝑝𝑟𝑒𝑓 10𝐿1∕10 + 10𝐿2∕10 + ⋯ + 10𝐿𝑁 ∕10
Regulation
Engineering Hearing protection
Why measure sound? Annoyance
...and more
Throughout a space:
Physics pressure waves
What is sound?
At a point: a
pressure signal
RMS pressure in dB
Maths relative to a
Quantify ‘size’ reference pressure
1.2.4 Sinusoids
Sinusoids
𝑥 𝑡 = 𝐴 cos 𝜔𝑡 + 𝜙
where:
• 𝐴 is its amplitude (pascals, volts, etc depending on the signal)
• 𝜔 = 2𝜋𝑓 is its angular frequency (radians per second)
• 𝜙 is its phase (radians)
• It has a period 𝑇 = 1Τ𝑓 = 2𝜋Τ𝜔
(Make your own pictures for this section using Python)
Adding similar sinusoids
• Interesting fact about sinusoids No. 1:
ሚ
• Polar representation: 𝐶 = 𝐶 e = 𝐶ሚ cos ∠𝐶ሚ + j sin ∠𝐶ሚ
ሚ ሚ j∠𝐶
= 𝐶ሚ cos 𝜔𝑡 + ∠𝐶ሚ
• So 𝑎 = 𝐶ሚ cos ∠𝐶ሚ and 𝑏 = − 𝐶ሚ sin ∠𝐶ሚ in the cos & sin representation
• And 𝐴 = 𝐶ሚ and 𝜙 = ∠𝐶ሚ in the amplitude & phase representation
• Going the other way, 𝐶ሚ = A𝑒 j𝜙 = 𝑎 − j𝑏
Adding different sinusoids
• Interesting fact about sinusoids No. 2:
𝐴0 ∞
𝑥 𝑡 = + 𝐴𝑛 cos 𝑛𝜔𝑡 + 𝜙𝑛
2 𝑛=1
where 𝜔 = 2𝜋 Τ𝑇
Fourier series – three representations
• Since 𝐴𝑛 cos 𝑛𝜔𝑡 + 𝜙𝑛 is a sinusoid, which can be written
three ways, we have
𝐴0 ∞
𝑥 𝑡 = + 𝐴𝑛 cos 𝑛𝜔𝑡 + 𝜙𝑛
2 𝑛=1
𝑎0 ∞
= + 𝑎𝑛 cos 𝑛𝜔𝑡 + 𝑏𝑛 sin 𝑛𝜔𝑡
2 𝑛=1
∞
= 𝐶0 + ℜ 𝐶ሚ𝑛 ej𝑛𝜔𝑡
𝑛=1
Negative frequency!
• We can write ej𝑛𝜔𝑡 = cos 𝑛𝜔𝑡 + j sin 𝑛𝜔𝑡; what is e−j𝑛𝜔𝑡 ?
• So
ej𝑛𝜔𝑡 + e−j𝑛𝜔𝑡 = 2 cos 𝑛𝜔𝑡
and
𝐶ሚ𝑛 ej𝑛𝜔𝑡 + 𝐶ሚ𝑛∗ e−j𝑛𝜔𝑡 = 2 𝐶ሚ𝑛 cos 𝑛𝜔𝑡 + ∠𝐶ሚ
∗
(𝐶ሚ𝑛∗ is the complex conjugate of 𝐶ሚ𝑛 , and e−j𝑛𝜔𝑡 = ej𝑛𝜔𝑡 )
Fourier series – best representation!
• If we set 𝑐ǁ𝑛 = 12𝐴𝑛 ej𝜙𝑛 = 12 𝑎𝑛 − j𝑏𝑛 and 𝑐ǁ−𝑛 = 𝑐ǁ𝑛∗ then we can
write
𝑅𝑥𝑥 𝜏 = E 𝑥 𝑡 𝑥 𝑡 + 𝜏 =𝑥 𝑡 𝑥 𝑡+𝜏