Design of high-speed shortwave adaptive data communication protocol

Publisher:渤海湾Latest update time:2006-05-07 Source: 电子技术应用 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

    Abstract: An improved half-duplex selective ARQ protocol is given. In order to reduce the efficiency impact caused by long shortwave interleaving RTT time, it is proposed to use different interleaving modes for data transmission and reception. In view of the time-varying characteristics of shortwave channels, an adaptive adjustment method for the interleaving mode and the number of data frames sent at one time is given. The transmission efficiency analysis of the new protocol shows that the transmission efficiency is significantly improved when the channel quality changes or the channel quality is constant.

    Keywords: half-duplex adaptive ARQ shortwave protocol

Shortwave communication is a traditional means of medium and long-range radio communication. It has the advantages of long communication distance, convenient installation, strong anti-destruction capability, and low operating cost. It is widely used in the military, diplomacy and other departments. In the early 1980s, the United States formulated the military standard MIL-STD-188-110A. Since then, some foreign companies have proposed a new generation of high-speed serial modems that comply with this standard, such as Harris's RF 5710, making shortwave data Communication efficiency has been significantly improved[1].

Many users in our country have introduced modems that meet the 110A military standard. For example, the Ministry of Foreign Affairs' global shortwave data communication system uses Harris's RF 5710, but there is no suitable communication software. For this reason, based on many years of practical experience, the author initially designed and implemented a link layer protocol based on selective ARQ in 1999, and made a qualitative analysis of the factors affecting transmission efficiency and improvement measures [2]. Literature [3] made a preliminary quantitative analysis of the time parameters and performance of this protocol.

This article first analyzes the shortcomings of the protocol in literature [2], and then gives a design plan for the improved half-duplex selective ARQ protocol. It also analyzes the time parameters and channel utilization of the new protocol regularly. Based on quantitative analysis, An adaptive threshold is given; on the new link layer protocol, a file transfer layer protocol is formulated.

1 Improved half-duplex selective ARQ protocol and supporting transport protocol

1.1 Overview of shortwave half-duplex selective ARQ protocol

In the literature [2], the protocol sends up to 16 frames at a time, and then waits for the other party's response; the frames are numbered from 1 to 240. When the 240th frame of data is transmitted, the frames with sequence numbers 1 to 240 that are not transmitted correctly are forcibly sent. to the other party before entering the transmission of the next 240 frames, which is different from the usual sliding window mechanism. For selective protocols, in extreme cases if the first frame of 240 frames is not received successfully, then all data cannot be handed over to the application layer, so files with very high priority cannot be transmitted in time. In order to solve this kind of problem, when each file is transferred, the file name and length are first mandatory to be sent to the other party, and then the data in the file is sent away. This scheme ensures that files sent first arrive first, but the file header and file body need to be sent at least twice. For long interleaving mode, a batch of small files are delivered (it is necessary to ensure that files with high priority are sent first, and they cannot be combined It is very inefficient when transferring one file at a time.

The reasons for the low efficiency are as follows: First, the sliding window technology [4] in full-duplex selective ARQ has not been correctly extended to shortwave half-duplex conditions; secondly, the number of data frames sent at one time is fixed at 16 frames. ; Third, the lack of protection for the data frame at the top of the sliding window prevents the sliding window mechanism from quickly declining; Fourth, both communicating parties use the same interleaving mode, and there is no quantitative criterion for adaptively changing the interleaving mode when channel conditions change.

1.2 Improved half-duplex selective ARQ protocol

Data frame structure

logo Send address receiving address Frame number Frames data CRC logo
1 2 2 1 1 30,60,12,240 2 1

Note: The length of the data frame is automatically matched by the receiver, and is automatically distinguished by the end symbol of the frame. The delimiter between two frames is a.

Response frame structure

logo Send address receiving address Confirm frame number CRC logo
1 2 2 multiple bytes 2 1

Description: The confirmation frame number is the last correctly received data frame number. If all the frame numbers of the latest transmission are correct, then this field contains all data frame numbers. If all are wrong, then there is no data in this field.

Protection of the response frame: According to the definition of the response frame, the maximum length does not exceed 60 bytes. When the channel transmission quality deteriorates, the number of frames sent at one time will be reduced. That is, the length of the response frame is very short, so the same response frame is sent three times. This pass ensures the reliability of the response frame without increasing the transmission burden. The sender only needs to receive a correct response frame once, regardless of whether the other two frames are correct. The importance of the reliability of the response frame is that once it fails, it will cause the most recently sent batch of data frames to be retransmitted.

