Collaborative simulation method, system and device for electric energy market and frequency modulation market, and medium

Through microservice architecture and digital twin technology, collaborative simulation of the electric energy market and the frequency regulation market is achieved, which solves the problem of insufficient scalability and flexibility of the existing system, realizes real-time optimization and accurate simulation of the power market, and improves the efficiency and stability of market operation.

CN120634612APending Publication Date: 2025-09-12CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510745610.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

The existing electricity market simulation system cannot achieve collaborative simulation of the electric energy market and the frequency regulation market. It lacks scalability and flexibility, cannot adjust parameters in real time, has difficulty simulating dynamic changes in the market, and lacks the ability to model new types of electricity entities.

Method used

Using microservice architecture and digital twin technology, a collaborative simulation method for the electricity energy market and the frequency regulation market is constructed. Joint clearing is performed through the microservice architecture, and market parameters are adaptively adjusted using reinforcement learning algorithms to achieve real-time closed-loop simulation.

Benefits of technology

It has achieved joint optimization of the electric energy market and the frequency regulation market, improved the scalability and flexibility of the system, enabled real-time adjustments based on market dynamics, accurately simulated the operating status of the power system, and improved the efficiency and stability of market operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120634612A_ABST
    Figure CN120634612A_ABST
Patent Text Reader

Abstract

The invention discloses an electric energy market and frequency modulation market co-simulation method, system and device and a medium, and the method comprises the steps: constructing a micro-service architecture covering a plurality of micro-services according to the simulation function demands of an electric power market; a micro-service architecture is used for combined clearing of a day-ahead electric energy market and a real-time frequency modulation market, and collaborative optimization of the electric energy market and the frequency modulation market is realized in the combined clearing process based on a pre-established two-stage optimization model; self-adaptively adjusting market parameters based on a reinforcement learning algorithm, and dynamically switching a clearing period; and establishing a power system model by adopting a digital twinborn technology, and simulating the running state of the power system according to the collaborative optimization result of the electric energy market and the frequency modulation market, the adjusted market parameters and the switched clearing period to realize real-time closed-loop simulation. According to the invention, joint optimization of the electric energy market and the frequency modulation market is realized, a scientific decision basis is provided for operation and control of a power system, and the accuracy and reliability of simulation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electric power markets, and in particular to a method, system, device and medium for collaborative simulation of electric energy markets and frequency regulation markets. Background Art

[0002] The spot electricity energy market consists of the day-ahead energy market and the real-time energy market. The day-ahead energy market, based on bidding data from both power generators and users, determines the electricity price for each node or segment of the grid, as well as the winning bid power for each market participant, while taking into account system balance constraints, grid reserve requirements, unit operating constraints, and grid security constraints. The real-time energy market, based on the unit combination structure of the day-ahead market, adopts a full power optimization model. Before real-time operation, it globally optimizes the generation resources across the entire grid based on the latest ultra-short-term load forecasts and system operating information.

[0003] The frequency regulation market (or frequency regulation ancillary services market) establishes a market mechanism to encourage various market participants to provide frequency regulation services, and to compensate and trade these services. In this market, participants adjust their active power output based on the power system's frequency regulation needs to ensure that the power system's frequency fluctuates within a specified range, thus guaranteeing safe, stable, and reliable operation. The frequency regulation market is cleared by combining the participants' bids, comprehensive performance indicators, and opportunity costs to rank and clear the market.

[0004] With the advancement of the construction of the electricity spot market, new market players such as new energy and energy storage have entered the market. Currently, domestic and international electricity markets and frequency regulation markets operate through capacity and opportunity cost coupling. Through collaborative operations, various resources, including new energy, can be dispatched more flexibly, promoting the widespread use of new energy and promoting the effective integration of the electricity energy market and frequency regulation market. To further improve the collaborative operation of various types of markets, it is urgent to develop collaborative operation simulation technology for spot electricity and frequency regulation markets, conduct multi-scenario case studies on the collaborative operation of electricity and ancillary service markets, quantify the impact of the mechanism on market players such as conventional energy, new energy, and energy storage, analyze the guiding role and potential risks of the market mechanism, and provide reference for the core business operations and typical cases of provincial electricity spot market operations.

[0005] Traditional power market simulation systems primarily simulate a single energy market or frequency regulation market. Architecturally, these systems often adopt a centralized architecture, with all functional modules centrally deployed and data processing and computation relying on central servers. This results in poor system scalability, making it difficult to cope with the growing number of power market participants and businesses. Functionally, market clearing typically only considers the rules and constraints of a single market, lacking a mechanism for coordinated optimization of the energy and frequency regulation markets. Furthermore, parameter adjustments are often static and cannot be adjusted in real time to adapt to market dynamics. Regarding the simulation process, traditional systems primarily utilize offline simulation, lacking real-time closed-loop simulation and simulating real-time market operations. Furthermore, modeling and simulation capabilities for new power entities (such as virtual power plants and energy storage systems) are limited, failing to accurately reflect their behavior and impact in the market. Overall, existing technologies fail to meet the requirements for collaborative simulation of energy and frequency regulation markets, lacking significant limitations in architectural flexibility, functional integrity, and real-time simulation performance. Summary of the Invention

[0006] The purpose of the present invention is to address the problems in the above-mentioned prior art and provide a collaborative simulation method, system, equipment and medium for the electric energy market and the frequency regulation market, so as to realize the joint optimization of the electric energy market and the frequency regulation market. The architecture can be flexibly expanded and parameters can be adjusted in real time according to market dynamic changes, and the real-time operation of the market can be simulated through real-time closed-loop simulation.

[0007] In order to achieve the above object, the present invention has the following technical solutions: In a first aspect, a collaborative simulation method for an electric energy market and a frequency regulation market is provided, comprising: Build a microservice architecture covering multiple microservices based on the power market simulation function requirements; Utilize a microservices architecture to jointly clear the day-ahead energy market and the real-time frequency regulation market. Based on a pre-established two-stage optimization model, achieve collaborative optimization of the energy and frequency regulation markets during the joint clearing process. Adaptively adjust market parameters based on reinforcement learning algorithms and dynamically switch clearing cycles; Digital twin technology is used to establish a power system model, and based on the collaborative optimization results of the electricity energy market and the frequency regulation market, the adjusted market parameters, and the clearing cycle after switching, the power system operation status is simulated to achieve real-time closed-loop simulation.

[0008] As a preferred solution, the microservice architecture covering multiple microservices is built using the Spring Cloud microservice framework. The types of microservices include: User management service is responsible for managing various types of user information, including user registration, login, and permission allocation. Through permission management, different users can only access and operate functions and data within the corresponding permission range; Data access services connect data from various data sources to simulation tasks. Data sources include power system operation data, market transaction data, and equipment parameter data. Data access services clean, convert, and integrate data in different formats or protocols. The market clearing engine analyzes and calculates supply and demand information in the market according to the rules and constraints of the electricity energy market and frequency regulation market, and determines the market clearing price and the winning bids for electricity and frequency regulation capacity of each market player; Frequency regulation performance evaluation: Real-time monitoring and evaluation of the frequency regulation performance of various entities participating in the frequency regulation market. By collecting and analyzing the response data of frequency regulation equipment, the performance indicators of frequency regulation entities are calculated to provide a reference basis for market clearing and resource scheduling. Multi-objective optimization: comprehensively considers multiple objectives of the electricity energy market and frequency regulation market, and optimizes market clearing and resource scheduling plans by establishing a multi-objective optimization model; Real-time simulation: Based on digital twin technology, a real-time simulation model of the power system is established to simulate the operating status of the power system, interact with the actual power system, and update the real-time simulation model in real time by receiving the operating data of the actual system. At the same time, the simulation results are fed back to the actual system to achieve real-time closed-loop simulation that combines virtual and real systems. Result analysis service: analyzes and mines simulation results, generates statistical reports and visual charts, and provides decision support for market participants and regulators; Visualization service displays simulation results in an intuitive and visual way.

