PoHan Huang
MS. Electrical Engineering
ph2252@columbia.edu
Abhinandan Majumdar
MS Computer Engineering
am2993@columbia.edu

1 

1 
................................................................................................................................... 
2 

2 

2 

3 

4 

4 

4 

6 

7 

7 

7 

10 


................................................................................................... 
12 

13 

14 
................................................................................................... 
15 

16 

18 
Concise Result

18 
Future Work

18 
Experience

18 

19 
APPE DIX 
20 
In audio processing, equaliza tion is the process of changing the frequenc y envelope of a sound.
In passing through any chann el, temporal/frequency spreading of a signal
occurs. Etymologically,
it means to correct, or make equal, the frequency response of a signal. T he term "equalizer" is
often incorrectly applied as a general term for audio filters. These are in f act general allpurpose
filters, which can be arranged
to produce the effect of low pass, high pas s, band pass and band
stop filters. Only when thes e filters are arranged so as to reverse the circuitry on sound output, are they operating as equalizers.
effects of the internal
1.1 Channel Equalizatio n
To combat the distortive cha nnel effects, or in other words, invert the FI R filter (timeinvariant or timevarying) representing the channel, a socalled equalizer is neede d. In a communication system, the transmitter send s the information over an RF channel. O n passing through the
channel, the signal gets distor ted before actually it gets received at the re
eiver end. Hence, it is
the receiver ”task” is to figu re out what signal was transmitted and turn the received signal in understandable information.
Fig 1.1 Inter symbol Interference
The purpose of an equalizer i s to reduce the ISI as much as possible to m aximize the probability of correct decisions.
1
1.2
Types
1.2.1 Linear Equalizer In a Linear Equalizer, the current and the past values of the recei ved signal are linearly weighted by equalizer coefficients and summed to produce the ou tput, using the relation below.
a) Zero forcing equ alizer – In such type of equalizers, it rem oves the complete ISI without taking in
consideration the resulting noise enhacemen t. Using this, there is a
substantial increm ent of the noise power.
b) MeanSquare Er ror equalizer – Such type of equlaizers at tempt to minimize the total error between the slicer input and the transmitted data sym bol.
1.2.2 Decision Feedback E qualizer It is a simple nonline ar equalizer which is particulary useful fo r channel with severe amplitude distortion.
t uses desicion feedback to cancel the inter ferfence from symbols
which have already ha ve been detected. The basic idea is that if the
values of the symbols
already detected are k nown (past decisions are assumed correct), t hen the ISI contributed
by these symbols can be canceled exactly.
In a Decision Feedba ck Equalizer Architecture, the forward and
feedback coefficients
may be adjusted simul taneously to minimize the Mean Square Erro r.
Fig 1.2 Decision Feedback Equalizer
2
1.2.3
Adaptive Equalizers
This type of equlaize rs adapt the coefficients to minimize the interference (dependin g on the type of equalizer) at the output.
noise and intersymbol
Fig 1.3 Adaptive Equalizers
There are two modes t hat adaptive equalizers work;
a) Decision Directed M ode: The receiver decisions are used to ge nerate the error signal. Decision directed equ alizer adjustment is effective in tracking
slow variations in the
channel response. Ho wever, this approach is not effective during in itial acqusition .
b) Training Mode: To signal is needed. In sequence known to the
make equalizer suitable in the initial acqusiti on duration, a training this mode of operation, the transmitter ge nerates a data symbol receiver.
Once an agreed time has elapsed, the slicer output is used as a actual data transmissio n begins.
raining signal and the
3
2.1 The Problem Statem ent
The problem being dealt here is an unknown input signal X underwent unw anted filtering after being passed through unknow n channel. The object is to regenerate the ori ginal sample(X) from the filtered sample(Y).
Fig 2.1 Channel Equalization
2.2 System Identification
In an Energy Density Spectru m technique of system identification, we co mpute the input signal x[n] from Energy Density Sp ectrum of input signal S _{x}_{x} ( ^{}^{} ) and that of output signal S _{y}_{y} ( ^{}^{} ). This spectrum can be evalua ted by taking the DTFTs of the autocorrela tion sequence r _{x}_{x} [l] of input sequence x[n] and the a utocorrelation sequence r _{y}_{y} [l] of output sequ ence y[n]. Considering a stable LTI discrete time syst em with an impulse response h[n],





