# Edge and Cloud Computing in Smart Cities
## 2 Architectural Models for Edge and Cloud Computing in Smart Cities
### Hybrid Digital Twin-Enabled Edge-Cloud Architecture  
The hybrid digital twin-enabled edge-cloud architecture integrates computational capabilities across distributed edge nodes and centralized cloud resources while incorporating real-time virtual representations of physical systems. By leveraging digital twins, this architecture enhances predictive analytics, adaptive decision-making, and dynamic optimization of urban environments, enabling intelligent automation and real-time monitoring. The architecture is structured to maintain seamless interactions between the physical system, its digital counterpart, and the computational infrastructure, ensuring data consistency and low-latency execution [59; 60]. The computational framework is modeled as a set of interconnected layers, where each physical entity in the smart-city environment is associated with a digital twin. This system is formalized as  
\[G=(\mathcal{P},\mathcal{D},E,C,\mathcal{L}), \tag{27}\]  
where \(\mathcal{P}\) represents the set of physical entities, \(\mathcal{D}\) denotes the digital-twin models corresponding to each entity, \(E\) consists of the edge nodes responsible for localized processing, \(C\) includes cloud resources performing large-scale analytics, and \(\mathcal{L}\) defines the set of communication links interconnecting these components [61; 62]. The digital twin \(\mathcal{D}_{i}\) associated with a physical entity \(\mathcal{P}_{i}\) maintains a continuous state synchronization mechanism to ensure accurate real-time representation. The update cycle follows  
\[\mathcal{D}_{i}^{l+1}=f(\mathcal{D}_{i}^{t},\mathcal{S}_{i},\delta t), \tag{28}\]  
where \(\mathcal{D}_{i}^{l+1}\) represents the updated digital-twin state at time \(t+1\), \(\mathcal{S}_{i}\) denotes the set of sensor inputs from \(\mathcal{P}_{i}\), and \(\delta t\) is the time step governing synchronization frequency. The function \(f\) encapsulates the transformation of sensor data into a virtual model, ensuring consistency with the real-world entity [63; 64]. The decision-making process in this architecture is governed by an optimization function that determines the optimal execution layer for each computational task \(\tau\). The execution strategy follows  
\[F(\tau)= \begin{cases}E_{j},&\text{if }T_{E_{j}}+T_{sync}\leq T_{\text{C}}+T_{ comm},\text{where }E_{j}\in E\\ C,&\text{otherwise},\end{cases}  \tag{29}\]  
where \(T_{E_{j}}\) is the processing delay at the edge node \(E_{j}\), \(T_{sync}\) denotes the synchronization delay between the digital twin and the physical entity, \(T_{\text{C}}\) represents the cloud processing delay, and \(T_{comm}\) is the communication latency between the edge and cloud. The selection function prioritizes execution at the edge layer unless cloud processing becomes necessary due to resource constraints or computational complexity [65; 66]. Synchronization latency in digital-twin architectures significantly impacts real-time system performance. The total synchronization delay is modeled as  
\[T_{sync}=\frac{d_{update}+d_{comm}+d_{proc}}{f_{sync}}, \tag{30}\]where \(d_{update}\) represents the time taken for sensor data acquisition, \(d_{comm}\) captures the transmission delay from the physical system to the digital twin, \(d_{proc}\) accounts for the processing time required to update the twin's state, and \(f_{sync}\) is the synchronization frequency. The objective is to minimize \(T_{sync}\) to ensure real-time consistency between the physical and digital environments [67; 68]. Computational load balancing between the edge and cloud layers is a fundamental aspect of this architecture, as resource allocation must dynamically adapt to real-time conditions.