A gas storage tank control method based on an improved whale optimization algorithm
By improving the whale algorithm to optimize the gas tank's gas replenishment start-up and shutdown time and replenishment pressure, the problems of slow solution speed and poor effect in the gas tank control optimization problem are solved, and the control effect of the gas tank with the lowest energy consumption throughout the day is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TONGJI UNIV
- Filing Date
- 2023-03-30
- Publication Date
- 2026-04-21
AI Technical Summary
In the existing technology, the control optimization problem of gas storage tanks is difficult to solve accurately through numerical calculation. General optimization algorithms are slow and ineffective in solving complex optimization problems. Furthermore, existing algorithms fail to effectively fit the actual engineering of gas storage tanks, resulting in poor optimization results.
An improved whale algorithm is adopted, which optimizes the gas tank's gas replenishment start-up and shutdown time and replenishment pressure through variable isolation strategy, dimension selection method, elitist method and variable reset method, and constructs a gas tank control model to achieve the lowest energy consumption throughout the day.
It improves the efficiency and accuracy of gas tank control optimization, reduces the risk of getting trapped in local searches, maintains population diversity, and achieves faster convergence speed and lower total energy consumption.
Smart Images

Figure CN116244968B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of compressed air system design and optimization, and in particular to a control method for air storage tanks based on an improved whale algorithm. Background Technology
[0002] Air storage tanks are a crucial component in the design and optimization of compressed air systems. Proper control optimization of air storage tanks can effectively reduce the total energy consumption of both the tank and the compressed air system. The air storage tank control optimization problem is an NP-hard problem, difficult to solve precisely using numerical methods. Currently, there are few computational methods for air storage tank control optimization, relying on general optimization algorithms such as exact solutions (e.g., dynamic programming), heuristic algorithms (e.g., A* algorithm), and metaheuristic algorithms (e.g., genetic algorithms). However, exact solutions are slow when dealing with complex optimization problems and are unsuitable for air storage tank control optimization. Furthermore, heuristic and metaheuristic algorithms do not offer specific solutions tailored to the engineering characteristics of air storage tank control, leading to slow optimization speeds and poor optimization results.
[0003] In existing technologies, the technical conditions for solving the control optimization problem of gas storage tanks are relatively mature, based on high-precision simulation of gas storage tanks and optimization algorithms that fit the engineering characteristics of gas storage tanks. However, there is a lack of research on improving optimization algorithms to fit the actual engineering of gas storage tanks, resulting in models that are detached from actual working conditions and ultimately making it difficult to obtain better optimization results. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a gas storage tank control method based on an improved whale algorithm. Four directions are proposed to improve the whale algorithm to improve the control method of the gas storage tank. The improved whale algorithm optimizes the gas supply start-up and stop time and gas supply pressure of the gas storage tank, determines the optimal gas storage tank control scheme within a certain range, better fits the actual working conditions, and achieves the lowest total energy consumption in the working process of the gas storage tank.
[0005] The objective of this invention can be achieved through the following technical solutions:
[0006] This invention provides a gas storage tank control method based on an improved whale algorithm, comprising the following steps:
[0007] S1: Obtain data such as gas storage tanks, pipelines, and flow requirements, and construct a gas storage tank control model. The objective function is to minimize the daily energy consumption of the gas storage tank, and the start and stop times of gas replenishment and the gas replenishment pressure are used as optimization variables.
[0008] S2: Based on the gas storage tank control model, initialize the global variables of the improved whale algorithm;
[0009] S3: Enter the iteration process, and update the position of each whale in the optimization group based on the variable isolation strategy;
[0010] S4: In each iteration, the execution strategy is determined based on a uniformly random number r;
[0011] S5: After the position vector of the whale in the current iteration has been updated, check whether the updated variables exceed the variable range, and reselect variables that exceed the variable range;
[0012] S6: In the current iteration, after each individual whale has executed the evolutionary strategy, an elitist method is used to select the individual whales to participate in the next iteration;
[0013] S7: After all iterations are completed, the optimization variables of the best historical individual are used to control the gas replenishment pressure and start-up / stop time of the gas storage tank, so as to achieve the lowest total energy consumption during the operation of the gas storage tank.
[0014] Furthermore, in S1, in the gas storage tank control model, the pipeline pressure drop adopts a single-pipe pressure drop model, and the pressure drop is calculated by segmentation method, dividing the pipe length into multiple segments and calculating the pressure drop of each part separately;
[0015] In the single-pipe pressure drop model, the constraints are: mass flow rate conservation, equal pressure at the three-way branch point, and all terminal gas supply pressures not lower than the preset minimum value.
[0016] Furthermore, in S1, the control model for the gas storage tank uses minimizing the daily energy consumption of the gas storage tank as the objective function, and the start and stop times of gas replenishment and the replenishment pressure of the gas storage tank as optimization variables.
[0017]
[0018] Where n is the number of times to replenish qi. Let this be the start time of the nth Qi replenishment. p represents the end time of the nth refill. n The replenishment pressure for the nth replenishment;
[0019] The time variable is represented in the following decimal form:
[0020] t = hh.mm
[0021] Where hh = 0, ..., 24 represents hours, and mm = 0, ..., 59 represents fractions.
[0022] Furthermore, in S3, before each iteration of the improved whale algorithm, the number of dimensions participating in the position update is determined based on the current iteration number. Through uniform sampling without replacement, the specific dimensions participating in the next dimension update are selected. The process for determining the number of dimensions currently participating in the update is as follows:
[0023]
[0024] Here, ceil() is the floor function, which ensures that the number of dimensions involved in the update is at least one, ε is the minimum threshold for the number of dimensions involved in the update, and max() is the maximum value function.
[0025] Furthermore, in S3, the time variable and the air pressure variable are separated during the update of the position of each whale, so that they do not interfere with each other during the iterative update.
[0026] The specific process of variable isolation is as follows: the current whale population is divided into time-variable populations. With the gas replenishment pressure variable group [p1,…,p] n The two groups determine the execution strategy in S4 respectively, and then the time variable and the gas pressure variable are restored to the position vector.
[0027] Furthermore, in S4, the execution strategy is determined based on a uniform random number r. When r ≤ 0.5, the dive search strategy is executed, and when r > 0.5, the spiral encirclement strategy is executed.
[0028] Furthermore, in S3, in the dive strategy, the dive target is determined according to formulas (2) and (3):
[0029]
[0030]
[0031] in, A uniformly distributed vector of random numbers between 0 and 1;
[0032] according to Value selection for the diving object:
[0033] when At that time, select a random individual whale and execute formula (4):
[0034]
[0035] in, It is a uniformly distributed vector of random numbers between 0 and 1. For random individual whales, For the next generation of individual whales, The current iterated object;
[0036] when At that time, select the best historical object, move closer to it, and execute formula (5):
[0037]
[0038] in, It is a uniformly distributed vector of random numbers between 0 and 1. As the best individual in history, For the next generation of individual whales, The current iteration object.
[0039] Furthermore, in S3, in the spiral search strategy, the current iteration object Execute formula (6):
[0040]
[0041] Where parameters b and l are fixed constants, usually set to 1, and the strategy selection process adopts formula (7):
[0042]
[0043] Furthermore, in S5, after the position vector of the whale in the current iteration has been updated, it is checked whether the updated variable exceeds the variable range;
[0044] When the updated variable exceeds the variable range, a new variable is selected, specifically:
[0045] For the time variable, when the hour portion exceeds the variable range, the hour portion of the same refueling count of the current best historical individual is used as the replacement. When the minute portion exceeds the variable range, a random number is generated using the Levi flight method, and the minute portion of the same refueling count of the current best historical individual interacts with this random number to generate a new minute variable, as detailed below:
[0046]
[0047] Among them, mm * This represents the minute portion of the same number of Qi replenishments for the current historical best individual.
[0048] Levy is generated by the following method: a decimal generated by the Levy flight method, which is then mapped to an integer in the range [-10, 10].
[0049] For the replenishment pressure variable, when it exceeds the pressure limit range, the following method is used: Take a random decimal number. When r > 0.5, replace it with the replenishment pressure of the same number of replenishments for the current historical best individual. When r < 0.5, replace it with the replenishment pressure of the same number of replenishments for a random individual.
[0050] When the number of iterations exceeds half of the maximum number of iterations, more randomness is introduced into the reselection process of the gas replenishment pressure variable, as follows:
[0051]
[0052] Where rand is a uniformly distributed random decimal between 0 and 1.
[0053] Furthermore, in S6, after each individual whale has executed its evolutionary strategy, a new elitist method is used to select whales to participate in the next iteration.
[0054] The specific process is as follows: Calculate the total energy consumption of the gas tank of the currently updated whale individual and compare it with the total energy consumption of the gas tank of a random whale individual. If the total energy consumption of the gas tank of the currently updated whale individual is lower than the total energy consumption of the random whale individual, then replace the other random whale individual with the currently updated whale individual and replace the total energy consumption of the other random whale individual with the total energy consumption of the currently updated whale individual. After that, compare the updated whale individual with the historical best individual to maintain the elitism of the historical best individual.
[0055]
[0056] Where r ind 1,r ind 2,r ind 3 represents three random individual whales, pop run fir is the updated position vector of the current iteration whale individual. run This is the fitness value of the whale individual in the current iteration after the update.
[0057] Compared with the prior art, the control method of the present invention has the following technical advantages:
[0058] 1. To address the issue of excessively large intervals between the gas replenishment pressure variable and the start-stop time variable of the gas storage tank, which negatively impacts optimization performance, this invention proposes a variable isolation strategy. During the iteration process, the start-stop time variable and the gas replenishment pressure variable are separated, ensuring they do not interfere with each other during the execution of the evolutionary strategy. This allows each variable to maintain its own positional information, which can then be passed on to the next generation of whales. Introducing this variable isolation strategy solves the problem of previous generation optimization information not being effectively passed on to subsequent whales due to the interaction between the time and gas replenishment pressure variables during evolutionary strategy execution.
[0059] 2. To address the issues of excessively rapid convergence and susceptibility to local optima encountered by the original whale algorithm in optimizing gas storage tank control, this invention proposes a novel dimension selection method. This method achieves finer control over the optimization process by updating the number of dimensions. When the whale population is trapped in a local optimum, the number of dimensions involved in the update is increased to help the population escape the local optimum. When the whale population is in a local search phase, the number of dimensions involved in the update is reduced to enhance local search capabilities, helping the improved whale algorithm achieve stronger optimization accuracy. The number of dimensions involved in the update is determined by Equation 1, which introduces a non-linear attribute into the dimension sampling process, thereby improving generalization ability.
[0060] 3. To address the problems of excessively rapid convergence and decreased population diversity in traditional elitist methods, this invention proposes a novel elitist approach. This method innovatively incorporates random individuals into the comparison process of traditional elitism. By comparing and replacing random individuals and separating the correspondence between individual position vectors and fitness values, the evolutionary rate of each individual in the population can be effectively adjusted. This method accelerates the evolutionary rate of a particular individual in the population through randomization, thereby creating an evolutionary rate difference within the population. This difference better preserves the diversity of the optimized population. It is worth noting that this evolutionary rate difference is not achieved by reducing the evolutionary rate of a single individual. Therefore, while retaining the advantages of traditional elitism, this method optimizes the balance between global and local search during algorithm execution, thus helping the population better maintain its diversity.
[0061] 4. This solution also proposes a novel method for resetting control variables. Traditional variable resetting methods randomly select or reset variables at the boundaries of their intervals. In the gas storage tank control optimization problem, traditional variable resetting methods are unsuitable for time and pressure variables. Resetting time and pressure variables at a certain boundary is clearly not in line with practical engineering requirements; randomly resetting them would affect the transmission of existing optimization information. Therefore, this invention, tailored to the characteristics of the gas storage tank optimization problem, proposes a new variable resetting method. This method addresses the significant local search characteristics of time and replenishment variables in a given replenishment cycle in the gas storage tank optimization problem, allowing time and pressure variables to randomly search within a certain interval around the current historical best, thereby improving the gas storage tank optimization effect. This method also considers that local search can lead to getting trapped in local optima; therefore, in the latter half of the iteration process, random search is added to improve global search capability. Experimental results show that the addition of this method can effectively promote the optimization granularity of start-stop time and replenishment pressure. Under the same hardware conditions, this invention has faster convergence speed and better optimization accuracy. Attached Figure Description
[0062] Figure 1 This is a schematic diagram of a gas storage tank example in this invention.
[0063] Figure 2 This is a flowchart of the steps in the gas storage tank control method based on the improved whale algorithm in this invention.
[0064] Figure 3 This is a flowchart of the improved whale algorithm in this invention. Detailed Implementation
[0065] In summary, this invention proposes four methods to improve the whale algorithm, including an elitist method based on random replacement, an evolutionary isolation method based on variable intervals, a dimension replacement method based on random sampling, and a variable reset method based on engineering practice. This invention optimizes the gas tank's refueling start-up and shutdown time and refueling pressure using this improved whale algorithm, determining the optimal gas tank control scheme within a certain range, and achieving the lowest total energy consumption during the gas tank's operation.
[0066] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. Component models, material names, connection structures, control methods, algorithms, and other features not explicitly described in this technical solution are considered common technical features disclosed in the prior art.
[0067] Example 1
[0068] Please combine Figure 2 and 3 The present invention adopts the following technical solution, including the following steps:
[0069] Step 1: Construct the gas storage tank control model. The pipeline pressure drop is calculated using a single-pipe pressure drop model, employing a segmented method. The pipe length is divided into equal segments (num segments), and the pressure drop of each segment is calculated separately. Constraints include mass flow conservation, equal pressure at the tee junction, and all terminal gas supply pressures not lower than the minimum value (determined based on the actual project). The viscosity and density required for the gas storage tank simulation are calculated using CoolProp. To accelerate the simulation, CoolProp's low-level API is used. Minimizing the gas storage tank's daily energy consumption is considered the objective function, with the gas tank's start-up and stop times and replenishment pressure as optimization variables, as shown below:
[0070]
[0071] Where n is the number of times to replenish qi. Let this be the start time of the nth Qi replenishment. p represents the end time of the nth refill. n This represents the replenishment pressure for the nth replenishment. The time variable is expressed as a decimal:
[0072] t = hh.mm
[0073] Where hh = 0, ..., 24 represents hours, and mm = 0, ..., 59 represents fractions. This further compresses the variable range of the time variable, accelerating the optimization process and enhancing its effectiveness.
[0074] Step 2: Initialize the global variables for the improved whale algorithm, such as the number of whales, variable range, maximum number of iterations, and minimum number of dimensions to participate in the update. Before each iteration of the improved whale algorithm, a new dimension decision method is introduced: the dimension sampling method. This method determines the number of dimensions participating in the position update based on the current iteration number, and selects the specific dimensions to participate in the next dimension update through uniform sampling without replacement. The specific process for determining the number of dimensions participating in the update is as follows:
[0075]
[0076] Here, ceil() is the floor function, which ensures that the number of dimensions involved in the update is at least one, ε is the minimum threshold for the number of dimensions involved in the update, and max() is the maximum value function.
[0077] Step 3: Enter iteration and update the position of each whale in the optimization group. During the update process, a new variable isolation strategy is introduced. The time variable and the inhalation pressure variable are separated to prevent interference during iterative updates. Specifically, the current whale group is divided into time-variable groups. With the gas replenishment pressure variable group [p1,…,p] n The two groups each execute step 4. After step 4 is completed, the time variable and the gas replenishment pressure variable are restored to the position vector.
[0078] Step 4: Enter the iteration. The execution strategy is determined based on a uniform random number r. When r ≤ 0.5, the dive search strategy is executed, and when r > 0.5, the spiral encirclement strategy is executed. In the dive strategy, the dive target is determined according to formulas (2) and (3).
[0079]
[0080]
[0081] in, This is a uniformly distributed vector of random numbers between 0 and 1. According to... The value selects the diving object. When At that time, select a random individual whale and execute the following formula:
[0082]
[0083] in, It is a uniformly distributed vector of random numbers between 0 and 1. For random individual whales, For the next generation of individual whales, The current iteration object. When At that time, select the best historical object, move closer to it, and execute the following formula:
[0084]
[0085] in, It is a uniformly distributed vector of random numbers between 0 and 1. As the best individual in history, For the next generation of individual whales, The current iteration object.
[0086] In the spiral search strategy, the current iteration object Execute the following formula:
[0087]
[0088] Here, parameters b and l are fixed constants, usually set to 1. The strategy selection process is as follows:
[0089]
[0090] Step 5: After Step 4 is completed and the whale's position vector for the current iteration has been updated, check if the updated variables exceed the variable range. If they do, the variables need to be reselected as follows: For time variables, if the hour portion exceeds the variable range, replace it with the hour portion of the same refueling count of the current best historical individual. If the minute portion exceeds the variable range, generate a random number using the Levi flight method, and interact the minute portion of the same refueling count of the current best historical individual with this random number to generate a new minute variable. Details are as follows:
[0091]
[0092] Among them, mm *The minute portion of the same refueling count for the current best individual is generated by Levy using the following method: a decimal generated by the Levy flight method, mapped to an integer in the range [-10, 10]. For the refueling pressure variable, when it exceeds the pressure limit range, the following method is used: a random decimal is taken; when r > 0.5, the refueling pressure of the same refueling count for the current best individual is used; when r < 0.5, the refueling pressure of the same refueling count for a random individual is used. Furthermore, it should be noted that when the number of iterations exceeds half of the maximum number of iterations, more randomness is introduced into the reselection process of the refueling pressure variable, as follows:
[0093]
[0094] Where rand is a uniformly distributed random decimal between 0 and 1.
[0095] Step 6: In the current iteration, after each whale individual completes its evolutionary strategy, a new elitist method is used to select whale individuals to participate in the next iteration. Specifically, the total energy consumption of the gas tank of the currently updated whale individual is calculated and compared with the total energy consumption of the gas tank of a random whale individual (note that this random whale individual can be a previous generation of the current whale individual). If the total energy consumption of the gas tank of the currently updated whale individual is lower than the total energy consumption of the random whale individual, then the currently updated whale individual replaces the other random whale individual, and the total energy consumption of the currently updated whale individual replaces the total energy consumption of the other random whale individual (note that the correspondence between whale individuals and total energy consumption will be distinguished here). Afterwards, the updated whale individual is compared with the historical best individual to maintain the elitism of the historical best individual. The details are as follows:
[0096]
[0097] Where r ind 1,r ind 2,r ind 3 represents three random individual whales, pop run Let fit be the updated position vector of the current iteration whale individual. run This represents the fitness value (i.e., total energy consumption) of the whale individual in the current iteration after the update.
[0098] Step 7: After the iteration is completed, use the optimization variables of the best historical individual to control the gas replenishment pressure and start / stop time of the gas storage tank.
[0099] Application Example 1
[0100] This invention provides a specific implementation example of gas storage tank control based on an improved whale algorithm. A schematic diagram of the example is shown below. Figure 1As shown. For example, this case... Figure 1 As shown, a single gas storage tank supplies gas to four gas-consuming terminals. This case involves a branched pipeline network with known flow directions in all seven pipelines. The flow requirements are known and fixed. The constraints in this case are: mass flow rate conservation, equal pressure at the tee junctions, and a supply pressure of at least 800 kPa at all terminals. The optimization objective is to minimize the energy consumption of the gas storage tank, and the optimization parameters are the venting time and venting pressure of the gas storage tank. Specific data for the pipeline network in this case are shown in Table 1.
[0101] Table 1 Specific Data of Pipeline Network
[0102]
[0103] Implementation steps according to Figure 2 The flowchart is as follows:
[0104] Step 1, according to Figure 1 A control model for the gas storage tank was built based on the case shown in Table 1. The pressure drop of a single pipe was calculated using a segmented method, dividing the single pipe into 5 segments, and the pressure drop was calculated for each segment. The gas storage tank is replenished with gas twice a day. The specific optimization variables are:
[0105]
[0106] Step 2: Initialize the parameters of the improved whale optimization algorithm by setting the number of whales to 100, the air pressure range to [950, 800], the maximum number of iterations to 100, and the minimum number of dimensions to participate in the update to 1.
[0107] Step 3: After the improved whale optimization algorithm has been iterated, the best historical individual is used as the scheduling table, and the gas supply pressure at each gas-consuming end is calculated.
[0108] The optimization results are shown in Table 2:
[0109] Table 2 Optimization Results
[0110]
[0111] The results are compared with those of the TPE algorithm and the original whale algorithm, as shown in Table 3.
[0112] Table 3 Algorithm Comparison Results
[0113] TPE algorithm energy consumption: 1673.2kw Energy consumption reduction: 28% Energy consumption of the original whale algorithm: 1564.6kw Energy consumption reduction: 23%
[0114] This implementation case demonstrates that the improved whale algorithm represents a significant improvement over the original whale algorithm and the TPE algorithm, confirming the advantages and advancements of the improved whale algorithm proposed in this invention. It should be understood that the gas storage tank control algorithm based on the improved whale algorithm proposed in this invention has a certain degree of scalability. In this case, the improved whale optimization algorithm and the gas storage tank control model are not only a logical division but also a functional and project-based division. Based on this division, this invention can be deployed on a server-client architecture, leveraging cloud servers and 5G big data to better align with the development of the Industrial Internet.
[0115] The above description of the embodiments is provided to enable those skilled in the art to understand and use the invention. It will be apparent to those skilled in the art that various modifications can be made to these embodiments, and the general principles described herein can be applied to other embodiments without inventive effort. Therefore, the present invention is not limited to the above embodiments, and any improvements and modifications made by those skilled in the art based on the disclosure of the present invention without departing from the scope of the invention should be within the protection scope of the present invention.
Claims
1. A gas storage tank control method based on an improved whale algorithm, characterized in that, Includes the following steps: S1: Construct a control model for the gas storage tank, where the minimum daily energy consumption of the gas storage tank is taken as the objective function, and the start and stop time of gas replenishment and the gas replenishment pressure of the gas storage tank are taken as optimization variables; S2: Based on the gas storage tank control model, initialize the global variables of the improved whale algorithm; S3: Enter the iteration process, and update the position of each whale in the optimization group based on the variable isolation strategy; S4: In each iteration, the execution strategy is determined based on a uniformly random number r; S5: After the position vector of the whale in the current iteration has been updated, check whether the updated variables exceed the variable range, and reselect variables that exceed the variable range; S6: In the current iteration, after each individual whale has executed the evolutionary strategy, an elitist method is used to select the individual whales to participate in the next iteration; S7: After all iterations are completed, the optimization variables of the best historical individual are used to control the gas replenishment pressure and start-up and shutdown times of the gas storage tank, so as to achieve the lowest total energy consumption during the operation of the gas storage tank. In S1, the control model for the gas storage tank uses minimizing the daily energy consumption of the gas storage tank as the objective function, and the start and stop times of gas replenishment and the gas replenishment pressure of the gas storage tank as optimization variables. in To determine the number of times to replenish Qi, For the first The start time of the next Qi replenishment. For the first The end time of the next Qi replenishment session The replenishment pressure for the nth replenishment; The time variable is represented in the following decimal form: in, , indicating hours , indicates a fraction; In S3, before each iteration of the improved whale algorithm, the number of dimensions participating in the position update is determined based on the current iteration number. Through uniform sampling without replacement, the specific dimensions participating in the next dimension update are selected. The process for determining the number of dimensions participating in the update is as follows: in, The function is a floor function, ensuring that the number of dimensions involved in the update is at least one. The minimum number of dimensions to participate in the update threshold. It is a function for maximizing the value; In S3, the time variable and the air pressure variable are separated when updating the position of each whale, so that they do not interfere with each other during iterative updates. The specific process of variable isolation is as follows: the current whale population is divided into time-variable populations. Group with gas replenishment pressure variable The two groups determine the execution strategy in S4 respectively, and then the time variable and the gas replenishment pressure variable are restored to the position vector; In S4, the execution strategy is determined by a uniform random number r. When r ≤ 0.5, the dive search strategy is executed, and when r > 0.5, the spiral encirclement strategy is executed. In S3, the target of the dive is determined according to formulas (2) and (3) in the dive strategy: in, A uniformly distributed vector of random numbers between 0 and 1; according to Value selection for the diving object: when At that time, select a random individual whale and execute formula (4): in, It is a uniformly distributed vector of random numbers between 0 and 1. For random individual whales, For the next generation of individual whales, The current iterated object; when At that time, select the best historical object, move closer to it, and execute formula (5): in, It is a uniformly distributed vector of random numbers between 0 and 1. As the best individual in history, For the next generation of individual whales, The current iterated object; In S3, in the spiral search strategy, the current iteration object Execute formula (6): Among them, parameters and As a fixed constant, set to 1, the strategy selection process uses formula (7): 。 2. The gas storage tank control method based on the improved whale algorithm according to claim 1, characterized in that, In S1, the gas storage tank control model adopts a single-pipe pressure drop model for pipeline pressure drop. The pressure drop is calculated by segmentation method, which divides the pipe length into multiple segments and calculates the pressure drop of each segment separately. In the single-pipe pressure drop model, the constraints are: mass flow rate conservation, equal pressure at the three-way branch point, and all terminal gas supply pressures not lower than the preset minimum value.
3. The gas storage tank control method based on the improved whale algorithm according to claim 1, characterized in that, In S5, after the position vector of the whale in the current iteration has been updated, check whether the updated variable exceeds the variable range; When the updated variable exceeds the variable range, a new variable is selected, specifically: For the time variable, when the hour portion exceeds the variable range, the hour portion of the same boost count for the current best historical individual is used as the replacement. When the minute portion exceeds the variable range, a random number is generated using the Levi flight method, and the minute portion of the same boost count for the current best historical individual interacts with this random number to generate a new minute variable, as detailed below: in, This represents the minute portion of the same number of Qi replenishments for the current historical best individual. in The following method is used to generate decimals using the Levi flight method, which are then mapped to integers in the range [-10, 10]. For the gas replenishment pressure variable, when it exceeds the pressure limit range, the following method is used: Take a random decimal number, when... When, the replenishment pressure of the same number of replenishments for the current historical best individual is used for replacement. At that time, the replacement pressure is based on the same number of times a random individual receives a replenishment. When the number of iterations exceeds half of the maximum number of iterations, more randomness is introduced into the reselection process of the gas replenishment pressure variable, as follows: in, It is a uniformly distributed random decimal between 0 and 1.
4. The gas storage tank control method based on the improved whale algorithm according to claim 1, characterized in that, In S6, after each individual whale has executed its evolutionary strategy, a new elitist method is used to select the whales to participate in the next iteration. The specific process is as follows: Calculate the total energy consumption of the gas tank of the currently updated whale individual and compare it with the total energy consumption of the gas tank of a random whale individual. If the total energy consumption of the gas tank of the currently updated whale individual is lower than the total energy consumption of the random whale individual, then replace the other random whale individual with the currently updated whale individual and replace the total energy consumption of the other random whale individual with the total energy consumption of the currently updated whale individual. After that, compare the updated whale individual with the historical best individual to maintain the elitism of the historical best individual. in Three random individual whales, This is the updated position vector of the whale individual in the current iteration. This is the fitness value of the whale individual in the current iteration after the update.
Citation Information
Patent Citations
Rapid active disturbance rejection method for air cavity pressure based on extended state observer
CN111413872A
Energy storage bidirectional converter charging and discharging control method in grid-connected mode based on whale algorithm
CN113411006A