Download as pdf or txt
Download as pdf or txt
You are on page 1of 47

Communication protocols

BACnet

KNX
Communication
protocols
MQTT

Case studies
2
• About IEC (International Electrotechnical Commission)
• The IEC, is the world’s leading organization that prepares and publishes
International Standards for all electrical, electronic and related technologies –
collectively known as “electrotechnology”. IEC standards cover a vast range of
technologies from power generation, transmission and distribution to home
appliances and office equipment, semiconductors, fibre optics, batteries, flat panel
displays and solar energy, to mention just a few.
• About ISO ( International Organization for Standardization )
• ISO is a global network of national standards institutes from 156 countries. ISO's
standards make up a complete offering for all three dimensions of sustainable

Standardization
development – economic, environmental and social. ISO standards provide solutions
and achieve benefits for almost all sectors of activity, including agriculture,
construction, mechanical engineering, manufacturing, distribution, transport, medical
devices, information and communication technologies, the environment, energy,
quality management, conformity assessment and services.
• About CENELEC (European Committee for Electrotechnical Standardization)
• is responsible for European standardization in the area of electrical engineering.
• About ANSI (American National Standards Institute)
• is a private non-profit organization that oversees the development of voluntary
consensus standards for products, services, processes, systems, and personnel in the
United States. The organization also coordinates U.S. standards with international
standards so that American products can be used worldwide.

3
Communication
protocols

4
TCP/IP
Protocols

5
Ethernet

6
IPv4

7
TCP IP

8
• The Building Automation and Control Network
("BACnet") is an open data communications
protocol developed by ASHRAE and adopted by
ANSI (ANSI/ASHRAE 135-1995).
• It is designed to handle a number of building
automation system (BAS) applications such as
heating, ventilating, and air-conditioning
BACnet control, lighting control, access control, and fire
detection systems. It is also designed to be cost-
effective meeting requirements ranging from
those of small to very large buildings and the
largest campus-wide or regional applications.
• BACnet was designed specifically to meet the
communication needs of building automation
and control systems.

9
BACnet
Discovery

The BACnet standard specifies "network messages" by which the routers


can exchange information and automatically fill in the rest of their routing
tables, even adjusting the tables as networks are added or removed from
the internetwork.

10
Message
forwarding
by routers.

It is important to note that the BACnet standard places a restriction on the topology of a BACnet
internetwork: only one path may exist between any two devices on a BACnet internetwork. This
greatly simplifies the task of the routers; they don't have to perform tests to determine the
optimum routing of messages to other networks - a subject of ongoing debate for the Internet
itself.
11
• The BACnet committee incorporated several LANs into the BACnet standard.
They chose existing LAN technologies whenever possible. In cases where
LANs fitting the established criteria could not be found, the committee
developed its own LANs. These LANs, listed in the table below, cover a wide
range from low cost to high performance.
LAN
technologies BACnet LAN Standard Data Rate Packet1 size Cost
Ethernet ISO/IEC 8802-3 10 to 100 1515 bytes High
Mbps
ARCNET ATA/ANSI 878.1 0.156 to 10 501 Medium
Mbps
MS/TP ANSI/ASHRAE 9.6 to 78.4 501 Low
135-1995 kbps
LonTalk n/a 4.8 to 1250 228 Varied
kbps

12
• BACnet messages that don't fit in a single packet use segmentation. Why would
one message need more than one packet ? Well IP packets have a maximum
length of 1500 bytes. So if you are sending a BACnet IP message that is longer
than 1500 bytes then you need to send more than one Ethernet packet.
• Segmenting is an optional feature for BACnet devices. It will usually be
implemented in more complex devices such as field panels or workstations but
might not be in the smaller unitary controllers which are less likely to need to
send or receive large messages.
• When a message segment is received, the receiver checks that the segment is
intact before accepting it and sending an acknowledgement to the transmitter.
Segmentation The receiver can alternatively request that the sequence of segments be
retransmitted, starting with the bad segment. This avoids the necessity of
retransmitting the preceding good segments when a bad one is detected, thus

in BACnet
reducing the amount of traffic on the internetwork when errors do occur.
• To gain some performance in transferring segments, BACnet allows several
segments to be sent and received before the reply is returned. The maximum
number of segments which can be sent before a reply is received is called the
"window size."
• The degree of performance gain is somewhat dependent upon the "quality" of
the networks. If the networks were perfect, if packets were never lost or
delivered in the wrong sequence, the window size could be infinite. In the real
world where packets are sometimes lost in transit, the window size needs to be
lower. If internetwork transit times are small, window size can also be small.
• Most serial protocols like MS/TP choose a small number for the MTU because an
error requires retransmission and the data is slow so it better to catch an error in
smaller packet < 245 bytes.

13
BACnet Services

• Think of a service as a task /


