New energy gateway based on real-time and non-real-time architecture

By designing a hierarchical architecture based on real-time and non-real-time architectures in the new energy gateway, the problem that traditional new energy gateways cannot take into account both real-time and non-real-time power tasks is solved, and efficient and stable power task processing is achieved.

CN119583255APending Publication Date: 2025-03-07NATIONAL INSTITUTE OF GUANGDONG ADVANCED ENERGY STORAGE CO LTD +1

Patent Information

Application Number
CN202411798739.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

Due to architectural reasons, traditional new energy gateways can only take into account real-time power tasks or non-real-time power tasks, and cannot take into account both types of tasks at the same time.

Method used

Design a new energy gateway based on real-time and non-real-time architecture. Through the hierarchical architecture of the hardware layer, the bottom soft driver layer and the operating system layer, the real-time operating system and the non-real-time operating system share hardware resources, and allocate hardware resources through the bottom soft driver layer to achieve parallel processing of real-time and non-real-time tasks.

Benefits of technology

The new energy gateway can run both real-time operating systems and non-real-time operating systems at the same time, taking into account complex power tasks and real-time control tasks, improving the processing efficiency of power tasks and the stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583255A_ABST
    Figure CN119583255A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power processing, and provides a new energy gateway based on real-time and non-real-time architectures, so that the new energy gateway can consider a power task with a non-real-time property and a power task with a real-time property. The new energy gateway comprises a hardware layer, a bottom soft drive layer and an operating system layer, the operating system layer is located on the bottom soft driving layer, and the bottom soft driving layer is located on the hardware layer; the hardware layer comprises hardware resources, the bottom soft drive layer comprises a hardware resource allocation file, and the operating system layer comprises a real-time operating system and a non-real-time operating system; the hardware resource allocation file is used for determining a first type of hardware resources allocated to the real-time operating system and a second type of hardware resources allocated to the non-real-time operating system in the hardware resources; if the bottom soft drive layer receives the power task of the real-time operating system, the bottom soft drive layer calls the first type of hardware resources to process the power task, and if the bottom soft drive layer receives the power task of the non-real-time operating system, the bottom soft drive layer calls the second type of hardware resources to process the power task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of power processing technology, and in particular to a new energy gateway and a new energy station based on a real-time and non-real-time architecture. Background Art

[0002] The substation is the power supply area of ​​the transformer in the power system. Through the new energy gateway, the power equipment in the substation can interact with the main station.

[0003] The new energy gateway used in the substation generally involves two types of power tasks. One type is the power task that consumes a lot of running memory, has complex calculations, and requires multi-process collaborative processing (this type of power task is a non-real-time power task). The other type is the power task that has strict time requirements, short response cycle, and control decision-making nature (this type of power task is a real-time power task).

[0004] Due to architectural reasons, traditional new energy gateways can only run one of the non-real-time operating systems (non-real-time operating systems are also called general-purpose systems) and real-time operating systems, resulting in traditional new energy gateways being able to take into account only one of the power tasks. Summary of the invention

[0005] Based on this, it is necessary to provide a new energy gateway and new energy station based on real-time and non-real-time architecture to address the above technical problems.

[0006] The present application provides a new energy gateway based on real-time and non-real-time architecture, the new energy gateway comprising: a hardware layer, a bottom soft driver layer and an operating system layer; the operating system layer is located above the bottom soft driver layer, and the bottom soft driver layer is located above the hardware layer;

[0007] The hardware layer includes hardware resources, the bottom soft driver layer includes a hardware resource allocation file, and the operating system layer includes a real-time operating system and a non-real-time operating system; the hardware resource allocation file is used to determine the first type of hardware resources allocated to the real-time operating system among the hardware resources, and to determine the second type of hardware resources allocated to the non-real-time operating system among the hardware resources;

[0008] When the bottom soft driver layer receives the power task of the real-time operating system, the bottom soft driver layer calls the first type of hardware resources to process the power task;

[0009] When the bottom soft driver layer receives the power task of the non-real-time operating system, the bottom soft driver layer calls the second-type hardware resources to process the power task.

[0010] In one embodiment, the bottom soft driver layer includes a virtual interface layer, a middleware layer and a hardware driver layer;

[0011] After receiving the power task, the virtual interface layer determines the operating system to which the power task belongs;

[0012] The middleware layer determines the hardware resources allocated to the operating system to which the power task belongs according to the hardware resource allocation file and the operating system to which the power task belongs determined by the virtual interface layer, and generates a corresponding call instruction;

[0013] The hardware driver layer calls corresponding hardware resources to process the power task according to the calling instruction.

[0014] In one embodiment, after receiving the power task, the virtual interface layer determines the operating system to which the power task belongs, including:

[0015] After receiving the power task, the virtual interface layer determines the operating system that calls the current layer, and determines the operating system that calls the current layer as the operating system to which the power task belongs.

[0016] In one embodiment, the first type of hardware resource receives the first type of data sent by the first type of peripheral device; the first type of peripheral device is a peripheral device associated with the real-time operating system;

[0017] The first type of hardware resources transmits the first type of data to the real-time operating system through the bottom soft driver layer;

[0018] The real-time operating system generates a power task according to the first type of data.

[0019] In one embodiment, when the real-time operating system generates a power task according to the first type of data, the process specifically includes:

[0020] After receiving the first type of data, the real-time operating system assigns a label and a timestamp for characterizing the peripheral device to the first type of data, and stores the label in the shared memory;

