EX: NO: 9
DATE: ADAPTIVE CHANNEL EQUALIZER
AIM:
To Design an Adaptive Channel Equalizer using MATLAB.
ESSENTIAL REQUIRED:
HARDWARE: Pc
SOFTWARE: MATLAB software R2019a.
THEORY:
Equalization is the reversal of distortion incurred by a signal transmitted through a channel.
Equalizers are used to render frequency response .Equalization is the process to remove
ISI and noise effects from the channel .Equalizers are of two types
1.Linear
2.Non linear
LINEAR EQUALIZERS :Aim at reducing ISI in linear channels using various algorithms like
least mean square,RLS and normalize LMS
NON LINEAR EQUALIZERS :Equalizenon linearchannels.They mainly use multilayer
perception (MLP).
LMS ALGORITHM:
• Introduced by window and hoff in 1959.
• Approximation of the steepest descent method.
• This algorithm is based on MMSE.
RLS ALGORITHM:
•Calculates the output signal y(n)of the adaptive filter.
• Update the filter coefficients vector.
The RLS is an adaptive filter which reversely find the coefficients that minimize linear least
squares cost function relating to the input signal.
Block Diagram:
PROCEDURE:
• Start the matlab and creats a new file .
• Edit program for channel equalization technique using MATLAB.
• Enter the program for equalizing signal vector .
• Enter equalizing technique with training sequence program and put the signal by
computing error rate.
RLS PROGRAM:
Clc;
Clear all;
Close all;
m=4;
n=2000;
random_int=randint(n,1,m);
qpsk_mod=pskmod(random_int,m);
sig_const=pskmod([0:m-1],m);
sample_len=500;
qpsk_mod_chanl=awgn(qpsk_mod,84,’measured’,1234);
chan=[.99;.88;.23,.12+.31i];
qpsk_mod_chan=filter(chan,1,qpsk_mod_chanl);
h=scatterplot(qpsk_mod_chan,1,sample_len,’bx’);
holdon
eq=lineareq(16,rls(.99,.1),sig_const);
[symbol,yd]=equalizer(eq,qpsk_mod_chan,qpsk_mod(1:sample_len));
Scatterplot(symbol,1,sample_len,’g’,h);
Scatterplot(qpsk_mod,1,0,’r*’,h);
holdoff
title(‘rlsequaliser constellation’);
legend(‘qpsk with channel’,’equalisedqpsk’,’ideal qpsk’);
qpsk_demod_ideal=pskdemod(qpsk_mod,m);
qpsk_demod_chan=pskdemod(qpsk_mod,chan,m);
qpsk_demod_equ=pskdemod(symbol,m);
error=length(find(qpsk_demod_ideal_random_int));
disp([‘no of bits’,num2str(n)]);
disp([‘bit error in ideal qpsk=’,num2str(error)]);
error=length(find(qpsk_demod_ideal_random_int));
disp([‘bit error for noisy qpsk=’,num2str(error)]);
error=length(find(qpsk_demod_equ_random_int));
disp([‘bit error for equalisedqpsk=’,num2str(error)]);
LMS PROGRAM:
Clc;
Clear all;
Close all;
m=4;
n=2000;
random_int=randint(n,1,m);
qpsk_mod=pskmod(random_int,m);
sig_const=pskmod([0:m-1],m);
sample_len=500;
qpsk_mod_chanl=awgn(qpsk_mod,84,’measured’,1234);
chan=[.99;.88;.23,.12+.31i];
qpsk_mod_chan=filter(chan,1,qpsk_mod_chanl);
h=scatterplot(qpsk_mod_chan,1,sample_len,’bx’);
holdon
eq=lineareq(16,lms(.99,.1),sig_const);
[symbol,yd]=equalizer(eq,qpsk_mod_chan,qpsk_mod(1:sample_len));
Scatterplot(symbol,1,sample_len,’g’,h);
Scatterplot(qpsk_mod,1,0,’r*’,h);
holdoff
title(‘lmsequaliser constellation’);
legend(‘qpsk with channel’,’equalisedqpsk’,’ideal qpsk’);
qpsk_demod_ideal=pskdemod(qpsk_mod,m);
qpsk_demod_chan=pskdemod(qpsk_mod,chan,m);
qpsk_demod_equ=pskdemod(symbol,m);
error=length(find(qpsk_demod_ideal_random_int));
disp([‘no of bits’,num2str(n)]);
disp([‘bit error in ideal qpsk=’,num2str(error)]);
error=length(find(qpsk_demod_ideal_random_int));
disp([‘bit error for noisy qpsk=’,num2str(error)]);
error=length(find(qpsk_demod_equ_random_int));
disp([‘bit error for equalisedqpsk=’,num2str(error)]);
Output:
RESULT:
Thus the matlab code to simulate Adaptive channel equalizers zero forcing Least
meansquares(LMS),Rescursive least squares(RLS) were written executed and verified successfully.
EX: NO:10 DEMONSTRATION OF BAYES TECHNIQUE
DATE:
AIM:
To write the MATLAB program for the Demonstration of Bayes Technique .
ESSENTIAL REQUIRED:
HARDWARE: PC
SOFTWARE: MATLAB R2019a
THEORY:
Bayesian analysis is a method of statistical inference that allows one to combine prior information
about a population parameter with evidence from information contained in a sample to guide the
statistical inference process.
A prior probability distribution for a parameter of interest is specified first.The evidence is then
obtained and combined through an application of Bayes Theorem to provide a posterior probability
distribution for the parameter. The posterior function provides the basis for statistical inferences
concerning the parameter.
PROGRAM:
function result = meanestimator(sigma0,u,sigma,n,X)
meanX = mean(X);
result = (n*meanX/sigma0)/((n/sigma0)+(1/sigma))+(u/sigma)/((n/sigma0)+(1/sigma));
endfunction
function result = varestimator(sigma0,sigma,n)
result = (sigma0*sigma)/((n*sigma)+sigma0);
endfunction
u = 50;
sigma = 100;
sigma0 = 60;
n =1;
X =40;
expec = meanestimator(sigma0,u,sigma,n,X);
var = varestimator(sigma0,sigma,n);
// d i s p ( e x p e c ) ;
// d i s p ( va r ) ;
zalpha = 1.645
lowerlim = -1*sqrt(var)*zalpha+expec;
upperlim = sqrt(var)*zalpha+expec;
disp(upperlim,"to",lowerlim,"With probability 0.9,the sent signal lies between",)
OUTPUT
Console
-->exec('C:\Users\Stelbiya\BE.sce', -1)
53.823527
"to"
33.676473
"With probability 0.9,the sent signal lies between
RESULT
Thus the Demonstration of Bayes Technique was implemented successfully.
EX: NO: 11 GENERATION OF MULTIVARIATE GAUSSIAN GENERATED DATA WITH
DESIRED MEAN VECTOR AND THE REQUIRED CO VARIANCE MATRIX
DATE:
AIM:
To write a MATLAB program for Calculate co variance matrix multivariate Gaussian
distribution .
ESSENTIAL REQUIRED:
HARDWARE: PC
SOFTWARE: MATLAB version R2019a
THEORY:
The multivariate Gaussian distribution (also called the multivariate normal
distribution) is an extension of the univariate Gaussian distribution to higher dimensions. It
describes a random vector whose components are jointly normally distributed. It is used to model a
wide range of phenomena, particularly in areas such as machine learning, statistics, finance, and
natural sciences.
PROGRAM:
clc ;
clear all;
clf();
//m = input ( ’ e n t e r mean v a l u e f o r Gaussian r . v . ’ )
// v a r i = input ( ’ enter mean value for Gaussian r . v . ’ )
m = 2; //mean v a l u e o f g a u s si a n data
sd = 1; // s t andard d e v i a t i o n
vari = sd ^2;
X = grand(100000,1,"nor",m,sd);
Xmax = max(X);
clf()
histplot(40,X,style =2)
x = linspace( -10,max(Xmax ),100)';
plot2d(x,(1/(sqrt(2*%pi*vari)))*exp(-0.5*(x-m).^2/vari),strf ="000",style =5)
xlabel('sample value');
ylabel('Gaussian output values');
title('Gaussian distributed data');
legend(["Gaussian random sample histogram" "exact density curve"],2);
RESULT
Thus the MATLAB program for calculate covariance matrix multivariate Gaussian distribution was
written and output was verified.
EX: NO:12 MULTIPLE INPUT MULTIPLE OUTPUT(MIMO)
DATE:
AIM:
To Simulate MIMO System using MATLAB .
ESSENTIAL REQUIRED:
HARDWARE: Pc
SOFTWARE: MATLAB R2019a
THEORY:
In radio multiple-input and multiple-output(MIMO) is a method for multiplying
the capacity of a radio link using multiple transmit and receive antennas to exploit
multipath propagation. MIMO has become an essential element of wireless
communication standards including IEEE802.11n ( wifi ), IEEE802.11ac ( wifi ),
11SPAI(3G), wiMAX (4G) and Long Term Evolution (4G).
MIMO cab be subdivided into three main categories: precoding, spatial
multiplexing and diversity coding. Precoding is multistream beam forming. In more
general terms, it is considered to be all spatial processing that occurs at the transmitter. In
beam forming the same signal is emitted from each of the transmit antennas with
appropriate phase and gain weighting such that the signal power is maximized at the
receiver input. Spatial multiplexing requires MIMOantennaconfiguration.
In spatial multiplexing , a high-rate signal is split into multiple lower-rate stream
and each stream is transmitted from a different transmit antenna in the same frequency
channel. Diversity coding techniques are used when there is no channel knowledge at the
transmitter. In diversity methods, a single stream is transmitted, but the signal is coded
using techniques called space-time coding.
PROGRAM:
MIMO SYSTEMS:
chan=mimochan(2,2,1e-4,60,[0 2.5e-4 3e-4],[0 -2
-3]);chan.KFactor=2;
chan.TxCorrelationMatrix=[1 0.6;0.6 1];
chan.RxCorrelationMatrix=[10.5*j;-
0.5*j1];
y=filter(chan,ones(20,2));
t=(0:19)*chan.InputSamplePeriod;
plot(t,abs(y));
xlabel(‘Time’);
ylabel(‘Amp’);
legent(‘1st antenna output’,’2nd antenna output’);
PROCEDURE:
1. Open Matlab versionR2014a.
2. Open new file and enter the program and saveit.
3. Add the path to the location of the file in thesystem.
4. Compile the program and check for any error and debugit.
5. Note down the output.
OUTPUT
ChannelType:’MIMO’
NumTxAntennas:2
NumRxAntennas:2
InputSamplePeriod:1.0000e-04
DopplerSpectrum:
[1*1doppler.jakes]
MaxDopplerShift: 60
PathDelays: [0 2.5000e-04 3.0000e-04]
AvgPathGaindb: [0 -2 -3]
TxCorrelationMatrix: [2*2
double] RxCorrelationMatrix:
[2*2 double]
KFactor: 0
DirectPathDopplerShift: 0
DirectPathInitPhase: 0
ResetBeforeFiltering:1
NormalizePathGains:1
StorePathGains: 1
PathGains: [4-D
double]
ChannelFilterDelay: 4
NumSamplesProcessed: 0
RESULT:
Thus the matlab code to simulate MIMO system was written, executed and verified
the output successfully.
COURSE OBJECTIVES:
To provide the student with the basic understanding of audio signal analysis using
filters
To provide the students with the understanding of the working of statistical
method based approaches
To impart the students with the design of filters
To demonstrate the working of algorithms for different applications
To provide knowledge of analyzing the images and video
LIST OF EXPERIMENTS:
1. Design of Adaptive channel equalizer
2. Realization of sub band filter using linear convolution
3. Realization of STFT using FFT
4. Demonstration of Bayes technique
5. Demonstration of Min-max technique
6. Realization of FIR Wiener filter
7. Generation of Multivariate Gaussian generated data with desired mean vector and the
required co-variance matrix.
8. Design and Realization of the adaptive filter using LMS algorithm (solved using
steepest descent algorithm)
9. Representation of the 2D image signal as the linear combinations of PCA (Eigen faces)
10. Image compression using Discrete cosine transformation (DCT).
11. Multiple-input Multiple output (MIMO)
12. Speech recognition using Support Vector Machine (SVM)
13. LMS filtering implementation using TMS320C6x processor
14. Face detection and tracking in video using OpenCV
COURSE OUTCOMES:
CO1: Obtain the ability to apply knowledge of linear algebra, random process and
multirate signal processing in various signal processing applications.
CO2: Develop the student’s ability on conducting engineering experiments, analyze
experimental observations scientifically
CO3: Become familiar to fundamental principles of linear algebra
CO4: Familiarize the basic operations of filter banks through simulations
CO5: Apply the principles of random process in practical applications