A successful completion of energy turnaround in Germany and Europe will require the development of smart grids, which are able to correlate power generation by many small providers with power consumption in millions of households and industry just in time and at a fine spatial resolution. One building block of such a smart grid is an immediate measurement of demand of electricity at all points of consumption and its communication to grid control. This concept is known as 'smart metering'.
Smart metering in general describes a technology which equips consumption metering devices for electricity, natural gas, water, etc. with communication means in order to present easily available consumption data to the customer, as well as giving a remote meter reading mechanism to the provider. Such smart metering devices are already in use for bulk buyers since quite a while, however they are also installed more and more in private households, driven by legal regulations.
In this area redlogix had been charged with large parts of software development work for a metering data concentrator. The device is based on the Open Metering Specification (OMS-S). It receives radio telegrams with metering data from multiple meters, stores them intermediary and forwards distilled data to a backoffice.
- GSM, GPRS, PPP
- UML, OOD
- wireless M-Bus
Development services by redlogix
Based on system requirements from our customer and always in close cooperation, redlogix took over the design and development of various essential software components of the device. This included the realization of freely configurable storage mechanisms and upload strategies of the concentrated data, which had been considered to be particular challenges.
On more detail our contributions to the system development process included:
- requirements analysis
- adaptation of the Board Support Package to the chosen hardware platform
- tuning of the operating system and important system components
- design and implementation of an OS abstraction layer
- design and implementation of the networking functionality
- design and implementation of core components for data recording
- design and implementation of components for data processing and upload
- definition and execution of unit, integration and system tests
Smart Metering Transceiver
The heterogeneous metering data of various kinds of consumption meters need to be collected and stored temporarily. This raw data is received by radio modems (wireless M-BUS) and immediately saved in a persistent storage media for further processing. After steps of raw data processing and reduction, the data results are transmitted to a remote data center in freely configurable intervals and depending on the available communication channel. At this stage the data gets compressed and encrypted.
The device provides functions for remote configuration via service interface. This allows modification of all relevant parameters of data recording, sampling frequency, data upload schedule and data formats. Of course, the service interface is highly secured.
Software download functionality had been designed and developed by redlogix, providing the means to update the device’s firmware out in the field. During this, an uninterrupted and smoothly continued operation is ensured at all times, even if the download process gets interrupted or aborted by any disturbances.
Object Oriented Development
The device software was developed with objected-oriented methods. The OO design was specified in UML (Unified Modelling Language) with the modelling tool Enterprise Architect. From the model the design documentation can be generated, as well as the class framework of the source code. Further, a later resynchronization of the elaborated code back into the model is supported. This way of 'roundtrip engineering' is a standard procedure at redlogix.
The source code was entirely implemented in C++. We look back at a rich record of experiences on the utilization of C++ in deeply embedded systems with very limited resources, which enable us to avoid the much-feared overhead in memory consumption and CPU load. With our product redBlocks and training courses for embedded C++ we are happy to share this expertise with our customers.
By means of the unit test framework CxxTest a suite of automated unit tests was developed and executed. Further, in several iterations the software was integrated on the target hardware and integration tests were executed there. Parts of the system tests have also be automated. The approach of intensive tests on various levels is at the core of our development process model.
The software application on the target hardware runs on top of the emBOS embedded operating system. By inserting an OS abstraction layer in between the operating system and the application it proofed to be simple to create automated integration tests of application components under Cygwin or Linux, respectively, instead of the target OS. To some extent this is equivalent to porting these application modules to the test platform. The striking advantage of this approach is that OS calls from the application can be replaced by stubs, which implement a test behavior. This enables the simulation of failures, loads and other unusual system aspects, which would be difficult or even impossible to generate on a real target.
The OS abstraction layer also allows to exchange the target OS in a future development iteration with no big effort to adapt the application software.
Beyond the target firmware, redlogix developed several tools for the host side under Microsoft Windows in C#. These tools are mainly used for simulation, configuration, data evaluation and automated system tests.