[0021] The non-real-time operating system reads the first type of data from the shared memory according to the label and the timestamp, and performs operations on the first type of data to obtain operation results;

[0022] The non-real-time operating system stores the operation result in the shared memory;

[0023] The real-time operating system reads the operation result from the shared memory, and generates the power task for decision-making control according to the operation result.

[0024] In one embodiment, the first type of hardware resources transmits the first type of data to the real-time operating system through the bottom soft driver layer, specifically including:

[0025] The first type of hardware resources transmits the first type of data to the application layer of the real-time operating system through the bottom soft driver layer, the library layer of the real-time operating system, the board support package layer of the real-time operating system and the device layer of the real-time operating system.

[0026] In one embodiment, the real-time operating system includes a device layer; the peripheral devices whose device information is configured in the device layer are peripheral devices associated with the real-time operating system.

[0027] In one embodiment, the second type of hardware resources receives the second type of data sent by the second type of peripheral devices; the second type of peripheral devices are peripheral devices associated with the non-real-time operating system;

[0028] The second type of hardware resources transmits the second type of data to the non-real-time operating system through the bottom soft driver layer;

[0029] The non-real-time operating system generates a power task according to the second type of data.

[0030] In one embodiment, the second type of hardware resources transmits the second type of data to the non-real-time operating system through the bottom soft driver layer, specifically including:

[0031] The second type of hardware resources transmits the second type of data to the application layer of the non-real-time operating system through the bottom soft driver layer, the kernel layer of the non-real-time operating system, the communication driver interface layer of the non-real-time operating system and the data fusion layer of the non-real-time operating system.

[0032] In one embodiment, when the number of power tasks of the real-time operating system is multiple, the real-time operating system sets a processing time threshold for each power task;

[0033] When processing the power task, the first type of hardware resources specifically includes:

[0034] The first-type hardware resource processes one of the power tasks, and when the processing time reaches a corresponding processing time threshold, stops processing one of the power tasks and processes the next power task.

[0035] In one embodiment, the real-time operating system sets a processing priority for each power task;

[0036] The next power task is determined from among a plurality of power tasks according to the processing priority.

[0037] The present application provides a new energy station area, which includes distributed new energy equipment, a master station and a new energy gateway as described in the above embodiment;

[0038] The new energy gateway is used to receive instructions from the master station and generate control information;

[0039] The new energy gateway is used to send the control information to the distributed new energy equipment.

[0040] The new energy gateway provided by the present application includes: a hardware layer, a bottom soft driver layer and an operating system layer; the operating system layer is located above the bottom soft driver layer, and the bottom soft driver layer is located above the hardware layer; the hardware layer includes hardware resources, the bottom soft driver layer includes a hardware resource allocation file, and the operating system layer includes a real-time operating system and a non-real-time operating system; the hardware resource allocation file is used to determine the first type of hardware resources allocated to the real-time operating system in the hardware resources, and to determine the second type of hardware resources allocated to the non-real-time operating system in the hardware resources; when the bottom soft driver layer receives the power task of the real-time operating system, the bottom soft driver layer calls the first type of hardware resources to process the power task; when the bottom soft driver layer receives the power task of the non-real-time operating system, the bottom soft driver layer calls the second type of hardware resources to process the power task. The scheme provided by the present application, the new energy gateway can run the real-time operating system and the non-real-time operating system at the same time, taking into account the power tasks of non-real-time nature and the power tasks of real-time nature; and, the bottom soft driver layer is set between the hardware layer and the operating system layer of the new energy gateway, and the hardware resources of the hardware layer are allocated by the bottom soft driver layer, and the real-time operating system and the non-real-time operating system can focus on their own power tasks, thereby improving the processing efficiency of power tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 A schematic diagram of the architecture of a new energy gateway in one embodiment;

[0043] Figure 2 A schematic diagram of hardware resources included in a hardware layer in one embodiment;

[0044] Figure 3 A schematic diagram of the architecture of the bottom soft drive layer in one embodiment;

[0045] Figure 4 is a schematic diagram of the architecture of a real-time operating system in one embodiment;

[0046] Figure 5 is a schematic diagram of the architecture of a non-real-time operating system in one embodiment;

[0047] Figure 6 FIG. 4 is a schematic diagram of the architecture of a new energy gateway in another embodiment. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0049] The present application provides a new energy gateway based on real-time and non-real-time architecture, which can be used in new energy stations. New energy stations include distributed new energy power generation facilities (such as photovoltaic, wind power, etc.) and energy storage systems. Compared with traditional power stations, new energy stations allow users to access new energy equipment on their own. They have the characteristics of a large number of devices, diverse equipment manufacturers, and complex data interactions. New energy stations can obtain energy from wind, light and other fields, so there are a large number of devices connected in the new energy station. The new energy gateway provided in this application can provide better multi-threaded processing performance and expansion capabilities. The new energy gateway can interact with a large number of distributed new energy devices and receive control commands from the master station.

[0050] Reference Figure 1 The new energy gateway includes: a hardware layer, a bottom soft driver layer and an operating system layer; the operating system layer is located above the bottom soft driver layer, and the bottom soft driver layer is located above the hardware layer. The hardware layer includes hardware resources, the bottom soft driver layer includes hardware resource allocation files, and the operating system layer includes real-time operating systems and non-real-time operating systems; the hardware resource allocation file is used to determine the first type of hardware resources allocated to the real-time operating system in the hardware resources, and to determine the second type of hardware resources allocated to the non-real-time operating system in the hardware resources.

