Compilation of computer network knowledge - Summary of physical layer knowledge (Computer Network Getting Started Reference Guide)

Chapter 2 Physical Layer

2.1 What do we need to learn about the physical layer?

In fact, for programmers, the physical layer is transparent to the applications we develop (the previous chapter mentioned that the details of the services provided by the lower layer are transparent to the upper layer), and the physical layer involves data communication. Related concepts, therefore, we only need to have a general understanding of the physical layer. Of course, interested readers can study it in more depth.

2.2 Basic knowledge of data communication

2.2.1 Commonly used terms

In the process of learning the physical layer, we will encounter many professional terms. The following are some of the more commonly used terms.

  • Data: The entity that carries the message.
  • Signal: The electrical or electromagnetic manifestation of data, which is the form in which data exists during transmission.
  • Analog signal: The values ​​of the parameters representing the message are continuous.
  • Digital signal: The values ​​of the parameters representing the message are discrete.
  • Code element: In digital communication, symbols with the same time interval are often used to represent a binary number. The signal within such a time interval is called a (binary) code element. This interval is called the symbol length. It is worth noting that when the discrete states of a code element are greater than 2 (for example, M is greater than 2), the code element is an M-ary code element.

2.2.2 The concept of channel

2.2.2.1 What is a channel

We often use a channel to represent a medium that transmits information in a certain direction. Channels are not the same as circuits. A communication circuit often contains a sending channel and a receiving channel.

2.2.2.2 Information interaction method

From the perspective of the way in which the two parties in communication exchange information, we can divide the information interaction methods into three types:

  • Simplex communication: Also known as one-way communication, there can only be communication in one direction. (Wireless (wired) radio broadcasts and television broadcasts in daily life belong to this type).
  • Half-duplex communication: Also known as two-way alternating communication, two-way communication is allowed, but neither party can send and receive information at the same time. In this case, two channels are required.
  • Full-duplex communication: Also known as two-way simultaneous communication, both parties in the communication can send and receive information at the same time. In this case, two channels are required.

2.2.2.3 Limit capacity of channel

Any actual channel is not ideal. It will produce various distortions and cause various interferences when transmitting signals. The higher the code element transmission rate, or the farther the signal transmission distance, or the worse the transmission media quality, the worse the channel The distortion of the waveform at the output end becomes more serious.

Theoretically, there are two main factors that limit the transmission symbol rate of the channel: the frequency range that the channel can pass and the signal-to-noise ratio .

  • The frequency range that the channel can pass

    When a signal propagates in a channel, the high-frequency part of the signal is attenuated, causing the received signal waveform to lose the clear boundaries between symbols. This phenomenon is called inter-code crosstalk . Nyquist derived the Nyquist criterion , which gave an upper limit on the transmission rate of symbols in order to avoid inter-symbol crosstalk under assumed ideal conditions.

    The derivation process of Ney's criterion belongs to the knowledge of communication principles. Here we only need to remember the important conclusions.

    In any channel, there is an upper limit to the code element transmission rate. If the transmission rate exceeds this upper limit, serious inter-symbol crosstalk will occur, making it impossible for the receiver to identify the code elements.

    If the frequency band of the channel is wider, that is, the more high-frequency components of the signal that can pass through, then symbols can be transmitted at a higher rate without inter-symbol interference.

  • signal-to-noise ratio

    Noise exists in all electronic equipment and communication channels. Noise is generated randomly, and its instantaneous value can sometimes be very large. Therefore, noise will cause errors in the receiving end's judgment of symbols. But the impact of noise is relative. If the signal is relatively strong, then the impact of noise is relatively small. The so-called signal-to-noise ratio is the ratio of the average power of the signal to the average power of the noise (S/N). The unit is dB (decibel). ).

    Shannon used the theory of information theory to derive the ultimate, error-free information transmission rate for a channel with limited bandwidth and interference from Gaussian white noise .

    香农公式:C = Wlog2(1+S/N)
    

    Shannon's formula can be understood as

    It can be concluded from Shannon's formula that the greater the bandwidth of the channel or the signal-to-noise ratio in the channel, the higher the ultimate transmission rate of information.

    Note: For a channel with a determined frequency bandwidth, if the signal-to-noise ratio cannot be improved and the symbol transmission rate reaches the upper limit, then the information transmission rate can be increased by allowing each symbol to carry more information . This method further improves the information transmission rate.

2.2.3 Coding and modulation

  • Encoding: The process of converting data into digital signals.
  • Modulation: The process of converting data into an analog signal.

2.2.3.1 Common encoding methods

After the data is converted into a digital signal, what represents 0 and what represents 1 is the so-called encoding. Commonly used encoding methods for digital signals include the following:

  • return to zero encoding

    Use high level to represent 1 and low level to represent 0. The jump in the middle of each clock cycle will return to zero. The receiver adjusts its clock reference based on this jump. This provides a self-synchronization mechanism for both parties.

  • non-return-to-zero encoding

    Use high level to represent 1 and low level to represent 0. One cycle can be used to transmit data, and the two parties cannot synchronize.

  • Manchester encoding

    Divide the symbol into two identical intervals. The first interval is high level and the latter interval is low level, which represents 1, and the opposite represents 0. The characteristic of this coding rule is that a level jump occurs in the middle of each symbol, and the jump in the middle is both a clock signal and a data signal. Provides a synchronization mechanism.

  • Differential Slow Chester Coding

    There is always a jump at the center of each bit. A transition at the beginning of the bit boundary represents a 0, while a transition at the beginning of the bit represents a 1.

Examples of the four encoding rules are shown in the figure below.

Insert image description here

2.2.3.2 Commonly used modulation methods

Data can be modulated into analog signals, and there are four commonly used modulation methods.

  • Amplitude shift keying (ASK): represents 0 and 1 by changing the amplitude of the carrier signal, while the frequency and phase of the carrier do not change.
  • Frequency shift keying (FSK): represents 0 and 1 by changing the frequency of the carrier signal, without changing the amplitude and phase of the carrier.
  • Phase shift keying (PSK): represents 0 and 1 by changing the phase of the carrier signal, while the amplitude and frequency of the carrier do not change.
  • Quadrature Amplitude Modulation (QAM): Under the premise of the same frequency, amplitude shift keying and phase shift keying are combined to form a superimposed signal.

PS: Just have a little understanding of coding and modulation .

2.3 Basic concepts of physical layer

The physical layer considers how the data bit rate can be transmitted on the transmission media linking various computers , rather than referring to the specific transmission media . The function of the physical layer is to shield as much as possible the transmission differences between the various transmission media and hardware devices in the computer network, so that the services provided to the upper layer (data link layer) are transparent (that is, the data link layer is fundamentally It does not feel the difference in bit stream transmission between different transmission media. It only needs to know that by handing the data frame to the physical layer, it can be transmitted to the data link layer of the target address.)

The protocols used for the physical layer are also often called physical layer protocols.

The main task of the physical layer: determine some characteristics related to the interface of the transmission medium.

  • Mechanical characteristics: Indicate the shape, size, number of pins, etc. of the connector used in the interface.
  • Electrical Characteristics: Indicates the range of voltages present on each line of the interface cable.
  • Functional characteristics: Indicate the meaning of a certain voltage appearing on a certain line.
  • Process characteristics: Specify the order of occurrence of various possible events for different functions.

At the same time, the physical layer is also responsible for completing the conversion of transmission methods . In computers, data is mostly transmitted in parallel , but on transmission media, data is generally transmitted serially, so the physical layer must convert the transmission method.

2.4 Transmission media

2.4.1 Guided transmission media

  • twisted pair

    Twisted pair is the most commonly used transmission medium, consisting of two mutually insulated copper wires that are mixed together according to certain rules.

    Both analog transmission and digital transmission can use twisted pairs, and the communication distance is generally several to more than ten kilometers.

    There are shielded twisted pair and unshielded twisted pair on the market.

Insert image description here

  • coaxial cable

    Coaxial cable consists of an insulating protective jacket layer, an outer conductor shielding layer, an insulating layer and an inner conductor.

    Coaxial cable has good anti-interference properties and is widely used to transmit higher speed data.

    **The bandwidth of coaxial cable depends on the quality of the cable. **50 ohm coaxial cable is commonly used for LAN/digital transmission, and 75 ohm coaxial cable is commonly used for cable TV/analog transmission.
    Insert image description here

  • optical fiber

    Optical fibers, or optical fibers, transmit signals by transmitting pulses of light.

    Since the frequency of visible light is very high, on the order of 10 to the eighth power of MHz, the transmission bandwidth of an optical fiber communication system is much larger than the bandwidth of various other current transmission media.

    Advantages of fiber optics:

    • Very large communication capacity.
    • The transmission loss is small and the relay distance is long.
    • Good anti-lightning and electromagnetic interference performance.
    • No crosstalk interference, good confidentiality.
    • Small size and light weight.

2.4.2 Unguided transmission media

  • radio waves

    Radio waves have strong penetrating capabilities and can be transmitted over long distances, and are widely used in the field of communications. Radio waves can propagate signals in all directions, so receiving devices within range do not need to be pointed in any direction to receive the signal.

  • Microwave, infrared and laser

    There are currently three high-bandwidth wireless communication technologies: microwave, infrared and laser. They require a line-of-sight path between the receiver and sender, strong directionality, and propagation in a straight line.

2.5 Channel multiplexing technology

First of all, we need to understand what multiplexing technology is. Multiplexing is a basic concept in communication technology. Multiplexing technology is widely used in channels in computer networks. It allows users to communicate using a shared channel, reducing costs and improving utilization. Rate.

For example: When host A1 and host A2, host B1 and host B2 use separate channels respectively, two channels are required, and even if a certain group of hosts does not have any communication at the current moment, it will still occupy one channel, resulting in a waste of channel resources. . However, using channel multiplexing technology to allow these two groups of hosts to share the channel can improve channel utilization.
Insert image description here

PS: Channel multiplexing comes at a cost, that is, the shared channel requires larger bandwidth and higher costs, as well as the overhead of multiplexers and demultiplexers. However, if the number of multiplexed channels is large, use channels Reuse is more economical.

2.5.1 Frequency division multiplexing and time division multiplexing

The most basic multiplexing methods are frequency division multiplexing and time division multiplexing.

  • frequency division multiplexing

    Divide the entire bandwidth into multiple shares. After users are allocated a certain frequency band, they will occupy this frequency band throughout the communication process. All users of frequency division multiplexing will occupy different bandwidth resources at the same time (please note that the " "Bandwidth" is the frequency bandwidth rather than the rate at which data is sent).

    The advantage of frequency division multiplexing is that the technology is relatively mature, but the disadvantage is that it is not flexible enough.

Insert image description here

  • time division multiplexing

    Divide time into equal length time division multiplexing frames (TDM frames). Each time division multiplexing user occupies a fixed number of time slots in each TDM frame, and the time slots occupied by each user appear periodically (the period is the length of the TDM frame). All users of time division multiplexing occupy the same frequency bandwidth at different times .
    Insert image description here

    When using a time division multiplexing system to transmit computer data, due to the bursty nature of computer data, the user's utilization of the allocated sub-channel is generally not high. For example: when a user has no data to send temporarily, in the time division multiplexing frame The time slot allocated to this user can only be in idle state.

    In order to solve the above problems, statistical time division multiplexing technology has emerged , which is an enhancement of time division multiplexing technology.

  • statistical time division multiplexing technology

    Statistical time division multiplexing uses STDM frames to transmit multiplexed data. The number of time slots in each STDM frame is less than the number of users connected to the concentrator. Each user sends data to the input buffer of the concentrator at any time, and then The concentrator will scan the input buffer one at a time in order and put the data in the buffer into the STDM frame. If there is no data in the cache, it will be skipped. When a frame is full, it will be sent. Therefore, it can be seen that the STDM frame is not a fixed allocation of time slots, but dynamic allocation on demand. The occupied time slots for each user do not appear periodically. Therefore, we also call statistical time division multiplexing as asynchronous time division multiplexing .
    Insert image description here

2.5.2 Wavelength division multiplexing

Wavelength division multiplexing is frequency division multiplexing of light. Use a single optical fiber to transmit multiple optical carrier signals simultaneously.

Insert image description here

2.5.3 Code Division Multiplexing

Code division multiplexing is also called code division multiple access CDMA . Each user can communicate in the same frequency band at the same time. Because each user uses a specially selected different code pattern, there is no communication between each user. interfere with each other. The signal sent by this system has strong anti-interference ability, its spectrum is similar to white noise, and it is not easy to be discovered by others.

Code division multiplexing was first used for military communications, but with the advancement of technology, it is now widely used in civilian mobile communications, especially in wireless local area networks.

Using CDMA can improve the quality of communication and the reliability of data transmission, reduce the impact of interference on communication, and so on.

The working principle of CDMA is relatively complex and will not be introduced here. Interested readers can consult relevant information.

references

《计算机网络(第7版)》-谢希仁
《2023年计算机网络考研复习指导》-王道论坛

If this article is helpful to you, you may wish to like, forward, and save it~

Guess you like

Origin blog.csdn.net/weixin_42584100/article/details/123973466