When BACnet meets IoT, you will experience a different building

This article is shared from the Huawei Cloud Community " When BACnet Meets IoT ", author: Zale, a beautiful coder.

introduction

In the 14th Five-Year Plan, "new infrastructure" is undoubtedly a key area that has attracted much attention. I believe everyone is already familiar with the term "new infrastructure". Compared with traditional infrastructure, the biggest difference between new infrastructure and new infrastructure is the reflection of the characteristics of the digital economy, which itself includes several characteristics such as digitalization, networking, and intelligence. There is no doubt that new infrastructure will become a strong support for the construction of new smart city facilities. Smart venues and smart buildings, as the most important components of smart cities, are no longer unfamiliar terms today. In fact, almost all large commercial complexes and office parks are equipped with comprehensive building automation, security, office and other comprehensive systems. Among them, the building automation system (BAS) is the most important and indispensable component of smart buildings.

Using the building automation system, unified monitoring and management of all public electromechanical equipment in the entire building can be achieved. The system can seamlessly connect to various building facility subsystems, including central air conditioning systems, water supply and drainage systems, power supply and distribution systems, lighting systems, etc., to further implement automated control, management and optimization of equipment. For example, hidden dangers that cannot be discovered manually in time can be detected in advance to avoid major accident losses; automatic indoor constant temperature/humidity control and humanized lighting control can improve the office experience; equipment automation control management can be optimized to reduce equipment failure rates and operation and maintenance costs. . Based on comprehensive optimization of multiple usage scenarios, it aims to create a safe, efficient, comfortable and convenient space environment.

Introduction to BACnet

Next, let’s talk about some of the technical implementation behind the building automation system. As the "control core" of smart buildings, BAS faces a variety of subsystems and equipment such as lighting, refrigeration, and heating. For the same type of equipment, there are differences between different manufacturers, models, and interfaces, which makes The complexity and implementation cost of BAS systems are very high. In order to reduce complexity, the industry has generally introduced some building automation protocol standards. Among them, the BACnet protocol has undoubtedly received the highest attention and acceptance. Let's introduce the basic situation of this protocol.

BACnet stands for A Data Communication Protocol for Building Automation and Control Network. It is a building automation network communication protocol developed by the American Society of Heating and Heating Air-Conditioning Engineers in June 1995. This standard combines different manufacturers The equipment forms a consistent automatic control system, aiming to solve the interoperability requirements between equipment from different manufacturers. The BACnet protocol includes two parts: device data communication and command control, and related communication standards are designed based on these two parts.

BACnet protocol layering

BACnet provides a simplified 4-layer network protocol structure, including the physical layer, data link layer, network layer, and application layer, as follows:

Figure - BACnet four-layer protocol structure

【illustrate】

  • Physical layer: Provides the physical connection between devices and the method of transmitting carrier signals.

  • Data link layer: abstractly converts physical signals into data frames and propagates them in the form of frames or packets. This layer is responsible for access and addressing, error correction and flow control functions of the communication medium.

  • Network layer: implements the routing and transmission of messages on the local network or across networks, and is responsible for network packet sequence/traffic/error checking and other capabilities.

  • Application layer: defines the communication semantics of the BACnet protocol, including response/non-response data packets, and communication of BACnet standard objects/services. The application layer is the most important part of the protocol standard design and the most focused part of BACnet application development.

The BACnet protocol unifies the application layer and network layer, and provides seven combination solutions for the physical layer and data link layer. Among them, two types of LAN networking based on BACnet IP/Ethernet and BACnet MSTP/RS485 are the most widely used methods in building automation scenarios. BACnet IP allows communication across subnets/zone control systems, leveraging the benefits of fiber optics and Gigabit Ethernet for device IP addressing.

BACnet network topology

In the BACnet network layer definition, a network is a local network composed of one or more network segments interconnected by repeaters or bridges, with a single local address space; in the BACnet Internet, the network layer implements global address to Local address translation and addressing.

The following is a typical BACnet network topology:

【Related concepts】

  • Physical Segment: A segment of physical media that directly connects some BACnet devices.

  • Segment: A network segment formed by connecting multiple physical network segments at the physical layer through repeaters.

  • Network: Multiple BACnet network segments are interconnected through network bridges. Each BACnet network forms a single MAC address domain.

  • Internetwork: Multiple networks using different LAN technologies are interconnected using BACnet routers to form a BACnet Internetwork. In a BACnet Internet, there is exactly one message path between any two nodes.