And our application, the in put signal x[n] is not known, this system computing the autocorrelation of the output signal y[n] defined by,
can be identified by
4
_{}_{}
From the above equations,
_{} _{}_{} _{}
_{}
+
+
_{}_{}
⊛ ⊛ _{}_{}
Hence, in the z – domain, the equation becomes,
_{}_{} ^{}^{} _{}_{}
where, _{}_{} is the z – transform of _{}_{} . On the unit circle, the above equation reduces to
_{} _{}_{} ^{}^{} _{} ^{}^{} ^{} _{} _{}_{} _{}_{} ^{}^{} _{}
From, the above relation, the autocorrelation of the output signal can provide only the magnitude response of the system but not the phase response.
5
2.3
Algorithm
Fig 2.2 Block Diagram of Algorithm
Here, we only have the filter ed sample. Hence we kind of approximate S _{x}_{x} values, which is the
average of various speech
samples
considered
for
our
experiment.
autocorrelation of the seque nce y, and then pass it through FFT block
Hence, we find the to get the Frequency
response of r _{y}_{y} as S _{y}_{y} . Then
we perform division of S _{y}_{y} and S _{x}_{x} to get H (z) ^{2} . Then we perform
the square root of it and div ide it to Y which is the DTFT of output sa mple to get frequency
components of regenerated in put sample. Then we perform Inverse DTFT IFFT block to get the regener ate input sample in time domain.
by passing it through
As discussed before, by this
approach, we lose the phase information bei ng added by the filter,
hence we need to make appr oximation on filter characteristics so as to m inimize θ _{H} , resultantly
θ _{x} ≈ θ _{y} . Hence in a nutshell, a pproximations being made are listed below.
a) We approximate on S xx values by taking the DTFT of the autoco rrelation of average of the input speech samp les.
b) We approximate that phase filter so as θ _{H} ≈ 0.
the filter channel characteristics are that o f zero phase or linear
6
For our experimentation purpose, we ran three type of simulation each with zero and linear phase which are described in detail below.
3.1 Actual Input Signal for S _{x}_{x}
3.1.1 Zero Phase Filter
Here we passed through a length 11 zerophase FIR lowpass filter designed using the Remez exchange algorithm. The matlab code for designing this filter is as follows:
N = 11; 
% filter length  must be odd 

b = [0 0.1 0.2 0.5]*2; % band edges 

