Structure and Design of Building Automation Systems
Structure and Design of Building Automation Systems
Abstract
Building automation comprises the control and management of the whole building installation
which is heating, air conditioning, light, security equipment, etc. The overall goal is to reduce
resource consumption, to increase safety and security, as well as to increase the comfort of the
people. To reach this goal we need a comprehensive, large distributed control software that
makes use of the whole equipment.
This paper consists of three parts: We first give a short overview of the application domain
building automation to give an impression of the requirements on the control software. We
then describe the environment in which the control software is embedded. In large buildings
this is a huge distributed environment consisting of hierarchical busses which connect plenty
of sensors, actuators, and small processors. Finally, we present our approach of Hardware/Software-Codesign of building automation systems. The functionality of the building control system has to be partitioned onto a large set of distributed processors which interact via a
suitable communication system. The design of the embedded control systems has further to
ensure constraints like maximum reaction times, fault tolerance, and low costs.
1. Introduction
The complexity of the installation of buildings is growing rapidly. This can be seen for small
private houses as well as for large office buildings, plants, and airports. This increasing investment in building installation is due to the effort to reduce the consumption of energy and other
resources as well as for increasing safety, security and the comfort of the people in the building.
Modern microelectronics and microprocessor technology enable intelligent control of all
functions like heating, air conditioning, security systems, and much more. While today most of
1
these aspects are controlled individually, in future the partial control systems have to be integrated for further improvement. Even the assignment of service people may be optimized by
specialized programs. Modern building automation systems perform complex control loops as
well as comprehensive supervision, visualization, and optimization functions. The reduction of
resource consumption and the reduction of staff salary due to increased productivity justify the
cost of the building installation (hardware and software).
automation architectures.
Our vision of building automation is a virtually central but physically decentralized, distributed architecture. We have one logical control system that combines all sensors and actuators
of the complete installation in a single large, optimized, and intelligent control loop. A complex control algorithm optimizes all automation functions together to improve the solution of
the overall goal stated above: resource reduction and security/comfort increase. The central
control system is then implemented as a distributed program on a variety of microprocessors
and intelligent sensors/actuators which are connected by a large homogeneous data network.
There should be no physical separation between the building control level and the building
management level which requires new fault tolerance approaches.
The remaining part of this paper is structured as follows. In section 2 we describe the most
important part of the building automation hardware, the communication network. We show the
move from dedicated wiring to central bus structures. The description of our hierarchical field
bus approach will complete that section. In the following section 3 we then move to the design
aspects of building automation. Here we describe our idea of designing and implementing the
central control algorithm on the distributed hardware infrastructure. At the end of the paper, in
section 4, we shortly talk about open questions and necessary future works.
Recently, industry established three major field bus systems in the area of building automation: EIB which is a standard that dominates the European market, LON a very popular defacto standard in the U.S., and CAN which originally has been developed for the automotive
area but which becomes more and more popular in the process automation and building automation, too. All three bus systems will be described shortly in the following subsection.
area
coupler
main line
coupler
line
node
Figure 1
EIB network
4
relatively simple because all nodes only have physical addresses which are also organized hierarchically. The address of each node describes its position in the network. The address consists
of the area number, the line number within the area, and the node number within the line. This
is similar to the internet addressing with IP addresses containing domain, subnet, and node
fields. Nodes are assigned to one ore more groups. Signals are sent to all members of a group.
A maximum sized EIB network consists of 15 areas. Each area has 12 lines each of which
may connect 64 nodes at most. In total, the network can connect up to 11,500 nodes while the
distance between any two nodes must not extend 700 m. The cable is a relatively inexpensive
shielded twisted pair (SDP). Maximum throughput is 9,600 bit/s which is barely sufficient for
todays control level where controllers, sensors, and actuators communicate with few data
only. For future applications which combine the various functions and the management level
of building automation, this small throughput may become the drawback of EIB.
LON (Local Operating Network) has been developed by Echolon, and therefore it is no
international standard. Nevertheless, it is the direct competitor of EIB in the U.S. Its primary
application field is also building automation and it has the same hierarchical structure as EIB:
network nodes are connected to subnetworks which again are connected to an area. At most
approximately 32,000 nodes are partitioned into 255 subnets of 127 nodes each. So, the topology is similar to EIB. Also, the hierarchical routing and the structure of the node addresses are
similar. Similar to EIB, different nodes in one subnet can be assigned to a logical group with a
special address. A node may belong to up to 15 groups.
Differences can be found at the electrical level. LON supports Twisted Pair with standardized RS-485 interface as well optical fiber for higher data rates. The data rates further depend
on the size of the network. Using STP wires the rates vary between approx. 50 kbit/s if the
communication length is up about 1.5 km and 1.25 Mbit/s for shorter nets up to 300 m.
In contrast to EIB, LON does not support the physical communication layer only. LON also
provides network variables at OSI levels 6 and 7. These are global variables (e.g. temperature
values) provided to all application programs in the whole network. The values of these variables will be updated automatically (and transparently for the application program) by the communication system.
The third field bus in our list is CAN (Controller Area Network). CAN has been developed
for coupling complex controllers and has firstly been used extensively in the automotive area.
Later-on the application field extended to household appliances, medical equipment, and more
general process automation. However, it may also be used as an installation bus in building
automation but until today, in industry, CAN did not yet exceed production lines. Nevertheless,
a big advantage of CAN are the inexpensive bus controllers due to the large numbers of sold
controllers in the various application fields.
The physical layer of CAN is similar to LON. CAN also uses STP and symmetrical RS-485
interface. The differential voltage levels improve the tolerance against electromagnetic inter5
ferences. The data rates are slightly lower than for LON. CAN allows the transmission of up to
10 kbit/s over 1 km and 1 Mbit/s over 40 m. A much more important aspect for the bus specification was fault tolerance due to the intended application field(s) with high electromagnetic
interferences. This is not as important for building automation but was a major reason for
CANs success in process automation.
The problem of using CAN in building automation is the fact that CAN is a simple bus only.
CAN does not define hierarchical networks as it is the case for EIB and LON. Although we
currently find more and more couplers for connecting CAN buses to larger networks routing in
CAN networks is much more complicated than in EIB or LON networks. These couplers, provided by some companies, are small microprocessors with two CAN interfaces. The absence
of hierarchical addresses (CAN defines an 11 bit or 29 bit uniform address space. Addresses of
bus nodes are assigned logically but do not describe the positions of the nodes in the network)
requires more or less large translation tables in the bus couplers. These tables are necessary to
reduce the bus load by splitting network segment not only physically but also logically. A prototype implementation of such a coupler that has been developed in our group will be
described below.
In the following subsection 2.2 we describe how we build a hierarchical network based on
CAN buses. Our reason for choosing CAN for building automation are the inexpensive and
very well supported bus controllers. This allows us to implement intelligent sensors and actuators with bus interface easily.
room/floor B
room/flloor A
high-speed backbone
controller /
bridge, router
subnet B2
CAN
subnet B1
Hierarchical
CAN network
subnet A1
CAN
Figure 2
floor/wing
network controller
support hierarchical addresses at the lower communication levels). Alternatively, we can use
simple LAN technology for the backbone. There already exist CAN-LAN gateways as well as
LAN controllers for nearly all microprocessor systems on the market. At a glance, simple LAN
technology, e.g. Ethernet, would be the best choice for the backbone since it can be used for
general data communication, too.
We agree that LAN technology is suitable for bridging large distances, e.g. between two
wings, because separated wings of buildings can be controlled individually and communication is necessary at the management level, only. On the other hand, if we already need a hierarchical solution within a floor or other smaller area, then a field bus as backbone is more
suitable. In this case direct communication between sensors and actuators of different subnets
may be necessary. LAN technology would then prevent real-time communication (more precisely fast reaction times) and other advantages of field bus technology. In addition, communication from one CAN bus segment into another over a LAN makes addressing and routing
more complex. The CAN identifier of the target node has firstly to be converted into a LAN
address by the CAN-to-LAN gateway for routing into the target subnetwork and secondly to be
encoded within the data section of the LAN data packet to be available for addressing within
the target subnet.
In our group we therefore decided to implement a prototype building automation environment based on a hierarchical CAN network. Within the scope of a master thesis we developed
a CAN bridge shown in figure 3 (if we define hierarchical addresses as we have seen with EIB
or LON then bridges are sufficient for data routing). The heart of the bridge is a simple 8 bit
microprocessor with one internal CAN interface. A second CAN interface has been attached to
7
GAL
ALE
80C592
Single Chip CPU
Port 5
RAM
CAN Contr. 1
CANTransc.
PSEN
EPROM
data bus
DIP
Port 4
WR
Status LEDs
RD
CS1 CS4
CAN
Contr. 2
CAN backbone
CANTransc.
Figure 3
CAN subnet
the microprocessor bus as an I/O device. The specification of the bridge was to connect a
1 Mbit/s high-speed backbone (attached to the internal CAN controller) with a slower 125
kbit/s subnet (attached to the external CAN controller). The router is able to forward a message
from the subnet into the backbone (and vice versa) within approx. 50 ms. Since the microprocessor is not very powerful it was necessary that the CAN controllers already perform part of
the address filtering in hardware. This is possible by masking the CAN controllers with special
address masks which reduce the address space a lot. Multicast can then be done in a limited
way only.
In the subnets we also use simple and inexpensive CAN controllers with 125kbit/s interface
and 4 bit free address space only. These controllers, called SLIOs (Serial Linked I/O), determined the subnet specification for the bridge. The limited address space restricts us to 16
SLIOs in one subnet. On the other hand, we want to use more than 16 SLIOs in several subnets. We therefore implemented an address conversion function into the bridge that converts a
global 16 bit/29 bit identifier of a SLIO into its physical 4 bit identifier that has to be unique in
its subnet only.
In the case that CAN controllers are too expensive (and too powerful) for a single sensor/actuator we decided to use simple Dallas sensor circuits which communicate via a primitive Dallas 1-wire bus. Using those circuits we replace the CAN bus at lowest hierarchy level
by the Dallas 1-wire bus. For this case we exchange the external CAN controller of the bridge
8
by a 1-wire busmaster. We implemented this controller by a Xilinx FPGA. Details of this 1wire busmaster are beyond the scope of this paper.
Since we now know the structure of our building automation hardware infrastructure based
on a hierarchical CAN network we now show how the application system can be implemented.
building architecture
requirement analysis
& object structure
&SDL diagrams
building automation
knowledge
design specification
prototype generation
simulator
HW/SW codesign
(partitioning)
prototype
prototyping
implementation spec.
prototype generation
code generation
HW synthesis
synthesis of OS and
communication system
code (SW)
(distributed) HW
system software
HW/SW codesign
Figure 4
simulator generation
be sequentialized later-on during the codesign phase. We use this approach because it is much
more easy to sequentialize parallel processes than to search for inherent parallelism in sequential behaviors.
A first step of HW/SW codesign is a very important partitioning step. In this step we generate the implementation specification which contains the specification for the hardware selection or hardware generation task as well as the specification of the control software which
finally has to run on that hardware. The SDL processes will be partitioned with respect to the
specified hardware. If we decide to use specialized operating and communication systems
which are adapted to the considered control system, that system software has to be described in
the implementation specification, too. After generating the hardware, software, and system
software concurrently, the final step will be the system integration and its test.
Many additional constraints have to be met during the whole design process. If we check
those constraints after completing the integration phase of the complete control system, extensive backtracking steps will be the result. However, backtracking and design iterations are
time-consuming and therefore expensive.
In our approach we try to validate the intermediate result after each design step by prototyping to avoid extensive backtracking steps. This prototyping can be done by making all models
and design documents executable. Using a building simulator and partly the actual hardware
infrastructure of the control system the design documents are then validated as far as it is possible for the current design state. In the optimal case this iterative refinement approach reduces
the necessary design iterations and backtracking steps to a minimum.
In this paper, we dont want to describe this prototyping approach in more detail. This is the
topic of the contribution Modeling Embedded Digital Controllers. We restrict ourselves to
the lower part of figure 4 for the rest of this paper. In the following, the HW/SW codesign
phase will be further described.
with that the functionality of the circuit is described by a hardware description language (HDL) like e.g. VHDL. The circuit will then automatically be generated by
CAD tools, more exactly by logic or high-level synthesis tools. Circuit synthesis is
state of the art at RT level and pretty well examined at processor level.
While system design has been done manually until today, research is now looking for
computer aid at system level. Due to the huge design space we have to examine during
HW/SW codesign, there has been no describe&synthesize approach at this high
level until today. The overall design decisions of the current specify-explore-refine
approach are done manually while CAD tools are mostly used for individual exploration steps. Intermediate steps may be done by the two former approaches capture&simulate and describe&synthesize.
performance analysis
verification
reliability analysis
synthesis
uniform data representation
(abstr. HW/SW model)
other analysis
generation of
design alternatives
identification of
bottleneck
analysis of
design alternatives
simulation
runtime [ms]
1200
further constraints:
reliability, fault tolerance
1000
800
600
upgradability, durability
400
user-friendly, recycability
200
Figure 5
20 40
60
...
corner which is the fastest but also the cheapest possible solution.
Note that the diagram in figure 5 already contains 15 different solutions which have to be
evaluated although the diagram considers two aspects of the design space only. The diagram
considers the most important parameters which are speed and cost. However, there may be
much more constraints which must also be met. Several of those constraints are shown in the
lower-right part of figure 5. Besides speed and cost it may be important that the solution is fault
tolerant (which is important for our application field building automation), that the power consumption is low if we design portable devices, or the recyclability has to be considered due to
constraints by law.
The specify-explore-refine approach is used for nearly all system designs. Besides the
example shown above, [14] and [15] describe two real designs from GMD (engine control in
automotive and video manipulation in multimedia) and [13] describes the design of a portable
computer as interactive blueprints used by technicians. In all cases the CAD support concentrates on a good data management, interactive representation of design decisions and - what is
most important - comprehensive design validation, simulation, and profiling. The same holds
for nearly all commercial design systems. The HW/SW partitioning step which is a centrals
aspect of HW/SW codesign has mostly to be done manually. Literature therefore often speaks
of HW/SW cosimulation instead of codesign.
However, real codesign systems, which we mostly find in the research community (e.g.
12
[2], [3], [4]) and which perform the partitioning step automatically, support the specifyexplore-refine cycle, too. These systems support design processes which are similar to the
process shown in figure 6. All data including the system specification and all constraints are
stored in an internal representation. HW/SW partitioning is based on these data. After implementing hardware and software concurrently and integrating all hardware and software components to achieve the overall system, an extensive analysis and simulation phase results in
(new) profile data of the system which are used for feedback and design iterations based on
improved partitioning steps.
A hot topic and very important research topic that is currently evolving in embedded system
design is the compilation task. As we described above, system level design means generating
many different solutions which have to be tested. The designer generally has many different
hardware environments as basis for the same software. He/she therefore needs a compiler with
one frontend but a generic backend which can be adapted to the different (generated) hardware
structures. These compilers are called retargetable compilers [12]. The input of such retargetable compilers is not only the source code (as it is for general compilers) but also a description or model of the instruction set and/or structure of the hardware platform.
specification
mostly C
but also SDL, Esterel,
Statecharts, ...
interaction with
constraints
internal
representation
library
feedback: analysis results of
the former design step
partitioning
the designer
HW
e.g. VHDL
SW
e.g. C progr.
profile
compiler
analysis /
simulation
HLS /
processor
selection
prototyping,
co-simulation
Figure 6
system integration
oped in our group. It has originally been developed for the design of VLSI ASICs. Since its
overall structure is similar to that described in figure 5 it can easily be extended to HW/SW
codesign at system level. The kernel of our PLAYOUT system also is a central design database
and a tightly attached design management component. By interacting with the database the
design manager keeps track of the current design state, the possible design alternatives, and it
is responsible for managing the individual design steps. Design decisions themselves have to
be done by the designer. The PLAYOUT kernel only supports the designer by a convenient
interactive user interface and various analysis tools.
format
SDT
Schematic
Entry
(ext. system) cnvrt
....
Schematic
Entry
partitioning
....
Schematic
CC Entry
...
analysis
analysis
...
...
Schematic entry
Entry
schematic
repartitioning
Schematic
Entry
...
TimberWolf
Schematic
Entry
(ext. system)
Schematic
Entry
chip synthesis
PLAYBASE
prototype
design database
area
Schematic Entry
estimation
Figure 7
format
cnvrt
Schematic
Entry
cell synthesis
Schematic
Entry
chip planning
DESIMA
design
management
...
format
MIMOLA
Schematic Entry
(ext. syutem) cnvrt
Attached to the PLAYOUT kernel we can see several design tools in figure 7. All tools communicate with the database via an own exchange format which is easily extendable for new
design tasks (as it is necessary for extending PLAYOUT from hardware level to system level).
All design tools in figure 7 which are emphasized by the gray background have been taken
over from our hardware design system. They are still necessary when extending the design
space from processor level to HW/SW system level. Those tools are structural circuit design
tools like module generators and schematic entry, a repartitioner, and physical design tools like
chip planning, cell synthesis, and so on. Some tools have been implemented in our group while
other tools or systems have been developed elsewhere and integrated in PLAYOUT, only (e.g.
MIMOLA from University of Dortmund, TimberWolf from University of Washington).
Additional tools which we need for HW/SW codesign at system level are indicated above
the gray rectangle in figure 7. Those tools comprise the list of all system modeling tools (e.g.
14
the SDT or Statemate system modeling environments), software development tools like compilers, debuggers, and simulators, as well as HW/SW partitioning tools.
With this architecture, PLAYOUT supports the specify-explore-refine approach in an
ideal manner. Many different tools support the designer within the specification, exploration,
and refinement phases while analysis tools, simulators but also the PLAYOUT kernel (database and design manager) help the designer in finding and making design decisions.
15
5. References
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]
[14]
[15]
R. Airiau, J.-M. Berg, V. Olive, Circuit Synthesis with VHDL, Kluwer, 1994
F. Balarin, M. Chiodo, A. Jurecska, H. Hsieh, A. L. Lavagno, C. Passerone, A. Sangiovanni-Vincentelli, E. Sentovich, K. Suzuki, B. Tabbara, Hardware-Software Co-Design
of Embedded Systems: The Polis Approach, Kluwer, 1997
G. de Micheli, Hardware/Software Codesign, Kluwer, 1996
R. Ernst, J. Henkel, T. Benner, W. Ye, U. Holtmann, D. Herrmann, M. Trawny, The
COSYMA Environment for Hardware/Software Cosynthesis of Small Embedded Systems, Microprocessors and MicrosystemsVol. 20, No. 3, 1996
D.D. Gajski, N. Dutt, A. Wu, S. Lin, High-Level Synthesis: Introduction to Chip and
System Design, Kluwer, 1992
D.D. Gajski, F. Vahid, S. Narayan, J. Gong, Specification and Design of Embedded Systems, Prentice Hall, 1994
D. Harel, M. Politi, Modeling Reactive Systems with Statecharts: The Statemate
Approach, i-Logix Inc., 1996
IEEE Design & Test of Computers, special issue Hardware-Software Codesign, September 1993
IEEE Micro, special issue Hardware-Software Codesign, August 1994
S. Kumar, J.H. Aylor, B.W. Johnson, W.A. Wolf, The Codesign of Embedded Systems,
Kluwer Academic Publishers, 1996
W. Lawrenz, CAN system engineering: from theory to practical applications,
Springer-Verlag, 1997
P. Marwedel, G. Goossens (ed), Code Generation for Embedded Processors, Kluwer
Academic Publishers, 1995
A. Smailagic, D.P. Siewiorek, A Case Study in Embedded-System Design: The VuMan
2 Wearable Computer, IEEE Design & Test of Computers, Sept. 1993
M. Theiinger, P. Plger, H. Veit, u.a. Untersuchung zum Codesign einer Dieseleinspritzregelung mit CASTLE, GMD-Studien Nr. 306, Dezember 1996, in German
J. Wilberg, R. Camposano, VLIW Processor Codesign for Video Processing, Journal
Design Automation for Embedded Systems, Nr. 2, 1997]
16