[0051] Reference Figure 2 The hardware resources of the hardware layer may include operating cores, storage units, and communication peripherals. There are multiple operating cores, and the specific number can be set according to actual needs; the number of storage units and communication peripherals can be set according to actual needs.

[0052] Running core: The running core can be the processor core or central processing unit (CPU) in the new energy gateway embedded system, which is responsible for executing instructions and control logic. The running core of the new energy gateway embedded system can be a single-core or multi-core structure. In the embodiment of the present application, the running core is multi-core. The running core completes operations such as data processing, task scheduling and interrupt management by working in collaboration with other hardware resources to ensure stable and efficient operation of the system.

[0053] Storage unit: The storage unit refers to the data storage component in the new energy gateway embedded system, which is used to store information such as program code, variables and system status. The storage unit in the new energy gateway embedded system mainly includes read-only memory (ROM) and random access memory (RAM). ROM is used to store solidified program code to ensure that the new energy gateway embedded system has an initial program to run when it starts; RAM is used to store temporary data and dynamic data at runtime to ensure fast reading and writing of data during program execution.

[0054] Communication peripherals: Communication peripherals are hardware interface modules that implement external device or network communication in new energy gateway embedded systems. Common communication peripherals include serial ports, CAN (Controller Area Network) interfaces, SPI (Serial Peripheral Interface) interfaces, IIC (Inter-Integrated Circuit) interfaces, and Ethernet interfaces. They exchange data with sensors, actuators, or other embedded devices through different protocol standards to meet the data transmission requirements of new energy gateway embedded systems. The selection and implementation of communication peripherals directly affects the communication efficiency and compatibility of new energy gateway embedded systems.

[0055] The hardware layer interacts with the software system through the collaborative work of hardware resources such as the operating core, storage unit and communication peripherals, providing strong support for the functions of the new energy gateway embedded system. The operating core adopts a multi-core architecture, responsible for task scheduling and interrupt response to ensure efficient operation of the system; the storage unit implements program storage and data management through ROM and RAM to accelerate task execution; the communication peripherals establish efficient connections with external devices through a variety of interfaces, and cooperate with software drivers to complete data transmission and protocol analysis. The operating core, storage unit and communication peripherals work together to build the foundation of computing, storage and communication, ensuring the real-time and stability of the system.

[0056] The operating system layer includes M real-time operating systems and N non-real-time operating systems; wherein M and N are positive integers greater than or equal to 1.

[0057] In scenarios with a large number of devices, complex communication protocols, multi-threaded processing of multiple tasks, and a large amount of storage overhead, a non-real-time operating system can be used. The kernel scheduling of the non-real-time operating system is non-preemptive and has abundant memory resources, which can ensure the functional integrity of all processes. In scenarios with high requirements for real-time acquisition, simple topology, and relatively lightweight, a real-time operating system can be used. The real-time operating system adopts a preemptive preemptive scheduling scheme to ensure real-time response and timely processing of tasks.

[0058] Specifically, real-time operating system (RTOS): The real-time operating system is used to handle power tasks that require strict time constraints in new energy gateways; the real-time operating system's priority scheduling and preemptive scheduling mechanisms are used to achieve timely execution of high-priority tasks, and a streamlined kernel design is used to retain only necessary modules, combined with interrupt management, semaphores, mutex locks, and task communication modules to reduce delays, improve resource management efficiency, and achieve data exchange between tasks, thereby enhancing the real-time and stability of the real-time operating system; to meet real-time requirements, RTOS is bound to specific hardware resources (such as timers, timers, and interrupt controllers), and prioritizes the allocation of key hardware resources to ensure its high response speed and reliability; due to the simplicity of the kernel and real-time requirements, the functional extensibility of RTOS is limited, and it does not support complex graphical interfaces or file system functions.

[0059] Non-real-time operating system (GPOS, General Purpose Operating System): In addition to the real-time operating system, the new energy gateway also has a non-real-time operating system, which is used to process tasks that do not require strict time constraints, and provides a multi-task, multi-user operating environment to support functional requirements such as data processing, file management, and network communication. It can also load third-party library files in a container manner to improve its scalability; the kernel of the non-real-time operating system adopts a complex design and is equipped with functional modules such as file system, network protocol stack, and memory management. Although the non-real-time operating system occupies more storage and processing resources, the resource allocation strategy written in the hardware resource allocation file allocates the necessary resources of the non-real-time operating system to the non-real-time system to avoid interference with real-time tasks, thereby ensuring the stability and functional diversity of the new energy gateway.

[0060] The new energy gateway provided by this application is equipped with a real-time operating system and a non-real-time operating system, which respectively undertake different tasks to adapt to the diverse needs of the new energy gateway for real-time and compatibility and scalability, and realize the efficient, stable and reliable operation of the new energy gateway. Through the reasonable allocation of hardware resources and the support of abstract interfaces, the real-time operating system and the non-real-time operating system perform their respective duties while cooperating with each other, thereby ensuring that the new energy gateway can strike a balance between high real-time and complex functions.

[0061] The hardware resource allocation file is used to determine the hardware resources allocated to the real-time operating system (this type of hardware resources can be called the first type of hardware resources) and to determine the hardware resources allocated to the non-real-time operating system (this type of hardware resources can be called the second type of hardware resources).

[0062] When the bottom soft driver layer receives the power task from the real-time operating system, the bottom soft driver layer calls the first type of hardware resources to process the power task.

