The need for communication amongst people and electrical systems motivated the emergence of a large number of telecommunications protocols. The advances in digital networks and the internet have contributed to the evolution of telecommunications worldwide. The purpose of this chapter is to provide students and researchers with a clear presentation of telecommunications core protocols that are utilised in different research domains including telephony, brain-computer interface (BCI) and voice and digital telecommunications. Indeed, BCI involves different electrical signals, communications concepts and telecommunications protocols. This chapter introduces the reader to the core concepts in communications including analogue and digital telecommunications protocols that are utilised generally in communications and in particular in BCI systems. The topics covered in this chapter include telecommunications protocols, communications media, electrical signals, analogue and digital modulation techniques in digital communications, software-defined radio, overview on 10-Mbps Ethernet protocol and Session Initiation Protocol (SIP).
- analogue modulation
- digital modulation
Telecommunications protocols play an important role in the advanced modern communication systems that convey information, signals and messages over short and long distances. Telecommunications protocols were developed for data (digital) and voice (analogue) messages.
In a typical brain-computer interface (BCI)  application, the electroencephalography (EEG)  signals are acquired from the brain, encoded and sent over wireless protocols, such as Bluetooth or Wi-Fi data channels, to a control module. However, in a basic BCI system, signals may be sent through wires between signal acquisition and control modules through a certain serial data communications protocol. BCI is one of several vital engineering domains where researchers and students have to understand and deal with telecommunications protocols.
The need for data communications has inspired researchers and led to the emergence of digital communications, integration of Voice over Internet Protocol (VoIP) or IP telephony with multimedia services offered on IP networks over public switched telephone network (PSTN). Modern telecommunications through VoIP software are common on personal computers and portable devices including smart phones and handheld devices. VoIP systems employ packet switching protocols, which have numerous advantages over circuit switching upon which is based on the traditional PSTN.
VoIP applications for local area network (LAN), wide area networks (WAN), wireless local area network (WLAN) and mobile telephone networks offer better availability, scalability, flexibility, minimum hardware and low cost than PSTN. On the other hand, Internet-related problems such as delay and congestion causing jitter and packet loss are inherent in VoIP.
However, circuit switching is compelling in many applications where real-time, low delay and high QoS are desired, where each customer of modern PSTN profits from dedicated analogue or digital circuits. This implies that a communication channel is reserved during a call or a data session. Due to the limited number of circuits and control units in PSTN, only a fraction of customers can perform simultaneous calls within a switch.
One of the main protocols that has been developed for IP telephony is SIP, which is inspired from establishing and ending a call session and for changing parameters of an established session. The simplicity of SIP and the emergence of Java application interfaces for integrated networks (JAIN)-SIP which is a Java-based API for SIP have reinforced the development and implementation of platform-independent IP telephony services.
In this chapter, core concepts in telecommunications protocols, as well as other related topics including communications media, analogue and digital modulation techniques in digital communications, software-defined radio, overview on 10-Mbps Ethernet protocol and SIP protocol, are presented in an easy and simple style with a number of figures to explain the basic principles of telecommunications protocols.
1.1 Telecommunications core concepts
This section introduces the reader to selected core concepts in telecommunications including telecommunications media and digital encoding.
1.1.1 Twisted pair
Twisted pairs are utilised to carry analogue and digital signals. Depending on distance, analogue signals may be limited to 250 kHz, and digital signals are limited to 10 Mbps for distances around 100 m . At the onset of electrical telecommunication systems, copper was the main transmission medium because of its electrical characteristics such as low resistivity to electric current.
1.1.2 Morse code
The Morse code is a variable-length code, where each character is given a series of dots and dashes. Some letters have one dot and others have one dash. The code length varies from 1 to 5, covering 36 symbols. The telegraph signals were carried using copper twisted pairs. Signal wires are twisted in order to cancel out unwanted noise and reduce the effective inductance of the transmission line. At the sending side, a switch is used to open and close the electric circuit in a certain pattern in order to produce Morse code at the receiving side.
1.1.3 Coaxial cable
A coaxial cable consists of a core wire and a cylindrical shield separated by insulation material. It provides better noise rejection and baud rate over longer distances than the twisted pair. Analogue signal frequency can exceed 500 MHz, and baud rate can reach 500 Mbps depending on distance.
1.1.4 Optical fibre
Optical fibre systems consist of a laser diode transmitter and receiver separated by transparent optical fibre. The signals are transmitted as light pulses that propagate inside the optical fibre. The optical fibre has small diameter and consists of three components: the core (pure glass or plastic), the cladding and the protective cover. The cladding material (glass or plastic) is less optically dense, which allows the light to travel easier through the core. The optical fibre can be used on longer distances with attenuation.
1.1.5 Wireless transmission
Radio and TV broadcasting was made possible through various modulation techniques of electrical signals over different carrier frequencies. For example, the short waves (SW) include frequencies from 3 up to 30 MHz, very high frequencies (VHF) range from 30 to 300 MHz and ultra-high frequency (UHF) cover frequency spectra from 0.3 to 3 GHz. Lower frequencies have longer propagation distances, while higher frequencies suffer from reflections and attenuation over long distances. On the other hand, radio frequency (RF) and high-frequency (HF) transmissions require small antennas since their wavelengths are much shorter.
1.1.6 Microwave transmission
With shorter wavelengths in the range 4–6 GHz, microwave signals travel in straight lines and do not penetrate solid objects. They are affected by clouds, rain and obstacles blocking the line of sight between the transmitter and receiver. Usually parabolic antennas are used for large systems. The received signal is focused at the focal point of the parabola.
1.1.7 Very small aperture terminal (VSAT)
In the 1980s, the very small aperture terminal devices made it possible to telecommunicate, utilising small dish dimensions between remote areas by means of highly directional parabolic antennas .
1.1.8 Telephone systems
The microphone in a telephone set converts sound into analogue electric signals that are conveyed traditionally through copper wires and reproduced back at the receiver into sound waves through the speaker. The first telephone systems were analogue, while today’s telephone systems are completely digital with tone dialling, voice and data services. Telephone networks have profited from advancements in wireless communications by the implementation of the mobile [5, 6] communications. Old telephone networks were designed mainly to convey voice before the emergence of digital data networks and the Internet.
1.1.9 Analogue and digital signals
Digital signals are characterised by two discrete levels, high and low (1 or 0), while analogue signals have continuous forms. Digital and analogue signals are both utilised in modern telecommunications  systems and computer networks. Popular digital codes include American Standard Code for Information Interchange (ASCII) and binary-coded decimal (BCD). ASCII is used in basic character symbols for computer systems, while BCD is mainly used for seven-segment displays.
1.1.10 Non-return to zero (NRZ)
Non-return to zero is the simplest digital encoding as shown in Figure 1, where a logic one corresponds to a positive high signal level and the logic zero is simply at ground potential or zero voltage. The NRZ encoding is inconvenient for data transmission specially when data contain a long series of zeros or ones.
1.1.11 Return to zero (RZ)
Return to zero is an improved digital encoding over the NRZ encoding, where logic one signals return to zero as shown in Figure 2. The RZ encoding is inconvenient for data transmission when data contain a long series of zeros.
1.1.12 Manchester encoding
To assure reliable transmission of digital data (such as Ethernet and IP), the Manchester encoding (refers to Figures 3 and 4 with clock signal) is convenient to solve the issue of sending a long series of zeros or ones through a data communication line. The Manchester encoding encodes logic 1 as a transition from level high to low signal, while a 0 is a transition from low to high. The needed bandwidth is twice as the original signal, and there is always a change in the middle of each bit.
An improved version of this encoding is called the differential Manchester encoding, where a 0 causes the signal to change at the start of the interval (refer to Figure 5). On the other hand, a 1 causes a change at the end of the interval. A 1 keeps the signal level unchanged as in the previous bit and changes to high at the middle. This is advantageous and permits interchanging the wiring of a differential pair without any issue.
1.1.13 Shannon’s theory
Shannon studied noisy channels, and his theory is based upon the fact that a signal has to have high signal-to-noise (S/N) ratio in order to be successfully distinguished. This influences the maximum bit rate that can be used as follows:
To increase the data rate, a channel with high S/N should be used. Other means that can increase the bit rate is data compression.
1.1.14 Sampling theory
To convert a continuous signal x(t) into a digital form , it is first sampled at equal intervals of time. To be able to reconstruct a sampled signal, is defined as
The sampling interval Ts is 1/fs, where the sampling frequency fs should be at least twice the highest frequency component fmax of the original signal x(t). The frequency 2fmax is called the Nyquist frequency.
1.1.15 Analogue-to-digital (A/D) conversion
An analogue signal with a given frequency f1 can be converted into a digital form by sampling it at a constant frequency fs, where . A sampled signal has the form of pulses with different amplitudes called pulse amplitude modulation (PAM). The PAM signal is then quantised, and every level is given a binary code number. This process is called pulse-code modulation (PCM). The sampling frequency fs has to be at least twice as much as the signal frequency being sampled in order to produce a good approximation of the original signal that can be reproduced and converted back to analogue form. In telephony systems the 8-kHz frequency is used to sample voice that is encoded using 8-bit code. The bit rate in this case is . In compact disc (CD) technology, the audio is sampled at .
Multiplexing occurs when data are collected from different sources and are transmitted into one common communication channel. Three types of multiplexing are utilised, namely:
Frequency-division multiplexing (FDM). This type of multiplexing employs subcarriers to transmit different message signals.
Time-division multiplexing (TDM). This type of multiplexing employs time slots to transmit different message signals.
Quadrature multiplexing (QM). This type of multiplexing employs quadrature carriers to transmit different message signals. This type of multiplexing can be distinguished from FDM by the fact that they have overlapped frequency spectra. QM represents double-sideband (DSB) and single-sideband modulations (SSB).
2. Modulation techniques
In the past, digital networks were connected through telephone networks via the modem (modulation/demodulation). Modern telecommunications systems utilise optical fibres that carry many digital channels, which can be translated into voice signals in a telephone by using a codec (coder/decoder). This involves digital-to-analogue (D/A) and analogue-to-digital (A/D) conversions. When a signal is transmitted, it is normally modulated using a carrier signal, which can be changed or modulated in amplitude (Ac), phase shift () or frequency (fc) . The carrier signal can be generalised as .
2.1 Analogue modulation
To transmit analogue signals over long distances, analogue modulation techniques are used by changing either the amplitude, phase or frequency of analogue signals.
2.1.1 Amplitude modulation (AM)
Amplitude modulation (AM) takes place when is linearly related to the modulating signals (message). In this modulation technique, the carrier frequency is kept constant, and its amplitude is varied according to the amplitude of the transmitted analogue signal as shown in Figure 6. An AM signal is the result of multiplying the message and carrier functions. Assuming a sinusoidal carrier signal defined as is used to modulate the message signal :
In the above equation, is the modulation index, which is the ratio of the amplitude of the message signal Am to the amplitude Ac of the carrier signal. To be able to recover the message, should be less than 1, i.e., . The resulting product function is composed of three frequencies:
The equation above shows three frequencies:
The carrier frequency fc.
The sum of the carrier and modulated frequencies with the same phase shift of the message signal.
The difference between the carrier and modulated frequencies with the negative phase shift of the message signal.
2.1.2 Frequency modulation (FM)
Frequency modulation (FM) takes place when the time derivative of is linearly related to the modulating signal. In this modulation technique, the amplitude of the carrier signal is kept constant, and its frequency is varied according to the amplitude of the transmitted analogue signal as shown in Figure 7. Frequency and phase modulations are considered as special cases of angle modulation . The carrier frequency is changed such that the frequency fc depends on the message signal. Since the frequency is the derivative of the phase, the relation between the input signal and frequency can be written as  . The FM signal can be written as
In the above equation, is the amplitude of the message signal, is the frequency of the message signal and is the maximum frequency that corresponds to the maximum amplitude value. The frequency modulation index describes the variation in carrier frequency compared :
The frequency modulation index can be less than 1 (for narrowband FM) or much greater than 1 (for wideband FM).
2.1.3 Phase modulation (PM)
Phase modulation (PM) takes place when is linearly related to the modulating signal. In this modulation technique, the amplitude of the carrier signal is kept constant, and its phase is varied according to the amplitude of the transmitted analogue signal as shown in Figure 8. The phase of the PM signal can be written in terms of the phase modulation index as .
2.2 Digital modulation
Transmission of digital signals involves modulation of amplitude, frequency or phase of carrier signals. The difference between analogue and digital modulation is that in digital modulation, the changes are at discrete intervals. For example, the amplitude of the carrier signal can be assigned to a maximum value or zero to represent the binary data 1 and 0.
2.2.1 Frequency-shift keying (FSK)
Frequency-shift keying is called also frequency modulation (FM). A bit 0 corresponds to low frequency, and a 1 corresponds to high frequency as shown in Figure 9. An FSK signal s(t) can be written as
In the equation above, k is a constant shift in frequency. Obviously, the FSK uses two frequencies (and ) for logic 0 and 1, respectively. This type of FSK is called binary FSK (BFSK).
In case and are used to shift the carrier frequency, the resulting FSK signal has four different frequencies and can be utilised to encode the binary codes , as follows:
2.2.2 Amplitude-shift keying (ASK)
Amplitude-shift keying is similar to amplitude modulation (AM) as shown in Figure 10. Each signal amplitude is assigned to a sequence of bits. If four amplitudes are considered, the following bit code sequences can be defined as 00, 01, 10 and 11. A ASK signal s(t) can be written as
2.2.3 Phase-shift keying (PSK)
Phase-shift keying (PSK) is also called phase modulation (PM). The signal can have a variable phase as shown in Figure 11. If the signal is compared with its predecessor, this technique is called differential phase-shift keying (DPSK). Each phase shift can be assigned to a given binary code . A PSK signal can be written as
Since the above equation contains two distinct phases, this type is called binary phase-shift keying (BPSK). If the number of phase variations is increased to 4, the quadrature PSK (QPSK) ca be defined as follows:
2.2.4 Quadrature amplitude modulation (QAM)
Though the above three approaches can be used with any number of signals, they tend to be difficult to implement due to the fact that special hardware will be needed to distinguish between adjacent amplitudes, phases and frequencies. To overcome this limitation, a combination of bits can be assigned to groups of signals that can be different in amplitude and phase, for example. For example, using signals with two amplitudes and two phase shifts produces four different signals.
2.2.5 Analogue pulse modulation
Pulse modulation can be achieved by modifying either amplitude, width or position of a pulse signal:
Pulse amplitude modulation (PAM): The PAM signal (as shown in Figure 12) is similar to the sampled signal. The pulses in PAM can have a finite width unlike the sampling delta pulses. The PAM-modulated signal can be written as
Pulse width modulation (PWM): In PWM as shown in Figure 13, the width of each pulse is related to the modulating signal. This type of modulation is used in DC motor control applications.
Pulse position modulation (PPM): In PPM as shown in Figure 14, the position of each pulse is related to the modulating signal.
2.2.6 Digital pulse modulation
Digital pulse modulation includes two types:
PCM: This modulation technique is achieved by sampling the message signal and assigning a digital code (quantisation) to each pulse. The level of the signal is not transmitted; instead the quantised code is assigned according to the available bits for encoding. For example, in 8-bit PCM (with ), each level is assigned to a discrete value between 0 and 255. For a signal that has a bandwidth (BW) and a sampling rate of 2BW, the number of transmitted pulses becomes 2nBW.
Delta modulation: In delta modulation, only the difference between the previous and following codes is sent, as shown in Figure 15. For a reference signal and a message signal , the difference is computed and fed to a pulse generator in order to produce the delta-modulated signal to be transmitted:
The difference value is calculated at the nth sampling instant. The reference signal is a stair-step approximation of as shown in Figure 15.
3. Session initiation protocol (SIP)
Modern telephony systems are based upon the Voice over IP (VoIP) protocols, such as SIP, which is a call control and signalling protocol adopted by the 3GPP in order to deliver IP multimedia services  to the mobile network . The design of SIP was inspired from HTTP protocol and standardised by the Internet Engineering Task Force (IETF). The purpose of SIP is to enable initiating, terminating interactive call sessions and changing parameters of ongoing sessions. The simplicity of SIP and the emergence of JAIN-SIP  have facilitated the development and implementation of platform-independent IP telephony services. Multimedia sessions enable communicating via voice, video and text. SIP messages are either requests or responses and use Session Description Protocol (SDP) in order to determine and negotiate session parameters at either endpoint. SIP supports name mapping and redirection functionalities and, thus, permits user mobility. A typical SIP architecture consists of SIP user agents (UAs) and servers.
4. Software-defined radio (SDR)
Software-defined radio (SDR)  is a wireless communication device that employs software to perform most of the operations that are traditionally done by hardware in conventional radio circuits. Similar to the first radio receivers, SDR uses the same hardware for antenna and RF amplifiers. Unlike traditional radios that are based upon hardware to perform modulation and demodulation, software-defined radios are dependent on software to achieve filtering, modulation and demodulation. The IF signal is sampled and converted to digital signal that can be manipulated using software. Common modules between traditional radio and SDR include the antenna and the D/A and A/D converters. Some SDR implementations are freely available using field-programmable gate arrays (FPGA) .
5. Overview of 10-Mbps Ethernet
The core protocol of the Internet is the Ethernet protocol, which is based upon serial digital communications. This section provides an overview on the 10-Mbps Ethernet standard. The composition of Ethernet frames (at the MAC sub-layer) and the generation of differential signals at the physical interface (Phy) layer can be implemented on different hardware types as well as FPGA through hardware description language (HDL) code. For 10-Mbps Ethernet, Manchester encoding is utilised, where every bit of information is encoded as a transition from 1 to 0 or from 0 to 1.This is advantageous for the synchronisation between the sender and the receiver and for the recovery of the transmission clock. This encoding method prohibits sending consecutive zeros or ones, which appear as constant DC signal in a conventional RZ encoding. Since every bit of information is composed of two voltage levels, the reference clock is at 20 MHz (double the baud rate).
To identify the beginning of an Ethernet frame, a special pattern of bits is sent, which consists of preamble and a start of frame delimiter (SFD). The preamble and SFD are sent prior to the actual data. The pattern ‘10’ is repeatedly sent, such that a total of 62 bits of 101010 are followed by 11. The last byte (SFD) is 10101011. In hexadecimal, the preamble is 7 bytes of 0x55 followed by a single SFD byte of 0xD5. The first byte that is sent is 0x55, whereas the byte 0xD5 is sent last. The leftmost bytes are sent first, of which the rightmost bits (LSB) are sent first. This is why the first byte in the preamble 10101010 is sent from right to left, as 0x55, i.e., the first bit to be transmitted, is 0. Data are usually transferred from an FPGA to the Ethernet port through a physical interface. Taking into consideration the media-independent interface (MII) standard, where the Phy interface communicates nibbles (4 bits) at a time, the SFD 10101011 byte is sent as 0xD and 0x5, since the lower nibble 0xD (in binary, 1011) is sent first starting by 1 (rightmost bit). The reference clocks are 2.5 and 25 MHz for 10-Mbps and 100-Mbps Ethernet, respectively. Reduced MII (RMII) and serial MII (SMII) are two reduced versions of MII, where 2-bit and 1-bit bus widths are used for the Phy, respectively. Compared to the 10-Mbps MII, the gigabit MII (GMII) communicates through 8-bit width bus with a reference clock of 125 MHz. However, the 10-Gbit MII (XGMII) standard deals with 32 bits of data at a time.
Some implementations of Ethernet on FPGA depend upon finite state machines (FSM) programmed in HDL, such as VHDL. Several open-source codes  offer Ethernet implementations in VHDL or Verilog.
This review chapter contains an overview of telecommunications protocols that are part of modern telecommunications systems. This chapter also provides an overview on analogue and digital signal modulation techniques that are currently used in many research fields including BCI. The researcher in BCI domain as well as the electrical engineering student may find the flow of information smooth and convenient.
The information in this chapter are intended to introduce the reader as well as the researcher in BCI to the core concepts in communications and to analogue and digital telecommunications protocols in an easy-to-follow approach supported with multiple figures and mathematical expression.
The topics covered in this chapter include core concepts in electrical signals, communications, telecommunications protocols as well as other related topics including communications media, analogue and modulation techniques, software-defined radio, 10-Mbps Ethernet protocol and SIP protocol. The topics in this chapter are presented in an easy and simple style with a number of figures to explain the basic principles and fundamentals of telecommunications protocols.