5
Abstract BPSK modulation is widely used approach in industrial telemetry systems for digital communication over noisy channels due to inherent high noise immunity and low bit-error rate (BER). The most critical part of the BPSK modem implementation in a programmable digital system is the design of demodulator part. We studied characteristics and trade-offs for two commonly used approaches to the BPSK demodulator implementation, which are both suitable for efficient field-programmable gate array (FPGA) implementation: the incoherent BPSK demodulator, based on the complex product demodulation, and the coherent BPSK demodulator, based on the carrier synchronization using internal phase-lock loop (PLL) (Costas Loop) and numerically controlled oscillator (NCO). We employed correlation filter and integrator for symbol synchronization. We compared overall characteristics for both approaches, in terms of robustness in noisy environments and FPGA implementation complexity. Index Terms — telemetry systems, BPSK modulation, coherent /incoherent demodulation, symbol synchronization I. INTRODUCTION The motivation for our research was to develop the customized digital communication system whose main purpose is to provide means for power-line communication (PLC) over the DC power supply lines. The solution for this problem can be easily adapted to other similar applications, whenever a telemetry system needs to communicate over the noisy channel with AC coupling. An efficient DC power-line communication system with similar goals was previously developed at MIT [1]. The physical communication layer is based on the BPSK (Binary Phase Shift Keying) modulation principle, which exhibits relatively low BER under low SNR conditions [2]. Two well-known demodulation procedures were investigated, namely coherent and incoherent BPSK demodulation. For each demodulation approach the accompanying algorithms suitable for the efficient FPGA implementation were developed. The incoherent demodulation algorithm offers very simple FPGA implementation, while the coherent demodulation approach results in better overall characteristics, but with a price of more complex design implementation. The incoherent approach solves the problem by employing the straightforward complex product demodulation mathematical procedure. The FPGA usage for such implementation is significantly lower comparing to the more complex coherent approach, because the process of coherent demodulation includes a carrier synchronization with the internal phase-lock loop (PLL) (Costas loop) and numerically controlled oscillator (NCO). Although the theory describing the operating principles of both demodulators is well known, there are many practical difficulties which arise in practical implementation of mathematical formulas in the FPGA hardware. One possible solution for design and implementation of Costas loop in FPGA technology was developed in [3]. Other approach by using CIC decimator is described in [4]. Some solutions use DSP controllers for target hardware, as in [5]. There are also numerous SoC solutions for implementation of Costas loop, as in [6]. The goal of our research was to develop a working solution for PLC over the DC lines, suitable for a direct FPGA implementation. The main problem that we encountered was the lack of quality documentation and literature which describes all important steps for an efficient BPSK modem implementation in FPGA. We also developed our preamble detection correlation method. We shall first present mathematical background for both approaches, then elaborate our FPGA implementation and provide simulations results where we compare the overall characteristics of both approaches, in terms of the robustness in noisy environments and the FPGA implementation complexity. II. BPSK MODEM MODEL In this section we present the theoretical background, and BPSK modem models, which are necessary to understand the operating principles behind our proposed solutions. The brief overview of both approaches is presented, while the further mathematical details behind each operating principle could be found in relevant references. A. Coherent demodulation 1) Carrier synchronization The first step in the coherent BPSK demodulator implementation is to establish the method for carrier synchronization. To achieve that it is necessary to generate an auxiliary signal with the same phase as the carrier. The carrier synchronization process is based on the Costas loop [2]. Costas loop is a type of the phase locked loop (PLL) that enables a proper phase locking when the modulation signal FPGA Implementation of BPSK Modem for Telemetry Systems Operating in Noisy Environments Pero Krivić, Goran Štimac University of Zagreb, Faculty of electrical engineering and computing, 2011 1727 MIPRO 2011, May 23-27, 2011, Opatija, Croatia

05967341

Embed Size (px)

Citation preview

Page 1: 05967341