[0063] After the real-time operating system generates the power task, the power task can be sent to the bottom soft driver layer. When the bottom soft driver layer receives the power task from the real-time operating system, the bottom soft driver layer calls the first type of hardware resources to process the power task.

[0064] When the bottom soft driver layer receives the power task from the non-real-time operating system, the bottom soft driver layer calls the second type of hardware resources to process the power task.

[0065] After the non-real-time operating system generates a power task, the power task can be sent to the bottom soft driver layer. When the bottom soft driver layer receives the power task from the non-real-time operating system, the bottom soft driver layer calls the second type of hardware resources to process the power task.

[0066] The new energy gateway provided by the present application includes: a hardware layer, a bottom soft driver layer and an operating system layer; the operating system layer is located above the bottom soft driver layer, and the bottom soft driver layer is located above the hardware layer; the hardware layer includes hardware resources, the bottom soft driver layer includes a hardware resource allocation file, and the operating system layer includes a real-time operating system and a non-real-time operating system; the hardware resource allocation file is used to determine the first type of hardware resources allocated to the real-time operating system in the hardware resources, and to determine the second type of hardware resources allocated to the non-real-time operating system in the hardware resources; when the bottom soft driver layer receives the power task of the real-time operating system, the bottom soft driver layer calls the first type of hardware resources to process the power task; when the bottom soft driver layer receives the power task of the non-real-time operating system, the bottom soft driver layer calls the second type of hardware resources to process the power task. The scheme provided by the present application, the new energy gateway can run the real-time operating system and the non-real-time operating system at the same time, taking into account the power tasks of non-real-time nature and the power tasks of real-time nature; and, the bottom soft driver layer is set between the hardware layer and the operating system layer of the new energy gateway, and the hardware resources of the hardware layer are allocated by the bottom soft driver layer, and the real-time operating system and the non-real-time operating system can focus on their own power tasks, thereby improving the processing efficiency of power tasks.

[0067] In one embodiment, referring to Figure 3 ,In order from top to bottom, the bottom soft driver layer includes the ,virtual interface layer, the middleware layer and the hardware driver layer.

[0068] Hardware driver layer: The hardware driver layer is responsible for directly controlling and managing the hardware resources of the hardware layer. The hardware driver layer contains the hardware resource information related to this platform to ensure the normal operation of different hardware modules.

[0069] Middleware layer: The middleware layer is located above the hardware driver layer and provides system-level functions for real-time operating systems and non-real-time operating systems. Through the middleware layer, real-time operating systems and non-real-time operating systems can implement common functions in different task environments, improving the modularity and reusability of the system. The middleware layer can also manage and coordinate the access requirements of different systems to hardware resources to ensure the compatibility of power tasks with real-time nature and power tasks with non-real-time nature. The middleware layer has hardware resource allocation files to divide the hardware resources of the hardware layer, allocate some hardware resources to real-time operating systems, and allocate other hardware resources to non-real-time operating systems to meet the real-time and reliability requirements of different systems.

[0070] Virtual interface layer: The virtual interface layer further encapsulates the abstraction and management of hardware resources, and provides a unified abstract interface to real-time operating systems and non-real-time operating systems. Through the virtual interface layer, real-time operating systems and non-real-time operating systems can access hardware resources in a standardized manner without having to understand the specific implementation of the underlying hardware, thereby achieving separation of software and hardware and enhancing the flexibility and portability of the system. At the same time, the virtual interface layer isolates resource allocation to ensure that real-time tasks and non-real-time tasks can run efficiently and stably.

[0071] After receiving the power task, the virtual interface layer determines the operating system to which the power task belongs;

[0072] The middleware layer determines the hardware resources allocated to the operating system to which the power task belongs according to the hardware resource allocation file and the operating system to which the power task belongs determined by the virtual interface layer, and generates a corresponding call instruction;

[0073] The hardware driver layer calls the corresponding hardware resources to process power tasks according to the calling instructions.

[0074] In this embodiment, after receiving the power task, the virtual interface layer can determine the operating system to which the power task belongs.

[0075] If the power task belongs to a real-time operating system, the middleware layer can determine, based on the hardware resource allocation file, that the hardware resources allocated to the power task are first-class hardware resources, and generate a call instruction for calling the first-class hardware resources; after receiving the call instruction, the hardware driver layer can call the first-class hardware resources to process the power task.

[0076] If the power task belongs to a non-real-time operating system, the middleware layer can determine that the hardware resources allocated to the power task are second-class hardware resources based on the hardware resource allocation file, and generate a call instruction for calling the second-class hardware resources; after receiving the call instruction, the hardware driver layer can call the second-class hardware resources to process the power task.

[0077] In one embodiment, after receiving the power task, the virtual interface layer determines the operating system to which the power task belongs, including:

[0078] After receiving the power task, the virtual interface layer determines the operating system that calls the current layer, and determines the operating system that calls the current layer as the operating system to which the power task belongs.

[0079] The real-time operating system and the non-real-time operating system transmit the power task to the virtual interface layer by calling the interface of the virtual interface layer. Therefore, after receiving the power task, the virtual interface layer can determine to call the operating system of this layer and regard the operating system as the operating system to which the power task belongs.

[0080] In one embodiment, the first type of hardware resource receives the first type of data sent by the first type of peripheral device; the first type of peripheral device is a peripheral device associated with a real-time operating system;

[0081] The first type of hardware resources transmits the first type of data to the real-time operating system through the bottom soft driver layer;

