Keywords

1.1 Bluetooth History

A Bluetooth device uses radio waves instead of wires or cables to connect to a phone or computer. A Bluetooth product, like a headset or watch, contains a tiny computer chip with a Bluetooth radio and software that makes it easy to connect. When two Bluetooth devices want to talk to each other, they need to pair. Communication between Bluetooth devices happens over short-range, ad hoc networks known as piconets. A piconet is a network of devices connected using Bluetooth technology [1]. When a network is established, one device takes the role of the master while all the other devices act as slaves. Piconets are established dynamically and automatically as Bluetooth devices enter and leave radio proximity [2,3,4]. Piconet is basic structure of Bluetooth communications that consists of a master device and at most 7 slave devices. Usually, a device with the least computation power is selected as master device and the others are selected as slave devices [5, 6].

One of the disadvantages of the original version of Bluetooth in some applications was that the data rate was not sufficiently high, especially when compared to other wireless technologies such as 802.11. In November 2004, a new version of Bluetooth, known as Bluetooth 2.0 was ratified. This not only gives an enhanced data rate but also offers other improvements as well [7, 8].

Bluetooth 5.0 is the latest version of the Bluetooth wireless communication standard. It is fully optimized for IoT [9,10,11,12,13]. It’s commonly used for wireless headphones and other audio hardware, as well as wireless keyboards, mice, and game controllers. Bluetooth is also used for communication between various smart home and Internet of Things (IoT) devices. Bluetooth 5.0 offers twice the data transfer speed of the previous version, Bluetooth 4.2 while increasing the capacity of data broadcasts by 800% [14, 15]. With Bluetooth 5.0 you can send and receive much more data much more quickly. The new standard is effective over four times the range of Bluetooth 4.2, which will come in particularly useful for things like portable speakers. In January 2019, Bluetooth Special Interest Group (SIG) released a new standard, Bluetooth 5.1 [16]. One of their new main features in this standard is the ability to detect the direction from which a Bluetooth signal is coming from, and claim they can estimate the direction with high accuracy. Previously standards have only had the feature for positioning by measuring the signal strength for distance. One method in version 5.1 is Angle of Arrival, it is a method that requires an antenna array with multiple antennas. The name of the Bluetooth standard originates from the Danish king Harald Blatand who was king of Denmark between 940 and 981 AD. His name translates as “Blue Tooth” and this was used as his nickname. A brave warrior, his main achievement was that of uniting Denmark under the banner of Christianity, and then uniting it with Norway that he had conquered. The Bluetooth standard was named after him because Bluetooth endeavors to unite personal computing and telecommunications devices [17,18,19,20].

1.2 Bluetooth Applications

Bluetooth has a wide range of application. The most common and expected applications will be described in this section. The Bluetooth security model includes the following processes namely pairing, passkey generation, device authentication, message verification. Bluetooth technology is considered as one of the most reliable and secure wireless connection. Bluetooth applications and the corresponding topology are shown in Table 1.1. There are billions of Bluetooth devices in use today. These devices are exposed to different types of threats. Bluetooth security solutions need to constantly evolve to mitigate emerging threats. Similar to any other wireless communication systems, Bluetooth transmissions can be deliberately jammed or intercepted. False or modified information can be passed to the devices by malicious users [21].

Table 1.1 Bluetooth applications and the corresponding topology

1.2.1 Handheld Devices

All information stored in a handheld device will be accessible from other Bluetooth enabled devices without connecting them by cable; of course it’s also possible to exchange information from the other devices with a handheld. In this way it’s possible to synchronize an agenda, phonebook, contact list, calendar and to-do list for all devices in a home or office environment. Connecting a PDA to a mobile phone will enable somebody to synchronize all data even if one isn’t in the office. Furthermore there is no worry that the file transfer will go wrong when you move on of your devices because there no requirement of line-of-sight.

1.2.2 Wire-Bound Connections

It’s possible to connect a Bluetooth device to a wire-bound connection like: PTSN, ISDN, LAN or XDSL. This can be done with an access point.

1.2.3 Headsets

A Bluetooth headset enables someone to answer automatically his incoming calls, initiate a voice-activated dial-up and end a call on a mobile phone which of course is also Bluetooth enabled. But the headset can also be used on other Bluetooth enabled devices like a laptop. It even can be used to playback audio because a headset like this has very high sound quality.

1.2.4 Internet Access

Bluetooth is capable of connecting computers and handhelds with mobile phones and with wire-bound connections so connection to the Internet is very easy.

1.2.5 Localization

Localization has been recognized as one of the most important topics in wireless sensor networks (WSNs), where sensor nodes can be scattered randomly over a region and can get connected into a network. From the market for location services based on IoT, one can choose from the following main technologies: (1) Bluetooth Low Energy (BLE), (2) UWB (ultra-wide band) , (3) Radio Frequency Identification. (RFID). When compared to other technologies, BLE provides a fully wireless hardware solution that is autonomous in terms of power source [22, 23].

1.3 Bluetooth Cores and Layers

