- Ampeg
- Pratical FIR Filter design in Matlab
- Simple Tips for Recording High-quality Audio | Adobe Inspire Magazine
- Behringer 802 Mixer
- Active Filters
- dsplab_Wk2
- Moving Average y Accumulator
- Help - Filter (Filter Design Toolbox)
- ATC-863 Software Setup Manual
- g Sudheer Final
- Driving Consistency in the Estimation of Severity Levels in PHA Studies
- A Basic Introduction to Concert Sound Engineering
- X-FILTERED for Roll Stabilization_Moaleji&Greig
- 2013 Catalogue V2
- Mix Downs
- lu2006.pdf
- A Generalized Method for Various Data Processing Techniques in Gravity Interpretation- Art%3A10.1007%2FBF00876196
- 19 Naimish Zaveri a.R.chudasama
- An Introduction to Digital Filters.pdf
- Audio Applications for Op-Amps 2

You are on page 1of 4

Matlab Exercise #3

In this exercise, you are required to create a runnable m-file during the exercise. Always use correct figure

numbers, e.g., figure(3) for figure number 3, so the overall m-file will produces nice figures.

Be prepared to discuss with the teacher about the questions given in red text. Teacher might approach

you and start discussion, so think about them and try them beforehand with your freshly generated

Matlab m-file.

AND MODELING THE ISI CHANNEL

In this exercise, we create a baseband equivalent 16-QAM transmission system. We use oversampling

factor of 1 for simplicity, so the model is working at symbol rate. We create symbols at the transmitter,

model a channel, and perform linear equalization of the channel at the receiver. The system model is

depicted in Figure 1. For simplicity, we consider noise-free system ( Z k = 0 ).

Let’s first set the simulation parameters:

Rs = 20e6; %Let's define symbol rate for the plotting purposes

%% Creation of the data

%16-QAM alphabet:

a = repmat(-3:2:3,1,4)-[repmat(-3j,1,4) repmat(-1j,1,4) repmat(1j,1,4) repmat(3j,1,4)];

Ak = a(randi(16,1000,1)); % 16-QAM sequence of 1000 samples

Let’s also plot ideal constellation:

figure(1); plot(real(a),imag(a),'o'); title('16-QAM constellation'); grid; xlabel('RE');

ylabel('IM');

You should now see a pure 16-QAM constellation. Try to understand how the random data is

mapped to constellation points. The above way to create 16-QAM alphabets is short. Can you think

of other ways to create the alphabet?

We start by defining the channel:

%% Channel creation and channel modelling

p = [0.19+.56j .45-1.28j -.14-.53j -.19+.23j .33+.51j]; % Example complex channel model

This is just an example channel. It is a single realization of truncated version of actual channel used,

e.g., in 3GPP LTE radio link evaluations.

Then we define L1 and L2 based on the above channel model. See lecture material p.317 how to

define these for any channel:

L1=1; L2=3; % Channel maximum tap is the second one, see p.317. we start with a pretty short

equalizer… later we increase the length also

We then plot absolute values of the channel impulse response. Notice that the channel is

complex valued, so absolute value tells the relative strength of each of the channel taps. We use

subplot command here, because later we will plot additional subplots to this same figure(2):

figure(2); subplot(311); stem(-L1:L2,abs(p),'r');legend('ISI Channel');

title('Absolute values of impulse responses'); % Absolute values of channel impulse response

Now we plot the amplitude response of the channel. Notice again the subplot command, we

will come back to figure(4) again, and plot some friends for the channel’s response:

%Plotting amplitude response of the channel:

figure(4); [H,f]=freqz(p,1,-Rs/2:Rs/200:Rs/2,Rs); plot(f/1e6,20*log10(abs(H)),'b'); grid on;

xlabel('Frequency [MHz]');ylabel('Amplitude response [dB]'); legend('ISI Channel');

title('Frequency Responses');

Notice that we computed the amplitude response of the channel with freqz function. How can you

do it with fft-function?

Now we use filter function to apply the channel. We also get rid of the anti-causal delay:

Rk = filter(p,1,Ak); % Received signal