M = [1 
1 
0 
0 ]; 
% desired band values 
h = remez(N1,b,M); 
% Remez multiple exchange design 
The impulse response is returned in linearphase form, so it must be leftshifted (N1)/2 samples to make it zero phase.
Figure 3.1: Impulse response and frequency response of a length 11 zerophase FIR lowpass filter. Here the frequency response is real because the filter is zero phase. Also plotted (in dashed lines) are the desired passband and stopband gains.
7
Figure 3.2 shows the amplitude and phase responses of the FIR filter designed by remez. The phase response is zero throughout the passband and transition band. However, each zerocrossing in the stopband results in a phase jump of π radians, so that the phase alternates between zero and π in the stopband. This is typical of practical zerophase filters.
Fig3.2 : Amplitude response and phase response of the length 11 zerophase FIR lowpass filter in Fig.3.1.
We passed our original input sample through the zero phase filter generated, and here’s the spectral analysis of the original and filtered sample showing the energies at lower frequencies are kept intact while that of in higher frequencies are removed.
Fig 3.3 Spectrum of Original Signal and Filtered Signal (ZeroPhase)
8
We compute sqrt(S _{y}_{y} /S _{x}_{x} ) which is the magnitude response of the unknown filter. By doing this, we loose phase information and hence it remains 0 as shown in graph with small glitches in middle.
Fig 3.4 Magnitude and Phase Response of the Zero Phase filter
After we got the filter response, we tried to regenrate x by dividing y by magnitude response of filter obtained and did an inverse DTFT on that. Through this, we could successfully regenerate original sample, and energy spectrum looks exactly same as per the original sample as per the spectral analysis.
Fig 3.5 Spectrum of Original Signal and Regenerated Signal (ZeroPhase)
9
3.1.2
Linear Phase Filter
For this, we used the same filter code without shifting it by (N1)/2. Here is the spectrum of input and filtered sample showing the energy in the higher frequency area are removed.
Fig 3.6 Spectrum of Original Signal and Filtered Signal (LinearPhase)
The maginitude and phase response (almost zero as expected) obtained are as follows
Fig 3.7 Magnitude and Phase Response of the Linear Phase filter
10
We could regenrate the input sample but had some ringing sound. In the spectral analysis, we see some energy at higher frequency (blue spots) are missing in the regenerated sample.
Fig 3.8 Spectrum of Original Signal and Regenerated Signal (LinearPhase)
3.2 Different Signal for S _{x}_{x}
For this part of simulation, we took a completely different sample to approximate S _{x}_{x} . Below is the spectral analysis of the original sample and approximated sample.
Fig 3.9 Spectrum of Original Signal and Used Signal for S _{x}_{x}
11
3.2.1
Zero Phase Filter
Below is the magnitude and phase response which we could recover (some what corrupted).
Fig 3.10 Magnitude and Phase Response of the Zero Phase filter
After regeneration of the input sample, we found it similar to the input sample, but with lot of noise being added in the background. From the spectral analysis, we see the input and regenerated sample have similar enery spectrum but have lot of distortion in higher frequencies.
Fig 3.11 Spectrum of Original Signal and Regenerated Signal (ZeroPhase) (Using different signal for S _{x}_{x} )
12
3.2.2
Linear Phase Filter
We repeated the same process considering a Linear Phase Filter Channel, and got a corrupted magnitude and phase response for the filter.
Fig 3.12 Magnitude and Phase Response of the Linear Phase filter
The regenerated sample sounded much like the original sample but with lot of noise being added in background. Also, from the spectral analysis, the energy spectrum looks quite similar with lot of distortion in higher frequency area.
Fig 3.13 Spectrum of Original Signal and Regenerated Signal (LinearPhase) (Using different signal for S _{x}_{x} )
13
3.3
Approximated Sxx
Here we took a complete different input sample, and used three samples which was the same speech but spoken by different speaker and at different timing. Here is the spectral analysis of three samples with energy spectrum similar but different in sense of timing and frequency.
Fig 3.14 Spectrum of Sample 1,Sample 2 and Sample 3
To approximate S _{x}_{x} , we took the average of the frequency components of their autocorrelation values. This is because S _{x}_{x} values for a human speech are nearly same, hence taking an average of different samples.
Fig 3.15 S _{x}_{x} Magnitude of Sample 1,Sample 2 and Sample 3
14
3.3.1
Zero Phase Filter
This is the spectrum of original sample, after being passed through low pass zero phase filter, which enerdies removed at higher frequencies.
Fig 3.16 Spectrum of Original Signal and Filtered Signal (ZeroPhase)
Here’s the magnitude and phase response of the filter. It looks less corrupted and more close to the original filter response as obtained in 3.1.1.
Fig 3.17 Magnitude and Phase Response of the Zero Phase filter
15
The regenerated sample sounded less noisy than that of 3.2.1. Also the energy spectrum is more close to the original at lower frequencies.
Fig 3.18 Spectrum of Original Signal and Regenerated Signal (ZeroPhase) (Using Average of 3 samples for S _{x}_{x} )
3.3.2 Linear Phase Filter
When passed through Linear Phase , it removes the energy at higher frequency.
Fig 3.19 Spectrum of Original Signal and Filtered Signal (LinearPhase)
16
The magnitude response of the filter appears more closer to the original one that 3.1.2 than 3.2.2
Fig 3.20 Magnitude and Phase Response of the Linear Phase filter
The regenerated sample sounded less noisy than that of 3.2.2 case. Also through the spectral analysis, enery spectrum at lower frequency are nearly same and less noisy than 3.2.2.
3.21 Spectrum of Original Signal and Regenerated Signal (LinearPhase) (Using Average of 3 samples for S _{x}_{x} )
17
4.1 Concise Result
From the simulation, we could finally summarize following results
Values used of S _{x}_{x} 
Filter Type 
Result 
Zero Phase 
Regenerated Exact Input Sample 

