⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eqberdemo.html

📁 Adaptive Filter. This script shows the BER performance of several types of equalizers in a static ch
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">   <head>      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">         <!--This HTML is auto-generated from an M-file.To make changes, update the M-file and republish this document.      -->      <title>BER Performance of Several Equalizer Types</title>      <meta name="generator" content="MATLAB 7.0">      <meta name="date" content="2004-06-29">      <meta name="m-file" content="eqberdemo"><style>body {  background-color: white;  margin:10px;}h1 {  color: #990000;   font-size: x-large;}h2 {  color: #990000;  font-size: medium;}p.footer {  text-align: right;  font-size: xx-small;  font-weight: lighter;  font-style: italic;  color: gray;}pre.codeinput {  margin-left: 30px;}span.keyword {color: #0000FF}span.comment {color: #228B22}span.string {color: #A020F0}span.untermstring {color: #B20000}span.syscmd {color: #B28C00}pre.showbuttons {  margin-left: 30px;  border: solid black 2px;  padding: 4px;  background: #EBEFF3;}pre.codeoutput {  color: gray;  font-style: italic;}pre.error {  color: red;}/* Make the text shrink to fit narrow windows, but not stretch too far in wide windows.  On Gecko-based browsers, the shrink-to-fit doesn't work. */ p,h1,h2,div {  /* for MATLAB's browser */  width: 600px;  /* for Mozilla, but the "width" tag overrides it anyway */  max-width: 600px;  /* for IE */  width:expression(document.body.clientWidth > 620 ? "600px": "auto" );}    </style></head>   <body>      <h1>BER Performance of Several Equalizer Types</h1>      <introduction>         <p>This script shows the BER performance of several types of equalizers in a static channel with a null in the passband.  The            script constructs and implements a linear equalizer object and a decision feedback equalizer (DFE) object.  It also initializes            and invokes a maximum likelihood sequence estimation (MLSE) equalizer.  The MLSE equalizer is first invoked with perfect channel            knowledge, then with a straightforward but imperfect channel estimation technique.         </p>         <p>As the simulation progresses, it updates a BER plot for comparative analysis between the equalization methods.  It also shows            the signal spectra of the linearly equalized and DFE equalized signals.  It also shows the relative burstiness of the errors,            indicating that at low BERs, both the MLSE algorithm and the DFE algorithm suffer from error bursts.  In particular, the DFE            error performance is burstier with detected bits fed back than with correct bits fed back.  Finally, during the "imperfect"            MLSE portion of the simulation, it shows and dynamically updates the estimated channel response.         </p>         <p>This script relies on several other scripts and functions to perform link simulations over a range of Eb/No values.  These            files are as follows:         </p>         <p><a href="eqber_adaptive.html">eqber_adaptive</a> - a script that runs link simulations for linear and DFE equalizers         </p>         <p><a href="eqber_mlse.html">eqber_mlse</a> - a script that runs link simulations for ideal and imperfect MLSE equalizers         </p>         <p><a href="eqber_siggen.html">eqber_siggen</a>   - a script that generates a BPSK signal with no pulse shaping, then processes it through the channel and adds noise         </p>         <p>eqber_graphics - a function that generates and updates plots showing the performance of the linear, DFE, and MLSE equalizers.             Type "edit eqber_graphics" at the MATLAB command line to view this file.         </p>         <p>The scripts eqber_adaptive and eqber_mlse illustrate how to use adaptive and MLSE equalizers across multiple blocks of data            such that state information is retained between data blocks.         </p>         <p>To experiment with this demo, you can change such parameters as the channel impulse response, the number of equalizer tap            weights, the recursive least squares (RLS) forgetting factor, the least mean square (LMS) step size, the MLSE traceback length,            the error in estimated channel length, and the maximum number of errors collected at each Eb/No value.         </p>      </introduction>      <h2>Contents</h2>      <div>         <ul>            <li><a href="#1">Signal and channel parameters</a></li>            <li><a href="#2">Adaptive equalizer parameters</a></li>            <li><a href="#3">MLSE equalizer and channel estimation parameters, and initial visualization</a></li>            <li><a href="#4">Construct RLS and LMS linear and DFE equalizer objects.</a></li>            <li><a href="#5">Linear equalizer</a></li>            <li><a href="#6">Decision feedback equalizer</a></li>            <li><a href="#7">Ideal MLSE equalizer, with perfect channel knowledge</a></li>            <li><a href="#8">MLSE equalizer with an imperfect channel estimate</a></li>         </ul>      </div>      <h2>Signal and channel parameters<a name="1"></a></h2>      <p>Set parameters related to the signal and channel.  Use BPSK without any pulse shaping, and a 5-tap real-valued symmetric channel         impulse response.  (See section 10.2.3 of Digital Communications by J. Proakis for more details on the channel.)  Set initial         states of data and noise generators.  Set the Eb/No range.      </p><pre class="codeinput"><span class="comment">% System simulation parameters</span>Fs      = 1;      <span class="comment">% sampling frequency (notional)</span>nBits   = 2048;   <span class="comment">% number of BPSK symbols per vector</span>maxErrs = 50;     <span class="comment">% target number of errors at each Eb/No</span>maxBits = 1e8;    <span class="comment">% maximum number of symbols at each Eb/No</span><span class="comment">% Modulated signal parameters</span>M          = 2;            <span class="comment">% order of modulation</span>Rs         = Fs;           <span class="comment">% symbol rate</span>nSamp      = Fs/Rs;        <span class="comment">% samples per symbol</span>Rb         = Rs * log2(M); <span class="comment">% bit rate</span>dataState  = 999983;       <span class="comment">% initial state of data generator</span><span class="comment">% Channel parameters</span>chnl       = [0.227 0.460 0.688 0.460 0.227]';  <span class="comment">% channel impulse response</span>chnlLen    = length(chnl);      <span class="comment">% channel length, in samples</span>EbNo       = 0:14;              <span class="comment">% in dB</span>BER        = zeros(size(EbNo)); <span class="comment">% initialize values</span>noiseState = 999917;            <span class="comment">% initial state of noise generator</span></pre><h2>Adaptive equalizer parameters<a name="2"></a></h2>      <p>Set parameter values for the linear and DFE equalizers.  Use a 31-tap linear equalizer, and a DFE with 15 feedforward and         feedback taps.  Use the recursive least squares (RLS) algorithm for the first block of data to ensure rapid tap convergence.          Use the least mean square (LMS) algorithm thereafter to ensure rapid execution speed.      </p><pre class="codeinput"><span class="comment">% Linear equalizer parameters</span>nWts         = 31;       <span class="comment">% number of weights</span>algType1     = <span class="string">'rls'</span>;    <span class="comment">% RLS algorithm for first data block at each Eb/No</span>forgetFactor = 0.999999; <span class="comment">% parameter of RLS algorithm</span>algType2     = <span class="string">'lms'</span>;    <span class="comment">% LMS algorithm for remaining data blocks</span>stepSize     = 0.00001;  <span class="comment">% parameter of LMS algorithm</span><span class="comment">% DFE parameters - use same update algorithms as linear equalizer</span>nFwdWts      = 15;       <span class="comment">% number of feedforward weights</span>nFbkWts      = 15;       <span class="comment">% number of feedback weights</span></pre><h2>MLSE equalizer and channel estimation parameters, and initial visualization<a name="3"></a></h2>      <p>Set the parameters of the MLSE equalizer.  Use a traceback length of six times the length of the channel impulse response.          Initialize the equalizer states. Set the equalization mode to "continuous", to enable seamless equalization over multiple         blocks of data.  Use a cyclic prefix in the channel esimation technique, and set the length of the prefix.  Assume that the         estimated length of the channel impulse response is one sample longer than the actual length.      </p><pre class="codeinput"><span class="comment">% MLSE equalizer parameters</span>tbLen      = 30;                 <span class="comment">% MLSE equalizer traceback length</span>numStates  = M^(chnlLen-1);      <span class="comment">% number of trellis states</span>[mlseMetric, mlseStates, mlseInputs] = deal([]);const      = pskmod(0:M-1, M);   <span class="comment">% signal constellation</span>mlseType   = <span class="string">'ideal'</span>;            <span class="comment">% perfect channel estimates at first</span>mlseMode   = <span class="string">'cont'</span>;             <span class="comment">% no MLSE resets</span><span class="comment">% Channel estimation parameters</span>chnlEst = chnl;         <span class="comment">% perfect estimation initially</span>prefixLen = 2*chnlLen;  <span class="comment">% cyclic prefix length</span>excessEst = 1;          <span class="comment">% length of estimated channel impulse response</span>                        <span class="comment">% beyond the true length</span><span class="comment">% Initialize the graphics for the simulation.  Plot the unequalized channel</span><span class="comment">% frequency response, and the BER of an ideal BPSK system.</span>idealBER = berawgn(EbNo, <span class="string">'psk'</span>, M, <span class="string">'nondiff'</span>);[hBER, hLegend, legendString, hLinSpec, hDfeSpec, hErrs, <span class="keyword">...</span>    hText1, hText2, hFit, hEstPlot] = eqber_graphics(<span class="string">'init'</span>, chnl, EbNo, <span class="keyword">...</span>                                               idealBER, nBits);</pre><img vspace="5" hspace="5" src="eqberdemo_01.png"> <img vspace="5" hspace="5" src="eqberdemo_02.png"> <h2>Construct RLS and LMS linear and DFE equalizer objects.<a name="4"></a></h2>      <p>The RLS update algorithm is used to initially set the weights, and the LMS algorithm is used thereafter for speed purposes.</p><pre class="codeinput">alg1 = eval([algType1 <span class="string">'('</span> num2str(forgetFactor) <span class="string">')'</span>]);linEq1 = lineareq(nWts, alg1);alg2 = eval([algType2 <span class="string">'('</span> num2str(stepSize) <span class="string">')'</span>]);linEq2 = lineareq(nWts, alg2);[linEq1.RefTap, linEq2.RefTap] = <span class="keyword">...</span>    deal(round(nWts/2));    <span class="comment">% Set reference tap to center tap</span>[linEq1.ResetBeforeFiltering, linEq2.ResetBeforeFiltering] = <span class="keyword">...</span>    deal(0);                <span class="comment">% Maintain continuity between iterations</span>dfeEq1 = dfe(nFwdWts, nFbkWts, alg1);dfeEq2 = dfe(nFwdWts, nFbkWts, alg2);[dfeEq1.RefTap, dfeEq2.RefTap] = <span class="keyword">...</span>    deal(round(nFwdWts/2)); <span class="comment">% Set reference tap to center forward tap</span>[dfeEq1.ResetBeforeFiltering, dfeEq2.ResetBeforeFiltering] = <span class="keyword">...</span>    deal(0);                <span class="comment">% Maintain continuity between iterations</span></pre><h2>Linear equalizer<a name="5"></a></h2>      <p>Run the linear equalizer, and plot the equalized signal spectrum, the BER, and the burst error performance for each data block.          Note that as the Eb/No increases, the linearly equalized signal spectrum has a progressively deeper null.  This highlights         the fact that a linear equalizer must have many more taps to adequately equalize a channel with a deep null.  Note also that         the errors occur with small inter-error intervals, which is to be expected at such a high error rate.      </p>      <p>See <a href="eqber_adaptive.html">eqber_adaptive</a> for a listing of the simulation code for the adaptive equalizers.      </p><pre class="codeinput">firstRun = true;  <span class="comment">% flag to ensure known initial states for noise and data</span>eqType = <span class="string">'linear'</span>;eqber_adaptive;</pre><img vspace="5" hspace="5" src="eqberdemo_03.png"> <img vspace="5" hspace="5" src="eqberdemo_04.png"> <img vspace="5" hspace="5" src="eqberdemo_05.png"> <h2>Decision feedback equalizer<a name="6"></a></h2>      <p>Run the DFE, and plot the equalized signal spectrum, the BER, and the burst error performance for each data block.  Note that         the DFE is much better able to mitigate the channel null than the linear equalizer, as shown in the spectral plot and the         BER plot.  The plotted BER points at a given Eb/No value are updated every data block, so they move up or down depending on         the number of errors collected in that block.  Note also that the DFE errors are somewhat bursty, due to the error propagation         caused by feeding back detected bits instead of correct bits. The burst error plot shows that as the BER decreases, a significant         number of errors occurs with an inter-error arrival of five bits or less.  (If the DFE equalizer were run in training mode         at all times, the errors would be far less bursty.)      </p>      <p>For every data block, the plot also indicates the average inter-error interval if those errors were randomly occurring.</p>      <p>See <a href="eqber_adaptive.html">eqber_adaptive</a> for a listing of the simulation code for the adaptive equalizers.      </p><pre class="codeinput">eqType = <span class="string">'dfe'</span>;eqber_adaptive;</pre><img vspace="5" hspace="5" src="eqberdemo_06.png"> <img vspace="5" hspace="5" src="eqberdemo_07.png"> <img vspace="5" hspace="5" src="eqberdemo_08.png"> <h2>Ideal MLSE equalizer, with perfect channel knowledge<a name="7"></a></h2>      <p>Run the MLSE equalizer with a perfect channel estimate, and plot the BER and the burst error performance for each data block.          Note that the errors occur in an extremely bursty fashion.  Observe, particularly at low BERs, that the overwhelming percentage         of errors occur with an inter-error interval of one or two bits.      </p>      <p>See <a href="eqber_mlse.html">eqber_mlse</a> for a listing of the simulation code for the MLSE equalizers.      </p><pre class="codeinput">eqType = <span class="string">'mlse'</span>;mlseType = <span class="string">'ideal'</span>;eqber_mlse;</pre><img vspace="5" hspace="5" src="eqberdemo_09.png"> <img vspace="5" hspace="5" src="eqberdemo_10.png"> <h2>MLSE equalizer with an imperfect channel estimate<a name="8"></a></h2>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -