Remote terminal unit based on Loongson platform
By adopting Loongson 2K300 chip and modular design remote terminal unit, the problem of RTU equipment relying on foreign technology is solved, and a low-cost, high-safe, independent and controllable RTU system is realized, which is suitable for a variety of industrial automation application scenarios.
Patent Information
- Application Number
- CN202510546098.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-01
AI Technical Summary
Existing remote terminal unit (RTU) devices rely on foreign technology, are costly and have risks of information security and autonomous controllability.
It adopts a remote terminal unit based on Loongson 2K300 chip, including control module, input module, output module and communication module. It combines Linux operating system and modular design, supports a variety of communication protocols, adopts domestic hardware and software, reduces costs and improves information security and autonomous controllability.
Significantly reduce costs, improve information security and autonomous control capabilities, strong adaptability and flexibility, and meet the high reliability requirements of the industrial environment.
Smart Images

Figure CN120406258A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial automation control, and specifically to a remote terminal unit based on the Loongson platform. Background Art
[0002] The remote terminal unit (RTU) is an important part of the industrial automation system and is widely used in fields such as energy, transportation, and environmental protection. It is mainly used for remotely collecting, monitoring, and controlling on-site devices to achieve data transmission and device status monitoring. Traditional RTU devices usually rely on foreign technologies and use foreign processors and operating systems. For example, they use processors with the ARM architecture combined with the Linux or Windows operating systems. Although such devices perform well in terms of stability and maturity, they have a high cost and significant risks in terms of information security and self-control. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a remote terminal unit based on the Loongson platform. This remote terminal unit is based on the 2K300 chip, has a low cost, and can significantly improve information security and self-control capabilities.
[0004] To solve the above problems, the following technical solutions are provided:
[0005] The remote terminal unit based on the Loongson platform of the present invention is characterized by including:
[0006] A control module, which contains a Loongson 2K300 chip;
[0007] An input module, which is adaptively connected to the control module and is used for collecting or receiving signals from external devices and forming input signals to be transmitted to the control module;
[0008] An output module, which is adaptively connected to the control module and is used for sending control signals generated by the control module to external devices;
[0009] A communication module, which is adaptively connected to the control module and is used for realizing communication between the controller and the SCADA system.
[0010] Among them, the input module contains a digital input module and a 4-20mA analog input module. The digital input module is used for collecting digital signals generated by external devices, and the 4-20mA analog input module is used for receiving 4-20mA signals from external devices.
[0011] The output module includes a digital output module and a 4-20mA analog output module; the digital output module is used for sending digital control signals generated by the control module to external devices, and the 4-20mA analog output module is used for sending 4-20mA control signals generated by the control module to external devices.
[0012] The digital input module includes an isolation optocoupler U22. A capacitor C75 is connected in series between the positive and negative electrodes of the light-emitting diode of the isolation optocoupler U22. The positive electrode of the light-emitting diode of the isolation optocoupler U22 is connected to one end of a resistor U110, and the other end of the resistor U110 is used to connect to an external device for collecting digital signals generated by the external device. The negative electrode of the light-emitting diode of the isolation optocoupler U22 is connected to the positive electrode of a diode LED12, and the negative electrode of the diode LED12 is grounded. The collector terminal of the photosensitive triode of the isolation optocoupler U22 is respectively connected to one end of a resistor R79 and the control module. The other end of the resistor R79 is connected to the 3V3 power supply, and the emitter terminal of the photosensitive triode of the isolation optocoupler U22 is grounded. When the digital signal generated by the external device is at a high level, the photosensitive triode conducts, and the control module receives the digital signal generated by the external signal.
[0013] The 4-20mA analog input module contains an operational amplifier U76. The non-inverting input terminal of the operational amplifier U76 is respectively connected to one end of a resistor R225, one end of a resistor R226, and one end of a capacitor C147. The other end of the resistor R225 is connected to an external device for collecting the 4-20mA signal generated by the external device. The other ends of the resistor R226 and the capacitor C147 are grounded. The inverting input terminal of the operational amplifier U76 is connected to the output terminal of the operational amplifier U76 to form negative feedback. The output terminal of the operational amplifier U76 is connected to the control module for transmitting the 4-20mA signal generated by the external device to the control template.
[0014] The digital output module includes an isolation optocoupler U145. The positive electrode of the diode of the isolation optocoupler U145 is connected to one end of a resistor R378, and the other end of the resistor R378 is connected to the control module for receiving the digital control signal generated by the control module. The negative electrode of the diode of the isolation optocoupler U145 is connected to the positive electrode of a diode LED65, and the negative electrode of the diode LED65 is grounded. The collector of the triode of the isolation optocoupler U145 is connected to one end of a resistor R379, and the other end of the resistor R379 is connected to the power supply VCC. The power supply VCC is respectively connected to one coil terminal of a relay RLY27 and the negative electrode of a diode D87. The other coil terminal of the relay RLY27 and the positive electrode of the diode D87 are connected to the collector of a triode Q46. One switch terminal of the relay RLY27 is connected to the common terminal, and the other switch is connected to an external device. The emitter of the triode of the isolation optocoupler U145 is respectively connected to one end of a resistor R380 and the base of the triode Q46. The other end of the resistor R380 and the emitter of the triode Q46 are both grounded.
[0015] The 4 - 20mA analog output module contains a PAC chip U95. One end of the PWM pin of the PAC chip U95 is connected to one end of a resistor R234. The other end of the resistor R234 is respectively connected to one end of a resistor R301 and the control module. The PWM signal of the control module forms a 4 - 20mA control signal through the resistor R234 and the PAC chip U95, and is output to an external device through the IOUT pin and IOUT2 pin of the PAC chip U95 via an output circuit; the other end of the resistor R301 is grounded.
[0016] The output circuit includes a triode U117 and an operational amplifier U83. The IOUT pin of the PAC chip U95 is respectively connected to one end of a resistor R279, one end of a capacitor C17, and the base of the triode U117. The other end of the resistor R279 and the other end of the capacitor C17 are grounded. The emitter of the triode U117 is respectively connected to one end of a resistor R280 and one end of a resistor R329. The other end of the resistor R280 is respectively connected to the non - inverting input terminal of the operational amplifier U83 and one end of a resistor R281, and the other end of the resistor R281 is grounded. The other end of the resistor R329 is respectively connected to one end of a resistor R282, the negative pole of a diode D67, one end of a capacitor C19, and one end of a resistor R251. The positive pole of the diode D67 and the other end of the capacitor C19 are both grounded, and the other end of the resistor R251 is used to be connected to an external device. The other end of the resistor R282 is respectively connected to the inverting input terminal of the operational amplifier U83 and one end of a resistor R249, and the other end of the resistor R249 is connected to the output terminal of the operational amplifier U83 and the IOUT2 pin of the PAC chip U95; a capacitor C18 is connected in parallel across both ends of the resistor R249.
[0017] The remote terminal unit adopts the Linux operating system, and its software architecture includes a common framework layer, an application service layer, an interface encapsulation layer, a driver layer, and a protocol distribution layer;
[0018] The common framework layer is responsible for managing the communication response and instruction processing mechanism, and serves as the core scheduling module of the system;
[0019] The application service layer responds to the instructions of the common framework layer;
[0020] The application service layer and the common framework layer perform two - way data interaction through the protocol distribution layer;
[0021] The interface encapsulation layer provides API interfaces for the common framework layer, the protocol distribution layer, and the application service layer respectively;
[0022] The interface encapsulation layer receives the data transmitted by the common framework layer, the protocol distribution layer, and the application service layer;
[0023] The public framework layer, protocol distribution layer, and application service layer receive the data from the remote terminal unit transmitted by the interface encapsulation layer;
[0024] The driver layer provides underlying driver support for the public framework layer.
[0025] Adopting the above solution has the following advantages:
[0026] Since the remote terminal unit based on the Loongson platform of the present invention includes a control module, an input module, an output module, and a communication module, the input module is adaptively connected to the control module for collecting or receiving signals from external devices and forming input signals to be transmitted to the control module, the output module is adaptively connected to the control module for sending the control signals generated by the control module to external devices, the communication module is adaptively connected to the control module for realizing the communication between the controller and the SCADA system, and the control module contains a Loongson 2K300 chip. This remote terminal unit uses the Loongson 2K300 chip to build the hardware, with lower costs and can significantly improve information security and the ability of independent control. Description of the Drawings
[0027] Figure 1 is the structural topology diagram of the remote terminal unit based on the Loongson platform of the present invention;
[0028] Figure 2 is the circuit schematic diagram of the digital input module in the remote terminal unit based on the Loongson platform of the present invention;
[0029] Figure 3 is the circuit schematic diagram of the 4-20mA analog input module in the remote terminal unit based on the Loongson platform of the present invention;
[0030] Figure 4 is the circuit schematic diagram of the digital output module in the remote terminal unit based on the Loongson platform of the present invention;
[0031] Figure 5 is the circuit schematic diagram of the 4-20mA analog output module in the remote terminal unit based on the Loongson platform of the present invention;
[0032] Figure 6 is the circuit schematic diagram of the Loongson 2K300 chip in the remote terminal unit based on the Loongson platform of the present invention;
[0033] Figure 7 is the schematic diagram of the 485 circuit and Zigbee circuit in the remote terminal unit based on the Loongson platform of the present invention;
[0034] Figure 8 is the schematic diagram of the LORA circuit and 4G circuit in the remote terminal unit based on the Loongson platform of the present invention;
[0035] Figure 9 This is a schematic diagram of the CAN interface circuit in the remote terminal unit based on the Loongson platform of the present invention. Detailed implementation manners
[0036] The present invention will be further described in detail below with reference to the accompanying drawings.
[0037] As Figure 1 shown, the remote terminal unit based on the Loongson platform of the present invention includes a control module, an input module, an output module, and a communication module. The control module contains a Loongson 2K300 chip. The input module is adaptively connected to the control module and is used to collect or receive signals from external devices and form input signals to be transmitted to the control module. The output module is adaptively connected to the control module and is used to send control signals generated by the control module to external devices. The communication module is adaptively connected to the control module and is used to realize the communication between the controller and the SCADA system (SCADA system).
[0038] In this embodiment, as Figure 1 shown, the input module includes a digital input module and a 4 - 20mA analog input module. The digital input module is used to collect digital signals generated by external devices, and the 4 - 20mA analog input module is used to receive 4 - 20mA signals from external devices.
[0039] Specifically, the digital input module is used to collect status signals of external devices, such as switches, sensors, etc. These digital input signals control the on - off of the optocoupler switch triode, and connect the high and low levels to the GPIO pins of the Loongson 2K300 through the traces on the circuit board. The Loongson 2K300 reads these input signals for status judgment or control logic processing. The 4 - 20mA analog input module is used to receive 4 - 20mA signals from external sensors. After these signals pass through a signal conditioning circuit (such as a current - voltage conversion circuit and a voltage follower circuit), they are input to the ADC (analog - to - digital converter) of the Loongson 2K300 for sampling.
[0040] In this embodiment, as Figure 1 shown, the output module includes a digital output module and a 4 - 20mA analog output module; the digital output module is used to send digital control signals generated by the control module to external devices, and the 4 - 20mA analog output module is used to send 4 - 20mA control signals generated by the control module to external devices.
[0041] Specifically, the digital output module is responsible for controlling external devices such as liquid level switches and electric ball valves. These output signals send control signals through the GPIO pins of Loongson 2K300 to control the on / off of the optocoupler switch triode, thereby controlling the triode switch circuit, and further controlling the on / off of the relay, and finally controlling the start / stop or status change of the external device. The 4-20mA analog output module is used to control external devices such as valves and frequency converters. The 4-20mA signal output is generated by the PWM pin of Loongson 2K300 to generate a PWM wave signal to control the PAC chip and the external current output circuit to generate a 4-20mA current output to the external device.
[0042] As Figure 2 shown, the digital input module includes an isolation optocoupler U22. A capacitor C75 is connected in series between the positive and negative terminals of the light-emitting diode of the isolation optocoupler U22. The positive terminal of the light-emitting diode of the isolation optocoupler U22 is connected to one end of a resistor U110, and the other end of the resistor U110 is used to connect to an external device for collecting digital signals generated by the external device. The negative terminal of the light-emitting diode of the isolation optocoupler U22 is connected to the positive terminal of a diode LED12, and the negative terminal of the diode LED12 is grounded; the collector terminal of the photosensitive triode of the isolation optocoupler U22 is respectively connected to one end of a resistor R79 and a control module, the other end of the resistor R79 is connected to the 3V3 power supply, and the emitter terminal of the photosensitive triode of the isolation optocoupler U22 is grounded; when the digital signal generated by the external device is at a high level, the photosensitive triode conducts, and the control module receives a low-level signal, which is the digital signal generated by the external signal. In this embodiment, when the digital input signal I0.0 is at a high level, it passes through the current-limiting resistor U110 and the filter capacitor C75, and the photosensitive triode is made to conduct through the isolation optocoupler U22, and the digital input pin GPIO000 of the chip U1 enters a low level, as shown in Figures 2 and Figure 6 shown.
[0043] As Figure 3 shown, the 4-20mA analog input module contains an operational amplifier U76. The non-inverting input terminal of the operational amplifier U76 is respectively connected to one end of a resistor R225, one end of a resistor R226, and one end of a capacitor C147. The other end of the resistor R225 is connected to an external device for collecting the 4-20mA signal generated by the external device. The other end of the resistor R226 and the other end of the capacitor C147 are grounded; the inverting input terminal of the operational amplifier U76 is connected to the output terminal of the operational amplifier U76 to form negative feedback; the output terminal of the operational amplifier U76 is connected to the control module for transmitting the 4-20mA signal generated by the external device to the control template. The 4-20mA signal is converted into a voltage signal through a current detection resistor, and then input through a filter circuit and the operational amplifier U76 (voltage follower circuit) to the ADC channel of the chip U1, as shown in Figures Figure 3 and Figure 6 shown.
[0044] As Figure 4 shown, the digital output module includes an isolation optocoupler U145. The positive terminal of the diode of the isolation optocoupler U145 is connected to one end of a resistor R378, and the other end of the resistor R378 is connected to the control module for receiving the digital control signal generated by the control module. The negative terminal of the diode of the isolation optocoupler U145 is connected to the positive terminal of a diode LED65, and the negative terminal of the diode LED65 is grounded. The collector of the triode of the isolation optocoupler U145 is connected to one end of a resistor R379, and the other end of the resistor R379 is connected to the power supply VCC. The power supply VCC is respectively connected to one coil terminal of a relay RLY27 and the negative terminal of a diode D87. The other coil terminal of the relay RLY27 and the positive terminal of the diode D87 are connected to the collector of a triode Q46. One switch terminal of the relay RLY27 is connected to the common terminal, and the other switch is connected to an external device. The emitter of the triode of the isolation optocoupler U145 is respectively connected to one end of a resistor R380 and the base of the triode Q46, and the emitter of the triode Q46 is grounded. The GPIO078 pin of the chip U1 is connected to the digital output terminal through an isolation optocoupler and a relay, that is, to control the on / off of the photosensitive triode of the isolation optocoupler, and further control the on / off of the relay to generate a digital output signal, as Figure 4 and Figure 6 .
[0045] As Figure 5 shown, the 4-20mA analog output module contains a PAC chip U95. The PWM pin of the PAC chip U95 is connected to one end of a resistor R234, and the other end of the resistor R234 is respectively connected to one end of a resistor R301 and the control module. The PWM signal of the control module forms a 4-20mA control signal through the resistor R234 and the PAC chip U95, and is output to an external device through the IOUT pin and the IOUT2 pin of the PAC chip U95 and through an output circuit. The other end of the resistor R301 is grounded. The PWM channel of the chip U1 passes through the PAC chip, generates a 4-20mA signal through a current drive circuit, and is transmitted to an external device through an output interface, as Figure 5 and Figure 6 shown.
[0046] As Figure 5As shown in the figure, the output circuit includes a triode U117 and an operational amplifier U83; the IOUT pin of the PAC chip U95 is respectively connected to one end of a resistor R279, one end of a capacitor C17, and the base of the triode U117. The other end of the resistor R279 and the other end of the capacitor C17 are grounded; the emitter of the triode U117 is respectively connected to one end of a resistor R280 and one end of a resistor R329. The other end of the resistor R280 is respectively connected to the non-inverting input terminal of the operational amplifier U83 and one end of a resistor R281, and the other end of the resistor R281 is grounded; the other end of the resistor R329 is respectively connected to one end of a resistor R282, the negative electrode of a diode D67, one end of a capacitor C19, and one end of a resistor R251. The positive electrode of the diode D67 and the other end of the capacitor C19 are both grounded, and the other end of the resistor R251 is used to connect to an external device; the other end of the resistor R282 is respectively connected to the inverting input terminal of the operational amplifier U83 and one end of a resistor R249, and the other end of the resistor R249 is connected to the output terminal of the operational amplifier U83 and the IOUT2 pin of the PAC chip U95; a capacitor C18 is connected in parallel across both ends of the resistor R249.
[0047] As Figure 6 shown in the figure, in this embodiment, the Loongson 2K300 chip uses a chip U1 with the model LS2K0300_CORE. The specific wiring methods of the chip U1 with the digital input module, 4 - 20mA analog input module, digital output module, and 4 - 20mA analog output module are as Figures 1-6 shown in the figure. The Loongson 2K300 serves as the core processing unit, connecting various input and output devices, communication modules, and connecting to all peripheral components through its GPIO, UART, CAN, ADC, PAC, etc. interfaces.
[0048] As Figures 7-9 shown in the figure, in this embodiment, the communication module includes a 485 circuit, a Zigbee circuit, a LORA circuit, a 4G circuit, and a CAN interface circuit. The connection methods of the 485 circuit, Zigbee circuit, LORA circuit, 4G circuit, and CAN interface circuit to the Loongson 2K300 chip are as Figures 6-9 shown in the figure.
[0049] In the actual circuit layout, the Loongson 2K300 chip is located in the center of the circuit board. The digital input module is located at the top and upper left side of the circuit board, close to the GPIO pins of the Loongson 2K300 chip. The digital output module is located at the lower left and lower right sides of the circuit board and is connected to the Loongson 2K300 chip through short traces. The 4-20mA analog input module is located at the lower part of the circuit board, close to the power module and the Loongson 2K300 chip. The communication module is located at the upper right side of the circuit board and is connected to the Loongson 2K300 chip through a long line. The CAN interface circuit is located at the upper side of the circuit board, close to the communication pin area of the Loongson 2K300 chip. The 4-20mA analog output module is located at the top of the circuit board, close to the analog signal area of the main control chip.
[0050] In this embodiment, the remote terminal unit uses the Linux operating system, and its software architecture includes a common framework layer, an application service layer, an interface encapsulation layer, a driver layer, and a protocol distribution layer. The common framework layer is responsible for managing communication responses and instruction processing mechanisms and serves as the core scheduling module of the system. The application service layer responds to the instructions of the common framework layer. The application service layer and the common framework layer perform two-way data interaction through the protocol distribution layer. The interface encapsulation layer provides API interfaces for the common framework layer, the protocol distribution layer, and the application service layer respectively. The interface encapsulation layer receives the data transmitted by the common framework layer, the protocol distribution layer, and the application service layer. The common framework layer, the protocol distribution layer, and the application service layer receive the data from the remote terminal unit transmitted by the interface encapsulation layer. The driver layer provides underlying driver support for the common framework layer.
[0051] Specifically, the driver layer supports two-way communication, is compatible with multiple communication protocols such as LoRa, Zigbee, 4G, CAN, and Modbus, allows the common framework layer to access underlying hardware resources through a unified interface to achieve precise control of the device, and supports data acquisition, device control, and remote communication.
[0052] The common framework layer includes a device management module and a configuration management module. The device management module is responsible for the unified management of devices, sets control API interfaces for the application service layer to call. The configuration management module is based on JSON components, supports reading JSON format configuration files for device management and device initialization, and saves configuration data to support the dynamic configuration of the system.
[0053] The configuration management module of the common framework layer uses JSON open-source components. The JSON open-source components read the local JSON format configuration file and complete the initialization of the device and the setting of relevant parameters according to the content of the configuration file.
[0054] The protocol distribution layer is responsible for data distribution between the common framework layer and the application business layer, and realizes data transfer between modules through one-to-one message distribution and one-to-many event distribution mechanisms; combined with the temporary storage and batch synchronization functions of the data cache and synchronization module, it effectively manages the data stream in high-frequency interaction scenarios and reduces the system load.
[0055] The application business layer includes an application logic module, a network management service module, and a device control module; the application logic module executes different business functions according to the configuration, including receiving data, device status monitoring, and exception alarm; the network management service module is responsible for the communication with external systems, other RTU nodes, and the central control platform; the device control module accesses the underlying hardware resources through the interface encapsulation layer to achieve precise control of the device and regularly feedback the device status to the application logic module.
[0056] The common framework layer also includes log management; the log management can realize the functions of hierarchical printing, file storage, and backup of logs, ensuring the recording of key events, errors, and status information for subsequent maintenance and analysis.
[0057] The traditional Linux kernel scheduling algorithm realizes fair scheduling of processes, which is not friendly to the scheduling of tasks with multiple dependencies in the petroleum industry. Therefore, the remote terminal unit in this embodiment introduces a list scheduling algorithm in kernel scheduling, aiming to improve the execution efficiency of tasks with multiple dependencies. First, add a priority calculation function to the scheduler and update the task priority at each scheduling; secondly, store the task priority and the waiting tasks through a dual data structure; finally, allocate task execution and dynamically adjust the task priority to improve the execution efficiency of the total tasks.
[0058] The remote terminal unit based on the Loongson platform of the present invention adopts domestic hardware and software, reduces the dependence on foreign technologies, and reduces the risk of potential security vulnerabilities. Users can perform in-depth customization and optimization according to specific application requirements, quickly respond to market changes, and improve the adaptability and flexibility of the system. Using domestic components reduces the initial procurement and maintenance costs, especially in large-scale deployments, significantly enhancing the economic benefits. The computing power and system optimization of the Loongson 2K300 processor can maintain good response speed and stability during high-concurrency data acquisition and processing, meeting the requirements of real-time monitoring. By using domestic technologies, the dependence on the international market is reduced, the autonomy and stability of the supply chain are enhanced, thereby reducing the uncertainties in production and maintenance. The RTU device adopts a modular design, supporting the rapid replacement and upgrade of different sensors and communication modules. At the same time, the present invention effectively solves the main defects in the prior art by adopting the Loongson 2K300 processor and domestic operating systems, bringing significant social, economic, and technical effects. These effects not only enhance the security, autonomy, and performance of the RTU device, but also reduce costs and supply chain risks, providing users with a more reliable intelligent control solution.
[0059] In addition, through modular design and multi-protocol compatibility, the present invention realizes efficient communication and precise control of the RTU system in a multi-platform environment. The driver layer supports multiple communication protocols such as LoRa, Zigbee, 4G, CAN, and Modbus, ensuring the flexibility and scalability of the system in different application scenarios; the common framework layer provides dynamic configuration capabilities and unified control interfaces through module management and JSON configuration management, facilitating the flexible deployment of the system; the protocol distribution layer combines data caching and synchronization mechanisms to achieve the stability and efficiency of data transmission in high-frequency data interaction scenarios; the application business layer ensures the intelligence of data analysis, device monitoring, and exception handling through application logic modules, network management services, and device control modules, and realizes the high maintainability of the system through log management. The present invention is applicable to a variety of industrial automation application scenarios, effectively enhancing the communication ability, stability, and adaptability of the RTU system. Compared with the prior art, the advantages of the present invention are as follows:
[0060] Multi-protocol compatibility: The driver layer supports multiple communication protocols, including LoRa, Zigbee, 4G, CAN, and Modbus, etc., ensuring that the system can flexibly deploy data acquisition, device control, and remote communication in different application scenarios, enhancing the adaptability and scalability of the system;
[0061] Modular and Low-Coupling Design: The system adopts a modular design. Data interaction between modules is carried out through a unified interface and protocol distribution mechanism, ensuring low coupling and high scalability, enabling the system to be flexibly ported across different hardware platforms and operating systems; supports operating systems such as LoongOS / Linux;
[0062] Debuggability and Log Management: The system integrates a log management function based on the spdlog log library, realizing hierarchical printing, storage, and backup of logs, and providing perfect debugging means, facilitating developers to diagnose problems and maintain the system, improving the efficiency of fault location;
[0063] Dynamic Configuration and Device Management Support: The configuration management module in the common framework layer is based on JSON components, which can read JSON format configuration files for device management and initialization, support the dynamic configuration of the system, and enhance the flexibility and management efficiency of the system;
[0064] Rich Basic Service Interfaces: The system provides a variety of basic services and interfaces, including Socket sockets, security detection, and network communication interfaces, ensuring the stable operation of the system and meeting diverse application requirements.
[0065] The remote terminal unit (RTU) based on the Loongson platform of the present invention includes the following steps:
[0066] System Initialization
[0067] When the RTU is powered on, the power management module first stabilizes the power output, and the main processor starts to execute the initialization program. This process includes loading the operating system, initializing the communication module, input / output module, etc.
[0068] Communication Protocol Processing
[0069] The main processor parses and responds to external data according to the preset communication protocol. Protocol parsing adopts a multi-threaded parallel processing method to ensure data real-time performance.
[0070] Data Acquisition and Control
[0071] Collect data from external sensors through the input / output interface module, and control the execution of external devices through the output interface according to the preset logical rules.
[0072] Remote Monitoring
[0073] The RTU sends the collected data to the remote monitoring center SCADA system through the communication module, and the monitoring center can send control instructions, which are transmitted to the execution device through the RTU.
[0074] Effect Experiment
[0075] Purpose of the experiment: To verify the stability and protocol compatibility of the RTU in a complex industrial environment.
[0076] Procedure of the experiment:
[0077] Environment setup: In the laboratory environment, a typical oil industrial control system is built, including RTU, sensors, actuators and a remote monitoring center. The Loongson 2K300 chip is used as the core processor of the RTU, and the Modbus and RS485 protocol stacks are loaded respectively.
[0078] Data acquisition and processing: The RTU collects data from multiple sensors and transmits the data to the remote monitoring center through the MQTT protocol. At the same time, control instructions are sent to control the status of the actuators.
[0079] Stability test: During 24 hours of continuous operation, monitor the communication status, power status of the RTU and the response of the execution device.
[0080] Results of the experiment:
[0081] The RTU can stably collect and process sensor data, the communication delay remains in the millisecond level, and there is no data packet loss phenomenon.
[0082] Through the MQTT protocol, the RTU can communicate with the remote monitoring center efficiently, and the response time of the control instruction is less than 50ms.
[0083] During 24 hours of continuous operation, the device temperature remains normal and there is no obvious power consumption fluctuation.
[0084] Data analysis: The experimental data shows that the RTU of the present invention performs excellently in terms of processing speed, communication real-time performance and stability, meeting the high reliability requirements of the industrial environment.
Claims
1. A remote terminal unit based on the Loongson platform, characterized in that, Including: A control module, which contains a Loongson 2K300 chip; An input module, adaptively connected to the control module, for collecting or receiving signals from external devices and forming input signals to be transmitted to the control module; An output module, adaptively connected to the control module, for sending control signals generated by the control module to external devices; A communication module, adaptively connected to the control module, for realizing communication between the controller and the SCADA system.
2. The remote terminal unit based on the Loongson platform according to claim 1, characterized in that, The input module includes a digital input module and a 4-20mA analog input module. The digital input module is used to collect digital signals generated by external devices, and the 4-20mA analog input module is used to receive 4-20mA signals from external devices.
3. The remote terminal unit based on the Loongson platform according to claim 1, characterized in that The output module includes a digital output module and a 4-20mA analog output module; the digital output module is used to send digital control signals generated by the control module to external devices, and the 4-20mA analog output module is used to send 4-20mA control signals generated by the control module to external devices.
4. The remote terminal unit based on the Loongson platform according to claim 2, characterized in that, The digital input module includes an isolation optocoupler U22. A capacitor C75 is connected in series between the positive terminal and the negative terminal of the light-emitting diode of the isolation optocoupler U22. The positive terminal of the light-emitting diode of the isolation optocoupler U22 is connected to one end of a resistor U110, and the other end of the resistor U110 is used to connect to an external device for collecting digital signals generated by the external device. The negative terminal of the light-emitting diode of the isolation optocoupler U22 is connected to the positive electrode of a diode LED12, and the negative electrode of the diode LED12 is grounded; the collector terminal of the phototransistor of the isolation optocoupler U22 is respectively connected to one end of a resistor R79 and the control module, the other end of the resistor R79 is connected to the 3V3 power supply, and the emitter terminal of the phototransistor of the isolation optocoupler U22 is grounded; when the digital signal generated by the external device is at a high level, the phototransistor conducts, and the control module receives the digital signal generated by the external signal.
5. The remote terminal unit based on the Loongson platform according to claim 2, characterized in that The 4-20mA analog input module contains an operational amplifier U76. The non-inverting input terminal of the operational amplifier U76 is respectively connected to one end of a resistor R225, one end of a resistor R226, and one end of a capacitor C147. The other end of the resistor R225 is connected to an external device for collecting 4-20mA signals generated by the external device. The other ends of the resistor R226 and the capacitor C147 are grounded; the inverting input terminal of the operational amplifier U76 is connected to the output terminal of the operational amplifier U76 to form negative feedback; the output terminal of the operational amplifier U76 is connected to the control module for transmitting the 4-20mA signal generated by the external device to the control template.
6. The remote terminal unit based on the Loongson platform according to claim 3, characterized in that The digital output module includes an isolation optocoupler U145. The positive terminal of the diode of the isolation optocoupler U145 is connected to one end of a resistor R378, and the other end of the resistor R378 is connected to the control module for receiving the digital control signal generated by the control module. The negative terminal of the diode of the isolation optocoupler U145 is connected to the positive electrode of a diode LED65, and the negative electrode of the diode LED65 is grounded. The collector of the triode of the isolation optocoupler U145 is connected to one end of a resistor R379, and the other end of the resistor R379 is connected to the power supply VCC. The power supply VCC is respectively connected to one coil terminal of a relay RLY27 and the negative electrode of a diode D87. The other coil terminal of the relay RLY27 and the positive electrode of the diode D87 are connected to the collector of a triode Q46. One switch terminal of the relay RLY27 is connected to the common terminal, and the other switch is connected to an external device. The emitter of the triode of the isolation optocoupler U145 is respectively connected to one end of a resistor R380 and the base of the triode Q46. The other end of the resistor R380 and the emitter of the triode Q46 are both grounded.
7. The remote terminal unit based on the Loongson platform according to claim 3, wherein The 4-20mA analog output module contains a PAC chip U95. The PWM pin of the PAC chip U95 is connected to one end of a resistor R234, and the other end of the resistor R234 is respectively connected to one end of a resistor R301 and the control module. The PWM signal of the control module forms a 4-20mA control signal through the resistor R234 and the PAC chip U95, and is output to an external device through the IOUT pin and the IOUT2 pin of the PAC chip U95 via an output circuit. The other end of the resistor R301 is grounded.
8. The remote terminal unit based on the Loongson platform according to claim 7, wherein The output circuit includes a triode U117 and an operational amplifier U83. The IOUT pin of the PAC chip U95 is respectively connected to one end of a resistor R279, one end of a capacitor C17, and the base of the triode U117. The other end of the resistor R279 and the other end of the capacitor C17 are grounded. The emitter of the triode U117 is respectively connected to one end of a resistor R280 and one end of a resistor R329. The other end of the resistor R280 is respectively connected to the non-inverting input terminal of the operational amplifier U83 and one end of a resistor R281, and the other end of the resistor R281 is grounded. The other end of the resistor R329 is respectively connected to one end of a resistor R282, the negative electrode of a diode D67, one end of a capacitor C19, and one end of a resistor R251. The positive electrode of the diode D67 and the other end of the capacitor C19 are both grounded, and the other end of the resistor R251 is used to connect to an external device. The other end of the resistor R282 is respectively connected to the inverting input terminal of the operational amplifier U83 and one end of a resistor R249, and the other end of the resistor R249 is connected to the output terminal of the operational amplifier U83 and the IOUT2 pin of the PAC chip U95. A capacitor C18 is connected in parallel across both ends of the resistor R249.
9. The remote terminal unit based on the Loongson platform according to claim 1, characterized in that, The remote terminal unit adopts the Linux operating system, and its software architecture includes a common framework layer, an application service layer, an interface encapsulation layer, a driver layer, and a protocol distribution layer. The public framework layer is responsible for managing the communication response and instruction processing mechanism and serves as the core scheduling module of the system; The application business layer responds to the instructions of the public framework layer; The application business layer and the public framework layer perform two-way data interaction through the protocol distribution layer; The interface encapsulation layer provides API interfaces for the public framework layer, the protocol distribution layer, and the application business layer respectively; The interface encapsulation layer receives the data transmitted by the public framework layer, the protocol distribution layer, and the application business layer; The public framework layer, the protocol distribution layer, and the application business layer receive the data from the remote terminal unit transmitted by the interface encapsulation layer; The driver layer provides underlying driver support for the public framework layer.
Citation Information
Patent Citations
Communication control frame based on Loongson platform
CN106815086A
PLC module based on Loongson 2K1000 main processing chip
CN111273600A
Remote measurement and control terminal for oil field on basis of dragon core chip processor
CN201725216U
Loongson-based remote measurement and control terminal for oil field
CN211908999U
Universal remote-terminal controller
CN2475234Y