2.5 Analyze
3.3.4 Control trial set-up
The code structure from Equation 3.1 is implemented in YALMIP and requires manual inputs from the user every 5 minutes to update control sequences. A link to GitHub in the Appendix provides access to the code used in the trials. The outputted window opening sequence is then implemented manually via the computer interface shown in Figure 3.2 to control the skylight’s opening extent over the proceeding 5 minutes. This repeated process effectively closes the loop between model predictive control in MATLAB and actual implementation in the lab. Future developments may fully integrate and automate a real-time implementation in which the user need only hit run to start, and then collect results after any length of control trial.
36 Chapter 3 Ald´ıs Elfarsd´ottir
For the duration of the control trials, both manually-operable and automated panels of the south-facing windows are closed. While this may inhibit cross-ventilation and wind-driven ventilation in the space, it allows separate controls to be tested for the skylight, and focuses on the effect of buoyancy-driven natural ventilation through the skylight.
Figure 3.2: Control trial set-up
3.4 Measure
This section presents measurements from each iteration of control development.
Plots depict YALMIP output of window opening commands, actual implementation of window position via WindowMaster interface, indoor and outdoor air tempera-tures, and setpoint.
3.4.1 First iteration
Figure 3.3 plots results from two half-hour trials of distinct MPC scripts that use the same model with different setpoints. Between 12:00 and 12:30, the setpoint is 20oC, while between 13:00 and 13:45, the setpoint is 17.5oC.
The discrepancy between window opening commands in yellow and executed window opening in orange is partly attributed to imperfect manual implementation.
In part, the overall achievement of YALMIP commands is also limited by the window actuation mechanism. It takes about 1 second per 1% window opening or closing.
If there is a difference larger than 30% between the previous and next control value, then it takes half the minute to get to the next position. Thus, implementation sometimes lags or anticipates the next control value.
Data-Driven Model Development for Model Predictive Building Control
Noticeable spikes around 13:00, 13:15, and 13:30 are due to multitasking: in the WindowMaster interface, the user presses a button to open the window by a few degrees, or open it all the way, with another button to stop the motion. These spikes are from not stopping the window from opening all the way while copying over new disturbance variables for the next script run.
A problematic finding in the February 22 control trial is that the control script outputs window opening commands when desired setpoint is higher than room tem-peratures. Based on this result, it appears that the model does not realize that opening windows in cold weather will reduce temperatures. The Analysis section discusses why this is not actually the case by pointing out errors in the formulation and implementation of the preliminary optimization problem.
Figure 3.3: First iteration control trial
3.4.2 Second iteration
Notably, the second trial is performed on a day when the indoor and outdoor tem-perature difference is not high. Consequently the room temtem-perature appears to converge to the setpoint by the end of the trial period. In comparison with the first trial’s control script output, the second trial provides more variation in window opening commands due to the restructuring of the script to predict 10 steps ahead, and the control implementation of only the first five.
Part I applies the second order avalid model between 11:00 and 12:00, and Part II applies the second order atrain model between 13:30 and 14:30. In between the two parts of the control trial, the room temperature rises back to nearly its starting temperature within the first 10 minutes. Two distinct patterns of window opening are characteristic of the respective models applied in this trial, and likely stem from model formulation. Each model uniquely parameterizes the effect of disturbance and control variables on room temperature, and thus outputs a different control sequence upon optimization in YALMIP.
At the end of this trial, the experiment is simply to leave the windows open such that the room temperature equilibrates with the outdoor air temperature. Visually,
38 Chapter 3 Ald´ıs Elfarsd´ottir
it can be seen that both indoor and outdoor air temperatures begin to approach 20oC by 15:30. In this particular case, then, it seems a more effective controller might just keep the window 100 % open in order to achieve target temperatures.
However, the reason the MPC commands vary the window position with such fre-quency is because the time step of prediction and output is set to 1 minute, and the predicted temperatures vary with disturbance inputs. Ultimately in MPC it is the predicted temperature more than actual temperature that determine the controls, such that controls can anticipate and drive future changes in the system. It is ex-pected that with real-time input of prediction error in the script, this will improve the performance because the model will more accurately predict temperatures in the near future.
Figure 3.4: Second iteration control trial
3.4.3 Third iteration
Just as prior iterations display characteristic patterns of window opening unique to each model, the third iteration exhibits a particularly repetitive pattern of the control sequences despite new disturbance inputs every 5 minutes in Figure 3.5. This reflects a low sensitivity to changes in disturbance variables, which is indicated by the small magnitude parameter values (on the order of 10−5 to 10−8) in the system matrices for each model as listed in Table A.2. Indeed, the variables with higher weights (slab temperature, surrounding room temperatures) experience the least change over the course of the experiment, which has a steady slab temperature and surrounding room temperatures.
A closer look at the temperature response in Figure 3.6 reveals that the actual room temperature does not converge to the desired room temperature within the hour of the control trial. This suggests the need for a longer trial period. In addition, the atrain second order model appears to yield a much lower tracking error, based on the y-axis scale. This is perhaps due to the proximity of the initial temperature of the room to the setpoint.
Data-Driven Model Development for Model Predictive Building Control
Figure 3.5: Third iteration control trial
Figure 3.6: Third iteration room temperature response