Cover
Zacznij teraz za darmo EITF45 övning 1 (FL2) Kodning och störningar och digital kommunikation uppgifter.pdf
Summary
# Pulse code modulation and signal encoding
This topic covers the fundamental principles of Pulse Code Modulation (PCM) for analog-to-digital conversion and explores various digital signal encoding techniques used in communication systems [2](#page=2).
### 1.1 Pulse Code Modulation (PCM)
Pulse Code Modulation (PCM) is a method used in telephony systems for analog-to-digital (A/D) conversion of voice signals. It involves three primary stages: sampling, quantization, and encoding [2](#page=2).
#### 1.1.1 Sampling
Sampling is the process of taking discrete measurements of an analog signal at regular intervals. According to the Nyquist-Shannon sampling theorem, to accurately reconstruct a signal, the sampling rate must be at least twice the highest frequency component of the signal. For example, if a signal has a maximum frequency of 10 kHz, the sampling rate must be at least 20 kHz [2](#page=2).
#### 1.1.2 Quantization
Quantization is the process of approximating the sampled analog values to a finite number of discrete levels. This process introduces quantization error, which is the difference between the actual sampled value and its quantized representation [2](#page=2).
* **Reducing quantization error:** To minimize quantization error, the number of quantization levels can be increased. This typically involves using more bits per sample [2](#page=2).
> **Tip:** Increasing the number of bits per sample leads to a finer resolution in representing the analog signal, thus reducing the quantization error. However, it also directly increases the bit rate of the encoded signal.
* **Impact on bit rate:** Using more bits per sample directly increases the bit rate of the PCM-encoded signal. If a signal is to be encoded with 7 bits, and the sampling rate is $f_s$, the bit rate $R$ is given by $R = n \times f_s$, where $n$ is the number of bits per sample. For instance, a signal with a maximum frequency of 10 kHz, sampled at 20 kHz and encoded with 7 bits per sample, would have a bit rate of $7 \times 20 \text{ kHz} = 140 \text{ kbps}$ [2](#page=2).
#### 1.1.3 Encoding
Encoding is the final step where the quantized samples are converted into a binary digital format.
* **PCM encoding example:** To encode an audio signal with a frequency range of 0-10 kHz using 6-bit data segments, the signal must first be sampled at a rate of at least 20 kHz. Each sample is then quantized to one of $2^6 = 64$ levels. The resulting bit rate would be $6 \text{ bits/sample} \times 20 \text{ ksamples/sec} = 120 \text{ kbps}$. This is the minimum bit rate required to reconstruct the signal accurately [2](#page=2) [3](#page=3).
* **Increasing frequency band:** To increase the frequency band of a PCM-encoded signal, the sampling rate must be increased in accordance with the Nyquist theorem. This, in turn, will increase the bit rate of the encoded signal [2](#page=2).
### 1.2 Signal Encoding Techniques
Signal encoding techniques, also known as line coding, are used to represent digital data as electrical signals for transmission over a communication channel. These methods vary in their complexity, efficiency, and susceptibility to noise [3](#page=3).
#### 1.2.1 Non-Return-to-Zero (NRZ)
Non-Return-to-Zero (NRZ) is a simple encoding scheme where the signal level remains constant for the duration of a bit. There are two main types:
* **NRZ-L (Level):** A logic '1' is represented by one voltage level, and a logic '0' by another.
* **NRZ-I (Invert):** A transition in the signal indicates a logic '1', while no transition indicates a logic '0'.
* **Encoding 10 zeros with NRZ:** If a sequence of ten zeros is to be encoded using NRZ, and assuming NRZ-L where '0' is represented by a low voltage and '1' by a high voltage, the signal would remain at the low voltage for the entire duration of the ten bits [3](#page=3).
#### 1.2.2 Manchester Coding
Manchester coding is a self-clocking encoding scheme where each bit period has a transition in the middle. A transition from low to high in the middle of the bit interval can represent a '0', and a transition from high to low can represent a '1' (or vice versa, depending on the convention). The presence of a transition in every bit period helps the receiver synchronize with the transmitter's clock.
* **Encoding 10 zeros with Manchester:** For a sequence of ten zeros using Manchester coding, assuming a low-to-high transition represents '0', there would be a low-to-high transition in the middle of each bit period for all ten bits [3](#page=3).
* **Decoding Manchester coded signals:** To decode a Manchester coded signal, one observes the transitions. A transition from low to high in the middle of a bit interval typically signifies a '0', while a transition from high to low signifies a '1'. The receiver synchronizes to these mid-bit transitions to determine the bit value [3](#page=3).
### 1.3 Bit Rate and Bit Duration
The bit rate is the number of bits transmitted per second, usually measured in bits per second (bps), kilobits per second (kbps), or megabits per second (Mbps). The bit duration is the time it takes to transmit a single bit. They are inversely related:
* **Bit Rate (R):** Measured in bits per second (bps).
* **Bit Duration ($T_b$):** Measured in seconds (s).
$$ R = \frac{1}{T_b} $$
$$ T_b = \frac{1}{R} $$
* **Calculating Bit Rate:**
* If a bit lasts for 1 millisecond ($1 \times 10^{-3}$ s), the bit rate is $R = \frac{1}{1 \times 10^{-3} \text{ s}} = 1000 \text{ bps} = 1 \text{ kbps}$ [2](#page=2).
* If a bit lasts for 2 microseconds ($2 \times 10^{-6}$ s), the bit rate is $R = \frac{1}{2 \times 10^{-6} \text{ s}} = 500,000 \text{ bps} = 500 \text{ kbps}$ or $0.5 \text{ Mbps}$ [2](#page=2).
* **Calculating Bit Duration:**
* For a bit rate of 100 kbps ($100 \times 10^3$ bps), the bit duration is $T_b = \frac{1}{100 \times 10^3 \text{ bps}} = 10 \times 10^{-6} \text{ s} = 10 \text{ microseconds}$ [2](#page=2).
* For a bit rate of 2 Mbps ($2 \times 10^6$ bps), the bit duration is $T_b = \frac{1}{2 \times 10^6 \text{ bps}} = 0.5 \times 10^{-6} \text{ s} = 0.5 \text{ microseconds}$ [2](#page=2).
### 1.4 Impact of Noise and Errors
Noise and disturbances on a communication channel can corrupt the transmitted bits, leading to bit errors. The probability of a bit error is often denoted by $p$.
* **Bit errors in a packet:** If a packet has $N$ bits and the bit error probability is $p$, the probability that a packet of $N$ bits does not arrive correctly due to bit errors can be approximated. For a packet of 1024 bits with a bit error probability of 0.005, the probability that at least one bit is in error is $1 - (1-p)^N = 1 - (1 - 0.005)^{1024}$. This value is very close to $1 - e^{-Np} = 1 - e^{-(1024 \times 0.005)} = 1 - e^{-5.12} \approx 0.994$. Therefore, it is highly probable that the packet will not arrive correctly [2](#page=2).
* **Noise impact on different bit rates:** Noise can affect bit streams differently depending on the bit rate. At higher bit rates, the bit duration is shorter, meaning that a burst of noise lasting a certain duration will corrupt fewer bits compared to a lower bit rate signal with a longer bit duration [2](#page=2) [3](#page=3).
* **Example:** If a link experiences a strong disturbance for two milliseconds ($2 \times 10^{-3}$ s):
* At 10 kbps ($10 \times 10^3$ bps), the bit duration is $1/10^4 = 10^{-4}$ s. In 2 ms, $2 \times 10^{-3} \text{ s} / 10^{-4} \text{ s/bit} = 20$ bits can be affected [3](#page=3).
* At 100 kbps ($100 \times 10^3$ bps), the bit duration is $1/10^5 = 10^{-5}$ s. In 2 ms, $2 \times 10^{-3} \text{ s} / 10^{-5} \text{ s/bit} = 200$ bits can be affected [3](#page=3).
* At 1 Mbps ($1 \times 10^6$ bps), the bit duration is $1/10^6 = 10^{-6}$ s. In 2 ms, $2 \times 10^{-3} \text{ s} / 10^{-6} \text{ s/bit} = 2000$ bits can be affected [3](#page=3).
> **Tip:** While higher bit rates are susceptible to corrupting more bits during a sustained noise event, the shorter bit duration means that individual bits are less likely to be affected by very short noise pulses compared to lower bit rate signals.
### 1.5 Amplitude Shift Keying (ASK)
Amplitude Shift Keying (ASK) is a form of amplitude modulation where digital information is transmitted through the amplitude variations of a carrier signal. In ASK, discrete amplitude levels correspond to specific data symbols. For example, in a simple binary ASK system, one amplitude level represents a digital '1' and another amplitude level (often zero or a lower amplitude) represents a digital '0' [3](#page=3).
---
# Digital communication errors and bit rates
Digital communication errors introduce uncertainty into data transmission, impacting bit integrity, while bit rates define the speed of data transfer; understanding these concepts is crucial for reliable digital systems.
## 2 Digital communication errors and bit rates
This section explores the fundamental concepts of digital communication errors, their relationship with noise, and the calculation of bit rates based on bit duration and vice versa. It also addresses how to quantify potential bit errors during interference.
### 2.1 Impact of noise on bit streams
Noise, an undesirable disturbance in a communication channel, can corrupt digital data streams, leading to bit errors. When noise interferes with a signal, it can alter the intended values of bits, causing a '0' to be received as a '1' or vice versa. The susceptibility of a bit stream to noise is not uniform; bit streams transmitted at different bit rates can be affected differently. Higher bit rates mean that each bit is represented by a shorter duration signal pulse. Consequently, a shorter pulse is more vulnerable to corruption by noise within that brief interval compared to a longer pulse representing a bit at a lower bit rate. This means that for a given level of noise, a higher bit rate can potentially lead to a greater number of bit errors [2](#page=2).
### 2.2 Bit rates and bit durations
The bit rate, often denoted as $R$, quantifies the speed at which data is transmitted, typically measured in bits per second (bps). Conversely, the bit duration, often denoted as $T_b$, represents the time interval each individual bit occupies in the data stream. These two parameters are inversely related: a higher bit rate implies a shorter bit duration, and a lower bit rate implies a longer bit duration [2](#page=2).
The fundamental relationship between bit rate and bit duration can be expressed by the following equations:
* **Calculating bit rate from bit duration:**
If the duration of a single bit ($T_b$) is known, the bit rate ($R$) can be calculated as:
$$R = \frac{1}{T_b}$$
* **Calculating bit duration from bit rate:**
If the bit rate ($R$) is known, the duration of a single bit ($T_b$) can be calculated as:
$$T_b = \frac{1}{R}$$
**Example:**
* If a signal has a bit duration of 1 millisecond, its bit rate is calculated as:
$T_b = 1 \text{ ms} = 1 \times 10^{-3} \text{ s}$
$R = \frac{1}{1 \times 10^{-3} \text{ s}} = 1000 \text{ bps} = 1 \text{ kbps}$ [2](#page=2).
* If a signal has a bit duration of 2 microseconds, its bit rate is calculated as:
$T_b = 2 \text{ µs} = 2 \times 10^{-6} \text{ s}$
$R = \frac{1}{2 \times 10^{-6} \text{ s}} = 500,000 \text{ bps} = 500 \text{ kbps}$ [2](#page=2).
**Example:**
* If a signal has a bit rate of 100 kilobits per second (kbps):
$R = 100 \text{ kbps} = 100 \times 10^3 \text{ bps}$
$T_b = \frac{1}{100 \times 10^3 \text{ bps}} = 10 \times 10^{-6} \text{ s} = 10 \text{ µs}$ [2](#page=2).
* If a signal has a bit rate of 2 megabits per second (Mbps):
$R = 2 \text{ Mbps} = 2 \times 10^6 \text{ bps}$
$T_b = \frac{1}{2 \times 10^6 \text{ bps}} = 0.5 \times 10^{-6} \text{ s} = 0.5 \text{ µs}$ [2](#page=2).
### 2.3 Quantifying bit errors during interference
When a data transmission experiences a significant interference over a specific duration, it can lead to a certain number of bits being corrupted. To determine the number of potentially erroneous bits, one needs to know the duration of the interference and the bit rate of the data stream. The total number of bits affected is the product of the interference duration and the bit rate [3](#page=3).
The formula to calculate the number of potentially erroneous bits ($N_{erroneous}$) is:
$$N_{erroneous} = \text{Interference Duration} \times \text{Bit Rate}$$
**Example:**
Suppose a data transfer receives a strong interference for two milliseconds.
* If the bit rate is 10 kilobits per second (kbps):
Interference Duration $= 2 \text{ ms} = 2 \times 10^{-3} \text{ s}$
Bit Rate $= 10 \text{ kbps} = 10 \times 10^3 \text{ bps}$
$N_{erroneous} = (2 \times 10^{-3} \text{ s}) \times (10 \times 10^3 \text{ bps}) = 20 \text{ bits}$ [3](#page=3).
* If the bit rate is 100 kilobits per second (kbps):
Interference Duration $= 2 \text{ ms} = 2 \times 10^{-3} \text{ s}$
Bit Rate $= 100 \text{ kbps} = 100 \times 10^3 \text{ bps}$
$N_{erroneous} = (2 \times 10^{-3} \text{ s}) \times (100 \times 10^3 \text{ bps}) = 200 \text{ bits}$ [3](#page=3).
* If the bit rate is 1 megabit per second (Mbps):
Interference Duration $= 2 \text{ ms} = 2 \times 10^{-3} \text{ s}$
Bit Rate $= 1 \text{ Mbps} = 1 \times 10^6 \text{ bps}$
$N_{erroneous} = (2 \times 10^{-3} \text{ s}) \times (1 \times 10^6 \text{ bps}) = 2000 \text{ bits}$ [3](#page=3).
> **Tip:** Notice how a higher bit rate leads to a significantly larger number of potentially erroneous bits within the same interference duration, highlighting the critical impact of noise on high-speed digital communications.
---
# Amplitude shift keying modulation
Amplitude shift keying (ASK) is a form of amplitude modulation utilized in digital communication systems [3](#page=3).
### 3.1 Concept of ASK
ASK is a method where the amplitude of a carrier signal is varied to represent digital data. Each digital symbol (e.g., a 0 or a 1) is represented by a specific amplitude level of the carrier wave [3](#page=3).
### 3.2 Representation of Digital Data
In a typical binary ASK system, two amplitude levels are used to represent the two binary digits:
* **One amplitude level** (often a non-zero value) represents a digital '1'.
* **Another amplitude level** (often zero amplitude, meaning no signal) represents a digital '0'.
This variation in amplitude directly encodes the binary information onto the carrier signal. The carrier frequency and phase remain constant throughout the transmission.
> **Tip:** The key characteristic of ASK is that the data is modulated by changing the *amplitude* of the carrier signal, while frequency and phase remain unchanged.
---
## Common mistakes to avoid
- Review all topics thoroughly before exams
- Pay attention to formulas and key definitions
- Practice with examples provided in each section
- Don't memorize without understanding the underlying concepts
Glossary
| Term | Definition |
|------|------------|
| Pulse Code Modulation (PCM) | A method used in digital communication systems to digitally represent analog signals. It involves three main steps: sampling, quantization, and encoding, to convert an analog waveform into a sequence of binary digits. |
| Sampling | The process of taking discrete measurements of an analog signal at regular intervals. This converts a continuous-time signal into a discrete-time signal, forming the first step in Pulse Code Modulation. |
| Quantization | The process of approximating the sampled analog values to a finite set of discrete levels. This step introduces quantization error, which is the difference between the actual sampled value and its quantized representation. |
| Encoding | The process of converting the quantized samples into a binary digital format, typically a bitstream, for transmission or storage. This is the final stage of Pulse Code Modulation. |
| Quantization error | The difference between the original analog signal value and its quantized digital representation. Reducing quantization error can be achieved by increasing the number of quantization levels, which in turn increases the bit rate. |
| Bit rate | The number of bits that are transmitted or processed per unit of time, usually measured in bits per second (bps). Increasing the frequency band or the number of bits per sample generally increases the bit rate. |
| Frequency band | The range of frequencies occupied by a signal. Increasing the frequency band of a signal that is to be digitized implies that more information needs to be represented, often leading to higher sampling rates and thus higher bit rates. |
| Bit error probability | The likelihood that a single bit transmitted over a communication channel will be flipped from its original value (0 to 1 or 1 to 0) due to noise or other disturbances. |
| Bitstream | A sequence of bits representing digital data. The integrity of a bitstream can be compromised by bit errors. |
| Interference | Unwanted disturbances that corrupt a signal during transmission. This can manifest as noise or transient errors that affect multiple bits. |
| Bit duration | The amount of time a single bit occupies during transmission. It is inversely related to the bit rate; a shorter bit duration means a higher bit rate. |
| NRZ (Non-Return-to-Zero) | A simple line coding technique where a binary 0 is represented by one voltage level and a binary 1 by another voltage level, without returning to zero voltage between bits. |
| Manchester coding | A line coding scheme where each bit is represented by a transition in the middle of the bit period. For example, a 0 might be a low-to-high transition and a 1 a high-to-low transition, ensuring a transition in every bit period. |
| Amplitude Modulation (AM) | A modulation technique where the amplitude of a carrier signal is varied in proportion to the message signal's instantaneous amplitude. In digital contexts, this is often referred to as Amplitude Shift Keying (ASK). |
| Amplitude Shift Keying (ASK) | A type of amplitude modulation used in digital communication where the amplitude of a carrier signal is switched between different predefined levels to represent binary digits. |
| Noise | Random fluctuations or unwanted disturbances that are superimposed on a signal. Noise can corrupt digital data, leading to bit errors. |