Original Sample 
Linear Phase 
Regained Original Sample with feeble ringing sound 
Different Sample 
Zero Phase 
Regenerated Noisy Input Sample 
Linear Phase 
Regenerated Noisy Input Sample 

Average of various 
Zero Phase 
Regenerated Less Noisy Input Sample 
Sample 
Linear Phase 
Regenerated Less Noisy Input Sample 
4.2 Future Work
From the work done, we can have better approximation algorithms so as the regenerated sample is more close both in terms of magnitude and phase, closer to the original sample. Also, as this approach of System Identification has a major contraint of losing the phase response of the filter, this technique cannot be used for general case, and hence lot of approximation on the filter specification has to be done. For other filter like that of IIR filters such as Butterforth or Elliptical filter, this technique could be used to recover the magnitude response of the sample, so if we have a technique to predict the phase modification being added by the filter, we can recover the original sample.
4.3 Experience
Working directly upon the filter characteristics, modifying its properties, playing with sound samples, analyzing the sound spectrum and comparing various tradeoffs affecting equalization characteristics gave us a through insight upon a real world problem. Also it gave us an experience of implementing the theoritical aspect of Digital Signal Processing over an actual application. Hence, we are kind of thankful to everyone especially Prof. Dan Ellis and TA Wei Jiang, whose constant guidance and motivation saved our work to go into pitfalls.
18
[1] 
Digital Signal Processing – Sanjit Mitra 
[2] 
Channel Equalization Techniques by Fernando Gregorio. 
[3] http://en.wikipedia.org/wiki/Equalization
[4]
Blind System Identification and Channel Equalization of IIR Systems without Statistical Information, Signal Processing, IEEE Transactions on Acoustics, Speech, and Signal Processing, Erwei Bai and Minyue Fu.
19
Code for 3.1.1, 3.1.2, 3.2.1, 3.2.2
num = 512*64; 

a = 0; 
%Start from the beginning (a=0), a can be 
0~77482
[x,r] = wavread('mssp3.wav'); %ORIGINAL Sound [x2,r] = wavread('mssp2.wav'); %Another Sound
x=x(a+1:a+num);
(32768)
x2=x2(a+1:a+num);
N = 11; b = [0 0.1 0.2 0.5]*2;
% shorten the original sound(110250) into
% filter length  must be odd % band edges
M 
= [1 
1 
0 
0 ]; 
% desired band values % Shift (N1)/2=5 samples to make h zerophase 

h = remez(N1,b,M); hh = h(6:N); 
% Remez multiple exchange design 

hh(7:11) = 0; 

% Pass it through the filter y = filter(hh,1,x); Ly = filter(h,1,x); % Autocorrelation 
% Zero Phase % Linear Phase 

%AutoCorrelation:using Original signal as estimated x rxx=xcorr(x(1:num)); 

rxx2=xcorr(x2(1:num)); %AutoCorrelation:using Different signal as estimated 

x 
ryy=xcorr(y);
rLyy=xcorr(Ly); rxysize = size(rxx); num1 = 2^ceil(log2(rxysize(1))); %make num into even Ex.65535 into 65536 % Do FFT to get frequency response of autocorrelation
sxx = fft(rxx,num1); sxx2= fft(rxx2,num1); syy = fft(ryy,num1); sLyy = fft(rLyy,num1); Y = fft(y,num1); LY =fft(Ly,num1);
for i = 1 : num1 if (syy(i) == 0) XX(i) = 999999999999999; XX2(i) = 999999999999999;
else 

% i  ^{} = syy(i)/sxx(i); XX(i)=Y(i)/H(i) XX(i) = Y(i)*sqrt(abs(sxx(i)/syy(i))); XX2(i)= Y(i)*sqrt(abs(sxx2(i)/syy(i))); 

