## 3 The Proposed IoT-Based Master-Slave Regionalized Intelligent LED Light-Controlling System
### Energy Consumption Calculation  
The proposed IoT-based intelligent LED light is divided into a high-light mode and a low-light mode. Therefore, it is more complicated to calculate the power consumption, unlike ordinary non-inductive LED lights. The factors that affect the power consumption include high-light mode power \(\mathrm{W_{H}}\), low-light mode power \(\mathrm{W_{L}}\), high-light duration T, the frequency of people and vehicles passing, whether there is continuous triggering, and so on. To facilitate the derivation of the formula, we refer to the calculation method of power consumption in [1; 35]. It is assumed that pedestrians and vehicles will not stay for too long when they pass by and pass by after T seconds, which means there is no continuous trigger. In this case, the elapsed time of people and vehicles is average and scattered (because it is uneven, the total power is the same as long as there is no continuous trigger). Below, in addition to calculating the electric energy consumed by each proposed LED light per hour, we also calculated the electric power consumed by each proposed LED light in a year. We compared traditional non-inductive LED lights for the amount of energy saved, the cost savings, and the reduced carbon emissions to calculate its energy-saving rate (ESR). Finally, we use a parking lot as an example to calculate the total cost savings of the entire parking lot. We illustrate how to calculate each proposed LED's light energy consumed per hour according to the power changes in the high-light mode and the low-light mode, as shown in Figure 11. \(P(t)\) is used to describe the power change between the high-light mode and the low-light mode. Other parameters are described, as can be seen in Table 6.  
Figure 11: Power changes in high-light mode and low-light mode. \begin{table}
\begin{tabular}{c c c} \hline
**No.** & **Name** & **Description** \\ \hline
1 & MCU & Arduino Nano MCU adopted \\ \hline
2 & Motion sensor & Microwave radar sensor switch module (human body detector sensor), RCWL-0516 adopted \\ \hline
3 & Communication module & 2.4 GHz Wi-Fi wireless communication module (NINA-W102 adopted) \\ \hline
4 & Miscellaneous & Micro switch, DIP switch LEDs, wires, etc. \\ \hline \end{tabular}
\end{table} 
Table 5: The adopted electronic components and their specifications for the proposed IoT-based intelligent LED light. Because of the previous assumption that \"pedestrian's elapsed time is average and scattered\", the elapsed time length of each person is \(3600/f\) (\(f>0\)). For the first pedestrian, \(0\)-\(T\) seconds is the high-light mode, and \(T\)-\(3600/f\) second is the low-light mode, so we can calculate the electric energy \(E_{\rm ph}\) consumed by a proposed IoT-based intelligent LED light per hour by calculating the area:  
\[ \begin{array}{ll}\text{if}\ f=0\\ \end{array} \]  
\[ \begin{array}{ll}E_{\rm ph}&=\left(J_{0}^{3600}\ P(t)dt\right)\ J\\ &=\left(J_{0}^{3600}\ W_{L}dt\right)\ J\\ &=\left(J_{0}^{3600}\ W_{L}dt\right)/3.6\ \times\ 10^{6}\ \text{kW\ h} \end{array}  \tag{1}\]  
If \(f>0\)  
\[ \begin{array}{ll}E_{\rm ph}&=f\times\left(\int_{0}^{T}P(t)dt+\int_{T}^{360 0/f}P(t)dt\right)\ J\\ &=f\ \times\ \left(\int_{0}^{T}W_{H}dt+\int_{T}^{3600/f}W_{L}dt\right)\ J\\ &=f\ \times\ \left(\int_{0}^{T}W_{H}dt+\int_{T}^{3600/f}W_{L}dt\right)/3.6\ \times\ 10^{6}\ \text{kWh} \end{array}  \tag{2}\]  
In addition, we assume that the lights in the parking lot are turned on 24 h a day, and a total of \(365\times 24=8760\) h are turned on in a year.