# Random Violation Risk Degree Based Service Channel Routing Mechanism in Smart Grid
## 3 SCVRD Model
### Differences Between \(A_{spa}\) and \(A_{apa}(t)\)  
Before establishing the _SCVRD_ model, the varying rule of \(A_{APA}(t)\) should be analyzed to identify the influence factors which cause the differences between \(A_{SPA}\) and \(A_{APA}(t)\). \(A_{SPA}\) is defined as the ratio of service un-interrupted duration in a statistical period of time [22]. Let the graph \(G(V\),\(E)\) represent the network topology, \(V\) denotes the node set and \(E\) denotes the edge set. \(A_{SPA}\) can be calculated by Equations (1)-(3) based on the statistical data at the end of each time period. \[A_{SPA}=\prod_{v_{i}:\sigma_{ij}\in p}A(v_{i})\cdot A\big{(}e_{ij}\big{)} \tag{1}\]  
\[A(v_{i})=\frac{MTBF(v_{i})}{MTBF(v_{i})+MTTR(v_{i})} \tag{2}\]  
\[A\big{(}e_{ij}\big{)}=\frac{MTBF\big{(}e_{ij}\big{)}}{MTBF\big{(}e_{ij}\big{)} +MTTR\big{(}e_{ij}\big{)}} \tag{3}\]  
\(v_{i}\in V\) denotes the \(i\)th node in network topology \(G(V\),\(E)\) and \(e_{ij}\in E\) denotes the edge between node \(i\) and node \(j\) in \(G(V\),\(E)\). \(A(v_{i})\) denotes the statistical availability of the \(i\)th node. \(MTBF(v_{i})\) and \(MTTR(v_{i})\) respectively denote the mean time between failures (\(MTBF\)) and mean \(TTR\) (\(MTTR\)) of the \(i\)-th node. \(A(e_{ij})\) denotes the statistical availability of the edge \(e_{ij}\). \(MTBF(e_{ij})\) and \(MTTR(e_{ij})\) respectively denote the \(MTBF\) and \(MTTR\) of the edge. \(MTBF\) and \(MTTR\) in Equations (2) and (3) are calculated by time between failures (\(TBF\)) and \(TTR\) in statistical period respectively. \(A_{APA}(t)\) can be expressed as follows:\[A_{APA}(t)=\prod\limits_{v_{i}\in r_{ij}\in p}A(v_{i})\cdot A\big{(}e_{ij}\big{)}= \frac{\sum\limits_{i=0}^{+\infty}TBF_{i}}{\sum\limits_{i=0}^{+\infty}(TBF_{i}+ TTR_{i})}=1-\frac{\sum\limits_{i=0}^{+\infty}TTR_{i}}{\sum\limits_{i=0}^{+\infty}(TBF_{i}+ TTR_{i})} \tag{4}\]  
Next, we will discuss the situations of \(A_{APA}(t)\). Because the state of \(v_{i}\) and \(e_{ij}\) are always varying between normal state and failure state, the varying rule of \(A_{APA}(t)\) can be analyzed by investigating the conversion process of \(TBF_{i}\) and \(TTR_{i}\). This process can be divided into three phases for analysis:  
1. During the period from initial time \(t_{0}\) to the first failure occurred time \(t_{1}\), \(A_{APA}(t)\) can be expressed as Equation (5): \[A_{APA}(t)=\frac{TBF_{0}}{TBF_{0}+TTR_{0}}=\frac{TBF_{0}}{TBF_{0}+0}=100\%\] (5)
2. When the \(k\)th \((k\geq 1)\) fault occurs, the items in Equation (4) are all constants except for \(TTR_{k}\), so \(A_{APA}(t)\) varies only with the change of \(TTR_{k}\), expressed by Equation (6). \(a\), \(b\) respectively, denote the cumulative availability time and the cumulative time when the \(k\)th fault occurs and both of them are constants in this phase. \[A_{APA}(t)=\frac{\sum\limits_{i=0}^{k-1}TBF_{i}}{\sum\limits_{i=0}^{k-1}(TBF_{ i}+TTR_{i})+TTR_{k}}=\frac{b}{a+TTR_{k}}\] (6) The varying curve of \(A_{APA}(t)\) in this phase is shown with the solid line in Figure 1.
3. When the channel returns to normal state from the \(k\)th failure, the items in Equation (4) are all constants except for \(TBF_{k}\), so \(A_{APA}(t)\) varies only with the change of \(TBF_{k}\), expressed by Equation (7). \(c\), \(d\) respectively denote the cumulative repair time and the cumulative time when the channel returns to normal state from the \(k\)th failure and both of them are constants in this phase. \[A_{APA}(t)=1-\frac{\sum\limits_{i=0}^{k}TTR_{i}}{\sum\limits_{i=0}^{k}(TBF_{ i}+TTR_{i})}=1-\frac{d}{c+TBF_{k}}\] (7) The varying curve of \(A_{APA}(t)\) in this phase is shown as the solid line in Figure 2. \[A_{APA}(t)=\frac{b}{a+TTR_{k}}\] (8)  
\[A(v_{i})=\frac{MTBF(v_{i})}{MTBF(v_{i})+MTTR(v_{i})} \tag{2}\]0 The varying curve of \(A_{APA}(t)\) with \(TTR_{k}\).