1 System Architecture
1.1 System requirements and overall design
The system has various types of electric energy meters, such as single-phase, three-phase, mechanical and electronic. It is required to collect the power consumption data of each decentralized electric energy meter in real time, accurately, quickly and reliably, adapt to various complex industrial production site conditions, operate continuously, be easy to operate and quick to maintain. The hardware system should be versatile and scalable, and be able to adapt to the power management of various large and medium-sized power generation and power consumption enterprises. Therefore, in the system design, the following factors are mainly considered: real-time, high reliability, environmental adaptability, versatility, scalability, economy, etc.
Distributed Control System (DCS) is a decentralized control and centralized information management system. Since the system is used in power plants and has a DCS platform, DCS is used as the master station, and a separate host computer can also be used for management. The DCS adopts a redundant system design method with dual front-end hot backup, and the two front-ends can be replaced with each other to improve system reliability.
This DCS uses Interllution iFox industrial control configuration software and uses the industrial standard bus RS422 to connect the meter reading system hardware to the front-end machine for power analysis and load management. It also has the functions of printing and outputting graphics, curves, and reports, and can interface with other networks. Since the number of acquisition modules is generally no less than dozens, if it is directly connected to the DCS, there will be too many measurement points. Therefore, a primary data concentrator (referred to as concentrator) is added between the DCS and the acquisition module, and a concentrator is used as a measurement point to reduce the burden of the DCS and significantly reduce costs, thereby improving the system's performance-price ratio.
The industrial standard bus RS485 is used for two-way communication between the concentrator and the acquisition module. The concentrator continuously inspects the acquisition module to statistically store various power consumption data, while ensuring normal communication with the DCS. This requires the concentrator to have the ability to communicate with two serial ports at the same time. The concentrator uses a CPU with dual serial ports (DS80C320) to achieve dual serial port simultaneous communication. The RS422, RS232, and infrared communications in this system all use the universal industrial standard ModBus protocol.
1.2 System composition and functions
The meter reading system is composed of a power collection module, a data concentrator, a dedicated handheld computer and a DCS, which are flexibly configured via RS422 and RS485 buses. The composition diagram of the meter reading system is shown in Figure 1. The collection module detects the number of revolutions of the mechanical meter dial or the number of pulses output by the electronic meter, converts it into the meter power consumption, and uploads the power consumption data via the RS485 bus. The power consumption data saved in the collector is consistent with the value displayed in the power consumption window on the original meter. After installing the collector, the overall structure and measurement accuracy of the original meter will not be changed.
The acquisition module has an independent CPU, non-volatile power-off storage and working status indicator. The initial parameters can be set on site. Automatic fault protection. It is suitable for various types of existing mechanical and electronic energy meters.
The concentrator is responsible for the centralized collection, processing and storage of the electricity consumption data of each meter. It communicates with the acquisition module through the RS485 bus and reads the electricity consumption data stored in each acquisition module. Each concentrator can manage up to 256 meters. It can communicate with the DCS in two directions via the RS422 bus. The various concentrators receiving the DCS have independent CPUs and non-volatile power-off retention memories, which can store current and historical electricity consumption data. There is a real-time clock inside, which continues to keep time after power failure. It automatically diagnoses faults and reports abnormal conditions to the DCS. It can directly interface with other systems (SCADA, MIS).
DCS communicates with the concentrator via RS422 bus and reads the current and historical power consumption data of each meter stored in the concentrator. The power consumption data is recorded, stored, analyzed and processed by DCS, providing statistical analysis and management of power consumption status for relevant departments. Each DCS can manage 64 concentrators. DCS has the functions of system operation parameter setting, time calibration, event record management, and curve graphic report printing and output. It reads and displays the power consumption data of each meter in real time and analyzes the power consumption data. It can interface with other networks to transmit data to other systems (SCADA, MIS) for analysis and processing. A dedicated handheld computer is also called a handheld terminal. When the handheld computer is installed with the corresponding software, it uses the infrared port to initialize the acquisition module on site, and uses the infrared port/RS232 port to initialize the concentrator on site, read data, status information, etc. It is an important tool for system maintenance. Laptops also have the same function.
2. Design and implementation of the centralized meter reading system software
The data collection system software includes DCS software, concentrator software, acquisition module software and dedicated handheld computer software. The concentrator and acquisition module software are written in assembly language, and the dedicated handheld computer software is implemented in a dedicated handheld computer programming language. The following mainly introduces the implementation of simultaneous communication between the DCS data collection system software and the dual serial port CPU in the concentrator.
2.1 DCS centralized reading software
The DCS centralized reading system software uses Interllution iFox industrial control configuration software, which is completed under the Windows 95 (above) and Windows NT system software platforms. It uses the popular dynamic graphic objects and key operation main window of the power plant. The Excel-like tables are widely used for data entry and display. The beautiful and simple dialog boxes and graphic curve human-machine interface design make the user operation quick and convenient. The DCS centralized reading software mainly includes the following functions:
(1) Select to browse some or all of the automatic meter reading data and real-time patrol data.
(2) The real-time monitoring and selective reading function can select to read the current power consumption of one or several specified meters, and can select to continuously monitor the real-time data of some or all meters.
(3) The automatic meter reading function can specify the automatic meter reading time interval, automatically reading the hourly data, all meter data at selectable time intervals, and electricity data at several specified meter reading times each day.
(4) Printing of various report curves and graphics and complete operating instructions.
(5) The system configuration is flexible and convenient. Concentrators and acquisition modules can be added or deleted online at will, and various operating parameters and meter user information can be modified.
(6) Automatic fault diagnosis, event recording and information recall functions.
(7) Multi-level password management to prevent unauthorized personnel from operating.
(8) Convenient and diverse query functions.
(9) Carry out load analysis and compile various curve charts.
2.2 Implementation of simultaneous communication between dual serial ports CPU in concentrator
Since the concentrator needs to realize simultaneous communication with the host computer and the acquisition module, a CPU with dual serial ports is used. The CPU has 2 serial ports and 2 serial port interrupts. Serial port 1 interrupts the communication with the host computer, and serial port 2 interrupts the communication with the acquisition module. Serial port 1 interrupt is set as a high priority interrupt. Every time a byte is received or sent, it enters the interrupt processing, and exits the interrupt immediately after processing. The communication baud rate is 9600 b/s, with a start bit and a stop bit. First, the time conflict problem must be solved. The time for the hardware to receive or send a byte is about 1 ms, while the time for the software to receive or send a byte is only a few μs, which provides conditions for the simultaneous communication of the dual serial ports.
Simultaneous communication actually divides the CPU time into very small time slices. Assuming that the longest time for a faster serial port to send or receive a byte is TRbyteMax, the CPU maximum time slice should generally be less than TRbyteMax/2. Of course, in the gap after receiving or sending a frame of data, the CPU time slice can be appropriately extended to perform some necessary data processing.
Secondly, the data conflict problem must be solved. The two serial ports use their own receiving and sending data buffers and control variables to reduce the amount of interrupt protection data and prevent data conflicts. When the main program, serial port 2 interrupt handler and other interrupt handlers write data to the memory (the memory used for communication with the host computer), the serial port 1 interrupt must be closed in the shortest possible time. The interrupt closing time should be less than a few hundred μs to prevent serial port 1 from reading this data before other program data is written.
At the same time, some other issues need to be paid attention to: modular, structured, and object-oriented programming should be used as much as possible to make the serial communication program independent of other programs and between two serial communication programs to reduce the chance of errors. In addition, in serial communication, a communication timeout processing mechanism should be added, and attention should be paid to the protection of data and program status during interrupt processing, the error handling program should be improved, and power monitoring power-off protection hardware and watchdog technology should be used. The high-reliability cyclic redundancy check (CRC) technology is used in the serial communication data frame, which greatly reduces the data bit error rate. No bit errors were found in a large amount of data that has been running continuously for several months.
3 Conclusion
The system design adopts modular, structured, object-oriented programming methods, hardware redundancy design and automatic fault diagnosis of software and hardware, making the system highly reliable and real-time. The system uses a large number of reports and dynamic graphic curves, and has a friendly human-computer interaction interface. The dedicated handheld computer can be initialized on site, with simple operation and quick maintenance. At the same time, it has the characteristics of convenient online setting, flexible and diverse hardware configuration, wide application range, good versatility, and high performance-price ratio. It has been running continuously and reliably in the power plant, with a high success rate of reading and receiving, and the reading and receiving data is error-free. It can be widely used in large and medium-sized enterprises and power plants, providing a reliable data source for modern power generation and power management. This system can be further improved. For different types of applications, corresponding statistical analysis modules and control units can be added to the DCS to achieve the purpose of automatic control.
references
[1]MoDICon modbus protocol reference guide.PI- MBUS - 300 Rev. J. MODICON ,Inc. ,Industrial Automation SystEMS . June 1996.
[2] He Limin. Single Chip Microcomputer Application System[M]. Beijing: Beijing University of Aeronautics and Astronautics Press, 1992.
[3]High - speed microcontrollers . DataBook of Dallas SEMIconductor Corp.1999.
Previous article:Reset wake-up speed of MCU in power-down state in power-saving design
Next article:Introduction to software technology and methods to improve the reliability of single-chip microcomputer application systems
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- 【FAQ】How to quickly understand LP50xx devices?
- 【GD32L233C-START Review】6. Make a simple host computer for HID devices
- MicroPython Hands-on (18) - Sound and light sensor on the control board
- Share a MSP430 emulator firmware downgrade software
- 485 communication control problem of LPC824.
- TI CCS & controlSUITE Troubleshooting Log
- What is differential gain and differential phase?
- Microstrip Circuits (Tsinghua University)
- Introduction and analysis of namespace logical isolation
- MSP430F5438A clock system