1. Introduction
Data communications with half-duplex command-response protocols generally consist of a commander controlling the transmission line and response terminals responding to the commander. In the MIL-STD-1553B data communication system [
1], which is a well-known military communication platform using a serial data bus, it consists of a bus controller (BC) as the commander and remote terminals (RTs) as the response terminals. In the physical layer, the properties of the electrical design inevitably limit the bit rate of the data bus to 1 Mbps. Besides, in the application layer, since the communication protocol is generally determined based on messages that consist of a set of words composed of multiple bits [
2], it is hard to use the full bandwidth. Therefore, the structure of message-chains for the BC and the RTs should be carefully determined to maximize the data throughput with consideration of the limited bit rate and insufficient bandwidth.
Data throughput can be improved by simply increasing the number of messages within a given transmission duration in the message-chain structure of the BC. However, the excessive increase in the number of messages with a fixed transmission duration may cause the loss of data in the RTs because the data in receiving buffers may be rewritten by the currently receiving data before the previously received data processing is finished. Therefore, to achieve high data throughput without data loss, the number of messages and the transmission period in the structure of message-chains should be carefully determined.
Zhang et al. [
3] improved the data throughput in MIL-STD-1553B communication systems with a heuristic algorithm rearranging the components of the command table based on the number of command or data words. However, they did not consider the processing time in the RT, which affects the reliability of the data communications. Kim et al. [
4] presented and analyzed the whole timing diagram between the BC and the RT. They found that when multi-message chains and double buffers were used for the communication system, the data throughput can be improved. However, the message-chain structure in their approach was empirically determined. One can consider optimization algorithms such as the least square methods. Recently, sampling-based optimization algorithms, which are particle swarm optimization (PSO) [
5] and its variants [
6,
7,
8], have been widely used because of their convenience and good performance in spite of nonlinear system constraints.
However, optimization algorithms may be faced with much computation time because of a large number of samples, which means that the computation time should be reduced significantly to be applied to real-time systems. In this work, the optimization process needs to be conducted in real-time to find the optimal message-chain structure as fast as possible with different system parameters. Liu et al. [
9] proposed real-time approaches for the PSO applied to identify and cancel the current harmonics in power systems. However, since their approach was based on the limited number of particles, it cannot be applied to more complex optimization problems, requiring more number of particles.
To reduce computation time, the PSO was recently implemented on field-programmable gate arrays (FPGA) in various fields. Gao et al. [
10] proposed an FPGA implementation method of the PSO to quickly select and update the coefficients of adaptive infinite impulse response (IIR) filters. In addition, Gupta and Mehra [
11] implemented the modified PSO algorithm on an FPGA for fast unknown system identification, selecting and updating the coefficients of adaptive infinite impulse response (IIR) filters. Vasumathi and Moorthi [
12] developed the hybrid adaptive neural network and the PSO and implemented it on a Spartan 3E FPGA to accelerate the computation speed for real-time processing. Morsi et al. [
13] implemented the PSO algorithm on an FPGA to quickly compute the structural similarity (SSIM) index between the target image and the candidate region. They showed that the results of their implementation, which is a combination of software and hardware, were better than the results of the software-only implementation. Trimeche et al. [
14] implemented the PSO on FPGA for a multi-input multi-output (MIMO) detection system. Their work was able to reduce the computational complexity of the maximum likelihood estimation in an MIMO detection system.
This paper proposes a new variant of the PSO for real-time optimization, which is conducted on FPGA to find the optimal number of messages and the transmission period in the message-chain structure. The original PSO is modified to be properly implemented on FPGA by synthesizable hardware description language (HDL) codes. Consequently, the contributions of this paper are as follows. First, the proposed approach can find the optimal number of messages and the transmission period without data loss in the structure of message-chains for data communication systems with half-duplex command-response protocols. Second, the proposed approach can be conducted in real-time, despite the high computation load of the PSO. To the best of our knowledge, PSO to optimize the message-chain structure in data communication systems with half-duplex command-response protocols has never been implemented on FPGA. The main notations used in this paper are summarized in
Table 1.
This remainder of this paper is organized as follows:
Section 2 defines and formulates the optimization problem of message-chain structures in half-duplex command-response protocols.
Section 3 describes the proposed approach, which is a real-time PSO algorithm on FPGA.
Section 4 gives the evaluation of the performance of the proposed approach with various algorithm parameters and system conditions. The real-time capability of the proposed approach implemented on FPGA is then verified by successfully finding the optimal message-chain structure. Finally,
Section 5 offers the conclusions.
2. Optimization Problem of Message-Chain Structures
The formulation of the optimization problem depends on a specific data communication system. In our previous work [
15], for the offline optimization of the MC structure, we analyzed its timing diagram between the BC and the RT, as shown in
Figure 1. At every transmission period (
TBC), the BC transmits an MC, which consists of a certain number of messages,
NBC. In each MC, the time assigned to each message is called the message gap time (
tMG), including the inter-message gap time (
tIMG), which separates messages.
The whole required time in the RT (
TRT) is analyzed with the following factors: the processing time for an interrupt service routine (
tI) and the received data (
tP), the total writing time for responding to messages (
TW), and the total processing time for high-priority tasks (
TH). The most important point in the RT is to design a structure for MC, which can finish the whole processing for the current MC before receiving the next MC at the same buffer. Since
TW is considered to be of two types—
tW1 and
tW2, which are the average writing times before and after completing the data reception from the BC—it can be computed as follows:
where
NRD is the number of response messages that should be written at the buffers in the RT for each message from the BC, and
, which is the number of messages on processing in the RT before completing the data reception from the BC. Then, the total required time in the RT,
TRT, can be obtained as follows:
To avoid data loss caused by rewriting the buffer containing the current MC by the next MC transmitted for the same buffer, the relation between
TRT and
TBC is established as follows:
Additionally, the transmission margin for unexpected situations in the BC, which is the time margin from the end of the current MC to the beginning of the next MC, is considered as an optimization constraint because it has been heuristically determined. The additional constraint for the transmission margin,
α, in the BC can be formulated as follows:
where
. The larger
α means more transmission margin. Finally, the upper limits of
TBC and
NBC are determined according to system requirements and applied to the PSO algorithm.