Azzera filtri
Azzera filtri

Generating QPSK symbols for adaptive filtering

6 visualizzazioni (ultimi 30 giorni)
johan pirsch
johan pirsch il 1 Mar 2018
Commentato: Abhishek Kumar il 11 Dic 2020
Hello for an assignment i am supposed to investigate the performance of an adaptive equalizer for data transmission. I am supposed to first start by designing a generator module used to create a sequence of complex valued information symbols which we called s[n]. For this assignment we will assume QPSK symbols or in other words that s[n] must be drawn from the set {a+ja, a-ja,-a+ja, -a-ja} where a represents the signal amplitude. Can anyone help me in designing this filter im pretty stuck thanks
  3 Commenti
johan pirsch
johan pirsch il 3 Mar 2018
The objective of this project is to investigate the performance of an adaptive equalizer for datatransmission over a multipath channel that causes “inter-symbol interference” (ISI). The basicconfiguration of the system to be simulated is shown in the figure on the next page. Note that wehave not included carrier modulation and demodulation, however all processing involves complexarithmetic operations (complex symbols as input, complex channel impulse response, etc). Thereare five basic modules that must be incorporated into the simulation:1. The data generator module is used to create a sequence of complex valued information symbolss[n]. For this experiment we will assume QPSK symbols, or in other words thats[n] must bedrawn from the set{a+ja,a−ja,−a+ja,−a−ja}, wherearepresents the signal amplitudethat is chosen according to a given signal-to-noise ratio (SNR). Assuming that the noise hasunit power, then SNR = 20 log10(√2a).2. The channel filter module is an FIR filter with impulse responsec[n] that simulates thechannel distortion.3. The noise generator module is used to generate additive noise that is present in any digi-tal communication system. For the noise, assume unit-power, complex Gaussian noise. InMatlab, this can be done using the command:(1/sqrt(2))*(randn(1,N)+j*randn(1,N)),which generates a vector ofNnoise samples.4. The adaptive equalizer module is a lengthM+1 FIR filterh[n] whose coefficients are adjustedusing either the LMS or the normalized-LMS algorithm. (Remember: use the complex versionof the filter!)5. The decision device module takes the output of the equalizer and quantizes it to one of thefour possible transmitted symbols, based on whichever is closest. This module is necessarywhen your equalizer is operating in decision-directed mode, where the detected symbols areused to train the filter.The effectiveness of the equalizer in suppressing the ISI introduced by the channel may be seenby plotting the input and output of the equalizer in a two-dimensional (real-imaginary) display.If you run the full experiment a total ofPtimes, then you will havePdifferent values of theequalizer input and output for each time samplen, wheren= 0,···,N−1. If you plot thesePpoints for eachn, hopefully you will see that the output of the equalizer eventually converges tofour tightly clustered clouds around the QPSK symbol values. You should also plot the errore[n]as a function ofn, averaged over thePexperiments. This will give you a picture of the rate atwhich the equalizer is converging.Your main Matlab simulation should have the following as input variables: a vectorccontainingthe channel impulse response, the SNR in dB, the step sizeμfor the fixed-step LMS equalizer, thelengthMof the equalizer filterh, the number of training samplesTused to initially train the filter,the number of total samplesNper experiment, and the total numberPof experiments used toplot the results and compute the average error.To test the functionality of your code, use the following test case:c= [1 0.2−0.4 0.3 0.2−0.1]T,SNR = 25dB,μ= 0.01,M= 10,N= 300,T= 30,P= 100. You should get results similar to those shown in class. For your report, investigate the effect of different channels (including complexchannels), different SNR values, step sizes, and filter lengths. Comment on the relative performanceof the LMS and normalized-LMS algorithms, touching on convergence rate, stability and the finalvalue of the error. Recall that channel filters whose first tap has the largest value will likely leadto the best performance. Channels whose strongest tap is not the first require the addition of thedelay (shown in the figure below) to ensure that the error signal is being computed by comparingthe transmitted symbol from the output of the filter that should correspond to that transmittedsymbol. To avoid the need for the delay block, choose channel impulse responses whose first tap islarger than the rest.
Abhishek Kumar
Abhishek Kumar il 11 Dic 2020
check this link out
https://www.andrewtec.me/post/adaptive-eq/

Accedi per commentare.

Risposte (2)

Abraham Boayue
Abraham Boayue il 2 Mar 2018
function [e,w,y,W] = LMS(x,d,mu,M)
% lms algotherm
N = length(x);
w = zeros(M,1);
e = zeros(1,N);
y = zeros(1,N);
u = zeros(1,M);
W = zeros(M,N);
for k =1:N
u = [x(k),u(1:M-1)]; % Vector containg the input signal for which the
% weights are non zero
y(k) = u*w;
e(k)= d(k)-y(k);
w = w+mu*u'*e(k);
W(:,k) = w;
end
end
%%This is the m-file
close all
clear
n =1:3;
D =[2.9 3.1 3.3 3.5];
% h =0.5*(1+cos(2*pi*(n-2)/D(4)));
% stem(n,h,'filled'); grid
% xlim([0 5]);
M = 11;
N = 1000;
L = 800;
J_ave = zeros(1,N);
delay = 7;
mu = 0.075;
J_vec = zeros(length(D),N); % vector for storing values of MSE
V_w = zeros(M,length(D)); % vector for storing the estimated coefficients
for k =1:length(D)
h = 0.5*(1+cos(2*pi*(n-2)/D(k))); % channel response
xn = sign(randn(1,N)-0.5);% This is a bernoulli sequence; generate your
% QPSK here
for i = 1:L
%d = [zeros(1,delay) xn(1,1:N-delay)];
d = zeros(1,N);
d(delay:N) = xn(1:N-delay+1);
x1 = filter(h,1,xn);
v = sqrt(0.001)*randn(1,N);
x = x1(1:N) +v;
[e,w,y,W] = LMS(x,d,mu,M);% perform the equalization
J_ave = J_ave +abs(e.^2);
end
J_vec(k,:) = J_ave;
V_w(:,k) = w;
end
J_vec =J_vec/L;
% J_vec =10*log10(J_vec);
ind =0:N-1;
% %Make a smoother curve
window = 1;
for i = 1:N-window
J_vec(i) = mean(J_vec(i:i+window));
end
figure
semilogy(ind,J_vec(1,:),'linewidth',1.5, 'color','k');hold on
semilogy(ind,J_vec(2,:),'linewidth',1.5, 'color','m')
semilogy(ind,J_vec(3,:),'linewidth',1.5, 'color','r')
semilogy(ind,J_vec(4,:),'linewidth',1.5, 'color','b')
grid
a =title('Ensamble-average of |e(i)|^2');
set(a,'fontsize',14);
a = xlabel('NO. OF ITERATIONS');
set(a,'fontsize',14);
a = ylabel('MSE dB');
set(a,'fontsize',14);
ylim([10^-3 10^1])
xlim([0 500])
figure
stem(V_w(:,1),'filled','m'); grid

Abraham Boayue
Abraham Boayue il 2 Mar 2018
Here is an example paper on how to generate the QPSK signal.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by