The BACnet network has obvious local area network characteristics. With the help of BACnet router nodes, the BACnet local network and external networks (such as Ethernet, ARCNET) can be connected. In addition, the BACnet network layer defines a clear data packet protocol (NPDU) specification and supports the unicast, multicast, and broadcast functions of data packets.

BACnet application interaction

Since the BACnet protocol only adopts a simplified four-layer structure, the BACnet application layer protocol needs to consider end-to-end reliable transmission in addition to application layer services. An APDU (Application Layer Data Packet) contains two parts:

  • Protocol Control Information (PCI) is a fixed header that contains APDU type (service request/response) and message segmentation reassembly information.

  • User data, variable content, containing specific information for each service request and service response

The BACnet application layer supports two interaction modes: "request-response" and "request-no-response".

Figure-Request-Response Pattern

Figure-Request-Non-Response Pattern

Objects and Services

BACnet draws on object-oriented ideas to implement language abstractions for communication between network devices.

In order to gain further understanding, we need to understand the following concepts:

  • Objects describe analog input, output or program modules, etc. BACnet devices contain one or more objects, and devices interoperate by reading/modifying the properties of the objects.

  • Attributes describe the basic fields of the object. For example, for a sensor input object, Present_Value (present value) is one of its attributes.

  • Service describes the method of object operation, such as accessing a certain attribute of the object, implementing alarms or notifications based on the object, etc.

In short, objects provide an abstract description of the "network-visible" parts of a building automation device, and services provide commands for accessing and manipulating this information.

All BACnet objects need to contain the following public attributes:

  1. Object identifier (ObjectIdentifier) ​​is used to uniquely identify objects in the device. ObjectIdentifier contains a total of 32 characters (composed of 10-bit ObjectType and 22-bit InstanceNumber)

  2. Object name (ObjectName), the BACnet device establishes contact with the device containing the related object by broadcasting the object name of an object contained in itself.

  3. Object type (ObjectType), objects of different types have an independent set of properties.

The relationship between objects and services can be described by the following figure:

Figure-BACnet objects and services

【illustrate】

  • The BACnet protocol requires that each device contains a unique "device object", and all information about the device can be obtained by reading its attributes.

  • BACnet devices contain multiple analog input/output objects. The properties (current values) of the objects are used to represent the points of the sensors/controllers.

  • The BACnet program communicates with the device through the BACnet service, such as reading point data through the ReadProperty service.

built-in definition

BACnet has a built-in set of standard objects and services that are continuously updated as the protocol evolves. The number of built-in objects in the current protocol has exceeded 49. Some common objects are as follows:

BACnet built-in services are mainly divided into 6 categories.

  1. Alarm and Event Services provide notification capabilities for changes in internal properties or status.

  2. File Access Services provide methods for reading and writing files.

  3. Object Access Services provide methods for reading, modifying, and writing property values, as well as adding and deleting objects.

  4. Remote Device Management Services provide tools and methods for maintenance and fault detection of BACnet devices.

  5. Virtual Terminal Services provides a character-oriented two-way data interaction mechanism.

  6. Network Security Services provide functions such as peer entity verification, data source verification, operator verification, and data encryption.

Problems with traditional BA systems

Through the previous introduction, we already have a certain understanding of BACnet and BA systems. It is not difficult to find that BACnet is still a category protocol mainly focused on local/LAN networking. In the BA field, most of the equipment is static, that is, it does not move frequently in space. This is essentially the case. Combined with the characteristics of the building construction. Today, although BACnet has been used in various large-scale building systems, most BA systems still have many problems, which are mainly reflected in the following aspects:

The system is complex and difficult to deploy

First, there are many types of BA systems. A BA system can include many subsystems and sub-devices, and the integration and deployment of each subsystem is difficult. The space design of large buildings is highly complex, making the overall software and hardware wiring design and implementation very complex. Traditional solutions are difficult to implement wirelessly and cannot be deployed quickly.

The operation and maintenance model is backward

The traditional operation and maintenance model is relatively backward, and most still rely on manual inspections. The overall efficiency depends on human input and professional skills.

Inefficient operation and wasteful energy consumption

Most traditional BA systems only provide the "remote control" function of equipment, lack the ability to integrate and analyze data, and cannot fully tap the value of data; it is difficult to analyze and optimize equipment/space energy consumption.

Closed system, data island

In the long-term market competition process, traditional BA manufacturers have formed their own system of technical barriers. The subsystem application protocols are diversified and privatized, and the system data is severely isolated, further increasing the system complexity and difficulty of use.

