<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">IJCNS</journal-id><journal-title-group><journal-title>International Journal of Communications, Network and System Sciences</journal-title></journal-title-group><issn pub-type="epub">1913-3715</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/ijcns.2016.95011</article-id><article-id pub-id-type="publisher-id">IJCNS-66932</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Computer Science&amp;Communications</subject></subj-group></article-categories><title-group><article-title>
 
 
  Parallel Programming Design of BPSK Signal Demodulation Based on CUDA
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Yandu</surname><given-names>Liu</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Baoling</surname><given-names>Zhang</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Haixin</surname><given-names>Zheng</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>Equipment Academy, Beijing, China</addr-line></aff><pub-date pub-type="epub"><day>30</day><month>05</month><year>2016</year></pub-date><volume>09</volume><issue>05</issue><fpage>126</fpage><lpage>134</lpage><history><date date-type="received"><day>12</day>	<month>April</month>	<year>2016</year></date><date date-type="rev-recd"><day>accepted</day>	<month>24</month>	<year>May</year>	</date><date date-type="accepted"><day>30</day>	<month>May</month>	<year>2016</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
   Realizing digital signal demodulation on the general computer is an important research direction in the field of signal processing in recent years. In this paper, the algorithm of BPSK signal demodulation which has high real-time requirements is researched on the general computer. According to the characteristics of “CPU + GPU” heterogeneous computing, the parallel computation model of digital communication is put forward, and BPSK signal demodulation is realized on CUDA platform. Test results show that the computing time ratio of 1:1.7, when 
    
    <!--[if gte mso 9]><xml>
 <o:oleobject type="Embed" progid="Equation.DSMT4" shapeid="_x0000_i1025" drawaspect="Content" objectid="_1526129238">
 </o:oleobject>
</xml><![endif]--> the bit error rate can be achieved 10<sup>?5</sup>.  
 