[0082] The real-time operating system generates power tasks based on the first type of data.

[0083] Peripheral devices associated with the real-time operating system are called first-class peripheral devices. Through the initialization of the new energy gateway, the first-class hardware resources can be designated to be responsible for processing the data sent by the first-class peripheral devices; the data sent by the first-class peripheral devices can be called first-class data. After receiving the first-class data, the first-class hardware resources can transmit the first-class data to the real-time operating system through the bottom soft driver layer.

[0084] The real-time operating system may generate a power task after processing the first type of data. After generating the power task, the real-time operating system may send the power task to the bottom soft driver layer. The bottom soft driver layer calls the first type of hardware resources to process the power task.

[0085] A non-real-time operating system can perform more complex operations. Therefore, the first type of data in some scenarios can be processed by a non-real-time operating system. Based on this, the present application also provides an embodiment, in which the real-time operating system generates a power task according to the first type of data, specifically including:

[0086] After receiving the first type of data, the real-time operating system assigns a label and a timestamp for characterizing the peripheral device to the first type of data, and stores the label in the shared memory;

[0087] The non-real-time operating system reads the first type of data from the shared memory according to the label and the timestamp, and operates on the first type of data to obtain an operation result;

[0088] The non-real-time operating system stores the calculation results in shared memory;

[0089] The real-time operating system reads the calculation results from the shared memory and generates power tasks for decision-making and control based on the calculation results.

[0090] The real-time operating system and the non-real-time operating system exchange related information through the shared memory. The real-time operating system can store the first type of data in the shared memory. The non-real-time operating system can read the first type of data from the shared memory to perform complex operations and store the operation results in the shared memory. The real-time operating system can read the operation results from the shared memory to generate power tasks for decision control.

[0091] This embodiment reduces development complexity, and the real-time operating system and the non-real-time operating system work together, so that the real-time operating system can efficiently process data of peripheral devices and generate power tasks.

[0092] In one embodiment, the real-time operating system includes a device layer; the peripheral device whose device information is configured in the device layer is a peripheral device associated with the real-time operating system.

[0093] For example, if the device information of the circuit breaker is configured in the device layer of the real-time operating system, the circuit breaker belongs to a peripheral device associated with the real-time operating system.

[0094] In one embodiment, the first type of hardware resources transmit the first type of data to the real-time operating system through the bottom soft driver layer, specifically including:

[0095] The first type of hardware resources transmits the first type of data to the application layer of the real-time operating system through the bottom soft driver layer, the library layer of the real-time operating system, the board support package layer of the real-time operating system and the device layer of the real-time operating system.

[0096] The real-time operating system is designed for new energy gateway applications with new energy equipment to ensure that the real-time operating system can efficiently handle time-sensitive control algorithms and high-precision sensor data acquisition. Figure 4 , from bottom to top, the real-time operating system includes the library layer (also known as the Libraries layer), the board support package layer (which can be written as the BSP layer, the full name of BSP is Board Support Package, and the Chinese name of BSP is Board Support Package), the device layer (which can be written as the Devices layer) and the application layer (which can be written as the App layer, the full name of App is Application, and the Chinese name of App is Application). Each layer has specific responsibilities in the new energy gateway application, specifically:

[0097] Library layer: As the basic module of the real-time operating system, the library layer provides low-level drivers and software libraries that interact directly with the hardware, including standard libraries of processor manufacturers and various open source libraries. These libraries simplify the hardware initialization, configuration, and control process, making it easier for developers to write applications at a higher level. The library layer provides basic hardware abstraction and configuration interfaces for peripheral registers, thereby avoiding the complex operation of manually viewing and configuring registers.

[0098] Board support package layer: The board support package layer is built on the library layer and is responsible for calling the basic library interface to implement the configuration of the new energy gateway hardware platform, including system clock, pin multiplexing and initialization of various communication peripherals. The board support package layer configures the usage mode of the peripherals required by the USART (Universal Synchronous / Asynchronous Receiver / Transmitter, full-duplex universal synchronous / asynchronous receiver / transmitter) module, SPI module, CAN module and IIC module according to the user's usage requirements, and initializes the peripherals required for the new energy gateway to ensure full utilization of resources. The method of initializing the same type of peripherals is abstracted, and the required peripherals can be used in batches by only modifying the peripheral serial number. For example, when the peripheral device is a full-duplex universal synchronous / asynchronous serial transceiver module, multiple structures are configured when the full-duplex universal synchronous / asynchronous serial transceiver module is initialized, each structure contains multiple attributes, and there are multiple configuration options in the attributes. Based on engineering experience, the board support package layer uniformly configures the common attributes of different energy storage scenarios, and leaves the dedicated part for developers to choose, which can greatly reduce the configuration workload and development and debugging time.

[0099] Device layer: Through the configuration of the board-level support package layer, the new energy gateway has the ability to communicate with other devices. Different types of devices often have different communication protocols, communication frame formats and ways to establish communication. The device layer is responsible for managing specific peripheral hardware devices, standardizing the communication protocols, communication frame formats and ways to establish communication for a class of devices, and facilitating user use. This layer uses the device model as the smallest unit and abstracts different classes for different devices, such as switches, circuit breakers, measurement and control devices, and electric energy measurement devices in the new energy area. The specific attributes, physical meanings and intermediate variables of these devices are defined in the class, and there are corresponding methods to obtain these attributes. In addition, there is a system data sharing module in this layer, which tags and timestamps the first type of data and stores it in the shared memory so that the non-real-time operating system can call and process it. At the same time, the real-time operating system obtains the operation results of the non-real-time operating system on the first type of data from the shared memory. This design not only improves the readability and maintainability of the code, but also reduces the development complexity, enabling the real-time operating system to efficiently process peripheral data.

