Recent Researches in System Science
Distributed control system for robotic cells and intelligent building automation using agents CRISTIAN SPIRLEANU1, EUGEN DIACONESCU2 1 Institute of Solid Mechanics of the Romanian Academy, Bucharest 2 University of Pitesti, Pitesti ROMANIA
[email protected],
[email protected]
Abstract: - In the paper, the authors propose a control system that merges building automation with robotic cells control field, using a network infrastructure based on original multifunctional controllers and software agents. Also, a modified communication protocol is defined. Proposed control system allows to be used in many practical applications. It is a good choice when simplicity is required, modularity and a reduced time between design and implementation phases. Key-Words: - control systems, multi-agents, building automation, robotic cells, communication protocols
1 Introduction
2 Motivation for designing a merged control system
Building automation domain is interesting especially if we are analysing it from the agents perspective. Moreover, if it's merged with robotic cells domain, this will open new possibilities regarding robotic cells (RC) or building automation (BA) control applications. In industry, the term “cells” for manufacturing has at least 2 interpretations [1, 8]: first says that contains a plurality of identical equipments at least as implemented functions (for example welding devices, screwing devices, milling devices), and the second one contains all of the equipments that serve to produce a specific technological item/component. The term “intelligent building” can be described [2, 6, 7] as a way of design, constructing and management of a building with the purpose to ensure flexibility, adaptability and profitability for entire building's life. A building can be automated in order to implement intelligent functions. By using “multi-agent” approach [3, 4] already applied into the mobile robotics field [11], for different building types and for demonstrative purposes it was defined a specific problem: possibility that old people or people with disabilities to have a higher level of independence and selfhelping [12]. Both robotic cells and buildings have common points: the requirement to execute actions in realtime and the large number of the parts. The “agent” is defined as software entity which generally has the following properties: autonomy, reactivity, proactivity, and social ability [3].
ISBN: 978-1-61804-023-7
In residential or commercial spaces there are multiple independent control devices and frequently one or more systems for energy management, utilities and data acquisition which work independently one of each other. For example, electronic parts for security subsystems are common enough for residential and commercial environments and single persons or families who particularly want an automation system for building's functionalities and resources will also need supplementary functions for monitoring events and to prevent theft and burglary. At this time there are many types of automation systems for buildings designed to cover a wide range of diverse and complex requirements. These systems allows for example quality control of the air, blind control for the windows, pool water heating, filtering and treatment, control for audio and video equipments, automatic cleaning for living spaces, and many other applications [2]. A control system for building automation or robotic cells contains one or more sensor type devices and controlled actuators, one or more controllers and a communication network that makes the connection between controllers / sensors / actuators [1, 5]. Controllers can be directly programmed, and in this case there is a user interface for configuration setting, scheduling and timing the planned events or other similar functions. As alternative, controllers can be programmed remotely, in this case user interface can be implemented using a PC or with similar devices
376
Recent Researches in System Science
connected into a network. According to this description, the structure of our system is presented in figure 1. As a rule, to implement or modify a program, the user must to consult technical manuals or to request technical assistance from a support I Q
01
01
I
sensors
actuators
Q
10
Multifunctional controller agent -
I
10
MCA 1
Q
11
specialist. Implementing a changing or extension for these systems by adding new control devices or new software for supplementary functionalities, has been proved to be also a difficult task in most situations for the most systems. I
sensors
11
actuators
Q
20
QN*10-9
20
Multifunctional controller agent -
Building network power supply line - PSL
IN*10-9
sensors
actuators
IN*10
QN*10
Multifunctional controller
MCA 2
agent -
Building network communication line - CL
MCA N
Supervisor agent - SA
Fig.1 Multifunctional controllers connected to the building automation or robotic cells network There is a wide variety of standards for building automation and robotic cell devices because of using proprietary interfaces intended to protect manufacturer's segment on the commercial market. [2, 9]. Generally when using many platforms into a single system integration, this involve compatibility problems for interfaces having different specifications according to control implementation, display or operating functions, and also for the user because he needs to learn unique facilities for every platform. In other words, as much as new different subsystems/platforms are added, will be increased the requirement to learn new control interfaces. With the proposed system, figure 1, we argue for flexibility, interoperability with many existing systems or from previous generation, later extending having the purpose to implement supplementary desired functions in higher performance mode than similar systems and with lower costs.
occupants, comfort parameters (like temperature, humidity, level of light), communication “agent to sensors” type will be implemented using radio or 2wire transmission medium (1-wire® / RS485) and communication “agent to agent” will be implemented through either Ethernet or RS485.
Fig.2 Prototype of the multifunctional controller with
3 Proposed model implementation
integrated agents
Different locations and compartments having their own characteristics and functionalities are comprised into a building. For control and monitoring of locations and robotic cells inside a building, our system has the right properties for satisfying the asked requirements. Every controller from the system, figure 2, is equipped with multifunctional digital inputs (connected to 1-wire® devices or sensors / potential free configurable contacts) to monitor status of doors or windows, access control into a location, reading temperatures, occupancy level, warnings and alarms regarding
ISBN: 978-1-61804-023-7
The agents have means for processing and storing of data at the level of microprocessor or microcontroller. Configuration information can be read or write on memory card microSD type controlled via SPI communication interface, and user interface is implemented by using LCD display equipped with 4-wire resistive touch interface. The agent control system ensure the management for different processes like monitoring sensors and 1wire devices using serial communication, monitoring the status for devices with configurable
377
Recent Researches in System Science
contact/ potential free, command of the actuators for access control subsystems, lighting control with dimming, HVAC control, safety of the occupants and customized automation depending of occupant behaviour, in parallel with communication processes with other agents implemented inside the building.
economy)
9
register 06
Communication protocol Any agent can send or receive messages, and every message contains fields to describe: - message type (like writing, reading, command, information, initialization) - message identification (address of sender, address of destination, message time stamp, acknowledge type, priority of the message) - behaviour type (like comfort, safety, economy) - building location or robotic cell parameters (like temperature, humidity, light, wind, noise, acceleration, dust, position, GPS coordinates) and data field organized as separate data registers. Because of simplicity and popularity for industrial automation systems, and having in mind the idea of cooperation with existing devices or systems, we choose to implement communication starting from standard RTU Modbus protocol. In case of older or different devices that use other protocols, we will implement gateways that make the proper translation.
Field description
Modified Modbus RTU message Field
Device address
Destination address
1
Device address
Destination address (receiver)
2
Function code
Contains a code defining message type
2
Function code
Contains a code defining message type
register
Message type (like writing, reading, command, information, initialization)
3
4 3
Data
5 6 7
8
ISBN: 978-1-61804-023-7
... 10 register N-1
11
4
00
register 01
register 02
register 03
register 04
register 05
Error checking
Numerical 12 value for checking communication errors (CRC16)
register N
Error checking
Modified data block (parameter information, command information, supplementary message information) Supplementary information for other error checking mechanism Numerical value for checking communication errors
Fig.3 Classical and modified structure of the Modbus RTU message for inter-agents communication
Modbus communication [10] was designed around message concept and the format of these messages is independent of electrical interface that is used, every message having four basic elements: address for destination, code of the function, data block and error checking - with the same sequence for easier decoding of the message content. A conversation is always started by the coordinator in the network by sending a message, and depending of the message content, a slave device will take decision to answer. At the beginning sequence of a message is the address for slave device (destination address) and all other slave devices will ignore the message if doesn't recognize their own address in the message. In ASCII mode, the character “:” is used to indicate the beginning of a message and combination of characters “CR-LF” to indicate the end of a message. RTU mode use transmission delays equivalent of at least 1.5 characters transmission time, and if the receiving device will detect this delay then the receiving buffer will be erased in order to be ready for the next message. Through implementation of our synchronization sequence (verified for function codes 03, 04 and 06) RTU mode can be used without the constraint given by standard
Field description
1
Data block containing supplementary information
07
Modified Modbus message structure for agents communication
Standard Modbus message structure Modbus RTU message Field
register
Location or robotic cell parameter type (like temperature, humidity, light, wind, noise acceleration, dust, position, GPS coordinates)
Address of sender Time stamp Acknowledge type Message priority
Behaviour type (comfort, safety,
378
Recent Researches in System Science
synchronization delay. The algorithm for the new synchronization sequence is as follows, in figure 4.
Any message contains information regarding sender and destination, priority of the message, time and confirmation type requested when receiving. For messages, it is defined a hierarchical structure with predefined fields (roles, names and length), and only data block field has variable length. The communication that we are using is not yet a standardized one like, for example FIPA defined standard [http://www.fipa.org/], but our intention is to implement and use a communication language nearest to well-known standards.
if (DataRdyUSART()) // Read a received character { if (RCSTAbits.OERR ) // Overrun error. { RCSTAbits.CREN = 0; // Clear the error RCSTAbits.CREN = 1; // Enable the receiver } if (RCSTAbits.FERR ) // Framing error. { serial_in = getcUSART(); // Reading a byte to clear the error } else // Character received without a framing error { serial_in = getcUSART(); if(command_index==1) { if(serial_in==3 | serial_in==4 | serial_in==6) command_index=2; else command_index=0; } if(command_index==0 && serial_in==MCA_address) command_index=1; if (command_index>1) { buffer[command_index]= serial_in; command_index++; if(command_index==9 && CRC16(6,1)) respond_to_command(); if(command_index==10)command_index=0; } } }
5 An application example for lighting control The GS10-6 controllers [13] are used for temperature, dimming, monitoring and access control in building locations. For example, in figure 5, a MCA agent is presented for lighting control with dimming. The MCA agent can decide to switch or modify the value for triac outputs. Selection of working mode 1
0
2
AC synchronizing
ModBUS communication 0V
25
26
27
28
29
30
31
Wm
I 02
I 03
I 04
I 05
I 06
I 07
I 08
I 09
I 10
32
33
34 35
36
Tx
24
Rx
23
I 13
22
I 11
21
I 12
20
0V
+5V
19
I 01
+5V
On
ISBN: 978-1-61804-023-7
220VAC 50Hz
2
3
4
5
6
7
8
9
10
11
12
13
14
F
F
F
F
F
F
F
F
F
15
F
16
Ultrafast Fuse (external)
I 16
1
I 15
I 02 ) Function (
Q 02
I 03 ) Function (
Q 03
I 04 ) Q 04
Function (
L 4-2
I 05 ) Q 05
Function (
Q 06
I 06 ) L 6-5
Function (
Q 07
I 07 )
Q 08
Function (
Q 09
I 08 )
L 9-7
Function (
Q 10
1 2 3 4
Q 01
I 09 )
Off
L 1-2
Function (
With modified RTU Modbus protocol for agent communication, any of the connected devices can be either master or slave. The GS10-6 controllers [13] with integrated agents can cooperate with existing communicating devices, but existing master device must be reconfigured as slave or has to be disconnected from the network (because of regular polling message transmission). Modified Modbus message structure will keep (as described in figure 3) the basic structure, but devices that support new structure will have to decode supplementary fields organised as sequence that replace traditional data registers. Every agent is informed, by checking for errors and decoding the received message about the data type contained in data block. After analyzing local information delivered by connected sensors and reasoning about all the received information, the agent will autonomously decide about the type of the action that need to be taken. For example, if message type is “command”, as immediate action the agent has to: - verify the availability of local resources - analyze local context in order to check that all conditions allowing command execution are met.
Function (
I 01 )
Fig.4 Modified Modbus RTU synchronization algorithm
17
18
0V
Fig.5 Multifunctional controller application for lighting control with dimming
An AC-synchronizing device provides pulses on every zero crossing of AC-power line. By disconnecting synchronization signal, controller will automatically switch the working mode to on/off and temperature control. Activated lights will stay on and the intensity level of lights will be restored from their last value when reconnecting synchronization signal. The status of configurable contacts connected to inputs I10..I15 is updated via the building automation and control system network using Modbus communication. In figure 6, is presented the decision prepared by a local agent for MCA - triac type control outputs in an environment represented by the locations of buildings. Agent decisions are taken using information regarding
379
Recent Researches in System Science
environment and based on information achieved from a digital sensor, with status changed by an occupant for a variable period of time.
Multiagent Systems, John Willey & Sons, 2000 [4] Singh M.P, Agent Communication Languages: Rethinking the Principles, North Carolina State University, December 1998 [5] Martin Colley, Graham Clarke, Hani Hagras, Vic Callaghan, Anthony Pounds-Cornish, Intelligent Inhabited Environments: Cooperative Robotics & Buildings, 32nd International Symposium on Robotics (ISR 2001), Seoul, April 19-21, 2001 [6] E.Chrysanthi, Georgakarakou and Anastasios A. Economides, Intelligent Buildings from agents point of view, WSEAS Transactions on Computers, Issue 10, Vol. 5, October 2006 [7] E. Sierra, A. Hossian, D. Rodríguez, M. GarcíaMartínez, P. Britos and R. García-Martínez, Optimizing Building’s Environments Performance Using Intelligent Systems, IEA/AIE '08 Proceedings of the 21st international conference on Industrial, Engineering and other Applications of Applied Intelligent Systems, 2008 [8] S.C. Lauzon, J.K. Mills, and B. Benhabib, An Implementation Methodology for the Supervisory Control of Flexible Manufacturing Workcells, Journal of Manufacturing Systems Vol. 16/No. 2, 1997 [9] Karl Mathia , Zitech Engineering LLC, Robotics for Electronics Manufacturing : Principles and Applications in Cleanroom Automation, Cambridge University Press pp. 7-11, 2010 [10] Modbus application protocol specification V1.1b, Modbus IDA, December 28, 2006, http://www.Modbus-IDA.org [11] Vladareanu L, Ion I, Diaconescu E, Tont G, Velea LM, Mitro D, The Hybrid Position and Force Control of Robots with Compliance Function, Proceedings of the 10th WSEAS International Conference on Mathematical and Computational Methods in Science and Engineering, pg.384-389, 2008, WOS: 000262436800082 [12] Tont G, Vladareanu L, Munteanu RA, Tont DG, Some Aspects Regarding Human Error Assessment in Resilient Socio-Technical Systems, Proceedings of the 11th Wseas International Conference on Mathematical and Computational Methods in Science and Engineering (MACMESE '09), pg. 139 -144, 2009, WOS:
Level of 1 00 % light intensity
Q01
I01
t
Fig.6 Temporal evolution of lighting intensity level for a Q01 triac controlled output through local agent decision based on I01 digital sensor information
6 Conclusions In this article we proposed and briefly present an agent based control system for intelligent building automation or robotic cells that uses for communication our modified protocol derived from standard RTU Modbus. For this moment the implemented agentification is at a restricted level, in the next steps our intention is to improve the specific characteristics of a multiagent system. Tests were made using multifunctional controllers GS10-6 [13] type with our modified communication protocol and also using the new prototype having mixed GSM / ISM radio / RS485 / Ethernet communication. Starting from the actual hardware structure of multifunctional controllers, we defined MCAagents for each location (robotic cell or building) and we developed the system into a manner that targets flexibility, intra and inter-operability with other existing or legacy systems, and later extending with lower costs.
Acknowledgements: This work was made possible also with the financial and technical support of the GENERAL SERV IT® romanian company and SDCONWIRE research and development project co financed from EU funds contract nr. 68/17.08.2009.
References: [1] Peter Kopacek, Gernot Kronreif and Robert Probst, A modular control system for flexible robotized manufacturing cells, Robotica, vol.17, pp. 23–32, Cambridge University Press, 1999 [2] Sue Sharples, Vic Callaghan, Graham Clarke, A Multi-Agent Architecture for Intelligent Building Sensing and Control, International Sensor Review Journal, May 1999 [3] Michael Wooldridge, An introduction to
ISBN: 978-1-61804-023-7
000276629000020 [13] GS10-6 multifunctional controller, Technical manual rev02-GB, General Serv IT, 2011
380