[0009] As a preferred solution, initial configuration is performed before the simulation begins, including setting the simulation time range, selecting market rules, and entering system parameters; Data access services collect power system operation data, market transaction data, and equipment parameter data from various data sources, and clean, convert, and integrate the collected data; verify the accuracy and completeness of the data; The market clearing engine performs joint clearing calculations for the electricity energy market and the frequency regulation market based on user-defined market rules and collected data. During the clearing process, multi-objective optimization comprehensively considers multiple objectives to optimize the market clearing solution. The clearing results include the winning bid amount, frequency regulation capacity, and clearing price of each market player. Based on the market clearing results, the frequency regulation performance of each frequency regulation entity is evaluated, and frequency regulation resources are dispatched based on the evaluation results. The scheduling process takes into account the real-time response of frequency regulation resources and the frequency regulation needs of the system; A real-time simulation model of the power system is established based on digital twin technology to simulate the power system's operating status in real time. During the simulation process, the actual power system operating data is received in real time, the real-time simulation model is updated, and the simulation results are fed back to the actual system. Through real-time closed-loop simulation, the operation of the power system under different operating conditions is simulated to evaluate the effectiveness of market clearing and resource scheduling plans. The result analysis service analyzes and evaluates the simulation results, including the rationality of the market clearing results, the benefits of each market player, the efficiency of frequency regulation resource utilization, and the operational safety of the power system. Based on the feedback information from the analysis and evaluation of simulation results, the key parameters of the market are optimized and adjusted as the input for the next simulation, forming a closed-loop simulation optimization process; through iterative optimization, the optimal market operation plan is found.

[0010] As a preferred solution, in the step of using the microservice architecture to jointly clear the day-ahead electric energy market and the real-time frequency regulation market, in the day-ahead stage, the electric energy market and the frequency regulation market are jointly optimized based on the quotations submitted by market participants and the predicted load demand, and the winning electricity volume and frequency regulation capacity of each market player are determined; in the real-time stage, the market clearing results are adjusted in real time based on actual load changes and frequency regulation needs.

[0011] As a preferred solution, the coordinated optimization of the electric energy market and the frequency regulation market in the joint clearing process based on the pre-established two-stage optimization model includes: In the first stage, the clearing price of the electric energy market and the winning bid amount of each market player are determined under the optimization objectives and constraints. In the second stage, based on the clearing price of the electric energy market and the winning bid amount of each market player determined in the first stage, with the goal of optimizing the frequency regulation effect, the clearing results of the frequency regulation market are optimized, and the frequency regulation capacity and price of each frequency regulation player are determined, taking into account the real-time response of the frequency regulation resources and the frequency regulation needs of the system. The mathematical model expression is as follows:

[0012] Where, express t The electricity generation cost in the electricity energy market at that moment, express t Frequency modulation costs in the time-based frequency modulation market; The power balance constraint ensures that the power generated by the power system is equal to the load demand at every moment; The frequency modulation resource response capability constraint limits the frequency modulation capacity and response speed of each frequency modulation entity; The energy storage system operation constraints take into account the charging and discharging power and state of charge of the energy storage system.

[0013] As a preferred solution, the step of adaptively adjusting market parameters based on a reinforcement learning algorithm includes: adjusting key market parameters, including the market clearing cycle, frequency regulation compensation price, and power generation quotation ceiling, according to the real-time market operation and simulation results; the reinforcement learning algorithm continuously interacts with the market environment to learn the optimal parameter adjustment strategy to improve the market's operating efficiency and stability.

[0014] As a preferred solution, the step of dynamically switching the clearing cycle includes selecting clearing cycles of different lengths according to actual needs: During the period when the load change is greater than the set threshold, a clearing cycle of the first length is selected; during the period when the load change is less than the set threshold, a clearing cycle of the second length is selected; wherein the first length is less than the second length.

[0015] As a preferred solution, the power system model established using digital twin technology can simulate the physical characteristics and operating laws of the power system, including the dynamic characteristics of generators, transformers, transmission lines and loads; the power system model established using digital twin technology is updated by receiving the operating data of the actual power system in real time, so that the established power system model is consistent with the actual system.

[0016] As a preferred solution, in the step of simulating the operating status of the power system and realizing real-time closed-loop simulation based on the collaborative optimization results of the electric energy market and the frequency regulation market, the adjusted market parameters and the clearing cycle after switching, the physical equipment conducts real-time data interaction, obtains the operating status and parameter information of the physical equipment in real time through the interface, and feeds back the simulation results to the physical equipment to realize real-time closed-loop simulation combining virtual and real.

[0017] In a second aspect, a collaborative simulation system for an electric energy market and a frequency regulation market is provided, comprising: A microservice architecture building module is used to build a microservice architecture covering multiple microservices based on the functional requirements of the power market simulation; A collaborative optimization module is used to jointly clear the day-ahead energy market and the real-time frequency regulation market using a microservices architecture. Based on a pre-established two-stage optimization model, it achieves collaborative optimization of the energy market and the frequency regulation market during the joint clearing process. Market parameter adjustment and clearing cycle switching module, used to adaptively adjust market parameters based on reinforcement learning algorithms and dynamically switch clearing cycles; The real-time closed-loop simulation module is used to establish a power system model using digital twin technology, and simulate the operating status of the power system based on the coordinated optimization results of the electric energy market and the frequency regulation market, the adjusted market parameters, and the clearing cycle after switching, to achieve real-time closed-loop simulation.

[0018] As a preferred solution, the microservice architecture building module adopts the Spring Cloud microservice framework to build a microservice architecture covering multiple microservices; Types of microservices include: User management service is responsible for managing various types of user information, including user registration, login, and permission allocation. Through permission management, different users can only access and operate functions and data within the corresponding permission range; Data access services connect data from various data sources to simulation tasks. Data sources include power system operation data, market transaction data, and equipment parameter data. Data access services clean, convert, and integrate data in different formats or protocols. The market clearing engine analyzes and calculates supply and demand information in the market according to the rules and constraints of the electricity energy market and frequency regulation market, and determines the market clearing price and the winning bids for electricity and frequency regulation capacity of each market player; Frequency regulation performance evaluation: Real-time monitoring and evaluation of the frequency regulation performance of various entities participating in the frequency regulation market. By collecting and analyzing the response data of frequency regulation equipment, the performance indicators of frequency regulation entities are calculated to provide a reference basis for market clearing and resource scheduling. Multi-objective optimization: comprehensively considers multiple objectives of the electricity energy market and frequency regulation market, and optimizes market clearing and resource scheduling plans by establishing a multi-objective optimization model; Real-time simulation: Based on digital twin technology, a real-time simulation model of the power system is established to simulate the operating status of the power system, interact with the actual power system, and update the real-time simulation model in real time by receiving the operating data of the actual system. At the same time, the simulation results are fed back to the actual system to achieve real-time closed-loop simulation that combines virtual and real systems. Result analysis service: analyzes and mines simulation results, generates statistical reports and visual charts, and provides decision support for market participants and regulators; Visualization service displays simulation results in an intuitive and visual way.

