Hydraulic turbine set dynamic simulation and optimization method of functional model
Through the dynamic simulation method of turbine units based on functional models, combined with neural networks, reinforcement learning and genetic algorithms, the difficulties of model deviation and complex nonlinear problems in traditional methods are solved, and accurate simulation and efficient optimization of the dynamic performance of turbine units are achieved, improving system operation efficiency and energy utilization.
Patent Information
- Application Number
- CN202411809341.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-05-06
AI Technical Summary
The dynamic simulation method of traditional turbine units has model deviations, parameter uncertainty and difficulty in dealing with complex nonlinear problems, resulting in large time-domain response errors.
A dynamic simulation method of turbine units based on functional model is adopted, combined with neural networks, reinforcement learning and genetic algorithms, a dynamic system model is established, objectives and constraints are optimized, dynamic simulation and optimization calculation are carried out, optimization results are verified, and sensitivity analysis is performed.
Accurate simulation and efficient optimization of the dynamic performance of the turbine unit are achieved, system operation efficiency and energy utilization are improved, and model adaptability and robustness are enhanced.
Smart Images

Figure CN119940078A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of hydraulic turbine simulation, and more specifically relates to a hydraulic turbine dynamic simulation of a functional model and an optimization method thereof. Background Art
[0002] The dynamic model of the turbine unit is an important part of the hydropower station. This dynamic model provides real-time prediction of the operating status of the entire hydropower station. However, this type of model is affected by many factors, including water flow, temperature, pressure, unit performance, etc., which increases the difficulty of accurately grasping the dynamic behavior of the model.
[0003] Traditional dynamic simulation methods are mainly based on physical laws and empirical equations. However, due to the deviation of their models and the uncertainty of their parameters, their time domain responses have large errors. In addition, traditional methods also have difficulties in dealing with complex nonlinear, non-stationary and large-scale dynamic problems.
[0004] To solve these problems, researchers have tried to introduce various intelligent algorithms, such as neural networks, fuzzy systems, and genetic algorithms, to improve the accuracy and robustness of the model. However, these methods require a lot of data and training time, and the understanding of the model is relatively low, making it difficult to conduct theoretical analysis. Summary of the invention
[0005] In this context, the present invention proposes a hydro turbine unit dynamic simulation and optimization method based on a functional model. This method combines the theoretical basis of traditional hydraulic and hydropower mathematical models with the advantages of modern intelligent optimization algorithms, and realizes accurate simulation and efficient optimization of the dynamic performance of hydro turbine units, which has significant advantages over traditional methods.
[0006] In order to achieve the above object, the present invention is implemented by adopting the following technical scheme: the method comprises:
[0007] Establish a dynamic system model based on the functional model of the turbine unit dynamic system, including turbine, governor, generator and power grid; add a neural network algorithm to learn and predict the dynamic behavior of the system from historical data;
[0008] Set optimization goals and constraints. The optimization goal is to maximize power and minimize energy consumption. Constraints include technical regulations and environmental requirements for unit operation. Use multi-objective optimization algorithms to deal with contradictions and conflicts between existing goals.
[0009] Run dynamic simulation and introduce reinforcement learning algorithms to allow the simulation system to gradually improve its operating performance through continuous trial and error and learning;
[0010] Perform optimization calculations and use genetic algorithms to improve the efficiency and accuracy of optimization.
[0011] Verify the optimization results, use the optimization results as new input, perform dynamic simulation again, and verify the effectiveness and correctness of the optimization results.
[0012] In one embodiment, the establishment of a dynamic system model includes:
[0013] Define the various components of the system, including turbines, speed regulators, generators and power grids. Each component is described using a corresponding mathematical model based on its physical characteristics and operating mechanism. The turbine is described using the following second-order model:
[0014] H(Q)=b0+b1Q+b2Q2
[0015] Among them, H(Q) is the output power, Q is the water flow rate, and b0, b1, b2 are parameters.
[0016] Use deep learning models such as neural networks to receive input data, and after a training process, automatically "learn" the hidden patterns in the data and accurately predict the dynamic behavior of the system;
[0017] Through the above steps, a dynamic system model based on the functional model and combined with the neural network model is constructed.
[0018] In one embodiment, the optimization objectives and constraints include:
[0019] There are two goals: maximize power P and minimize energy consumption E; these two goals are combined into an overall goal F:
[0020] F=w1P-w2E
[0021] Among them, w1 and w2 are the weights of each target;
[0022] Define the constraints of the system and define a series of constraint functions g_i(x) to represent the i-th constraint. If there is a constraint that the power cannot exceed the upper limit Pmax, then define the following constraint function:
[0023] g(x)=P-Pmax
[0024] When solving the problem, under the premise of satisfying all constraints (i.e., all gi(x) <= 0), find the parameter setting x* that maximizes the overall goal F.
[0025] Using the Lagrange multiplier method, construct the Lagrange function L:
[0026] L=F-Σλi*gi(x)
[0027] Where λi is the Lagrange multiplier. Then, we look for x* and λi that maximize L.
[0028] In one embodiment, the dynamic simulation includes: introducing a reinforcement learning algorithm to improve the performance of the simulation process;
[0029] Specifically, the simulation process is modeled as a Markov decision process MDP; in MDP, the model selects an action a (i.e., the set parameters) under a given state s, and then enters the next state s' according to the current state and the selected action, and obtains a reward r;
[0030] The goal of reinforcement learning is to find a strategy π so that starting from any state s, actions are selected according to strategy π to maximize the expected cumulative reward;
[0031] Define the Q function as the expected cumulative reward according to the strategy π after selecting action a in state s, then the goal is to find the strategy π that maximizes the Q function;
[0032] The Q function satisfies the Bellman equation, that is:
[0033] Q(s,a)=r+γ*E[Q(s',a')|s,a]
[0034] Adopt Q-learning algorithm, update the estimated value of Q function through continuous trial and learning, and improve the strategy according to the updated Q function;
[0035] Specifically, the update formula of Q-learning is:
[0036] Q(s,a)←Q(s,a)+α*[r+γ*max Q(s',a')-Q(s,a)]
[0037] Among them, α is the learning rate and γ is the discount factor, which determines the importance of future rewards. Q-learning continuously updates the Q function through the above formula until the Q function converges.
[0038] In one embodiment, the optimization calculation uses a genetic algorithm.
[0039] In one embodiment, the verification optimization results include:
[0040] Sensitivity analysis is to change one input parameter while keeping all other input variables constant to see how much the output changes.
[0041] Sensitivity S is defined as the rate of change of the output result Y to the input parameter x, that is:
[0042] S=ΔY / Δx
[0043] By performing sensitivity analysis, a quantitative assessment of the impact of each parameter is obtained.
[0044] Beneficial effects of the present invention:
[0045] The method of the present invention integrates a variety of optimization and learning algorithms, including neural networks, reinforcement learning and genetic algorithms, which can effectively simulate and optimize the dynamic operation of the turbine unit, further improving the operating efficiency of the system and the utilization rate of energy. The modeling method based on the functional model is more reliable and accurate, which helps to improve the prediction accuracy of the system performance. The multi-objective optimization method can deal with the contradictions between multiple objectives and improve the feasibility of the optimization results. The combination of reinforcement learning and genetic algorithms enables the system to self-learn and adjust during operation, improving the adaptability and robustness of the model. Finally, through sensitivity analysis, a quantitative evaluation of the influence of each parameter is obtained, which helps to optimize the decision-making process. Overall, the method of the present invention can improve the operating efficiency of the turbine unit, save energy and reduce operating costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 is a flow chart of the method of the present invention;
[0047] Figure 2 This is a flow chart of the genetic algorithm of the present invention. DETAILED DESCRIPTION
[0048] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Typical embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described in the present invention. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0049] Unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used in the present invention in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Typical embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described in the present invention. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0050] like Figure 1 As shown, a functional model of a hydro turbine unit dynamic simulation and optimization method thereof includes:
[0051] S1. Establish a dynamic system model. This model is based on the dynamic system of the turbine unit of the functional model, including the turbine, governor, generator and power grid; add a neural network algorithm to learn and predict the dynamic behavior of the system from historical data.
[0052] The establishment of the dynamic system model comprises:
[0053] Define the various components of the system, including turbines, speed regulators, generators and power grids. Each component is described using a corresponding mathematical model based on its physical characteristics and operating mechanism. The turbine is described using the following second-order model:
[0054] H(Q)=b0+b1Q+b2Q2
[0055] Among them, H(Q) is the output power, Q is the water flow rate, and b0, b1, b2 are parameters.
[0056] Then, in order to learn from historical data, neural networks can be used. These models can receive a large amount of input data, and after a training process, they can automatically "learn" the hidden laws in the data and accurately predict the dynamic behavior of the system. The training process of the neural network model is mainly to minimize the prediction error by adjusting the network parameters. The commonly used error function is the mean square error:
[0057]
[0058] Among them, yi is the actual value, is the predicted value.
[0059] The training of neural network models usually uses the back propagation algorithm to minimize the error by updating the network parameters layer by layer. The specific formula for parameter update is:
[0060]
[0061] Here, η is the learning rate, w is the weight parameter of the neural network, It is the gradient of the error E to the weight w. By calculating the gradient direction, the direction of the next update is determined to minimize the error.
[0062] Through the above steps, we can build a dynamic system model based on the functional model and combined with deep learning.
[0063] S2. Set optimization goals and constraints. The optimization goal is to maximize power and minimize energy consumption. Constraints include technical regulations and environmental requirements for unit operation. Use multi-objective optimization algorithms to deal with contradictions and conflicts between existing goals.
[0064] The optimization objectives and constraints include:
[0065] For multi-objective optimization problems, each objective is combined into an overall objective in a weighted manner. Here, assume that there are two objectives: maximizing power P and minimizing energy consumption E. These two objectives can be combined into an overall objective F:
[0066] F=w1P-w2E
[0067] Among them, w1 and w2 are the weights of each target.
[0068] Then, the system constraints need to be defined, which usually include technical regulations for unit operation, environmental requirements, etc. In order to represent these constraints, a series of constraint functions gi(x) can be defined to represent the i-th constraint. For example, if there is a constraint that the power cannot exceed a certain upper limit Pmax, then the following constraint function can be defined:
[0069] g(x)=P-Pmax
[0070] When solving the problem, under the premise of satisfying all constraints (i.e., all gi(x) <= 0), find the parameter setting x* that maximizes the overall goal F.
[0071] Using the Lagrange multiplier method, construct the Lagrange function L:
[0072] L=F-Σλi*gi(x)
[0073] Where λi is the Lagrange multiplier. Then, we look for x* and λi that maximize L.
[0074] Solve it iteratively. Use the gradient ascent method. By continuously adjusting the parameters, search along the direction where the objective function grows fastest, and find the parameters that maximize the objective function value.
[0075] S3. Run dynamic simulation and introduce reinforcement learning algorithm to allow the simulation system to gradually improve its operating performance through continuous trial and error and learning.
[0076] The dynamic simulation includes: introducing a reinforcement learning algorithm to improve the performance of the simulation process;
[0077] Specifically, the simulation process can be modeled as a Markov decision process (MDP). In MDP, the model selects an action a (i.e., the set parameters) under a given state s, and then enters the next state s' based on the current state and the selected action, and obtains a reward r.
[0078] The goal of reinforcement learning is to find a strategy π that maximizes the expected cumulative reward by selecting actions according to strategy π starting from any state s. If the Q function is defined as the expected cumulative reward according to strategy π after selecting action a in state s, then the goal is to find a strategy π that maximizes the Q function.
[0079] The Q function satisfies the Bellman equation, that is:
[0080] Q(s,a)=r+γ*E[Q(s',a')|s,a]
[0081] Adopt Q-learning algorithm, update the estimated value of Q function through continuous trial and learning, and improve the strategy according to the updated Q function;
[0082] Specifically, the update formula of Q-learning is:
[0083] Q(s,a)←Q(s,a)+α*[r+γ*max Q(s',a')-Q(s,a)]
[0084] Among them, α is the learning rate and γ is the discount factor, which determines the importance of future rewards. Q-learning continuously updates the Q function through the above formula until the Q function converges.
[0085] In this way, the reinforcement learning algorithm can find the strategy that can obtain the maximum reward in any state through continuous trial and learning, so that the performance of the simulation can be gradually improved.
[0086] S4. Perform optimization calculations and use genetic algorithms to improve optimization efficiency and accuracy.
[0087] like Figure 2 As shown in the figure, genetic algorithm is a global optimization method that simulates natural selection and genetic mechanisms, which mainly includes three steps: selection, crossover and mutation.
[0088] S401. First, the solution to the problem (i.e., each parameter) needs to be encoded to form an individual. The encoding method can be binary encoding or real number encoding, depending on the specific problem.
[0089] S402. It is necessary to define the size of the population, that is, how many individuals there are. The more individuals there are, the wider the search range will be, but the computational complexity will also be higher.
[0090] S403, it is necessary to define a fitness function f to measure the fitness of each individual. In the problem, the fitness function f can be defined as the objective function F.
[0091] S404: Start the iterative process of the genetic algorithm.
[0092] Selection operation: select individuals that can enter the next generation based on the value of the fitness function. "Excellent" individuals have a higher probability of being selected. Common selection operations include roulette selection, ranking selection, etc.
[0093] Crossover operation: According to a certain probability, a crossover operation is performed between selected individuals to generate new individuals. The crossover operation simulates the genetic mechanism in nature and can increase the diversity of the population.
[0094] Mutation operation: Perform mutation operation on newly generated individuals to change some genes of the individuals with a certain probability to increase the diversity and search ability of the population.
[0095] After many iterations, the genetic algorithm can find a near-optimal solution to the problem.
[0096] S5. Verify the optimization results. Use the optimization results as new inputs and perform dynamic simulation again to verify the effectiveness and correctness of the optimization results.
[0097] After completing the optimization calculation, a series of possible solutions, i.e. parameter settings, are obtained. Then, by using these optimization results as a new input, dynamic simulation is performed again to verify the effectiveness and correctness of the optimization results.
[0098] Sensitivity Analysis is to change an input parameter while keeping all other input variables constant to see how much the output changes. If the output is very sensitive to a certain input parameter, then it is said that this input parameter has a great impact on the output.
[0099] Sensitivity S is defined as the rate of change of the output result Y to the input parameter x, that is:
[0100] S=ΔY / Δx
[0101] Usually, each parameter is changed by a fixed ratio (such as 1% or 10%), and then the simulation results are observed to see how much they change. By performing sensitivity analysis, a quantitative assessment of the impact of each parameter can be obtained, which helps to understand which parameters have the greatest impact on the simulation results and which parameters should be adjusted first in order to improve the simulation results.
[0102] In addition, through sensitivity analysis, the stability of the optimization results can also be evaluated, that is, when the input parameters change slightly, whether the simulation results also change greatly. If so, it means that the stability of the optimization results is not good, and further improvement of the optimization algorithm or adjustment of parameter settings is needed.
[0103] Embodiment 1:
[0104] Assuming that a dynamic system of a hydro turbine unit needs to optimize its power output and energy consumption, its dynamic system model is established as follows:
[0105] Step 1: Establish a dynamic system model and use a neural network to learn and predict the dynamic behavior of the system. Set the relationship between the turbine output power H(Q) and the water flow Q as a quadratic function: H(Q) = b0+b1Q+b2Q2, where b0, b1, and b2 are set to 3, 2, and 1 respectively. After learning historical data through the neural network model, set the corresponding prediction parameters for network learning.
[0106] Step 2: Set the optimization goal and constraints. Assume that the optimization goal is to maximize power P and minimize loss E. The weights are set to w1=0.6, w2=0.4, and the overall goal is F=F1w1+F2w2. Then limit the maximum power to 1500KW, and set the power cap in the constraint function: g(x)=Pmax-P. To meet the constraints, all g_i(x)≥0 are true.
[0107] Step 3: Perform dynamic simulation. Use the reinforcement learning algorithm to simulate the Markov decision process. Assume that the state s at this time is the power output and energy consumption of the operating turbine unit, and the action a is the set parameter (such as water flow, etc.). Enter the next state according to the state and action to calculate the reward r.
[0108] Step 4: Perform optimization calculations. Using a genetic algorithm, the initial population is 100, the number of individuals in the next generation is 50, the crossover probability is 0.8, the mutation probability is 0.02, and after evolving to the set 20 generations, the optimized efficiency and accuracy are obtained.
[0109] Step 5: Verify the optimization results. The optimization results obtained by the genetic algorithm are used as new training inputs for the neural network for further dynamic simulation. A sensitivity analysis is performed within a 1% parameter variation range.
[0110] By executing the above steps, the dynamic system of the turbine unit can be effectively simulated and optimized, and the dynamic behavior of the system can be predicted, thereby improving the efficiency of the system operation.
[0111] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0112] It should be understood that the detailed description of the technical solutions of the present invention by means of the preferred embodiments is illustrative rather than restrictive. A person skilled in the art may modify the technical solutions described in the embodiments, or replace some of the technical features by equivalents, based on reading the specification of the present invention; and 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 embodiments of the present invention.
Claims
1. A functional model for dynamic simulation of a hydraulic turbine unit and an optimization method thereof, characterized in that: The method includes: Establish a dynamic system model based on the functional model of the turbine unit dynamic system, including turbine, governor, generator and power grid; add a neural network algorithm to learn and predict the dynamic behavior of the system from historical data; Set optimization goals and constraints. The optimization goal is to maximize power and minimize energy consumption. Constraints include technical regulations and environmental requirements for unit operation. Use multi-objective optimization algorithms to deal with contradictions and conflicts between existing goals. Run dynamic simulation and introduce reinforcement learning algorithms to allow the simulation system to gradually improve its operating performance through continuous trial and error and learning; Perform optimization calculations and use genetic algorithms to improve the efficiency and accuracy of optimization. Verify the optimization results, use the optimization results as new input, perform dynamic simulation again, and verify the effectiveness and correctness of the optimization results.
2. The method for dynamic simulation and optimization of a hydraulic turbine unit according to a functional model of claim 1, characterized in that: The establishment of the dynamic system model comprises: Define the various components of the system, including turbines, speed regulators, generators and power grids. Each component is described using a corresponding mathematical model based on its physical characteristics and operating mechanism. The turbine is described using the following second-order model: H(Q)=b0+b1Q+b2Q2 Among them, H(Q) is the output power, Q is the water flow rate, and b0, b1, b2 are parameters. Use deep learning models such as neural networks to receive input data, and after a training process, automatically "learn" the hidden rules in the data and accurately predict the dynamic behavior of the system; Through the above steps, a dynamic system model based on the functional model and combined with the neural network model is constructed.
3. The method for dynamic simulation and optimization of a hydraulic turbine unit according to a functional model of claim 1, characterized in that: The optimization objectives and constraints include: There are two goals: maximize power P and minimize energy consumption E; these two goals are combined into an overall goal F: F=w1P-w2E Among them, w1 and w2 are the weights of each target; Define the constraints of the system and define a series of constraint functions g_i(x) to represent the i-th constraint. If there is a constraint that the power cannot exceed the upper limit Pmax, then define the following constraint function: g(x)=P-Pmax When solving the problem, under the premise of satisfying all constraints (i.e., all gi(x) <= 0), find the parameter setting x* that maximizes the overall goal F. Using the Lagrange multiplier method, construct the Lagrange function L: L=F-Σλi*gi(x) Where λi is the Lagrange multiplier. Then, we look for x* and λi that maximize L.
4. The method for dynamic simulation and optimization of a hydraulic turbine unit according to a functional model of claim 1, characterized in that: The dynamic simulation includes: introducing a reinforcement learning algorithm to improve the performance of the simulation process; Specifically, the simulation process is modeled as a Markov decision process MDP; in MDP, the model selects an action a (i.e., the set parameters) under a given state s, and then enters the next state s' according to the current state and the selected action, and obtains a reward r; The goal of reinforcement learning is to find a strategy π so that starting from any state s, actions are selected according to strategy π to maximize the expected cumulative reward; Define the Q function as the expected cumulative reward according to the strategy π after selecting action a in state s, then the goal is to find the strategy π that maximizes the Q function; The Q function satisfies the Bellman equation, that is: Q(s,a)=r+γ*E[Q(s',a')|s,a] Adopt Q-learning algorithm, update the estimated value of Q function through continuous trial and learning, and improve the strategy according to the updated Q function; Specifically, the update formula of Q-learning is: Q(s,a)←Q(s,a)+α*[r+γ*max Q(s',a')-Q(s,a)] Among them, α is the learning rate and γ is the discount factor, which determines the importance of future rewards. Q-learning continuously updates the Q function through the above formula until the Q function converges.
5. The method for dynamic simulation and optimization of a hydraulic turbine unit based on a functional model according to claim 1, characterized in that: The optimization calculation uses a genetic algorithm.
6. The method for dynamic simulation and optimization of a hydraulic turbine unit based on a functional model according to claim 1, characterized in that: The verification and optimization results include: Sensitivity analysis is to change one input parameter while keeping all other input variables constant to see how much the output changes. Sensitivity S is defined as the rate of change of the output result Y to the input parameter x, that is: S=ΔY / Δx By performing sensitivity analysis, a quantitative assessment of the impact of each parameter is obtained.