## 3 System Model and Problem Statements
### Problem Formulation
#### 3.2.2 Edge Layer  
There is one local controller and edge node in each cell. The local controller, in particular, receives and sends data from the near edge node and can also handle and package data on its own. The set of cells is denoted by \(Z=\{1,2,3,\ldots,z\}\), and the local controller belongs only to its corresponding cell. In addition, \(Z^{\prime\prime}=Z=\{1,\,2,\,3,\,\ldots,\,z\}\) can be used to represent the group of controllers, with controller \(z^{\prime}\) collecting IoT data from its corresponding cell \(z\). The set of controller's energy is denoted by \(CE(t)=\{e_{1}(t),e_{2}(t),e_{3}(t),...,e_{z}(t)\}\), and the computational capacity of the controller is denoted by \(CC(t)=\{cc_{1}(t),cc_{2}(t),cc_{3}(t),..,cc_{n}(t)\}\). Each controller gets various IoT data from local devices while functioning. In this system, an MC is appointed among all controllers to minimize transmission consumption between the controllers and the blockchain network and relieve controllers with insufficient resources. Plus, the MC is in charge of collecting and processing all controllers' IoT data and interacting with the blockchain network. The MC's computational functions can be performed locally and with the aid of the local edge node, which improves performance and saves energy. The following are the computing overhead and energy consumption of the computation functions. If the MC chooses local execution, Equation (1) can be used to calculate the energy consumption \(E_{local}\) at time slot \(t\) where \(q_{t}\) is the computational complexity of the jobs and \(\mathbb{g}_{z}\) is the energy consumption coefficient [39], which can be expressed as Equation (2). \(c_{c}\) denotes the controller's computing capability.  
\[E_{local}(t)=\mathbb{g}_{z}*q_{t} \tag{1}\]  
\[\mathbb{g}_{z}=10^{-27}*(c_{c})^{2} \tag{2}\]  
If the MC chooses to offload the computation jobs, the energy consumption \(E_{offload}\) of data transmission paid by the local edge node at time slot \(t\) could be represented by Equation (3). \(d_{i}\) denotes the size of the computation task data, \(pt\) denotes the MC'stransmission capacity, and \(tr_{cd}\) denotes the transmission rate between the local edge node and the controllers [40].  
\[E_{offload}(t)=\frac{d_{i}}{tr_{cd}}*pt \tag{3}\]  
Additionally, at time slot \(t\), the computation overhead \(CO_{offload}\) imposed by the local edge node can be defined by Equation (4). \(\xi(t)\) is the fixed charge, and \(\Gamma(t)\) is the overhead variable set by the local edge node [41].  
\[CO_{offload}=q_{t}*\Gamma(t)+\xi(t) \tag{4}\]  
The MC sends the unverified block to the blockchain system after processing and packaging the data. \(E_{blockchain}(t)\) can be used to represent the transmission energy consumption [42]. Additionally, \(bn\) denotes the number of blockchain nodes.  
\[E_{blockchain}(t)=\frac{d(t)}{tr_{cb}}*pt*bn \tag{5}\]  
The transmission rate between the controllers and the blockchain system is expressed by \(tr_{cb}\). The overall energy usage \(E_{total}(t)\) and the computation overhead \(CO_{server}\) paid by the server if the MC performs the computations on its own at time slot t are as follows [40].  
\[E_{total}(t)=E_{local}(t)+E_{blockchain}(t) \tag{6}\]  
\[CO_{server}(t)=0 \tag{7}\]  
On the other hand, if the MC assigned the jobs to a local edge node, the overall energy usage \(E_{total}(t)\) and the computation overhead \(CO_{server}(t)\) incurred by the server are being calculated as [43]:  
\[E_{total}(t)=E_{offload}(t)+E_{blockchain}(t) \tag{8}\]  
\[CO_{server}(t)=CO_{offload} \tag{9}\]