foreword
In the last issue, we have completed the computer network - overview, and know some basic content of computer network. If you missed it, I suggest you go to the previous issue first.
Portal: [Computer Network] Overview of Computer Networks (Super Pictures)
Next, we officially start to learn the first layer in the principle architecture - the physical layer.
content
Basic Concepts of the Physical Layer
In the principle architecture we learned before, it is divided into five layers. Next, let's learn about the physical layer in the principle architecture.
The physical layer considers how to do it
在连接各种计算机的传输媒体上传输数据比特流
.
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, without considering the specific transmission media of the network.
There are many, many protocols for the physical layer, but they are not very important. For the physical layer, we only need to know the main tasks of the physical layer protocol.
The main tasks of the physical layer protocol
(1) Mechanical characteristics
形状
: Indicate the sum尺寸
,引脚数目
sum排列
,固定
and sum of the connectors used in the interface锁定装置
.
(2) Electrical characteristics : indicate what appears on each line of the interface cable电压的范围
.
(3) Functional characteristics : indicating a certain level appearing on a certain line电压表示何种意义
.
(4) Process characteristics : indicate various possibilities for different functions事件的出现顺序
.
Transmission media below the physical layer
Transmission media are divided into two categories:
引导型传输媒体
and非引导性传输媒体
.
Guided Transmission Media
The leading transmission media are:
同轴电缆
,双绞线
,光纤
,电力线
.
Unguided Transmission Media
Unguided transmission media are:
无线电波
,微波
,红外线
,可见光
.
This part of the content is not so important, everyone can understand it.
transfer method
Data transmission mode:
是数据在信道上传送所采取的方式
. According to the order of data transmission, it can be divided into并行传输
and串行传输
; according to the synchronization mode of data transmission, it can be divided into同步传输
and异步传输
; according to the flow direction and time relationship of data transmission, it can be divided into单工
and .半双工
全双工数据传输
Parallel transmission
Parallel transmission : data is transmitted in groups on two or more parallel channels at the same time.
For example, with 8-unit code characters, 8 channels can be used for parallel transmission, and one channel transmits one character at a time. Therefore, no additional measures are required to achieve character synchronization between the sender and the receiver. The disadvantage is that there are many transmission channels, complex equipment, and high cost, so it is rarely used.
serial transmission
Serial transmission : is the transmission of a data stream on a channel in a serial manner.
This method is easy to implement. The disadvantage is that to solve the synchronization of code groups or characters between the sender and receiver, additional synchronization measures are required .
Because serial transmission is easier to implement and has low cost, serial transmission is used more.
According to the characteristics of serial transmission and parallel transmission, in
远距离传输的时候我们一般使用串行传输
, in设备零件(比如:CPU与内存条之间)上一般使用并行传输
.
During serial transmission, the measures taken by the receiving end to correctly divide the transmitted characters from the serial data stream are called character synchronization.According to the different ways of realizing character synchronization, there are two ways of data transmission: asynchronous transmission and synchronous transmission.
isochronous transmission
Synchronous transmission : It is
固定时钟节拍
used to send data signals.
In the serial data stream, the relative positions of each signal symbol are fixed, and the receiver must establish synchronization to correctly distinguish the transmitted characters from the received data stream .
The method of clock synchronization between the sender and receiver:
(1) External synchronization : between the sender and the receiver
添加一条单独的时钟信号线
.
(2) Intra-synchronization : transmit将时钟同步信号编码到发送数据
together in the sender (for example: Manchester encoding).
Asynchronous transfer
Asynchronous transmission :
每次传送一个字符代码
(5~8bit), add a "start" signal in front of each character code sent, and add a stop signal at the back.
To be careful of:
(1)
字节之间异步
(the time interval between bytes is not fixed)
(2)字节中
each bit仍然要同步
(the duration of each bit is the same)
one-way communication
Simplex data transmission : data transmission between two data stations
只能沿一个指定的方向
.
Two-way alternate communication
Half-duplex data transmission : data transmission can be carried out in both directions between two data stations, but not at the same time.
Two-way simultaneous communication
Full- duplex data transmission : It is between two data stations and can be transmitted in both directions at the same time
Coding and Modulation
Let's first look at the process of a computer transmitting a message (text, picture, audio, video):
we want to transmit data, but the data cannot be transmitted directly, it must be converted into a signal, that is, we use a signal to represent the data.
How do signals represent data?
This uses our coding and modulation
Coding :
用数字信号
carries digital or analog data
Modulation :用模拟信号
carries digital or analog data
First introduce a basic concept code unit :
When using waveforms in the time domain to represent digital signals, 代表不同离散数值的基本波形
.
It can be seen that there are generally two kinds of symbols, which represent bits 0 and 1, respectively, to represent data.
Common coding
Non-return-to-zero coding
As shown in the figure, non-return-to-zero coding means that there are only positive and negative levels.
But the question is, how can we judge the length of a symbol if the level does not jump?
Then we willAn additional transmission line needs to be added to transmit the clock signal, and it is the sender and the receiver to achieve synchronization.
But this will increase the cost. For computer networks, we would rather use this wire to transmit data than to transmit clocks.
Return-to- zero encoding
Return-to-zero encoding adds a zero encoding to non-return-to-zero encoding.
What we need to pay attention to for zeroing encoding is:
(1)
每个码元传输结束之后都要“归零
", so the receiver only needs to sample after the signal returns to zero, no需要单独的时钟信号。
(2) In fact, the return-to-zero coding is equivalent to把时钟信号用“归零”方式编码在了数据之内
the "自同步
" signal.
(3) The disadvantage is: in the return-to-zero coding大部分的数据带宽
, are used to transmit "zeroing" and浪费
dropped.
Manchester encoding
Manchester encoding, we 码元中间的跳转
judge the bits 0 and 1 according to.
It is easy to know from the figure: the jump in the middle of the symbol represents both the data and the clock.
Differential Manchester Coding
In differential Manchester coding:
(1)
跳转仅表示时钟
.
(2) Symbols开始处电平是否发生变化表示数据
.
Differential Manchester encoding is less variable than Manchester encoding and is more suitable for higher transmission rates.
Common modulation methods
basic modulation
The basic modulation methods are: Amplitude Modulation (AM), Frequency Modulation (FM), Phase Modulation (PM).
A is the amplitude, F is the frequency, P is the phase, and M is the modulation.
As shown in the figure:
From the figure, we can see it intuitively: if the basic modulation method is used, 1个码元只能包含1个比特信息
.
How to make 1 symbol contain more bits?
We can take a hybrid modulation approach.
Hybrid modulation
Easing modulation comes
一次
from调制
frequency, phase, and amplitude多个因素
.
But because frequency and phase are related, that is, frequency is the rate of change of phase over time. Only one of frequency and phase can be modulated at will.
Often, the phase and amplitude can be modulated together, called 正交振幅调制QAM
.
QAM-16 :
(1) 12 kinds of phases.
(2) 1 or 2 amplitudes are available for each phase.
Pay attention here每个码元代表4个比特
. And the corresponding relationship between symbols and 4 bits is adopted格雷码
(adjacent symbols can only be different by one bit).
limit capacity of the channel
Any real channel is not ideal, and will produce various distortions and various interferences when transmitting the signal.
The higher the rate of symbol transmission, or the longer the distance of signal transmission, or the worse the quality of the transmission medium, the more serious the distortion of the waveform at the output end of the channel.
distortion factor
(1)
码元传输速率
(2)信号传输距离
(3)噪音干扰
(4)传输媒体质量
So how do these factors affect it?
Nye's Criterion
Loss criterion: Under the assumed ideal conditions, in order to avoid inter-symbol crosstalk, the symbol transmission rate has an upper limit .
- Maximum symbol transmission rate for ideal low channel = 2W Baud = 2W symbols/sec.
- Maximum symbol transmission rate for ideal band communication = W Buad = W symbols/sec.
W:信道带宽(单位:Hz)
Band:波特,即码元/秒
The symbol transmission rate is also called baud rate, modulation rate, waveform rate or symbol rate. It has some relationship with the bitrate:
(1) When 1 symbol carries only 1 bit of information, the baud rate (symbol/sec) and bit rate (bit/sec) are on the branch
是相等的
.
(2) When 1 symbol carries the amount of information of n bits, when the baud rate is converted to the bit rate, it means that it is necessary乘以n
.
To increase the information transfer rate (bit rate), it must be set 法使每一个码元能携带更多比特的信息量
. This requires pluralism.
The highest symbol rate that the actual channel can transmit is significantly lower than the upper limit value given by the Nyle's criterion.
Kaoru Official
Shannon's formula: The limit information transfer rate of a channel with limited bandwidth and white Gaussian noise interference is:
c = W ∗ log 2 ( 1 + S / N ) c = {W * log2(1+S/N)}c=W∗log2(1+S/N)
c: limit information transmission rate of the channel (unit: b/s)
W: channel bandwidth (unit: Hz)
S: average power of information transmitted in the
channel N: Gaussian noise power in the channel
S/N: signal-to-noise ratio, Use decibels (dB) as a unit of measure
The larger the channel bandwidth or the signal-to-noise ratio in the channel, the higher the limit transmission rate of information.
The information transmission rate that can be achieved on the actual channel is much lower than the limit transmission rate of the formula. This is because in the actual channel, the signal also suffers from other impairments, such as signal attenuation and distortion during transmission, which are not considered in Shannon's formula.
In the case of a certain channel bandwidth, according to Nye's criterion and Shannon's formula,
提高信息的传输速率
it is necessary to adopt多元制
(a better modulation method) and work hard提高信道中的信噪比
.
Epilogue
The above is the whole content of the physical layer, some of the content is a bit difficult, everyone should understand the basic knowledge and memorize it. Persistence in the past will definitely pay off.
This column is continuously updated…