end 
end
for i = 1 : num1 if (sLyy(i) == 0) LXX(i) = 999999999999999;
20
LXX1(i) = 999999999999999;
else
%% i  ^{} = syy(i)/sxx(i); XX(i)=Y(i)/H(i) LXX(i) = LY(i)*sqrt(abs(sxx(i)/sLyy(i))); LXX1(i) = LY(i)*sqrt(abs(sxx2(i)/sLyy(i)));
end
end
xx = ifft(XX,num1); xx2 = ifft(XX2,num1); Lxx= ifft(LXX,num1); Lxx1= ifft(LXX1,num1);
% ZeroPhase Filter case
soundsc(x,r); 
%Original Sound 
soundsc(y,r); 
%Original Sound passed through ZeroPhase Filter 
soundsc(xx,r); %Regenerated signal by using original signal as estimated x
soundsc(xx2,r); %Regenerated signal by using other signal as estimated x % LinearPhase Filter case
soundsc(x,r);
%Original Sound
soundsc(Ly,r); %Original Sound passed through LinearPhase Filter soundsc(Lxx,r); %Regenerated signal by using original signal as estimated x
soundsc(Lxx1,r);%Regenerated signal by using other signal as estimated x
Code for 3.3.1, 3.3.2
num = 512*64; [x,r] = wavread('sf1_cln.wav'); [x1,r] = wavread('sf2_cln.wav'); [x2,r] = wavread('sf3_cln.wav');
%ORIGINAL Sound %BASE Sound %BASE Sound
x=x(1:num); 

N = 11; 
% filter length  must be odd % Shift (N1)/2=5 samples to make h zerophase 

b = [0 0.1 0.2 0.5]*2; 
% band edges 

M = [1 
1 
0 
0 ]; 
% desired band values 

h = remez(N1,b,M); hh = h(6:N); 
% Remez multiple exchange design 

hh(7:11) = 0; % Pass it through the filter y = filter(hh,1,x); Ly = filter(h,1,x); % Autocorrelation 
% Zero Phase % Linear Phase 
rxx=xcorr(x(1:num));
rxx1=xcorr(x1(1:num));
rxx2=xcorr(x2(1:num));
ryy=xcorr(y); rLyy=xcorr(Ly); rxysize = size(rxx);
%AutoCorrelation: ORIGINAL Sound %AutoCorrelation: BASE Sound %AutoCorrelation: BASE Sound
num1 = 2^ceil(log2(rxysize(1))); %make num into even Ex.65535 into 65536 % Do FFT to get frequency response of autocorrelation
sxx = fft(rxx,num1); sxx1= fft(rxx1,num1);
sxx2= fft(rxx2,num1); sxx3= (sxx+sxx1+sxx3)/3; %Average the original and base sound as estimated Sxx
syy = fft(ryy,num1); sLyy = fft(rLyy,num1);
21
Y = fft(y,num1); LY =fft(Ly,num1);
% ZeroPhase Filter
for i = 1 : num1
if (syy(i) == 0) XX(i) = 999999999999999;
else 

% i  ^{} = syy(i)/sxx(i); XX(i)=Y(i)/H(i) XX(i) = Y(i)*sqrt(abs(sxx3(i)/syy(i))); 

end 
end
% LinearPhase Filter
for i = 1 : num1
if (sLyy(i) == 0) LXX(i) = 999999999999999; else
%% i  ^{} = syy(i)/sxx(i); XX(i)=Y(i)/H(i) LXX(i) = LY(i)*sqrt(abs(sxx3(i)/sLyy(i)));
end
end
xx = ifft(XX,num1); Lxx= ifft(LXX,num1);
% ZeroPhase Filter case
soundsc(x,r); 
%Original Sound 
soundsc(y,r); 
%Original Sound passed through ZeroPhase Filter 
soundsc(xx,r); %Regenerated signal by using average spectrum as Sxx 

% LinearPhase Filter case 

soundsc(x,r); 
%Original Sound 
soundsc(Ly,r); %Original Sound passed through LinearPhase Filter soundsc(Lxx,r); %Regenerated signal by using average spectrum as Sxx
22
Mult mai mult decât documente.
Descoperiți tot ce are Scribd de oferit, inclusiv cărți și cărți audio de la editori majori.
Anulați oricând.