# Dynamic Optimization of Data Packet-based Communication for PLC Visual Monitoring
## 3 Experimental Studies and Discussions
### Experimental Results  
A series of simulation tests is first conducted in Table 1, where the system parameters are set empirically, including \(T^{0}=3\) ms, \(\delta=10^{-5}\), \(\rho=200\) kilobyte/s. The additional packet header and the maximum data length of sub-networks are assumed to be 40 bytes and 300 bytes, respectively.  
The lower bound function \(F(P)\) and the optimized packet size on the saw-tooth function \(J(P)\) for the six tests are illustrated respectively in Figure 4. \(F(P)\) is convex, while \(J(P)\) is nonlinear and nonconvex, which makes it difficult to determine the optimal packet size mathematically. It has been discussed in Lemma 1, 2, and 3 that the optimized solution lies at one of the local minima on the saw-tooth curve.  
We take Test 2 in sub-Figure 4b as an example, and the global minimum for the convex unconstrained \(F(P)\) is 11, as labeled in the figure. However, the optimized packet size should be among the candidate set of local minima [5; 7; 9; 13; 25] and the optimal solution is validated at 5 as highlighted by red labels in terms of the optimization model in Section 2.3. It means that 25 sub-networks should be packed into 5 packets with 5 sub-networks in each of the packets, and the optimal communication mode can be achieved in terms of the retransmission rate and the given human response time 200 ms. The optimal solution can be located from solving the optimization models in Section 2.3 for the other five tests, and the saw-tooth functions have different patterns, which makes it difficult to identify the optimized packet size empirically.  
\begin{table}
\begin{tabular}{l l l l l l l} \hline \hline
**Simulation System Parameters** & **Test1** & **Test2** & **Test3** & **Test4** & **Test5** & **Test6** \\ \hline The additional access time \(T^{0}\) (s) & 3 ms & 3 ms & 3 ms & 3 ms & 3 ms \\ The retransmission rate \(\delta\) (1/byte) & \(10^{-5}\) & \(10^{-5}\) & \(10^{-5}\) & \(10^{-5}\) & \(10^{-5}\) & \(10^{-5}\) \\ The network bandwidth \(\rho\) (byte/s) & 200 k & 200 k & 200 k & 200 k & 200 k & 200 k \\ The additional packet header \(d\) (byte) & 40 & 40 & 40 & 40 & 40 & 40 \\ The maximum data length of sub-networks \(L\) (byte) & 300 & 300 & 300 & 300 & 300 \\ The total number of sub-networks \(N\) & 21 & 25 & 29 & 37 & 38 & 39 \\ The upper limit of the refresh time of a single packet (ms) & 200 ms & 200 ms & 200 ms & 200 ms & 200 ms & 200 ms \\ \hline The optimized packet size \(P^{*}\) & 7 & 5 & 10 & 13 & 13 & 13 \\ The optimized number of packets & 3 & 5 & 3 & 3 & 3 & 3 \\ \hline Expected time for updating a monitoring view \(E(P^{*})\) (ms) & 271.5 & 328 & 385.3 & 501.2 & 501.2 & 501.2 \\ \hline Actual processing time for a single packet (ms) & 30.6 & 22.6 & 42.6 & 54.6 & 54.6 & 54.6 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Simulation results of optimized data packet-based communication.  
A real experiment was also carried out in a prototype electric power monitoring system of a high-tech industrial park, where there are 35 buildings and the monitoring system is composed of 5 PC workstations, 2 data storage servers and 35 S7-300 PLCs (i.e., one PLC monitoring one building). In the real experiment, the upper bound of the sub-network length \(L\) can be tightened for achieving efficient communication within the human response time constraint. Experimental results with the use of the optimization model in Section 2 are summarized in Table 2.  
Figure 4: Optimized packet size on the lower bound and saw-tooth function.  
It is shown in Table 2 that a tightened bound can achieve more efficient interaction between a supervisory computer and field PLCs. The optimized data packet-based communication is more efficient than the trial-and-test engineering practice, and the actual process time using the optimized packet size is always 5%-20% less than the expected time under the empirical settings of updating the monitoring views.