There are many cores of Bluetooth; Bluetooth1.1 which is the basic data rate (1Mps) till Bluetooth 5.0 which has four rates. Table 1.2 provides an overview of the Bluetooth cores as shown below [1, 7]. The classic version of Bluetooth 5 is identical to the previous versions, while the significant innovations focus on the BLE version. It is clear that the new standard has been designed to create a communication network that ensures, over a short distance, a communication bandwidth that allows data exchange among the connected appliances and other smart devices of the IoT [24, 25]. Bluetooth low-energy (BLE) standard as a strong candidate to be the backbone of wireless IoT devices and support their low-power requirements [16, 26,27,28,29,30,31,32,33]. Table 1.3 shows an overview for the Bluetooth evolution.

Table 1.2 Bluetooth cores and transmission rates
Table 1.3 Bluetooth Evolution

The hardware level specification for the Bluetooth standard consists of four layers; the Radio layer, Baseband layer, Link Manager Protocol layer, and the Host Controller Interface layer [34, 35].

The Physical Layer is responsible for the electrical specification of the communication device, including modulation and channel coding. In the Bluetooth system this is covered by the Radio and part of the Baseband. The Radio is the lowest layer. Its interface specification defines the characteristics of the radio front end, frequency bands, channel arrangements, permissible transmit power levels, receiver sensitivity level, frequency hopping technique to avoid interference with other users in the ISM band from microwave oven to WI-FI as the transmission remains only in a given frequency for a short time, the standard uses a hopping rate of 1600 hops per second, these hops are spread over 79 fixed frequencies and they are chosen in a pseudo-random sequence, the fixed frequencies occur at 2400 + n MHz where the value of n varies from 1 to 79 where this gives frequencies of 2402, 2404 … .. 2480 MHz.

The next layer is the Baseband , which carries out Bluetooth’s physical (PHY) and media access control (MAC) processing. This includes tasks such as device discovery, link formation, and synchronous and asynchronous communication with peer. Moreover, Bluetooth is unique in offering the front-end RF processing integrated with the baseband module. In this way, on-chip integration lowers the cost of the network interface and the small size makes it easy to embed Bluetooth chips in devices such as cell phones and PDAs.

Bluetooth peers must exchange several control messages for the purpose of configuring and managing the baseband connections. These message definitions are part of the link manager protocol (LMP).

The host controller interface (HCI) layer is implemented in Software and provides a command interface to the baseband controller and link manager, and access to hardware status and control registers.

Bluetooth data is transmitted as packets that have a standard format which consists of four elements:

  1. (a)

    The Access Code which is used by the receiving device to recognize the incoming Transmission

  2. (b)

    The Header which describes the packet type and its length.

  3. (c)

    The Payload which is the data that is required to be carried.

  4. (d)

    The Inter-Packet Guard Band which is required between transmissions to ensure that transmissions from two sources do not collide, and to enable the receiver to retune.

The important difference between the basic rate Bluetooth packet and the enhanced rate Bluetooth packet is that modulation scheme is changed within a high rate as basic rate specifications supports only binary modulation where the enhanced rate Bluetooth packet is M-ary modulated (π /4DPSK for 2 Mbps data rate, 8DPSK for 3 Mbps data rate) as shown in Table 1.4.

Table 1.4 Bluetooth modulation scheme

1.4 Transmitter Fundamentals

A simple block diagram of a digital communication transmitter is shown in Fig. 1.1 [36].

Fig. 1.1
figure 1

Digital communication transmitter

1.4.1 Mapping

For the first step in the modulation the digital data must be encoded into in-phase and quadrature phase (I,Q) signals. The following encoding schemes are used.

1.4.1.1 GFSK

Binary frequency shift keying (BFSK) is also known as Gaussian frequency shift keying (GFSK) in the terms of the Bluetooth application. No encoding schemes are used in BFSK modulation. The binary stream is used directly in the next step of modulation, in other words in the case of GFSK there are no Q signal. It is merely represented by the I signal which is the same as the bit sequence.

1.4.1.2 π /4 DQPSK

In π/4 DQPSK modulation technique every symbol represents two bits of the bit stream and therefore the bit rate is twice as large as the symbol rate. Every two bit is coded and now the bit stream is represented by I and Q signals as the I and Q signals now is calculated as:

$$ \mathrm{I}=\mathrm{Cos}\left(\upvarphi \right) $$
(1.1)
$$ \mathrm{Q}=\mathrm{Sin}\left(\upvarphi \right) $$
(1.2)

The difference between the QPSK and π/4 DQPSK is that in π/4 DQPSK the symbol is represented by the change of angle not by the angle itself, Table 1.5 shows the π /4 DQPSK mapping rules, detailed description of π /4 DQPSK modulation will be discussed in Chap. 3.

Table 1.5 π /4 DQPSK mapping rules

1.4.1.3 8DPSK

The same principles used in π/4 DQPSK are used for 8DPSK, but with 8DPSK three bits are transmitted with each symbol, meaning that the bit rate is three times larger than the symbol rate as shown in Table 1.6.

Table 1.6 8DPSK mapping rules

1.4.2 Pulse Shaping

1.4.2.1 The Concept of Inter-Symbol Interference (ISI)

As a signal travels in the channel , it is inevitably affected by various kinds of noise and fading in the channel. For example, in a wireless system whose channel is the free space between the transmitter and the receiver (Fig. 1.2), objects in propagation path can create multiple echoes on the transmitted signal. These echoes arrive at the receiver at different times and overlap to form a distorted version of the original signal. This effect of multiple echoes is referred to as multi-path fading.