[0100] Application layer: The application layer is the top layer of the real-time operating system, responsible for implementing the core functions and control logic of the new energy gateway. This layer is based on the standardized data interface provided by the device layer and implements the key functions of the new energy gateway application through real-time algorithms. The application layer mainly includes key data processing modules related to safety and application logic modules of the new energy gateway. The data processing module further analyzes, filters and integrates the data from the device layer. The new energy gateway application logic module combines these data to execute specific detection algorithms, safety algorithms, closed-loop control, execution decisions and state machine management functions. The task scheduling mechanism in the application layer adjusts the priority of tasks according to the actual operation of the system to ensure the real-time response of key tasks and the reasonable allocation of resources, thereby ensuring the efficient and stable operation of the real-time operating system.

[0101] The hierarchical structure of the real-time operating system ensures the flexibility and scalability of the real-time operating system in new energy gateway applications, enabling it to efficiently process real-time tasks while meeting diverse data acquisition and control requirements.

[0102] In one embodiment, when the number of power tasks of the real-time operating system is multiple, the real-time operating system sets a processing time threshold for each power task;

[0103] The first type of hardware resources, when processing power tasks, specifically include:

[0104] The first type of hardware resources processes one of the power tasks, and when the processing time reaches a corresponding processing time threshold, stops processing one of the power tasks and processes the next power task.

[0105] The real-time operating system can generate multiple power tasks and associate a processing time threshold with each power task. Thus, the first type of hardware resource processes one of the power tasks; when the timer determines that the processing time reaches the corresponding processing time threshold; the first type of hardware resource stops processing one of the power tasks and processes the next power task.

[0106] Through the solution provided by this embodiment, it can be ensured that each power task of the real-time operating system has a strict time constraint, thereby avoiding the impact of the processing of the next power task due to the incomplete processing of the current power task.

[0107] In one embodiment, the real-time operating system sets a processing priority for each power task; the next power task is determined among the plurality of power tasks according to the processing priority.

[0108] When the real-time operating system generates multiple power tasks, the real-time operating system can also configure a priority for each power task. According to the urgency of the power tasks, the priorities of these power tasks can be determined, and these power tasks are sorted according to the priorities to form a power task sequence. After the first-category hardware resource stops processing one of the power tasks, the next power task can be determined in the power task sequence, thereby ensuring that the urgent power tasks are processed first.

[0109] In one embodiment, the second type of hardware resources receive the second type of data sent by the second type of peripheral devices; the second type of peripheral devices are peripheral devices associated with a non-real-time operating system;

[0110] The second type of hardware resources transmit the second type of data to the non-real-time operating system through the bottom soft driver layer;

[0111] The non-real-time operating system generates power tasks based on the second type of data.

[0112] Peripheral devices associated with non-real-time operating systems are called second-class peripheral devices. Through the initialization of the new energy gateway, the second-class hardware resources can be designated to process the data sent by the second-class peripheral devices; the data sent by the second-class peripheral devices can be called second-class data. After receiving the second-class data, the second-class hardware resources can transmit the second-class data to the non-real-time operating system through the bottom soft driver layer.

[0113] The non-real-time operating system may generate a power task after processing the second type of data. After generating the power task, the non-real-time operating system may send the power task to the bottom soft driver layer. The bottom soft driver layer calls the second type of hardware resources to process the power task.

[0114] In one embodiment, the second type of hardware resources transmit the second type of data to the non-real-time operating system through the bottom soft driver layer, specifically including:

[0115] The second type of hardware resources transmit the second type of data to the application layer of the non-real-time operating system through the bottom soft driver layer, the kernel layer of the non-real-time operating system, the communication driver interface layer of the non-real-time operating system and the data fusion layer of the non-real-time operating system.

[0116] Reference Figure 5 , from bottom to top, non-real-time operating systems can include kernel layer, communication driver interface layer, data fusion layer and application layer; compared with the application layer of real-time operating system, the application layer of non-real-time operating system can handle more complex operations, and the application layer of non-real-time operating system belongs to the advanced application layer. When uncertain number and brand of new energy equipment are connected, non-real-time operating system can be quickly deployed and developed, and multi-threaded system design can ensure the stability of non-real-time operating system when facing massive data processing. The functional design of each layer is as follows:

[0117] Kernel layer: The kernel layer provides underlying support for non-real-time operating systems. This layer is mainly responsible for core functions such as thread management, memory allocation, device drivers, and file systems, and provides a stable and efficient operating environment for upper-layer modules through mature mechanisms.

[0118] Communication driver interface layer: The communication driver interface layer adopts a layered protocol stack implementation method to manage protocol parsing and state machine logic separately. The parsing of the protocol frame format is the responsibility of an independent module. The field position, data type and length of each protocol are defined through the configuration file. Developers can add or modify protocol support through simple configuration. The implementation of the state machine is based on an event-driven model, and the fast switching of states is achieved through the event loop library. For example, when implementing a certain power system (IEC 101, modbus, IEC 104, 61850) communication protocol, the non-real-time operating system dynamically adjusts the state machine process according to the type of transmission control instructions to ensure real-time response to device requests. In order to further improve scalability, the communication driver interface layer adopts a plug-in architecture. The protocol module is loaded in the form of a dynamic library and registered in the main program through a unified interface. This allows new communication protocols to be quickly integrated without modifying the core code, and can support a variety of power system communication protocols.