Rk = Rk(L1+1:end); % Discard the delay, if channel is anti-causal

Now, we plot the constellation of the signal after the channel. ISI is now present in the

constellation

figure(6);plot(real(Rk),imag(Rk),'o'); grid on; xlabel('RE');ylabel('IM'); % Constellation

with ISI

2 CHANNEL EQUALIZATION WITH LEAST SQUARES BASED AND

INVERSION BASED ZF-FIR EQUALIZERS

Here we are cancelling the effect of the channel by using a filter that has approximately the

opposite effect to the signal as the channel. We are therefore trying to design a filter (equalizer)

that based on some design criterion minimizes the ISI. Here, we study least squares (LS) based

equalizer (see p.318-319) and channel inversing base equalizer (see p.320-321).

We are now cancelling the effect of the channel by using a filter c that tries to minimize the

squared error norm between the target equalized impulse response and realized equalized

impulse response:

%% FIR zero forcing equalizer (LS approach on p.318)

N1=2; N2=5; % Equalizer length is N1+N2+1

P=convmtx(p.',N1+N2+1); % Convolution matrix (see lecture material p. 318)

u_ZF=zeros(N1+N2+L1+L2+1,1); % u vector (zero forcing) (p.319)

u_ZF(L1+N1+1)=1; % Puts the one in the place corresponding to channel delay.

c_LS=((P'*P)\(P'))*u_ZF; % LS equalizer taps with pseudoinverse

Rk_LS=filter(c_LS,1,Rk); % Equalized data

Rk_LS=Rk_LS(L1+N1+1:end); % Discard the transient of the equalizer

You can see that we use so-called pseudo-inverse to solve the LS solution for the equalizer. Our

goal is to have Pc = uZF (we use zero forcing, i.e., try to force ICI to zero). With LS criterion we

- 1

can solve c = (PH P ) PH uZF . Notice that P is not square matrix, so we cannot solve traditional

inverse.

We are now cancelling the effect of the channel by using a filter c that sets the N1 and N2 ISI

terms to zeros before and after the current symbol, respectively:

%% FIR zero forcing equalizer (alternative INV approach on p.320)

P_alt=P(N1+L1+1-N1:N1+L1+1+N2,:); % Picking the correct row of P (p.320)

u_alt=zeros(N1+N2+1,1); % u vector (zero forcing) (p.321)

u_alt(N1+1)=1; % Puts the one in the center.

c_INV=P_alt\u_alt; % INV equalizer taps with inverse

Rk_INV=filter(c_INV,1,Rk); % Equalized data

Rk_INV=Rk_INV(L1+N1+1:end); % Discard the transient of the equalizer

You can see that now instead of pseudo-inverse, we use actual inverse. We only pick up limited

amount of rows of P to get a square matrix (see p.320), so we can have solution Palt c = uZF ,alt .

Now since Palt is square matrix, we can solve c = Palt- 1uZF ,alt .

Here we plot interesting figures to help analyze the used equalizers. Please follow the

comments and the code, and try to understand why each figure indeed depicts what it claims to

depict:

Notice that some of the command add more data to previously created figures. If you already

deleted the figures that you created above, you can rerun the code.

%% Plotting absolute values of the impulse responses of the equalizers

figure(2);subplot(312);stem(-N1:N2,abs(c_LS)); legend('LS equalizer');

axis([-N1-L1 N2+L2 0 Inf]);

figure(2);subplot(313);stem(-N1:N2,abs(c_INV)); legend('INV equalizer');

axis([-N1-L1 N2+L2 0 Inf]);

figure(2); subplot(311); axis([-N1-L1 N2+L2 0 Inf]);

%% Plotting absolute values of the total impulse response of channel + LS/INV equalizers

figure(3);subplot(211);stem(-N1-L1:N2+L2,abs(conv(p,c_LS)));

legend('ISI Channel + LS equalizer'); axis([-N1-L1 N2+L2 0 Inf]);

figure(3);subplot(212);stem(-N1-L1:N2+L2,abs(conv(p,c_INV)));

legend('ISI Channel + INV equalizer'); axis([-N1-L1 N2+L2 0 Inf]);

%% product of channel and LS equalizer

figure(4); hold on; [H_LS,f]=freqz(c_LS,1,-Rs/2:Rs/200:Rs/2,Rs);

plot(f/1e6,20*log10(abs(H_LS)),'r'); % Amplitude response of the LS equalizer

figure(4); H_tot=H.*H_LS; plot(f/1e6,20*log10(abs(H_tot)),'k'); hold off;

legend('ISI Channel','LS equalizer','Total') % Amplitude response of the channel+LS equalizer

%% and the product of channel and LS equalizer

figure(5); hold on; plot(f/1e6,20*log10(abs(H)),'r'); grid on; title('Frequency Responses');

[H_INV,f]=freqz(c_INV,1,-Rs/2:Rs/200:Rs/2,Rs); % Amplitude response of the INV equalizer

plot(f/1e6,20*log10(abs(H_INV)));

xlabel('Frequency [MHz]');ylabel('Amplitude response [dB]');

H_tot_inv=H.*H_INV; plot(f/1e6,20*log10(abs(H_tot_inv)),'k'); hold off;

legend('ISI Channel','INV equalizer','Total') % Amplitude response of the channel+INV

equalizer

figure(6); hold on; plot(real(Rk_LS),imag(Rk_LS),'r.'); % Equalized constellation

plot(real(a),imag(a),'ko', 'MarkerSize',6, 'MarkerFaceColor','k'); hold off; %Ideal

constellation

grid on; legend('Data after ISI channel','Equalized data','Ideal constellation points');

axis equal;

figure(7); hold on;

plot(real(Rk_INV),imag(Rk_INV),'rx'); % LS equalized constellation

plot(real(Rk_LS),imag(Rk_LS),'g.'); % INV equalized constellation

plot(real(a),imag(a),'ko', 'MarkerSize',6, 'MarkerFaceColor','k'); hold off; %Ideal

constellation

grid on; legend('Equalized data (INV)','Equalized data (LS)','Ideal constellation points');

xlabel('RE');ylabel('IM'); axis equal;

Use the above code to understand what is the difference between LS equalizer and inverse

based equalizer. The difference is explained above and in the lecture notes, but be prepared to

support this fact with the help of some of the figures generated above.

Does the equalizers work well? Are there any differences in performance of LS and INV

equalizers?

What happens if you change the equalizer tail lengths N1 and N2? Please evaluate the different

length equalizers.

Can you get it still work, if you change the channel? You can try, e.g., very simple lowpass

channel fir1(4,0.5). Try to set the parameters so that the equalizer work without using overly

high values of N1 and N2.

- AmpegUploaded byBraz Lima
- Pratical FIR Filter design in MatlabUploaded bynonelit54
- Simple Tips for Recording High-quality Audio | Adobe Inspire MagazineUploaded byagustin13g
- Behringer 802 MixerUploaded byfatso68
- Active FiltersUploaded byAaron Merrill
- dsplab_Wk2Uploaded bynaiksuresh
- Moving Average y AccumulatorUploaded byLupis Pech de Torres
- Help - Filter (Filter Design Toolbox)Uploaded byipul
- ATC-863 Software Setup ManualUploaded byMaitry Shah
- g Sudheer FinalUploaded bySudheer
- Driving Consistency in the Estimation of Severity Levels in PHA StudiesUploaded bygfitzgerald62
- A Basic Introduction to Concert Sound EngineeringUploaded byeisenhowre
- X-FILTERED for Roll Stabilization_Moaleji&GreigUploaded byektanu1
- 2013 Catalogue V2Uploaded byotringal
- Mix DownsUploaded bycatsarefunny
- lu2006.pdfUploaded byHossein Hashemi
- A Generalized Method for Various Data Processing Techniques in Gravity Interpretation- Art%3A10.1007%2FBF00876196Uploaded byShadi Garma
- 19 Naimish Zaveri a.R.chudasamaUploaded bynarayan_apte
- An Introduction to Digital Filters.pdfUploaded byOtman Chakkor
- Audio Applications for Op-Amps 2Uploaded bysperesón
- User Manual Sound Canvas.pdfUploaded byFantasmas Banda
- SeminarUploaded byابوسالم الهلالي
- 1. OFDM HistoryUploaded byDekris Darutama
- Kha DC03 EqualizationUploaded bytandobkhcm
- cmadsen abstractUploaded bymyth
- subathra_scilab4dsp.pdfUploaded byVictor Issac
- [IJCST-V4I2P63]:Kuljeet Singh, Gurinder SinghUploaded byEighthSenseGroup
- Concept Id DTSPUploaded bysangeetadinesh
- [IJCST-V4I5P19]:Navdeep Kaur, Er.Divya GargUploaded byEighthSenseGroup
- ICTON Invited v4Uploaded byValery Rozental

- DIGICOMM ManualUploaded byRennel Mallari
- wimaxUploaded by185534 ktr.ece.14
- wimax.docxUploaded by185534 ktr.ece.14
- Evolution Data Optimized (EVDO)Uploaded by185534 ktr.ece.14
- dual.docxUploaded by185534 ktr.ece.14
- Evolution.docxUploaded by185534 ktr.ece.14
- Evolution.docxUploaded by185534 ktr.ece.14
- FindUploaded by185534 ktr.ece.14
- Qualnet Developers Guide-3.6.pdfUploaded by185534 ktr.ece.14
- Omnet++ User guideUploaded byAlexandre Rocha
- Matlab,Line CodingUploaded by185534 ktr.ece.14
- dsp labUploaded by185534 ktr.ece.14
- dsp labfhdhUploaded bySundar Rajadurai
- Lab2(1)Uploaded bySanjay Balwani
- 08.M.E. COMM & NW.pdfUploaded by185534 ktr.ece.14
- CS 1305 - Network Lab ManualUploaded byTarun Dhiman
- KalmanUploaded by185534 ktr.ece.14

- Design of Digital Filters.pdfUploaded bysappal73as
- FALLSEM2017-18_ECE2010_ETH_TTGAL02_VL2017181004662_Reference Material I_Time-Response.pptUploaded byMassSomesh
- PRENER-PM.pdfUploaded byMarcos Salazar
- DspUploaded bymisse07
- Ashdown Pedal ManualUploaded byAndré Lückman
- CodesUploaded byavbhujle2
- isbn9512284103Uploaded bySunil Bhati
- out_6Uploaded byeka
- Square Waves to Sine WavesUploaded byElectrical-Engineer
- Matlab Code for Image Compression Using SPIHT AlgorithmUploaded byArsenalBestly
- Filtering of Noise Signals Using First Order Transfer FunctionsUploaded byshravankuma
- ADV7182 CMRR Measurements Across Frequency Using ADSP-BF527Uploaded byjammy700
- Pre Amp ReviewUploaded bydima
- Implementation of Discrete-time SystemsUploaded byDeyaaAmayreh
- 01v Inside the 01VUploaded byMobiuscloud
- An Improvement of the Output SNR of an Assistive Listening Device Using Crosscorrelation.pdfUploaded byMatías Leonel Martini
- p912a.pdfUploaded byNacer Mezghiche
- K3 Owner's man D9Uploaded bysevickfacebook
- Intro to Electronic Comm Part2Uploaded byZyzerull Saad
- 1- Signal and SystemsUploaded byluidgi12345
- Seat Absorption Coefficients MeasurementUploaded byAgustín Arias
- Subwoofer Distance Tweak Instructions (Requires Acoustic Measurement Tools).docUploaded byBill
- DistortionUploaded bysarantapodarusa4009
- Discrete Wavelet Transform ..Uploaded byid.priyanka
- Ads 1210Uploaded byDangthieuhoi Vu
- APart Audio CatalogueUploaded byvsv
- Katie Wood DellUploaded bywael3000w
- Cubevo Specification SheetUploaded byivan43ter
- LFE360 from wavesUploaded bySamuel Larsson
- Exercise 1_solution.pdfUploaded bygurdian sky