FSP0013 – BACnet – Facility Science Podcast #13

By | July 23, 2019


Notes for FSP0013 – BACnet
BACnet is a data communication protocol for Building Automation and Control Networks
  • B, A, C is for Building, Automation, Control (B,A,C)
  • net is for Networks (so BAC, net)
  • BACnet defines standard methods of communication and data representation that allow building automation and control devices from different manufacturers to communicate with each other. Basically this means that if a manufacturer develops their device communications and data representation to the BACNet specification, their device will be able to communicate with any other device that implements the same spec.
    • Prior to something like BACnet, you would often be locked into either a certain manufacturer’s proprietary technology or to very simple communication (using relays and such) if you wanted your devices to communicate with each other.
    • These days we have very powerful computerized integration platforms that allow communication among devices using different standards and technologies, but we still need non-proprietary standards like BACnet (and there are others) for those integration platforms to be able to do their integrating thing.
  • (according to BACnet web site (bacnet.org)) – (this is a quote from their web site)) “Developed under the auspices of the American Society of Heating, Refrigeration and Air-Conditioning Engineers (ASHRAE), BACnet is an American national standard, a European standard, a national standard in more than 30 countries, and an ISO global standard.”
  • BACnet has been under development sine June 1987 and the first standard was published in 1995 as ANSI/ASHRAE standard 135.
  • In 2003 BACnet became an ISO standard (ISO 16484-5)
What does BACnet actually do (or allow us to do)?
  • We want to connect our building systems together in some kind of network that allows them to communicate with each other and allows us to communicate with them in order to integrate automation and control of the various systems.
  • In order to create this network, we need to know…
    • physically, how to connect the devices together (what kind of wires or radio waves or whatever).
    • What kind of electrical signals or radio waves represent data. Generally we’re talking about bits here (0s and 1s), so we need to know which electrical signal represents a zero and which represents a 1 and maybe how to detect and correct errors and that sort of thing.
    • We need all of the devices to do these things the same way.
  • In order to communicate with the devices across our network, we need to know…
    • how to do things like ask the device for its name or for the values detected by its sensors.
    • What kind of data we need to send to the device in order to get it to do something.
    • the format of the data the device will send back to use when we query its values or tell it to do something.
    • We need all of the devices to do these things the same way.