[0119] Data fusion layer: The data fusion layer uses modular design to logically classify and uniformly manage data of different peripheral device types. Its implementation is based on the data bus model. After the data of each peripheral device type is parsed by the communication driver interface layer, it is pushed to the unified data bus according to the predefined device identification code. The data bus is implemented using a message queue to ensure the orderly transmission and processing of high-concurrency data streams. In addition, to improve the efficiency of data fusion, the non-real-time operating system implements an automatic identification and classification module for peripheral device types, dynamically allocates processing logic by parsing the metadata of peripheral devices (such as device identification and protocol type), and uses hash tables to store data mapping relationships to speed up data access. In addition, this layer can also obtain the first type of data stored in the shared memory by the real-time operating system. The first type of data contains tags and timestamps used to characterize peripheral devices to ensure that the first type of data entered into this layer is accurate and up-to-date. At the same time, the non-real-time operating system will also store the calculation results obtained after performing complex calculations on the first type of data in the shared memory and provide them to the real-time operating system for decision-making control.

[0120] Application layer: The application layer separates data processing and application logic by building a microservice architecture to ensure the independence and scalability of different functional modules. Each function (such as malicious load identification, abnormal data recording, etc.) is implemented as an independent microservice and deployed through containerization technology to ensure isolation and easy scalability between applications. To achieve data analysis, the application layer introduces an open source framework to stream real-time data. The processed data will be distributed to different modules, such as modules forwarded to other devices or databases that record abnormal data. In order to enhance the flexibility of service deployment, this layer also includes a service call interface that allows users to quickly add new functional services or adjust the parameters of existing functions through configuration files.

[0121] The present application also provides an embodiment, in which the architecture diagram of the new energy gateway is as follows Figure 6 shown.

[0122] The new energy gateway includes a hardware layer, a bottom soft driver layer and an operating system layer. The hardware layer includes n operating cores, m communication peripherals and k storage units. From bottom to top, the bottom soft driver layer includes a hardware driver layer, a middleware layer and a virtual interface layer. The operating system layer includes M real-time operating systems and N non-real-time operating systems.

[0123] In order from bottom to top, the real-time operating system includes the Libraries layer, BSP layer, Devices layer and App layer.

[0124] The App layer of a real-time operating system can include a variety of algorithms, such as Figure 6 The detection algorithm, security algorithm, filtering algorithm, execution decision algorithm, state machine management algorithm and closed-loop control algorithm are shown; among them, the detection algorithm is mainly used to detect abnormal data in batch data; the security algorithm is mainly used to encrypt the transmitted data; the filtering algorithm is mainly used to eliminate abnormal data; the execution decision algorithm is mainly used to output control instructions; the state machine management algorithm is mainly used to identify the current life cycle; the closed-loop control algorithm is mainly used to control the target value to converge to the target value.

[0125] The Devices layer of a real-time operating system can include modules for managing various devices, such as Figure 6 Shown are the MiCOM measurement and control management module, the NDWx circuit breaker management module, the NDQ3x switch management module, the non-real-time operating system data interaction module and the PM5000 power measurement management module.

[0126] The management modules of MiCOM measurement and control, NDWx circuit breakers, NDQ3x switches and PM5000 energy measurement mainly implement the initialization of the corresponding equipment, provide standard frame format information for this peripheral, and implement the functions of obtaining and receiving information during normal transmission and reception. The non-real-time operating system data interaction module is mainly used for data interaction with non-real-time operating systems.

[0127] For a detailed introduction to the BSP layer of the real-time operating system, please refer to the above content.

[0128] The Libraries layer of the real-time operating system may include the HAL library. For a detailed introduction to the Libraries layer, please refer to the above content.

[0129] In order from bottom to top, the non-real-time operating system includes the kernel layer, communication driver interface layer, data fusion layer and application layer.

[0130] The application layer of non-real-time operating systems includes various algorithms, such as Figure 6 The malicious load identification algorithm, massive data display algorithm, massive data forwarding algorithm and massive event recording algorithm shown. The malicious load identification algorithm is mainly used to identify whether a purely resistive direct heating appliance is inserted into the circuit; the massive data display algorithm is mainly used to display the collected data of distributed new energy equipment through the display screen; the massive data forwarding algorithm is mainly used to forward the data of distributed new energy equipment to the main station; the massive event recording algorithm is mainly used to write the collected abnormal records into the non-volatile memory.

[0131] The data fusion layer of non-real-time operating systems includes various data processing modules, such as Figure 6 The distribution network switch data processing module, inverter data processing module, BMS (Battery Management System) data processing module, master station data processing module, meteorological instrument data processing module, PCS (Power Conversion System) data processing module and real-time operating system data interaction module are shown.

[0132] The distribution network switch data processing module, inverter data processing module, BMS data processing module, master station data processing module, meteorological instrument data processing module and PCS data processing module are mainly used to realize the initialization of the corresponding equipment, provide the standard frame format information of the peripheral, and realize the function of obtaining and receiving information during the normal sending and receiving process, and uniformly classify and manage the data. The real-time operating system data interaction module is mainly used to interact with the real-time operating system.

[0133] For a detailed introduction to the communication driver interface layer of a non-real-time operating system, please refer to the aforementioned content.