Selection of interleaving mode: In order to adapt to changes in channel transmission quality, the interleaving mode should be adjusted in time. The configuration principles for the interleaving mode are as follows: the receiver of the data is fixedly set to non-interleaved mode (the response frame already has an error protection mechanism), the main sender of data is initially set to non-interleaved, and the number of retransmitted frames reaches a certain level during the sending process. threshold, the interleaving mode is set to short interleaving before sending again, and so on. Conversely, if the long interleaving mode has a very low frame error rate, it can be set to short interleaving, and so on.

Sliding window and number of frames sent at one time: The maximum number of data frames sent for the first time when the protocol is started is 20 frames. If the frame error rate is very small during the transmission process, it can be gradually increased to 60 frames. The length of the sliding window on both sides of the sender and receiver is set to 120 frames. The actual number of frames sent at one time may be more depending on the size of the sliding window and the number of data frames to be transmitted in the buffer. After this modification, when the channel is very good, a very large amount of data can be transmitted with only a few response confirmations, which can greatly improve the efficiency of data communication.

Protection of the data frame at the top of the sliding window: Since the sliding window length of this protocol is limited to 120, when the data frame with a smaller sequence number is not sent correctly, the number of data frames sent at one time will be limited (in extreme cases, the first frame does not Successfully sent away, and all frames 2 to 120 are sent away (at this time, only one frame can be sent at a time); in addition, the receiver will backlog many data frames and fail to hand them over to the upper layer protocol, affecting the real-time communication of the upper layer. sex.

In order to solve this problem, data frames that are not transmitted correctly are allowed to be sent at most once, which can speed up the rapid decline of the sliding window. Specific method: When the actual number of data frames that can be sent is less than 20 frames, or the interval between the minimum sequence number that was not successfully sent and the maximum sequence number that was successfully sent exceeds 30 frames, the frames that failed to be transmitted are sent twice. If errors still occur, proceed three times.

Taking protective measures can solve the problem of real-time performance and efficiency of transmission caused by the failure of individual frames to be transmitted correctly due to the failure of the sliding window to move downward.

1.3 File transfer layer protocol

After the protocol is modified, the link layer can deliver data to the file layer relatively quickly, so the file transfer layer can be separated from the link layer. Since the link layer can guarantee no errors, it only needs to be able to distinguish the formats between files. The data format of a file is defined as follows:

Delimiter + file name + delimiter + file length + delimiter + file data content

Multiple files can be transferred one after another according to the above format.

2 Time parameters and communication utilization under the improved protocol

2.1 Determination of time parameters

It has been pointed out in the literature [3] that there are six time parameters associated with the protocol. Comparing the agreement between this article and the literature [2], it can be found that the four parameter calculation formulas in the literature [3] have not changed. However, there are some changes in packet synchronization delay and ACK synchronization delay. The main reason is that this protocol adopts an asymmetric interleaving mode, that is, the responding party always uses no interleaving mode, so the packet synchronization delay and ACK synchronization delay can be reduced. Referring to the calculation method in literature [3], Tsyn represents the packet synchronization delay, TAck represents the ACK synchronization delay, TFrame represents the frame synchronization delay, and TInterDelay represents the interleaving delay. The improved time parameter calculation formula is as follows:

TAck=2×TInterDelay+1.2×2+TFrame (rounded) (1)

TSyn=2×TInterDelay+1.2×2 (2)

That is to say, the coefficient of TInterDelay changes from 4 to 2. For long interleaving, TAck and TSyn will be shortened by 9.6 seconds, which can greatly improve the channel utilization.

Assuming that the number of data frames sent at one time is N, the data frame length is L bytes, and the channel rate is H (bps), then the channel utilization calculation formula is:

(N×L×8/H)/(TAck+N(L+10)8/H+TRtsDelay1+TRtsDelay2) (3)

The numerator is the time taken for actual data transmission, the denominator is the time from the start of data transmission to the reception confirmation, the constant 10 is the extra bytes in the data frame, 8 is the number of bits in one byte, TRtsDelay1 and TRtsDelay2 represent the time before keying respectively. Delay and keying mid-delay.

2.2 Channel utilization under different frame lengths and interleaving modes

From the perspective of channel utilization, when the transmission rate is high, longer data packets and more data frames are required to be sent at one time, especially in long interleaving mode:

Throughput rate is an important criterion for identifying the performance of communication protocols. For half-duplex communication protocols, it is defined as the total amount of data correctly transmitted from the sender to the receiver in a certain unit of time. If S is used to represent the correctly sent data Amount, I represents the time interval between two consecutive transmissions, and the throughput rate is represented by Rbyte. Then the corresponding data rate calculation formula is:

Rbyte=S/I (4)

In half-duplex ARQ protocol:

S=N×L (5)

I=IInterDelay×2+(TRstDelay1+TRtsDelay2)×2+[N×(L+10)×8]/Rate+(70×8)/(Rate) (6)

Among them, N represents the number of frames sent at one time, L represents the effective data length of a frame, and the last item represents the receiving response time. For the sake of simplicity, the frame length is set to 70 bytes.

According to the above formula, the throughput diagram under different frame lengths, frame numbers and interleaving modes can be drawn, parameter diagrams 1 and 2.

It can be seen from comparing Figure 1 and Figure 2:

(1) Under the same interleaving method, the longer the frame length, the higher the proportion of time to send valid data to the total time, the greater the effective throughput rate, and the higher the efficiency of the protocol;

(2) Under the premise of the same interleaving method and the same frame length, the higher the channel rate, the shorter the total transmission time, the greater the effective throughput rate, and the higher the efficiency of the protocol;

(3) Under the same channel rate and frame length conditions, the shorter the interleaving, the higher the effective throughput rate.

The efficiency of the protocol in literature [2] in the transmission of multiple small files. In the long interleaving mode, since the transmission of a file is divided into two transmissions of the file header and the file body, the shortest transmission of a single file under interference-free conditions is The time should be no less than 2Tack time, which is 46 seconds. No matter what rate and how small the file is, the transmission efficiency is very low for multiple small files.

The new low-output protocol mainly depends on the total length of multiple files, the transfer rate and the frame length. If the total length of 10 files is 9.6K bytes, the rate is 2400bps, and the frame length is 120 bytes, then the transmission time under interference-free conditions is 2400 bytes for the first 20 frames and 22 seconds; The second 40 frames are 4800 bytes and the time is 32 seconds; the third 20 frames are 2400 bytes and the time is 22 seconds; therefore, the total time is 75 seconds and has nothing to do with the number of files. Similarly, it can be seen from the previous calculation that increasing the number of frames sent at one time can greatly improve the throughput, especially for long weaves.

3 Determination of adaptive criterion threshold

The basis for judging the transmission quality of the shortwave channel from the shortwave link layer protocol is the number of error frames (the 110A standard can obtain the signal-to-noise ratio from the remote control, but it is difficult to implement. This article uses error frames to judge the channel quality), so the mode Changes and adjustments to the number of frames sent at one time are determined by frame errors.

3.1 Determination of interleaving mode

Taking the non-interleaving mode as an example, first assume that the frame error rate is E in the non-interleaving mode, and these error frames can be corrected through the short interleaving mode. In this case, the effective throughput of short interleaving is equal to the effective throughput of no interleaving. The conditions are:

(NE)/IN=N/Is (7)

Among them, IN and Is are the total time required to transmit N frames without interleaving and short interleaving respectively.

The frame error rate is determined based on this formula, which can be considered as a transition from no interleaving to a short interleaving domain value. Since this calculation formula has a premise, which may not be true in actual communications, the threshold should be larger when deciding to change from interleaving to short interleaving, usually adding a setting of 2 or greater. The same principle applies to thresholds from short interleaving to long interleaving.

Conversely, when the channel continues to be under better conditions, it should be reduced from long interleaving to short interleaving or even no interleaving. Since long interleaving has no or few frame errors, short interleaving may have more frame errors. Therefore, it is required that there are no frame errors before downgrading from long interleaving to short interleaving. The same principle applies from short interleaving to no interleaving.

3.2 Criteria for determining the number of frames sent at one time

From the perspective of channel utilization, it is best to send more data frames at one time, especially in the case of long interleaving. However, too many frames are sent at one time. When the channel encounters interference, parameters cannot be adjusted in time, such as data interleaving mode, data frame length, channel rate, etc., which will lead to more frame errors.

A more cautious approach is: the initial number of frames without interleaving is 20, and if there are no frame errors, it will be gradually increased to 40, 60, and 80 frames; while the initial setting of short interleaving is 40 frames, and if there are no frame errors, the number will be gradually increased to 60, 80 frames. , and the long interleave is initially 60 posts. The reason for caution is mainly to consider that relatively few data frames can speed up parameter adjustment when the channel is unstable. Since quantitative analysis is relatively difficult, further analysis is not conducted in this article.

After the protocol has been modified, the actual transmission efficiency is very high when the channel is good, and the appropriate interleaving mode can be better selected when the channel transmission quality changes. By adopting an asymmetric interleaving mode, long interleaving can be compressed by nearly half of the RTT time. Through the control of the sliding window and the protection of the data frame at the top of the window, the real-time performance of the link layer data transmission is improved, and the transmission efficiency of multiple small files is greatly improved. The design ideas of the protocol can also be applied to other half-duplex channels.

Reference address:Design of high-speed shortwave adaptive data communication protocol

Previous article:Implementing parallel communication between microcontroller and ISA bus using CPLD
Next article:Solution for dual asynchronous serial port communication through AT89C2051 and TMS320VC5402HPI port

Latest Industrial Control Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号