# DDTMS: Dirichlet-Distribution-Based Trust Management Scheme in Internet of Things
## 4 Simulations and Analysis  
### Comparison Between DDTMS, Beta Distribution, and Gaussian Distribution  
The on-off attack refers to the intermittently executed cooperative and non-cooperative behaviors, which are launched by the attacking node. The cooperative behavior can effectively improve the trust value of malicious nodes. When the trust value reaches a certain level, the non-cooperative behavior--such as dropping packets, selective forwarding, and so on--is the malicious attack. In this experiment, the on-off attacks are launched into the cluster member nodes under above three distributions. The simulation parameters are shown in Table 1.  
Model assumptions for trust value calculations:
* The initial trust value of both nodes without any interaction is 0.5 \(\in\) (0,1). * Normal nodes and malicious nodes perform a total of 200 interactions. * A malicious node performs the attack on the 50 th interaction and the 170 th interaction, respectively, 30 attacks per attack. The comparison of trust value between DDTMS, Beta distribution-based and Gaussian-distribution-basedis shown in Figure 2.  
As shown in the Figure 2, there is jitter in the trust value curve in DDTMS. This is becausethere is a certain probability of undetermined interaction behavior in the interaction between two nodes. They are neither cooperative nor uncooperative. During the first 50 interactions, the malicious node is regarded as a normal node due to the cooperated interaction. Hence, its trust value is also increasing steadily. However, because of Dirichlet distribution, the weight settings of the three interaction types, the trust value will not increase very high, but also enough to embody the concept of 'trust'. When the malicious node begins to launch the attack at the 50 th interaction, the curves of the two distribution models are drastically reduced in Figure 2, and both of them can detect the malicious node by the rapid decline of the trust value. It is noted that the trust value curve in DDTMS is lower than the curve of the Beta distribution when the attack occurs, which means that it can detect the malicious node quickly compared with the Beta distribution. With the malicious node stops attacking, in order to regain the trust of other nodes, it restores the normal interaction. During the restoring process, the trust values under the two distributions are \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Direct and indirect reputation information weights & (60\%,40\%) \\ (\(\alpha\),\(\beta\)) & (60\%,40\%) \\ \(T_{init}\) & 0.5 \\ \(\mu_{Gaussian}\) & 0.5 \\ \(\delta_{Gaussian}\) & 0.5 \\ \(w_{s}\) & 0.85 \\ \(w_{f}\) & 1 \\ \(w_{u}\) & 0.05 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simulation parameter table. Figure 2: Comparison of trust value between DDTMS, Beta-distribution-based and Gaussian-distribution-based. also significantly different. The trust value curve of the DDTMS is evidently lower than the curve of the Beta distribution. The advantage of this is that even if a malicious node attempts to restore normal interaction after performing an attack to achieve the same trust value as a normal node, it is a very difficult increase process compared to the Beta distribution. This is because, under Dirichlet distribution, the trust scheme can limit a weight on the uncooperative behavior, and it also evaluated the subsequent trust value using historical data. The trust value of the malicious node will keep a large gap with the average trust value of the normal node for a long time in the future.Hence, the probability of the same type of attack from this malicious node can be greatly reduced. On the other hand, in Figure 2, because there is no undetermined behavior in the trust management scheme based on Gaussian distribution, and the trust value will increase rapidly in the interaction start. The trust value in DDTMS gradually increases with increasing the normal interaction behavior, in line with the expectation of the node trust value.