System Architecture
Balancing Competing Demands Across the P-Block Project
Indoor air quality, thermal comfort, and energy efficiency are three demands that buildings must balance constantly, and they frequently conflict with each other. The P Block Project, which aims to be the first building in the world to meet the proposed IAQ standards, addresses this challenge by integrating an AI-driven control system directly into the building’s existing management infrastructure. This page describes the technical framework underpinning that system: how sensor data is collected and transmitted to the cloud, how a deep reinforcement learning model processes that data to make intelligent control decisions, and how those decisions are communicated back to the building in real time. Each design choice, from cloud storage to local deployment of the AI, reflects a deliberate trade-off between performance, reliability, and practical integration with existing building systems.
System Architecture Overview

The figure above illustrates how our intelligent building management system connects sensors, cloud infrastructure, an AI model, and the building’s existing control systems into a unified, automated platform.
How the system works
Environmental monitors, including CO₂ and PM2.5 detectors, are installed throughout the building to continuously monitor air quality and indoor conditions. Sensor readings are transmitted wirelessly (via WiFi) to a secure cloud platform. From there, the data flows in two directions: it is fed into an AI model for real-time analysis, and it is simultaneously visualised on a web-based dashboard accessible to building managers.
The AI model processes incoming sensor data and generates control decisions, for example, adjusting the set-points, which are sent to the Building Management System (BMS). The BMS then communicates these instructions to physical controllers, which carry out the changes in the HVAC system. This loop runs continuously, enabling the building to respond dynamically to changing conditions without manual intervention.
How do we select the appropriate IAQ monitor?
Before we can manage IAQ, we must be able to measure it with some confidence. After an extensive search of the literature, we have short-listed four AQ monitors that measure both PM2.5 and CO2 in real time. The Monitoring Team has carried out a comprehensive investigation of the performance of these four monitors in the laboratory using a range of particle and CO2 sources. The data have been analysed and the results presented in a detailed confidential report. These results will be used together with several other important criteria such as the capital and running costs, ease of installation, connection and secure transfer of data etc in order to select the most acceptable monitor for this Project. A final decision is expected in the coming weeks.
Why cloud storage?
Sensor data from monitoring base stations is transmitted directly to cloud infrastructure rather than stored locally. This decision was guided by one key priority: secure, reliable, and scalable storage. Cloud platforms such as AWS offer enterprise-grade encryption, redundant data centres, and the flexibility to scale as the building’s sensor network grows, none of which would be practical with on-premises hardware. The cloud infrastructure also serves as the central hub that connects the AI model, dashboard, and research data retrieval in a unified architecture.
How control signals reach the BMS — reliably and securely
Once the AI model produces a control decision, that decision must reach the BMS quickly and without error. Four properties shape this part of the design:
- Low latency and local deployment. Rather than routing control signals through an external server, the AI model runs on a local workstation within the building. This keeps communication between the AI and the BMS on the local network, minimising delays and reducing exposure to external network disruptions.
- Reliability through redundancy. To prevent a single communication failure from affecting building operations, the system can use redundant communication channels, for example, running wired Ethernet alongside wireless as a fallback. The BMS also includes fail-safe defaults: if a control signal is delayed or lost, the system reverts to predefined, safe operating settings. Heartbeat monitoring between the AI workstation and BMS ensures that any connectivity disruption triggers an immediate alert.
- Secure transmission. All control commands are validated before reaching the BMS, protecting against unauthorised access or signal tampering.
- Integration via existing BMS APIs. Rather than bypassing or replacing the existing system, the AI model works through the BMS’s own application programming interface (API). Crucially, the AI only suggests changes to setpoints, such as a target indoor temperature, rather than issuing direct commands to individual fans or dampers. This keeps integration straightforward and avoids the need to redesign the existing control infrastructure.
The AI model — balancing three objectives simultaneously
Most existing AI solutions for buildings focus on a single goal, such as minimising energy use. Our system addresses a more complete challenge: simultaneously optimising thermal comfort, energy efficiency, and indoor air quality (IAQ). These three objectives often conflict. For instance, achieving better air quality may require more ventilation, which uses more energy.
To handle this, the system uses deep reinforcement learning (DRL), an approach where the AI learns optimal control strategies by interacting with the building environment over time, guided by a reward function that balances all three objectives. Unlike rule-based systems or static models, an RL agent can dynamically shift its priorities in response to context. For example, prioritising air quality during a high-pollution event, or focusing on energy savings during off-peak hours.
Advantages: The approach is highly flexible and does not require an exhaustive manual specification of every possible scenario. It can also adapt across different building types and operational patterns.
Limitations to be aware of: Reinforcement learning requires substantial data or simulation environments during the training phase. Poorly designed reward functions can produce unintended behaviours, and policies trained in simulation may need careful validation before deployment in the real building.
Current progress: The team has developed a deep reinforcement learning algorithm capable of jointly and dynamically optimising the three competing objectives: thermal comfort, energy efficiency, and indoor air quality. The algorithm has been validated in a simulation environment, and the team is now scaling this validation to the full P-Block facility.
Validation and safety before live deployment
Before the AI model takes any live control actions, it undergoes rigorous testing:
Shadow model testing. The AI runs in parallel with the existing BMS, observing conditions and generating recommendations, without executing any of those recommendations. This allows the team to benchmark performance, detect anomalies, and verify compliance with local building codes for ventilation and temperature, without any risk to occupants.
Manual override capability. Facility managers retain full authority to override any AI decision at any time. Anomaly detection algorithms monitor AI outputs for unusual patterns, such as extreme setpoint changes, and flag them for human review. Override controls are integrated directly into the BMS interface for immediate access.
Fail-safe defaults. If the AI model loses connectivity or fails, the system automatically reverts to the BMS’s own standard control logic. Because the AI only proposes setpoints rather than directly controlling actuators, the BMS’s existing safety mechanisms always remain fully intact and active.