Computer Network (Physical Layer)

Preface

Open a new pit and review the knowledge of the physical layer.

text

Come step by step

communication basics

1. Data signals and symbols

Data:

Data is the information we want to transmit and can be in any form such as text, images, audio or video. In digital communications, this data is converted into digital form so that it can be transmitted and processed between computer systems or communication devices. Data can be discrete (such as digital text) or continuous (such as audio signals), and in digital communications are usually represented in binary form, that is, a sequence of bits composed of 0s and 1s.

Signal:

Signals are electrical or electromagnetic waves that travel through a communications channel while transmitting data. The signal can be an analog signal or a digital signal. Analog signals are continuous signals whose values ​​continuously change within a certain range and can be represented as continuous waveforms. Digital signals are discrete signals whose values ​​can only take on specific values ​​at discrete moments, usually 0 or 1. Digital signals are more common in digital communications systems because they are easier to process and transmit.

Symbol:

A code element is the basic unit that represents a certain amount of data in digital communications. In digital communications, data is split into different symbols, each symbol representing a specific set of bit sequences. For example, in a binary system, a symbol can be one bit (0 or 1) or a combination of multiple bits, such as 2 bits (00, 01, 10, 11) or a combination of more bits. The selection and representation of symbols are affected by the modulation technology and signal transmission environment.

In a digital communication system, data is converted into a series of symbols and then transmitted to the receiving end through the communication channel. At the receiving end, these symbols are decoded and restored to the original data, thus completing the data transmission process.

To sum up, data is the information we want to transmit, signals are electrical or electromagnetic waves used to transmit data on communication channels, and symbols are the basic units that represent a certain amount of data in digital communications. Together, these three form the basic elements in digital communication systems.

2. Information source, channel and information destination

Source:

Source refers to the source of information, that is, the place where the information is generated and sent. The source can be any entity that generates information, such as the sounds produced when humans speak, images captured by cameras, data collected by sensors, etc. In communication systems, source information usually exists in digital form, so analog-to-Digital Conversion (ADC) is required to convert analog signals into digital signals for transmission and processing in digital communication systems.

Channel:

A channel is the medium or path through which information travels during transmission. It can be a wireless channel in the air, a cable, an optical fiber, etc. In the channel, signals may be affected by interference, noise, and attenuation, resulting in distortion of information transmission. The design of communication systems needs to consider channel characteristics to select appropriate modulation and coding technologies, as well as error correction codes (Error Correction Codes) to improve the reliability and robustness of information transmission.

Destination:

The destination is the destination of information, that is, the place where the information is ultimately delivered and received. At the information sink, the receiving device will perform demodulation and decoding operations to convert the digital signal back to the original information form so that the user or system can understand and process it. In a digital communication system, the receiving end usually performs a reverse operation, that is, converts the digital signal into an analog signal (Digital-to-Analog Conversion, DAC) or digital form of information, so that it can be perceived by humans or processed by other systems.

In a complete communication system, the information source generates information, transmits the information through the channel, and finally reaches the information sink, realizing the transmission and exchange of information. Designing and optimizing channel transmission systems to ensure efficient and reliable transmission of information is one of the key tasks in the field of communication engineering.

From the perspective of the interaction between the two parties, it can be divided into three interaction methods:

1. One-way communication: Communication in only one direction without communication in the opposite direction, requiring only one channel, such as television broadcasting and radio broadcasting

2. Half-duplex communication: Both parties in the communication can send or receive information, but neither party can send and receive information at the same time. In this case, two channels are required.

3. Full-duplex channel: Both parties to the communication can send and receive information at the same time. In this case, two channels are also required.

3. Rate, baud and bandwidth

Rate:

Rate refers to the number of bits transmitted per second (bits per second, bps) in digital communication. It represents the amount of information or data contained in a digital signal. Rate is usually expressed in bits per second (bps). In some cases, it may also be expressed in larger units such as kilobits per second (kbps), megabits per second (Mbps), or gigabits per second (Gbps).

In digital communications, the rate determines the speed of data transmission, that is, how much information can be transmitted per unit time. Increasing transmission rates often requires the use of higher frequencies or more complex modulation and coding techniques to transmit more data within a limited spectrum.

Baud:

Baud refers to the number of signal changes per second, which is the symbol transmission rate of the signal. A baud can represent the transmission of one symbol or symbol per second. In modulation techniques, the baud rate represents the speed of change in an analog signal, for example in amplitude modulation (AM) or frequency modulation (FM), the baud rate refers to the frequency of the signal. In digital communications, the baud rate refers to the transmission rate of symbols, and the relationship between it and the number of bits transmitted per second depends on the number of bits carried by each symbol.

