# A Study on the Design of Fog Computing Architecture Using Sensor Networks
## 3 Proposed System
### Communication Control by Power Consumption  
Low performance IoT devices have low calculation and networking capability. Therefore, selected representative sensors are used as a small unit of proxy server to save power. In other words, m-proxy servers from selected sensors become a small unit of proxy server. Through this setting, a proxy server can manage devices. In sensor networks, the layer-based routing protocol is LEACH-C, which improves LEACH. This method selects m-proxy servers according to energy consumption. However, all the sensor devices have to communicate with the proxy server in every round, and there is overhead for additional energy consumption and location processing. Therefore, this paper proposes a more effective information collection method. We estimate power consumption by m-proxy servers and normal devices in an early round and expect the remaining power level for the next round to remove unnecessary communications from LEACH-C.  
An equation may provide an example. Figure 9 indicates the structure of a model to estimate device's power consumption. In the first round, a sensor device transfers its current position and the remaining power level to the proxy server. The proxy server configures the best cluster with information received, creates a Time Division Multiple Access (TDMA) schedule and broadcasts it to all devices. Then, the device transmits its own sensing data to the proxy server through the cluster structure. This is the end of one round. From the next round, the proxy server configures clusters through power consumption estimation algorithm, without making unnecessary communications to collect device information:  
\[E_{Tx}(l,d)=E_{Tx-\textit{dec}}\left(l\right)+E_{Tx-\textit{amp}}\left(l,d\right), \tag{1}\]  
where: \(E_{Tx-\textit{dec}}\left(l\right)\): Power consumption to transmit a message with Size 1, \(E_{Tx-\textit{amp}}\left(l\right)\): Increased power consumption to send a message with Size 1 for 'D' distance. Equation (1) is the power consumption estimation algorithm for a device. It calculates the power consumption to send a 1 bit message over a distance 'd'. At the setting stage of two early rounds, the proxy server is set to receive the expected power consumption from all devices. From the next round, the proxy server is set to not receive current power consumption from all devices. The power consumption could be estimated. Therefore, only at the setting stage of the two most early rounds, is the energy level of all devices received. In the next round, the current energy level is not transmitted from all devices. However, the remaining energy level could be estimated from the early rounds. Therefore, power consumption of a device after a round can be calculated. With this power consumption, we can estimate the average power consumption of a small unit of proxy server and a normal sensor. In the next round, the current energy level can be estimated by subtracting estimated power consumption from the energy level of the previous round. Continual use of estimated power consumptions may cause an error. To prevent errors from being accumulated, regular synchronization is necessary. For the cycle of five rounds, as shown on the top of Figure 10, an energy level is transmitted from all devices, and the average power consumption of a small unit of proxy server and a normal sensor device are calculated at the first and the second round. The calculated power consumption is used to estimate an energy level without making communication during the third and the fourth rounds. Then, in the fifth and the sixth round, an energy level is transmitted for synchronization, and the power consumption is calculated. With the result, estimation is conducted in rounds 7 and 8. This could save energy accounting for power consumption for six rounds in the complete cycle of 10 rounds.