[0019] As a preferred solution, initial configuration is performed before the simulation begins, including setting the simulation time range, selecting market rules, and entering system parameters; Data access services collect power system operation data, market transaction data, and equipment parameter data from various data sources, and clean, convert, and integrate the collected data; verify the accuracy and completeness of the data; The market clearing engine performs joint clearing calculations for the electricity energy market and the frequency regulation market based on user-defined market rules and collected data. During the clearing process, multi-objective optimization comprehensively considers multiple objectives to optimize the market clearing solution. The clearing results include the winning bid amount, frequency regulation capacity, and clearing price of each market player. Based on the market clearing results, the frequency regulation performance of each frequency regulation entity is evaluated, and frequency regulation resources are dispatched based on the evaluation results. The scheduling process takes into account the real-time response of frequency regulation resources and the frequency regulation needs of the system; A real-time simulation model of the power system is established based on digital twin technology to simulate the power system's operating status in real time. During the simulation process, the actual power system operating data is received in real time, the real-time simulation model is updated, and the simulation results are fed back to the actual system. Through real-time closed-loop simulation, the operation of the power system under different operating conditions is simulated to evaluate the effectiveness of market clearing and resource scheduling plans. The result analysis service analyzes and evaluates the simulation results, including the rationality of the market clearing results, the benefits of each market player, the efficiency of frequency regulation resource utilization, and the operational safety of the power system. Based on the feedback information from the analysis and evaluation of simulation results, the key parameters of the market are optimized and adjusted as the input for the next simulation, forming a closed-loop simulation optimization process; through iterative optimization, the optimal market operation plan is found.

[0020] As a preferred solution, when the collaborative optimization module uses the microservice architecture to jointly clear the day-ahead electricity energy market and the real-time frequency regulation market, in the day-ahead stage, the electricity energy market and the frequency regulation market are jointly optimized based on the quotations submitted by market participants and the predicted load demand, and the winning electricity volume and frequency regulation capacity of each market player are determined; in the real-time stage, the market clearing results are adjusted in real time based on actual load changes and frequency regulation needs.

[0021] As a preferred solution, the collaborative optimization module is based on a pre-established two-stage optimization model. When realizing the collaborative optimization of the electric energy market and the frequency regulation market in the joint clearing process, in the first stage, under the optimization objectives and constraints, the clearing price of the electric energy market and the winning bid quantity of each market entity are determined; in the second stage, based on the clearing price of the electric energy market and the winning bid quantity of each market entity determined in the first stage, with the goal of optimizing the frequency regulation effect, the frequency regulation market clearing result is optimized, and the frequency regulation capacity and frequency regulation price of each frequency regulation entity are determined taking into account the real-time response of the frequency regulation resources and the frequency regulation demand of the system. The mathematical model expression is as follows:

[0022] Where, express t The electricity generation cost in the electricity energy market at that moment, express t Frequency modulation costs in the time-based frequency modulation market; The power balance constraint ensures that the power generated by the power system is equal to the load demand at every moment; The frequency modulation resource response capability constraint limits the frequency modulation capacity and response speed of each frequency modulation entity; The energy storage system operation constraints take into account the charging and discharging power and state of charge of the energy storage system.

[0023] As a preferred solution, when the market parameter adjustment and clearing cycle switching module adaptively adjusts the market parameters based on the reinforcement learning algorithm, it adjusts the key market parameters, including the market clearing cycle, frequency regulation compensation price and power generation quotation upper limit, according to the real-time market operation and simulation results; the reinforcement learning algorithm learns the optimal parameter adjustment strategy by continuously interacting with the market environment to improve the market's operating efficiency and stability.

[0024] As a preferred solution, when the market parameter adjustment and clearing cycle switching module dynamically switches the clearing cycle, clearing cycles of different lengths are selected according to actual needs: during the period when the load change is greater than the set threshold, a clearing cycle of the first length is selected; during the period when the load change is less than the set threshold, a clearing cycle of the second length is selected; wherein the first length is less than the second length.

[0025] As a preferred solution, the real-time closed-loop simulation module uses a power system model established by digital twin technology to simulate the physical characteristics and operating laws of the power system, including the dynamic characteristics of generators, transformers, transmission lines and loads; The power system model established using digital twin technology is updated by receiving real-time operating data of the actual power system, so that the established power system model is consistent with the actual system.

[0026] As a preferred solution, the real-time closed-loop simulation module simulates the operating status of the power system based on the collaborative optimization results of the electric energy market and the frequency regulation market, the adjusted market parameters and the clearing cycle after switching. When realizing real-time closed-loop simulation, the physical equipment conducts real-time data interaction, obtains the operating status and parameter information of the physical equipment in real time through the interface, and feeds back the simulation results to the physical equipment to realize real-time closed-loop simulation that combines virtual and real.

[0027] In a third aspect, an electronic device is provided, comprising a processor and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement the method for collaborative simulation of the electric energy market and the frequency regulation market.

[0028] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the method for collaborative simulation of the electric energy market and the frequency regulation market is implemented.

[0029] Compared with the prior art, the first aspect of the present invention has at least the following beneficial effects: Based on the functional requirements of power market simulation, this invention constructs a microservices architecture encompassing multiple microservices. Compared to traditional centralized architectures, this architecture allows for the convenient addition or adjustment of microservice types as needed, adapting to the increasing number of power market participants and businesses, and effectively improving the scalability and flexibility of the simulation method. Based on a pre-established two-stage optimization model, this invention achieves collaborative optimization of the energy market and the frequency regulation market during a joint clearing process. It employs a multi-market collaborative engine to support the joint clearing of the day-ahead energy and real-time frequency regulation markets. By establishing a two-stage optimization model, this invention enables multi-objective collaborative optimization. By adaptively adjusting market parameters and dynamically switching clearing cycles based on a reinforcement learning algorithm, this invention effectively improves market responsiveness and stability. This invention utilizes digital twin technology to build a power system model, supporting real-time data interaction with physical devices. This allows for accurate simulation of power system operating conditions, enabling real-time closed-loop simulation, providing a scientific basis for decision-making in power system operation and control, and improving simulation accuracy and reliability. Furthermore, by deeply exploring simulation results, this invention facilitates market participants and regulators to quickly obtain and analyze information, identify optimal market operation plans, and improve market efficiency and stability.

[0030] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. 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 any creative work.