Fig. 1.2
figure 2

Multi-path wireless channel

In frequency domain, multi-path fading results in a non-uniform frequency response of channel, as some frequency components in the transmitted signal are enhanced and other frequency components are attenuated. One problem associated with a multi-path fading channel is inter-symbol interference (ISI), which refers to the interference to the current symbol by preceding symbols. Inter-symbol interference, which degrades the error-rate performance of the receiver, is a significant problem in data communication systems.

1.4.2.2 Pulse Shaping Techniques

When pulses are transmitted through a communications system, they are affected by the transmitter transfer function Ht(f), channel transfer function Hc(f), and receiver transfer function Hr(f) of that system. These three transfer function can be lumped together in one transfer function, H (f) where

$$ \mathrm{H}\left(\mathrm{f}\right)=\mathrm{Ht}\left(\mathrm{f}\right)\kern0.5em \mathrm{Hc}\left(\mathrm{f}\right)\kern0.5em \mathrm{Hr}\left(\mathrm{f}\right) $$
(1.3)

The filtering with H(f) affects the received pulses in such a way that there is an overlap into adjacent symbol intervals.

These causes the pulses to change shape as the interfering pulses add constructively or destructively which may lead to errors in the detection process and this is called inter symbol interference (ISI) .

Consider a system transmitting 1/T symbols/s, where T is the symbol time. The bandwidth required to detect 1/T symbols per second without ISI is equal to 1/2 T Hz, this condition is known as the Nyquist bandwidth constraint. This occurs when the system transfer function H (f) is made rectangular with bandwidth 1/2 T;this is as the ideal filter. The impulse response h(t) is the inverse Fourier transform of H (f) where

$$ \mathrm{h}\left(\mathrm{t}\right)=\operatorname{sinc}\left(\mathrm{t}\right) $$
(1.4)

Such a pulse shape is not physical realizable due to the rectangular bandwidth characteristic, and the impulse response has in principle an infinite time delay so transfer functions which resembles the characteristics of the Nyquist filter and are realizable must be used in real systems.

Pulse shaping is performed with the following filters to avoid inter symbol interference (ISI): for GFSK a Gaussian filter is used (hence the name Gaussian Frequency Shift Keying), and for π/4 DQPSK and 8DPSK a square root-raised cosine filter is used. The Gaussian filter has an impulse response described by:

$$ h(t)=\sqrt{\frac{\pi }{\alpha }}\exp {\left(\frac{-\pi }{\alpha }t\right)}^2 $$
(1.5)
$$ \mathrm{Where}\kern1em \alpha =\sqrt{\frac{\ln 2}{2\beta }} $$
(1.6)

Where β is the 3 dB bandwidth; Reducing the BT product improve the spectral efficiency as shown in Fig. 1.3.

Fig. 1.3
figure 3

The impulse response of the Gaussian pulse shaping filter

The difference between GFSK and FSK is shown in Fig. 1.4 where GFSK is more spectral efficiency [37].

Fig. 1.4
figure 4

GFSK spectral versus FSK

The square root-raised Cosine filter has a frequency response described by the following equation:

$$ H\left(\omega \right)=\left\{\begin{array}{cc}1& \omega <{\omega}_c\left(1-\alpha \right)\\ {}0& \omega >{\omega}_c\left(1+\alpha \right)\\ {}\sqrt{\frac{1}{2}\left(1+\cos \left(\frac{\pi \left(\omega -{\omega}_c\left(1-\alpha \right)\right)}{2{\alpha \omega}_c}\right)\right)}& {\omega}_c\left(1-\alpha \right)<\omega <{\omega}_c\left(1+\alpha \right)\end{array}\right. $$
(1.7)

And it has impulse response h(t) described by the following equation:

$$ h(t)=\frac{4\alpha }{\pi \sqrt{T}}\frac{\cos \left(\frac{\left(1+\alpha \right)\pi t}{T}\right)+\frac{T}{4\alpha \cdot t}\sin \left(\frac{\left(1-\alpha \right)\pi t}{T}\right)}{1-{\left(\frac{4\alpha \cdot t}{T}\right)}^2} $$
(1.8)

Where 0 < α < 1. The frequency and impulse response of the square root-raised cosine filter is shown in Figs. 1.5 and 1.6 respectively.

Fig. 1.5
figure 5

Frequency response of the square root-raised cosine filter

Fig. 1.6
figure 6

Impulse response of the square root-raised cosine filter

1.4.3 Modulation (Mixing with Carrier Frequency)

Mixing, or sometimes called waveform modulation , is the multiplication of a sinusoidal wave and the signals I and Q.The frequency of the sinusoidal wave corresponds to the modulation frequency, which henceforth will be referred to as the intermediate frequency (IF).

1.4.3.1 GFSK

The binary FSK I signal is mixed with two different modulation frequencies. The frequencies are chosen to be F1 = Fif + ΔF MHz and F2 = Fif – ΔF MHz, The GFSK modulation has bandwidth bit period product BT = 0.5. And the Modulation index shall be between 0.28 and 0.35 where the modulation index is given by:

$$ h=\frac{1}{2}{f}_dT $$
(1.9)

And fd is the frequency deviation, T the symbol time.

1.4.3.2 M-Ary DPSK

In the case of M-ary DPSK , the sinusoidal wave used for the Q part is 90 degree phase shifted from the I part, that is why I and Q-signals are called in-phase and quadrate signals respectively. The sinusoidal wave is multiplied with the I and Q signals, then The signals are added and can be written as:

$$ \mathrm{S}\left(\mathrm{t}\right)=\mathrm{I}\kern0.5em \sin \left(2\uppi \mathrm{f}\ \mathrm{t}\right)+\mathrm{Q}\kern0.5em \cos \left(2\uppi \mathrm{f}\ \mathrm{t}\right) $$
(1.10)

1.5 Receiver Fundamentals

As with the transmitter in a digital communications system, the receiver will also be described in a simplified form. In Fig. 1.7, a block diagram of such a receiver is shown. In the outermost part of the receiver it consists of an antenna and RF mixers which is out of the scope of this Thesis then the demodulation stage [38].

Fig. 1.7
figure 7

Digital communication receiver

1.5.1 Demodulation

The demodulation is the mixing with the same modulation frequencies as used in the transmitter part, after the mixing the signal is once again represented in I and Q signals. A more detailed description of demodulation is described in Chaps. 2 and 3 as it is one of the main parts of this thesis.

1.5.2 Pulse Shaping

The same filters used in the transmitter are used in the receiver for both GFSK and DPSK signals as it acts as a low-pass filter i.e. the same filter coefficients are used.

1.5.3 De-Mapping

Two basic methods for detectors are the correlation method and the matched filter method; these can then either be coherent or non-coherent. In this thesis the coherent correlation method is used for GFSK, DQPSK and 8DPSK.Coherent detection implies that the receiver exploits knowledge of the carrier’s phase to detect the signal, and with non-coherent detection the receiver does not utilize phase information.

The decoding of the bit stream involves the symbol decision. For GFSK signals the symbol decision algorithm is determined according to the sign of the received symbol if it is positive so it was one else it was zero. For DPSK including both π/4 DQPSK and 8DPSK, the bits are decided by looking up in a table corresponding to the modulation scheme. These tables are the same as used in the modulation encoding.

1.6 CORDIC Theory

CORDIC (Coordinate Rotation Digital Computer) is a method for computing elementary functions using minimal hardware such as shifts adds/subs and compares. CORDIC works by rotating the coordinate system through constant angles until the angle is reduces to zero. The angle offsets are selected such that the operations on X and Y are only shifts and adds [39].

1.6.1 Introduction

The CORDIC algorithm performs a planar rotation . Graphically, planar rotation means transforming a vector (Xi, Yi) into a new vector (Xj, Yj) as shown below in Fig. 1.8.

Fig. 1.8
figure 8

CORDIC theory

Using a matrix form, a planar rotation for a vector of (Xi, Yi) is defined as

$$ \left[\begin{array}{c}{X}_j\\ {}{Y}_j\end{array}\right]=\left[\begin{array}{cc}\cos \theta & -\sin \theta \\ {}\sin \theta & \cos \theta \end{array}\right]\left[\begin{array}{c}{X}_i\\ {}{Y}_i\end{array}\right] $$
(1.11)

The ө angle rotationcan be executed in several steps, using an iterative process. Each step completes a small part of the rotation. Many steps will compose one planar rotation. A single step is defined by the following equation.

$$ \left[\begin{array}{c}{X}_{n+1}\\ {}{Y}_{n+1}\end{array}\right]=\left[\begin{array}{cc}\cos {\theta}_n& -\sin {\theta}_n\\ {}\sin {\theta}_n& \cos {\theta}_n\end{array}\right]\left[\begin{array}{c}{X}_n\\ {}{Y}_n\end{array}\right] $$
(1.12)

Equation 1.11 can be modified as follow:

$$ \left[\begin{array}{c}{X}_{n+1}\\ {}{Y}_{n+1}\end{array}\right]=\cos {\theta}_n\left[\begin{array}{cc}1& -\tan {\theta}_n\\ {}\tan {\theta}_n& 1\end{array}\right]\left[\begin{array}{c}{X}_n\\ {}{Y}_n\end{array}\right] $$
(1.13)

Equation 1.12 requires three multiplies, compared to the four needed in Eq. 1.11. Additional multipliers can be eliminated by selecting the angle steps such that the tangent of a step is a power of 2. Multiplying or dividing by a power of 2 can be implemented using a simple shift operation. The angle for each step is given by:

$$ {\theta}_n=\arctan \left(\frac{1}{2^n}\right) $$
(1.14)

All iteration-angles summed must equal the rotation angle ө.

$$ \sum \limits_{n=0}^{\infty }{S}_n{\theta}_n=\theta $$
(1.15)

This results in the following equation:

$$ \tan {\theta}_n={S}_n{2}^{-n} $$
(1.16)

Combining Eqs. 1.12 and 1.15 results in:

$$ \left[\begin{array}{c}{X}_{n+1}\\ {}{Y}_{n+1}\end{array}\right]=\cos {\theta}_n\left[\begin{array}{cc}1& -{S}_n{2}^{-n}\\ {}{S}_n{2}^{-n}& 1\end{array}\right]\left[\begin{array}{c}{X}_n\\ {}{Y}_n\end{array}\right] $$
(1.17)

Rewrites cos ө as:

$$ \cos {\theta}_n=\cos \left(\arctan \left(\frac{1}{2^n}\right)\right) $$
(1.18)

Compute previous equation for all values of ‘n’ and multiplying the results, which we will refer to as K.

$$ K=\frac{1}{P}=\prod \limits_{n=0}^{\infty}\cos \left(\arctan \left(\frac{1}{2^n}\right)\right)\approx 0.607253 $$
(1.19)

K is constant for all initial vectors and for all values of the rotation angle; it is normally referred to as the congregate constant . The derivative P (approx. 1.64676) is defined here because it is also commonly used [39, 40].

We can now formulate the exact calculation the CORDIC performs.

$$ \left\{\begin{array}{c}{X}_j=K\left({X}_i\cos \theta -{Y}_i\sin \theta \right)\\ {}{Y}_j=K\left({Y}_i\cos \theta +{X}_i\sin \theta \right)\end{array}\right. $$
(1.20)

Because the coefficient K is pre-computed and taken into account at a later stage, Eq. 1.16 may be written as:

$$ \left[\begin{array}{c}{X}_{n+1}\\ {}{Y}_{n+1}\end{array}\right]=\left[\begin{array}{cc}1& -{S}_n{2}^{-n}\\ {}{S}_n{2}^{-n}& 1\end{array}\right]\left[\begin{array}{c}{X}_n\\ {}{Y}_n\end{array}\right] $$
(1.21)

Abbreviation of Eq. 1.21 yields to:

$$ \left\{\begin{array}{c}{X}_{n+1}={X}_n-{S}_n{2}^{-2n}{Y}_n\\ {}{Y}_{n+1}={Y}_n+{S}_n{2}^{-2n}{X}_n\end{array}\right. $$
(1.22)

At this point a new variable called ‘Z’ is introduced. Z represents the part of the angle ө which has not been rotated yet where:

$$ {Z}_{n+1}=\theta -\sum \limits_{i=0}^n{\theta}_i $$
(1.23)

For every step of the rotation Sn is computed as a sign of Zn.

$$ {S}_n=\left\{\begin{array}{cc}-1& if\kern0.5em {Z}_n<0\\ {}+1& if\kern0.5em {Z}_n\ge 0\end{array}\right. $$
(1.24)

This algorithm is commonly referred to as driving Z to zero. The CORDIC core computes:

$$ \left[{X}_j,{Y}_j,{Z}_j\right]=\left[P\left({X}_i\cos \left({Z}_i\right)-{Y}_i\sin \left({Z}_i\right)\right),\kern0.5em P\left({Y}_i\cos \left({Z}_i\right)+{X}_i\sin \left({Z}_i\right)\right),\kern0.5em 0\right] $$
(1.25)

There’s a special case for driving Z to zero:

$$ {X}_i=\frac{1}{P}=K\approx 0.60725 $$
(1.26)
$$ {Y}_i=0 $$
(1.27)
$$ {Z}_i=\theta $$
(1.28)
$$ \left[{X}_j,{Y}_j,{Z}_j\right]=\left[\cos \theta, \kern0.5em \sin \theta, \kern0.5em 0\right] $$
(1.29)

Another scheme which is possible is driving Y to zero which is called vectoring mode CORDIC algorithm. This CORDIC core type computes:

$$ \left[{X}_j,{Y}_j,{Z}_j\right]=\left[P\sqrt{X_i^2+{Y}_i^2},\kern0.5em 0,\kern0.5em {Z}_i+\arctan \left(\frac{Y_i}{X_i}\right)\right] $$
(1.30)

For this scheme:

$$ {X}_i=X $$
(1.31)
$$ {Y}_i=Y $$
(1.32)
$$ {Z}_i=0 $$
(1.33)
$$ \left[{X}_j,{Y}_j,{Z}_j\right]=\left[P\sqrt{X_i^2+{Y}_i^2},\kern0.5em 0,\kern0.5em \arctan \left(\frac{Y_i}{X_i}\right)\right] $$
(1.34)

1.6.2 Summary of CORDIC Algorithm

Table 1.7 summarize Equations and results for rotation and vectoring modes of the CORDIC algorithm.

Table 1.7 Results for CORDIC algorithm

Table 1.8 summarizes comparison between (look-up table) LUT and CORDIC implementation from which we can see that implementation of CORDIC algorithm is more area effective than LUT.

Table 1.8 Comparison between LUT and CORDIC implementation

1.7 Digital Filters

Finite Impulse Response (FIR) filters possess many virtues, such as exact linear phase property, guaranteed stability, free of limit cycle oscillations, and low coefficient sensitivity However, the order of an FIR filter is generally higher than that of a corresponding infinite impulse response (IIR) filter meeting the same magnitude response specifications. Thus, FIR filters require considerably more arithmetic operations and hardware components such as delay, adder and multiplier [41].

This makes the implementation of FIR filters, especially in applications demanding narrow transition bands, very costly. When implemented in VLSI (Very Large Scale Integration) technology, the coefficient multiplier is the most complex and the slowest component. The cost of implementation of an FIR filter can be reduced by decreasing the complexity of the coefficients; coefficient complexity reduction includes reducing the coefficient word length [42].

An FIR digital filter of order M may be implemented by programming the signal flow graph shown below in Fig. 1.9 where its difference equation is:

Fig. 1.9
figure 9

FIR digital filter flow graph

$$ \mathrm{Y}\left[\mathrm{n}\right]={\mathrm{a}}_0\mathrm{x}\left[\mathrm{n}\right]+{\mathrm{a}}_1\mathrm{x}\left[\mathrm{n}-1\right]+{\mathrm{a}}_2\mathrm{x}\left[\mathrm{n}-2\right]+\dots +{\mathrm{a}}_{\mathrm{m}}\mathrm{x}\left[\mathrm{n}-\mathrm{M}\right] $$
(1.35)

Where:

X (n) represents the sequence of input samples.

am represents the filter coefficients.

1.7.1 Advantages of Digital Filters

The following list gives some of the main advantages of digital over analog filter [43]. FIR digital Filter Frequency response is shown in Fig. 1.10.

  1. (a)

    A digital filter is programmable; this means the digital filter can easily be changed without affecting the hardware. An analog filter can only be changed by redesigning the filter circuit.

  2. (b)

    The characteristics of analog filter circuits (particularly those containing active components) are subject to drift and are dependent on temperature. Digital filters do not suffer from these problems, and so are extremely stable with respect both to time and temperature.

  3. (c)

    Unlike their analog counterparts, digital filters can handle low frequency signals accurately.

  4. (d)

    Digital filters are very much more versatile in their ability to process signals in a variety of ways; this includes the ability of some types of digital filter to adapt to changes in the characteristics of the signal.

  5. (e)

    Digital filters can be easily designed and tested.

Fig. 1.10
figure 10

FIR digital filter frequency response

1.8 Symbol Timing Recovery

Timing recovery is one of the most critical demodulator functions. Timing recovery algorithm can be classified into two categories according to the data dependency [44]:

  • Class 1: Decision Directed (DD) or Data-Aided (DA).

  • Class 2: Non-data-Aided (NDA).

In a receiver, the received signal is first demodulated and low-pass filtered to recover the message signals. The next step for the receiver is to sample the message signals at the symbol rate and decide which symbols were sent. Although the symbol rate is typically known to the receiver, the receiver does not know when to sample the signal for the best noise performance. The objective of the symbol-timing recovery loop is to find the best time to sample the received signal to obtain symbol synchronization. Two quantities must be determined by the receiver to achieve symbol synchronization. The first is the sampling frequency. Locking the sampling frequency requires estimating the symbol period so that samples can be taken at the correct rate. Although this quantity should be known, oscillator drift will introduce deviations from the stated symbol rate. The other quantity to determine is sampling phase. Locking the sampling phase involves determining the correct time within a symbol period to take a sample.

Real-world symbol pulse shapes have a peak in the center of the symbol period. Sampling the symbol at this peak results in the best signal-to-noise-ratio and will ideally eliminate interference from other symbols. This type of interference is known as inter-symbol interference.

The data aided timing recovery depends on a synchronization word sent by the transmitter in contrary to non-data aided timing recovery which does not need synchronization word and depends on feedback technique.

An example of a typical non data aided timing recovery loop is shown in Fig. 1.11.

Fig. 1.11
figure 11

Timing recovery loop

The signal is sent to a timing error estimator that can use a number of different algorithms to generate a timing error. The control signal for the Numerically Controlled Clock (NCC) is formed by filtering this error signal using a standard second order loop filter containing a proportional and an integral section [45].

An example of a typical second-order loop filter is shown in Fig. 1.12. The second-order loop filter consists of two paths. The proportional path multiplies the timing error signal by a proportional gain Kp.

Fig. 1.12
figure 12

Second order loop filter

From control theory , it is known that a proportional path can be used to track out a phase error; however, it cannot track out a frequency error. For a timing recovery loop to track out a sampling frequency error, a loop filter containing an integral path is needed. The integral path multiplies the error signal by an integral gain Ki and then integrates the scaled error using an adder and a delay block. A second- order filter can track out both a sampling phase and a sampling frequency error.

The timing error detector output, x, is multiplied by the proportional gain constant Kp in the upper arm. In the lower arm, the phase detector output is first multiplied by Ki, the integral gain constant. The result of this multiplication is fed into an integrator comprising an adder and a register (unit delay). The final output y is the sum of the product of the proportional gain constant K p computed in the upper arm, and the output of the integrator in the lower arm [46].

Here is a derivation of the transfer function y/x of this loop filter. I introduced a couple of intermediate variables, y1 and y2, to make the job easier:

$$ y={K}_px+{y}_1 $$
(1.36)
$$ {y}_1=y-{K}_px $$
(1.37)
$$ {y}_1={y}_2{z}^{-1} $$
(1.38)
$$ {y}_2={K}_ix+{y}_1 $$
(1.39)
$$ {y}_1=\left({K}_ix+{y}_1\right){z}^{-1} $$
(1.40)
$$ {y}_1=\left({K}_ix+y-{K}_px\right){z}^{-1} $$
(1.41)
$$ y={K}_px+\left({K}_ix+y-{K}_px\right){z}^{-1} $$
(1.42)
$$ y\left(1-{z}^{-1}\right)={K}_px+{K}_i{xz}^{-1}-{K}_p{xz}^{-1} $$
(1.43)
$$ \frac{y}{x}=\frac{K_p+\left({K}_i-{K}_p\right){z}^{-1}}{\left(1-{z}^{-1}\right)}=\frac{b_0+{b}_1{z}^{-1}}{a_0+{a}_1{z}^{-1}} $$
(1.44)
$$ {K}_p={b}_0 $$
(1.45)
$$ {K}_i={b}_0+{b}_1 $$
(1.46)

We can say:

$$ \mathrm{y}\left(\mathrm{n}\right)=\mathrm{Kp}\ast \mathrm{x}\left(\mathrm{n}\right)+\mathrm{Ki}\ast \mathrm{x}\left(\mathrm{n}-1\right)+\mathrm{y}\left(\mathrm{n}-1\right)-\mathrm{Kp}\ast \mathrm{x}\left(\mathrm{n}-1\right) $$
(1.47)

Where y(n) is the current filter output, y(n–1) is the previous filter output, x(n) is the current phase detector output, and x(n–1) is the previous phase detector output.

The timing error detector output is computed and the filter output updated every Ts seconds, where Ts is the sampling interval. To compute b0 and b1, starting with an analog prototype and then using the bilinear z transform as shown in the following equations:

$$ {\tau}_1=\frac{K_o{K}_d}{w_n^2} $$
(1.48)
$$ {\tau}_2=\frac{2\xi }{w_n} $$
(1.49)
$$ {b}_0=\frac{T_s}{2{\tau}_1}\left(1+\frac{1}{\tan \left(\frac{T_s}{2{\tau}_2}\right)}\right) $$
(1.50)
$$ {b}_1=-\frac{T_s}{2{\tau}_1}\left(1-\frac{1}{\tan \left(\frac{T_s}{2{\tau}_2}\right)}\right) $$
(1.51)

In the equations above, Ko is the oscillator gain in radians sec−1 volt−1 in the analog domain, or radians sec−1 in the digital domain. Kd is the timing error detector gain in volts radians−1 in the analog domain, or unit radians−1 in the digital domain. The natural frequency of the loop is ωn, in MHz and the damping factor is ζ. Ts is the sampling interval of the digital system, and τ1 and τ2 are the loop time constants where ζ = 0.7, and Ko, Kd assumed to be equal 1.

The following figures can illustrate the timing recovery where Fig. 1.13 shows symbol sampling before delay locked loop (DLL) lock and Fig. 1.14 shows it after Locking.

Fig. 1.13
figure 13

Symbol sampling before DLL lock

Fig. 1.14
figure 14

Symbol sampling after DLL lock

1.8.1 Timing Error Detectors Algorithms

1.8.1.1 Early-Late Gate Algorithm

This timing recovery algorithm generates its error by using samples that are early and late compared to the ideal Sampling point. The generation of the error requires at least three samples per symbol.

The method of generating the error is illustrated in Fig. 1.15. The left plot is for the case where sampling is occurring late. Note that the early and late samples are at different amplitudes. This difference in amplitude is used to derive an error for the timing recovery loop.

Fig. 1.15
figure 15

Early-late gate algorithm

Once the timing recovery loop converges, the early and late samples will be at equal amplitudes. The sample to be used for later processing is the sample that lies in the middle of the early and late samples.

One drawback of the early-late gate algorithm is that it requires at least three samples per symbol. Thus, it is impractical for systems with high data rates.

1.8.1.2 Mueller and Muller Algorithm

The Mueller and Muller algorithm only requires one sample per symbol. The error term is computed using the following equation:

$$ {\mathrm{e}}_{\mathrm{n}}=\left({\mathrm{y}}_{\mathrm{n}}.{{\mathrm{y}}_{\mathrm{n}-1}}^{\prime}\right)\hbox{--} \left({{\mathrm{y}}_{\mathrm{n}}}^{\prime }.{\mathrm{y}}_{\mathrm{n}-1}\right) $$
(1.52)

Where yn is the sample from the current symbol and yn–1 is the sample from the previous symbol. The slicer (decision device) outputs for the current and previous symbol are represented by yn′ and yn–1′, respectively.

Examples of the value for the Mueller and Muller error for the cases of different timing offsets are shown in Fig. 1.16. One drawback of this algorithm is that it is sensitive to carrier offsets, and thus carrier recovery must be performed prior to the Mueller and Muller timing recovery.

Fig. 1.16
figure 16

Mueller and Muller algorithm

1.8.1.3 Gardner Algorithm

The Gardner algorithm has seen widespread use in many practical timing recovery loop implementations. The algorithm uses two samples per symbol and has the advantage of being insensitive to carrier offsets. The timing recovery loop can lock first, therefore simplifying the task of carrier recovery.

The error for the Gardner algorithm is computed using the following equation:

$$ {\mathrm{e}}_{\mathrm{n}}=\left({\mathrm{y}}_{\mathrm{n}}\hbox{--} {\mathrm{y}}_{\mathrm{n}\hbox{--} 2}\right){\mathrm{y}}_{\mathrm{n}\hbox{--} 1} $$
(1.53)

Where the spacing between yn and yn–2 is T seconds, and the spacing between yn and yn–1 is T/2 seconds. Figure 1.17 illustrates how the sign of the Gardner error can be used to determine whether the samplings correct, late or early.

Fig. 1.17
figure 17

Gardner algorithms

Note that the Gardner error is most useful on symbol transitions (when the symbol goes from positive to negative or vice-versa). The Gardner error is relatively small when the current and previous symbol has the same polarity.

1.9 Carrier Recovery

The phase-locked loop (PLL) is a critical component in coherent communications receivers that is responsible for locking on to the carrier of a received modulated signal. Ideally, the transmitted carrier frequency is known exactly and we need only to know its phase to demodulate correctly. However, due to imperfections at the transmitter, the difference between the expected and actual carrier frequencies can be modeled as a time-varying phase. Provided that the frequency mismatch is small relative to the carrier frequency, the feedback control of an appropriately calibrated PLL can track this time-varying phase, thereby locking on to both the correct frequency and the correct phase. The goal of the PLL is to maintain a demodulating sine and cosine that match the incoming carrier.

There are two categories of techniques for carrier synchronization: assisted and blind. Assisted techniques multiplex a special signal called a pilot signal with the data signal. Blind synchronization techniques derive the carrier phase estimate directly from the modulated signal. This approach is more prevalent in practice and has the advantage that all of the transmitter power can be allocated to the information-bearing signal [47, 48].

1.9.1 Pilot Tone Assisted Carrier Recovery

A system that uses pilot tone assisted carrier recovery multiplexes an un-modulated tone with the information signal. The tone is commonly added at either the carrier frequency, as shown in Fig. 1.18, or a multiple of the carrier frequency. The receiver then uses a phase locked loop to acquire and track the carrier component. The phase locked loop is designed to have a narrow bandwidth so that the information signal does not significantly affect the recovered carrier estimate [24, 49,50,51,52,53,54,55,56].

Fig. 1.18
figure 18

Signal with embedded Pilot Tone

1.9.2 Costas Loop

The Costas loop , developed in 1956, can recover the carrier from suppressed carrier signal. A block diagram is shown in Fig. 1.19. The received signal is multiplied by the recovered carrier and a version of the recovered carrier that has been shifted by 90 degrees. The results from each of these operations are low-pass filtered and multiplied together to generate an error signal that is used to drive a Voltage Controlled Oscillator (VCO).

Fig. 1.19
figure 19

Costas loop

1.9.3 Decision Feedback Phase Locked Loop

The Costas loop treat the information signal as a random sequence and use its statistical average to recover the carrier information embedded within it. A decision feedback PLL, assumes that the information sequence is known. The data sequence is obtained from the received signal by the Detector. Therefore, the phase contribution of each symbol can be removed in the phase detector before calculating an error signal once per symbol.

Suppose Wc is the believed digital carrier frequency. We can then represent the actual received carrier frequency as the expected carrier frequency with some offset.

$$ {\tilde{W}}_c={W}_c+\tilde{\theta}\left[n\right] $$
(1.54)

The NCO generates the demodulating sine and cosine with the expected digital frequency Wc and offsets this frequency with the output of the loop filter. The NCO frequency can then be modeled as:

$$ {\tilde{W}}_c={W}_c+\theta \left[n\right] $$
(1.55)

Using the appropriate trigonometric identities, the in-phase and quadrature signals can be expressed as:

$$ {Z}_I\left[n\right]=1/2\left(\cos \left(\tilde{\theta}\left[n\right]-\theta \left[n\right]\right)+\cos \left(2{W}_c+\tilde{\theta}\left[n\right]+\theta \left[n\right]\right)\right) $$
(1.56)
$$ {Z}_Q\left[n\right]=1/2\left(\sin \left(\tilde{\theta}\left[n\right]-\theta \left[n\right]\right)+\sin \left(2{W}_c+\tilde{\theta}\left[n\right]+\theta \left[n\right]\right)\right) $$
(1.57)

After applying a low-pass filter to remove the double frequency terms, we have

$$ {y}_I\left[n\right]=1/2\cos \left(\tilde{\theta}\left[n\right]-\theta \left[n\right]\right) $$
(1.58)
$$ {y}_Q\left[n\right]=1/2\sin \left(\tilde{\theta}\left[n\right]-\theta \left[n\right]\right) $$
(1.59)

Note that the quadrature signal is zero when the received carrier and internally generated waves are exactly matched in frequency and phase. When the phases are only slightly mismatched we can use the relation

$$ \sin \left(\theta \right)\approx \theta $$
(1.60)

And let the current value of the quadrature channel approximate the phase difference:

$$ {y}_Q\left[n\right]\approx \left(\tilde{\theta}\left[n\right]-\theta \left[n\right]\right) $$
(1.61)

With the exception of the sign error, this difference is essentially how much we need to onset our NCO frequency. In a more advanced receiver, information from both the in-phase and quadrature branches is used to generate an estimate of the phase error.

If \( \left(\tilde{\theta}\left[n\right]-\theta \left[n\right]\right)>0 \) then θ[n] is too large and we want to decrease our NCO phase.

Figure 1.20 shows carrier recovery algorithm where their phase error is generated from the quadrature branch only and Fig. 1.21 shows carrier recovery algorithm where the phase error is generated from the in-phase and quadrature branch, it gives more accurate results, it consists of numerically controlled oscillator , phase detector and second order loop filter.

Fig. 1.20
figure 20

PLL (Q-signal) block diagram

Fig. 1.21
figure 21

PLL (1-Q) signals bock diagram