Abstract — BPSK modulation is widely used approach in industrial telemetry systems for digital communication over noisy channels due to inherent high noise immunity and low bit-error rate (BER). The most critical part of the BPSK modem implementation in a programmable digital system is the design of demodulator part. We studied characteristics and trade-offs for two commonly used approaches to the BPSK demodulator implementation, which are both suitable for efficient field-programmable gate array (FPGA) implementation: the incoherent BPSK demodulator, based on the complex product demodulation, and the coherent BPSK demodulator, based on the carrier synchronization using internal phase-lock loop (PLL) (Costas Loop) and numerically controlled oscillator (NCO). We employed correlation filter and integrator for symbol synchronization. We compared overall characteristics for both approaches, in terms of robustness in noisy environments and FPGA implementation complexity.

Index Terms — telemetry systems, BPSK modulation, coherent /incoherent demodulation, symbol synchronization

I. INTRODUCTION

The motivation for our research was to develop the customized digital communication system whose main purpose is to provide means for power-line communication (PLC) over the DC power supply lines. The solution for this problem can be easily adapted to other similar applications, whenever a telemetry system needs to communicate over the noisy channel with AC coupling. An efficient DC power-line communication system with similar goals was previously developed at MIT [1].

The physical communication layer is based on the BPSK (Binary Phase Shift Keying) modulation principle, which exhibits relatively low BER under low SNR conditions [2]. Two well-known demodulation procedures were investigated, namely coherent and incoherent BPSK demodulation. For each demodulation approach the accompanying algorithms suitable for the efficient FPGA implementation were developed. The incoherent demodulation algorithm offers very simple FPGA implementation, while the coherent demodulation approach results in better overall characteristics, but with a price of more complex design implementation. The incoherent approach solves the problem by employing the straightforward complex product demodulation mathematical

procedure. The FPGA usage for such implementation is significantly lower comparing to the more complex coherent approach, because the process of coherent demodulation includes a carrier synchronization with the internal phase-lock loop (PLL) (Costas loop) and numerically controlled oscillator (NCO).

Although the theory describing the operating principles of both demodulators is well known, there are many practical difficulties which arise in practical implementation of mathematical formulas in the FPGA hardware. One possible solution for design and implementation of Costas loop in FPGA technology was developed in [3]. Other approach by using CIC decimator is described in [4]. Some solutions use DSP controllers for target hardware, as in [5]. There are also numerous SoC solutions for implementation of Costas loop, as in [6].

The goal of our research was to develop a working solution for PLC over the DC lines, suitable for a direct FPGA implementation. The main problem that we encountered was the lack of quality documentation and literature which describes all important steps for an efficient BPSK modem implementation in FPGA. We also developed our preamble detection correlation method. We shall first present mathematical background for both approaches, then elaborate our FPGA implementation and provide simulations results where we compare the overall characteristics of both approaches, in terms of the robustness in noisy environments and the FPGA implementation complexity.

II. BPSK MODEM MODEL

In this section we present the theoretical background, and BPSK modem models, which are necessary to understand the operating principles behind our proposed solutions. The brief overview of both approaches is presented, while the further mathematical details behind each operating principle could be found in relevant references.

A. Coherent demodulation

1) Carrier synchronization

The first step in the coherent BPSK demodulator implementation is to establish the method for carrier synchronization. To achieve that it is necessary to generate an auxiliary signal with the same phase as the carrier. The carrier synchronization process is based on the Costas loop [2]. Costas loop is a type of the phase locked loop (PLL) that enables a proper phase locking when the modulation signal

FPGA Implementation of BPSK Modem for Telemetry Systems Operating in Noisy Environments

Pero Krivić, Goran Štimac University of Zagreb, Faculty of electrical engineering and computing, 2011

1727

MIPRO 2011, May 23-27, 2011, Opatija, Croatia

Page 2: 05967341

changes its polarity. The block diagram describing the Costas loop is given in Fig. 1 while the more elaborated description of this method is given in [2] and [8].

