We know that the world is currently committed to developing smart grids, and one of the intelligent aspects of smart grids is that they can realize automatic meter reading and upload relevant data to the data center, saving the time of meter readers to read meters on site. At the same time, it can also make the meter reading more accurate and more convenient for residents to use electricity. Let us introduce the automatic meter reading solutions currently used in smart meters for the benefit of readers.
Design of electric energy meter based on DLMS/COSEM protocol
Hardware composition of electric energy meter
The three-phase electronic energy meter consists of a current transformer, a voltage sampling network, and a metering integrated circuit ATT7022B to form an energy metering unit; a microcontroller (Renesas M30624 single-chip microcomputer), a data storage card, a clock chip, and an LCD to form a data processing and display unit; and a communication unit consisting of a RS485 bus, infrared (or wireless) and other communication interfaces. As shown in Figure 1.
Software Implementation of Electric Energy Meter
The electric energy meter designed in this paper adopts a modular approach to implement software functions, including metering module, display module, event recording module, time-sharing module, communication module, etc. Among them, except for the communication module, the other parts are basically the same as the general electric energy meter software. Therefore, the following focuses on the analysis of the implementation of the electric energy meter communication protocol module.
The communication structure of the electric energy meter adopts the C/S mode, with the meter end as the server and the meter reading main station as the client. The communication protocol architecture is shown in Figure 2. As a connection-oriented protocol, DLMS/COSEM stipulates the following three steps to achieve the establishment and communication of the electric energy meter system: 1. Establish the meter model and data identification. 2. Map the model to the protocol data unit APDU, and the attributes and methods of the object can be used to define access. 3. Connect with the physical layer through the data link layer, and finally communicate through the transmission channel. The following mainly analyzes the implementation method of the communication function of the electric energy meter from two aspects: establishing a meter model that conforms to COSEM and a communication protocol stack that meets DLMS.
Constructing Instrument Model Using Object-Oriented Thinking
The DLMS/COSEM protocol uses COSEM interface objects and an object-oriented approach to construct instrument data models and functional models, and completes a specific function through the coordination between various COSEM interface class objects.
The construction of the instrument model includes two important parts: O-BIS-Object Identification System in Part 61 of the protocol and interface class in Part 62.
OBIS—Object Identification System provides a standard identification code for all data in the meter, which uniquely identifies a data object. The OBIS code is encoded by a combination of 6 digital items (6 bytes AF). The meaning of each data item is: Group A values identify the type of energy being measured (including water, electricity, gas, etc.); Group B values identify the measurement channel; Group C values identify the measured physical quantity; Group D values identify the processing method of the measured physical quantity; Group E values identify the rate; Group F values identify historical data. From Group B to Group D, space is reserved for the manufacturer's customized identification code.
Interface class - IEC62056 introduces the concept of class for meter components and communication interface units. Each classification number corresponds to a class of interface objects. Each object includes attributes and methods. Based on these attributes and methods, a reference model of the object can be constructed. The manufacturer of the object interface does not need to be considered in the object model. At present, the main interface classes in the electric energy meter specified in IEC62056-62 include: register, clock, curve class, special day class, Ethernet setting class, etc.
This electric energy meter is designed according to the needs, as shown in Figure 3. The physical device is this electric energy meter. Considering that the functions of the electric energy meter can be integrated into a functional subset and in order to save resources, this electric energy meter only builds a logical device, which is identified by the logical device name LDN. The objects that make up this electric energy meter are: register objects containing active and reactive power, demand register objects containing demand data, calendar tables, timetables, special days, clocks and script objects that implement multi-rate functions, SAP and LN/SN objects for connection functions, and register monitoring objects that implement event records such as voltage loss and phase failure. The electric energy meter forms a complete electric energy meter model through the cooperation of this series of interface class objects.
The following example illustrates the program implementation of the interface object. Considering that the MCU compiler only supports C language programming, the design uses function pointers to implement classes and objects. Taking the active energy interface object as an example, in the meter model shown in Figure 3, the active energy is encapsulated in the register class, and the OBIS code is the attribute 1 in the register class: logical name.
Implementation of communication protocol stack
The communication protocol stack consists of three layers: physical layer, data link layer and application layer.
(1) The tasks of the physical layer are relatively simple, including connection management, data transmission and reception, and interface with the data link layer. It corresponds to the bottom-level driver part of the communication system.
(2) The data link layer includes the LLC sublayer that provides link transmission services and the MAC sublayer that is responsible for data transmission reliability. The link layer uses the HDLC protocol, which is a transparent data transmission protocol. In the DLMS/COSEM protocol model, the link layer is responsible for data transmission reliability, and the application layer processes user data information. The link layer program flow chart is shown in Figure 4.
(3) The DLMS/COSEM application layer is described in an abstract syntax language. This greatly improves the abstractness and universality of the protocol and facilitates program porting. The application layer specifies the use of abstract syntax notation ASN.1 to describe the application layer data frame, and the application layer APDU (application protocol data unit) uses encoding rules BER and A-XDR to implement ASN.1 syntax. As the top layer of the protocol stack, the application layer is responsible for providing services to the COSEM application process, including establishing application connection services and interface object user data information services, and using the services provided by the lower-level support protocol. The application layer program flow chart is shown in Figure 5.
Through the above processing, the message formed after the information encoding is completed can be transmitted through the channel. This electric energy meter is equipped with the 485 bus and infrared port commonly used in meter reading systems.
The electric energy meter designed by this method was tested for compliance using the special test tool CTT provided by the DLMS UA working group. The results showed that it met the requirements of the DLMS/COSEM protocol and was therefore certified by the DLMS UA working group. This is also the first three-phase electric energy meter in China to obtain this certification. The implementation of electric energy meters based on DLMS/COSEM has changed the current shortcomings of domestic metering instruments that are not interoperable, and will surely promote the further development of domestic automatic meter reading systems.
Previous article:Photovoltaic companies have released forecasts one after another, and the industry still has a long way to go to recover
Next article:Inventory of mainstream solutions for automatic meter reading of smart meters (Part 2)
- Popular Resources
- Popular amplifiers
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
- Using capacitive PGA, Naxin Micro launches high-precision multi-channel 24/16-bit Δ-Σ ADC
- Fully Differential Amplifier Provides High Voltage, Low Noise Signals for Precision Data Acquisition Signal Chain
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- I found a very good 51 single-chip microcomputer introductory tutorial book and recommend it to beginners. It is suitable for beginners to learn programming by themselves.
- [ESP32-Korvo Review] Part 3: Smart Voice Assistant ESP-Skainet
- Differences between MSP430 programmer emulator and JTAG, SBW, and BSL interfaces
- ESP32-S2 development pit (1) - open filling
- MSP430 timer controls PWM output
- 【Short-term weather forecast system】Basic functions of indoor devices are realized
- [GD32E503 Review] Part 6: FreeRTOS and RTC screen display
- [Synopsys IP Resources] Automotive cybersecurity starts with chips and IP
- ARM MCU and ARM Core
- BMS Rapid Prototyping Platform