</p></abstract><kwd-group><kwd>BPSK</kwd><kwd> Demodulation</kwd><kwd> CUDA</kwd><kwd> Parallel</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>In recent years, with the constant improvement of the general computer performance, experienced from hardware platform towards digital platform of software radio technology, the platform of digital signal processing in communication system is beginning to change the direction of development. The signal after the A/D directly complete real-time processing in pure software processing way based on general computer platform.</p><p>Digital Phase modulation, namely Phase Shift Keying (Phase Shift Keying, PSK), is a very important basic digital modulation technology, which using carrier Phase modulation technique information to express input signal. Under the condition of stability channel, phase shift keying compared with amplitude shift keying, frequency shift keying, not only has high noise resistance, but also can effectively use band, even in a phenomenon of fading and multipath channel also has a good effect [<xref ref-type="bibr" rid="scirp.66932-ref1">1</xref>]. Therefore, BPSK is a kind of excellent modulation method, and in medium and high speed data transmission has been widely applied. This paper is based on “CPU + GPU” heterogeneous platform, the real-time BPSK signal demodulation algorithm and the method based on CUDA parallel programs are researched. In view of the implementation, parallel programming test verify the feasibility of the system.</p></sec><sec id="s2"><title>2. BPSK Signal Demodulation Algorithm</title><p>By multiple BPSK signal is coherent demodulation method based on phase lock loop, such as square ring method, decision feedback method, Costas loop method, etc. The differential demodulation method which use adjacent element phase jump is also used [<xref ref-type="bibr" rid="scirp.66932-ref2">2</xref>]. Although differential demodulation does not need to obtain coherent carrier, the algorithm is relatively simple, but its anti-noise performance significantly worse in the coherent demodulation. As the GPU is widely used in signal processing, coherent demodulation which has excellent performance is easy to implement. Costas loop is the most widely used suppressed carrier tracking loop in engineering, literature [<xref ref-type="bibr" rid="scirp.66932-ref3">3</xref>] prove its track suppress carrier signal with low SNR is the best device, its structure as shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>.</p><p>The input BPSK modulation signal is [<xref ref-type="bibr" rid="scirp.66932-ref4">4</xref>]:</p><disp-formula id="scirp.66932-formula1"><label>(1)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/66932x5.png"  xlink:type="simple"/></disp-formula><p>Here, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/66932x6.png" xlink:type="simple"/></inline-formula>is digital modulation signals; <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/66932x7.png" xlink:type="simple"/></inline-formula>is carrier angular frequency. The local oscillator output respectively are:</p><disp-formula id="scirp.66932-formula2"><label>(2)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/66932x8.png"  xlink:type="simple"/></disp-formula><p>Here, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/66932x9.png" xlink:type="simple"/></inline-formula>is variable frequency signal produced by the local oscillator, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/66932x10.png" xlink:type="simple"/></inline-formula>and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/66932x11.png" xlink:type="simple"/></inline-formula> are reference phase. After under orthogonal frequency conversion, the output is:</p><disp-formula id="scirp.66932-formula3"><label>(3)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/66932x12.png"  xlink:type="simple"/></disp-formula><p>make<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/66932x13.png" xlink:type="simple"/></inline-formula>, then <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/66932x14.png" xlink:type="simple"/></inline-formula> is multiplication coefficient, after low pass filtering:</p><disp-formula id="scirp.66932-formula4"><label>(4)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/66932x15.png"  xlink:type="simple"/></disp-formula><p>Here, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/66932x16.png" xlink:type="simple"/></inline-formula>is low pass filter coefficient. The result after filtering, and the in-phase and orthogonal branch phase discrimination is:</p><fig id="fig1"  position="float"><label><xref ref-type="fig" rid="fig1">Figure 1</xref></label><caption><title> Costas loop structure</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/66932x17.png"/></fig><disp-formula id="scirp.66932-formula5"><label>(5)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/66932x18.png"  xlink:type="simple"/></disp-formula><p><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/66932x19.png" xlink:type="simple"/></inline-formula>is gain of phase discrimination, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/66932x19.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/66932x20.png" xlink:type="simple"/></inline-formula>is loop gain, the output of loop filter is error signal for tracking<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/66932x19.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/66932x20.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/66932x21.png" xlink:type="simple"/></inline-formula>.</p><p>According to the principle of coherent demodulation, extracted coherent carrier multiplied by the input of the modulated signal directly, and filtering the output, baseband signal waveform can be got (<xref ref-type="fig" rid="fig2">Figure 2</xref>).</p><p>And it can follow 25 KHZ dynamic Doppler (<xref ref-type="fig" rid="fig3">Figure 3</xref>).</p><fig id="fig2"  position="float"><label><xref ref-type="fig" rid="fig2">Figure 2</xref></label><caption><title> BPSK signals after demodulation</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/66932x22.png"/></fig><fig id="fig3"  position="float"><label><xref ref-type="fig" rid="fig3">Figure 3</xref></label><caption><title> Follow dynamic doppler</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/66932x23.png"/></fig></sec><sec id="s3"><title>3. The Parallel Computing Model Based on CUDA</title><sec id="s3_1"><title>3.1. CUDA</title><p>Launched by NVIDIA, CUDA is a kind of general parallel computing architecture, initial designed to speed up image real-time processing which run on the GPU development platform and full use of GPU’s high memory bandwidth and very large scale of floating point calculation unit. It can handle large parallel problems, especially large-scale floating point data computing [<xref ref-type="bibr" rid="scirp.66932-ref5">5</xref>]. CUDA hardware architecture as shown in <xref ref-type="fig" rid="fig4">Figure 4</xref>.</p><p>GPU is specially designed for the intensive and high parallelism computation, so calculation of the design will therefore more transistors used in data processing rather than data caching and flow control. In particular, the GPU is very suitable for processing the same program on multiple data parallel execution problem, so in CUDA platform is more suited for digital signal processing.</p></sec><sec id="s3_2"><title>3.2. Parallel Computing Model</title><p>Parallel computing is treated with multiple core to solve the problem at the same time. For digital signal processing which has a high requirement of real-time, parallel computing is the effective way to improve the real-time performance. Currently, the most widely used parallel computing model is a layered model which consists of three layers [<xref ref-type="bibr" rid="scirp.66932-ref6">6</xref>] [<xref ref-type="bibr" rid="scirp.66932-ref7">7</xref>].</p><p>Parallel Algorithm Design Layer: abstracted the calculation parameters of from different parallel computers, parallel algorithm design model is established, this layer mainly oriented algorithm researchers.</p><p>Parallel Programming Design Layer: according software and hardware interface, using parallel programming language programming to achieve specific parallel algorithm, this layer is mainly oriented program designers.</p><p>Parallel Program Execution Layer: under the system supports parallel machine compiler running target code, and the actual performance of the optimization procedure (<xref ref-type="fig" rid="fig5">Figure 5</xref>).</p><p>According to the GPU hardware design characteristics, CUDA in layer parallel algorithm design has made a more detailed. Model assumes that the CUDA thread in physically separate GPUs execute, GPU as host co- processor, adopt heterogeneous parallel mode, parallel computing program execute on GPU kernel, and the rest of the program execute on the CPU. And the research category of parallel program execution is a compiler, therefore, this paper mainly studies the parallel programming problem.</p></sec><sec id="s3_3"><title>3.3. Digital Communication Parallel Computing Model</title><p>Parallel algorithm is the core issue of parallel programming, and algorithm belongs to numerical parallel algorithm of digital communication system. Its design method is generally has two kinds: 1) direct parallelization of serial algorithm. Fully exploiting and utilization of the existing serial algorithm of parallelism, directly to the serial algorithm for parallel algorithm; 2) based on calculation and numerical calculation principle, does not take into account the corresponding serial algorithm, redesigned to parallel algorithm [<xref ref-type="bibr" rid="scirp.66932-ref8">8</xref>].</p><fig id="fig4"  position="float"><label><xref ref-type="fig" rid="fig4">Figure 4</xref></label><caption><title> CUDA Architecture</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/66932x24.png"/></fig><p>Digital communication system has a high modular degree and large amount of calculation which typical structure as shown in <xref ref-type="fig" rid="fig6">Figure 6</xref>.</p><p>Because GPU device cannot display, data needs to be interacted between memory and memory by PCIe bus. And restricted to general computer speed limit, in the large-scale numerical calculation, the data transmission time occupy most of the program execution time. <xref ref-type="fig" rid="fig7">Figure 7</xref> shows under different scale of data parallel computation time, the data size is small, transferred time almost occupied more than 99% of the program total execution time. Therefore, only when calculating the larger scale, to reflect the advantage of GPU computation.</p><p>According to this characteristic of CUDA platform, parallel computing model of digital communication system should try to reduce the data transmission, give full play to the GPU high-performance computing ability.</p><p>At the program beginning, the data need to be deal with should all transfer to memory of GPU. All the mass calculation performed by GPU. CPU and GPU in the process of program execution, only a small amount of data transmission, the CPU only run small calculation and data monitoring and display function (<xref ref-type="fig" rid="fig8">Figure 8</xref>).</p></sec></sec><sec id="s4"><title>4. BPSK Signal Demodulation Parallel Programming</title><sec id="s4_1"><title>4.1. BPSK Signal Demodulation Algorithm Structure</title><p>According to Section 3.3 of the parallel computing model and Costas loop demodulation structure, parallel BPSK demodulation algorithm are shown in <xref ref-type="fig" rid="fig9">Figure 9</xref>.</p><p>Intermediate frequency sampling data read and transferred by CPU to the GPU, completed the functions of digital orthogonal frequency conversion, low-pass filtering, bit synchronization, phase detector, loop filter and decoding in the GPU. The phase error signal filtered by loop filter transfer back to CPU to compute doppler</p><fig id="fig5"  position="float"><label><xref ref-type="fig" rid="fig5">Figure 5</xref></label><caption><title> Parallel computing model</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/66932x25.png"/></fig><fig id="fig6"  position="float"><label><xref ref-type="fig" rid="fig6">Figure 6</xref></label><caption><title> Digital communication model</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/66932x26.png"/></fig><fig id="fig7"  position="float"><label><xref ref-type="fig" rid="fig7">Figure 7</xref></label><caption><title> Computing time compared with transmission time</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/66932x27.png"/></fig><fig id="fig8"  position="float"><label><xref ref-type="fig" rid="fig8">Figure 8</xref></label><caption><title> Parallel computing model of digital communication</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/66932x28.png"/></fig><fig id="fig9"  position="float"><label><xref ref-type="fig" rid="fig9">Figure 9</xref></label><caption><title> Parallel computing model of BPSK single demodulation</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/66932x29.png"/></fig><p>frequency shift. Then the doppler frequency shift transfer to the GPU again to correct the output sine and cosine waveform produced by NCO. Lastly, the data decoded by GPU transfer back to the host and statistical BER.</p></sec><sec id="s4_2"><title>4.2. The Mixer Design</title><p>Mixer convert the signal from the intermediate frequency to fundamental frequency, which is the core of the software defined radio. Numerical control oscillator (NCO) is usually used to produce local hardware digital carrier for mixing. When programming parallel mixing programme, the corresponding data points with the corresponding phase of the sine and cosine waveform sampling points to do multiplication, application pseudo code is as follows:</p><disp-formula id="scirp.66932-formula6"><graphic  xlink:href="http://html.scirp.org/file/66932x30.png"  xlink:type="simple"/></disp-formula></sec><sec id="s4_3"><title>4.3. The FIR Filter Design</title><p>FIR filter is widely used for its good group delay in the digital communication system, it can ensure any amplitude frequency characteristics of strict linear phase frequency characteristics at the same time. It has a finite impulse response at the same time. Finite length for M FIR filter transfer function for:</p><disp-formula id="scirp.66932-formula7"><label>(6)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/66932x31.png"  xlink:type="simple"/></disp-formula><p>In the time domain, the limited impulse to the corresponding input and output</p><disp-formula id="scirp.66932-formula8"><label>(7)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/66932x32.png"  xlink:type="simple"/></disp-formula><p>The parallel filter application pseudo code is as follows:</p><disp-formula id="scirp.66932-formula9"><graphic  xlink:href="http://html.scirp.org/file/66932x33.png"  xlink:type="simple"/></disp-formula></sec><sec id="s4_4"><title>4.4. The Phase Discriminator Design</title><p>Phase discriminator is mainly done to identify the function of the input signal is differ, is the key to the phase lock loop (PLL), in parallel programming, rely mainly on solving the sample point difference before and after, application pseudo code is as follows:</p><disp-formula id="scirp.66932-formula10"><graphic  xlink:href="http://html.scirp.org/file/66932x34.png"  xlink:type="simple"/></disp-formula></sec></sec><sec id="s5"><title>5. Conclusion</title><p>Test hardware platform selected Tesla K20 graphics. The size of input data is 1 ms analog data. The test computation time is within 1.7 ms, as shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>0, the program can correct demodulation of the original data, BER statistics as shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>1.</p><fig id="fig10"  position="float"><label><xref ref-type="fig" rid="fig1">Figure 1</xref>0</label><caption><title> Signals after GPU demodulation</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/66932x35.png"/></fig><fig id="fig11"  position="float"><label><xref ref-type="fig" rid="fig1">Figure 1</xref>1</label><caption><title> BER statistics</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/66932x36.png"/></fig><p>Realizing BPSK signal demodulation on general computer platform, reducing the difficulty of system design, development and cost. And the software of processing way increasing the flexibility of the system by loading different software can realize more functions. Through hardware upgrades and reorganization, the system performance can be further improved [<xref ref-type="bibr" rid="scirp.66932-ref9">9</xref>]-[<xref ref-type="bibr" rid="scirp.66932-ref11">11</xref>]. Based on general computer platform, especially the digital signal processing based on CUDA is an important development direction of the signal processing, but also a new trend of computer application and new research areas.</p></sec><sec id="s6"><title>Cite this paper</title><p>Yandu Liu,Baoling Zhang,Haixin Zheng, (2016) Parallel Programming Design of BPSK Signal Demodulation Based on CUDA. International Journal of Communications, Network and System Sciences,09,126-134. doi: 10.4236/ijcns.2016.95011</p></sec></body><back><ref-list><title>References</title><ref id="scirp.66932-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Vaudtabatgabrn, P.P. (1990) Multirate Digital Filters, Filter Banks, Polyphase Networks, and Applications. Proceedings of the IEEE, 78, 56-93</mixed-citation></ref><ref id="scirp.66932-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Bose, V.G. and Morris, R. (2001) Dynamic Physical Layers for Wireless Networks Using Software Radio. International Conference on Acoustics, Speech, and Signal Processing, Salt Lake City, UT May 2001.  
http://dx.doi.org/10.1109/icassp.2001.940393</mixed-citation></ref><ref id="scirp.66932-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Bose, V.G. (1999) Design and Implementation of Software Radios Using a General Purpose Processor. Ph.D. Thesis, Massachusetts Institute of Technology.</mixed-citation></ref><ref id="scirp.66932-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Chen, Y., Wang, Y.Q. and Liu, Y. (2011) Research on the Technology of Software Space TTC System Based on Computer Platform. The Measurement and Control Technology, 30.</mixed-citation></ref><ref id="scirp.66932-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Chen, G.L., Sun, G.Z., Xu, Y. and Lu, M. (2008) Methodology of Research on Parallel Algorithms. Chinese Journal of Computers, 31.</mixed-citation></ref><ref id="scirp.66932-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Sankaralingam, K., Keckler, S.W., Mark, W.R. and Burger, D. Universal Mechanisms for Data-Parallel Architectures. 36th Annual International Symposium on Microarchitec-ture.</mixed-citation></ref><ref id="scirp.66932-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">NVIDIA CUDA Programming Guide 5.0. http://www.nvidia.com/object/cuda_Develop.html</mixed-citation></ref><ref id="scirp.66932-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Mitra, S.K. (2001) Digital Signal Processing, A Computer-Based Approach. 2nd Edition, MeGraw-Hill Companies, Inc.</mixed-citation></ref><ref id="scirp.66932-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">LI., G.X., An, Z.Q. and Yuan, S.J. (2008) Study on Software Demodulation of DQPSK Signal Based on Digital Phase Measurement. Journal of Spacecraft TT&amp;C Technology, 27.</mixed-citation></ref><ref id="scirp.66932-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Core, M.T. and Tan, H.H. (2002) BER for Optical Heterodyne DPSK Receivers Using Delay Demodulation and Integration Detection. IEEE Transactions on Communications, 50.</mixed-citation></ref><ref id="scirp.66932-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Riter, S. (1969) An Optimum Phase Reference Detector for Fully Modulated Phase Shift Keyed Signal. IEEE AES-5, 4.</mixed-citation></ref></ref-list></back></article>