[0134] The kernel layer of the non-real-time operating system includes a process management module, a network system, a memory management module, a process communication module and a file system.

[0135] The present application also provides a new energy station area, which includes distributed new energy equipment, a master station and a new energy gateway as introduced in the above embodiment.

[0136] The new energy gateway is used to receive instructions from the master station and generate control information; the new energy gateway is used to send control information to distributed new energy devices.

[0137] The new energy gateway provided in this embodiment has the functions of receiving information, forwarding information, current and voltage collection and protection. The new energy gateway can receive instructions from the master station through the power system communication protocol and generate control information; the new energy gateway can interact with distributed new energy equipment and send control information; and the new energy gateway can also perform data analysis, anomaly detection, indicator display and event recording on distributed new energy equipment. The new energy gateway can directly collect data for new energy equipment that needs to be monitored, and quickly take protective actions.

[0138] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0139] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0140] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A new energy gateway based on real-time and non-real-time architecture, characterized in that: The new energy gateway comprises: a hardware layer, a bottom soft driver layer and an operating system layer; the operating system layer is located above the bottom soft driver layer, and the bottom soft driver layer is located above the hardware layer; The hardware layer includes hardware resources, the bottom soft driver layer includes a hardware resource allocation file, and the operating system layer includes a real-time operating system and a non-real-time operating system; the hardware resource allocation file is used to determine the first type of hardware resources allocated to the real-time operating system among the hardware resources, and to determine the second type of hardware resources allocated to the non-real-time operating system among the hardware resources; When the bottom soft driver layer receives the power task of the real-time operating system, the bottom soft driver layer calls the first type of hardware resources to process the power task; When the bottom soft driver layer receives the power task of the non-real-time operating system, the bottom soft driver layer calls the second-type hardware resources to process the power task.

2. The new energy gateway according to claim 1, characterized in that: The bottom soft drive layer includes a virtual interface layer, a middleware layer and a hardware drive layer; After receiving the power task, the virtual interface layer determines the operating system to which the power task belongs; The middleware layer determines the hardware resources allocated to the operating system to which the power task belongs according to the hardware resource allocation file and the operating system to which the power task belongs determined by the virtual interface layer, and generates a corresponding call instruction; The hardware driver layer calls corresponding hardware resources to process the power task according to the calling instruction.

3. The new energy gateway according to claim 2, characterized in that: After receiving the power task, the virtual interface layer determines the operating system to which the power task belongs, including: After receiving the power task, the virtual interface layer determines the operating system that calls the current layer, and determines the operating system that calls the current layer as the operating system to which the power task belongs.

4. The new energy gateway according to claim 1, characterized in that: The first-category hardware resource receives the first-category data sent by the first-category peripheral device; the first-category peripheral device is a peripheral device associated with the real-time operating system; The first type of hardware resources transmits the first type of data to the real-time operating system through the bottom soft driver layer; The real-time operating system generates a power task according to the first type of data.

5. The new energy gateway according to claim 4, characterized in that: When the real-time operating system generates a power task according to the first type of data, the method specifically includes: After receiving the first type of data, the real-time operating system assigns a label and a timestamp for characterizing the peripheral device to the first type of data, and stores the label in the shared memory; The non-real-time operating system reads the first type of data from the shared memory according to the label and the timestamp, and performs operations on the first type of data to obtain operation results; The non-real-time operating system stores the operation result in the shared memory; The real-time operating system reads the operation result from the shared memory, and generates the power task for decision-making control according to the operation result.

6. The new energy gateway according to claim 4, characterized in that: The first type of hardware resources transmits the first type of data to the real-time operating system through the bottom soft driver layer, specifically including: The first type of hardware resources transmits the first type of data to the application layer of the real-time operating system through the bottom soft driver layer, the library layer of the real-time operating system, the board support package layer of the real-time operating system and the device layer of the real-time operating system.

7. The new energy gateway according to claim 1, characterized in that: The second-category hardware resource receives the second-category data sent by the second-category peripheral device; the second-category peripheral device is a peripheral device associated with the non-real-time operating system; The second type of hardware resources transmits the second type of data to the non-real-time operating system through the bottom soft driver layer; The non-real-time operating system generates a power task according to the second type of data.

8. The new energy gateway according to claim 7, characterized in that: The second type of hardware resources transmits the second type of data to the non-real-time operating system through the bottom soft driver layer, specifically including: The second type of hardware resources transmits the second type of data to the application layer of the non-real-time operating system through the bottom soft driver layer, the kernel layer of the non-real-time operating system, the communication driver interface layer of the non-real-time operating system and the data fusion layer of the non-real-time operating system.

9. The new energy gateway according to claim 1, characterized in that: When the number of the power tasks of the real-time operating system is multiple, the real-time operating system sets a processing time threshold for each power task; When processing the power task, the first type of hardware resources specifically includes: The first-type hardware resource processes one of the power tasks, and when the processing time reaches a corresponding processing time threshold, stops processing one of the power tasks and processes the next power task.

10. A new energy station, characterized in that: The new energy station area includes distributed new energy equipment, a master station and a new energy gateway as claimed in any one of claims 1 to 9; The new energy gateway is used to receive instructions from the master station and generate control information; The new energy gateway is used to send the control information to the distributed new energy equipment.

Citation Information

Patent Citations

  • A packaging system

    IE61850B1

Cited By

  • Inverter system, communication method, electronic device, and storage medium

    CN121690276A