action. Reading and Writing
data uses some of the BACnet
services known collectively as
Data Access Service.
• BAS (Building Automation
System) systems interact with
BACnet devices and objects
using these services and for the
most part the actual service
used is hidden from the
engineer building / using the
BAS.

14
• Example: Say your controller needs to read the set
point on a thermostat to perform its control. Then
the controller needs to support a BIBB called DS-RP-
A. This isn't enough. The thermostat must be able to
respond so it needs to support a BIBB called DS-RP-
Bacnet B. DS stands for Data Shar- ing. RP stands for Read
Property. The A and the B stand for Client (A) and
Interoperability Server (B).
• The outdoor temperature on a HVAC controller
Building Block could come from two places. A local sensor
connected to the unit or a remote value sent via
BACnet. In this case you would want to match the
BAS controller and HVAC controller with BIBBS DS-
WP-A and DS-WP-B (DataSharing-WriteProperty-A
or B for Client and Server).

15
Bacnet Interoperability Building Block

16
• The task of evaluating a device's networking
capabilities has been simplified by the "Protocol
Implementation Conformance Statement"
(PICS) specified in the BACnet standard. The
PICS, provided by the manufacturer of a BACnet
Protocol device, identifies the manufacturer, describes
Implementation the device and gives details of the
implementation including the device's
Conformance networking capability.
Statement • Every BACnet capable device (Controllers,
Software and field devices) has a PICS
statement. The PICS statement is very useful to
you as a Field Tech, Engineer or designer.

17
PIC Statements

• Every BACnet capable


device (Controllers,
Software and field devices)
has a PICS statement. The
PICS statement is very
useful to you as a Field Tech,
Engineer or designer.

18
• This flavor of BAcnet is most commonly used to connect field
devices to controllers / routers / control applications.
• MSTP:
• M – Master
• S – Slave
• TP – Token Passing

MS/TP – An • The physical layer uses RS485 which allows up to 128 devices
to be installed on a single network with a max physical

introduction
length of 1219m and speeds up to 115k baud. Using
repeaters allows the length to be increased. Compare to
Ethernet where the spec allows a max of 100 meters (330ft)
on a single unrepeated segment.
• Common baud rates are 19200, 38400 and 76800. All
devices must operate at the same baud rate. More and more
devices can auto sense the baud rate and configure
themselves correctly.

19
• The BACnet MS/TP protocol is a peer-to-peer,
multiple master protocol based on token
passing. Only master devices can receive the
token, and only the device holding the token is
allowed to originate a message on the bus. The
MS/TP – an token is passed from master device to master
device using a small message.
introduction • The token is passed in consecutive order
starting with the lowest address. Subordinate
devices on the bus only communicate on the
bus when responding to a data request from a
master device

20
BACnet
Internetworking

Low cost MS/TP LANs are used to communicate with the unitary controllers;
each MS/TP LAN controls one or two floors. A high-performance Ethernet
network is used as the "backbone," providing the communications between
the operator workstations, the file and printer servers, and the MS/TP
networks, as shown in figure above.

21
How MSTP devices are discovered
• BACnet MSTP is a token passing protocol. Only nodes with the token
are allowed to initiate service requests such as requests for data. A
device that receives a request, a request that requires a response,
may respond without having the token.
• Based on this behavior it is easy to understand the difference
between a MSTP master and slave. A slave is a device that can only
send responses. A master is an initiator of a service request.
• Only allowing masters to initiate a message exchange when they have
the token provides a mechanism whereby there can be multiple
masters on a network and contention or collision can be avoided.

22
• The standard does not
assign any logic function to
the two states.

23
BACnet Objects
and Properties
• Data inside a BACnet device is
organized as a series of objects. Each
object has a type and a set of
properties. There is always at least
one object in a device – it is used to
represent the device itself . The
other objects represent the device’s
data.
• In practical terms think of a simple
thermostat. Our example is a simple
device that has a temperature
sensor, allows the set point to be
changed locally or remotely, has a
local remote selection and reports
there is an internal fault by reporting
its status as normal/abnormal.

24
Commonly used properties - Almost all objects you
encounter will have these (and more) properties.
• Object Type: Popular Object Types: Analog Input, Analog
Output, Binary Input, Binary Output.
BACnet • Instance Number: A number that must be not be repeated
Objects and for any other object of the same type. The instance
number and the object type must be unique for every

Properties object in a device.


• Name: name of the object
• Present Value: The current value of the object. BACnet has
ways of telling you if the present value is valid – it uses a
property called ‘Reliability’.

25
BACnet
Objects and
Properties

26
Architecture

27
Case study
CAMPUS
and PRECIS