The goal of the Costas loop is to extract the demodulated signal at the “in-phase” branch of the loop. The numerically controlled oscillator must generate a sine signal in phase with the input signal to achieve that goal. NCO can be implemented in FPGA using direct digital synthesis (DDS) approach. NCO is controlled via feedback over the loop filter. After multiplying the input signal and the signals from the NCO in I and Q branches, and low-pass filtering the result signal in both branches, there is a signal dependent on the phase difference between the input and the NCO signal. By multiplying filtered signals in I and Q branch, the phase difference is doubled (that is why the multiplier on the right is called phase doubler) and the obtained error signal is used to control the oscillator. The proper design of the loop filter in the feedback of the Costas loop is crucial for success of the demodulation, as discussed in [9]. In this application, we developed the loop filter as a zero-order filter (gain block). Value for this filter gain is determined by examining the complete system stability in z-domain, as described in [9].

2) Symbol synchronization

The output of the PLL is a demodulated signal, with noisy non-return-to-zero (NRZ) waveform. It is necessary to slice and extract data bits from that signal in order to decode the actual data payload contained in the received message. This can be difficult task in the presence of large noise and the impulse disturbances that could be encountered in noisy industrial environments. The procedure which ensures the accurate reading of the message bits is called the symbol synchronization.

Demodulated signal from the Costas loop is taken to the input of the next block – Integrate & Dump (I & D). This block behaves as an ordinary integrator, but has a possibility to reset itself. The purpose of the reset is to set an integrator value to the zero at the moments of bit transition. A bit value is then easily determined, inquiring the prefix of the accumulated sum in the integrator, as shown in Fig 2. However, hitting the reset time is a complex process and in fact it is the very essence of the symbol synchronization algorithm. In our solution we employ the correlation to

estimate the time instant when integrator should be reset. The correlation of I & D signal and correlator impulse response is observed, and at the point of the maximum correlation, we can start a bit slicing. The maximum is a consequence of the pre-determined preamble of the NRZ signal which carries the useful message.

Fig. 2: The output of the „Integrate and dump“ block

The model of the complete receiver (demodulator, integrator and correlator) was tested and simulated with Matlab, using the Fixed-Point Toolbox. The simulation results in Matlab confirmed expectations of theoretical model, as described further in section IV.

B. Incoherent demodulation

The incoherent demodulator was implemented by employing the complex product demodulation principle. The received modulated signal Uul (1)

(1)

is multiplied by a complex exponential Uc (2)

(2)

with the same frequency as the carrier. The phase difference between these two signals is unknown beforehand. U1 (3) is product from multiplying Uul and Uc .

(3)

From the resulting signal U1 high frequencies components are removed by means of low-pass filtering. The absolute value (5) of the remaining low-frequency component (4) (4) �

(5) �

is calculated to recover the original signal U.

Fig. 1: The Costas loop block diagram

1728

Page 3: 05967341

The behavior of the described incoherent demodulator model was simulated in Matlab. Unwanted transition glitches at the bit boundaries, which manifest as an oscillation, were spotted and corrected by means of low-pass filtering. The simulation revealed that the third order low-pass filter is enough for this purpose. The simulated model gives BER less than 0.1 in the environment with SNR higher than 5 dB. Due to the fact that non-linear distortion does not disturb the system because a binary signal is used, square root method was not implemented to simplify hardware implementation. The incoherent demodulator model is depicted in Fig. 3.

Fig. 3: Complex product demodulator block diagram

The Manchester coding for signal was used to keep the model implementation as simple as possible, especially for symbol synchronization task. The preamble detection was achieved by using the simplified correlation filter which is described in III. Two periods of the carrier signal were used to transfer one data bit.

III. FPGA IMPLEMENTATION

