Gas power generation and heat supply collaborative optimization method and system based on particle swarm optimization

Through the collaborative optimization method based on particle swarm algorithm, the resource allocation problem of gas power generation and heating system in a dynamic environment was solved, and efficient, stable and flexible collaborative optimization of the system was achieved, thereby improving the utilization efficiency and operation efficiency of gas energy.

CN120688672AInactive Publication Date: 2025-09-23JINCHENG LANYAN COAL IND CO LTD CO LTD CHENGZHUANG MINE
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202510678129.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-09-23
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN120688672A_ABST
    Figure CN120688672A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of collaborative optimization, and discloses a gas power generation and heat supply collaborative optimization method and system based on a particle swarm algorithm. The method comprises the following steps: acquiring and preprocessing operation parameters of the gas power generation and heat supply system to obtain state characterization data, constructing gas resource limitation and equipment operation constraints based on the data, and generating an optimization objective function; importing the optimized objective function into a particle swarm algorithm for initialization to obtain an initial particle set; a particle swarm is evolved through a search operation based on a gas energy critical path, near-end strategy optimization is carried out, particle swarm parameters are dynamically adjusted, and a target configuration scheme is obtained. And finally, establishing a multi-level cooperative control structure, executing hierarchical scheduling, and generating a cooperative optimization control instruction. The gas power generation and heat supply system is subjected to collaborative optimization control through an intelligent optimization algorithm, the influence of dynamic factors such as gas concentration fluctuation and energy demand change is overcome, and efficient utilization of gas energy is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of collaborative optimization technology, and in particular to a method and system for collaborative optimization of gas power generation and heat supply based on a particle swarm algorithm. Background Art

[0002] Gas power generation and heating systems are crucial components of safe coal mine production and clean energy utilization. Traditional coal mine gas treatment primarily involves venting or direct combustion, which not only wastes energy but also generates significant greenhouse gas emissions. With technological advancements, coupled gas power generation and heating technologies have gained widespread application. This technology converts gas into electricity through internal combustion engines or gas turbines, and recovers waste heat generated during the power generation process for heating in the mine area, achieving comprehensive utilization of gas resources. Currently, control methods for gas power generation and heating systems primarily include manual adjustment based on experience, single-loop control based on PID, and multi-loop control based on fuzzy control. These methods have significantly improved gas utilization efficiency and system operational safety.

[0003] However, existing technologies for coordinated control of gas-fired power generation and heating have significant shortcomings. First, traditional control methods lack the ability to effectively respond to dynamic factors such as gas concentration fluctuations and load changes, making it impossible to achieve global system optimization. Second, existing control strategies are generally static and cannot adapt to changes in the operating environment, resulting in low system efficiency. Third, traditional control methods ignore the coupling characteristics of gas-fired power generation and heating systems, controlling each subsystem independently and lacking a coordinated optimization mechanism. Finally, most existing control systems use a single-cycle control method, which cannot simultaneously address both long-term planning and short-term scheduling requirements of the system, resulting in suboptimal overall system operation. Summary of the Invention

[0004] The present application provides a method and system for collaborative optimization of gas power generation and heating based on particle swarm optimization, which is used to use intelligent optimization algorithms to collaboratively optimize and control gas power generation and heating systems, overcome the influence of dynamic factors such as gas concentration fluctuations and changes in energy demand, and achieve efficient utilization of gas energy.

[0005] In the first aspect, the present application provides a collaborative optimization method for gas power generation and heat supply based on a particle swarm algorithm, and the collaborative optimization method for gas power generation and heat supply based on a particle swarm algorithm includes: collecting and preprocessing the operating parameters of the gas power generation and heat supply system to obtain state characterization data; constructing gas resource limitations and energy equipment operating constraints based on the state characterization data to generate an optimization objective function; importing the optimization objective function into the particle swarm algorithm for group initialization to obtain an initial particle set that characterizes the gas resource allocation scheme; applying a search operation based on the critical path of gas energy to the initial particle set to obtain an evolved particle swarm; performing proximal strategy optimization analysis based on the evolved particle swarm, dynamically adjusting the particle swarm parameters, and obtaining a target configuration scheme; establishing a multi-level collaborative control structure based on the target configuration scheme, performing hierarchical scheduling on the gas power generation and heat supply system, and obtaining collaborative optimization control instructions.

[0006] In a second aspect, the present application provides a gas power generation and heating collaborative optimization system based on a particle swarm algorithm, the gas power generation and heating collaborative optimization system based on a particle swarm algorithm comprising: The acquisition module is used to collect and pre-process the operating parameters of the gas power generation and heating system to obtain state representation data; A construction module, configured to construct gas resource limitations and energy equipment operation constraints based on the state characterization data, and generate an optimization objective function; An import module is used to import the optimization objective function into the particle swarm algorithm to initialize the group and obtain an initial particle set representing the gas resource allocation plan; A search module, configured to apply a search operation based on a gas energy critical path to the initial particle set to obtain an evolved particle swarm; An analysis module, configured to perform proximal strategy optimization analysis based on the evolving particle swarm, dynamically adjust the particle swarm parameters, and obtain a target configuration solution; The scheduling module is used to establish a multi-level collaborative control structure according to the target configuration scheme, perform hierarchical scheduling on the gas power generation and heating systems, and obtain collaborative optimization control instructions.

[0007] In a third aspect, a gas power generation and heat supply collaborative optimization device based on a particle swarm algorithm is provided, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the gas power generation and heat supply collaborative optimization device based on the particle swarm algorithm executes the above-mentioned gas power generation and heat supply collaborative optimization method based on the particle swarm algorithm.

[0008] In a fourth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, which, when executed on a computer, enables the computer to execute the above-mentioned particle swarm algorithm-based collaborative optimization method for gas power generation and heat supply.

[0009] In the technical solution provided in this application, by collecting and preprocessing the operating parameters of the gas power generation and heating system, combined with distributed sensor networks and data cleaning technology, the present invention effectively solves the problems of data anomalies and dimensional differences, realizes data standardization processing, and ensures the accuracy and consistency of data in the optimization process.

[0010] Building on this foundation, leveraging the adaptive optimization capabilities of the particle swarm algorithm (PSO), the present invention can automatically search for the optimal allocation of gas flow, power generation, and heating load under complex constraints. Compared to traditional optimization methods, the PSO is capable of handling nonlinear constraints and multi-objective optimization problems. Given limited gas resources, it maximizes the overall efficiency of energy utilization and significantly reduces system operating costs and environmental impact. A search operation based on the critical path of gas energy effectively addresses the problem of optimizing resource flow paths. By evolving the initial particle set, the present invention identifies the critical path from gas collection to energy output and, through the design of a series of optimization operations (such as gas purification and distribution optimization), improves the overall efficiency of the energy conversion process. Combined with the evolutionary properties of the PSO, the particle swarm continuously approaches the global optimal solution as the iterative process proceeds, ensuring continuous optimization and stability of the system.

[0011] This AI-based optimization approach, particularly in the complex environment of energy production and utilization, demonstrates the immense value of the algorithmic features in contributing to the overall solution, further enhancing the system's flexibility and adaptability. The multi-level collaborative control structure enables the system to precisely allocate resources, adjust gas flow and heating loads, and achieve efficient collaboration among subsystems through hierarchical scheduling at the strategic, tactical, and execution levels. This hierarchical scheduling can adjust to real-time load changes and gas production fluctuations, ensuring efficient system operation across different time periods and load conditions, while maximizing energy utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0013] Figure 1This is a schematic diagram of an embodiment of a method for collaborative optimization of gas power generation and heat supply based on a particle swarm algorithm in an embodiment of the present application; Figure 2 This is a schematic diagram of an embodiment of a gas power generation and heat supply collaborative optimization system based on a particle swarm algorithm in an embodiment of the present application; Figure 3 It is a schematic block diagram of the structure of a gas power generation and heat supply collaborative optimization device based on a particle swarm algorithm in an embodiment of the present invention. DETAILED DESCRIPTION

[0014] The embodiments of the present application provide a method and system for collaborative optimization of gas power generation and heat supply based on a particle swarm algorithm. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or that are inherent to these processes, methods, products or devices.

[0015] For ease of understanding, the specific process of the embodiment of the present application is described below. Figure 1 In the embodiment of the present application, an embodiment of the gas power generation and heat supply collaborative optimization method based on the particle swarm algorithm includes: Step S101: collecting and preprocessing the operating parameters of the gas power generation and heating system to obtain state representation data; Step S102: constructing gas resource limitations and energy equipment operation constraints based on the state characterization data, and generating an optimization objective function; Step S103: importing the optimization objective function into the particle swarm algorithm to initialize the swarm and obtain an initial particle set representing the gas resource allocation scheme; Step S104: applying a search operation based on the gas energy critical path to the initial particle set to obtain an evolved particle swarm; Step S105: Perform proximal strategy optimization analysis based on the evolving particle swarm, dynamically adjust the particle swarm parameters, and obtain a target configuration solution; Step S106: Establish a multi-level collaborative control structure according to the target configuration plan, perform hierarchical scheduling on the gas power generation and heating systems, and obtain collaborative optimization control instructions.

[0016] It is understandable that the execution subject of this application can be a gas power generation and heat supply collaborative optimization system based on particle swarm algorithm, or a terminal or server, which is not limited here. The embodiment of this application is described by taking the server as the execution subject as an example.

[0017] Specifically, the operating parameters of the gas-fired power generation and heating system are collected and preprocessed to generate state representation data. Specifically, key operating parameters such as gas flow, gas concentration, gas pressure, generator power, and heating load are collected in real time via a distributed sensor network to generate raw operating data. Outlier detection is performed on this raw operating data to remove data points that exceed specified thresholds to ensure data quality. The cleaned data is then standardized, mapping parameters of different dimensions to a specified range to generate standardized data. Based on the standardized data, a dual structure of gas characteristic coding and energy demand coding is constructed to generate a state representation matrix. Time series feature extraction is performed on this matrix, analyzing the trend, periodic, and random terms of the operating parameters to generate a dynamic feature vector. Finally, the dynamic feature vector is fused with the standardized data, and dimensionality reduction and feature selection are performed to generate state representation data. Based on the state representation data, gas concentration, gas flow, and gas pressure parameters are extracted to construct a set of gas resource constraints, clarifying the available range of gas resources. Furthermore, the state representation data is used to analyze the generator power range, heating load range, and equipment temperature and pressure limits to establish a set of equipment operating constraints. A safety analysis is performed on gas resource limitations and energy equipment operation constraints to establish safety production constraints and environmental emission constraints, forming a comprehensive constraint condition. Based on the comprehensive constraint condition, energy utilization efficiency evaluation indicators are defined. The energy balance principle is applied to calculate the comprehensive gas energy utilization efficiency function, resulting in an efficiency target item. Based on the efficiency target item, a system operation cost function and an environmental impact function are then constructed, combining fuel costs, maintenance costs, labor costs, and emission treatment costs to obtain cost and environmental target items. Finally, the efficiency, cost, and environmental target items are integrated through a weighted combination to construct a comprehensive evaluation indicator and form an optimization objective function.

[0018] The optimization objective function is introduced into the particle swarm algorithm for swarm initialization, resulting in an initial particle set representing the gas resource allocation solution. This process involves determining core particle swarm parameters such as the number of particles, maximum number of iterations, inertia weight, learning factor, and velocity limit factor, and establishing the algorithm's basic configuration. Based on this basic configuration, a two-layer encoding structure is constructed, encoding the gas flow distribution ratio, power generation setpoint, and heating load distribution into particle position vectors, forming a position encoding rule. Using this position encoding rule, the solution space is partitioned, and the initial position coordinates of each particle are generated through Latin hypercube sampling to ensure a uniform distribution of the initial particles in the solution space. Based on the position vector set, an initial velocity vector is assigned to each particle, with the same dimension and corresponding relationship as the position vector. Each particle position vector in the position vector set is decoded into specific control parameters and substituted into the optimization objective function to calculate a fitness value. Based on the fitness value set, the individual historical optimal positions and the global optimal positions are screened, and a position update guidance mechanism is established to complete the particle swarm initialization process and obtain the initial particle set representing the gas resource allocation solution.

[0019] A search operation based on the critical path of gas energy is applied to the initial particle set to generate an evolving particle swarm. Decoding and analyzing the initial particle set identifies the critical flow paths from gas collection to energy output, including gas collection, gas purification, gas distribution, power generation conversion, and waste heat utilization, forming a path node sequence. Based on this path node sequence, optimized operations for gas collection, gas purification, gas distribution, power generation conversion, and waste heat utilization are designed to construct a search operation set. An operation selection probability matrix is ​​constructed for the search operation set. The selection probability is calculated based on the historical success rate and the effectiveness of the operation in the current iteration, forming an operation selection strategy. Based on the operation selection strategy, a search operation is executed on each particle, generating a position increment matrix and obtaining the particle position change. The particle position change is then integrated with the traditional velocity update formula to construct a hybrid update mechanism to calculate the new particle position and velocity. A complete iterative calculation is performed on the entire particle swarm based on the new particle position and velocity, updating the individual historical optimal position and the global optimal position to obtain the evolving particle swarm.

[0020] Based on an evolving particle swarm, a proximal policy optimization analysis is performed, and particle swarm parameters are dynamically adjusted to obtain a target configuration. Population distribution characteristics, including statistics such as average fitness, fitness variance, population diversity, and convergence rate, are extracted from the evolving particle swarm to form a particle swarm state vector. A proximal policy optimization framework is constructed for the particle swarm state vector, forming a policy network structure consisting of an input layer, three hidden layers, and an output layer, and a value network structure consisting of an input layer, three hidden layers, and an output layer. A parameter adjustment strategy structure is then established. Based on the parameter adjustment strategy structure, adjustments to key parameters of the particle swarm algorithm, including inertia weight, learning factor, and mutation probability, are calculated to obtain a dynamic parameter set. This dynamic parameter set is then applied to the particle swarm algorithm's update process, and a new round of iterative calculations of particle positions and velocities is performed to obtain the optimized particle swarm. Policy update constraints are then applied to the optimized particle swarm to control the update amplitude between the old and new policies to a set threshold, preventing excessive policy changes and ensuring stable convergence. According to the stable convergence results, the global optimal particle position is extracted from the optimized particle swarm, which is decoded into specific parameters of gas flow distribution, power generation regulation and heating load balance to form a target configuration plan.

[0021] Based on the target configuration plan, a multi-level collaborative control structure is established to implement hierarchical scheduling for the gas power generation and heating systems, generating collaboratively optimized control instructions. A three-level control structure consisting of strategic, tactical, and execution layers is constructed based on the target configuration plan. The strategic layer is responsible for overall planning, the tactical layer for mid-term adjustments, and the execution layer for real-time control, forming a hierarchical control architecture. A 24-hour scheduling cycle is assigned to the strategic layer in the hierarchical control architecture. An overall daily resource allocation plan is developed based on the day-ahead load forecast and gas production forecast data, generating a strategic-layer scheduling plan. Based on the strategic-layer scheduling plan, a one-hour scheduling cycle is assigned to the tactical layer. The detailed resource allocation plan is adjusted based on real-time load changes and gas production fluctuations, forming a tactical-layer scheduling plan. Based on the tactical-layer scheduling plan, a five-minute scheduling cycle is assigned to the execution layer. The scheduling plan is converted into a sequence of equipment control instructions, generating execution-layer control instructions. Safety verification is performed on the execution-layer control instructions to verify that all control instructions meet equipment safety operation requirements and system constraints, ensuring compliance. Compliance control instructions are issued to each subsystem control unit through a distributed controller network, and the gas flow valve opening, generator set power and heating equipment parameters are collaboratively controlled to achieve coordinated optimization of gas power generation and heating.

[0022] In the embodiments of this application, by collecting and preprocessing the operating parameters of a gas-fired power generation and heating system, combined with a distributed sensor network and data cleaning technology, the present invention effectively addresses data anomalies and dimensional discrepancies, achieves data standardization, and ensures data accuracy and consistency during the optimization process. Furthermore, leveraging the adaptive optimization capabilities of the particle swarm algorithm, the present invention can automatically search for the optimal allocation of gas flow, power generation, and heating load under complex constraints. Compared to traditional optimization methods, the particle swarm algorithm can handle nonlinear constraints and multi-objective optimization problems. Given limited gas resources, it maximizes the overall efficiency of energy utilization and significantly reduces system operating costs and environmental impact. A search operation based on the critical path of gas energy effectively addresses the problem of optimizing resource flow paths. By evolving the initial particle set, the present invention identifies the critical path from gas collection to energy output and improves the overall efficiency of the energy conversion process by designing optimization operations (such as gas purification and distribution optimization). Combined with the evolutionary characteristics of the particle swarm algorithm, the particle swarm continuously approaches the global optimal solution as the iterative process proceeds, ensuring continuous optimization and stability of the system. This AI-based optimization approach, particularly in the complex environment of energy production and utilization, demonstrates the immense value of the algorithmic features in contributing to the overall solution, further enhancing the system's flexibility and adaptability. The multi-level collaborative control structure enables the system to precisely allocate resources, adjust gas flow and heating loads, and achieve efficient collaboration among subsystems through hierarchical scheduling at the strategic, tactical, and execution levels. This hierarchical scheduling can adjust to real-time load changes and gas production fluctuations, ensuring efficient system operation across different time periods and load conditions, while maximizing energy utilization.

[0023] In a specific embodiment, the process of executing step S101 may specifically include the following steps: The distributed sensor network collects gas flow, gas concentration, gas pressure, generator power and heating load parameters in real time to obtain original operating data; Perform outlier detection on the original running data, remove data points that exceed the specified threshold range, and obtain cleaned data; Standardize the cleaned data and uniformly map the parameters of different dimensions to the preset intervals to obtain standardized data; Based on the standardized data, a dual structure of waste characteristic coding and energy demand coding is constructed to obtain the state representation matrix; Perform time series feature extraction on the state representation matrix, analyze the trend term, period term and random term of the operating parameters, and obtain the dynamic feature vector; The dynamic feature vector is fused with the standardized data, and the state representation data is obtained through dimensionality reduction and feature selection.

[0024] Specifically, a distributed sensor network collects gas flow, gas concentration, gas pressure, generator set power, and heating load parameters in real time to generate raw operating data. A distributed sensor network refers to a data acquisition network composed of various types of sensors deployed at key nodes in gas power generation and heating systems, including gas flow sensors, gas concentration sensors, gas pressure sensors, generator set power sensors, and heating load sensors. These sensors transmit data to the central processing unit in real time via an industrial field bus. The acquisition frequency is typically set to 10 Hz, meaning data is collected 10 times per second to ensure real-time capture of system status changes. Outlier detection is performed on the acquired raw operating data, eliminating data points that exceed the specified threshold range to generate cleaned data. Outlier detection involves identifying and eliminating data points that significantly deviate from the normal range, including abnormal data caused by sensor failure, signal interference, or system anomalies. In practice, wavelet analysis algorithms are used to perform multi-scale decomposition on the raw data. The deviation of each data point from the mean of the previous window (e.g., the previous 60 minutes) is calculated. When the deviation exceeds a certain threshold (e.g., 2.5 standard deviations), the data point is marked as an outlier and removed. For example, if the gas concentration suddenly jumps from a stable 35% to 85% at a certain moment, and this value exceeds the range of the gas concentration mean of the previous 60 minutes plus 2.5 standard deviations, it is identified as an outlier and removed.

[0025] The cleaned data is standardized, and parameters of different dimensions are uniformly mapped to the preset interval to obtain standardized data. Standardization is a key step in solving the problem of inconsistent dimensions of different parameters. Commonly used standardization methods include Z-score standardization and Min-Max standardization. In this method, the Z-score standardization algorithm is used to subtract the mean of each parameter value and divide it by the standard deviation, that is, the parameter value X is transformed: X'=(X-μ) / σ, where μ is the mean of the parameter, σ is the standard deviation, and X' is the standardized value. After standardization, the values ​​of each parameter are usually distributed in the range [-3,3]. For example, if the original value of the gas concentration is 35%, the mean is 40%, and the standard deviation is 10%, then the standardized value is (35%-40%) / 10%=-0.5.

[0026] Based on standardized data, a dual structure of gas characteristic codes and energy demand codes is constructed to generate a state representation matrix. The gas characteristic code is a feature vector formed by combining parameters such as gas concentration, gas flow rate, and gas pressure, used to characterize gas resource characteristics. The energy demand code is a feature vector formed by combining parameters such as generator power and heating load, used to characterize energy demand characteristics. The gas characteristic code typically includes gas-related parameters and their temporal trends, while the energy demand code includes parameters related to energy output and their temporal trends. These two types of codes are combined to form a state representation matrix, with each row representing a time point and each column representing a feature dimension. For example, for gas characteristics, in addition to the current gas concentration value of -0.5, the values ​​for the previous 10, 20, and 30 minutes are also included, as well as the rate of change at adjacent time points. Similarly, similar time series features are constructed for energy demand characteristics. Time series feature extraction is performed on the state representation matrix, analyzing the trend, periodic, and random terms of the operating parameters to generate a dynamic feature vector. Time series feature extraction is the process of extracting patterns and characteristics from the time series of parameters. An autoregressive moving average model is used to decompose the time series of each parameter in the matrix, extracting trend, periodic, and random terms. The trend term reflects the long-term trend of the parameter, the periodic term reflects the periodic fluctuation pattern of the parameter, and the random term reflects the random fluctuation characteristics of the parameter. For example, for a time series of gas concentration, a trend term that gradually increases with the progress of coal seam mining and a 24-hour periodic term related to production shifts may be extracted. The trend, periodic, and random term characteristics of each parameter are combined to form a dynamic feature vector, which is used to characterize the dynamic characteristics of the system.

[0027] The dynamic feature vectors are fused with the standardized data, and state representation data is obtained through dimensionality reduction and feature selection. Fusion combines static standardized data with dynamic time series features to form a dataset that comprehensively represents the system state. Due to the high dimensionality of the fused data, dimensionality reduction algorithms such as principal component analysis are used to reduce the data dimension. Feature importance assessment is then used to select the most representative feature subset. Principal component analysis calculates the data's covariance matrix to extract the primary eigenvectors, and the original high-dimensional data is projected onto these eigenvectors to form a low-dimensional representation. Feature selection calculates the correlation between each feature and the target variable and selects the feature subset with the highest correlation. After fusion, dimensionality reduction, and selection, state representation data is generated, which serves as input for subsequent optimization algorithms.

[0028] In a specific embodiment, the process of executing step S102 may specifically include the following steps: Extract gas concentration, gas flow rate and gas pressure parameters based on state characterization data, build a set of gas resource constraint conditions, and obtain gas resource limits; Analyze the power range of the generator set, the heating load range, and the equipment temperature and pressure limits based on the state characterization data, establish a set of equipment operation constraints, and obtain the energy equipment operation constraints; Perform safety analysis on gas resource limitations and energy equipment operation constraints, build production safety constraints and environmental emission constraints, and obtain comprehensive constraints; Define energy utilization efficiency evaluation indicators based on comprehensive constraints, calculate the comprehensive utilization efficiency function of gas energy using the energy balance principle, and obtain the efficiency target item; Based on the efficiency target item, combined with fuel cost, maintenance cost, labor cost and emission treatment cost, the system operation cost function and environmental impact function are constructed to obtain the cost target item and environmental target item; The efficiency target items, cost target items and environmental target items are integrated into a multi-objective way through weighted combination, and a comprehensive evaluation index is constructed to obtain the optimization objective function.

[0029] Specifically, gas concentration, gas flow, and gas pressure parameters are extracted based on the state characterization data, and a set of gas resource constraints is constructed to obtain gas resource limits. The set of gas resource constraints refers to the boundary conditions that must be followed during gas resource utilization, primarily including gas concentration range constraints, gas flow constraints, and gas pressure constraints. The historical distribution characteristics of gas concentration are analyzed from the state characterization data to determine the safe and usable concentration range. Typically, gas concentration must be controlled between a lower safety limit (to prevent stable combustion due to concentrations too low) and an upper safety limit (to prevent explosion risks). Similarly, by analyzing historical data on gas flow and pressure and their correlation with equipment operating conditions, the safe operating range of gas flow and pressure is determined. These constraints are typically expressed as mathematical inequalities, forming the boundaries of the feasible domain for gas resource utilization.

[0030] Based on the state characterization data, the generator set power range, heating load range, and equipment temperature and pressure limits are analyzed to establish a set of equipment operating constraints, resulting in the energy equipment operating constraints. These constraints refer to the restrictions that energy conversion equipment must adhere to during operation, primarily including generator set power range constraints, heating load range constraints, equipment temperature limits, and pressure limits. By analyzing the generator set's historical operating data, its minimum stable operating power and maximum safe power range are determined. By analyzing the heating system's historical load data, its minimum maintainable hot load and maximum design load range are determined. By analyzing the equipment's safe operating records of temperature and pressure, the temperature and pressure limits of each key equipment point are determined. These constraints, also expressed as mathematical inequalities, collectively constitute the boundary conditions for the equipment's safe operation.

[0031] A safety analysis is performed on gas resource limitations and energy equipment operation constraints to construct safe production constraints and environmental emission constraints, resulting in a comprehensive set of constraints. Safety analysis involves evaluating the safety margins of each constraint under extreme conditions to ensure the safe operation of the system under various operating conditions. Safe production constraints primarily consider personnel safety and equipment safety, including safety margin constraints for gas concentration, pressure, and temperature. Environmental emission constraints primarily consider emission control requirements, including NOx emission limits, CO emission limits, and SO2 emission limits. By integrating gas resource limitations, energy equipment operation constraints, safe production constraints, and environmental emission constraints, a comprehensive set of constraints for system operation is formed.

[0032] Energy efficiency evaluation indicators are defined based on comprehensive constraints. The energy balance principle is used to calculate the comprehensive gas energy utilization efficiency function, resulting in an efficiency target. Energy efficiency evaluation indicators are key metrics for measuring system energy utilization, and include power generation efficiency, heating efficiency, and comprehensive energy efficiency. The power generation efficiency indicator is defined as the ratio of power output to gas input calorific value; the heating efficiency indicator is defined as the ratio of effective heat supply to gas input calorific value; and the comprehensive energy efficiency indicator comprehensively considers energy utilization in both power generation and heating, typically using indicators such as the heat-to-electricity ratio or primary energy utilization rate. Using the energy balance principle, a balanced relationship is established between gas input energy and power output, heat output, and system losses. A mathematical model of energy flow is constructed, and the comprehensive gas energy utilization efficiency function is calculated as the efficiency target for optimization. Based on the efficiency target, combined with fuel costs, maintenance costs, labor costs, and emission treatment costs, the system operating cost function and environmental impact function are constructed, resulting in the cost target and environmental target. The system operating cost function is the sum of all costs incurred during system operation, including fuel costs, equipment maintenance costs, operating personnel costs, and environmental treatment costs. Fuel costs are directly related to gas consumption; maintenance costs are related to equipment operating hours and load factors; labor costs are generally fixed; and emission treatment costs are related to pollutant emissions. By mapping each cost item to system operating parameters, a system operating cost function is constructed. The environmental impact function is a quantitative indicator of the environmental impact of system operation, primarily considering the amount of pollutants emitted and the degree of their environmental damage. By multiplying the emissions of different pollutants by their corresponding environmental impact weights, a comprehensive environmental impact assessment index is derived, which serves as the environmental target item.

[0033] The efficiency, cost, and environmental objectives are integrated through a weighted combination method to construct a comprehensive evaluation index and obtain the optimization objective function. Multi-objective integration refers to combining multiple optimization objectives into a single optimization objective through a specific method. Common integration methods include linear weighting, ideal point method, and analytic hierarchy process. In this method, a linear weighting method is used to integrate the three objectives into a comprehensive optimization objective function. First, the three objectives are normalized to bring them to comparable orders of magnitude. Then, the weight coefficients for each objective are determined based on actual needs, with the sum of the weight coefficients being 1. Finally, the three weighted objectives are added together to obtain the final optimization objective function. The optimization objective function is constructed as F = w1·(1 / η) + w2·C + w3·E, where ηtotal represents the comprehensive energy utilization efficiency, Ctotal represents the total system operating cost, and Eimpact represents the environmental impact index. w1, w2, and w3 are the weight coefficients for the three objectives, respectively, and the requirement is that w1 + w2 + w3 = 1.

[0034] In a specific embodiment, the process of executing step S103 may specifically include the following steps: Determine the number of particles, maximum number of iterations, inertia weight, learning factor, and speed limit factor to obtain the basic configuration of the algorithm; Based on the basic configuration of the algorithm, a two-layer coding structure is constructed to encode the gas flow distribution ratio, power generation set value and heating load distribution into particle position vectors to obtain the position coding rules. The solution space is divided using the position encoding rule, and the initial position coordinates of each particle are generated by Latin hypercube sampling to obtain a set of position vectors. Assigning an initial velocity vector to each particle according to the position vector set, the velocity vector dimension is the same as the position vector and has a corresponding relationship, and a velocity vector set is obtained; Decode each particle position vector in the position vector set into a specific control parameter, substitute it into the optimization objective function to calculate the fitness value, and obtain a fitness value set; Based on the fitness value set, the individual historical optimal position and the global optimal position are screened, a position update guidance mechanism is established, the particle swarm initialization process is completed, and the initial particle set representing the gas resource allocation scheme is obtained.

[0035] Specifically, the algorithm's basic configuration is determined by determining the number of particles, maximum number of iterations, inertia weight, learning factor, and speed limit factor. The number of particles refers to the number of individuals participating in the optimization and is generally determined based on the problem's complexity and dimensionality. For the collaborative optimization of gas power generation and heating, which involves many variables, a larger number of particles, such as 50-200, is typically chosen. The maximum number of iterations refers to the maximum number of iterations the algorithm executes, typically set between 100 and 500. The algorithm terminates when the maximum number of iterations or convergence criteria are reached. The inertia weight controls the degree to which particles maintain their original velocity and direction, typically ranging from 0.4 to 0.9. A larger inertia weight favors global search, while a smaller inertia weight favors local, refined search. The learning factor, consisting of an individual learning factor and a group learning factor, controls the degree to which particles learn toward their individual and global optimal positions, respectively. Both factors are typically set between 1.5 and 2.5. The speed limit factor limits the maximum particle velocity to prevent particles from moving too quickly and skipping the optimal solution. It is typically set to 10%-20% of the search space. Based on the algorithm's basic configuration, a two-layer encoding structure is constructed. The gas flow distribution ratio, power generation setpoint, and heating load distribution are encoded as particle position vectors, resulting in a position encoding rule. This two-layer encoding structure is a special encoding method consisting of an outer process code and an inner resource allocation code. The outer process code represents the priority of gas resource allocation, using an integer sequence to represent the scheduling order of different energy-consuming units. The inner resource allocation code represents the specific resource allocation ratio for each energy-consuming unit, using a real number sequence to represent the parameter setpoints for each control point. In the coordinated optimization problem of gas power generation and heating supply, the position vector typically contains control parameters such as the gas flow distribution ratio (such as the valve opening of each diversion point), the generator power setpoint (such as the load factor of each generator unit), and the heating load distribution (such as the flow distribution of each heating branch). The position encoding rule defines how these actual control parameters are mapped into the dimension and value range of the particle position vector, ensuring that the encoded position vector uniquely corresponds to a set of feasible control parameter solutions.

[0036] The solution space is partitioned using position encoding rules, and Latin hypercube sampling is used to generate the initial position coordinates of each particle, resulting in a set of position vectors. Solution space partitioning involves determining the value range of each dimension based on the position encoding rules to form a multidimensional search region. Latin hypercube sampling is a highly efficient sampling method that ensures a uniform distribution of initial particles in the solution space, improving search efficiency. In its implementation, the search space for each dimension is divided into equal intervals equal to the number of particles. Then, a random interval is selected for each dimension, and a value is randomly generated within that interval. Finally, the values ​​for each dimension are combined to form a position vector for a particle. This method is used to initialize all particles, resulting in a set of position vectors. Compared to traditional random initialization methods, Latin hypercube sampling provides better coverage of the solution space, avoiding problems with overly concentrated initial particle distribution or large blank areas.

[0037] Based on the set of position vectors, each particle is assigned an initial velocity vector. The velocity vectors have the same dimensions as the position vectors and are in a corresponding relationship, resulting in a set of velocity vectors. The velocity vector represents the particle's movement direction and step size in the solution space. Its dimensions are the same as the position vector, with each dimension corresponding to the rate of change of the corresponding dimension of the position vector. Initial velocity vectors are typically generated using a random method, taking values ​​within the range [-Vmax, Vmax], where Vmax is the velocity limit factor. Velocity limits are a key mechanism in particle swarm optimization, preventing particles from moving too fast, leading to divergence or becoming trapped in local optima. In the collaborative optimization problem of gas power generation and heating, control parameters in different dimensions may have varying sensitivities. Therefore, velocity limits may vary for each dimension, and are typically adjusted based on the impact of changes in the parameters in that dimension on the objective function. Each particle position vector in the set of position vectors is decoded into a specific control parameter and substituted into the optimization objective function to calculate a fitness value, resulting in a set of fitness values. Decoding is the inverse of encoding, mapping the position vector back to the actual control parameter. According to the previously defined position encoding rules, the dimensions of the position vector are parsed into specific control parameters, such as the gas flow distribution ratio, the power generation setpoint, and the heating load distribution. The decoded control parameters must satisfy the previously defined constraints. If the decoded control parameters of a particle do not satisfy the constraints, they must be corrected or assigned a large penalty. The decoded control parameters are substituted into the optimization objective function to calculate the fitness value of each particle. In the collaborative optimization problem of gas power generation and heating supply, the fitness value is usually defined as the negative value of the optimization objective function, meaning that a higher fitness indicates a better solution.

[0038] Based on the fitness value set, the individual historical optimal positions and the global optimal positions are screened, a position update guidance mechanism is established, and the particle swarm initialization process is completed, resulting in the initial particle set representing the gas resource allocation solution. The individual historical optimal position refers to the best position achieved by each particle during the historical iteration process. During initialization, the individual historical optimal position serves as the particle's initial position. The global optimal position refers to the best position achieved by all particles during the historical iteration process. During initialization, the global optimal position is the position of the particle with the highest fitness among all particles. The position update guidance mechanism, which guides particles towards a more optimal solution using the individual historical optimal positions and the global optimal position, is the core of the particle swarm algorithm. By recording this key position information, a reference coordinate for particle movement is established.

[0039] In a specific embodiment, the process of executing step S104 may specifically include the following steps: Decode and analyze the initial particle set to identify the key flow paths from gas collection to energy output and obtain the path node sequence; Based on the path node sequence, the gas collection optimization operation, gas purification optimization operation, gas distribution optimization operation, power generation conversion optimization operation and waste heat utilization optimization operation are designed to obtain the search operation set; Construct an operation selection probability matrix for the search operation set, calculate the selection probability based on the historical success rate and the operation effectiveness of the current iteration round, and obtain the operation selection strategy; Perform search operations on each particle according to the operation selection strategy, generate a position increment matrix, and obtain the particle position change; The particle position change is integrated with the traditional velocity update formula to construct a hybrid update mechanism to obtain the new position and velocity of the particle. Based on the new position and new velocity of the particles, an iterative calculation is performed on the entire particle swarm to update the individual historical optimal position and the global optimal position to obtain the evolved particle swarm.

[0040] Specifically, decoding analysis is performed on the initial particle set to identify key flow paths from gas collection to energy output, resulting in a sequence of path nodes. Decoding analysis interprets particle position vectors as actual control parameters. By analyzing the system operating states corresponding to these control parameters, the main flow paths of gas energy from source to destination are identified. Key flow paths are the main routes for gas energy conversion and utilization, and include five main nodes: gas collection, gas purification, gas distribution, power generation conversion, and waste heat utilization. In the gas-fired power generation and heating coordinated optimization system, the gas collection stage is responsible for collecting raw gas from coal seams; the gas purification stage is responsible for removing impurities and moisture from the gas; the gas distribution stage is responsible for distributing the purified gas in a specific proportion to the power generation and heating systems; the power generation conversion stage is responsible for converting the chemical energy of the gas into electrical energy through internal combustion engines or gas turbines; and the waste heat utilization stage is responsible for recovering waste heat generated during the power generation process for heating. By analyzing the decoded control parameters of each particle, the sequence of gas flow path nodes corresponding to the system state corresponding to each particle is determined.

[0041] Based on the path node sequence, we design gas collection optimization operations, gas purification optimization operations, gas distribution optimization operations, power generation conversion optimization operations, and waste heat utilization optimization operations to obtain a set of search operations. Search operations refer to particle position adjustment strategies designed for different links, aiming to perform targeted optimization on different parts of the system. The gas collection optimization operation mainly adjusts gas extraction parameters, including the optimization of extraction flow, extraction pressure, and other parameters; the gas purification optimization operation mainly adjusts purification process parameters, including the optimization of purification temperature, purification pressure, and other parameters; the gas distribution optimization operation mainly adjusts the diversion ratio, including the optimization of the valve opening of each branch; the power generation conversion optimization operation mainly adjusts the power generation parameters, including the optimization of the generator load rate, combustion parameters, etc.; the waste heat utilization optimization operation mainly adjusts the waste heat recovery parameters, including the optimization of heat exchanger flow, temperature, and other parameters. Each type of optimization operation includes three operation intensities: small-scale fine-tuning, medium-scale adjustment, and large-scale reconstruction, which are suitable for different optimization stages and search situations. Small-scale fine-tuning refers to minor parameter adjustments, with changes not exceeding 10% of the current value; medium-scale fine-tuning refers to moderate parameter adjustments, with changes controlled within 30%; and large-scale refactoring refers to larger parameter adjustments, with changes up to 80%. This multi-level design of search operations creates a rich and diverse set of search operations, enhancing the algorithm's search capabilities and adaptability. An operation selection probability matrix is ​​constructed for the search operation set. The selection probability is calculated based on the historical success rate and the effectiveness of the operations in the current iteration, yielding the operation selection strategy. The operation selection probability matrix is ​​a two-dimensional array, with rows representing different types of optimization operations and columns representing operations of varying strengths. The matrix elements represent the probability of selecting a particular operation. The historical success rate refers to the proportion of successful improvements in particle fitness achieved by the operation in previous iterations, while the effectiveness of the operation refers to the contribution of the operation to improving particle fitness in the current iteration. The selection probability is calculated using a weighted combination of the historical success rate and the effectiveness of the current operation. The calculation formula includes a historical factor, typically set to 0.7. This allows the algorithm to adaptively adjust the selection probabilities of different operations, prioritizing more effective search operations and improving search efficiency.

[0042] A search operation is performed on each particle according to the operation selection strategy, generating a position increment matrix and obtaining the particle position change. The position increment matrix, a matrix with the same dimensions as the particle position vector, represents the position change caused by the search operation. The search operation is performed as follows: first, random sampling is performed based on the operation selection probability matrix to determine the specific search operation to be performed on the current particle. Then, based on the selected search operation type and intensity, the parameters of the corresponding dimensions in the particle position vector are adjusted to generate the position change. Finally, the position change is recorded in the position increment matrix. For example, if the medium range adjustment in the gas distribution optimization operation is selected, the dimension representing the gas distribution ratio in the particle position vector is randomly adjusted within a range of ±30%, and the adjustment amount is recorded in the corresponding position in the position increment matrix. By performing the search operation on all particles, a complete position increment matrix is ​​generated, representing the particle position change caused by the search operation.

[0043] By integrating the particle position change with the traditional velocity update results, a hybrid update mechanism is constructed to obtain the new particle position and velocity. This hybrid update mechanism builds on the traditional velocity update by adding the position change term caused by the search operation, creating a more flexible update strategy. This hybrid update mechanism retains the fundamental characteristics of the traditional particle swarm algorithm while adding a targeted search capability tailored to the problem's characteristics, improving both search efficiency and solution quality.

[0044] Based on the particle's new position and velocity, an iterative calculation is performed on the entire particle swarm, updating the individual historical optimal position and the global optimal position to form an evolved particle swarm. Iterative calculation involves calculating the particle's new position based on the updated velocity, evaluating the fitness of the new position, and updating the individual historical optimal position and the global optimal position based on the fitness value. The updated particle position is checked to see if it exceeds the search space boundaries. If so, boundary processing is performed, typically using an absorbing boundary or reflecting boundary strategy. The updated particle position is decoded into the actual control parameter and substituted into the optimization objective function to calculate a new fitness value. If the fitness value of the new position is better than the particle's historical optimal fitness, the particle's historical optimal position is updated; if the fitness value of the new position is better than the current global optimal fitness, the global optimal position is updated. Through this iterative process, the entire particle swarm moves toward a more optimal solution region, forming an evolved particle swarm and preparing for the next round of iterations.

[0045] In a specific embodiment, the process of executing step S105 may specifically include the following steps: Extract population distribution characteristics from the evolving particle swarm, including average fitness, fitness variance, population diversity, and convergence speed, and obtain the particle swarm state vector; A proximal strategy optimization framework is constructed for the particle swarm state vector to generate a strategy network structure containing an input layer, three hidden layers, and an output layer, and a value network structure containing an input layer, three hidden layers, and an output layer, and obtain a parameter adjustment strategy structure. Based on the parameter adjustment strategy structure, the adjustment amount of the particle swarm algorithm parameters is calculated, including inertia weight, learning factor and mutation probability, to obtain a dynamic parameter set; Apply the dynamic parameter set to the update process of the particle swarm algorithm, perform a new round of iterative calculations on the particle position and velocity, and obtain the optimized particle swarm; The optimized particle swarm is subjected to strategy update restriction processing to control the update amplitude of the new and old strategies to not exceed the set threshold, thus obtaining a stable convergence result; According to the stable convergence results, the global optimal particle position is extracted from the optimized particle swarm, which is decoded into parameters of gas flow distribution, power generation regulation and heating load balance to obtain the target configuration scheme.

[0046] Specifically, the swarm distribution characteristics, including average fitness, fitness variance, population diversity, and convergence rate, are extracted from the evolving particle swarm to obtain the particle swarm state vector. Average fitness is the arithmetic mean of the fitness values ​​of all particles in the swarm, reflecting the overall optimization level of the current swarm. Fitness variance is the variance of the fitness values ​​of all particles in the swarm, reflecting the degree of diversity within the swarm. Population diversity refers to the breadth of the distribution of the swarm in the solution space, typically quantified by calculating the average distance between particles or the variance of their position vectors. Convergence rate is the rate of change of the swarm's fitness value with the number of iterations, typically measured by calculating the improvement in the global optimal fitness over several consecutive iterations. These characteristics together constitute the particle swarm state vector, which comprehensively describes the current optimization state and characteristics of the swarm. For example, a high average fitness and a low fitness variance indicate that the swarm is close to convergence; a high population diversity indicates a wide distribution of particles, facilitating global search; and a low convergence rate indicates that the optimization process may be stagnant, requiring adjustment of the search strategy.

[0047] A proximal policy optimization framework is constructed for the particle swarm state vector, forming a policy network structure consisting of an input layer, three hidden layers, and an output layer, and a value network structure consisting of an input layer, three hidden layers, and an output layer, resulting in a parameter adjustment policy structure. Proximal policy optimization is a reinforcement learning algorithm that achieves stable policy optimization by controlling the policy update step size. The policy network structure is responsible for generating an action distribution based on the current state. In this method, the action corresponds to the parameter adjustment direction of the particle swarm algorithm. The value network structure is responsible for evaluating the value of the current state to guide policy updates. Specifically, the policy network consists of an input layer, three hidden layers, and an output layer. The input layer receives the particle swarm state vector, the hidden layers extract state features through nonlinear transformations, and the output layer generates a probability distribution for parameter adjustment. The value network has a similar structure, but the output layer has only one node, representing the estimated state value. Together, these two networks form the parameter adjustment policy structure.

[0048] Based on the parameter adjustment strategy structure, the particle swarm algorithm (PSO) parameter adjustments, including the inertia weight, learning factor, and mutation probability, are calculated to form a dynamic parameter set. The inertia weight controls the degree to which particles maintain their original motion trends; the learning factor controls the degree to which particles learn toward their individual and global optimal positions; and the mutation probability controls the frequency of random particle mutations. These parameters significantly impact the performance of the PSO and require dynamic adjustment at different stages of the optimization process. The policy network generates a probability distribution for parameter adjustments based on the current particle swarm state vector and then samples the probability distribution to determine specific adjustment actions. For example, if the current particle swarm diversity is low and convergence is slow, indicating that the algorithm may be stuck in a local optimum, the policy network will tend to reduce the inertia weight and increase the mutation probability to enhance local search capabilities. Conversely, if the particle swarm diversity is high and convergence is fast, the policy network will tend to increase the inertia weight and reduce the mutation probability to enhance global search capabilities. In this way, the algorithm can intelligently adjust parameters according to different stages of the optimization process, forming a dynamic parameter set.

[0049] The dynamic parameter set is applied to the particle swarm algorithm's update process, and a new round of iterative calculations is performed on the particle positions and velocities to obtain the optimized particle swarm. The update process includes four steps: velocity update, position update, fitness calculation, and optimal position update. Velocity update uses the adjusted inertia weight and learning factor to calculate the new velocity of each particle. Position update calculates the new position of each particle based on the new velocity and decides whether to mutate certain particles based on the adjusted mutation probability. Fitness calculation decodes the updated particle position into actual control parameters and substitutes them into the optimization objective function to calculate the new fitness value. Optimal position update compares the fitness of the new position with the fitness of the historical optimal position. If it is better, the individual historical optimal position and the global optimal position are updated. Through this complete iterative process, the dynamically adjusted parameter set is used to guide the particle swarm toward a more optimal solution region, forming an optimized particle swarm.

[0050] The optimized particle swarm is subjected to policy update restriction processing to control the update amplitude of the new and old policies not to exceed the set threshold, thereby obtaining a stable convergence result. Policy update restriction is the core mechanism of the proximal policy optimization algorithm. By limiting the difference between the new and old policies, it avoids excessive policy updates that lead to unstable training. The specific implementation method is to calculate the KL divergence of the new and old policies or directly limit the maximum amplitude of parameter changes. In this method, a maximum change threshold is set for the adjustment amplitude of parameters such as inertia weight, learning factor, and mutation probability, which is usually 20% of the current value. If an adjustment exceeds the threshold, the adjustment amplitude is clipped to within the threshold range. This restriction mechanism ensures the smoothness of parameter adjustment, avoids oscillations in the optimization process caused by parameter mutations, and helps the algorithm to converge stably to a high-quality solution.

[0051] Based on the stable convergence results, the global optimal particle position is extracted from the optimized particle swarm and decoded into parameters for gas flow distribution, power generation regulation, and heating load balancing, resulting in the target configuration. The global optimal particle position is the best position found by the entire particle swarm during the historical iterations and corresponds to the optimal system control solution. The decoding process converts the abstract position vector into actual control parameters, including specific parameters such as gas flow distribution ratio, generator power setpoint, and heating load distribution. These parameters together constitute the coordinated optimization configuration of the gas power generation and heating system, achieving efficient utilization of gas resources and minimizing system operating costs.

[0052] In a specific embodiment, the process of executing step S106 may specifically include the following steps: Based on the target configuration plan, a three-level control structure is constructed: strategic layer, tactical layer, and execution layer. The strategic layer is responsible for global planning, the tactical layer is responsible for mid-term adjustments, and the execution layer is responsible for real-time control, resulting in a hierarchical control architecture. Assign a 24-hour dispatch cycle to the strategic layer in the hierarchical control architecture, formulate an overall resource allocation plan for the day based on the day-ahead load forecast and gas production forecast data, and obtain the strategic layer dispatch plan; According to the strategic-level scheduling plan, the tactical-level scheduling cycle is allocated to the tactical-level scheduling cycle. The detailed resource allocation plan is adjusted based on the real-time load change and gas production fluctuation data to obtain the tactical-level scheduling plan. Based on the tactical layer scheduling plan, the execution layer is assigned a 5-minute scheduling cycle, and the scheduling plan is converted into a device control instruction sequence to obtain the execution layer control instructions; Perform security verification on the execution layer control instructions to check whether all control instructions meet the equipment safety operation requirements and system constraints, and obtain compliant control instructions; Compliance control instructions are issued to each subsystem control unit through a distributed controller network, and the gas flow valve opening, generator set power and heating equipment parameters are collaboratively controlled to obtain collaborative optimization control instructions.

[0053] Specifically, a three-level control structure consisting of strategic, tactical, and execution layers is constructed based on the target configuration scheme. The strategic layer is responsible for global planning, the tactical layer for mid-term adjustments, and the execution layer for real-time control, resulting in a hierarchical control architecture. A hierarchical control architecture is a hierarchical decision-making structure, with different layers having different decision scopes, timescales, and control responsibilities. The strategic layer, at the highest level of the control structure, is responsible for the system's global resource planning and long-term scheduling decisions, focusing on the system's overall optimization goals and long-term operational benefits. The tactical layer, at the middle level of the control structure, is responsible for short- and medium-term resource allocation and load balancing based on the strategic layer's overall plan, focusing on the system's operational efficiency and economy on medium-term timescales. The execution layer, at the lowest level of the control structure, is responsible for real-time parameter adjustment and disturbance suppression, focusing on stable operation, safety, and reliability on short-term timescales. The three layers are linked through information and control flows, forming a complete hierarchical control architecture that enables the system to simultaneously address the needs of long-term planning and real-time control.

[0054] The strategic layer in the hierarchical control architecture is assigned a 24-hour scheduling cycle. Based on the day-ahead load forecast and gas production forecast data, an overall daily resource allocation plan is formulated, resulting in a strategic-layer scheduling solution. A 24-hour scheduling cycle means that the strategic layer performs decision calculations and updates its plan every 24 hours. This cycle aligns with the power system's day-ahead market and facilitates the coordinated operation of the gas-fired power generation system and the power grid. The day-ahead load forecast includes the power and thermal load curves for the next 24 hours, derived through historical data analysis, weather considerations, and corrections for special events. The gas production forecast includes the gas flow and concentration trends for the next 24 hours, predicted through coal mining plan analysis, gas emission modeling, and historical data regression. Based on this forecast data, the strategic layer uses a particle swarm algorithm to solve a 24-hour rolling planning problem, determining the hourly gas resource allocation ratio, generator output plan, and heating load allocation plan. This results in an overall daily resource allocation plan, known as the strategic-layer scheduling solution. This solution serves as a guide and constraint for lower-level control, ensuring global optimal resource utilization.

[0055] Based on the strategic-level scheduling plan, the tactical layer is assigned a one-hour scheduling cycle. The detailed resource allocation plan is adjusted based on real-time load changes and gas production fluctuations, resulting in the tactical-level scheduling plan. A one-hour scheduling cycle means the tactical layer updates its decisions every hour, effectively addressing medium-term load and resource fluctuations. The tactical layer receives the 24-hour scheduling plan issued by the strategic layer and uses the resource allocation plan for the corresponding period as the optimization boundary conditions. Simultaneously, the tactical layer obtains real-time load change and gas production fluctuation data, which reflect the deviation between the forecast and actual results. Based on this real-time data and the strategic-level guidance plan, the tactical layer runs a simplified particle swarm optimization algorithm to fine-tune resource allocation for the next hour, taking into account more operational constraints and equipment characteristics, resulting in a more detailed scheduling plan, the tactical-level scheduling plan. This plan includes detailed operating parameter settings for each gas diversion valve, generator set, and heating equipment for the next hour.

[0056] Based on the tactical layer's scheduling plan, the execution layer is assigned a 5-minute scheduling cycle. This schedule is then converted into a sequence of device control instructions, resulting in execution layer control instructions. A 5-minute scheduling cycle means the execution layer updates control parameters every 5 minutes. This cycle matches the control cycle of most industrial control systems and enables timely response to system status changes. The execution layer receives the 1-hour scheduling plan issued by the tactical layer and extracts the control target for the current 5-minute period. The execution layer then calculates the deviation between the current system state and the target state based on real-time system status data, including parameters such as gas flow, gas concentration, generator power, and heating load. Based on these deviations, the execution layer employs a PID control algorithm or a model predictive control algorithm to calculate specific operating instructions for each control device, such as valve opening adjustment, generator load adjustment, and heating equipment parameter adjustment. These specific operating instructions are arranged in chronological order to form a sequence of device control instructions for the next 5 minutes, known as the execution layer control instructions. This instruction sequence directly guides the adjustment of operating parameters of field equipment.

[0057] Safety verification is performed on control instructions at the execution layer to check whether all control instructions meet equipment safety requirements and system constraints, resulting in compliant control instructions. Safety verification refers to the safety and feasibility review process before control instructions are issued to equipment for execution. It aims to prevent equipment damage or system risks caused by improper control instructions. Safety verification mainly includes four aspects: range verification, rate of change verification, interlock logic verification, and safety constraint verification. Range verification checks whether each control parameter exceeds the equipment's allowable operating range, such as whether the gas flow exceeds the maximum allowable flow rate or whether the generator load exceeds the rated power. Rate of change verification checks whether the rate of change of the control parameter exceeds the equipment's allowable adjustment rate, such as whether the valve opening changes too quickly or the generator load changes too steeply. Interlock logic verification checks whether control instructions violate interlock protection logic between equipment, such as generator start-up and shutdown sequences and system switching conditions. Safety constraint verification checks whether control instructions will cause the system to enter an unsafe state, such as whether the gas concentration is within the safe range or whether the system pressure exceeds the limit. Through these comprehensive verification processes, control instructions that meet all safety requirements and constraints are selected, resulting in compliant control instructions, ensuring safe and stable system operation.

[0058] Compliance control instructions are issued to each subsystem control unit via a distributed controller network, enabling coordinated control of gas flow valve opening, generator power, and heating equipment parameters, resulting in optimized control instructions. A distributed controller network is a control system consisting of multiple controllers, each responsible for controlling a subsystem. Controllers exchange information and coordinate actions via a communication network. Compliance control instructions are transmitted via Industrial Ethernet or fieldbus networks to each subsystem control unit, including the gas processing subsystem control unit, the power generation subsystem control unit, and the heating subsystem control unit. Upon receiving the control instructions, each subsystem control unit first interprets and processes them locally before transmitting specific control signals to the actuators via I / O interfaces. These signals can adjust the gas flow valve opening, the fuel supply and ignition parameters of the generator set, or the flow and temperature setpoints of the heating system. While executing their respective control tasks, each subsystem exchanges operating status information through real-time communication, enabling coordinated control between subsystems. This avoids control conflicts or resource contention between subsystems and ensures the coordinated operation of the entire system. This collaborative control method based on a distributed controller network not only ensures the real-time and reliability of control, but also achieves the optimized operation of the entire system, forming a complete collaborative optimization control closed loop.

[0059] The above describes the gas power generation and heat supply collaborative optimization method based on particle swarm algorithm in the embodiment of the present application. The following describes the gas power generation and heat supply collaborative optimization system based on particle swarm algorithm in the embodiment of the present application. Figure 2 In the embodiment of the present application, an embodiment of a gas power generation and heat supply collaborative optimization system based on a particle swarm algorithm includes: The acquisition module 201 is used to collect and pre-process the operating parameters of the gas power generation and heating system to obtain state representation data; A construction module 202 is used to construct gas resource limitations and energy equipment operation constraints based on the state characterization data and generate an optimization objective function; An import module 203 is used to import the optimization objective function into the particle swarm algorithm to initialize the swarm and obtain an initial particle set representing the gas resource allocation solution; A search module 204 is configured to apply a search operation based on a gas energy critical path to the initial particle set to obtain an evolved particle swarm; An analysis module 205 is configured to perform proximal strategy optimization analysis based on the evolved particle swarm, dynamically adjust the particle swarm parameters, and obtain a target configuration solution; The scheduling module 206 is used to establish a multi-level collaborative control structure according to the target configuration scheme, perform hierarchical scheduling on the gas power generation and heating systems, and obtain collaborative optimization control instructions.

[0060] By integrating the aforementioned components, collecting and preprocessing the operating parameters of the gas power generation and heating system, and integrating distributed sensor networks with data cleaning technologies, the present invention effectively addresses data anomalies and dimensional discrepancies, achieves data standardization, and ensures data accuracy and consistency during the optimization process. Furthermore, leveraging the adaptive optimization capabilities of the particle swarm algorithm (PSO), the present invention can automatically search for the optimal allocation of gas flow, power generation, and heating load under complex constraints. Compared to traditional optimization methods, the PSO algorithm can handle nonlinear constraints and multi-objective optimization problems. Given limited gas resources, it maximizes the overall efficiency of energy utilization and significantly reduces system operating costs and environmental impact. A search operation based on the critical path of gas energy effectively addresses the problem of optimizing resource flow paths. By evolving the initial particle set, the present invention identifies the critical path from gas collection to energy output. By designing a series of optimization operations (such as gas purification and distribution optimization), the overall efficiency of the energy conversion process is improved. By leveraging the evolutionary properties of the PSO algorithm, the particle swarm continuously approaches the global optimal solution as the iteration process proceeds, ensuring continuous optimization and stability of the system. This AI-based optimization approach, particularly in the complex environment of energy production and utilization, demonstrates the immense value of the algorithmic features in contributing to the overall solution, further enhancing the system's flexibility and adaptability. The multi-level collaborative control structure enables the system to precisely allocate resources, adjust gas flow and heating loads, and achieve efficient collaboration among subsystems through hierarchical scheduling at the strategic, tactical, and execution levels. This hierarchical scheduling can adjust to real-time load changes and gas production fluctuations, ensuring efficient system operation across different time periods and load conditions, while maximizing energy utilization.

[0061] above Figure 2 From the perspective of modular functional entities, the gas power generation and heating collaborative optimization system based on the particle swarm algorithm in the embodiment of the present invention is described in detail. The gas power generation and heating collaborative optimization device based on the particle swarm algorithm in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0062] Figure 3This is a schematic diagram of the structure of a particle swarm algorithm-based device for coordinated optimization of gas power generation and heat supply, provided in an embodiment of the present invention. This device 300, which can vary significantly depending on configuration or performance, may include one or more central processing units (CPUs) 310 (e.g., one or more processors), memory 320, and one or more storage media 330 (e.g., one or more mass storage devices) for storing application programs 333 or data 332. The memory 320 and storage media 330 may be either transient or persistent storage. The program stored in the storage medium 330 may include one or more modules (not shown). Each module may include a series of instructions for operating the particle swarm algorithm-based device 300. Furthermore, the processor 310 can be configured to communicate with the storage medium 330 and execute a series of instruction operations in the storage medium 330 on the particle swarm algorithm-based gas power generation and heat supply collaborative optimization device 300 to implement the steps of the above-mentioned particle swarm algorithm-based gas power generation and heat supply collaborative optimization method.

[0063] The gas power generation and heat supply collaborative optimization device 300 based on particle swarm algorithm may further include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 331, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be understood by those skilled in the art that Figure 3 The structure of the gas power generation and heat supply collaborative optimization device based on the particle swarm algorithm shown does not constitute a limitation on the gas power generation and heat supply collaborative optimization device based on the particle swarm algorithm provided by the present invention, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0064] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes the steps of the particle swarm algorithm-based gas power generation and heat supply collaborative optimization method.

[0065] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0066] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a particle swarm algorithm-based gas power generation and heat supply collaborative optimization device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0067] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A collaborative optimization method for gas power generation and heating based on particle swarm optimization, characterized in that: The method comprises: Collect and pre-process the operating parameters of the gas power generation and heating system to obtain state characterization data; Constructing gas resource limitations and energy equipment operation constraints based on the state representation data to generate an optimization objective function; The optimization objective function is introduced into the particle swarm algorithm to perform swarm initialization to obtain an initial particle set representing the gas resource allocation scheme; Applying a search operation based on a gas energy critical path to the initial particle set to obtain an evolving particle swarm; Based on the evolving particle swarm, a proximal strategy optimization analysis is performed, and the particle swarm parameters are dynamically adjusted to obtain a target configuration solution; A multi-level collaborative control structure is established according to the target configuration scheme, and hierarchical scheduling is performed on the gas power generation and heating systems to obtain collaborative optimization control instructions.

2. The method for collaborative optimization of gas power generation and heat supply based on particle swarm optimization according to claim 1, characterized in that: The operation parameters of the gas power generation and heating system are collected and preprocessed to obtain state characterization data, including: The distributed sensor network collects gas flow, gas concentration, gas pressure, generator power and heating load parameters in real time to obtain original operating data; Performing outlier detection on the original operating data, removing data points that exceed a specified threshold range, and obtaining cleaned data; Standardizing the cleaned data, uniformly mapping parameters of different dimensions to preset intervals to obtain standardized data; Based on the standardized data, a dual structure of waste characteristic coding and energy demand coding is constructed to obtain a state representation matrix; Performing time series feature extraction on the state characterization matrix, analyzing trend items, period items, and random items of the operating parameters, and obtaining a dynamic feature vector; The dynamic feature vector is fused with the standardized data, and state representation data is obtained through dimensionality reduction and feature selection.

3. The method for collaborative optimization of gas power generation and heat supply based on particle swarm optimization according to claim 1, characterized in that: The step of constructing gas resource limitations and energy equipment operation constraints based on the state characterization data and generating an optimization objective function includes: Extracting gas concentration, gas flow rate, and gas pressure parameters based on the state characterization data, constructing a set of gas resource constraint conditions, and obtaining a gas resource limit; Analyze the power range of the generator set, the heating load range, and the temperature and pressure limits of the equipment according to the state characterization data, establish a set of equipment operation constraint conditions, and obtain energy equipment operation constraints; Performing safety analysis on the gas resource limitations and energy equipment operation constraints, constructing safety production constraints and environmental emission constraints, and obtaining comprehensive constraint conditions; Defining energy utilization efficiency evaluation indicators based on the comprehensive constraint conditions, calculating the comprehensive utilization efficiency function of gas energy using the energy balance principle, and obtaining the efficiency target item; Based on the efficiency target item combined with fuel cost, maintenance cost, labor cost and emission treatment cost, a system operation cost function and an environmental impact function are constructed to obtain a cost target item and an environmental target item; The efficiency target items, cost target items and environmental target items are integrated into a multi-objective manner through a weighted combination method to construct a comprehensive evaluation index and obtain an optimization objective function.

4. The method for collaborative optimization of gas power generation and heat supply based on particle swarm optimization according to claim 1, characterized in that: The optimization objective function is introduced into the particle swarm algorithm to perform group initialization to obtain an initial particle set representing the gas resource allocation scheme, including: Determine the number of particles, maximum number of iterations, inertia weight, learning factor, and speed limit factor to obtain the basic configuration of the algorithm; A two-layer coding structure is constructed based on the basic configuration of the algorithm, and the gas flow distribution ratio, power generation power setting value and heating load distribution amount are encoded as particle position vectors to obtain position coding rules; The solution space is divided by using the position encoding rule, and the initial position coordinates of each particle are generated by Latin hypercube sampling to obtain a set of position vectors; Allocating an initial velocity vector to each particle according to the position vector set, wherein the velocity vector dimension is the same as the position vector and has a corresponding relationship, thereby obtaining a velocity vector set; Decoding each particle position vector in the position vector set into a specific control parameter, substituting the parameter into the optimization objective function to calculate a fitness value, and obtaining a fitness value set; Based on the fitness value set, the individual historical optimal position and the global optimal position are screened, a position update guidance mechanism is established, the particle swarm initialization process is completed, and an initial particle set representing the gas resource allocation scheme is obtained.

5. The method for collaborative optimization of gas power generation and heat supply based on particle swarm optimization according to claim 1, characterized in that: The applying a search operation based on a gas energy critical path to the initial particle set to obtain an evolving particle swarm includes: Decoding and analyzing the initial particle set to identify key flow paths from gas collection to energy output, and obtain a path node sequence; Based on the path node sequence, a gas collection optimization operation, a gas purification optimization operation, a gas distribution optimization operation, a power generation conversion optimization operation, and a waste heat utilization optimization operation are designed to obtain a search operation set; Constructing an operation selection probability matrix for the search operation set, calculating the selection probability based on the historical success rate and the operation effectiveness of the current iteration round, and obtaining the operation selection strategy; Perform a search operation on each particle according to the operation selection strategy, generate a position increment matrix, and obtain a particle position change; The particle position change is integrated with the traditional velocity update formula to construct a hybrid update mechanism to obtain the new position and velocity of the particle; An iterative calculation is performed on the entire particle swarm based on the new position and new velocity of the particle, and the individual historical optimal position and the global optimal position are updated to obtain an evolved particle swarm.

6. The method for collaborative optimization of gas power generation and heat supply based on particle swarm optimization according to claim 1, characterized in that: The proximal strategy optimization analysis based on the evolved particle swarm is performed, and the particle swarm parameters are dynamically adjusted to obtain a target configuration solution, including: Extracting population distribution characteristics from the evolving particle swarm, including average fitness, fitness variance, population diversity, and convergence speed, to obtain a particle swarm state vector; Constructing a proximal strategy optimization framework for the particle swarm state vector, generating a strategy network structure including an input layer, three hidden layers, and an output layer, and a value network structure including an input layer, three hidden layers, and an output layer, and obtaining a parameter adjustment strategy structure; Calculating the adjustment amount of the particle swarm algorithm parameters based on the parameter adjustment strategy structure, including inertia weight, learning factor and mutation probability, to obtain a dynamic parameter set; Applying the dynamic parameter set to the update process of the particle swarm algorithm, performing a new round of iterative calculations on the particle positions and velocities, and obtaining an optimized particle swarm; Performing strategy update restriction processing on the optimized particle swarm to control the update amplitude of the new and old strategies to not exceed a set threshold, thereby obtaining a stable convergence result; According to the stable convergence result, the global optimal particle position is extracted from the optimized particle swarm, and is decoded into parameters of gas flow distribution, power generation regulation and heating load balance to obtain a target configuration scheme.

7. The method for collaborative optimization of gas power generation and heat supply based on particle swarm optimization according to claim 1, characterized in that: The multi-level collaborative control structure is established according to the target configuration scheme, and hierarchical scheduling is performed on the gas power generation and heating systems to obtain collaborative optimization control instructions, including: Based on the target configuration scheme, a three-level control structure consisting of a strategic layer, a tactical layer, and an execution layer is constructed, wherein the strategic layer is responsible for global planning, the tactical layer is responsible for mid-term adjustments, and the execution layer is responsible for real-time control, thus obtaining a hierarchical control architecture; Allocating a 24-hour dispatch cycle to the strategic layer in the hierarchical control architecture, formulating an overall resource allocation plan for the entire day based on the day-ahead load forecast and gas production forecast data, and obtaining a strategic layer dispatch plan; Allocate a 1-hour scheduling cycle to the tactical layer according to the strategic layer scheduling plan, adjust the resource allocation detailed plan based on real-time load changes and gas production fluctuation data, and obtain a tactical layer scheduling plan; Allocate a 5-minute scheduling cycle to the execution layer based on the tactical layer scheduling plan, convert the scheduling plan into a device control instruction sequence, and obtain the execution layer control instruction; Performing security verification on the execution layer control instructions to check whether all control instructions meet the equipment safety operation requirements and system constraints, and obtaining compliant control instructions; The compliance control instructions are issued to the control units of each subsystem through a distributed controller network, and the gas flow valve opening, generator set power and heating equipment parameters are collaboratively controlled to obtain collaborative optimization control instructions.

8. A gas power generation and heating collaborative optimization system based on particle swarm optimization, characterized in that: The method for collaboratively optimizing gas power generation and heat supply based on a particle swarm algorithm according to any one of claims 1 to 7 is used to implement the method, wherein the method comprises: The acquisition module is used to collect and pre-process the operating parameters of the gas power generation and heating system to obtain state representation data; A construction module, configured to construct gas resource limitations and energy equipment operation constraints based on the state characterization data, and generate an optimization objective function; An import module is used to import the optimization objective function into the particle swarm algorithm to initialize the group and obtain an initial particle set representing the gas resource allocation plan; A search module, configured to apply a search operation based on a gas energy critical path to the initial particle set to obtain an evolved particle swarm; An analysis module, configured to perform proximal strategy optimization analysis based on the evolving particle swarm, dynamically adjust the particle swarm parameters, and obtain a target configuration solution; The scheduling module is used to establish a multi-level collaborative control structure according to the target configuration scheme, perform hierarchical scheduling on the gas power generation and heating systems, and obtain collaborative optimization control instructions.

9. A gas power generation and heating collaborative optimization device based on particle swarm algorithm, characterized in that: The invention comprises a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the method for collaborative optimization of gas power generation and heat supply based on particle swarm algorithm according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the processor is enabled to execute the method for collaborative optimization of gas power generation and heat supply based on particle swarm algorithm according to any one of claims 1 to 7.

Citation Information

Cited By

  • Cold and heat source system energy-saving management and control method and system based on particle swarm nested decoupling

    CN120931432A

  • Energy-saving management and control method and system for cold and heat source system based on particle swarm embedded decoupling

    CN120931432B

  • Pilot-based cost-reducing and benefit-increasing optimization method

    CN121032162A

  • A pilot-based cost reduction and efficiency improvement optimization method

    CN121032162B

  • Water pollution inspection regulation and control method and system

    CN121209286A