[0032] Figure 1 Flowchart of the collaborative simulation method of the electric energy market and the frequency regulation market according to an embodiment of the present invention; Figure 2 Schematic diagram of multiple microservices built using the Spring Cloud microservice framework in an embodiment of the present invention; Figure 3 Schematic diagram of the simulation process design of an embodiment of the present invention; Figure 4 Structural block diagram of the electric energy market and frequency regulation market collaborative simulation system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0033] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0034] Existing power market simulation systems mostly target a single market (such as the energy market or frequency regulation market) and lack the ability to simulate multiple markets collaboratively. Traditional centralized architectures struggle to adapt to the dynamic demands of the power market and lack scalability and flexibility. Furthermore, they lack the ability to model the behavior of new entities (such as virtual power plants and energy storage systems) participating in multiple markets.

[0035] To this end, this application proposes a collaborative simulation method for the electric energy market and the frequency regulation market. This method builds multiple core microservices based on a microservices architecture, utilizes the Spring Cloud framework, and features a multi-market collaboration engine to achieve two-stage joint clearing. Market parameters can be adaptively adjusted, and the hybrid simulation platform utilizes digital twin modeling and real-time interaction with physical devices. The simulation process encompasses initialization, data collection, clearing, scheduling, simulation, evaluation, and iteration, enabling the joint optimization of the electric energy market and the frequency regulation market, providing a reliable basis for power market rule-making and market player decision-making.

[0036] Microservices architecture is a type of computer software architecture. It uses microservices to divide business capabilities into multiple independent services, ensuring system flexibility and scalability. Each microservice can be deployed independently and features automation, observability, fault isolation, and automatic recovery, ensuring high system availability.

[0037] See also Figure 1 The collaborative simulation method of the electric energy market and the frequency regulation market according to an embodiment of the present invention includes the following steps: S1. Build a microservice architecture covering multiple microservices based on the power market simulation function requirements; S2. Utilize a microservices architecture to jointly clear the day-ahead energy market and the real-time frequency regulation market. Based on a pre-established two-stage optimization model, achieve coordinated optimization of the energy and frequency regulation markets during the joint clearing process. S3, adaptively adjust market parameters based on reinforcement learning algorithms and dynamically switch clearing cycles; S4. Use digital twin technology to establish a power system model, and simulate the power system operation status based on the coordinated optimization results of the electricity energy market and frequency regulation market, the adjusted market parameters, and the clearing cycle after switching to achieve real-time closed-loop simulation.

[0038] In one possible implementation, the microservices architecture encompassing multiple microservices described in step S1 is built using the SpringCloud microservices framework. Spring Cloud is an open-source microservices framework based on Spring Boot that provides a complete solution for distributed systems. By integrating multiple mature open-source components, it simplifies the development, deployment, and maintenance of microservices architectures, helping developers quickly build efficient and scalable distributed systems.

[0039] See also Figure 2 , the types of microservices include: (1) User management service, which is responsible for managing the information of all types of users using the simulation system, including user registration, login, permission allocation, etc. Through strict permission management, it ensures that different users can only access and operate functions and data within their permission scope, thus ensuring the security of the system and the confidentiality of data.

[0040] (2) Data access services are responsible for connecting data from various data sources to the simulation system. These data sources include power system operation data, market transaction data, equipment parameter data, etc. Data access services need to clean, convert, and integrate data in different formats and protocols to ensure data accuracy and consistency, providing a reliable data foundation for subsequent simulation calculations.

[0041] (3) The market clearing engine analyzes and calculates market supply and demand information based on the rules and constraints of the electricity and frequency regulation markets to determine the market clearing price and the winning bids for each market player in terms of electricity and frequency regulation capacity. The market clearing engine uses advanced optimization algorithms to ensure fair, just, and efficient market clearing results.

[0042] (4) Frequency regulation performance evaluation: Real-time monitoring and evaluation of the frequency regulation performance of various entities participating in the frequency regulation market. By collecting and analyzing the response data of frequency regulation equipment, the performance indicators of frequency regulation entities such as frequency regulation accuracy, response speed, and regulation capacity are calculated to provide a reference basis for market clearing and resource scheduling.

[0043] (5) Multi-objective optimization, which comprehensively considers multiple objectives of the electricity energy market and frequency regulation market, such as maximizing social welfare, minimizing power generation costs, and optimizing frequency regulation effects. In the field of electricity markets, social welfare generally refers to maximizing the interests of all members of society through the effective operation of the electricity market, including but not limited to improving the reliability of electricity supply, reducing electricity costs, promoting the consumption of clean energy, protecting the environment, and improving the overall economic efficiency and quality of life of society. By establishing a multi-objective optimization model, the market clearing and resource scheduling schemes are optimized. Using advanced multi-objective optimization algorithms, it is possible to find the optimal balance between multiple objectives.

[0044] (6) Real-time simulation: Based on digital twin technology, a real-time simulation model of the power system is established. The real-time simulation model can simulate the operating status of the power system in real time, including power generation, transmission, distribution, and power consumption. The real-time simulation process interacts with the actual power system and updates the simulation model in real time by receiving the operating data of the actual system. At the same time, the simulation results are fed back to the actual system, realizing a real-time closed-loop simulation that combines virtual and real systems.

[0045] (7) Result analysis service: This service conducts in-depth analysis and mining of simulation results, generates various statistical reports and visualization charts, and provides decision support for market participants and regulators. The result analysis service can analyze the rationality of market clearing results, the benefits of various market players, the efficiency of frequency modulation resource utilization, etc., and help users identify problems and potential risks in market operations.

[0046] (8) Visualization service: The simulation results are presented to users in an intuitive and visual way. Through the visualization interface, users can view the operating status of the power system, market trading conditions, frequency regulation performance indicators and other information in real time. The visualization service adopts advanced graphics rendering technology and interactive design concepts, provides a user-friendly interface and convenient operation mode, allowing users to easily obtain and analyze the required information.

[0047] See also Figure 3 The simulation process of the collaborative simulation method for the electric energy market and the frequency regulation market according to the embodiment of the present invention is as follows: 1) Initialization Configuration: Before simulation begins, users must initialize the simulation system, including setting the simulation time range, selecting market rules, and entering system parameters. Once the initialization configuration is complete, the system will load the corresponding models and data based on the user's settings, preparing for simulation calculations.

[0048] 2) Data Collection and Verification: The data access service collects power system operation data, market transaction data, equipment parameter data, and other data from various data sources, and cleans, converts, and integrates the collected data. The system also verifies the accuracy and completeness of the data to ensure it meets simulation calculation requirements. If any data issues are found, the system will prompt the user to make corrections or supplements.

[0049] 3) Joint Market Clearing: The market clearing engine performs joint clearing calculations for the energy and frequency regulation markets based on user-defined market rules and collected data. During the clearing process, the multi-objective optimization module comprehensively considers multiple objectives to optimize the market clearing solution. The clearing results include information such as the winning bid volume, frequency regulation capacity, and clearing price for each market participant.

[0050] 4) Frequency Regulation Resource Scheduling: Based on market clearing results, the frequency regulation performance of each frequency regulation entity is evaluated and frequency regulation resources are dispatched accordingly. During the dispatch process, the system considers the real-time response of frequency regulation resources and the system's frequency regulation needs to ensure the rational utilization of frequency regulation resources and the stability of the system's frequency.

[0051] 5) Real-time Closed-Loop Simulation: Based on digital twin technology, a real-time simulation model of the power system is established to simulate the power system's operating status in real time. During the simulation process, the system receives real-time operating data from the actual power system, updates the simulation model, and feeds the simulation results back to the actual system. Through real-time closed-loop simulation, the system can simulate the power system's operation under different operating conditions and evaluate the effectiveness of market clearing and resource scheduling plans.

