ApplicationsSeptember 22, 2019

TwinCAT OPC UA connects research to innovation

East view of NEST with the Urban Mining & Recycling unit illuminated in the center and the striking Solar Fitness & Wellness unit at top right.

Flexible communication across building and mobility applications at Empa rely on the OPC UA standard to interconnect its research infrastructure. Data communication, from control traffic between devices to data analysis in the cloud, is handled by embedded PCs running TwinCAT 3 OPC UA software.

Empa (Swiss Federal Laboratories for Materials Testing and Research) conducts interdisciplinary energy research in the building and mobility sectors inside an actively used living and working environment on its campus.

Empa relies on the OPC UA communication standard to interconnect its research infrastructure: three large-scale projects named “NEST,” “ehub” and “move” plus all components involved in producing, storing, transporting and converting energy. Data communication, from control traffic between devices to data analysis in the cloud, is handled by embedded PCs running TwinCAT 3 OPC UA software.

Empa, an interdisciplinary research institute and member of the ETH Domain, composed of university and research institutions, is working to bridge the gap between the lab and real-world applications. One primary focus of its work is on energy and sustainable building technologies based on research and technology transfer platforms called demonstrators.

These include the Next Evolution in Sustainable Building Technologies (NEST), the Energy Hub (ehub) and the demonstrator for future mobility (move). Working in close collaboration with research and industry partners, Empa uses these largescale building, mobility and energy projects to deliver market-ready solutions in those sectors.

Open, clearly defined interfaces

Given that Empa’s demonstrators are available to a wide range of users, it was essential to create an open, manufacturer-independent platform with clearly defined interfaces, according to Philipp Heer, ehub Group Leader at Empa: “The units have just a single physical link to the NEST backbone that connects them with the thermal and electrical systems.

Each unit operates independently and incorporates its own automation solution, which communicates via Ethernet. The challenge here is to integrate new units into the demonstrator infrastructure with as few limitations as possible so that systems can be maintained by service technicians and used safely and to their fullest potential for research purposes as well. From an integration point of view, flexibility is essential because the system boundaries shift whenever we add a new unit.”

Enabling flexible access from outside the Empa campus was another challenge. To achieve this, the process control level was implemented in the cloud rather than on internal servers. This called for a specialized control system software architecture to ensure safe system operation yet allow actuator override where necessary for research purposes.

For Philipp Heer, Open Platform Communications Unified Architecture (OPC UA) was the ideal communication technology to meet the requirements for a highly complex and flexible system of this kind: “We use OPC UA across the board, for everything from device-to-device communication at the control level all the way up to data analysis in the cloud and research integration.

We developed an OPC UA information model specifically for this purpose. This model lets us integrate new units and components based on standardized specifications. To keep the integration effort as low as possible and ensure consistency, we incorporated parts of the software architecture into the OPC UA information model itself. This approach also allows us to implement new Internet of Things (IoT) software and services without having to adapt the system.”

Research units can be added to NEST easily using a large-scale plug-and-play principle.

Research units can be added to NEST easily using a large-scale plug-and-play principle.

Embedded PCs / TwinCAT OPC UA

Ten CX5140 Embedded PCs running TwinCAT OPC UA software (TF6100) control the communication among Empa’s three demonstrators. Philipp Heer explains: “We have seven CX5140s operating on the NEST backbone as TwinCAT OPC UA servers and clients that we use to connect heating, ventilation and room automation systems.

The other three Embedded PCs work as central management systems in NEST to hook up the micro grid and integrate the units. The system as a whole monitors some 60,000 OPC UA objects, including a number of data point instances needed for building automation or to provide researchers write access.

Around 6,000 relevant sensor signals from these objects are logged straight to a database. Despite the scale and scope of the system, there have been no performance issues so far. The TwinCAT OPC UA Gateway offers a distinct advantage here: It provides a central point of access to the entire information model, where each sensor is mapped to a corresponding structure. With this setup, all of the information contained in the database and from integrated systems such as LabVIEW can be accessed easily through a single interface.”

