# Random Violation Risk Degree Based Service Channel Routing Mechanism in Smart Grid
## 4 Routing Mechanism Based on SCVRD  
### Approximate Transformation of Violation Risk Distribution  
In the electric power communication network, \(v_{i}\) and \(e_{ij}\) have the relatively high \(A_{SPA}\). It means that there are only several hours that the channel is in failure state during the thousands of hours' execution. Then it can be assumed that \(TTR\) of \(v_{i}\) and \(e_{ij}\) will not overlapped. In addition, the failure of \(v_{i}\) and \(e_{ij}\) is independent. Here the node violation risk \(P_{v_{i}}(TR>T_{Thr})\) is analyzed and the violation risk model of edge \(P_{e_{ij}}(TR>T_{Thr})\) can be got this way. Here the node violation risk model is introduced. As to node \(v_{i}\), the repair time \(TTR_{j},\quad j=1,..\) obey the log-normal distribution with parameters \(\left(\mu_{i},\quad\delta_{i}\right)\), because \(TTR_{j}\) is a random variable, there is possibility that the \(TTR_{1}\) of first failure may be bigger than \(T_{Thr}\) and there also may be \(k\) failure occurs before \(\sum\limits_{j=2}^{k}\left(TTR_{j}\right)>T_{Thr}\). Therefore, from the total probability Equation we have:  
\[ \begin{array}{c}\mathrm{P}_{v_{i}}(TR>T_{Thr})=\sum\limits_{k=1}^{+\infty}P_ {F}(X=k)\cdot P_{T}\left(\sum\limits_{j=1}^{k}TTR_{j}>T_{Thr}\right)\\ =\sum\limits_{k=1}^{+\infty}\frac{e^{-\lambda}\lambda_{k}^{k}}{k!}\cdot\left( \begin{array}{c}\frac{1}{\sqrt{2\pi\cdot\sigma_{i}\cdot t_{k}}}e^{-\left( \ln\left(t_{k}\right)-\mu_{i}\right)^{2}/2\sigma_{i}^{2}}\cdot\\ 1-\int_{T_{Thr}}^{+\infty}\cdots\int_{T_{Thr}}^{+\infty}\frac{1}{\sqrt{2\pi \cdot\sigma_{i}\cdot t_{2}}}e^{-\left(\ln\left(t_{2}\right)-\mu_{i}\right)^{2 }/2\sigma_{i}^{2}}\cdot\frac{1}{\sqrt{2\pi\cdot\sigma_{i}\cdot\left(D_{T_{k}}- \sum\limits_{i=2}^{k}t_{j}\right)}}\ dt_{2}\cdots dt_{k}\\ e^{-\left(\ln\left(DT_{k}-\sum\limits_{i=2}^{k}t_{j}\right)-\mu_{i}\right)^{2 }/2\sigma_{i}^{2}}\end{array}\right)\end{array}  \tag{17}\]  
Equation (16) gives the probability distribution of violation risk \(P_{SCVRD}\) but the distribution function is too complex to be a decision parameter. We will simplify the distribution function of \(\sum_{i=1}^{k}TTR_{i}>T_{Thr}\) according to the \(FN\) probability generating function, \(TTR_{i}\) moment generating function and their distribution functions. So that \(P_{SCVRD}\) can be used as a decision parameter in the channel routing process. The detailed derivation process is described as follows. Assume that the probability generating function of \(FN\) is expressed by:  
\[P_{FN}(z)=E\left(z^{FN}\right)=\sum\limits_{k=0}^{+\infty}\left(z^{k}\cdot \frac{e^{-\lambda_{i}}\cdot\lambda_{i}^{k}}{k!}\right),-1\leq z\leq 1 \tag{18}\]  
The moment generating function of \(TTR\) is expressed by:  
\[M_{TTR}(t)=E\left(e^{t\cdot TTR}\right)=\int_{-\infty}^{+\infty}e^{t\cdot x} \cdot f(x)\cdot dx \tag{19}\]  
\(f(x)\) is the probability density function of \(TTR\), then the moment generating function of down time (DT) is expressed by:  
\[ \begin{array}{c}M_{DT}(t)=E\left(e^{t\cdot S}\right)=E\left[e^{t\left(TTR_{ 1}+\cdots+TTR_{k}\right)}\right]\\ =\sum\limits_{k=1}^{+\infty}P_{FN}(N=k)\cdot E\left(e^{t\left(TTR_{1}+\cdots+ TTR_{k}\right)}\middle|N=k\right)\\ =\sum\limits_{k=1}^{+\infty}P_{FN}(N=k)\cdot E\left(\prod\limits_{i=1}^{k}e^{t \cdot TTR_{i}}\right)\end{array}  \tag{20}\]  
Since \(TTR_{i}\) is independent and obeys the same log-normal distribution, making use of the nature that the mathematical expectation of the product of the independent random variables equals to the product of the mathematical expectation of each independent random variable, the Equation (20) can be converted into Equation (21):  
\[ \begin{array}{l}M_{DT}(t)=\sum\limits_{k=1}^{+\infty}P_{F}(N=k)\cdot\prod \limits_{i=1}^{k}E\big{(}e^{t\cdot TTR_{i}}\big{)}\\ =\sum\limits_{k=1}^{+\infty}P_{F}(N=k)\cdot\left[M_{TTR}(t)\right]^{k}=E\Big{(} M_{TTR}(t)^{k}\Big{)}\end{array}