[0052] 6) Results Evaluation: The results analysis service provides in-depth analysis and evaluation of simulation results, generating various statistical reports and visualization charts. This evaluation covers the rationality of market clearing results, the profitability of various market participants, the efficiency of frequency regulation resource utilization, and the operational safety of the power system. This evaluation allows users to understand market operations and identify potential problems and risks.

[0053] 7) Parameter Optimization Iteration: Based on feedback from evaluation results, the dynamic parameter adjustment module optimizes and adjusts key market parameters. These optimized parameters serve as input for the next simulation, which then undergoes joint market clearing, frequency modulation resource scheduling, and real-time closed-loop simulation, forming a closed-loop simulation optimization process. Through continuous iterative optimization, the system gradually finds the optimal market operation solution, improving its efficiency and stability.

[0054] In one possible implementation, when step S2 utilizes a microservice architecture to jointly clear the day-ahead electricity energy market and the real-time frequency regulation market, in the day-ahead stage, the electricity energy market and the frequency regulation market are jointly optimized based on the bids submitted by market participants and the predicted load demand, and the winning bid power and frequency regulation capacity of each market player are determined; in the real-time stage, the market clearing results are adjusted in real time based on actual load changes and frequency regulation demands.

[0055] In one possible implementation, step S2 is based on a pre-established two-stage optimization model, and achieving coordinated optimization of the electric energy market and the frequency regulation market in the joint clearing process includes: In the first stage, the clearing price of the electricity market and the winning bid amount of each market player are determined based on the optimization objectives and constraints. The constraints include power balance constraints, frequency regulation resource response capacity constraints, and energy storage system operation constraints. In the second stage, based on the clearing price of the electric energy market determined in the first stage and the winning bids of each market player, with the goal of optimizing the frequency regulation effect, the real-time response of the frequency regulation resources and the frequency regulation needs of the system are taken into consideration. The frequency regulation capacity and price of each frequency regulation player are determined. The mathematical model is expressed as follows:

[0056] Where, express t The electricity generation cost in the electricity energy market at that moment, express t Frequency modulation costs in the time-based frequency modulation market; The power balance constraint ensures that the power generated by the power system is equal to the load demand at every moment; The frequency modulation resource response capability constraint limits the frequency modulation capacity and response speed of each frequency modulation entity; The energy storage system operation constraints take into account the charging and discharging power and state of charge of the energy storage system.

[0057] In one possible implementation, step S3 of adaptively adjusting market parameters based on a reinforcement learning algorithm includes: According to the real-time market operation and simulation results, key market parameters such as market clearing cycle, frequency regulation compensation price, and power generation quotation ceiling are adjusted; the reinforcement learning algorithm continuously interacts with the market environment to learn the optimal parameter adjustment strategy to improve the market's operating efficiency and stability.

[0058] In a possible implementation, step S3 dynamically switching the clearing cycle includes: Users can choose a 5-minute or 15-minute clearing cycle based on their needs. During periods of high load fluctuations, shorter clearing cycles can be selected to improve market responsiveness and regulatory capacity; during periods of low load fluctuations, longer clearing cycles can be selected to reduce market transaction costs and computational complexity.

[0059] In one possible implementation, the power system model established using digital twin technology in step S4 can simulate the physical characteristics and operating patterns of the power system, including the dynamic characteristics of generators, transformers, transmission lines, and loads. The power system model established using digital twin technology is updated by receiving real-time operating data from the actual power system, ensuring that the established power system model remains consistent with the actual system.

[0060] In one possible implementation, step S4 supports real-time data exchange between physical devices. Through interfaces, the simulation system can obtain real-time information about the operating status and parameters of physical devices, and simultaneously feed the simulation results back to the physical devices, achieving a real-time closed-loop simulation that integrates virtual and real systems. This real-time data exchange improves simulation accuracy and reliability, providing a more scientific basis for decision-making regarding power system operation and control.

[0061] The collaborative simulation method of the electric energy market and the frequency regulation market according to the embodiment of the present invention has the following advantages: 1) Flexible and scalable architecture: The distributed system is built based on the Spring Cloud microservice framework. Compared with the traditional centralized architecture, microservice modules can be easily added or adjusted according to needs, adapting to the increasing number of power market entities and businesses, and effectively improving the scalability and flexibility of the system.

[0062] 2) Multi-market collaborative optimization: A two-stage market collaborative clearing mechanism is proposed to achieve joint optimization of the electricity energy market and the frequency regulation market, comprehensively considering multiple objectives to ensure that the market clearing results are fair, just and efficient, and can better balance social welfare, power generation costs and frequency regulation effects.

[0063] 3) Dynamic parameter adaptation: Using reinforcement learning algorithms, key market parameters can be automatically adjusted according to real-time market conditions and simulation results. It also supports dynamic switching of clearing cycles to enhance market response speed and stability.

[0064] 4) Virtual-reality fusion simulation: The hybrid simulation platform uses digital twin modeling and supports real-time data interaction with physical equipment. It can accurately simulate the operating status of the power system and realize real-time closed-loop simulation, providing a scientific decision-making basis for power system operation and control, and improving the accuracy and reliability of simulation.

[0065] 5) Efficient result analysis and presentation: The result analysis service can deeply explore simulation results, generate statistical reports and visual charts, and the visualization service provides an intuitive and user-friendly interface, making it easy for market participants and regulators to quickly obtain and analyze information and assist in decision-making.

[0066] See also Figure 4 Another embodiment of the present invention further provides a collaborative simulation system for an electric energy market and a frequency regulation market, including: A microservice architecture building module 401 is used to build a microservice architecture covering multiple microservices according to the power market simulation function requirements; Collaborative optimization module 402 is used to perform joint clearing of the day-ahead electric energy market and the real-time frequency regulation market using a microservice architecture, and to achieve collaborative optimization of the electric energy market and the frequency regulation market during the joint clearing process based on a pre-established two-stage optimization model; Market parameter adjustment and clearing cycle switching module 403, used to adaptively adjust market parameters based on reinforcement learning algorithm and dynamically switch clearing cycles; The real-time closed-loop simulation module 404 is used to establish a power system model using digital twin technology, and simulate the operating status of the power system based on the collaborative optimization results of the electric energy market and the frequency regulation market, the adjusted market parameters, and the clearing cycle after switching to achieve real-time closed-loop simulation.

