Upgrading Building Management with Smart Edge Panels
Session date: Aug 27, 2024 08:00am (Pacific Time)
The integration of edge computing is revolutionizing building management by enhancing efficiency, sustainability, and decarbonization efforts. Designed as an industrial panel, the edge facilitates real-time data access, seamless communication with industrial systems, and advanced data-driven control strategies.
In this webinar, Mustapha Habib, a postdoctoral researcher from KTH Royal Institute of Technology, will discuss the features of the innovative KTH smart edge panel developed within the EU project HYPERGRYD. The webinar will cover the strategic use of InfluxDB for data storage and analysis, employing Modbus and PLCs for data handling, and implementing AI-driven control strategies to optimize building operations, reduce energy consumption, and lower operational costs.
Attendees will gain insights into selecting time series databases, integrating traditional systems with modern technologies, and developing predictive models that enhance building management practices.
You’ll learn:
- How InfluxDB can be utilized for effective data storage and analysis
- How to employ Modbus and PLCs (Programmable Logic Controllers) for robust data handling
- How AI-driven control strategies optimize building operations
- Insights on reducing energy consumption and lowering operational costs
Watch the Webinar
Watch the webinar “Upgrading Building Management with Smart Edge Panels” by filling out the form and clicking on the Watch Webinar button on the right. This will open the recording.
[et_pb_toggle _builder_version=”3.17.6” title=”Transcript” title_font_size=”26” border_width_all=”0px” border_width_bottom=”1px” module_class=”transcript-toggle” closed_toggle_background_color=”rgba(255,255,255,0)”]
Here is an unedited transcript of the webinar ““Upgrading Building Management with Smart Edge Panels.” This is provided for those who prefer to read than watch the webinar. Please note that the transcript is raw. We apologize for any transcribing errors.
Speakers:
- Anais Dotis-Georgiou: Developer Advocate, InfluxData
- Mustapha Habib: Senior Researcher, KTH
Anais Dotis-Georgiou: 00:00
Without much further ado, it looks like almost everyone has trickled in. So, I’ll hand things over to Mustapha and let him introduce himself. And we’ll get started with the webinar. Thanks, all.
Mustapha Habib: 00:13
Thanks, Anais. I would first like to thank you for this opportunity to present our latest achievements in the Hypergryd project to the large audience of InfluxData. And I would first introduce myself. My name is Mustapha Habib. I’m a postdoc researcher at KTH. So, I’ve been involved for more than two years in some research projects as a main driver along with some European partners. And what you are going to see here is one of the latest achievements in Hypergryd project. This is the project where I got involved initially at KTH. And to be aligned with the time, I will dive directly into the topic. So, I will first share my screen. Would you please confirm that you see my screen?
Anais Dotis-Georgiou: 01:10
Looks great. Thank you.
Mustapha Habib: 01:11
Yep. So, the topic is—
Anais Dotis-Georgiou: 01:15
Oh, sorry. One second. Oh, no. Perfect. Great. Thank you.
Mustapha Habib: 01:19
Okay. So, the topic is how to upgrade building management systems with a smart-edge panel. Of course, one of the fundamental parts of the smart edge panel is the time series database, and that’s the reason we are presenting here. The task, as I said, is one of the milestones that we should accomplish in Hypergryd project, which is the European research project. And, the presentation plan is divided into some steps. The first one is, what is the building management system for HVAC system where our time series database-based edge is suggested and connected to? So, we want to upgrade the building management system. And to do so, we should first define and explain it to the audience. Then, what are the challenges of BMS that initially drove us to build and develop edge computing and integrate the time series database to solve them? Then, we clarify the aspect of edge computing with time series databases when it comes to control. And then, what would happen if the entire system of edge computing is working with upgraded control and monitoring functions? Lastly, we will look at the next steps with this system.
Mustapha Habib: 02:50
So first, what is a building management system for HVAC? So, a building management system is not only for HVAC, not only for heating, ventilation, and air conditioning. It can also handle the lighting systems and the energy resources. But, here in this presentation, I would highlight that we focus more on the heating, ventilation, and air conditioning. Before diving into that, let me first introduce the project briefly. So, Hypergryd project is a set of solutions we suggest for sector coupling. So, sector coupling, for the people who are not familiar, is a system where multi-energy carriers exist in one network. So, in this case, we have electric power, of course. We have a thermal network. We also have an optional gas network. And the set of solutions we are suggesting here is basically hardware-based. So, we have three main hardware solutions. You can see here. I highlighted them in this red rectangle. Modular heat pump with the short-term PCM storage—PCM is a phase change material. And we have renewable energy-based option storage. And we have renewable energy-based small-scale CHP. Of course, this hardware is without smart control, and we really cannot reach the target with it. That’s why in Hypergryd, we suggested developing and integrating some services to drive that hardware to reach the goal, to reach the target. The target, of course, is how to maximize the renewable energy share, how to reduce gas emissions, and how to economize energy on the building level and in the community.
Mustapha Habib: 04:39
As you can see here, the services, of course, include predictive control, real-time monitoring, and energy management based on market trends. We can also see edge computing optimization. We’ve been thinking about where exactly we should host those services. So, the first plan is to host them on the project platform because we have a platform for monitoring all the project services from the partners. And basically, this platform is nothing but a digital twin. So, a digital twin for the buildings and from living labs where the buildings are existing. We have four living labs for pilots to test our hardware, and this platform just managed and visualized the data and services publicly. But we realized later that some of those services should be hosted on the edge. And there are reasons for that. For example, if we want to monitor a building or a system level, then we should have the services on the edge better. Additionally, when we have data privacy and reliability concerns, we should also host those services on edge. And lastly, we have this need for customized database storage. For example, on the platform, we are not sure that we have a time series database, and that’s why we need additional data storage close to the system, close to the end user, and we prefer to make it time series based.
Mustapha Habib: 06:25
Let’s now narrow the window a little bit and go to the building level. This is a typical hierarchical presentation of the building management system. It can be more. It’s composed, as you can see, in three layers, but it can be more in some systems. But that’s the general overview or presentation of the building management system. So, the bottom one is the field, of course, where we find the actuators. We find the sensors and energy meters. And the middle layer is nothing but the controllers themselves, where we have algorithms and codes that drive those actuators according to some energy management policies. And the upper layer is where the energy policy is hosted. I mean, the management level. It can host the energy management algorithm. It can also host reporting and alarming, which are the usual functions for any automation system.
Mustapha Habib: 07:30
The biggest challenge in such a system is that the data is going in a closed loop flow. So, it starts from the sensors, goes up to the— is passing through the controllers, and goes up to the database, to the management level, and then comes back to the actuators—to the field level with some actions according to the energy management control. So, everything is working fine, but we are not sure that everything is working optimally because we are not driving those actuators according to the optimization, to the data-driven approaches. And that’s why I would highlight those challenges in modern BMS. So, we have this efficient control system, but it has some limitations. For example, limited data analytics. We lack advanced tools that are based on data optimization and analysis. We have insufficient real-time processing. We have inadequate data integration. We cannot integrate data from other sources to the system. We have a scalability issue. We cannot scale up the system without reconfiguring it from scratch. Of course, the biggest challenge is that we cannot integrate AI and machine learning-based control on such a system because of the limited hardware resources. We also have a data quality and consistency problem.
Mustapha Habib: 09:02
Additionally, maybe one of you would ask, “Why not use the database on the management level as a system basis for the data optimization?” But the problem is such database is rational— relational, sorry. A relational database has also some limitations. For example, time series data optimization. We cannot drive such databases as a time series database. We have a problem of scalability. If we want such databases to be scalable according to the number of sensors and recording period, then we should have a larger system, which doesn’t really fit the BMS and building level. We have also real-time analytics problem. Such databases are not meant to provide meaningful tools for data analytics. And also, we have time-based queries. We cannot frequently ask for data from such a database, especially when we have a control system that requires frequent querying. In this case, there will be a mismatch between the control system and the database query process.
Mustapha Habib: 10:22
So, all those challenges, we cannot treat all of them in this presentation, but we will focus on the control aspect. We have a major problem in BMS, which is the control aspect. What is the control—what are the problems and the control in a classical BMS? Usually, when it comes to HVAC, heating, ventilation, and air conditioner—or lighting or energy management or any service in the building—BMS is designed to perform rule-based control. Rule-based control means that if there is a condition, you just do that action according to the condition. If this condition is not fulfilled, you do another action. That’s an efficient and easy way to implement code. But by doing so, we are not sure that we are optimizing anything. We are not sure that we are optimizing the electricity consumption. We are not sure that we’re optimizing the indoor control. We are not sure that we are optimizing or reducing gas emissions. All those targets are not included in the rule-based control.
Mustapha Habib: 11:26
There are additional problems with the rule-based control, which includes a lack of flexibility. We cannot adopt rules to the system when the system changes or when additional external parameters interfere with our BMS. We also have a problem of scalability issues. We cannot scale up the system, the same system, or the same code, the same algorithm within the larger system. We should reconfigure everything from the beginning. We have limited optimization. Of course, those rules, because it’s rule-based, those rules are not designed optimally. They are basically designed manually by engineers. So, we are not sure that those levels or those limits and the rules are designed adequately with the system specifications. We also have limited data utilization. Of course, those rules are not built based on any data. We have also an additional challenge when it comes to building management systems, and especially when we have commercial or we are dealing with commercial or industrial buildings, which are complex systems that are part of HVAC.
Mustapha Habib: 12:40
For example, here, you can see on the screen that we have an adsorption chiller, and the chiller is one of the modern machines that uses the waste of heat losses to produce cooling, a cooling capacity. And to drive this complex machine, we need a really deep analysis, a deep data analysis of operation data analysis. And to do so, we need to first drive it for quite some time. Then we fetch the data and train our models and test different scenarios. But unfortunately, this is not the case when people implement such machines in the HVAC system. So usually, they also own on the rule-based system. Our solution is to overcome this challenge—we start with a data-driven control. We should first have a data-driven model, and then we combine it with optimization techniques. And then we stick it, or we implement it, along with the general or overall functions of the building management system. The problem is to do all of this, we need a time series database. We need a time series database that somehow links with the BMS, fetches data, operational data of a complex machine. And then, after analyzing this data, we maybe come up with some advanced control that makes it possible to drive such a complex machine in an optimal way.
Mustapha Habib: 14:16 So, now the solution. The solution, of course, as you can see in the title of the presentation, is based on edge computing with a time series database. So, our solution is based on opening a window in the building management system to fetch data, do whatever we like to do with it, and then send back the control system or control actions to the BMS. So, we have three different ways to open that window in the building management system. We can open it in the field level. We can open it in the control level. Or we can open it in the management level. So, our suggestion, or our proposed solution in this project is to have this connection to the control layer. So, our edge computing will be directly connected to the controller, to the BMS controller. And then that communication is happening between the low-level control, which is a part of the BMS, and our edge computing. Of course, the purpose is to fetch data streaming, process time series data, build data-driven models, enable IoT communication, and enable, of course, optimal control.
Mustapha Habib: 15:28
So, when it comes to hardware components of our edge solution, this image can present the main devices put together to form or to compose the edge panel, our proposed edge panel. So, it’s composed of the PLC that facilitates the communication with the low-level controller. It’s also composed of a data gateway that makes bridging data to any cloud-based or remote database possible. We have AI-enabled industrial PC that makes it also possible to host locally advanced and control systems. And of course, we have some power supply and protection devices. So, data is fetched first from the BMS controller. It goes through the PLC. It then goes to the data gateway. And then, starting from this point, either we send data to a remote database or send it locally to the AI-enabled industrial PC.
Mustapha Habib: 16:37 This is the hardware side of our solution, and this is the software side. So, you see here that the data journey from the BMS to the database is quite— I mean, it’s going through many stages. It starts with a PLC Modbus server. So, this PLC is nothing but the BMS controller. The communication way between the edge PLC and the BMS PLC is Modbus. Of course, that’s the widely used industrial communication between PLCs. And that means that it goes from the Modbus server to the Modbus client in the PLC and then go through some logics and then go to the OPC server. That means that the communication between PLC and gateway is going through OPC UA protocol. And for people that are familiar with, they know that OPC is the modern machine-to-machine language. It’s widely used regardless of the controller vendors and technologies.
Mustapha Habib: 17:46
So, that’s the reason why we ended up using OPC as a communication tool between the PLC and the gateway. And, of course, the first receiver in the gateway is the OPC client. And then, it goes to some processing because one of the challenges when we deal with Modbus is a communication protocol based on a 16-bit protocol, which means that if we need float or real data, we need a 32-bit. And to do so, we stick each 16-bit to another 16-bit using some high-language programming language here. As you can see, JavaScript is used to solve this problem. We cannot change Modbus. Modbus is all the time 16-bit-based, so we can just play a little bit with the bits received from the PLC.
Mustapha Habib: 18:45
And then, the last step is to process the data, fetch it, and, if everything is fine, structure it. Then, we provide it to the remote database through RESTful API. And that’s one of the advantages of InfluxDB because we can just write the data to a remote database using RESTful API. That’s the software side of our solution. And one of the reasons we ended up using InfluxDB is because it’s really easy to communicate with and to install it in the first place. So, personally, I have been working with a database hosted on a Linux virtual machine. And I usually use SSH as a communication way. And with the Linux console, with Linux commands, for example, when I want to run it in a very simple command, I can just use this one. You see it on the upper side of this slide. Also, I can use a very simple command, which is auth for authentication. I can also create user management using Linux-based commands. And I would highlight something important here. The version of the InfluxDB we are working with for this project is relatively old. And I mean, what I wanted to say is, even with this old version, it’s flexible. We could really do awesome things with this database.
Mustapha Habib: 20:18
Also, we have this database management. Just with a simple Linux command line, we can create, delete, and manage databases. And of course, we can query data using InfluxQL. So, I’m personally a fan of using InfluxQL to query data from Linux consoles. Because for me, somehow, it’s more or less similar to the relational SQL. We can, of course, also use high programming languages like Python with special libraries to query data using Python clients here. There’s an example of class here, Python class, that makes it possible to communicate with the Linux virtual machine-based InfluxDB. And now, we have all the system and software and hardware solutions. Now, we want to dive into what would happen if everything were connected to each other. So, our solution is based on this architecture.
Mustapha Habib: 21:17
So, at the top—or extreme left—we have this panel or control monitoring panel, which is dedicated to the heat pump because the first targeted energy system is the heat pump in our project. We want to drive that industrial heat pump in an optimal way. So, we put the edge computing near to it. We fetch the data from the monitoring panel of the heat pump using Modbus, of course, and then we fetch the data to the remote database. So, the edge computing, along with the monitoring panel of the heat pump, is installed in Warsaw in our partner pilot in Poland. And the data is being fetched and sent remotely to our database in Stockholm. So, just here, we have the server for the database. We also, thanks to internet connection, all the time have access to some weather services like weather forecasts, solar radiation forecasts, electricity prices, and so on.
Mustapha Habib: 22:21
So, the first task is how to upgrade, as I said, the heat pump control by using or adopting data-driven strategies. So, once we have the data stored in our InfluxDB database, we want to give our partners access to take advantage of this data. So, we have three major users of this data. We have the project platform, of course. We have a platform, as I said in the beginning. This platform gathers all services from partners for this project, and we can just forward the data from the database to this platform through API. We can also give some special access to the database and to some partners that they want to feed this data to with their commercial software. We have some partners. They have commercial software, and they want to test simulations and run some scenarios on their own software. And, of course, we can also create a public dashboard.
Mustapha Habib: 23:22
This is one of the very— I mean, most people are familiar with using open-source solution as a public dashboard here. And it’s public because we are using port forwarding here. The data you are seeing here is data from the PLC station, and it’s being fetched from the PLC from Warsaw and being stored locally here in Stockholm and the database server. So, the journey from Warsaw to Stockholm. And, going back to the project platform, this is the overview or one example of the digital twin features of our project. So here you see a digital twin of the building, and you also see an energy conception monitoring here. And the data you see here is from our InfluxDB database. And the data journey here starts from Warsaw, go to Stockholm, start from Warsaw when the energy meters are existing, and then data being fetched thanks to the edge and being sent also to the database here in Stockholm, and then forwarded to the project platform, which is hosted. I think it’s Microsoft Azure in Madrid. Yeah. It’s a long journey, but it’s fast, and the changes are instantaneously. I mean, there is no huge delay between the data source and the data visualization.
Mustapha Habib: 24:55
Next step. We have data already stored in our database; what can we do to improve the control system of our HVAC? So first, we need to put the database as close as possible to the edge. That’s the first milestone that we want to do. So, we want actually to get rid of any cloud connection. This is highly recommended when we want to highlight or increase the robustness of data handling in our edge computing. So here you see that we want everything independent, and we drive the AI algorithm and any other data— I mean, the data source is hosted locally in this industrial PC. Of course, this cannot stay forever. From time to time, we need to connect to the cloud just to fetch some updates, for example, for weather or electricity prices. But a permanent connection is not mandatory. So that’s the first milestone that we want to achieve for our edge computing.
Mustapha Habib: 26:05
The second one is, as I said before, our first targeted machine is the heat pump, the industrial heat pump. We want to implement advancement control for the heat pump. To do so, we need edge computing, of course. And the first control algorithm that we selected for this mission is reinforcement learning. Reinforcement learning is a technique that enables control systems to improve over time through trial and error. The issue with the reinforcement learning algorithm is, in the beginning, in the earliest stages, we cannot connect it to the system and let this trial error happen within the system itself. This is a bit risky. And that’s why we choose a predefined or pre-trained model first. So, these pre-trained models are hosted on the edge, and they make it possible. I mean, the reinforcement learning control interacts with those pre-trained models instead of interacting with the system itself. When the control behavior is mature enough, then we connect again to the real machine. And that’s, I mean, a critical transition from model-based to system-based. It’s a model-free controlled system. It’s going to be the direct interaction between the controller and the real system. So that’s why, for this pre-trained model, we need a database, specifically InfluxDB.
Mustapha Habib: 27:37
The second targeted machine is something called sorption storage technology. The picture or the image you see here is during the initial phase of such a machine. And it’s new in a way. We are not really aware of its behavior and comportment when it’s connected to the energy network. So, we are not sure if we connect it with the BMS with this rule, classical rule-based control. We are not sure that driving it in a highly optimal performance. That’s why we choose to first fetch data through the edge computing panel, analyze it first, cover the dynamics of such a machine, and then see if we can build some optimal control or advanced control for it. And to do so, of course, that’s why we ended up choosing InfluxDB to host it on edge computing to deal with such a mission.
Mustapha Habib: 28:41
Another targeted machine is an air-handling unit. That’s actually one of the really interesting applications in this project because the control technique we already validated in the simulation phase is called “model predictive control.” It’s a nonlinear model predictive control, which is, of course, data-driven. Data-driven means if we want to effectively drive the air-handling unit in the building, we need first to model it accurately. We cannot rely on the mathematical equations to do so because the system is quite complex and because also our MPC, our model predictive control, is multi-input, multi-output. Multi-output means that we want to drive it to follow the set point with less energy playing on several actuators.
Mustapha Habib: 29:36
Here, the control architecture between the BMS controller and the edge computing is a bit specific, not like the other applications. Because, here we have the edge and the BMS controller connected in series, in a cascading way. So, the BMS defines the set point, and then the edge computing makes sure that the set point is followed with less energy. That’s the philosophy. That’s the main target of such a controlled technique. And, of course, again, to do so, we need to model it using data. And that can be possible only by employing InfluxDB in the game here and in the data flow. What you see here is the connection, again, between the control system, the edge computing, the BMS controller, and the management level. And you see the rule of the database here. So, there is the asynchronous process of carrying data from the management-level database. This is asynchronous because the period where we need to update the model and the controller doesn’t really need to be synchronized with the control itself. We need to update the model maybe once each month or once every six months or something like that. But the control itself should be updated, I mean, in a regular time window, for example, every 15 minutes. And that’s why we have the data by the BMS control by going to the InfluxDB database first, and then we update the model periodically.
Mustapha Habib: 31:23
And you can see here how powerful the model predictive control is because we are making sure that the set point is followed by playing on several actuators. And you can see in the extreme right here what those actuators are that force the system to follow the set point. For example, the set point, I would say, is the indoor temperature of a room or a building, zone building. And what’s the biggest advantage of using all those actuators simultaneously? Because we want to achieve the set point with less energy. For example, if we want to increase the heating temperature, it doesn’t really mean that we increase the heating source temperature. We need just to recycle as much as—or in an optimal way—the exhaust air coming from indoors to recycle to the building zone again. And it’s a powerful control technique, but without a data-driven model of the air-handling unit itself, this cannot be possible. And this model cannot be possible without periodic coordination with the InfluxDB time series database because we need all the time to update the model, train it first, update it, and implement it within the framework of MPC.
Mustapha Habib: 32:45
So, to summarize, the biggest advantages of including a database in BMS are three major aspects. The first one is that it facilitates dramatically including or connecting edge computing. So, the Influx time series database makes it possible to bridge data. This is the only way for us to bridge the data from the BMS to any higher-level computer environment, which is, in our case, edge computing. Also, a powerful aspect of InfluxDB’s database is that it’s scalable. It’s automatically scalable to any data storage, I mean, upgrade. If we have more sensors suddenly appear, or several BMS systems, or we can just keep dealing with all of them using the same database, it’s automatically— with some slight configuration, it’s scalable to any system upgrade. And, by doing so, we also upgrade the BMS itself, the BMS control aspect. For example, if we have a very sophisticated control system and naturally, we cannot implement them on the BMS system, we can just fetch the data thanks to the edge device, host it, or store it in the InfluxDB time series database, and then coordinate the database with any high computing hardware to implement the model-based control system or any advanced control system. Those, I would say, are the three major advantages of using a time series database in this task, particularly in our project. And I think I finished it with the presentation. I’m, of course, ready to answer any question from the audience.
Anais Dotis-Georgiou: 34:40
Thank you so much. That was a wonderful presentation. Really appreciate all the information. It was really interesting to learn about such an exciting space. So, thank you so much.
Mustapha Habib: 34:51
No problem.
Anais Dotis-Georgiou: 34:53
And yeah. If anyone has any questions, please drop them in the chat or the Q&A. I also want to thank all the audience members for attending and remind you that there will be a copy or a recording of this webinar available to you once we end here. That will be sent out to your emails. And, if you have any questions about this webinar or about InfluxDB in general, please ask the community Slack or the community forums, and I’d love to answer them. We do have one question coming in now. So, Willem says, “Thank you for a very nice and relevant presentation. I wonder how you have dealt with data quality that is usually very poor in buildings, bad sensor quality, wrong placing, wrong labeling, etc.” And he’s also curious to hear what time horizon was chosen for the function that the MPC optimizes. Oh, you’re on mute.
Mustapha Habib: 35:56
Sorry. So, dealing with data quality is actually one of the missions of edge computing. So, if we come here— I think I’m still sharing the screen. So, if we come here to the edge computing architecture and software architecture, one of the missions is to deal with data quality. So, there are two stages to deal with this. This is a very relevant question. The first one is the gateway itself and the edge computing. So, we deal with data quality in this data processing. You see here data processing in the middle on the gateway side. Here, I said two sections, but actually, there are more. So, we deal with data equality here. And in the last stage, we deal with data equality in the industrial PC. You see in the industrial PC here. Also, before feeding data to the control system, we deal with equality. We filter and eliminate any outliers and any relevant values in this system. Of course, this is the last version, but so far, now we are dealing— for the second stage, we are doing this here in the database in Stockholm. I mean, in this database server, we are implementing an algorithm that deals with all this low-quality data. For the second question, the time horizon or the control window of the MPC is six hours. Six hours. And with a time stamp of 15 minutes because the system is slow enough to not change suddenly. So, 15 minutes, I think it’s accurately designed for such systems with MPC. Yeah.
Anais Dotis-Georgiou: 37:41
Very cool. Thank you. And I’ll give everyone a couple more seconds to answer any remaining questions or ask any remaining questions they might have. Okay. I don’t see any more questions coming in. So again, I want to thank you so much for giving this webinar and this presentation. It was a super interesting topic. We’d love to have you. So, thank you so much. And thank you, everyone, for attending. And I hope to see you all soon. Thank you.
Mustapha Habib: 38:17
Yeah. You’re welcome. Thank you.
Anais Dotis-Georgiou: 38:18
Bye.
Mustapha Habib: 38:19
Bye-bye.
[/et_pb_toggle]
Mustapha Habib
Postdoctoral Researcher, KTH Royal Institute of Technology
Mustapha Habib is a senior researcher with a PhD in electrical engineering, specializing in data-driven modeling and control, grid management, and power electronics. After being active in the automation industry and data science, he is currently involved in some European research projects at KTH Royal Institute of Technology as a postdoctoral researcher, along with some teaching duties.