Another valuable feature from Heer’s perspective is that the classic building automation system, implemented using the TwinCAT Building Automation Library, can be manipulated directly over OPC UA: “We can override any individual actuator to suit the needs of specific research projects. TwinCAT OPC UA lets us create new instances elegantly and easily within the information model’s tree. Researchers are only able to see their own particular tree – in much the same way as the building automation system can only see its own tree for normal operating purposes. We can choose and apply the requisite permissions via a selector implemented in the Beckhoff control system. This is both extremely flexible and fast, which is a huge advantage.”

NEST, ehub & move demonstrators

NEST is a building with a modular, flexible structure consisting of a central core, the backbone, and three open platforms. Individual research and innovation modules can be installed on these platforms, which serve as building floors, according to a large-scale plug-and-play principle. These modules, or units, serve not just as dwellings or places of work but also as test labs operating under realistic conditions. The units are connected via thermal and electrical networks, across which they can interact with one another.

The ehub energy research platform connects the other two demonstrators – NEST and move, which are located in separate buildings. However, it can also control all energy infrastructure components individually in line with specific research requirements. Rather than treating NEST as a single entity, ehub sees the various NEST units as separate buildings. In conjunction with the NEST and move demonstrators, ehub can be used to combine energy flows in the areas of mobility, housing and work, to test new energy concepts under real-world conditions, and to explore the potential for increasing efficiency and reducing carbon emissions. Empa’s Philipp Heer explains: “The Energy Hub is a typical energy center, complete with the usual physical components like heat pumps, geothermal probes and batteries, serving a total of 15 buildings. More interesting, though, is how it works at the control level: It operates as a virtual platform for control and energy management projects.”

The demonstrator and technology transfer platform for mobility research, move, supports the development and trial of new types of vehicle drives designed to produce significantly lower carbon emissions. Excess power from photovoltaic or hydroelectric plants serves as an energy source for charging electric vehicles and producing hydrogen and synthetic methane for fuel cell and natural/biogas-powered vehicles. The connection between ehub and move allows a shift of renewable energy from the building sector to the mobility sector, where it is either used as fuel or stored in the form of hydrogen.

Empa’s OPC UA in detail

The OPC UA transport layer: the Empa demonstrator park is modular in structure. Separate controllers operating as OPC UA servers and clients control various subsystems on the NEST backbone, in the NEST units, and in the ehub and move demonstrators.

The subsystems communicate with one another and with the TwinCAT OPC UA Gateway in the cloud over OPC UA; all the OPC UA servers can access the gateway as a shared server. The latter also serves as an access node for higher-level databases, research templates and SCADA systems. Empa implemented device-to-device communication between CX5140 Embedded PCs using OPC UA client PLCopen function blocks.

OPC UA information model: The NEST information model is based on object types defined for every device and sensor group. These object types differentiate between read and write operations, and contain all key data points. There is one object type per device group; the object types can be instantiated to objects as often as required. This establishes a hierarchical structure in which the objects can be queried via OPC UA server namespace with different resolutions.

Machine-to-machine communication: The plants at Empa’s demonstrator park use a wide variety of controllers. All measured values and control outputs from the plants are processed by their respective controllers, which are connected over I/O or bus systems, then made available via the objects defined in the OPC UA namespace.

Machine-to-human communication: Each plant can operate in normal or research mode. In research mode, the control system logic is overridden. A function block was created for each actuator to make this possible. Each function block can be accessed via two OPC UA write instances for the two operating modes.

Flexibility – the core advantage

Empa began using PC-based control technology from Beckhoff in 2013 to automate a research building equipped with a large number of different interfaces. Says Philipp Heer: “One important factor besides the compact design was the variety of interfaces, which went well beyond the usual array of building technology standards like DALI, KNX or M-Bus.

The building relied on additional industrial communication protocols, which we also had to accommodate. The project called for a mix of Bus Terminals and EtherCAT Terminals, which was not a problem with Beckhoff technology. The outstanding communication performance of EtherCAT is another big advantage for us, especially in situations that require exceptionally precise measurements.”

A benefit of PC-based control is that it allows seamless integration of energy measurement technology. Empa uses around 25 EL3403 and EL3443 EtherCAT three-phase power measurement terminals to record and analyze key electrical data in its supply network. TwinCAT Scope also makes work even easier, as Philipp Heer explains: “With TwinCAT Scope’s ease-of-use and powerful analysis capabilities, we can test controllers using high-resolution data and evaluate disturbance inputs exceptionally well.”

Stefan Ziegler, Beckhoff Automation