Huawei Cloud Facilities aPaas

Facility aPaas architecture

Huawei Cloud currently launches the facility aPaas service, which uses Huawei Cloud IoT device access and IoT edge cloud engine as the base to build building facility management services. It drives devices to gradually migrate to the cloud to achieve building facility operation and maintenance, intelligent control, and energy conservation.

Facility aPaas architecture:

Figure-Facility aPaas solution

Facilities aPaas core capabilities include:

  • Facility monitoring: achieve centralized access across regions, networks, and multiple campuses through cloud services.

  • Facility energy saving: Energy saving in cold stations, air conditioning terminals, and lighting is achieved through AI algorithms, models, and expert experience.

  • Intelligent operation and maintenance: Provide fault diagnosis expert system; provide system intelligent inspection system.

  • Facility operations: Provide centralized operational capabilities and operational support systems.

  • Nationalized system: Build a nationally produced facility management system from chips, electronic components, operating systems, communication protocols, application software, etc.

In addition, facility aPaas, as a derivative service of IoT in BA scenarios, provides out-of-the-box interfaces to simplify the development costs of partner/customer application integration.

Implement BACnet device access

The facility aPaas uses Huawei Cloud IoTDA to provide device access capabilities. Before BA devices can be accessed, the product's physical model needs to be defined. The platform describes the capabilities and characteristics of the device based on the IoTDA object model.

IoTDA-object model concept:

Figure-IoTDA-Object Model

The object model is a high-level abstraction for IoT devices, in which services/properties have a mapping relationship with the object properties of BACnet.

After completing the definition of the physical model of the BACnet device, we also need to establish the point mapping of the BACnet device, as shown in the following figure:

【illustrate】

  1. IoT device instances correspond to BACnet devices one-to-one.

  2. IoT device information gets properties from the BACnet device object.

  3. IoT device object model attributes (dynamic attributes) are mapped to BACnet input and output value type objects.

  4. Bind the IoT device attributes to the BACnet object attribute ID. The mapping fields include: Object type : Objecte_Type defined in the BACnet protocol. Object ID : Object_Identifier defined in the BACnet protocol. Attribute ID : Attribute defined in the BACnet protocol, generally Present_Value.

The overall architecture of BACnet device access based on facility aPaas is as follows:

Figure-Facility aPaas-Device Access

【illustrate】

  1. The facility aPaas is based on the management of IoTEdge edge gateway, BACnet data mining driver management, and BACnet point configuration management.

  2. The Hlink driver is based on the edge engine base to achieve reliable deployment and operation; the driver carries the mapping and configuration conversion of equipment points, connects to the Bacnet network, and implements controller/electromechanical equipment management and control.

  3. The edge gateway communicates with IoTDA through the standard MQTT protocol to implement attribute reporting/attribute setting function docking.

  4. The facility aPaas implements object model/device management, attribute query and setting functions based on IoTDA.

summary

BACnet is a common protocol standard in the smart building field and has been widely adopted today. Against the background of the trend of cloud migration in industrial parks and intelligent building automation, the traditional BA system based on BACnet requires a lot of adaptation and transformation work in cloud application development due to its technical barriers and closedness. As a cloud-native aPaas service for smart buildings, facility aPaas provides a set of BACnet device access, management and control, and integrated operation and maintenance capabilities. Facilities aPaas' out-of-the-box interface services provide customers/partners with lower cost and higher efficiency options for integrated delivery and business innovation.

Reference documentation

Click to follow and learn about Huawei Cloud’s new technologies as soon as possible~

Lei Jun: The official version of Xiaomi's new operating system ThePaper OS has been packaged. The pop-up window on the lottery page of Gome App insults its founder. Ubuntu 23.10 is officially released. You might as well take advantage of Friday to upgrade! Ubuntu 23.10 release episode: The ISO image was urgently "recalled" due to containing hate speech. A 23-year-old PhD student fixed the 22-year-old "ghost bug" in Firefox. RustDesk remote desktop 1.2.3 was released, enhanced Wayland to support TiDB 7.4 Release: Official Compatible with MySQL 8.0. After unplugging the Logitech USB receiver, the Linux kernel crashed. The master used Scratch to rub the RISC-V simulator and successfully ran the Linux kernel. JetBrains launched Writerside, a tool for creating technical documents.
{{o.name}}
{{m.name}}

Guess you like

Origin my.oschina.net/u/4526289/blog/10119838