# Anomaly Monitoring of Process Based on Recurrent Timeliness Rules (AMP-RTR)
## 3 Design of AMP-RTR Model
### Implementation of AMP-RTR Model
#### 3.2.1 Timeliness Evaluation Process of Periodic Data
In the process of product production, the product attribute data will remain constant for a period of time after each periodic update. The frequency of changes in empirical or statistical data is \(\lambda\), meaning that we expect it to update \(\lambda\) times in a regularization period (it can be a day or a second). The value of \(\lambda\) is usually smaller than the set data update frequency. We can calculate the reasonable existence time of the data through the following formula:  
\[age(t,\lambda)=\int_{0}^{t}P(Probability\ of\ change\ at\ x)\times(t-x)\mathrm{d}x. \tag{5}\]  
The \((t-x)\) indicates the time from possible data changes to monitor: We assume that we evaluate the data at time \(t\) and the data are changed at time \(x\). We multiply it by the probability that the data may occur at time \(x\). Relevant research shows that the change of data obeys Poisson distribution, which means that the time until the next change is governed by an exponential distribution [26]. This provides us with a Formula (8) for inserting the \(P(\mathit{Probability}\) of change at \(x)\) expression. \[\mathit{age}(t,\lambda)=\int_{0}^{t}\lambda\mathrm{e}^{-\lambda x}\times(t-x) \mathrm{d}x \tag{6}\]  
Time \(t\) represents the relative time in a cycle (the value of \(t\) in each data cycle returns to zero). Before calculation, \(t\) must be normalized to eliminate the influence of different dimensions. That is to say, if the dimension of periodic update of data is days, the measurement unit of \(t\) should be days. Similarly, when the cycle is updated in seconds, \(t\) should be measured in seconds. For example, when the data update cycle of the product is 7 s, the dimension of \(t\) should be 1 s. Finally, in order to better apply to the exponential decay law of the model, the value of \(t\) should not be too large (usually less than 10). We evaluate the timeliness of the data generated periodically. There are two main reasons why we use \(\mathit{age}(t,\lambda)\) instead of time \(t\) as the timeliness evaluation factor. Firstly, in the actual manufacturing process, the data value will be stable for a short period of time after each update. For example, the temperature and humidity of the updated workpiece will remain unchanged for a short time. Therefore, it is reasonable to choose the time point for evaluating timeliness after this steady state. Secondly, since \(\mathit{age}(t,\lambda)\) is used as the variable of the timeliness evaluation function, the advantage of this is to passivate the time \(t\). In this way, the change trend of timeliness evaluation function is more stable, and the iterative process of timeliness score value is smoother, so as to realize process anomaly monitoring more accurately. Figure 2 shows the change trend of the two expressions when \(T=7\). Indicates the change trend of \(Q_{decay}(t,\lambda|A)\) and \(\mathit{age}\) with time \(T\) before the arrival of updated data. As you can see from the Figure 2a, the expected \(\mathit{age}(t,\lambda)\) rises slowly and then rapidly. This is because data changes are unlikely to occur in a short period of time after periodic updates. Over time, the possibility of data changes increases rapidly. Since \(\mathit{age}(t,\lambda)\) is used as the factor of the timeliness evaluation function, the change trend of the timeliness score of the data in an update cycle is relatively flat, as is shown Figure 2b. In Figure 2, the \(x\)-axis \(\mathit{time}\)\(t\) represents the time value after dimension removal by interval. The \(y\)-axis \(\mathit{age}\) in (a) represents the probability duration after dimension removal obtained according to the method of updating strategy [26]. The \(y\)-axis \(Q\_{decay}\) in (b) represents the timeliness score of a data update cycle.