Bandwidth:

Bandwidth refers to the frequency range occupied by a signal in the frequency domain. In communications, bandwidth refers to the width of a signal's spectrum, that is, the range between the signal's highest and lowest frequencies. Bandwidth determines the spectrum resources required for signals in the channel. During the modulation and demodulation process, the bandwidth limits the upper limit of signal transmission, and signals beyond the bandwidth range will not be transmitted correctly.

There is a certain relationship between bandwidth and the baud rate of the signal. According to the Nyquist Theorem, the relationship between bandwidth (B) and baud rate (R) can be expressed by the following formula:

B = 2R 

This formula states that, ideally, the bandwidth of a signal should be twice the baud rate of the signal. However, in actual communication systems, the actual bandwidth may be subject to some limitations due to the shape and transmission characteristics of the signal, so appropriate modulation and filtering techniques need to be adopted to ensure that the signal is transmitted within a given bandwidth.

4. Nyquist’s theorem and Shannon’s theorem

1. Nyquist theorem

The Nyquist Theorem, also known as the Nyquist criterion, is a basic communication theory theorem proposed by American engineer Harry S. Nyquist in the 1920s. The Nyquist theorem provides the theoretical basis for digital signal transmission. It focuses on how to determine the maximum reliable transmission rate in a limited-bandwidth channel.

The expression of Nyquist theorem:

Under ideal transmission conditions, the Nyquist theorem can be expressed as: In a channel with a bandwidth of B (Hz), the maximum reliable transmission data rate (in bits per second, bps, as a unit) is 2B, also That is, the highest frequency of the signal is twice the signal transmission rate.

The expression of this theorem can be expressed by the following formula:

R = 2B 

Among them, R is the maximum reliable transmission rate (baud rate, bps), and B is the bandwidth of the channel (Hz).

Explanation and application of the theorem:

The essence of the Nyquist theorem is that it tells us that within a limited bandwidth, we can transmit digital signals at a rate of 2B, and the original signal can be completely restored without noise and interference. This means that if the signal transmission rate exceeds 2B, the spectrum of the signals will overlap, causing interference between signals, making the receiving end unable to correctly identify the transmitted signal.

The Nyquist theorem has a wide range of applications, especially in the field of digital communications. When designing digital communication systems, engineers will choose appropriate modulation techniques and transmission rates based on the bandwidth of the channel to ensure that signals can be transmitted reliably within a given bandwidth. At the same time, the Nyquist theorem also provides a theoretical basis for the capacity limit of communication systems, helping engineers optimize system performance and improve the reliability of data transmission.

2.Shannon’s theorem

Shannon's Theorem, also known as the Fundamental Theorem of Information Theory, is a basic communication theory theorem proposed by American mathematician Claude Shannon in 1948. This theorem lays the foundation for modern communication systems and information theory, describing the maximum transmission rate of information in a communication channel with noise.

The main contents of Shannon's theorem:

1. Channel Capacity:

Shannon's theorem shows that in a channel with a bandwidth of B (Hz), if the signal-to-noise ratio (SNR) of the channel is S/N (expressed in a linear scale), then the maximum reliability of the channel The transmission rate (channel capacity) C (in bits per second, bps,) can be expressed by the following formula:

This formula illustrates that under the conditions of given bandwidth and signal-to-noise ratio, the maximum reliable transmission rate of the channel is limited. If the SNR is higher, the channel capacity is larger, which means more information can be transmitted. If the SNR is very low, that is, the signal noise is relatively large, then the channel capacity will be limited and the transmitted information rate will also be affected.

2. Data compression and error correction:

Shannon's theorem also points out that in communication systems, information can be represented as a shorter bit sequence through technologies such as data compression and error correction codes (Error Correction Codes), and it can be restored through decompression and error correction operations at the receiving end. , thereby improving the efficiency and reliability of information transmission. These technologies are widely used in modern communications and information transmission.

The meaning and application of Shannon's theorem:

Shannon's theorem provides an important theoretical basis for the design and performance analysis of communication systems. It guides communication engineers how to design efficient and reliable communication systems under limited bandwidth and limited signal-to-noise ratio conditions. In addition, Shannon's theorem also has important applications in information theory, data compression, cryptography and other fields, laying a solid foundation for the development of information science and communication technology.

5. Coding and Modulation

1. Encoding digital data into digital signals

In digital communications, different encoding methods are used to convert digital data into signals for transmission over a communications channel. The following is a detailed introduction and corresponding examples of some common encoding methods:

1. Return to zero encoding (NRZ, Non-Return-to-Zero):

In return-to-zero encoding, 1 represents high level and 0 represents low level. The signal level of the data bit remains constant throughout the bit interval. Return-to-zero encoding is less likely to cause signal distortion, but clock synchronization problems may occur.

Example: The original data is 10110, and the signal after return-to-zero encoding is: 101100

2. Non-Return-to-Zero Level (NRZ-L, Non-Return-to-Zero Level):

In non-return-to-zero coding, 1 represents high level and 0 represents low level. Unlike return-to-zero coding, in non-return-to-zero coding, the signal level remains constant throughout the bit interval, whereas in return-to-zero coding, the signal level changes every clock cycle.

Example: The original data is 10110, and the non-return-to-zero encoded signal is: 111000

3. Non-Return-to-Zero Inverted (NRZI, Non-Return-to-Zero Inverted):

In reverse non-return-to-zero coding, the signal level of 1 changes, while the signal level of 0 does not change. If there are two consecutive 1's, the signal level of the second 1 will be inverted.

Example: The original data is 10110, and the signal after reverse non-return to zero encoding is: 110011

4. Manchester Encoding:

In Manchester coding, each bit period is divided into two sub-periods, and the transition of the signal represents a binary bit. The specific rules are: a high level represents 0, and a transition from high to low represents 1.

Example: The original data is 10110, and the Manchester encoded signal is: 10 01 01 10

5. Differential Manchester Encoding:

In differential Manchester encoding, transitions in the signal represent 0, while no transitions represent 1. The initial state of a signal (high or low) represents the value of a binary bit, while subsequent transitions represent data bits.

Example: The original data is 10110, and the signal after differential Manchester encoding is: 01 10 01 01

6. 4B/5B encoding:

4B/5B encoding is an encoding method that uses 5 bits to represent 4 data bits. It is often used in communication standards such as Ethernet for clock synchronization and error detection during data transmission. It ensures that there are not too many consecutive zeros or ones in the transmission, which is beneficial to clock recovery.

Example: The original data is 1011, the 4B/5B encoded signal is: 11010

2. Modulation of digital data into analog signals

This technology converts digital signals into analog models at the transmitting end, and restores analog signals to digital signals at the receiving end, corresponding to the modulation and demodulation processes of the modem respectively. The basic digital modulation methods are as follows: Amplitude shift keying ( ASK, amplitude), frequency shift keying (FSK, frequency), phase shift keying (PSK, phase), and quadrature amplitude modulation (QAM, superimposed amplitude and phase)

1. Amplitude shift keying (ASK):

This is done by changing the amplitude of the carrier signal to represent the digital ones and zeros. The advantage of this method is that it is simple to implement, but it is easily affected by gain changes, has weak anti-interference ability, and is an inefficient modulation technology. On telephone lines, the rate is usually only 1200bps.

2. Frequency shift keying (FSK):

This is done by changing the frequency of the carrier signal to represent the digital ones and zeros. This technology has good anti-interference performance, but takes up a large bandwidth. On telephone lines, full-duplex operation can be achieved using FSK, typically achieving rates of 1200bps.

3. Phase shift keying (PSK):

This is done by changing the phase of the carrier signal to represent the digital ones and zeros. This modulation technology has the best anti-interference performance, and the phase change can also be used as timing information to synchronize the clocks of the transmitter and receiver, and double the transmission rate.

4. Quadrature Amplitude Modulation (QAM):

This is done by superimposing changes in the amplitude and phase of the carrier signal to represent the digital ones and zeros. This modulation method is very effective in high-speed data transmission as it provides higher data transmission rates and better spectral efficiency. The information transfer rate of QAM technology can vary depending on the number of phases and amplitudes employed. For example, if 16 phases and 16 amplitudes are used, the information transmission rate of this QAM technology can reach 4 times that of ASK, 4 times that of FSK, and 4 times that of PSK.

3. Encoding analog data into digital signals

It mainly includes three steps: sampling, quantization and encoding, but before introducing these three steps, let’s introduce it first

Sampling theorem:

In the field of communications, bandwidth refers to the difference between the highest frequency and the lowest frequency of a signal, and the unit is HZ. Therefore, when converting an analog signal into a digital signal, it is assumed that the maximum frequency in the original signal is f, Then the sampling frequency f must be greater than or equal to twice the maximum frequency f to ensure that the sampled digital signal completely retains the information of the original analog signal (the sampling theorem is also called the Nyquist theorem)

