Digital Representation of Audio Information

advertisement
EE599-2
Audio Signals and Systems
Noise
Kevin D. Donohue
Electrical and Computer Engineering
University of Kentucky
Quantization Noise
Signal amplitudes take on a continuum of
values. A discrete signal must be digitized
(mapped to a finite set of values) to be
stored and process on a computer/DSP
Analog Signal
Discrete-time
Signal
Digital Signal
Coder
Quantizer
xa (nT )
xˆ (n)
xˆ (nT )
11
10
01
00
Quantization Noise
Signal amplitudes take on a continuum of
values. A discrete signal must be digitized
(mapped to a finite set of values) to be
stored and process on a computer/DSP
Analog Signal
Discrete-time
Signal
Digital Signal
Coder
Quantizer
xa (nT )
xˆ (n)
xˆ (nT )
11
10
01
00
Quantization Error and Noise
xa (t )
Analog
xa (nT )
ˆ
Discrete x(nT )
Digital
 Quantization has the same effects as adding noise to the
signal:
 q (nT )  xa (nT )  xˆ (nT ) xa (nT )   q (nT )  xˆ (nT )
 Intervals between quantization levels are proportional to the
resulting quantization noise.
For uniform quantization, the interval between signal levels is the
maximum signal amplitude value divided by the number of
quantization intervals.
11
10
01
00
Quantization Noise
 Original CD clip
Tell Me Ma - with 6 bit quantization
0
-20
-40
Quantization
Noise Energy
-60
dB
quantized at 16 bits
(blue)
-80
-100
and quantized at 6 bits
(red)
-120
-140
1
10
2
10
3
10
Hertz
4
10
5
10
Quantization Noise Analysis
• Assume  q (n) is a uniformly distributed (amplitude),
white, stationary process that is uncorrelated with the
signal
• Show that the signal to quantization noise ratio for a
full-swing range (FSR) sinusoid, quantized with B bit
words is approximately:
SNR q  6 B  1.8 dB
Room Noise
For noise generated inside a room will have a frequency dependent
propagation, absorption and refection. Thus the room will have a
filtering effect on the sound. Sound impinging on surfaces in the
room will be absorbed, reflected, or diffused.
Absorption
Heat
Transmission
Direct
Sound
Reflection
Specular
Reflected
Sound
Diffusion
Direct
Sound
Diffuse
Scattered
Sound
Direct
Sound
Reflection Absorption Effects
Reflected and reverberant sounds can become distractions and
annoyances. The use of absorbers on reflective surfaces can cut
down the reverberation effects in rooms.
The model for a signal received at a point in space from many
N
reflections is given as:
r (t ) 
  n s (t   n )
n 1
where n is scaling that represents the attenuation of each reflected
signal due to propagation through the air and absorption at each
reflected interface and n is the time delay associated with the travel
path from the source to the receiver. The signal in the frequency
domain is given by:
N
 n exp(  j 2f n )
R( f )  S ( f )
n 1
Reverberant Sound Travel
RF1
EF1
EF2
S
D
L
RF2
EF3
EF4
RF3
The near or direct field (D)
The free or early field (EF1 and EF2)
The reverberant or diffuse field (RF1 to RF3)
Decay of Reverberant Sound Field
Sound Level
Direct Sound
Reverberation
60 dB
Time
Initial Time Delay Gap
Reverberation Time
The time it takes for the reverberant sound field to decay
by 60dB has become a standard way to characterize room
acoustics.
Room Reverberation Time
For a space with many randomly distributed reflectors (typically large
rooms) reverberation time (RT60 ) is defined as the amount of time for
the sound pressure in a room to decrease by 60 dB from its maximum.
The time is statistically predicted from the room features with the
Sabine equation:
RT 60( f )  .161
V
N
 S a ( f )  4m( f )V
i i
i 1
where
 V is the volume of the room in cubic meters
 Si is the surface area of the ith surface in room (in square meters)
 ai is the absorption coefficient of ith surface
 m is the absorption coefficient of air.
Discuss: The relationship between absorption, volume, and RT.
Room Response to White Noise Input
Data collected and spectrogram computed by H.L. Fournier
Note frequency dependence on of decay time.
Example
Given the simulated reverb signal compute the RT60. Find the
autocorrelation function and try to estimate the delays associated with
the major scatterers.
% Create reverb signal
[y,fs] = wavread('clap.wav'); % Read in Clap sound
% Compute autocorrelation function of envelop and look for peaks
% to indicate delay of major echoes
% Apply simulated reverb signal
maxlag = fix(fs*.5);
yout1 = mrevera(y,fs,[30 44 121]*1e-3,[.6 .8 .6]);
[ac, lags] = xcorr(env-mean(env), maxlag);
taxis = [0:length(yout1)-1]/fs;
figure(2)
% Compute envelope of signal
plot(lags/fs,ac)
env = abs(hilbert(yout1));
xlabel('seconds')
figure(1)
ylabel('AC coefficient')
plot(taxis,20*log10(env+eps)) % Plot Power over time
% Compute autocorrelation function of raw and look for peaks to
hold on
% indicate delay of major echoes
% Create Line at 60 dB below max point and look for
intersection point
[ac, lags] = xcorr(yout1, maxlag);
mp = max(20*log10(env+eps));
plot(lags/fs,ac)
mp = mp(1);
xlabel('seconds')
dt = mp-60;
ylabel('AC coefficient')
plot(taxis,dt*ones(size(taxis)),'r'); hold off; xlabel('Seconds')
ylabel('dB'); title('Envelope of Room Impulse Response')
figure(3)
Room Modes
The air in a (small) rectangular room has natural modes of
vibration given by:
2
2
c  p  q   r 
f 
     
2  L  W   H 
2
where c is the speed of sound in the room p, h, and r are
integers 0,1,2, …., and L, W, and H are the length, width,
and height of the room.
Download