# Modeling and Profiling of Aggregated Industrial Network Traffic
## 3 Modelling Aggregated Traffic Break-Down
### Objective 1: Work-Cycle Recognition  
Our first objective is to identify the work-cycles to find boundaries of the repeated communication pattern within a time interval. Algorithm 1 describes the steps for achieving the first objective. As mentioned in the previous section, the throughput turbulence results from variances in the number of active devices, the number of transmissions, and the size of transmitted packets. Considering network-level throughput (2), we quantify the throughput, \(tp_{tot}\) rate of change, \(roc_{tp}\), dependent on transmission intensity, as  
\[roc_{tp}=\frac{tp_{tot}}{tsv\times txv}=\frac{\sum_{t=1}^{T}\sum_{x=1}^{X}l_{ tx}}{\sum_{t=1}^{T}uts_{t}\times tx_{t}} \tag{3}\]  
where \(uts_{t}\) is the number of active transmitters or devices, and \(tx_{t}\) is the total transmitted packets in the specific time interval. The largest changes happen when the accumulated impact of the combined parameters are the highest. The work-cycle identification is then defined as a Change Point Detection (CPD) problem where the most significant abrupt change indicates the boundaries of the repeated pattern in the dynamic turbulence sequence. The beginning and the end of each work-cycle can be identified by the abrupt decrease of the throughput, i.e., the time interval between two consecutive highest rank change points.  
Applying Equation (3) on the data stream generates a number of non-overlapping time windows that segments the data into work-cycles. Figure 2(a) illustrates the outcome of work-cycle identification utilizing the throughput dynamics dependent on the proposed transmission and transmitter volatility parameters. Figure 2(b) shows the segmented data with new indexing for mapping the patterns, prerequisites for identifying the various operational mods/states of the aggregated traffic modeling. The accuracy of the method is checked using Spearman correlation and represented in Figure 2(c). The similarity between the patterns varies between 0.88 to 0.98. The high similarity of the data sequences in each segment shows the success of the work-cycle recognition process utilizing the defined parameter indicators to capture transmission intensity.  
```
1:Network traffic data, \(Y_{1:T}\).
2:Approximated work-cycle boundaries.
3:Set:
4:counter \(n,i=0\), \(list_{rec}\), temp_threshold \(=\Delta t(=60)\), spatial_threshold \(=\Delta s(=0.1)\).
5:for\(t\gets t:1:T\)do
6: Calculate total throughput: \(tp_{tot}=\sum_{1}^{X}l_{x}\).
7:if\(x\
eq 0\)then
8: Calculate transmitted packets: \(txv\leftarrow\sum_{1}^{X}tx_{x}\).
9: Calculate active devices: \(tsv\gets n++\).
10:endif
11: Calculate transmission intensity: \(ti=tsv\times txv\).
12: Calculate throughput rate of change: \(roc_{t}=tp_{tot}/tsv\times txv\).
13: Append \(list_{rec}[t]=roc_{t}\).
14:endfor
15:Rank \(roc_{t}\) in \(list_{rec}\) where \(roc_{t}-ti_{t}<\Delta s\).
16:Find the change points: \(List\_CP[i],i\gets 1:m<|Y|\).
17:\(x_{init}=list_{rec}[1]\), \(interval=0\).
18:for\(x\) in \(list_{rec}[t],t\gets 1:T-1\)do
19:\(interval_{t}\gets y+\)
20:if\((\overline{x_{init}x_{i+1}}\
eq\overline{x_{i+1}x_{i+2}})\) & \((interval>\Delta t)\) & \((roc_{t}<\Delta s)\)then
21: Append \(list\_CP\gets list_{rec}[t]\).
22: Update \(x_{init}=list_{rec}[t+1]\)
23:endif
24:endfor
```  
**Algorithm 1** Work-cycle recognition.