## 7 Simulation
### Analyzing Energy Efficiency and Video Quality for Different Environments  
In this section, we evaluated the performance of presented architecture. The behaviors of designed architecture should be considered with the aim of having actual results for our simulation. As mentioned in Section 4.3, the period of forwarding M-Frames depends on the number of the pixels which are used for delivering M-Frames and D-frames. Moreover, priorities assigned to D-Frame blocks are related to the difference between pixels of current D-Frame and saved previous M-Frames. Thus, the performance of the architecture is associated with the variation degree of the environment. Owing to this fact, examined environments are divided into four categories: still environment, little  
\begin{table}
\begin{tabular}{|c|c|c|c|c|c|c||c|c|c|c|c|c|} \hline \(N\) & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 \\ \hline Average PSNR & 30.79 & 33.93 & 36.58 & 39.00 & 41.58 & 44.30 & 45.44 & 45.80 & 46.23 & 46.31 & 46.34 & 46.35 \\ \hline Number of Transmitted Pixels & 3 & 6 & 10 & 15 & 21 & 28 & 36 & 43 & 49 & 54 & 58 & 61 \\ \hline \end{tabular}
\end{table}
Table 2: Corresponded Average PSNR and Number of Transmitted Pixels for different value of \(N\)  
Figure 16: The relation between _quality coefficients_, average PSNRs, and number of bits per pixel.  
variant environment, middle-variant environment, and high-variant environment. The performance is calculated in each of these categories.  
In the following, the average result of five video samples captured by video nodes located in hierarchical levels from \(3\) to _18_ during _10_ seconds in each environment is presented. Figure 17, shows the relation between the energy consumed and hierarchical levels for tested environments. Having analyzed simulation results, we concluded that energy consumption depends on the variants in the examined environment. When variation degree of the environment increases, M-Frames are forwarded with higher frequency because of more different pixels between captured frame and saved M-Frame. This leads to more pixels of D-Frames to be sent. Consequently, the average energy consumption increases and high-variant environments consume more energy in comparison with other environments (as shown in Figure 17).  
Also, the level of the source node in the hierarchical topology influences the energy consumption of the whole network. Since the location of the source node determines the number of contributed intermediate nodes in delivering video frames, energy consumption increases when number of relaying nodes grows.  
Another factor to be analyzed is video quality which is inspected by average PSNR. Figure 18, elucidates the correlation between average PSNR and hierarchy level. Average PSNR changes in associated with variants in the environment and hierarchy level of video source node like consumed energy. The major reason of this fact is the impacts that dropping scheme has on average PSNR. In high-variant environment, more pixels change; thus, sending more pixels for a frame is needed. Therefore, on the same probability of packet dropping, more pixels of the frame are dropped through transmission and smaller number of frame's pixels is received in Sink. As a result, average PSNR is lesser than other categories of environments. Interpretation of the result of simulation in EqV-Architecture shows satisfactory functionality.  
Figure 17: Average Energy consumption for the entire network in different environments  
Figure 19, 20, 21, and 22 show some video frames from different categories of environments with their PSNRs in receiver side. These frames are samples that were used to calculate average PSNRs in Figure18.  
Figure 18: Average PSNR for different environments  
Figure 20: Little-variation environment Frames