Why can't you hear music well well over a telephone line?
I was asked this question in an interview for a university study placement and I unfortunately had no idea.
I was given the hint that the telephone sampling rate is 8000 samples per second.
Answer
Using the Nyquist theorem, telephones will only transmit frequencies which are half the sampling rate called the Nyquist frequency correctly; so with a sampling rate of 8000 samples per second it will only transmit sounds with frequency less than 4000Hz correctly.
The fundamental frequency (the pitch you hear) of the human voice is in the range of 80 to 1100 Hz. Harmonic frequencies (component frequencies with an frequency of an integer multiple of the fundamental frequency) of the human voice may be much higher. Therefore a sampling rate of 8000 samples per second is sufficient to transmit human voices without many issues (harmonics may still exceed the Nyquist frequency).
When frequencies above the Nyquist frequency are transmitted, such as in the case of transmitting music, aliasing occurs. This causes distortion. This is detailed in the diagram below.
The red line is the original signal. The blue dots represent times that samples are taken of the original signal. The blue line is the signal reconstructed by the ear from the insufficient sampling rate. As you can see, it has been distorted from the red signal and it now has a lower frequency; a frequency lower than the Nyquist frequency of the sampling rate.
I wrote some simple Matlab code for an aliasing experience.
WARNING: Turn volume on speakers/headset right down before execution.
% Aliasing in Matlab.
% http://physics.stackexchange.com/questions/104281/why-cant-you-hear-music-well-over-a-telephone-line
fs = 8000 % sampling rate (Hz)
nyquistfrequency = fs / 2 % Nyquist frequency (Hz)
freq = [1000;
2000;
3500; % ^ these frequencies will play fine
4500; % v these frequencies will experience aliasing and distort to a frequency lower than the Nyquist frequency
6000;
7000 ]; % frequencies (Hz)
duration = 1; % duration of signal
numberofsamples = ceil( duration * fs ); % number of samples
sample_times = (1 : numberofsamples) / fs;
[h w] = size(freq);
for i = 1 : h,
currentfrequency = freq(i) % current frequency
simplesound = sin( 2 * pi * currentfrequency * sample_times ); % create sound
wavplay( simplesound, fs ) % play sound
end;
No comments:
Post a Comment