28
KNX Protocol
• KNX Association is the creator and owner of the KNX technology – the worldwide
STANDARD for all applications in home and building control, ranging from lighting
and shutter control to various security systems, heating, ventilation, air
conditioning, monitoring, alarming, water control, energy management, metering
as well as household appliances, audio and lots more. The technology can be
used in new as well as in existing home and buildings.
• For members of the KNX Association the system is royalty-free, moreover can be
implemented on any processor platform. All products bearing the KNX logo
are certified in order to guarantee system compatibility, interworking and
interoperability.
• KNX is approved as
• European Standard (CENELEC EN 50090 and CEN EN 13321-1).
• International Standard (ISO/IEC 14543-3).
• Chinese Standard (GB/T 20965).
• US Standard (ANSI/ASHRAE 135).
http://knx.com.ua/attachments/article/132/KNX-basic_course_full.pdf
29
KNX TP1
A minimum TP1 KNX installation consists of the following
components:
• a power supply unit (DC 30 V)
• a choke (can also be integrated in the power
supply unit)
• sensors (a single switch sensor is represented
in the figure above)
• actuators (a single switch actuator is
represented in the figure above)
• bus cable (only two wires of the bus cable are
required).

30
KNX TP1

31
Individual
address

• An individual address must be unique within a KNX installation. The


individual address is configured as described below.

32
Group
Address

33
Each group object has flags which are used to set the following properties:

KNX flags

34
Useful data
of TP1
telegram

35
In the figure above the maximum topological size of a KNX TP installation is shown

Overal view

Each bus device (DVC) can exchange information with any other device by means of
telegrams.

36
KNX
topology
with several
areas

The KNX TP1 bus can be expanded by means of a backbone line. The backbone
coupler (BC) connects its area to the backbone line.
It is also possible to have bus devices on the backbone line. The maximum number
of bus devices on the backbone line decreases by the number of backbone couplers
in use.
Within a maximum of 15 functional areas, more than 58,000 bus devices can be
connected to the bus system. 37
• MQTT is a publish/subscribe messaging protocol designed
for lightweight M2M communications. It was originally
developed by IBM and is now an open standard.
• MQ Telemetry Transport (MQTT) is a lightweight network
protocol used for publish/subscribe messaging between
devices. MQTT is designed to be open, simple and easy to
implement, allowing thousands of lightweight clients to be
supported by a single server. These characteristics make it
ideal for use in constrained environments or low-bandwidth
MQTT networks with limited processing capabilities, small memory
capacities and high latency. The MQTT design minimizes
network bandwidth requirements while attempting to
ensure reliability of delivery.
• These tiny devices publish messages which then using the
MQTT protocol are received by the subscribers and may
trigger an event based on the data received. Some very real
and useful examples of ways to exploit the MQTT technology
can be the use of hardware chips to transmit information for
health care monitoring of pacemakers, energy meters,
cars/trucks, etc.

38
MQTT - Quality of Service
•The Quality of Service (QoS) feature allows the MQTT protocol to provide traditional
messaging qualities of service when the environment allows. You could compare QoS to
sending a letter. You might send it through normal US mail with no confirmation or you might
opt to use a courier service that assures delivery. There are 3 options for QoS:

QoS 0 - At most once delivery: With this setting, messages are delivered according to the
best effort of the underlying network. A response is not expected and no retry semantics are
defined in the protocol. This is the least level of Quality of Service and from a performance
perspective, adds value as it’s the fastest way to send a message using MQTT. A QoS 0
message can get lost if the client unexpectedly disconnects or if the server fails.

QoS 1 - At least Once Delivery: For this level of service, the MQTT client or the server would
attempt to deliver the message at-least once. But there can be a duplicate message.

QoS 2 - Exactly once delivery: This is the highest level of Quality of Service. Additional
protocol flows ensure that duplicate messages are not delivered to the receiving application.
The message is delivered once and only once when QoS 2 is used.

39
• MQTT has a client/server model, where every
sensor is a client and connects to a server,
known as a broker, over TCP.
• MQTT is message oriented. Every message is a
MQTT discrete chunk of data, opaque to the broker.
Architecture • Every message is published to an address,
known as a topic. Clients may subscribe to
multiple topics. Every client subscribed to a
topic receives every message published to the
topic.

40
MQTT Architecture
For example, imagine a simple network with At a later time, Client A publishes a value
three clients and a central broker. of 22.5 for topic temperature . The
All three clients open TCP connections with broker forwards the message to all
the broker. Clients B and C subscribe to subscribed clients.
the topic temperature .

The publisher subscriber model allows MQTT clients to communicate one-to-one, one-to-many and many-to-one.
https://www.eclipse.org/community/eclipse_newsletter/2014/february/article2.php
41
MQTT Control flags and connection

http://www.steves-internet-guide.com/mqtt-protocol-messages-overview/ 42
MQTT Control flags and connection

43
Case study – Passive House

44
SMX Trusted
and
untrusted
zones

45
Electric parameters
46
47

You might also like