We developed VHDL modules for implementation of both coherent and incoherent receiver, corresponding to the block diagrams in Fig. 4 and Fig. 5, in the target FPGA hardware. The models were adapted for the implementation in Spartan 3A family. The core of the starter kit board is Xilinx XC3S700A integrated circuit. Beside the denoted FPGA chip, three more components were necessary to complete the realization of the receivers: analog-to-digital converter (ADC), digital-to-analog converter (DAC) and programmable-gain amplifier (PGA). These components are connected to the FPGA chip through the SPI bus interface. More details about the starter kit board “Spartan 3A development kit” are available in [10] and [11].

Fig. 4: Block diagram of the cohorent receiver

The first step in practical implementation of proposed demodulators was to ensure the proper data acquisition of the received modulated signal. A/D and D/A conversions, and PGA gain programming, were obtained by using the finite state machine. Due to the fact that ADC uses a 34-cycle communication sequence and that the main clock frequency is 50 MHz, sampling rate could not be higher than 1.47 MHz.

Fig. 5: Block diagram of the incoherent receiver

The incoherent demodulator process the acquired ADC samples through several blocks, as shown in Fig. 3. For creating I-Q signals, 18x18 multipliers from FPGA chip were used together with numerically-controlled oscillator, described in [13]. This component uses a look-up table stored in the internal block RAM to generate sine and cosine signal. Amplitude resolution is adjusted to 12 bits. Quality of discrete sinusoidal wave is measured with Spurious Free Dynamic Range (SFDR) which was evaluated with 80 dBc. The 14-bit products were filtered using third order low-pass FIR filters in order to eliminate the images from the mixing. After using squaring method on I and Q signals and adding them together, moving average filter is used to remove undesirable oscillations. Moving average filter is built as shift register with adder on each spot. Its output is 15-bit demodulated signal.

To retrieve the original message from the demodulated signal, few more VHDL modules are necessary. The finite state machine is the core element for bit synchronization. Logic transition is often used as a help to reconstruct a synchronizing clock. It is important to detect inter-bit transition and not between-bit transition (which occurs at 0-0 and 1-1 pairs). This is accomplished with FSM state where the transition detection is forbidden. This state needs to last more than a half bit and less than a whole bit duration. Transitions are detected with simple derivation logic. Last element is preamble detecting module (Fig. 6). It compares internally stored preamble with bit stream in shift register and looks for maximum (with adjustable threshold), it works as correlation filter. When control logic detects preamble, output buffer is enabled, otherwise it is in high impedance state.

For coherent procedure similar VHDL modules were used, with difference in stricter demands on filters and NCO. Therefore NCO from [12] with 16 bit amplitude resolution was used, and it provided 120 dBc SFDR. A FIR filter used in a Costas loop is of fourth order.

1729

Page 4: 05967341

Fig. 6: Preamble detector in incoherent procedure

IV. RESULTS

In this section, the simulation results for both coherent and incoherent procedure are presented. For the coherent procedure, it is necessary to examine the stability criteria of Costas loop first. One must be sure that the loop filter keeps the NCO in a desired working area. For the 1st order Costas loop, like the one that was used in this work, the working area is defined around the fixed frequency with no larger shifts allowed. We show a stable behavior of the loop through a decay of an error signal (Fig. 7). Error signal, as described in section II. A., is the output of the phase doubler, and the input to the loop filter. As we can see from the Fig. 7, the error signal decays to zero, indicating the stability of Costas loop.

Fig. 7: Error signal at the output of a phase doubler

As a response to a BPSK signal at the input of a receiver, A demodulated signal is provided at the output of In-phase branch of the loop. One example of the demodulated signal is given in Fig. 8. Light oscillations, visible in the figure, here are due to two reasons: added noise in transmission channel and finite attenuation of component on doubled carrier frequency in a FIR filter.

Fig. 8: Demodulated BPSK signal at the output of the Costas loop.