[0067] In one possible implementation, the microservice architecture establishment module 401 uses the Spring Cloud microservice framework to build a microservice architecture covering multiple microservices; Types of microservices include: User management service is responsible for managing various types of user information, including user registration, login, and permission allocation. Through permission management, different users can only access and operate functions and data within the corresponding permission range; Data access services connect data from various data sources to simulation tasks. Data sources include power system operation data, market transaction data, and equipment parameter data. Data access services clean, convert, and integrate data in different formats or protocols. The market clearing engine analyzes and calculates supply and demand information in the market according to the rules and constraints of the electricity energy market and frequency regulation market, and determines the market clearing price and the winning bids for electricity and frequency regulation capacity of each market player; Frequency regulation performance evaluation: Real-time monitoring and evaluation of the frequency regulation performance of various entities participating in the frequency regulation market. By collecting and analyzing the response data of frequency regulation equipment, the performance indicators of frequency regulation entities are calculated to provide a reference basis for market clearing and resource scheduling. Multi-objective optimization: comprehensively considers multiple objectives of the electricity energy market and frequency regulation market, and optimizes market clearing and resource scheduling plans by establishing a multi-objective optimization model; Real-time simulation: Based on digital twin technology, a real-time simulation model of the power system is established to simulate the operating status of the power system, interact with the actual power system, and update the real-time simulation model in real time by receiving the operating data of the actual system. At the same time, the simulation results are fed back to the actual system to achieve real-time closed-loop simulation that combines virtual and real systems. Result analysis service: analyzes and mines simulation results, generates statistical reports and visual charts, and provides decision support for market participants and regulators; Visualization service displays simulation results in an intuitive and visual way.

[0068] In a possible implementation, the simulation system of the embodiment of the present invention performs initialization configuration before the simulation begins, including setting the simulation time range, selecting market rules, and inputting system parameters; Data access services collect power system operation data, market transaction data, and equipment parameter data from various data sources, and clean, convert, and integrate the collected data; verify the accuracy and completeness of the data; The market clearing engine performs joint clearing calculations for the electricity energy market and the frequency regulation market based on user-defined market rules and collected data. During the clearing process, multi-objective optimization comprehensively considers multiple objectives to optimize the market clearing solution. The clearing results include the winning bid amount, frequency regulation capacity, and clearing price of each market player. Based on the market clearing results, the frequency regulation performance of each frequency regulation entity is evaluated, and frequency regulation resources are dispatched based on the evaluation results. The scheduling process takes into account the real-time response of frequency regulation resources and the frequency regulation needs of the system; A real-time simulation model of the power system is established based on digital twin technology to simulate the power system's operating status in real time. During the simulation process, the actual power system operating data is received in real time, the real-time simulation model is updated, and the simulation results are fed back to the actual system. Through real-time closed-loop simulation, the operation of the power system under different operating conditions is simulated to evaluate the effectiveness of market clearing and resource scheduling plans. The result analysis service analyzes and evaluates the simulation results, including the rationality of the market clearing results, the benefits of each market player, the efficiency of frequency regulation resource utilization, and the operational safety of the power system. Based on the feedback information from the analysis and evaluation of simulation results, the key parameters of the market are optimized and adjusted as the input for the next simulation, forming a closed-loop simulation optimization process; through iterative optimization, the optimal market operation plan is found.

[0069] In one possible implementation, when the collaborative optimization module 402 uses a microservice architecture to jointly clear the day-ahead electric energy market and the real-time frequency regulation market, in the day-ahead stage, the electric energy market and the frequency regulation market are jointly optimized based on the quotations submitted by market participants and the predicted load demand, and the winning bid electricity and frequency regulation capacity of each market player are determined; in the real-time stage, the market clearing results are adjusted in real time based on actual load changes and frequency regulation demands.

[0070] In one possible implementation, the collaborative optimization module 402 implements collaborative optimization of the electric energy market and the frequency regulation market in a joint clearing process based on a pre-established two-stage optimization model. In the first stage, the clearing price of the electric energy market and the winning bid amount of each market entity are determined under the optimization objectives and constraints. In the second stage, based on the clearing price of the electric energy market and the winning bid amount of each market entity determined in the first stage, the frequency regulation market clearing results are optimized with the goal of optimizing the frequency regulation effect, taking into account the real-time response of the frequency regulation resources and the frequency regulation requirements of the system, and the frequency regulation capacity and frequency regulation price of each frequency regulation entity are determined. The mathematical model expression is as follows:

[0071] Where, express t The electricity generation cost in the electricity energy market at that moment, express t Frequency modulation costs in the time-based frequency modulation market; The power balance constraint ensures that the power generated by the power system is equal to the load demand at every moment; The frequency modulation resource response capability constraint limits the frequency modulation capacity and response speed of each frequency modulation entity; The energy storage system operation constraints take into account the charging and discharging power and state of charge of the energy storage system.

[0072] In one possible implementation, when the market parameter adjustment and clearing cycle switching module 403 adaptively adjusts market parameters based on the reinforcement learning algorithm, it adjusts key market parameters, including the market clearing cycle, frequency regulation compensation price, and power generation quotation upper limit, according to the real-time market operation and simulation results; the reinforcement learning algorithm continuously interacts with the market environment to learn the optimal parameter adjustment strategy to improve the market's operating efficiency and stability.

[0073] In one possible implementation, the market parameter adjustment and clearing cycle switching module 403 selects clearing cycles of different lengths according to actual needs when dynamically switching clearing cycles: in a period when the load change is greater than a set threshold, a clearing cycle of the first length is selected; in a period when the load change is less than the set threshold, a clearing cycle of the second length is selected; wherein the first length is less than the second length.

[0074] In one possible implementation, the real-time closed-loop simulation module 404 uses digital twin technology to establish a power system model that can simulate the physical characteristics and operating laws of the power system, including the dynamic characteristics of generators, transformers, transmission lines and loads; the power system model established using digital twin technology is updated by receiving real-time operating data of the actual power system, so that the established power system model is consistent with the actual system.

[0075] In one possible implementation, the real-time closed-loop simulation module 404 simulates the operating status of the power system based on the collaborative optimization results of the electric energy market and the frequency regulation market, the adjusted market parameters, and the clearing cycle after switching. When implementing real-time closed-loop simulation, physical devices perform real-time data interaction, obtain the operating status and parameter information of the physical devices in real time through the interface, and feed back the simulation results to the physical devices to achieve real-time closed-loop simulation that combines virtual and real.

[0076] Another embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement the method for collaborative simulation of the electric energy market and the frequency regulation market.

[0077] Another embodiment of the present invention further proposes a computer-readable storage medium, which stores at least one instruction. When the at least one instruction is executed by a processor, it implements the collaborative simulation method of the electric energy market and the frequency regulation market.

[0078] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium that can carry the computer program code. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals. For ease of explanation, the above content only shows the part related to the embodiment of the present invention. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. The computer-readable storage medium is non-transitory and can be stored in a storage device formed by various electronic devices, and can implement the execution process recorded in the method of the embodiment of the present invention.

[0079] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0080] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0081] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0082] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.

Claims

1. A collaborative simulation method for electric energy market and frequency regulation market, characterized in that: include: Build a microservice architecture covering multiple microservices based on the power market simulation function requirements; Utilize a microservices architecture to jointly clear the day-ahead energy market and the real-time frequency regulation market. Based on a pre-established two-stage optimization model, achieve collaborative optimization of the energy and frequency regulation markets during the joint clearing process. Adaptively adjust market parameters based on reinforcement learning algorithms and dynamically switch clearing cycles; Digital twin technology is used to establish a power system model, and based on the collaborative optimization results of the electricity energy market and the frequency regulation market, the adjusted market parameters, and the clearing cycle after switching, the power system operation status is simulated to achieve real-time closed-loop simulation.

