EMControl logo
ENFASYS Board ENFASYS EMC2 Board_RPi_DSP II PCB Connector Card RPi
Connector Card RPi Control BOT II

The EMCsControl is the heart of the ENFASYS control system. It is an open-hardware platform that can be integrated into different form factors, having applications in the control of power electronics converters, energy conversion systems, energy storage and distributed resources integration, measurement and control in distribution networks, etc…

The EMCsControl is based on two different digital systems, each of one having a different role at the control system. The most internal control system relies on one of the more popular and powerful real-time controller, Texas Instruments TMS320F28335 (TI F28335). This controller handles the peripherals regarding input/output (PWM, A/D, GPIO, Encoder signals) as well as field communication buses (CAN, SPI, SCI). It also offers the hardest real-time specifications in the control card, in which the internal control layers for power conversion applications are implemented (control of electrical variables such as current and control and speed/position in high-performance drives).

The most relevant specifications for the TMS320F28335 subsystem are listed in Table 1.

TMS320F28335 subsystem
Processor TMS320F28335
RAM memory Up to 1 MB
FLASH memory 512 KB
GPIO 14 GPIOs
PWM 12 (16 bit), 6 (32 bit)
A/D 16 (12 bit)
Quadrature Encoder 1 Encoder
Input Capture 2 ECAPs
CAN 2 (isolated)
UART 1
ISO-SPI 2 (isolated)

Regarding the external control system, an industrial Compute Module 3+ (CM3) from Raspberry Pi is used. The selection of this system gives access to the Linux software ecosystem, giving the control platform a high flexibility. Regarding the operating system, it has to be remarked that the hardware runs almost on a bare-metal system by using the Boot2Qt image and hard real-time kernel extensions provided by Xenomai. For the high-speed communications between the CM3 and the TI F28335, a SPI bus is used, with a throughput of 20 Mb/s. The role of the CM3 in the EMCsControl is the execution of the external control loops, with sample times typically in the range of 1 ms; the external communications that requires access to the TCP/IP stack; user interface and data storage. Over the TCP/IP stack, communication protocols at different levels are available:

  • For the integration with other distributed resources as well as energy meters, Modbus/TCP is used.
  • For the remote system access, DBUS and a proprietary protocol are used.
  • For the integration with external cloud services, MQTT is also implemented out-of-the-box.
  • For the integration with the grid operator and other upper-level control systems, IEEE 1547 over Modbus/TCP is proposed.

 

The most relevant specifications for the CM3 are listed in Table 2.

CM3 subsystem
Processor BCM2837B0
RAM memory Up to 1 GB
FLASH memory Up to 32 GB
WiFi CYW43455
Bluetooth CYW43455
Ethernet 1 port
DSI display interface Raspberrypi-Display
USB 2 USB HOST
Real-time clock DS3231

Regarding the software, the EMCsControl is provided with several frameworks and applications that allows the rapid development and deployment of projects. The software is structured as shown in Figure 1.

The software architecture can be shortly described as:

  • Internal control system.The internal control loops are implemented through the brOCCOLI library, which abstracts the access to the hardware and the implementation of digital control systems on the digital controllers of Texas Instruments C2000. The framework is built upon the Texas Instruments C2000Ware libraries.
  • External control system.The external control system runs in the CM3. This control system obtains its real time characteristics through the Xenomai framework. This software layer communicates with the internal control system through a real-time protocol over SPI bus. In turn, it communicates with the monitoring and data exploitation system using the CANOpen protocol.
  • Communication system.The communications protocol between the different layers at the application level is implemented using CANOpen. For this, the CANFestival library is used.
  • Monitoring system, visualization, data storage and user interface.The most external layer of the developed software implements the user interface, the elements for data visualization, data storage and information sent to servers or remote users. This system is implemented in the Qt framework.

 

Software Architecture

Figure 1. Software Architecture