Circular economy meets building automation

This paper demonstrates the concept of reusing discarded smartphones to connect the end-of-life of e-wastes with the start-of-life of smart buildings. Two control-related and one communication-related case studies have been conducted experimentally to evaluate the applicability. Diverse controlled systems, control tasks, and algorithms have been considered. In addition, the sufficiency of communication with external agents has been quantified. The proof-of-concept experiments indicate the technical feasibility and applicability to typical tasks with satisfactory performance. As the capabilities of smartphones improve over time, higher computing performance and lower communication latency can be expected, which enhances the prospect of the proposed reuse concept.


Introduction
The circularity within the building sector can be enhanced by examining the e-wastes that are largely neglected so far.On the one hand, ongoing digitization in the energy sector intensifies the demand for computing power, i.e., programmable logical controllers (PLCs) [1] are commonly used for automation in buildings.On the other hand, many smartphones are mainly disposed of to extract valuable metals [2].This paper contributes to bridging this gap by investigating the reuse of discarded smartphones to connect the end-of-use of smartphones with the start-of-life of smart buildings.
Currently, many smartphones turn into e-wastes when they are outdated or have battery/screen malfunction [2].However, their central processing units (CPU) and random-access memory (RAM) may remain intact.Therefore, they are potential neglected resources to perform building energy management tasks.Once connected to the internet and power sources, they can help to avoid manufacturing new micro-controllers and to reduce the overall carbon footprint.Although the reuse of outdated desktops has been investigated in lab facilities [3], the reuse of smartphones for building energy management systems has not been systematically investigated in experiments.Key concerns include the timely execution of control algorithms and effective communication with external devices.While the former impacts occupants' comfort at the building level, the latter impacts agent-based coordination among buildings [4] and attainable ancillary service options [5].
To systematically assess the technical feasibility of such a concept, several proof-of-concept experiments are provided in this paper, considering diverse controlled systems, control tasks, and control algorithms with different levels of computation and communication loads.

Methodology
Two control algorithms are considered to reflect the complexity of control-related case studies, namely model-based predictive control and data-driven predictive control.They differ in terms of communication and computational loads.
Both control strategies are key to enable optimal building-level operation and district-level coordinated building energy management.The rest of the section provides a brief summary.
The main principle of model predictive control (MPC) is recursively solving an optimal control problem (OCP) over a horizon considering the future response of the system.While the context-specific constraints and cost functions are elaborated in section 3, a generic formulation is given as follows: minimize u,x,y where N is the time horizon, u, x, y are the vectors of decision variables, r is the reference for tracking, t is the time stamp, Q and Q ′ denote the weighting matrices for input and output costs, U and Y are the input and output constraint sets, and xt is the estimated state at time t.By varying Q and Q ′ , Equation 1 can be customized to represent constrained energy planning and reference tracking tasks.In addition, to mitigate potential numerical instability when estimating xt , a Kalman filter with Joseph formulation [6] is used, which is given as follows: where I is the identity matrix, K is the gain, H is the measurement mapping matrix, R is the measurement noise covariance matrix, and P − , P + are the prior and post measurement update estimation error covariance matrices, respectively.
Regarding data-driven control, signal matrix model predictive control (SMM-PC) [7] is considered.In brief, it maximizes the conditional probability of observing the predicted output trajectory and the measured past outputs to improve the combination of offline trajectories.Therefore, it differs from the previously mentioned MPC in terms of real-time data extraction, the need for state estimation and the OCP.

Case studies
To systematically evaluate the applicability of the reuse concept in practice, diverse controlled systems, control tasks, and algorithms were considered in the experiments.This section includes a description of the general experimental setup that supports the case studies, followed by a detailed explanation of each case.

General experimental setup
The overall setup is illustrated in Figure 1 and Figure 2. The open-source package Termux [8]2 was used to enable smartphones to function as a Linux machine and host Python installation.Secure shell protocol (SSH) was used for remote/headless access to facilitate reusing discarded smartphones with cracked screens.The communication among devices was enabled by message queuing telemetry transport (MQTT) [9] in the communication latency assessment case study.Real-time information exchange in the control-related case studies was facilitated with the REST API and an OPC server.