2. The collaborative simulation method of the electric energy market and the frequency regulation market according to claim 1 is characterized in that: The microservice architecture covering multiple microservices is built using the Spring Cloud microservice framework. The types of microservices include: User management service is responsible for managing various types of user information, including user registration, login, and permission allocation. Through permission management, different users can only access and operate functions and data within the corresponding permission range; Data access services connect data from various data sources to simulation tasks. Data sources include power system operation data, market transaction data, and equipment parameter data. Data access services clean, convert, and integrate data in different formats or protocols. The market clearing engine analyzes and calculates supply and demand information in the market according to the rules and constraints of the electricity energy market and frequency regulation market, and determines the market clearing price and the winning bids for electricity and frequency regulation capacity of each market player; Frequency regulation performance evaluation: Real-time monitoring and evaluation of the frequency regulation performance of various entities participating in the frequency regulation market. By collecting and analyzing the response data of frequency regulation equipment, the performance indicators of frequency regulation entities are calculated to provide a reference basis for market clearing and resource scheduling. Multi-objective optimization: comprehensively considers multiple objectives of the electricity energy market and frequency regulation market, and optimizes market clearing and resource scheduling plans by establishing a multi-objective optimization model; Real-time simulation: Based on digital twin technology, a real-time simulation model of the power system is established to simulate the operating status of the power system, interact with the actual power system, and update the real-time simulation model in real time by receiving the operating data of the actual system. At the same time, the simulation results are fed back to the actual system to achieve real-time closed-loop simulation that combines virtual and real systems. Result analysis service: analyzes and mines simulation results, generates statistical reports and visual charts, and provides decision support for market participants and regulators; Visualization service displays simulation results in an intuitive and visual way.

3. The collaborative simulation method of the electric energy market and the frequency regulation market according to claim 2 is characterized in that: Perform initial configuration before simulation begins, including setting simulation time range, selecting market rules, and entering system parameters; Data access services collect power system operation data, market transaction data, and equipment parameter data from various data sources, and clean, convert, and integrate the collected data; verify the accuracy and completeness of the data; The market clearing engine performs joint clearing calculations for the electricity energy market and the frequency regulation market based on user-defined market rules and collected data. During the clearing process, multi-objective optimization comprehensively considers multiple objectives to optimize the market clearing solution. The clearing results include the winning bid amount, frequency regulation capacity, and clearing price of each market player. Based on the market clearing results, the frequency regulation performance of each frequency regulation entity is evaluated, and frequency regulation resources are dispatched based on the evaluation results. The scheduling process takes into account the real-time response of frequency regulation resources and the frequency regulation needs of the system; Establish a real-time simulation model of the power system based on digital twin technology to simulate the operating status of the power system in real time; During the simulation process, the operating data of the actual power system is received in real time, the real-time simulation model is updated, and the simulation results are fed back to the actual system; Through real-time closed-loop simulation, simulate the operation of the power system under different working conditions and evaluate the effectiveness of market clearing and resource scheduling plans; The result analysis service analyzes and evaluates the simulation results, including the rationality of the market clearing results, the benefits of each market player, the efficiency of frequency regulation resource utilization, and the operational safety of the power system. Based on the feedback from simulation result analysis and evaluation, key market parameters are optimized and adjusted, which serves as input for the next simulation, forming a closed-loop simulation optimization process. Through iterative optimization, find the optimal market operation plan.

4. The collaborative simulation method of the electric energy market and the frequency regulation market according to claim 1 is characterized in that: In the step of using the microservice architecture to jointly clear the day-ahead electric energy market and the real-time frequency regulation market, at the day-ahead stage, the electric energy market and the frequency regulation market are jointly optimized based on the bids submitted by market participants and the predicted load demand to determine the winning bid amount and frequency regulation capacity of each market entity; In the real-time stage, the market clearing results are adjusted in real time according to the actual load changes and frequency regulation requirements.

5. The collaborative simulation method of the electric energy market and the frequency regulation market according to claim 1 is characterized in that: The collaborative optimization of the electric energy market and the frequency regulation market in the joint clearing process based on the pre-established two-stage optimization model includes: In the first stage, the clearing price of the electric energy market and the winning bid amount of each market player are determined under the optimization objectives and constraints. In the second stage, based on the clearing price of the electric energy market and the winning bid amount of each market player determined in the first stage, with the goal of optimizing the frequency regulation effect, the clearing results of the frequency regulation market are optimized, and the frequency regulation capacity and price of each frequency regulation player are determined, taking into account the real-time response of the frequency regulation resources and the frequency regulation needs of the system. The mathematical model expression is as follows: Where, express t The electricity generation cost in the electricity energy market at that moment, express t Frequency modulation costs in the time-based frequency modulation market; The power balance constraint ensures that the power generated by the power system is equal to the load demand at every moment; The frequency modulation resource response capability constraint limits the frequency modulation capacity and response speed of each frequency modulation entity; The energy storage system operation constraints take into account the charging and discharging power and state of charge of the energy storage system.

6. The collaborative simulation method of the electric energy market and the frequency regulation market according to claim 1 is characterized in that: The steps of adaptively adjusting market parameters based on the reinforcement learning algorithm include: adjusting key market parameters, including the market clearing cycle, frequency regulation compensation price, and power generation quotation ceiling, according to the real-time market operation status and simulation results; and the reinforcement learning algorithm continuously interacts with the market environment to learn the optimal parameter adjustment strategy to improve the market's operating efficiency and stability.

7. The collaborative simulation method of the electric energy market and the frequency regulation market according to claim 1 is characterized in that: The step of dynamically switching the clearing cycle includes selecting clearing cycles of different lengths according to actual needs: During the period when the load change is greater than the set threshold, a clearing cycle of the first length is selected; during the period when the load change is less than the set threshold, a clearing cycle of the second length is selected; wherein the first length is less than the second length.

8. The method for collaborative simulation of the electric energy market and the frequency regulation market according to claim 1, characterized in that: The power system model established using digital twin technology can simulate the physical characteristics and operating laws of the power system, including the dynamic characteristics of generators, transformers, transmission lines and loads; the power system model established using digital twin technology is updated by receiving the operating data of the actual power system in real time, so that the established power system model is consistent with the actual system.

9. The method for collaborative simulation of the electric energy market and the frequency regulation market according to claim 1, characterized in that: In the step of simulating the operating status of the power system and realizing real-time closed-loop simulation based on the collaborative optimization results of the electric energy market and the frequency regulation market, the adjusted market parameters and the clearing cycle after switching, physical devices perform real-time data interaction, obtain the operating status and parameter information of the physical devices in real time through the interface, and feed back the simulation results to the physical devices to realize real-time closed-loop simulation combining virtual and real.

10. A collaborative simulation system for electric energy market and frequency regulation market, characterized in that: include: A microservice architecture building module is used to build a microservice architecture covering multiple microservices based on the functional requirements of the power market simulation; A collaborative optimization module is used to jointly clear the day-ahead energy market and the real-time frequency regulation market using a microservices architecture. Based on a pre-established two-stage optimization model, it achieves collaborative optimization of the energy market and the frequency regulation market during the joint clearing process. Market parameter adjustment and clearing cycle switching module, used to adaptively adjust market parameters based on reinforcement learning algorithms and dynamically switch clearing cycles; The real-time closed-loop simulation module is used to establish a power system model using digital twin technology, and simulate the operating status of the power system based on the coordinated optimization results of the electric energy market and the frequency regulation market, the adjusted market parameters, and the clearing cycle after switching, to achieve real-time closed-loop simulation.