These results are a confirmation of a demodulator’s correct work. Symbol synchronization circuit was tested under conditions of different SNR, bit length, preamble shape and carrier frequency. Finally, a compromise is achieved regarding discussion in V. The system is able to recognize sent message of length up to 100 bits without breaking synchronization. Also, with some set ups, modulation signal with SNR less than -8 dB is possible to recover. Incoherent procedure is much simpler, therefore it needs less hardware resources then coherent one, less hardware resources imply lower power consumption which is often very important element in hardware design. This incoherent procedure can recover message with at least 5 dB SNR with acceptable BER (less than 0.1) . BER is calculated as a function of SNR with a fixed parameter of symbol length. As a discussed in a section IV, symbol length in BPSK communication has a great impact on an accuracy of a message recognition. BER calculations under different symbol lengths are presented in a Fig. 9 and in a Fig. 10 for incoherent procedure. Symbol length is expressed as a number of carrier periods per symbol. Simulation results are in accordance with theoretical expectations described in [2].

Fig. 9: Bit-error rate with change in parameter symbol length expressed as a number of carrier periods for coherent procedure

-10 0 10 20 30 40 50-11

-10

-9

-8

-7

-6

-5

-4

-3

-2

-1

SNR [dB]

BE

R [1

0y ]

symbol length: 10symbol length: 20

1730

Page 5: 05967341

Fig. 10: Bit-error rate with change in parameter syexpressed as a number of carrier periods for incoh

V. CONCLUSION

The idea of our work was to develop efficient BPSK transmission optimized implementation. Especially important comproject was an adequate simulation or mathedescribe the actual process of exchanging infotwo or more nodes, as well as the implemhardware itself. For the theoretical study andused Matlab R2009b © and for implemendevelopment interface and software tool Xilin

Regarding simulation results presented incan derive these conclusions: it is possibcoherent demodulation with symbol synchronto establish an effective physical layer of abased on BPSK procedure. As it is known, unSNR conditions, different efficiency, seen ratio, is achieved. In this work, we showed hoacceptable BER can be shifted towards loweModifying symbol length, we can control arecognition. With proper preamble wavefordesign, it is possible to increase communicathighly noised environment. Probability of incis extremely reduced if we adapt parametlength and preamble shape to the noise leveDoing that, we directly reconfigure preferencfilter and maximum trigger level. In a caselevels, enlargement of symbol length performances of a communication. Traenlargement is loss in a transmission speedconclusions we can claim that speed is reverto the quality of communication.

ymbol length herent procedure

an algorithm of for a FPGA

mponent of this ematical model to ormation between mentation of thed simulation was

ntation Spartan 3 nx ISE 9.2i. n section IV., we ble to design a

nization processes a communication nder the different through bit-error ow a border of an er levels of SNR. a success of a bit rm and correlator tion efficiency in correct bit slicing ters like symbol el in the channel. ces of correlation e of higher noise

enchants BER ade off to the d. As one of the rsely proportional

REFERENCE

[1] Wade, E. R., DC powerline cTransmission Line Transformer Application, MIT, 2000

[2] Haykin, S., Communication Syste

[3] Yuan, H., Hu, X., Huang, J., DesiLoop Based on FPGA, IEEE

[4] Roddewig, M., Zekavat, S. A., NLoop Down Converter, IEEE

[5] Power Line Communication foBPSK with a Single DSP ContrInstruments, 2006.

[6] Digital Costas Loop HSP50210, D

[7] R. E. Best, Phase-Locked Loops, M

[8] D.H. Wolaver, Phase-Locked Circ

[9] Hagemann E., Costas Loop, 2001

[10] Spartan-3A Start Kit Board User G

[11] Spartan 3A/3AN Starter Kir Board

[12] Dodig I., Power Line Communica

[13] Molnar G., FPGA implemenoscilatora, Zagreb, 2007.

ES

communication System using a for High Degree of Freedom

ems, 4th edition, 2001.

ign and Implementation of Costas

Nooshabadi, S., Design of a Costas

or Lighting Applications Using roller, Application Report, Texas

Datasheet, Intersil, 2008.

McGraw-Hill

cuit Design, Prentice Hall, 1991.

Guide, 2007

d Schematic, 2007

ation, 2009.

ntacija numerički upravljanog

1731