## 2 Architecture and Framework of Computing Methods
### Comparison of Computing Methods  
The integration of cloud, fog, edge, and IoT layers forms a multi-tiered architecture, with a central cloud--potentially distributed across various geographies--at the top. Be-neath the cloud, multiple fog nodes act as intermediaries, each managing numerous edge devices that, in turn, interface with a wide array of IoT devices [72]. Although EC and FC share overlapping functionalities, their key distinction lies in the scope and location of intelligence deployment. Specifically, FC enables computation directly in IoT devices, thereby aligning more closely with decentralized IoT architectures [42]. Conversely, EC focuses on processing data at or near the data source, thereby reducing latency and alleviating the burden on central cloud infrastructure by transmitting only filtered or aggregated data for deeper analysis. This collaborative ecosystem between CC, FC, and EC fosters efficient, scalable, and resilient solutions across various sectors, including smart manufacturing, energy systems, cybersecurity, and intelligent home automation.  
Despite its scalability and processing power, CC faces challenges related to exponential data growth and network bandwidth limitations [73]. By contrast, EC offers superior performance in terms of response time and real-time data processing, making it particularly suitable for time-sensitive applications. However, while edge servers offer better computing and storage capabilities compared to IoT devices, they still lag behind cloud servers in terms of overall computational power. As a result, resource-intensive tasks are often offloaded to cloud infrastructures, which, although providing enhanced processing capabilities, can introduce latency [74]. A comparative overview of CC, FC, and EC is presented in Table 2, outlining their architectural distinctions, latency characteristics, and application domains.  
Table 3 presents a detailed comparison of CC, FC, and EC in the context of energy systems, highlighting their differences in latency, energy efficiency, scalability, and real-time processing capabilities. The comparison emphasizes why EC is particularly advantageous for real-time energy management and distributed energy resources (DERs).  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Cloud Computing** & **Fog Computing** & **Edge Computing** \\ \hline Location of data & A cluster of data center & Near-edge and core networking, & Network edge, edge \\ collection, processing, & servers hosted on the & network edge devices, and core & devices \\ storage & internet & networking devices & Common (depend on \\ Computing power & Strong (depend on server & Weak (depend on network edge & edge device) \\  & cluster) & Device network) & Real-time processing \\ Responsible for the type & Large computation, or & Preprocessing & Real-time processing \\ of task & long-term storage task & & \\ Focus & Clusters level & Infrastructures level & Things level \\ Handling multiple IoT & Supported & Supported & Unsupported \\ applications & Slight & Slight & Serious \\ Resource contention & High & Low & Ultra-low \\ Privacy and Security & Low & Low & High \\ \hline \hline \end{tabular}
\end{table}
Table 2: The comparison between cloud, fog and edge computing.  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & **Cloud Computing** & **Fog Computing** & **Edge Computing** \\ \hline Energy Efficiency & Low (high energy & \\ consumption due to data & Medium (optimized for & High (minimizes \\ transmission and processing & regional energy use) & transmission energy, efficient \\  & at large-scale data centers) & local processing) \\ \hline \hline \end{tabular}
\end{table}
Table 3: The comparison between CC, FC, and EC for energy systems.