11. The electric energy market and frequency regulation market collaborative simulation system according to claim 10, characterized in that: The microservice architecture building module uses the Spring Cloud microservice framework to build a microservice architecture covering multiple microservices; Types of microservices include: User management service is responsible for managing various types of user information, including user registration, login, and permission allocation. Through permission management, different users can only access and operate functions and data within the corresponding permission range; Data access services connect data from various data sources to simulation tasks. Data sources include power system operation data, market transaction data, and equipment parameter data. Data access services clean, convert, and integrate data in different formats or protocols. The market clearing engine analyzes and calculates supply and demand information in the market according to the rules and constraints of the electricity energy market and frequency regulation market, and determines the market clearing price and the winning bids for electricity and frequency regulation capacity of each market player; Frequency regulation performance evaluation: Real-time monitoring and evaluation of the frequency regulation performance of various entities participating in the frequency regulation market. By collecting and analyzing the response data of frequency regulation equipment, the performance indicators of frequency regulation entities are calculated to provide a reference basis for market clearing and resource scheduling. Multi-objective optimization: comprehensively considers multiple objectives of the electricity energy market and frequency regulation market, and optimizes market clearing and resource scheduling plans by establishing a multi-objective optimization model; Real-time simulation: Based on digital twin technology, a real-time simulation model of the power system is established to simulate the operating status of the power system, interact with the actual power system, and update the real-time simulation model in real time by receiving the operating data of the actual system. At the same time, the simulation results are fed back to the actual system to achieve real-time closed-loop simulation that combines virtual and real systems. Result analysis service: analyzes and mines simulation results, generates statistical reports and visual charts, and provides decision support for market participants and regulators; Visualization service displays simulation results in an intuitive and visual way.

12. The electric energy market and frequency regulation market collaborative simulation system according to claim 11, characterized in that: Perform initial configuration before simulation begins, including setting simulation time range, selecting market rules, and entering system parameters; Data access services collect power system operation data, market transaction data, and equipment parameter data from various data sources, and clean, convert, and integrate the collected data; verify the accuracy and completeness of the data; The market clearing engine performs joint clearing calculations for the electricity energy market and the frequency regulation market based on user-defined market rules and collected data. During the clearing process, multi-objective optimization comprehensively considers multiple objectives to optimize the market clearing solution. The clearing results include the winning bid amount, frequency regulation capacity, and clearing price of each market player. Based on the market clearing results, the frequency regulation performance of each frequency regulation entity is evaluated, and frequency regulation resources are dispatched based on the evaluation results. The scheduling process takes into account the real-time response of frequency regulation resources and the frequency regulation needs of the system; Establish a real-time simulation model of the power system based on digital twin technology to simulate the operating status of the power system in real time; During the simulation process, the operating data of the actual power system is received in real time, the real-time simulation model is updated, and the simulation results are fed back to the actual system; Through real-time closed-loop simulation, simulate the operation of the power system under different working conditions and evaluate the effectiveness of market clearing and resource scheduling plans; The result analysis service analyzes and evaluates the simulation results, including the rationality of the market clearing results, the benefits of each market player, the efficiency of frequency regulation resource utilization, and the operational safety of the power system. Based on the feedback from simulation result analysis and evaluation, key market parameters are optimized and adjusted, which serves as input for the next simulation, forming a closed-loop simulation optimization process. Through iterative optimization, find the optimal market operation plan.

13. The electric energy market and frequency regulation market collaborative simulation system according to claim 10, characterized in that: When the collaborative optimization module uses the microservice architecture to jointly clear the day-ahead electric energy market and the real-time frequency regulation market, in the day-ahead phase, it jointly optimizes the electric energy market and the frequency regulation market based on the bids submitted by market participants and the predicted load demand, and determines the winning bid power and frequency regulation capacity of each market player; In the real-time stage, the market clearing results are adjusted in real time according to the actual load changes and frequency regulation requirements.

14. The electric energy market and frequency regulation market collaborative simulation system according to claim 10, characterized in that: The collaborative optimization module is based on a pre-established two-stage optimization model. When realizing the collaborative optimization of the electric energy market and the frequency regulation market in the joint clearing process, in the first stage, under the optimization objectives and constraints, the clearing price of the electric energy market and the winning bid volume of each market player are determined. In the second stage, based on the clearing price of the electric energy market determined in the first stage and the winning bids of each market player, with the goal of optimizing the frequency regulation effect, the real-time response of the frequency regulation resources and the frequency regulation needs of the system are taken into consideration. The frequency regulation capacity and price of each frequency regulation player are determined. The mathematical model is expressed as follows: Where, express t The electricity generation cost in the electricity energy market at that moment, express t Frequency modulation costs in the time-based frequency modulation market; The power balance constraint ensures that the power generated by the power system is equal to the load demand at every moment; The frequency modulation resource response capability constraint limits the frequency modulation capacity and response speed of each frequency modulation entity; The energy storage system operation constraints take into account the charging and discharging power and state of charge of the energy storage system.

15. The electric energy market and frequency regulation market collaborative simulation system according to claim 10, characterized in that: The market parameter adjustment and clearing cycle switching module adaptively adjusts market parameters based on the reinforcement learning algorithm, and adjusts key market parameters including the market clearing cycle, frequency regulation compensation price and power generation quotation ceiling according to the real-time market operation and simulation results; Reinforcement learning algorithms learn the optimal parameter adjustment strategy by continuously interacting with the market environment to improve the operating efficiency and stability of the market.

16. The electric energy market and frequency regulation market collaborative simulation system according to claim 10, characterized in that: When the market parameter adjustment and clearing cycle switching module dynamically switches the clearing cycle, clearing cycles of different lengths are selected according to actual needs: during the period when the load change is greater than the set threshold, a clearing cycle of the first length is selected; during the period when the load change is less than the set threshold, a clearing cycle of the second length is selected; wherein the first length is less than the second length.

17. The electric energy market and frequency regulation market collaborative simulation system according to claim 10, characterized in that: The real-time closed-loop simulation module uses digital twin technology to build a power system model that can simulate the physical characteristics and operating laws of the power system, including the dynamic characteristics of generators, transformers, transmission lines and loads; The power system model established using digital twin technology is updated by receiving real-time operating data of the actual power system, so that the established power system model is consistent with the actual system.

18. The electric energy market and frequency regulation market collaborative simulation system according to claim 10, characterized in that: The real-time closed-loop simulation module simulates the operating status of the power system based on the collaborative optimization results of the electric energy market and the frequency regulation market, the adjusted market parameters, and the clearing cycle after switching. When realizing real-time closed-loop simulation, physical devices perform real-time data interaction, obtain the operating status and parameter information of the physical devices in real time through the interface, and feed back the simulation results to the physical devices, realizing real-time closed-loop simulation that combines virtual and real.

19. An electronic device, characterized in that: The system comprises a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the collaborative simulation method of the electric energy market and the frequency regulation market as claimed in any one of claims 1 to 9.

20. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the electric energy market and frequency regulation market collaborative simulation method according to any one of claims 1 to 9 is implemented.