BACnet stack
  • BACnet defines what we call a “stack” of protocols?
  • I talked about the concept of protocol stacks and layered abstraction in #1 of this podcast which was about “How the Internet works”. The idea is that basically we can define, for example,  a physical layer which is how to physically connect things like I talked about before. We can define another layer which, for example, identifies different devices on the network that doesn’t depend on the details of the physical layer. If we define those layers correctly, we can swap out the layers for different supported layers without affecting other layer. For example we can use a wireless layer that transmits data with radio signals rather than a wired layer that send electrical signals along cables while using the same mechanism to identify the devices.
  • BACnet doesn’t actually define the mechanisms to physically connect the devices. The designers of BACnet recognized that this problem had already been solved, so they instead designed the upper layers of the BACnet stack to use existing methods and then tell us which of those existing methods to use
  • So in modern control networks, there are 2 main flavors of connection technology we use to connect the networks together. These are know as BACnet MS/TP and BACnet/IP.
    • BACnet MS/TP is designed to be used over EIA-485 (which you might know as RS-485). EIA-485 is a 2-wire serial communication standard that is pretty old but still useful and extremely common. EIA-485 allows us to connect multiple devices together by connecting one device to the next in a chain topology. So rather than invent something new, the BACnet people just said “use this, we already know it works” (not an actual quote). The BACnet spec then defines a protocol called MS/TP (Master Slave Token Passing) that specifies how the devices will pass BACnet messages across the EIA-485 wire. As far as I know (which isn’t that far, to be honest), I don’t think they define any physical layers other than EIA-485), it is conceivable that the BACnet group could define other physical layers with a connection topology similar to EIA-485 and make MS/TP work over that. I think EIA-485 works well enough and everyone knows how to use it so there’s no real need.
    • BACnet/IP is designed to be used over the kind of networks we use to connect computers in our offices and across the internet.
      • The IP stands for Internet Protocol (again, if you want to more about this, you can refer to #1 of this podcast called “How The Internet Works)(and I should probably point out that BACnet actually uses UDP over IP. UDP is one layer up the Internet protocol stack from IP, see #1 of this podcast).
      • By relying on IP, BACnet can communicate across any of the lower layer network types supported by IP. The most common of these is Ethernet which you’re probably at least casually familiar with (by the way, BACnet can also be used across Ethernet without using IP, but you then lose the functionality provided by IP that allows you to route messages across different networks…again see episode #1 for more about that.
      • A term you might hear related to BACnet/IP is BBMD (BACnet Broadcast Management Device). BACnet gains a lot of benefits by relying on IP, but there was a conflict between functionality required by BACnet and functionality provided by IP. BACnet requires the ability to send messages to all of the devices on a network at once. We call this a broadcast or multicast message. IP happens to provide such a mechanism. The problem is that IP doesn’t allow broadcasts to cross network boundaries. This makes sense, because if IP allowed broadcasts to cross network boundaries, every broadcast message on every home or office network would reach every device connected to the Internet. The Internet would be flooded with these things. Imagine you have a your main office and also a remote site. You have a BACnet network at both sites and you want to connect both networks together so you can manage them as one. This kind of thing is exactly what IP was designed for and it works perfectly, except for the broadcast problem. The individual devices can communicate with each other just fine from one network to the over using IP. But if you send an IP broadcast from inside the the home office that’s supposed to reach every BACnet device on the network, the message will never reach the devices at the remote site because those IP broadcast won’t route across the Internet. Enter the BBMD. The BBMD concept was devised as basically a broadcast relay. You would have a BBMD at each site and they would know how to reach each other. The BBMD’s job is to listen inside its network for BACnet broadcasts and forward them to an other BBMD it knows about. If a BBMD receives a broadcast from another BBMD, it relays that broadcast into its network. Problem solved.
      • If you want to know some more details about BACnet/IP and its development, there is a tutorial over at the BACnet web site. (http://www.bacnet.org/Tutorial/BACnetIP)
  • Gateways – Sometimes we want to connect a non-BACnet device to our BACnet network. For this we use gateways. A gateway is a device that speaks both BACnet and whatever is used by the non-BACnet device. The gateway map properties of non BACnet devices into the BACnet object model….
Creating networks of devices and deciding how to communicate data with electrical signals and routing stuff among networks is a problem that has been effectively solved for general use. The real benefit of BACnet is for the specific case of how to organize and communicate data in the context of automating and controlling building systems.
  • BACnet allows creation of a standardized abstract representation of a real device
  • BACnet specifies an object model to represent the characteristics of our building system devices. Each device is represented as a BACnet object (and this will be immediately understandable if you have done any object-oriented programming but maybe not if you haven’t).
  • An object, int this context, is simply a list of named properties.
  • A BACnet device is defined by a set of objects.
    • The device itself is represented as an object (again, an object is just a list of properties, some of which could be other objects)
    • Objects represent things like physical inputs and outputs.
    • Each object is a collection of properties that can be used to get information about the device or to change the state of the device.
      • Examples of properties (that an object might have) would be the name of the object, the type of the object (is it a binary input, a binary output, an analog value?), maybe the units of measurement of whatever the value is, some type of status flag…these are examples of object properties.
      • The properties in an object might be read only (such as the value detected by a sensor) or they might be writable (such as a setpoint or a control point to turn something on or off)
    • BACnet defines a number of standard object types (20-something, 23 or 25). Examples are Binary input, analog output, Trend log, command, etc.
  • Example: Thermostat – might present the following object (among others)
    • Space temperature – this object represents the temperature detected by the sensor in the thermostat. might have object_name=space_temp, object_type=analog_input, present_value=27, might also have a calibration value. The object_name, type, value might be read only, the calibration value might be writable.
Device Capabilities and Interoperability areas
  • Using this object model, BACnet defines a set of what they call interoperability areas. These interoperability areas are the kind of things we want our building automation and control devices to do. They are:
    • Data Sharing (control and monitoring)
    • Scheduling
    • Trending
    • Alarm and event management
    • Device and Network configuration and management
  • BACnet Interoperability Building Blocks (BIBBs)
    • Standard way to represent devices capabilities
    • Useful when making specifications for a system and comparing device capabilities
    • There are BIBBS for each of the Interoperability areas. Examples:
      • Data Sharing – DS-RP-A, DS-RP-B – DS=Data Sharing, RP=Read Property, A&B correspond to the client and server, A is the one that has the ability to read, B is the one that has a value to read and will give it when A asks.
      • Trending – T-V-A, T-V-B for Trend Viewing
      • Network and Device Management – DM-TS-A, DM-TS-B – Device Management Local Time Synchronization
  • Device Profiles
    • Device conforms to one or more device profiles – Operator Interface, Controller, Miscellaneous, General
    • Operator Interface B-AWS (Advanced workstation), B-OWS (operator workstation), B-OD (operator display)
    • B-BC (Building Controller), B-AAC (Advanced Application Controller), B-ASC (Application Specific Controller), B-SA (Smart Actuator), B-SS (Smart Sensor)
    • Miscellaneous Device, devices used for connecting networks – B_RTR (router), B-GW (gateway), B-BBMD (Broadcast Management Device)
    • General Device – don’t conform to profile in other families.
    • Device can conform to multiple profiles with some limitations.
    • Each profile has a set of required BIBBS…a device must have all of the required BIBBS in order to be classified as a device of that profile.
    • Protocol implementation conformance statement (PICS) – tells you BIBBS supported by the device. the networks types supported, the profiles the device conforms to.
There’s much more to say about BACnet….there’s security which is big and important and developing, there’s how BACnet relates to the IoT, and other things…I hope to cover these in the future.
A little bit about security
  • There are some developing and developed standards in the BACnet spec which might be very useful in the future. BACnet/WS, BACnet/SC. These are not widely deployed or widely tested and I wouldn’t recommend relying on them at all in the present (present right now is mid-2019.
  • For BACnet/IP security, it’s important to have good security for your IT network. Please don’t expose your BACnet network directly to the Internet. Use a VPN and tunnel through that if you need to connect multiple sites across the Internet.
  • There’s also physical security (people can tap into cables). Anyone with physical access to the devices or cables can gain access to your network and mess with your building systems.