Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Services Based Data Acquisition from a Process Database Introduction Advanced control techniques have been recently applied to building control in.

Similar presentations


Presentation on theme: "Web Services Based Data Acquisition from a Process Database Introduction Advanced control techniques have been recently applied to building control in."— Presentation transcript:

1 Web Services Based Data Acquisition from a Process Database Introduction Advanced control techniques have been recently applied to building control in several pilot applications. Design and deployment of these advanced control techniques however require interface between numerical tools and building management system. In this contribution, the complete software design of a web services Matlab client for a process database is described. The main contribution lies, however, in the proposed alternative approach how to use web services within Matlab as the standard Matlab functionality is not capable to handle given problem. The proposed strategy is based on Axis2 package, which provides a functionality to generate Java stubs based on the description of the web service (WSDL). Java stubs are then compiled using arbitrary Java compiler into a form of jar package, which is dynamically added into Matlab Java path. Couple Matlab objects were proposed to make web services calls more convenient. Moreover, communication interface, properties of the process database as well as the proposed Matlab object scheme is detailed below. RcWare Building Control and Management System Building managements systems (BMS) do store enormous amount of data. To illustrate this let us consider a modern office building where 2000 values are measured and stored each 3 minutes. That gives 9.6x10 5 values per day and 3.5x10 8 values per year. On the other hand, user of BMS requires access to any data in database in a reasonable time. This raises serious demands database functionality. RcWare DB (http://rcware.eu) was designed with respect to BMS specifics. It enables to store billions of values and it provides quick access to the data without any special hardware requirements. Clients do connect to RcWare DB by standard web services interface (SOAP 1.1). Thanks to use of a standard technology, implementation of a new client is simple and can be done within a few minutes in modern programing languages. Client application does not have to manipulate raw data, which are pre-processed on the server Usage of Web Services from within Matlab Therefore, an alternative approach has to be considered. Matlab provides excellent functionality to call Java methods directly from the program code, Java based solution is the easiest way to tackle such an issue. Alternative java code generators: wsdl2java from Axis2 package or CXF package Generated stubs are compiled with arbitrary Java compiler into a form of Jar package, which is dynamically added into Matlab Java path. Matlab users can call web services methods then. Small performance decrease compared to native client due to i) plenty of additional java objects, ii) slower matlab's non-static java methods calls iii) interpolation of the retrived data Native client can communicate via gzip compressed SOAP messages Matlab Client.NET Client Download set size text/xml application/x -gzip text/xml application/x- gzip Relative slow- down N = sN/A12.71s7.03s34% N = sN/A80.13s45.73s34% Figure 1: List of RcWare API methods; besides of data retrieval, database variables and metadata can be obtained Figure 2: Workflow on how to use Axis2 code in Matlab Table 1: Comparison of download time for native and matlab client License of the Toolbox The resulting toolbox is a result of a joined cooperation of Energocentrum PLUS, s.r.o., Czech Technical University (CTU) in Prague and Eidgenossische Technische Hochschule (ETH) Zurich during Optipremier project. Energocentrum PLUS, s.r.o, maintains the program. The program is licensed under the terms of GNU Lesser General Public License v3. Full text of the license is included in the program release. The source codes can be downloaded from the Subversion repository located on: https://svn.rcware.eu:25443/svn/rad/SWTools/MatlabRcWareInterfacehttps://svn.rcware.eu:25443/svn/rad/SWTools/MatlabRcWareInterface MatlabRcWare Client New Matlab object-oriented framework (represented by classdef keyword) used. Figure 3: Object scheme of the toolbox; abstract classes DbVariable and Database on the top-most level. Moreover, the former one inherits from Matlab built-in class Handle, because it provides possibility to reference an instance of the object. The only common method for various databases is method for data obtaining. Every variable has this method too. Matlab codes wrap the generated java stubs Conclusions An alternative approach for using web services from within Matlab environment. In special cases, WSDL4J is unable to handle given WSDL description The toolbox is used in i) predictive control of a building of CTU in Prague ii) or optimal control of modern office buildings in Germany and Netherlands iii) various industrial and research projects. J. Cigler 1, J. Široký 2,3, M. Kulvejt 3, M. Chlupáč 3, D. Gyalistras 4 1: Department of Control Engineering, Faculty of Electrical Engineering, CTU in Prague, Czech Republic: 2 : Department of Cybernetics, Faculty of Applied Sciences, University of West Bohemia in Pilsen, Czech Republic: 3 : Energocentrum Plus, s.r.o., Prague, Czech Republic: {jan.siroky, marek.kulvejt, 4: Automatic Control Laboratory, ETH Zurich, Switzerland: createclassfromwsdl: preparation of all API calls createSoapMessage, callSoapService: low level programming way, requires knowledge of SOAP communication RcWare API provides WSDL description of the methods it has. API is implemented in.NET framework based on Windows Communication Foundation (WCF) Typically, WSDL file is automatically generated based on the API program code. Resulting description files comply with W3C standards required for SOAP communication, but they are not, however, interpreted correctly by the default Matlab WSDL parser i.e. WSDL4J.


Download ppt "Web Services Based Data Acquisition from a Process Database Introduction Advanced control techniques have been recently applied to building control in."

Similar presentations


Ads by Google