Applicability to control tasks
To reflect the heterogeneous controlled systems in the built environment, both space heating and stationary electric battery were included.Specifically, optimal space heating power scheduling was considered and the reference tracking task was examined for the stationary electric battery, e.g., necessary concerning ancillary service provision [5].Both the classical MPC and data-driven control SMM-PC presented in the previous section were assessed.This diverse setup is further illustrated in Figure 3.
More concretely, Case 1 concerns minimizing the heating energy consumption of a bedroom of a three-room apartment while respecting user-defined temperature limits.The input and output constraint sets of the OCP include heating power capacity and room temperature limits.The control decisions concerned heating power, which was dissipated through a ceiling heating system.The thermostat in the room was remotely controlled by manipulating the setpoints, which influenced the valve opening/closing to regulate the heating flow indirectly.Continuous control decisions were translated into sequences of binary valve positions using a pulse-width modulation (PWM) strategy.In Case 2, a Lithium-ion electric battery was controlled to track an artificial sinusoidal reference signal with its state-ofcharge (SOC).The input was constrained by charging and discharging power limits.In both cases, the sampling time was 15 minutes.

Applicability to communication tasks
The latency in information exchange was compared to two alternatives, namely a laptop (HP Compaq Pro 6300 MT) and a Raspberry Pi (4th Gen Model B).Specifically, the round-trip delay of the communication was used as the key performance indicator.That is the combined duration of message transmission and acknowledgement with the network configuration depicted in Figure 4.For example, different devices (i.e., a smartphone, a laptop and a Raspberry Pi) sent a message to the laptop within the network of Empa (152.88.x.x), which acknowledged the receipt of the message.Each device quantified the time interval to receive the acknowledgement.In all cases, only the smartphone was connected to Wi-Fi, reducing communication performance.

Results
The experiments utilized the NEST building located at the Empa campus in Dübendorf [11], discarded smartphones, a private network and the network of Empa.Two smartphones were used in the experiments with key specifications summarized in Table 1.[12] as the solver.The results of control-related case studies are summarized in Figure 5.In Case 1, it can be observed that the temperature was controlled within the predefined comfort zone most of the time.The shaded areas indicate periods of window opening, which led to substantial temperature drops.These occupants-induced constraint violations were beyond the capability of the heating system and the controller.Therefore, these instances do not suggest inapplicability.In Case 2, the mean tracking error and the root-mean-square-error were −0.02 % and 0.09 %, respectively.The tracking errors can be attributed to the controller and the actuation precision.Both experiments show satisfactory results and confirm the applicability to control tasks.

Applicability to communication tasks
The communication delays of all three paths depicted in Figure 4 are quantified and compared in Figure 6.It can be observed that Path 1 exhibits the highest delays due to its internet connection using Wi-Fi.Nonetheless, the delays mostly fall within 1 second.Due to the large inertia of buildings, typical control time interval ranges from 30 minutes to hours.Therefore, communication delays within 1 second are considered acceptable for building-level energy management.However, such latency may be too large for tracking high-frequency signals when providing ancillary services to the power system.Potential solution includes adding peripherals to enable Ethernet connection for reduced latency and improved stability at the expense of increased cost and carbon footprint.

Conclusion
This paper experimentally evaluates the applicability of reusing discarded smartphones to typical control and communication tasks in buildings.Various controlled systems, control tasks, and algorithms have been considered.The results verify technical feasibility and reveal descent performance.As the capabilities of smartphones continue to improve over time, better-performing reusable resources can be expected.The proposed reuse adds to the existing portfolio of circularity concepts and sheds light on enhancing sustainability in the built environment.
Several limitations must be noted.First, the security of the chain of open-source tools has not been verified.This is crucial in future studies as the security of the system, which the distributed devices are integrated into, can be significantly affected.Second, the long-term stability, which industrial PLCs excel at, needs to be further examined.The next step includes achieving scalability through software standardization and investigating a simpler chain of tools to ensure stability, security, and efficiency.Additional life-cycle analysis can be performed in the future to quantify the impacts on sustainability.

Figure 4 :
Figure 4: Setup of case studies for communication delay identification.The figure on the left shows the network configuration of three information exchange paths.The figure on the right illustrates the calculation of round-trip delays.

Figure 5 :
Figure 5: Experiment results of control-related case studies.The figure on the left shows room temperature control results, where the black dashed lines indicate the comfort limits and the blue line shows the realized temperature trajectory.The figure on the right shows battery reference tracking control results, where the black dashed line shows the reference signal and the blue line shows the measured SOC.

Figure 6 :
Figure 6: Boxplots of round-trip delays with various hardware and connection interfaces.

Table 1 :
List of mobile devices used in the experiments.