page_title: Adaptive equalizer
hierarchical_section_title: Adaptive equalizer
caption_attribution_description: English: Developed according to TU Ilmenau teaching materials. clear all; close all; clc %% Initialization % channel parameters sigmaS = 1; %signal power sigmaN = 0.01; %noise power % CSI (channel state information): % the channel for the transmission of the first NS1 training symbols channel1 = [0.722 - 0.779i; -0.257 - 0.722i; -0.789 - 1.862i]; % the channel for the transmission of the next NS2 training symbols channel2 = [-0.831 - 0.661i;-1.071 - 0.961i; -0.551 - 0.311i]; M = 5; % filter order % step sizes mu_LMS = [0.01,0.07]; mu_SG = [0.01,0.07]; % symbols / ensembles NS1 = 500; NS2 = 500; NS = NS1+NS2; NEnsembles = 1000; %number of ensembles %% Compute Rxx and p %the maximum index of channel taps (l=0,1...L): L = length(channel1) - 1; H = convmtx(channel1, M-L); %channel matrix (Toeplitz structure) Rnn = sigmaN*eye(M); %the noise covariance matrix % Inline functions: calc_Rxx = @(channel) ... sigmaS*(convmtx(channel, M-L)*convmtx(channel, M-L)&#39;)+sigmaN*eye(M); calc_p = @(channel) sigmaS*(convmtx(channel,M-L))*[1; zeros(M-L-1, 1)]; Rxx = zeros(M,M,2); p = zeros(M,2); A = calc_Rxx(channel1); Rxx(:,:,1) = calc_Rxx(channel1); Rxx(:,:,2) = calc_Rxx(channel2); p(:,1) = calc_p(channel1); p(:,2) = calc_p(channel2); % An inline function to calculate MSE(w) for a weight vector w calc_MSE = @(w, ch) real(w&#39;*Rxx(:,:,ch)*w - w&#39;*p(:, ch) - p(:, ch)&#39;*w + sigmaS); %% Adaptive Equalization N_test = 2; MSE_LMS = zeros(NEnsembles, NS, N_test); MSE_SG = zeros(NEnsembles, NS, N_test); MSE_RLS = zeros(NEnsembles, NS, N_test); for nEnsemble = 1:NEnsembles %initial symbols: symbols1 = sigmaS*sign(randn(1,NS1)); symbols2 = sigmaS*sign(randn(1,NS2)); %received noisy symbols: X1 = convmtx(channel1, M-L)*hankel(symbols1(1:M-L),[symbols1(M-L:end),zeros(1,M-L-1)]) + ... sqrt(sigmaN)*(randn(M,NS1)+1j*randn(M,NS1))/sqrt(2); X2 = convmtx(channel2, M-L)*hankel(symbols2(1:M-L),[symbols2(M-L:end),zeros(1,M-L-1)]) + ... sqrt(sigmaN)*(randn(M,NS2)+1j*randn(M,NS2))/sqrt(2); X = [X1, X2]; symbols = [symbols1, symbols2]; for n_mu = 1:N_test w_LMS = zeros(M,1); w_SG = zeros(M,1); p_SG = zeros(M,1); R_SG = zeros(M); for n = 1:NS if n &lt;= NS1, curh = 1; else curh = 2; end %% LMS - Least Mean Square e = symbols(n) - w_LMS&#39;*X(:,n); w_LMS = w_LMS + mu_LMS(n_mu)*X(:,n)*conj(e); MSE_LMS(nEnsemble,n,n_mu)= calc_MSE(w_LMS, curh); %% SG - Stochastic gradient R_SG = 1/n*((n-1)*R_SG + X(:,n)*X(:,n)&#39;); p_SG = 1/n*((n-1)*p_SG + X(:,n)*conj(symbols(n))); w_SG = w_SG + mu_SG(n_mu)*(p_SG - R_SG*w_SG); MSE_SG(nEnsemble,n,n_mu)= calc_MSE(w_SG, curh); end end %RLS - Recursive Least Squares lambda_RLS = [0.8; 1]; %forgetting factors for n_lambda=1:length(lambda_RLS) %Initialize the weight vectors for RLS delta = 1; w_RLS = zeros(M,1); P = eye(M)/delta; % (n-1)-th iteration, where n = 1,2... PI = zeros(M,1); % n-th iteration K = zeros(M,1); for n=1:NS if n &lt;= NS1, curh = 1; else curh = 2; end % the recursive process of RLS PI = P*X(:,n); K = PI/(lambda_RLS(n_lambda)+X(:,n)&#39;*PI); ee = symbols(n) - w_RLS&#39;*X(:,n); w_RLS = w_RLS + K*conj(ee); MSE_RLS(nEnsemble,n,n_lambda)= calc_MSE(w_RLS, curh); P = P/lambda_RLS(n_lambda) - K/lambda_RLS(n_lambda)*X(:,n)&#39;*P; end end end %% Wiener Solution MSE_Wiener(1:NS1) = calc_MSE(Rxx(:,:,1)\p(:,1),1); MSE_Wiener(NS1+1:NS) = calc_MSE(Rxx(:,:,2)\p(:,2),2); MSE_LMS_1 = mean(MSE_LMS(:,:,1)); MSE_LMS_2 = mean(MSE_LMS(:,:,2)); MSE_SG_1 = mean(MSE_SG(:,:,1)); MSE_SG_2 = mean(MSE_SG(:,:,2)); MSE_RLS_1 = mean(MSE_RLS(:,:,1)); MSE_RLS_2 = mean(MSE_RLS(:,:,2)); figure(1) n = 1:NS; m= [2 4 6 10 30 60 100 300 600 1000]; semilogy(m, MSE_LMS_1(m),&#39;+&#39;,&#39;linewidth&#39;,2, &#39;color&#39;,&#39;blue&#39;); hold all; semilogy(m, MSE_LMS_2(m),&#39;o&#39;,&#39;linewidth&#39;,2, &#39;color&#39;,&#39;blue&#39;); semilogy(m, MSE_SG_1(m),&#39;+&#39;,&#39;linewidth&#39;,2, &#39;color&#39;,&#39;red&#39;); semilogy(m, MSE_SG_2(m),&#39;o&#39;,&#39;linewidth&#39;,2, &#39;color&#39;,&#39;red&#39;); semilogy(m, MSE_RLS_1(m),&#39;+&#39;,&#39;linewidth&#39;,2, &#39;color&#39;,&#39;green&#39;); semilogy(m, MSE_RLS_2(m),&#39;o&#39;,&#39;linewidth&#39;,2, &#39;color&#39;,&#39;green&#39;); semilogy(n, MSE_Wiener(n), &#39;color&#39;,&#39;black&#39;,&#39;linewidth&#39;,2); semilogy(n, MSE_LMS_1(n),&#39;linewidth&#39;,2, &#39;color&#39;,&#39;blue&#39;); semilogy(n, MSE_LMS_2(n),&#39;linewidth&#39;,2, &#39;color&#39;,&#39;blue&#39;); semilogy(n, MSE_SG_1(n),&#39;linewidth&#39;,2, &#39;color&#39;,&#39;red&#39;); semilogy(n, MSE_SG_2(n),&#39;linewidth&#39;,2, &#39;color&#39;,&#39;red&#39;); semilogy(n, MSE_RLS_1(n),&#39;linewidth&#39;,2, &#39;color&#39;,&#39;green&#39;); semilogy(n, MSE_RLS_2(n),&#39;linewidth&#39;,2, &#39;color&#39;,&#39;green&#39;); grid on xlabel(&#39;Ns&#39;); ylabel(&#39;MSE&#39;); title([&#39;LMS, SG, RLS, \sigma_N= &#39; num2str(sigmaN) &#39;, \sigma_S= &#39;... num2str(sigmaS) &#39;, M= &#39; num2str(M) &#39;, L= &#39; num2str(L) ]); legend([&#39;LMS, \mu=&#39; num2str(mu_LMS(1))],[&#39;LMS, \mu=&#39; num2str(mu_LMS(2))],... [&#39;SG, \mu=&#39; num2str(mu_SG(1))],[&#39;SG, \mu=&#39; num2str(mu_SG(2))],... [&#39;RLS, \lambda=&#39; num2str(lambda_RLS(1))],[&#39;RLS, \lambda=&#39; ... num2str(lambda_RLS(2))],&#39;Weiner solution&#39;,2); axis([0 NS 0.002 1])
context_page_description: An adaptive equalizer is an equalizer that automatically adapts to time-varying properties of the communication channel. It is frequently used with coherent modulations such as phase shift keying, mitigating the effects of multipath propagation and Doppler spreading.
  Adaptive equalizers are a subclass of adaptive filters. The central idea is altering the filter's coefficients to optimize a filter characteristic. For example, in case of linear discrete-time filters, the following equation can be used:
  where is the vector of the filter's coefficients, is the received signal covariance matrix and is the cross-correlation vector between the tap-input vector and the desired response. In practice, the last quantities are not known and, if necessary, must be estimated during the equalization procedure either explicitly or implicitly.
  Many adaptation strategies exist. They include, e.g.:
  LMS Note that the receiver does not have access to the transmitted signal when it is not in training mode. If the probability that the equalizer makes a mistake is sufficiently small, the symbol decisions made by the equalizer may be substituted for.
  SG
  RLS
context_section_description: An adaptive equalizer is an equalizer that automatically adapts to time-varying properties of the communication channel. It is frequently used with coherent modulations such as phase shift keying, mitigating the effects of multipath propagation and Doppler spreading. 
  Adaptive equalizers are a subclass of adaptive filters. The central idea is altering the filter's coefficients to optimize a filter characteristic. For example, in case of linear discrete-time filters, the following equation can be used:
  where  is the vector of the filter's coefficients,  is the received signal covariance matrix and  is the cross-correlation vector between the tap-input vector and the desired response. In practice, the last quantities are not known and, if necessary, must be estimated during the equalization procedure either explicitly or implicitly.
  Many adaptation strategies exist. They include, e.g.:
  LMS Note that the receiver does not have access to the transmitted signal  when it is not in training mode. If the probability that the equalizer makes a mistake is sufficiently small, the symbol decisions  made by the equalizer may be substituted for .
  SG
  RLS
  A well-known example is the decision feedback equalizer, a filter that uses feedback of detected symbols in addition to conventional equalization of future symbols. Some systems use predefined training sequences to provide reference points for the adaptation process.
caption: The mean square error performance of LMS, SG and RLS in dependence of training symbols in case of changed during the training procedure channel. Signal power is 1 W, noise power is 0.01 W.
exif: {}