Implementation of the Viterbi Algorithm Using Functional Programming Languages
暂无分享,去创建一个
In this paper, we present an implementation of the Viterbi algorithm using the functional programming language Haskell. We begin with a description of the functional implementation of the algorithm. Included are aspects of functional programming that must be considered when implementing the Viterbi algorithm as well as properties of Haskell that can be used to simplify or optimize the algorithm. Finally, we evaluate the performance of the Viterbi algorithm implemented in Haskell. INTRODUCTION Forward error correction(FEC) codes allow a receiver to correct errors in a received bit sequence by introducing parity bits into the transmitted signal. FEC codes are commonly used in wireless communications but have not yet been fielded in the telemetry world. However, FEC codes offer benefits to the telemetry world including the ability to provide reliable communication at very low signal-to-noise ratios. Additionally, FEC codes have already taken a role in the migration from serial streaming telemetry (SST) to integrated Network Enhanced Telemetry (iNet). Future communication systems will used trellis-based demodulators that will require an FEC decoder. This paper focuses on one type of FEC code: convolutional codes (CC). Specifically, we focus on the Viterbi algorithm, a decoding algorithm for convolutional codes [1, Ch 12]. This paper is the first step in a larger project, to implement the CC decoder on field-programmable gate array (FPGA) hardware. Traditionally, a software model is first implemented in an imperative programming language such as MATLAB or C++. This model can later be used for equivalence checking with the hardware implementation. However, in general none of the coding done on the software model is reuseable in the hardware implementation. The hardware implementation is generally written in a hardware description language such as VHDL1, which is very different syntactically and semantically from an ordinary programming language. In this paper, we discuss a Viterbi algorithm implementation in the functional programming language, Haskell. Functional programming languages offer many benefits over imperative languages like C or MATLAB. Functions in Haskell are more like mathematical expressions than a list of steps for the computer to iterate through. Additionally, functions can be passed as arguments very easily and neatly. These 1VHSIC (Very High Speed Integrated Circuits) hardware description language
[1] Peyton Jones,et al. Haskell 98 language and libraries : the revised report , 2003 .
[2] Mary Sheeran,et al. Lava: hardware design in Haskell , 1998, ICFP '98.
[3] Koen Claessen,et al. QuickCheck: a lightweight tool for random testing of Haskell programs , 2011, SIGP.
[4] Shu Lin,et al. Error Control Coding , 2004 .
[5] T. Moon. Error Correction Coding: Mathematical Methods and Algorithms , 2005 .