📄 exp9.html
字号:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; I) [Netscape]">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body>
<span style="font-size:18.0pt"><b>Example and Project for Chapter
9</b></span>
<p style="margin-right:.5in;margin-left:.5in"><a href="exp9.zip">Download
Chapter 9 examples</a>
<p style="margin-right:.5in;margin-left:.5in"><a href="project.zip">Download
Chapter wireless project</a>
<p><span style="font-size:7.5pt"><a href="#top">Back to Top</a></span><input type="button" value="go back" onclick="history.go(-1)">
<div class="MsoNormal" style="text-align:center">
<center>
<hr size="3" width="100%" align="center"></center>
</div>
<span style="font-size:13.5pt"><b>Practical DSP Applications in Communications</b></span>
<br>
<br>
<p style="margin-right:1.0in;margin-left:1.0in">In the beginning of the
chapter we presented the signal generation methods, include sine-wave generator
and random sequence generation. We also discussed DTMF detection, echo
cancellation, and speech enhancement, etc. These DSP applications are playing
very important roles in modern communication systems. In this final chapter
of the book, we would like to introduce a TDMA (Time Division Multiple
Access) wireless system as an example of the DSP project for the book.
The block diagram of the simplified TDMA system is shown in Figure 1 below.
<center>
<p><!--[if gte vml 1]><v:shapetype
id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t"
path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="_x0000_i1026" type="#_x0000_t75" style='width:263.25pt;
height:5in'>
<v:imagedata src="" o:title="image002"/>
</v:shape><![endif]--><img SRC="image001.gif" BORDER=0 v:shapes="_x0000_i1026" height=480 width=351>
<p>Figure E9-1 Block diagram of a simplified TDMA wireless system</center>
<p><o:p></o:p>
<div class="MsoNormal" style="text-align:center">
<center>
<hr size="3" width="100%" align="center"></center>
</div>
<div style="margin-right:1.0in;margin-left:1.0in"><span style="font-size:
13.5pt;color:blue"><b>System
Overview</b></span></div>
<p style="margin-right:1.0in;margin-left:1.0in">To simplify the project,
the speech encoder and decoder (vocoder) are not actually implemented.
Instead 400 frames of pre-encoded speech parameters are used as the input
for the system. Also the equalizer is omitted in the project as well. The
original the system can be divided into three sections, the transmitter,
the receiver, and the fading channel and impairments.
<p style="margin-right:1.0in;margin-left:1.0in"><b>Transmitter Functions</b>:
<p style="margin-right:1.0in;margin-left:1.0in">The transmitter consists
of the following modules as see Figure E9-2:
<p style="margin-right:1.0in;margin-left:1.25in;text-indent:-.25in;mso-list:
l0 level1 lfo2;tab-stops:list 1.25in">1.<span style="font:7.0pt "Times New Roman""></span><i>Cyclic
redundant check (CRC) module <span style="mso-spacerun: yes"></span></i>The
CRC is used to provide error checking mechanism for the vocoder class I
bits.
<p style="margin-right:1.0in;margin-left:1.25in;text-indent:-.25in;mso-list:
l0 level1 lfo2;tab-stops:list 1.25in">2.<span style="font:7.0pt "Times New Roman""></span><i>Convolutional
module <span style="mso-spacerun: yes"></span></i>The class I bits
are convolutional encoded to add protection to the information bits.
<p style="margin-right:1.0in;margin-left:1.25in;text-indent:-.25in;mso-list:
l0 level1 lfo2;tab-stops:list 1.25in">3.<span style="font:7.0pt "Times New Roman""></span><i>Interleave
module <span style="mso-spacerun: yes"></span></i>All bits are shuffled
or interleaved to combat the channel fading distortion.
<p style="margin-right:1.0in;margin-left:1.25in;text-indent:-.25in;mso-list:
l0 level1 lfo2;tab-stops:list 1.25in">4.<span style="font:7.0pt "Times New Roman""></span><i>DQPSK
modulator/differential encoder module <span style="mso-spacerun:
yes"></span><span style="mso-spacerun: yes"></span></i>The
transmit symbols are modulated using DQPSK modulation scheme and signal
is mapped for transmission.
<p style="margin-right:1.0in;margin-left:1.25in;text-indent:-.25in;mso-list:
l0 level1 lfo2;tab-stops:list 1.25in">5.<span style="font:7.0pt "Times New Roman""></span><i>Transmitter
filter module<span style="mso-spacerun: yes"></span></i>The symbol for
transmitting is filtered before sending over the channel.
<p style="margin-right:1.0in;margin-left:1.0in"><o:p></o:p>
<center>
<p><!--[if gte vml 1]><v:shape
id="_x0000_i1028" type="#_x0000_t75" style='width:261.75pt;height:174.75pt'>
<v:imagedata src="" o:title="image004"/>
</v:shape><![endif]--><img SRC="image003.gif" BORDER=0 v:shapes="_x0000_i1028" height=233 width=349>
<p>Figure E9-2 Detailed functional modules of the transmitter</center>
<p><br>
<p style="margin-right:1.0in;margin-left:1.0in">CRC generation is performed
using the following CRC polynomial to generate 7 CRC bits:
<center>
<p>G<sub>CRC</sub>(x) = 1+x+x<sup>2</sup>+x<sup>4</sup>+x<sup>5</sup>+x<sup>7
</sup>.</center>
<p style="margin-right:1.0in;margin-left:1.0in">The function of CRC used
for the project is given in <span style="font-family:"Courier New"">crcgen.c</span>.<span style="mso-spacerun: yes"></span>This
file contains a function <span style="font-family:"Courier New"">crcgen(
)</span> which takes as a parameter<span style="mso-spacerun: yes"></span>a
pointer to the vocoder parameter array. The function extracts the CRC bits
from the vocoder parameters and uses the above CRC generator polynomial
to <span style="mso-bidi-font-size:
10.0pt">produce CRC bits which
is then place into the CRC field of the vocoder parameter array.<o:p></o:p></span>
<p style="margin-right:1.0in;margin-left:1.0in">The rate ½ convolutional
encoder processes 89 input bits and generates 178 output bits. The input
bits consists of 77 class I bits, 7 CRC bits, 5 tail bits. The rate ½
convolutional encoder uses the following two generators:
<center>
<p>G<sub>1</sub>(x)=1+x+x<sup>3</sup>+x<sup>5</sup> and G<sub>2</sub>(x)=1+x<sup>2</sup>+x<sup>3</sup>+x<sup>4</sup>+x<sup>5</sup>
<p><!--[if gte vml 1]><v:shape
id="_x0000_i1029" type="#_x0000_t75" style='width:219.75pt;height:138.75pt'>
<v:imagedata src="" o:title=""/>
</v:shape><![endif]--><img SRC="image005.gif" BORDER=0 v:shapes="_x0000_i1029" height=185 width=293>
<p>Figure E9-3 Rate ½ convolutional encoder<o:p></o:p></center>
<p style="margin:0in;margin-bottom:.0001pt;margin-left:72..0pt">The function
of convolutional encoder used for the project is given in <span style="font-family:
"Courier New"">convenc.c</span>.
This file contains the function <span style="font-family:"Courier New"">convenc(</span><span style="font-family:
"Courier New"">)</span>,
which takes as parameters pointers to the output cc0[ ] and cc1[ ], and
the input cl1[ ] arrays. It encodes the class-1 bits in cl1[ ] and save
the result into the output cc0[ ] and cc1[ ] bit arrays.<o:p></o:p>
<p style="margin:0in;margin-bottom:.0001pt;margin-left:72..0pt"><o:p></o:p>
<p class="MsoNormal" style="margin-left:1.0in;mso-layout-grid-align:none;
text-autospace:none">The
interleaving is used to combat the channel fading burst errors.<span style="mso-spacerun: yes"></span>The
input to the interleaver is those 178 encoded class I bits from the encoder
(calss I, CRC, and tail bits) and 82 class II bits. The interleaving is
done between two adjacent speech frames. It is done by reading from each
row and writing them out into a 260x10 array column-wise. The function
of interleaving used for the project is given in <span style="mso-bidi-font-size:10.0pt;font-family:"Courier New"">interlev.c</span><span style="mso-bidi-font-size:10.0pt">.
This file has the function </span><span style="mso-bidi-font-size:10.0pt;font-family:"Courier New"">interleave(
)</span><span style="mso-bidi-font-size:10.0pt"> which<span style="mso-spacerun: yes"></span>is
used to interleave the data field bits in adjacent frames for transmit.<o:p></o:p></span>
<p class="MsoNormal" style="margin-left:1.0in;mso-layout-grid-align:none;
text-autospace:none"><span style="mso-bidi-font-size:10.0pt"><o:p></o:p></span>
<p class="MsoNormal" style="margin-left:1.0in;mso-layout-grid-align:none;
text-autospace:none">The
modulator is combined with the differential encoder. The DQPSK modulator
has eight-point constellation. The differential encoder uses two-bit per
symbol for phase encoding. The function of modulator/differential encoder
used for the project is in <span style="mso-bidi-font-size:10.0pt;font-family:"Courier New"">diffenc.c</span><span style="mso-bidi-font-size:10.0pt">.
This file contains the function </span><span style="mso-bidi-font-size:10.0pt;font-family:"Courier New"">diffenc(
)</span><span style="mso-bidi-font-size:10.0pt"> which takes as parameters
pointers to the input tx_bits[ ], and output I[ ] and Q[ ] arrays. It performs
differential encoding to each symbol bit-pair and make the I and Q vector
pair.<o:p></o:p></span>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><span style="mso-bidi-font-size:10.0pt"><o:p></o:p></span>
<p class="MsoNormal" style="margin-left:1.0in;mso-layout-grid-align:none;
text-autospace:none">A
squared-root raised cosine (SRC) filter is used as the transmit filter
for this project. The 48-tap FIR filter is designed to have nulls at the
adjacent symbols to minimize the ISI interference. It is used with 4x interpolation.
The function of the filter used for the project is in <span style="mso-bidi-font-size:10.0pt;font-family:"Courier New"">tx_src.c</span><span style="mso-bidi-font-size:10.0pt">.
This file contains the function </span><span style="mso-bidi-font-size:10.0pt;font-family:"Courier New"">tx_src(
)</span><span style="mso-bidi-font-size:10.0pt"> which takes </span><span style="mso-bidi-font-size:
10.0pt;font-family:Symbol">p</span><span style="mso-bidi-font-size:10.0pt">/4
DQPSK encoded I and Q symbol streams at 1X symbol rate and generates PI/4
DQPSK SRC filtered I and Q data streams at 4X symbol rate.<o:p></o:p></span>
<p style="margin-right:1.0in;margin-left:1.0in"><b>Receiver Functions</b>:
<p style="margin-right:1.0in;margin-left:1.0in">The receiver consists of
the following modules as see Figure E9-4:
<p style="margin-right:1.0in;margin-left:1.25in;text-indent:-.25in;mso-list:
l0 level1 lfo2;tab-stops:list 1.25in">6.<span style="font:7.0pt "Times New Roman""></span><i>Synchronize
detector module <span style="mso-spacerun: yes"></span></i>The sync
detector is used to detect the starting of the received signal. The sync
detector is only needed for the handset of the wireless system.
<p style="margin-right:1.0in;margin-left:1.25in;text-indent:-.25in;mso-list:
l0 level1 lfo2;tab-stops:list 1.25in">7.<span style="font:7.0pt "Times New Roman""></span><i>Receive
filter module<span style="mso-spacerun: yes"></span></i>The receive filter
is used to filter out the out of band noise and decimate the received symbol
from 4X symbol rate down to 1X.
<p style="margin-right:1.0in;margin-left:1.25in;text-indent:-.25in;mso-list:
l0 level1 lfo2;tab-stops:list 1.25in">8.<span style="font:7.0pt "Times New Roman""></span><i>Differential
decoder module <span style="mso-spacerun: yes"></span></i>The hard
decision decoder decodes the received symbols to the information bits.
<p style="margin-right:1.0in;margin-left:1.25in;text-indent:-.25in;mso-list:
l0 level1 lfo2;tab-stops:list 1.25in">9.<span style="font:7.0pt "Times New Roman""></span><i>De-interleaver
module <span style="mso-spacerun: yes"></span></i>The decoded bits
are rearranged back to the order of encoded class I and class II bits.
<p style="margin-right:1.0in;margin-left:1.25in;text-indent:-.25in;mso-list:
l0 level1 lfo2;tab-stops:list 1.25in">10.<span style="font:7.0pt "Times New Roman""></span><i>Viterbi
decoder module<span style="mso-spacerun: yes"></span></i>The Viterbi decoder
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -