Article Directory
- Preface
- 1. Basic concepts of the physical layer
- 2. Transmission media below the physical layer
- 3. Transmission method
- 4. Coding and Modulation
-
- 4.1. Commonly used terms in data communication
- 4.2. Encoding
- 4.3. Modulation
- 4.4. Symbols
- 5. The limit capacity of the channel
Preface
Because I want to learn the front-end knowledge to understand computer networks, I don’t have high requirements for the physical layer, I just understand some simple skins.
If you want to learn better, you have to look at the principles of communication. I will put aside the study in this area for now.
1. Basic concepts of the physical layer
1.1. Problems to be solved by the physical layer
The physical layer considers how to transmit data bit streams on the transmission media connected to various computers .
The physical layer shields the difference of various transmission media for the data link layer, so that the data link layer only needs to consider how to complete the protocols and services of this layer, instead of considering the specific transmission media of the network.
1.2. The main tasks of the physical layer protocol
1.2.1. Mechanical characteristics
Specify the shape and size of the connector used in the interface, the number and arrangement of pins, and the fixing and locking devices.
1.2.2. Electrical characteristics
Indicate the range of voltages that appear on each line of the interface cable.
1.2.3. Features
Indicate the meaning of a certain level of voltage appearing on a certain line.
1.2.4. Process characteristics
Indicate the order of occurrence of various possible events for different functions.
2. Transmission media below the physical layer
2.1. Guided transmission media
In guided transmission media, electromagnetic waves are guided to propagate along the solid media.
2.1.1. Coaxial cable
Baseband coaxial cable (50 ohms) is used for digital transmission, used for local area network in the past, and now the field of local area network uses twisted pair
Broadband coaxial cable (75 ohms for analog transmission, currently mainly used for cable TV
2.1.2. Twisted pair
The role of twisting
Resist part of electromagnetic interference from the outside world
Reduce electromagnetic interference from adjacent wires
For current household Ethernet, at least Category 5 (5E) twisted pair cable should be used
Shielded twisted pair has better anti-interference performance than unshielded twisted pair, but the price is more expensive.
2.1.3. Optical fiber
2.1.3.1. Multimode fiber
Light is transmitted forward through continuous total reflection in multimode fiber
Due to the dispersion problem, the light in the multimode fiber will cause the pulse broadening problem
Multimode fiber is only suitable for short-distance transmission (in buildings)
Multimode fiber does not require high light source . Inexpensive light-emitting diodes can be used as the light source. Correspondingly, photodiodes can be used to detect light pulses.
2.1.3.2. Single-mode fiber
The diameter of a single-mode fiber is only one wavelength of light. The light travels forward without total reflection .
Single-mode fiber has no pulse broadening problem
Single-mode optical fiber is suitable for long-distance transmission and has low attenuation, but its manufacturing cost is high and the requirements for light source are high .
An expensive laser generator must be used as the light source. Correspondingly, a laser detector is required to detect light pulses.
2.1.4. Power line
Not a new technology (it appeared in the 1920s)
For households or small businesses, it is only used when it is impossible or unwilling to deploy network cables.
2.2. Unguided transmission media
Unguided transmission media refers to free space.
2.2.1. Radio waves
Low frequency LF and intermediate frequency MF frequency bands, using ground wave transmission
High frequency HF and VHF frequency band, rely on ionospheric reflection for transmission
2.2.2. Microwave
Straight line propagation, can penetrate the ionosphere
The 100-meter ground generation tower, the maximum line-of-sight LOS transmission distance is 100 kilometers
Geostationary satellite
Low-orbit satellite
2.2.3. Infrared
Point-to-point transmission
Straight line transmission, no obstacles in the middle, short transmission distance
Low transmission rate (4Mb/s ~ 16Mb/s)
Already obsolete on laptops
2.2.4. Visible light
LiFi has a higher transmission rate than WiFi
Currently still in the experimental research stage
2.3. Radio Spectrum Management Agency
2.3.1. China
Radio Administration of the Ministry of Industry and Information Technology (National Radio Office)
2.3.2. United States
Federal Communications Clerk FCC
2.3.3. ISM frequency band
ISM (Industrial, Scientific, Medical) frequency band
The US ISM frequency bands are 915MHz, 2.4GHz, 5.8GHz
The ISM frequency band of different countries may be slightly different
3. Transmission method
3.1. Serial transmission and parallel transmission
Serial transmission Bits are transmitted one after another on a transmission line. It is suitable for long-distance transmission, and computer networks use this kind of transmission.
Parallel transmission Multiple bits are simultaneously transmitted on multiple transmission lines. It is not suitable for long-distance transmission and the cost is too high. This kind of transmission is used inside the computer.
3.2. Synchronous transmission and asynchronous transmission
Synchronous transmission Bits are transmitted one after another with no gap in between, and the duration of each bit is equal. There are two ways to synchronize the clocks of the sender and receiver.
External synchronization: Add a separate clock signal line between the sender and receiver.
Internal synchronization: The transmitter encodes the clock synchronization signal into the transmitted data and transmits it together (for example, Manchester encoding).
Asynchronous transmission is transmitted in bytes. The interval between bytes is not fixed, but the bit duration in each byte is the same. In other words, the bytes are asynchronous, but the bits are still synchronous. To this end, a start bit and an end bit need to be added to each byte.
3.3. Simplex, half-duplex, and full-duplex transmission
Simplex One-way communication, such as broadcast.
Half - duplex Two-way alternate communication (not at the same time), such as walkie-talkie.
Full duplex Two-way simultaneous communication, such as a telephone.
4. Coding and Modulation
4.1. Commonly used terms in data communication
4.1.1. Message
The text, pictures, audio, and video that require computer processing are collectively referred to as messages.
4.1.2. Data
Data is the entity that carries the message. The computer can only process binary data.
4.1.3. Signal
Signal is the electromagnetic representation of data
4.1.3.1. Baseband signal
The original electrical signal from the source is called the baseband signal
4.1.3.1.1. Digital baseband signal
For example, in the computer, the signal transmitted between the CPU and the memory.
4.1.3.1.2. Analog baseband signal
For example, the audio signal generated after the microphone collects the sound.
4.2. Encoding
4.2.1. The digital signal is converted into another digital signal and transmitted in the digital channel
For example, Ethernet uses Manchester encoding, 4B/5B, 8B/10B and other encodings.
4.2.2. Convert analog signal to digital signal and transmit in digital channel
For example, pulse code modulation PCM, which encodes audio signals.
4.2.3. Commonly used codes
4.2.3.1. Non-return to zero coding
There will be no zero level during the entire symbol time
There is a synchronization problem, and an additional transmission line is needed to transmit the clock signal to synchronize the sender and receiver.
For computer networks, I would rather use this transmission line to transmit data signals than to transmit clock signals.
4.2.3.2. Zeroing code
The signal must be "returned to zero" after the transmission of each symbol, so the receiver only needs to sample after the signal is returned to zero, without a separate clock signal.
In fact, return-to-zero encoding is equivalent to encoding the clock signal in the data in a "return-to-zero" manner, which is called a "self-synchronization" signal.
However, most of the data bandwidth in the return-to-zero coding is used to transmit the "return-to-zero" and wasted.
4.2.3.3. Manchester encoding
The level jump occurs at the middle of the symbol, which represents both the clock and the data
Positive transition means 1 or 0, negative transition means 0 or 1, which can be customized
Traditional Ethernet (10Mb/s) uses this code
4.2.3.4. Differential Manchester encoding
The level jump occurs at the middle of the symbol, and the jump only represents the clock.
Whether the level changes at the beginning of the symbol indicates data.
Compared with Manchester encoding, it has less changes and is more suitable for higher transmission rates.
4.3. Modulation
4.3.1. Convert digital signal to analog signal and transmit in analog channel
For example, WiFi uses complementary code keying CCK/direct sequence spread spectrum DSSS/orthogonal frequency division multiplexing OFDM and other modulation methods.
4.3.2. Convert the analog signal to another analog signal and transmit it in the analog channel
For example, voice data is loaded into an analog carrier signal for transmission.
Frequency division multiplexing FDM technology makes full use of bandwidth resources.
4.3.3. Basic modulation (binary system)
4.3.3.1. AM
The modulated signal consists of two basic waveforms with different amplitudes.
Each basic waveform can only represent 1 bit of information.
4.3.3.2. FM
The modulated signal consists of two basic waveforms with different frequencies.
Each basic waveform can only represent 1 bit of information.
4.3.3.3. Phase Modulation PM
The modulated signal consists of two basic waveforms with different initial phases.
Each basic waveform can only represent 1 bit of information.
4.3.4. Mixed modulation (multiple system)
For example, a quadrature amplitude modulation QAM in which phase and amplitude are mixed and modulated.
QAM16 can modulate 12 kinds of phases, each phase has 1 or 2 kinds of amplitudes to choose from.
16 basic waveforms can be modulated, and each waveform can correspond to 4 bits.
4.4. Symbols
When using time-domain waveforms to represent digital signals, they represent basic waveforms of different discrete values.
Simply put, a symbol is a basic modulated waveform that can represent bit information.
5. The limit capacity of the channel
5.1. Factors that cause signal distortion
5.1.1. Symbol transmission rate
5.1.2. Signal transmission distance
5.1.3. Noise interference
5.1.4. Transmission media quality
5.2. Nyquist criterion
Under the assumed ideal conditions , in order to avoid inter-symbol interference , the symbol transmission rate has an upper limit.
The highest symbol transmission rate of the ideal low communication channel = 2W Baud = 2W symbols/sec
Ideal maximum symbol transmission rate with communication channel = W Baud = W symbols/sec
5.2.1. The highest symbol transmission rate of an ideal low communication channel
2W Baud = 2W Baud = 2W symbols/sec
Among them, W is the channel bandwidth, and the unit is Hz.
5.2.2. The highest symbol transmission rate with an ideal channel
W Baud = W baud = W symbols per second
Among them, W is the channel bandwidth, and the unit is Hz.
5.2.3. The relationship between baud rate and bit rate
The symbol transmission rate is also called baud rate, modulation rate, waveform rate or symbol rate. It has a certain relationship with the bit rate.
When 1 symbol only carries 1 bit of information, the baud rate (symbols/sec) and the bit rate (bits/sec) are equal in value;
When 1 symbol carries n bits of information, when the baud rate is converted to bit rate, the value must be multiplied by n.
5.2.4. Matters needing attention
The highest symbol rate that the actual channel can transmit is significantly lower than the upper limit given by the Nyquist criterion. This is because the actual channel will also be interfered by many other factors (such as noise interference, signal attenuation, transmission media quality, etc.).
To increase the information transmission rate (bit rate), it is necessary to try to make each symbol carry more bits of information. This requires a pluralistic system.
It is not that an unlimited increase in the number of bits carried by each symbol can increase the transmission rate of information without limitation. Because the limit information transmission rate of the channel is also limited by the actual signal-to-noise ratio when the signal is transmitted in the channel.
5.3. Claude Shannon Official
The limit information transmission rate of a channel with limited bandwidth and interference from Gaussian white noise.
5.3.1. The limit information transmission rate of the channel
c = W x log2 (1 + S/N)
c: The limit information transmission rate of the channel (unit: b/s)
W: channel bandwidth (unit: Hz)
S: The average power of the signal transmitted in the channel
N: Gaussian noise power in the channel
S/N: Signal-to-noise ratio, using decibels (dB) as the unit of measurement. Signal to noise ratio (dB) = 10 x log1(S/N)(dB)
5.3.2. Matters needing attention
The information transmission rate that can be achieved on the actual channel is much lower than the limit transmission rate of this formula. This is because in the actual channel, the signal has to receive other damages, such as various impulse interference, signal attenuation and distortion in transmission, etc. These factors are not considered in the Shannon formula.
The greater the channel bandwidth or the signal-to-noise ratio in the channel, the higher the limit transmission rate of information.
5.4. The significance of the Nyquist criterion and Shannon's formula
In the case of a certain channel bandwidth , according to the Nyquist criterion and Shannon’s formula, if you want to increase the transmission rate of information, you must adopt a multiplex system (a better modulation method) and strive to improve the signal-to-noise ratio in the channel .
Since the publication of Shannon’s formula, various new signal processing and modulation methods have continued to appear, all of which aim to get as close as possible to the transmission rate limit given by Shannon’s formula.