sampling:

Sampling is to periodically scan the analog signal, turning the time-continuous signal into a time-discrete signal.

Quantification:

Quantization is to convert the level amplitude obtained by sampling into the corresponding digital value according to a certain classification standard and take an integer, thus converting the continuous level amplitude into a discrete digital quantity. In fact, the essence of the above two steps is Split and convert

coding:

Coding is to convert the quantization result into the corresponding binary code

4. Analog data is modulated into analog signals

This modulation method can use frequency division multiplexing technology to make full use of bandwidth resources.

6. Datagrams and virtual circuits

Datagram:

Datagram is a method of data transmission in packet-switched networks. It is an independent packet transmitted in a connectionless network. Each datagram takes an individual path to reach its destination. Therefore, datagrams may differ in size and order of arrival, but each datagram is independent of other datagrams. The advantage of this method is that it is highly flexible and can adapt to various network conditions and business needs. However, this may increase network overhead since each datagram requires individual processing and routing.

It has the following characteristics:

  1. Connectionless: No connection is established during datagram transmission, and each datagram chooses its path independently.
  2. Packet transmission: Datagrams are divided into smaller data packets for transmission.
  3. Arrival order may be different: Since each datagram chooses a path independently, the order in which it arrives at its destination may be different.
  4. Reliable delivery is not guaranteed: Datagrams do not guarantee reliable delivery of data and may be lost or duplicated.
  5. Suitable for a variety of network environments: Datagrams are suitable for various network conditions and business needs, and can adapt to the processing requirements of different network nodes.
virtual circuit

A virtual circuit is a logical connection established in a packet-switched network. It can establish a virtual connection path between multiple nodes for transmitting data packets. The establishment and maintenance of virtual circuits is automatically handled by network protocols, so users do not need to care about the underlying network details. The advantage of a virtual circuit is that it can provide reliable communication services and ensure the order and integrity of data. However, because virtual circuits are established and maintained through protocols, they may increase network overhead and latency.

It has the following characteristics:

  1. Connection-oriented: A virtual circuit needs to establish a connection before transmitting data. Once the connection is established, the data packets are transmitted according to the preset path.
  2. Reliable transmission: Virtual circuits establish and maintain connections through protocols, which can ensure the order and integrity of data.
  3. Sequential arrival: Since the virtual circuit transmits data packets along a preset path, the order in which they arrive at the destination is determined.
  4. Suitable for long-term data exchange: Virtual circuits are suitable for long-term data exchange and can maintain the connection state for data transmission.
  5. Fixed bandwidth: A virtual circuit usually allocates a fixed bandwidth when establishing a connection, so a certain transmission rate can be guaranteed during use.

In general, datagrams and virtual circuits have their own advantages and applicable scenarios. Where flexibility and simplicity are required, datagrams may be more appropriate; where reliable communication and sequential delivery are required, virtual circuits may be more appropriate.

Transmission medium

Twisted pair:

Twisted pair cable is a common transmission medium, mainly used in the production of telephone lines and Ethernet cables. Its advantages include low cost, ease of use, easy maintenance and long transmission distance. The transmission rate of twisted pair can be as high as 100Mbps, which is suitable for short-distance communication and LAN interconnection.

Coaxial cable:

Coaxial cable is a transmission medium with a shielded layer and is commonly used for television signal transmission and broadband network construction. Its advantages include strong anti-interference ability, long transmission distance, and stable signal quality. The transmission rate of coaxial cable can reach 100Mbps, but the rate will decrease as the distance increases.

optical fiber:

Optical fiber is a medium that uses optical signals for data transmission. It has the advantages of long transmission distance, fast transmission speed, large transmission capacity, and strong anti-interference ability. The transmission rate of optical fiber can reach 10Gbps, which is suitable for long-distance and large-capacity data transmission. Fiber optic cables are more expensive to manufacture and maintain, but as technology continues to develop, prices are gradually falling.

Wireless transmission medium:

Wireless transmission media uses electromagnetic waves to propagate data in free space for communication. It has the advantages of being unrestricted by geographical location and being flexible in deployment and access methods. Commonly used wireless communication methods include shortwave communication, microwave communication and Bluetooth. Wireless communication is suitable for mobile devices and other occasions that require remote communication, but due to interference from the environment and other factors, the transmission rate and stability may be reduced.

Conclusion

Most of the knowledge about the physical layer is here. It seems that I may have skipped some small points, but it doesn't matter. Anyway, it's over!!

Guess you like

Origin blog.csdn.net/m0_73872315/article/details/134224680