Micro-hydropower pressure and power coordinated control method integrated with pressure reducing valve

By using an improved particle swarm optimization algorithm and dual-mode switching control, the problem of synergistic optimization between pressure stabilization and energy recovery in pressure-reducing valves and micro hydropower systems was solved, achieving rapid response and efficient power generation.

CN122485751APending Publication Date: 2026-07-31PIPE NETWORK MANAGEMENT BRANCH OF BEIJING WATERWORKS GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PIPE NETWORK MANAGEMENT BRANCH OF BEIJING WATERWORKS GRP CO LTD
Filing Date
2026-06-01
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing pressure reducing valves and micro hydropower integrated systems lack synergistic optimization between pressure stability and energy recovery. Traditional control methods cannot autonomously balance pressure regulation and power generation demand under different operating conditions, resulting in pressure fluctuations or energy waste.

Method used

An improved particle swarm optimization algorithm is used to generate adaptive inertial weights based on the downstream pressure deviation direction of the pressure reducing valve. Combined with a dual-mode switching control strategy based on the pressure stability dead zone threshold, the coordinated optimization of pressure and power generation is achieved.

Benefits of technology

It improves pressure response speed, suppresses overshoot, ensures downstream pressure stability, and maximizes power generation benefits during pressure fluctuations, achieving synergistic optimization of pressure quality and power generation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122485751A_ABST
    Figure CN122485751A_ABST
Patent Text Reader

Abstract

This invention discloses a method for coordinated pressure and power control of a micro-hydropower generation system integrating a pressure-reducing valve, belonging to the technical field of coordinated control of micro-hydropower generation and pressure-reducing valves. High-pressure water is drawn from upstream of the pressure-reducing valve via a bypass pipeline, flowing through a micro-hydrogen generator unit to drive a permanent magnet synchronous generator to generate electricity. An improved particle swarm optimization algorithm is used to iteratively optimize the guide vane opening. This algorithm generates adaptive inertial weights for particle velocity updates based on the deviation direction between the real-time collected downstream pressure value of the pressure-reducing valve and the set value. When the absolute value of the downstream pressure deviation is greater than a preset pressure stabilization dead zone threshold, a pressure stabilization priority control strategy is implemented. The improved particle swarm optimization algorithm calculates the guide vane opening adjustment amount to drive a stepper motor, making the downstream pressure approach the set value. When the absolute value of the deviation is less than or equal to the dead zone threshold, the system switches to a residual energy generation control strategy, searching for the optimal guide vane opening with theoretically recoverable power as the optimization objective to maximize power generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of micro hydropower generation and pressure reducing valve coordinated control technology, specifically a method for coordinated control of pressure and power in micro hydropower generation with integrated pressure reducing valve. Background Technology

[0002] In urban water supply networks or industrial fluid transport systems, pressure reducing valves are used to reduce the pressure of upstream high-pressure water flow to the required stable pressure downstream to meet user water or process requirements. Traditional pressure reducing valves consume excess pressure energy through throttling, resulting in significant energy waste. To recover this energy, existing technologies integrate micro-hydrogen generators with pressure reducing valves, using bypass pipelines to divert a portion of the high-pressure water flow for power generation. However, such integrated systems face a contradiction between pressure stability and power generation efficiency: when water load fluctuations cause downstream pressure to deviate from the set value, the guide vane opening needs to be quickly adjusted to restore pressure stability. However, if maximizing power generation is still the goal, pressure fluctuations may be exacerbated; conversely, pursuing only pressure stability will sacrifice power generation. Existing control methods mostly employ fixed weights or single-objective optimization, failing to autonomously balance pressure regulation and power generation demands under different operating conditions. Particle swarm optimization algorithms are widely used in engineering optimization, but the inertia weights of standard particle swarm optimization algorithms are fixed values ​​or decrease linearly with the number of iterations, lacking the ability to adapt to real-time system states. In pressure reducing valve-power generation coordinated control, the direction and magnitude of downstream pressure deviation reflect the degree to which the system deviates from steady state. If the inertial weight cannot be dynamically adjusted according to the direction of deviation, it may lead to slow convergence or overshoot in the optimization process, affecting the pressure recovery speed or even causing oscillations. In addition, existing control strategies usually have a fixed operating mode and fail to actively switch to energy recovery mode when the pressure stability margin is sufficient, and it is also difficult to take into account both objectives in the critical region of pressure fluctuation.

[0003] The two core innovations of this invention are: First, an improved particle swarm optimization algorithm is proposed, which dynamically generates adaptive inertia weights based on the downstream pressure deviation direction of the pressure reducing valve. This allows the guide vane opening optimization process to actively adjust the search step size according to positive or negative deviations, improving pressure response speed and suppressing overshoot. Second, a dual-mode switching control strategy based on a pressure stability dead zone threshold is introduced. When the deviation exceeds the dead zone, pressure stabilization is prioritized; when the deviation falls into the dead zone, the system automatically switches to residual power generation mode, using theoretically recoverable power as the optimization objective. Simultaneously, constraints ensure that the pressure does not exceed the limit, thereby maximizing power generation revenue while guaranteeing downstream pressure quality. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of existing integrated systems of pressure reducing valves and micro hydropower generation in terms of the lack of synergistic optimization between pressure stabilization and energy recovery. It provides a control method that can adaptively adjust the inertial weight of the particle swarm optimization algorithm according to the direction of downstream pressure deviation, and intelligently switch between two modes of pressure stabilization priority and residual energy power generation according to the magnitude of the deviation, so as to achieve synergistic optimization of pressure stabilization and power generation.

[0005] The objective of this invention can be achieved through the following technical solutions: This invention provides a method for coordinated pressure and power control of a micro hydropower generation system integrating a pressure-reducing valve. The method involves drawing high-pressure water from upstream of the pressure-reducing valve via a bypass pipeline, which is connected in parallel with the valve. The high-pressure water flows through a micro turbine generator unit, driving a permanent magnet synchronous generator to generate electricity. At the control level, this invention employs an improved particle swarm optimization algorithm to iteratively optimize the guide vane opening. This improved algorithm generates adaptive inertial weights for particle velocity updates based on the deviation between the real-time collected downstream pressure value and the downstream pressure setpoint, thereby achieving a dynamic balance between pressure regulation and power capture.

[0006] As a technical solution of this invention, when the absolute value of the deviation between the downstream pressure value of the pressure reducing valve and the downstream pressure setpoint is greater than a preset pressure stabilization dead zone threshold, a pressure stabilization priority control strategy is executed. This strategy calculates the guide vane opening adjustment amount through an improved particle swarm optimization algorithm and drives a stepper motor to adjust the guide vane opening, so that the downstream pressure value of the pressure reducing valve approaches the downstream pressure setpoint. By introducing an adaptive inertial weight that senses the direction of pressure deviation, the algorithm can converge quickly when the pressure deviation is large, ensuring that the downstream pressure quickly recovers to near the setpoint and effectively suppressing the impact of pressure fluctuations on downstream pipeline users.

[0007] When the absolute value of the deviation between the downstream pressure value and the downstream pressure setpoint is less than or equal to the pressure stabilization dead zone threshold, the system switches to a residual energy generation control strategy. This strategy uses an improved particle swarm optimization algorithm to search for the optimal guide vane opening with theoretically recoverable power as the optimization objective, thereby maximizing the output power of the micro-hydro turbine generator unit. In this mode, since the pressure is already within the allowable range, the algorithm focuses on utilizing the residual pressure difference to generate electricity, improving energy recovery efficiency.

[0008] Preferably, the improved particle swarm optimization algorithm iteratively updates the particle swarm position vector and particle swarm velocity vector, performing the following steps: initializing the particle swarm, with each particle carrying a candidate guide vane opening value as its position vector, and randomly initializing the corresponding particle velocity vector; obtaining the fitness value of each particle in the current iteration, calculated based on the absolute value of the deviation between the downstream pressure value and the downstream pressure setpoint under the pressure stabilization priority control strategy, and calculated based on the theoretical recoverable power value under the waste heat generation control strategy; determining the global optimal particle position vector and the individual optimal particle position vector of each particle based on the fitness value; generating the gravitational component of each particle based on the difference between the global optimum and the individual optimum; and based on the current... The difference between the particle position vectors of the previous iteration and the current iteration generates the momentum component of each particle. Based on the deviation direction between the downstream pressure value of the pressure reducing valve and the downstream pressure setpoint in the current iteration, a dynamic adjustment factor for the inertia weight is generated, with the deviation direction being either positive or negative. The preset inertia weight benchmark value is weighted and adjusted using the dynamic adjustment factor to obtain the adaptive inertia weight for each particle in the current iteration. The particle velocity vector is updated based on the adaptive inertia weight, gravitational component, and momentum component. The particle position vector is updated based on the updated velocity vector. When the maximum number of iterations is reached or the rate of change of the fitness values ​​of all particles is less than the convergence threshold, the globally optimal particle position vector is output as the guide vane opening command value. This method, by introducing momentum components and adaptive inertia weights, enhances the global exploration and local exploitation capabilities of the particle swarm in the search space, avoiding the tendency of traditional particle swarm optimization algorithms to get trapped in local optima, while also accelerating the convergence speed.

[0009] In a further technical solution of the present invention, the adaptive inertia weight, under the pressure stabilization priority control strategy, monotonically decreases as the absolute value of the deviation between the downstream pressure value and the downstream pressure setpoint of the pressure reducing valve increases. This design allows the particle swarm to perform a global search to quickly find a feasible solution with a large adjustment amount when the pressure deviation is large, and the inertia weight increases when the pressure deviation decreases, enhancing the local search accuracy, thereby balancing the adjustment speed and steady-state accuracy during the pressure recovery process.

[0010] As a specific embodiment of the present invention, a dynamic adjustment factor for inertia weight is generated based on the deviation direction between the downstream pressure value of the pressure reducing valve and the downstream pressure setpoint in the current iteration. This includes: when the deviation direction is positive (the downstream pressure value of the pressure reducing valve is greater than the downstream pressure setpoint), obtaining the ratio of the absolute value of the deviation in the current iteration to a preset upper pressure safety margin value, and generating a positive deviation strength coefficient; scaling a preset positive deviation inertia weight attenuation factor using the positive deviation strength coefficient to generate a dynamic adjustment factor corresponding to the positive deviation direction; when the deviation direction is negative (the downstream pressure value of the pressure reducing valve is less than the downstream pressure setpoint), obtaining the ratio of the absolute value of the deviation in the current iteration to a preset lower pressure safety margin value, and generating a negative deviation strength coefficient; scaling a preset negative deviation inertia weight enhancement factor using the negative deviation strength coefficient to generate a dynamic adjustment factor corresponding to the negative deviation direction. The dynamic adjustment factor corresponding to the positive deviation direction is generated according to the following formula: The dynamic adjustment factor corresponding to the negative deviation direction is generated according to the following formula: in: This is the dynamic adjustment factor corresponding to the positive deviation direction, and it is dimensionless. The preset positive deviation inertia weight attenuation factor has a value range of [0.1, 0.5]. The absolute value of the deviation between the downstream pressure value and the downstream pressure set value of the pressure reducing valve, in megapascals; This is the preset upper limit safety margin value for pressure, in megapascals (MPA). This is the dynamic adjustment factor corresponding to the negative deviation direction, and it is dimensionless. The preset negative bias inertia weight enhancement factor has a value range of [0.2, 0.8]. This is the preset lower pressure safety margin value, in megapascals (MPA). By distinguishing between positive and negative deviation directions and employing different adjustment factor generation strategies, the algorithm can adaptively adjust the inertial weight according to the direction of pressure overshoot. When the pressure is too high, the inertial weight is accelerated to quickly reduce the guide vane opening; when the pressure is too low, the inertial weight is moderately increased to avoid excessive reduction of the guide vane opening, which would cause the pressure to drop further. This improves the stability and robustness of pressure control.

[0011] Preferably, when executing the voltage stabilization priority control strategy, the guide vane opening command value output by the improved particle swarm optimization algorithm is compared with the current actual guide vane opening value to generate an opening deviation; the sign of the opening deviation is determined to generate a stepper motor rotation direction control signal; the number of steps required by the stepper motor is calculated based on the absolute value of the opening deviation and the stepper motor's step angle parameter; the stepper motor rotation direction control signal and the number of steps required by the stepper motor are encoded into a pulse width modulation signal sequence; the pulse width modulation signal sequence is sent to the stepper motor driver, causing the stepper motor to drive the guide vane actuator according to the control signal and the number of steps; after the stepper motor completes the required number of steps, the actual guide vane opening value output by the guide vane position feedback sensor is acquired; when the absolute value of the residual deviation between the actual guide vane opening value and the guide vane opening command value is greater than the preset guide vane positioning dead zone threshold, the above steps are repeated until the residual deviation meets the requirements. By combining closed-loop feedback control with pulse width modulation drive, high-precision positioning of the guide vane opening is achieved, avoiding the accumulation of positioning errors caused by mechanical backlash or load fluctuations, and ensuring that the guide vane opening accurately follows the command value output by the optimized algorithm.

[0012] As a technical solution of this invention, when switching to the waste heat power generation control strategy, the bypass flow rate, upstream pressure of the pressure reducing valve, and downstream pressure of the pressure reducing valve are collected in real time on the bypass pipeline; the current pressure difference is calculated based on the upstream and downstream pressure values; and the current theoretical recoverable power value is calculated based on the current pressure difference, the bypass flow rate, and the preset water flow density parameter. The current theoretical recoverable power value is calculated according to the following formula: in: This is the current theoretical recoverable power value, in watts; The comprehensive efficiency coefficient of the micro hydro-generator unit is defined as [0.6, 0.9]. This is a preset water flow density parameter, in kilograms per cubic meter. This is the bypass flow rate, expressed in cubic meters per second. This is the acceleration due to gravity, measured in meters per second squared. The current pressure difference, in meters of water column, is calculated from the difference between the upstream and downstream pressure values ​​of the pressure reducing valve. The current theoretical recoverable power value is used as the fitness function input to the improved particle swarm optimization algorithm, enabling the algorithm to iteratively search the feasible search space for the optimal guide vane opening that maximizes the fitness function. In each iteration, the estimated downstream pressure change of the pressure reducing valve is calculated based on the estimated bypass flow rate corresponding to the candidate guide vane opening value in the current iteration. The estimated downstream pressure change is then used to determine whether the current candidate guide vane opening value meets the downstream pressure constraint condition, which requires that the absolute value of the deviation between the downstream pressure value and the downstream pressure setpoint be less than or equal to the pressure stability dead zone threshold. When a candidate guide vane opening value does not meet the constraint condition, a penalty factor is applied to the fitness value corresponding to that candidate guide vane opening value, reducing its probability of being selected as the globally optimal particle. By introducing a downstream pressure constraint penalty mechanism, the waste energy generation control strategy ensures that the downstream pressure does not exceed the limit while pursuing power maximization, achieving synergistic optimization of pressure stability and waste energy generation.

[0013] Preferably, the penalty factor increases exponentially based on the absolute value of the deviation between the downstream pressure value and the downstream pressure setpoint caused by the candidate guide vane opening value. This exponential penalty quickly eliminates candidate solutions that severely violate the pressure constraints, while allowing candidate solutions that slightly exceed the limits to retain a certain probability in the early stages of the search. This helps the algorithm find the optimal solution near the constraint boundary, improving the search flexibility and the strictness of constraint satisfaction.

[0014] As a further improvement of this invention, the pressure stabilization dead zone threshold is adaptively adjusted based on the standard deviation of water load fluctuations in the downstream pipeline of the pressure reducing valve. When water load fluctuations are large, the dead zone threshold is appropriately increased to avoid frequent control switching; when fluctuations are small, the dead zone threshold is decreased to improve pressure control accuracy. This adaptive mechanism enables the control strategy to adapt to different downstream operating conditions, balancing pressure stability and power generation continuity.

[0015] In one technical solution of the present invention, when the absolute value of the deviation between the downstream pressure value of the pressure reducing valve and the downstream pressure set value is less than or equal to the pressure stabilization dead zone threshold and the current differential pressure value is less than the preset low differential pressure sleep threshold, a low power consumption standby control strategy is executed. The strategy includes: controlling a stepper motor to drive the guide vane actuator to adjust the guide vane opening to the fully closed position, cutting off the high-pressure water flow in the bypass pipeline and stopping the micro turbine generator; recording the downstream pressure value of the pressure reducing valve at the moment the guide vane opening is fully closed as the standby reference pressure value; switching the microcontroller in the control unit to a deep sleep mode, in which the microcontroller's internal clock divider is configured to the lowest operating frequency, the microcontroller's analog-to-digital conversion module and pulse width modulation module are powered off, and the microcontroller's external interrupt pin is configured as a wake-up source; in deep sleep mode, periodically waking up the microcontroller's real-time clock module to collect the downstream pressure value of the pressure reducing valve at a preset sampling period; when the absolute value of the deviation between the downstream pressure value of the pressure reducing valve collected by the real-time clock module and the standby reference pressure value is greater than the preset wake-up pressure fluctuation threshold, triggering the microcontroller to exit the deep sleep mode through the external interrupt pin and resuming the pressure stabilization priority control strategy. By employing a low-power standby control strategy, the system significantly reduces its own power consumption under conditions of no power generation potential and stable pressure, extending the standby time of the equipment in off-grid or battery-powered scenarios. At the same time, it enables rapid wake-up through pressure fluctuation monitoring, ensuring the timeliness of pressure control response.

[0016] As a preferred embodiment of the present invention, when a power generation anomaly is detected, a fault handling control strategy is executed. This strategy includes: real-time monitoring of the output voltage amplitude, output voltage frequency, and motion state of the guide vane actuator of the permanent magnet synchronous generator; generating an electrical anomaly flag when the output voltage amplitude exceeds a preset overvoltage protection threshold or falls below a preset undervoltage protection threshold; generating a mechanical anomaly flag when the output voltage frequency exceeds a preset upper speed limit threshold or falls below a preset lower speed limit threshold; generating a guide vane jamming flag when the motion state of the guide vane actuator does not match the pulse width modulation signal sequence output by the stepper motor driver and the duration exceeds a preset jamming judgment time window; and when any of the above anomaly flags are generated... When the bypass pipeline inlet isolation valve is closed, a closing pulse signal is sent to the electric actuator. After sending the closing pulse signal, the valve position status feedback signal of the bypass pipeline inlet isolation valve is continuously acquired. When the valve position status feedback signal indicates that the isolation valve is fully closed, the microcontroller in the control unit is switched to fault lockout mode. In this mode, the microcontroller stops sending any control signals to the stepper motor driver. A fault alarm data frame is sent to the upper management platform through the communication interface of the control unit. This data frame contains the status codes of electrical abnormality flags, mechanical abnormality flags, and guide vane jamming flags, as well as the timestamp of the fault occurrence. Through multiple fault detection and hierarchical response mechanisms, the system can quickly cut off the high-pressure water flow when electrical, mechanical, or guide vane jamming abnormalities occur, preventing the fault from escalating. At the same time, the fault status is recorded for remote operation and maintenance, improving the system's safety and maintainability.

[0017] Preferably, real-time monitoring of the motion state of the guide vane actuator of the permanent magnet synchronous generator and determining whether it matches the pulse width modulation signal sequence output by the stepper motor driver includes: acquiring the number of rising edges of pulses in the pulse width modulation signal sequence output by the stepper motor driver to generate a desired step count; acquiring the quadrature encoded pulse signal output by the magnetic encoder mounted on the guide vane actuator, performing phase detection processing on the quadrature encoded pulse signal to generate an actual step count and a motion direction indicator; measuring the pulse width of the quadrature encoded pulse signal to generate a time interval sequence between adjacent pulses; calculating the instantaneous motion speed sequence of the guide vane actuator based on the time interval sequence; performing a moving average filter on the instantaneous motion speed sequence to generate a smooth motion speed curve; determining a motion state mismatch when the absolute value of the difference between the desired step count and the actual step count is greater than a preset step loss count threshold; determining a motion state mismatch when the motion direction indicator is inconsistent with the direction command implicit in the pulse width modulation signal sequence; and determining a motion state mismatch when the speed value in the smooth motion speed curve continuously decreases while the desired step count is still increasing. By combining pulse counting, direction detection, and velocity curve analysis, abnormal states such as step loss, reverse motion, or jamming of the guide vane actuator can be accurately identified, improving the reliability and timeliness of fault detection.

[0018] In another technical solution of the present invention, when the energy storage battery charge is lower than the preset undervoltage switching threshold, a power supply redundancy control strategy is executed. The strategy includes: real-time monitoring of the battery's terminal voltage, charging / discharging current, and temperature; calculating the remaining battery capacity percentage using coulomb counting; disconnecting the first switching element between the battery and the DC output when the remaining capacity percentage is below the undervoltage switching threshold; detecting the input voltage of the external DC backup power interface; closing the second switching element between the external DC backup power interface and the DC output when the input voltage is within the preset effective backup power voltage range; simultaneously maintaining the charging circuit between the external DC backup power interface and the battery, allowing the external DC backup power interface to charge the battery in a constant current and voltage-limited manner; disconnecting the second switching element and closing the first switching element when the remaining battery capacity percentage rises above the preset recovery charging threshold, restoring power supply from the battery to the DC output; and gradually shutting down the non-critical load power supply ports on the DC output when the input voltage is outside the effective backup power voltage range and the remaining capacity percentage is below the preset shutdown protection threshold, retaining only the lowest power consumption power supply channels for the control unit and communication interface. Through this power supply redundancy management, the system can seamlessly switch to an external backup power source when the energy storage battery is low, maintaining the continuous operation of the control unit and communication functions. When there is no external backup power source, the power supply time of the core functions is extended by gradually shutting down non-critical loads, thereby improving the power supply reliability and survivability of the system.

[0019] As a preferred technical solution of the present invention, the calculation parameters of theoretically recoverable power are dynamically corrected during the execution of the waste energy power generation control strategy. The dynamic correction includes: under stable operating conditions where the guide vane opening remains constant, collecting bypass flow rate and generator output power sequences for multiple consecutive sampling periods; performing outlier removal on the bypass flow rate sequence to generate a filtered flow rate sequence; performing outlier removal on the generator output power sequence to generate a filtered power sequence; using the filtered flow rate and power sequences, identifying the actual turbine efficiency coefficient under the current operating conditions online using a recursive least squares algorithm; comparing the identified actual turbine efficiency coefficient with the preset theoretical efficiency coefficient to generate an efficiency decay factor; correcting the preset efficiency parameters in the theoretical recoverable power calculation formula online based on the efficiency decay factor to obtain the corrected efficiency parameters; storing the corrected efficiency parameters in an efficiency parameter lookup table in non-volatile memory, indexed by the current differential pressure and current guide vane opening; when the same current differential pressure and current guide vane opening values ​​reappear in subsequent operations, directly retrieving the corrected efficiency parameters from the efficiency parameter lookup table for theoretical recoverable power calculation. Through online identification and efficiency parameter lookup table learning mechanisms, the system can automatically compensate for efficiency changes in the turbine caused by wear, scaling, or aging, making the calculation of theoretical recoverable power closer to reality, thereby improving the optimization accuracy and power generation of the surplus energy power generation control strategy.

[0020] The beneficial effects of this invention are: An improved particle swarm optimization algorithm is adopted, which generates adaptive inertial weights based on the downstream pressure deviation direction of the pressure reducing valve. When the deviation direction is positive (i.e., the downstream pressure is higher than the set value), a positive deviation direction dynamic adjustment factor is generated. This adjustment factor is obtained by scaling the positive deviation intensity coefficient with a preset positive deviation inertial weight attenuation factor, so that the inertial weight monotonically decreases as the absolute value of the deviation increases. This actively reduces the inertial component of the particle velocity during pressure overshoot, accelerates particle convergence to the optimal solution, and allows the guide vane opening to adjust rapidly in the direction of reducing downstream pressure, reducing pressure fall time and preventing oscillation. When the deviation direction is negative (i.e., the downstream pressure is lower than the set value), a negative deviation direction dynamic adjustment factor is generated. This adjustment factor is obtained by scaling the negative deviation intensity coefficient with a preset negative deviation inertial weight enhancement factor, so that the inertial weight increases as the absolute value of the deviation increases. This enhances the globality of the particle search when the pressure is insufficient, avoids insufficient guide vane opening adjustment due to premature convergence of the algorithm, and accelerates the pressure recovery speed. This adaptive mechanism enables the particle swarm optimization algorithm to output appropriate guide vane opening adjustment amounts under different deviation directions and magnitudes, significantly improving the quality of dynamic pressure response. A dual-mode switching control strategy based on a pressure stability dead zone threshold is introduced. When the absolute value of the downstream pressure deviation of the pressure reducing valve is greater than the dead zone threshold, a pressure stabilization priority control strategy is executed. At this time, the fitness function of the improved particle swarm optimization algorithm is calculated based on the absolute value of the deviation. The algorithm takes minimizing the deviation as the optimization objective and drives the stepper motor to quickly adjust the guide vane opening to bring the downstream pressure back to the set value, ensuring that the pressure fluctuation at the water terminal is limited to a safe range. When the absolute value of the deviation is less than or equal to the dead zone threshold, the strategy switches to a residual power generation control strategy. At this time, the algorithm uses the theoretical recoverable power as the fitness function and iteratively searches for the optimal opening that maximizes the power generation within the feasible search space of the guide vane opening. At the same time, in each iteration, the downstream pressure change is calculated based on the estimated bypass flow corresponding to the candidate opening. When the candidate opening causes the downstream pressure deviation to exceed the dead zone, a penalty factor that increases exponentially with the absolute value of the deviation is applied to reduce the probability that the candidate solution is selected as the global optimum, thereby actively constraining the pressure from exceeding the limit in the residual power generation mode. This switching mechanism enables the system to automatically switch to energy recovery mode when the pressure stability margin is sufficient, making full use of the available power generation resources, while prioritizing the pressure stabilization function when the pressure fluctuates, thus achieving optimal synergy between pressure quality and power generation efficiency. Attached Figure Description

[0021] The invention will now be further described with reference to the accompanying drawings.

[0022] Figure 1 This is a flowchart of a micro hydropower generation pressure and power coordinated control method with an integrated pressure reducing valve, as described in this invention. Figure 2 This is a flowchart of the closed-loop adjustment of the guide vane opening under the pressure stabilization priority control strategy; Figure 3This is a flowchart of the low-power standby control strategy execution. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] See Figure 1 This invention provides a method for coordinated pressure and power control of a micro hydropower generation system integrating a pressure reducing valve. The method includes: drawing high-pressure water flow from upstream of the pressure reducing valve via a bypass pipeline, the bypass pipeline being arranged in parallel with the pressure reducing valve; the high-pressure water flow passing through a micro turbine generator unit and driving a permanent magnet synchronous generator to generate electricity; iteratively optimizing the guide vane opening using an improved particle swarm optimization algorithm; the improved particle swarm optimization algorithm generating adaptive inertial weights for particle velocity updates based on the deviation direction between the real-time collected downstream pressure value of the pressure reducing valve and the downstream pressure setpoint; and controlling the pressure and power output of the micro hydropower generation system when the deviation between the downstream pressure value of the pressure reducing valve and the downstream pressure setpoint is zero. When the pressure value exceeds the preset pressure stabilization dead zone threshold, a pressure stabilization priority control strategy is executed. This strategy calculates the guide vane opening adjustment using the improved particle swarm optimization algorithm and drives a stepper motor to adjust the guide vane opening, making the downstream pressure value of the pressure reducing valve approach the downstream pressure setpoint. When the absolute value of the deviation between the downstream pressure value and the downstream pressure setpoint is less than or equal to the pressure stabilization dead zone threshold, the strategy switches to a residual power generation control strategy. This strategy searches for the optimal guide vane opening using the improved particle swarm optimization algorithm with theoretical recoverable power as the optimization objective, thereby maximizing the output power of the micro-hydro turbine generator unit.

[0025] Example 1: In a specific implementation, the improved particle swarm optimization algorithm iteratively updates the particle swarm position vector and particle swarm velocity vector. The improved particle swarm optimization algorithm performs the following steps.

[0026] Initialize the particle swarm. Each particle in the swarm carries a candidate guide vane opening value as its position vector. The total number of particles in the swarm is set to 30. The particle velocity vector corresponding to each particle is randomly generated during initialization. The initial value of the particle velocity vector is uniformly randomly selected within the range of [-0.1, 0.1], in degrees per iteration.

[0027] Obtain the fitness value of each particle in the current iteration round. When executing the voltage stabilization priority control strategy, the fitness value is calculated based on the absolute value of the deviation between the downstream pressure value of the pressure reducing valve and the downstream pressure setpoint. The fitness value is equal to the negative of this absolute value of deviation; that is, the smaller the fitness value, the smaller the deviation. When executing the waste energy generation control strategy, the fitness value is calculated based on the theoretical recoverable power value, and the fitness value is equal to the theoretical recoverable power value itself.

[0028] Based on the fitness value of each particle in the current iteration, determine the globally optimal particle position vector and the individual optimal particle position vector for each particle in the current iteration. The globally optimal particle position vector is the particle position vector corresponding to the particle with the highest fitness value among all particles in the current iteration. The individual optimal particle position vector for each particle is the particle position vector with the highest fitness value that the particle has experienced since initialization.

[0029] The gravitational component of each particle is generated based on the difference between the globally optimal particle position vector of the current iteration and the individual optimal particle position vector of each particle. For each particle, the gravitational component is calculated according to the following formula: in Let be the gravitational component of the i-th particle, which is dimensionless; The individual learning factor is set to 2.0, dimensionless; The social learning factor is set to 2.0 and is dimensionless. and All are dimensionless random numbers uniformly distributed in the interval [0,1]. Let be the individual optimal particle position vector of the i-th particle, in degrees; Let i be the particle position vector of the i-th particle in the current iteration round, in degrees; This represents the global optimal particle position vector for the current iteration, in degrees.

[0030] The momentum component of each particle is generated based on the difference between the particle position vector of each particle in the current iteration and the particle position vector of each particle in the previous iteration. For each particle, the momentum component is calculated according to the following formula: in: Let be the momentum component of the i-th particle, in degrees; Let i be the particle position vector of the i-th particle in the current iteration round, in degrees; Let be the particle position vector of the i-th particle in the previous iteration, in degrees. In the first iteration, the particle position vector from the previous iteration is taken as the initial particle position vector.

[0031] A dynamic adjustment factor for inertia weight is generated based on the direction of deviation between the downstream pressure value of the pressure reducing valve and the downstream pressure setpoint in the current iteration. The deviation direction can be positive or negative. A positive deviation direction indicates that the downstream pressure value of the pressure reducing valve is greater than the downstream pressure setpoint. A negative deviation direction indicates that the downstream pressure value of the pressure reducing valve is less than the downstream pressure setpoint.

[0032] When the deviation direction is positive, the ratio of the absolute value of the deviation between the downstream pressure value and the downstream pressure setpoint of the pressure reducing valve in the current iteration to the preset pressure upper limit safety margin is used to generate a positive deviation strength coefficient. The positive deviation strength coefficient is equal to the absolute value of the deviation divided by the pressure upper limit safety margin. The preset pressure upper limit safety margin is set to 0.2 MPa. The positive deviation strength coefficient is used to scale the preset positive deviation inertia weight attenuation factor to generate a dynamic adjustment factor corresponding to the positive deviation direction. The dynamic adjustment factor corresponding to the positive deviation direction is generated according to the following formula: in: This is the dynamic adjustment factor corresponding to the positive deviation direction, and it is dimensionless. The preset positive deviation inertia weight attenuation factor has a value range of [0.1, 0.5], and is set to 0.3 in this embodiment; The absolute value of the deviation between the downstream pressure value and the downstream pressure set value of the pressure reducing valve, in megapascals; The preset upper limit safety margin value for pressure is in megapascals (MPa), and is set to 0.2 MPa.

[0033] When the deviation direction is negative, the ratio of the absolute value of the deviation between the downstream pressure value and the downstream pressure setpoint of the pressure reducing valve in the current iteration to the preset lower pressure safety margin value is used to generate a negative deviation strength coefficient. The negative deviation strength coefficient is equal to the absolute value of the deviation divided by the lower pressure safety margin value. The preset lower pressure safety margin value is set to 0.2 MPa. The negative deviation strength coefficient is used to scale the preset negative deviation inertia weight enhancement factor to generate a dynamic adjustment factor corresponding to the negative deviation direction. The dynamic adjustment factor corresponding to the negative deviation direction is generated according to the following formula: in: This is the dynamic adjustment factor corresponding to the negative deviation direction, and it is dimensionless. The preset negative deviation inertia weight enhancement factor has a value range of [0.2, 0.8], and is set to 0.5 in this embodiment; The absolute value of the deviation between the downstream pressure value and the downstream pressure set value of the pressure reducing valve, in megapascals; The preset lower limit safety margin value for pressure is in megapascals (MPa), and is set to 0.2 MPa.

[0034] An adaptive inertia weight for each particle in the current iteration is obtained by weighting the preset inertia weight baseline value using a dynamic adjustment factor. The preset inertia weight baseline value is set to 0.7, which is dimensionless. When the deviation direction is positive, the adaptive inertia weight is calculated according to the following formula: in: Let be the adaptive inertia weight of the i-th particle in the current iteration round, which is dimensionless; The preset inertial weight benchmark value is dimensionless. This is the dynamic adjustment factor corresponding to the positive deviation direction, and it is dimensionless. When the deviation direction is negative, the adaptive inertia weight is calculated according to the following formula: in: Let be the adaptive inertia weight of the i-th particle in the current iteration round, which is dimensionless; The preset inertial weight benchmark value is dimensionless. This is the dimensionless dynamic adjustment factor corresponding to the negative deviation direction. Under the pressure stabilization priority control strategy, the adaptive inertia weight monotonically decreases as the absolute value of the deviation between the downstream pressure value and the downstream pressure setpoint of the pressure reducing valve increases. Specifically, in the positive deviation direction, the adaptive inertia weight decreases as the absolute value of the deviation increases; in the negative deviation direction, the adaptive inertia weight increases as the absolute value of the deviation increases.

[0035] The particle velocity vector of each particle is updated based on its adaptive inertia weight, gravitational component, and momentum component. The particle velocity vector update is calculated according to the following formula: in: Let be the updated particle velocity vector for the i-th particle, in degrees per iteration. Let be the adaptive inertia weight of the i-th particle in the current iteration round, which is dimensionless; Let be the particle velocity vector of the i-th particle before the current iteration round, in degrees per iteration round; Let be the gravitational component of the i-th particle, which is dimensionless. The momentum component is implicitly included in the calculation of the gravitational component and is not added separately. In practical applications, the momentum component is represented by the position difference from the previous iteration, but the update formula here only uses the gravitational component and the inertial weight term. To ensure that the particle velocity vector does not exceed a reasonable range, the updated particle velocity vector is limited, with an upper limit set at 0.5 degrees per iteration and a lower limit set at -0.5 degrees per iteration.

[0036] Update the particle position vector of each particle based on its updated particle velocity vector. The particle position vector update is calculated according to the following formula: in: Let be the updated particle position vector for the i-th particle, in degrees; Let be the particle position vector of the i-th particle before the current iteration round, in degrees; Let be the updated particle velocity vector for the i-th particle, expressed in degrees per iteration. Simultaneously, boundary constraints are applied to the updated particle position vector, with a lower bound of 0 degrees and an upper bound of 90 degrees for the feasible search space of the guide vane opening. If the updated particle position vector exceeds this range, it is constrained to the boundary values.

[0037] When the preset maximum number of iterations is reached or the rate of change of the fitness values ​​of all particles in the particle swarm is less than the preset convergence threshold, the globally optimal particle position vector is output as the guide vane opening command value. The preset maximum number of iterations is set to 100. The rate of change of the particle fitness values ​​is calculated as follows: the difference between the average fitness value of all particles in the current iteration and the average fitness value of all particles in the previous iteration, divided by the average fitness value of all particles in the previous iteration. The preset convergence threshold is set to 0.001, which is dimensionless.

[0038] Example 2: In specific implementation, refer to Figure 2 When executing the voltage stabilization priority control strategy, the guide vane opening command value output by the improved particle swarm optimization algorithm is compared with the current actual guide vane opening value to generate an opening deviation. The opening deviation is equal to the guide vane opening command value minus the current actual guide vane opening value, in degrees. The current actual guide vane opening value is measured in real time by a guide vane position feedback sensor. The guide vane position feedback sensor is a potentiometer-type angle sensor with a range of 0 to 90 degrees, and the output signal is an analog voltage of 0 to 5 volts, which is converted into a digital quantity through an analog-to-digital converter module.

[0039] The sign of the opening deviation is determined to generate a stepper motor rotation direction control signal. When the opening deviation is positive, the stepper motor rotation direction control signal is set to high level, indicating that the stepper motor rotates in the forward direction to increase the guide vane opening. When the opening deviation is negative, the stepper motor rotation direction control signal is set to low level, indicating that the stepper motor rotates in the reverse direction to decrease the guide vane opening. When the opening deviation is zero, the stepper motor rotation direction control signal maintains the previous state.

[0040] Calculate the number of steps required by the stepper motor based on the absolute value of the opening deviation and the step angle parameters of the stepper motor. The number of steps required by the stepper motor is calculated using the following formula: in: The number of steps required for the stepper motor to operate is dimensionless. This is the absolute value of the opening deviation, in degrees; This is the step angle parameter for the stepper motor, in degrees per step. The step angle parameter is set to 0.9 degrees per step. If the calculated number of steps contains a decimal, it will be rounded up to the nearest integer.

[0041] The stepper motor rotation direction control signal and the required number of steps for the stepper motor are encoded into a pulse width modulation (PWM) signal sequence. The PWM signal sequence consists of a series of pulses, each pulse corresponding to one step. The duty cycle of the pulses is fixed at 50%, and the pulse frequency is set to 1000 Hz. The total number of pulses in the PWM signal sequence equals the required number of steps for the stepper motor. The stepper motor rotation direction control signal is output as an independent level signal in parallel with the PWM signal sequence.

[0042] A pulse width modulation (PWM) signal sequence is sent to the stepper motor driver, causing the stepper motor to drive the guide vane actuator according to the stepper motor rotation direction control signal and the required number of steps. The stepper motor driver, model DM542, receives the PWM signal and direction level signal and drives the stepper motor to rotate the corresponding number of steps. The stepper motor is connected to the guide vane actuator via a reduction gear set with a reduction ratio of 10:1. The guide vane actuator rotates under the drive of the stepper motor, changing the guide vane opening.

[0043] After the stepper motor completes the required number of steps, the actual guide vane opening value output by the guide vane position feedback sensor is acquired. The guide vane position feedback sensor is a potentiometer-type angle sensor; its analog voltage output is converted from analog to digital to obtain the current actual guide vane opening value. The acquisition time is delayed by 5 milliseconds after the stepper motor stops to ensure mechanical vibration attenuation.

[0044] When the absolute value of the residual deviation between the actual guide vane opening value and the guide vane opening command value is greater than the preset guide vane positioning dead zone threshold, the step of generating the opening deviation amount is repeated until the actual guide vane opening value output by the guide vane position feedback sensor is acquired. The preset guide vane positioning dead zone threshold is set to 0.1 degrees. The absolute value of the residual deviation is calculated by subtracting the absolute value of the guide vane opening command value from the actual guide vane opening value. If the absolute value of the residual deviation is greater than 0.1 degrees, a new opening deviation amount is calculated again, a new direction signal is generated, a new number of steps is calculated, a new pulse sequence is sent, and feedback is acquired again, until the absolute value of the residual deviation is less than or equal to 0.1 degrees.

[0045] Example 3: In specific implementation, when switching to the waste heat generation control strategy, the bypass flow rate, upstream pressure of the pressure reducing valve, and downstream pressure of the pressure reducing valve are collected in real time on the bypass pipeline. The bypass flow rate is measured by an electromagnetic flowmeter installed on the bypass pipeline. The electromagnetic flowmeter has a range of 0 m / s to 0.1 m / s and outputs an analog current signal of 4 mA to 20 mA, which is converted into a digital signal by an analog-to-digital converter module. The sampling period is set to 100 ms. The upstream and downstream pressure values ​​of the pressure reducing valve are measured by pressure transmitters installed on the upstream and downstream pipelines of the pressure reducing valve, respectively. The pressure transmitters have a range of 0 MPa to 1.6 MPa and output an analog current signal of 4 mA to 20 mA, which is converted into a digital signal by an analog-to-digital converter module. The sampling period is set to 100 ms.

[0046] Calculate the current pressure difference based on the upstream and downstream pressure values ​​of the pressure reducing valve. The current pressure difference equals the upstream pressure value minus the downstream pressure value, in megapascals (MPA). Convert the current pressure difference to meters of water column (mHL), with the conversion being approximately 102.04 mHL per MPA. The specific conversion factor is 102.04 mHL per MPA.

[0047] Based on the current pressure differential, bypass flow rate, and preset water flow density parameters, calculate the current theoretical recoverable power. The preset water flow density parameter is taken as 1000 kg / m³, corresponding to the density of standard freshwater. The gravitational acceleration is taken as 9.81 m / s². The current theoretical recoverable power is calculated using the following formula: in: This is the current theoretical recoverable power value, in watts; The overall efficiency coefficient of the micro hydro-generator unit is defined as [0.6, 0.9], and is set to 0.75 in the initial stage. The preset water flow density parameter is in kilograms per cubic meter, and is set to 1000 kilograms per cubic meter. This is the bypass flow rate, expressed in cubic meters per second. The acceleration due to gravity is expressed in meters per second squared (m²), and we take 9.81 m² / s². This is the current pressure difference value, in meters of water column, calculated from the difference between the upstream pressure value and the downstream pressure value of the pressure reducing valve.

[0048] The current theoretically recoverable power is used as the fitness function input to the improved particle swarm optimization (PSO) algorithm. The improved PSO algorithm iteratively searches the feasible search space for the optimal guide vane opening that maximizes the fitness function. The lower bound of the feasible search space for guide vane opening is 0 degrees, and the upper bound is 90 degrees. The total number of particles in the improved PSO algorithm is set to 30, the maximum number of iterations is set to 80, and the convergence threshold is set to 0.005.

[0049] In each iteration of the improved particle swarm optimization algorithm, the estimated downstream pressure change of the pressure reducing valve is calculated based on the estimated bypass flow rate corresponding to the candidate guide vane opening value in the current iteration. The estimated bypass flow rate is obtained by interpolation using a pre-calibrated guide vane opening-flow rate relationship curve. This curve, with guide vane opening as the independent variable and bypass flow rate as the dependent variable, was obtained experimentally under laboratory conditions and stored in a lookup table format. Linear interpolation is used. The estimated downstream pressure change of the pressure reducing valve is calculated according to the following formula: in: The unit for estimating the pressure change downstream of the pressure reducing valve is megapascal (MPa). The pipeline characteristic coefficient is dimensionless and obtained offline through system identification, with a value of 0.005 MPa·s. 2 per cubic meter 2 ; The bypass flow rate is estimated in cubic meters per second.

[0050] The downstream pressure change of the pressure reducing valve is estimated to determine whether the candidate guide vane opening value in the current iteration meets the downstream pressure constraint condition. The downstream pressure constraint condition requires that the absolute value of the deviation between the downstream pressure value and the downstream pressure setpoint is less than or equal to the pressure stabilization dead zone threshold. The estimated downstream pressure value is calculated by adding the estimated downstream pressure change to the current measured downstream pressure value. The initial pressure stabilization dead zone threshold is set to 0.02 MPa.

[0051] When the candidate guide vane opening value in the current iteration does not meet the downstream pressure constraint, a penalty factor is applied to the fitness value corresponding to the candidate guide vane opening value to reduce the probability that the candidate guide vane opening value is selected as the globally optimal particle. The penalty factor increases exponentially based on the absolute value of the deviation between the downstream pressure value of the pressure reducing valve caused by the candidate guide vane opening value and the downstream pressure setpoint. The penalty factor is calculated according to the following formula: in: The penalty factor is dimensionless. The absolute value of the deviation between the estimated downstream pressure value of the pressure reducing valve corresponding to the candidate guide vane opening value and the downstream pressure set value, in megapascals; The pressure stabilization dead zone threshold, in megapascals (MPa), is initially set to 0.02 MPa. The penalty factor is a dimensionless parameter set to 0.01 MPa. When the candidate guide vane opening value meets the downstream pressure constraint, the penalty factor is set to 1, and the fitness value remains unchanged. When the candidate guide vane opening value does not meet the downstream pressure constraint, the fitness value is multiplied by the reciprocal of the penalty factor, i.e., the actual fitness value equals the theoretical recoverable power value divided by the penalty factor.

[0052] The pressure stabilization dead zone threshold is adaptively adjusted based on the standard deviation of water load fluctuation in the downstream pipeline of the pressure reducing valve. The standard deviation of water load fluctuation is calculated by collecting continuous sampling data of the downstream pressure value of the pressure reducing valve over the past 300 seconds, with a sampling interval of 1 second. The pressure stabilization dead zone threshold is updated in real time according to the following formula: in: The adaptively adjusted pressure stabilization dead zone threshold, in megapascals; The baseline value for the pressure stabilization dead zone threshold is set to 0.01 MPa; The standard deviation of water load fluctuation is expressed in megapascals (MPA).

[0053] The calculation parameters of theoretically recoverable power are dynamically corrected during the execution of the waste heat generation control strategy. Under stable operating conditions with a constant guide vane opening, bypass flow rate and generator output power values ​​are collected for multiple consecutive sampling periods. Stable operating conditions are defined as a change in guide vane opening command value of less than 0.5 degrees within 60 consecutive seconds. The sampling period is set to 1 second, and the number of continuously collected sampling points is set to 120.

[0054] Outlier removal is performed on the bypass flow rate sequence to generate a filtered flow rate sequence. Outlier removal uses the Grubbs criterion: the arithmetic mean and standard deviation of the bypass flow rate sequence are calculated. For each data point, the absolute value of its deviation from the arithmetic mean is calculated. If this absolute value is greater than the standard deviation multiplied by the Grubbs critical value (3.036 for 120 data points at a 99% confidence level), then the data point is marked as an outlier and removed. The remaining data points after outlier removal constitute the filtered flow rate sequence.

[0055] Outlier removal was performed on the generator output power value sequence to generate a filtered power value sequence. The generator output power values ​​were calculated from the voltage and current measurements of the permanent magnet synchronous generator, which were measured by voltage transformers and current transformers, respectively. The outlier removal method was the same as above, using the Grubbs criterion with a confidence level of 99% and a critical value of 3.036 corresponding to 120 data points.

[0056] Based on the filtered flow rate and power value sequences, a recursive least squares algorithm is used to identify the actual efficiency coefficient of the turbine under the current operating conditions online. The recursive least squares algorithm uses the product of the bypass flow rate and the pressure difference as input, and the generator output power as output, to construct a linear regression model. The input matrix is ​​the product sequence of the filtered flow rate and the current pressure difference, and the output vector is the filtered power value sequence. The initial covariance matrix of the recursive least squares algorithm is set to 10. 6 Multiply by the identity matrix, and set the forgetting factor to 0.98. After 120 iterations, the estimated value of the actual efficiency coefficient of the turbine is obtained.

[0057] The actual efficiency coefficient of the identified turbine is compared with the preset theoretical efficiency coefficient to generate an efficiency decay factor. The preset theoretical efficiency coefficient is 0.75. The efficiency decay factor is calculated according to the following formula: in: The efficiency decay factor is dimensionless. The actual efficiency coefficient of the water turbine obtained for identification is dimensionless; The preset theoretical efficiency coefficient is set to 0.75.

[0058] The preset efficiency parameters in the theoretical recoverable power calculation formula are corrected online based on the efficiency decay factor to obtain the corrected efficiency parameters. The corrected efficiency parameters are calculated according to the following formula: in: The corrected efficiency parameter is dimensionless. The overall efficiency coefficient used in the theoretical recoverable power calculation formula is initially set to 0.75; This is the efficiency decay factor, which is dimensionless.

[0059] The corrected efficiency parameters are stored in an efficiency parameter lookup table in non-volatile memory, indexed by the current differential pressure value and the current guide vane opening value. The unit for the current differential pressure value is megapascals (MPa), and the unit for the current guide vane opening value is degrees (degrees). The indexing accuracy is 0.01 MPa for the differential pressure value and 1 degree for the guide vane opening value. When the same current differential pressure value and current guide vane opening value reappear in subsequent operations, the corrected efficiency parameters are directly read from the efficiency parameter lookup table for theoretical recoverable power calculation, without performing recursive least squares identification. If there is no corresponding indexed entry in the lookup table, the dynamic correction process is re-executed under the current operating condition, and the result is added to the lookup table.

[0060] Example 4: In specific implementation, refer to Figure 3 When the absolute value of the deviation between the downstream pressure value and the downstream pressure setpoint of the pressure reducing valve is less than or equal to the pressure stabilization dead zone threshold and the current differential pressure value is less than the preset low differential pressure sleep threshold, a low-power standby control strategy is executed. The current differential pressure value is calculated from the difference between the upstream pressure value and the downstream pressure value of the pressure reducing valve, and the unit is megapascals (MPa). The preset low differential pressure sleep threshold is set to 0.05 MPa.

[0061] The low-power standby control strategy includes the following steps.

[0062] The stepper motor drives the guide vane actuator to adjust the guide vane opening to the fully closed position, cutting off the high-pressure water flow in the bypass pipeline and stopping the micro turbine generator. The stepper motor driver receives a pulse width modulation signal sequence from the microcontroller and drives the stepper motor to rotate in the opposite direction until the guide vane actuator reaches the fully closed position. The fully closed position is confirmed by a guide vane position feedback sensor, which outputs the voltage value corresponding to 0 degrees. When the actual guide vane opening value is less than 0.5 degrees, it is determined to be in the fully closed state.

[0063] The downstream pressure value of the pressure reducing valve at the moment when the guide vane is fully closed is recorded as the standby reference pressure value. The downstream pressure value of the pressure reducing valve is measured by a pressure transmitter installed on the downstream pipeline of the pressure reducing valve. The measured value is an analog quantity, which is converted into a digital quantity by an analog-to-digital converter before being recorded. The recording time is when the actual value of the guide vane opening is first less than 0.5 degrees, at which time the pressure transmitter sample value is read and stored in the static random access memory of the microcontroller.

[0064] The microcontroller in the control unit is switched to deep sleep mode. In deep sleep mode, the microcontroller's internal clock divider is configured to the lowest operating frequency, set to 32.768 kHz, which is the nominal frequency of the real-time clock module. The microcontroller's analog-to-digital converter and pulse width modulation module are powered down, and the power supply clock and power domain of the corresponding modules are shut down through the microcontroller's internal power management unit. The microcontroller's external interrupt pin is configured as a wake-up source. The external interrupt pin is connected to the output of the real-time clock module. When the real-time clock module generates an interrupt signal, it triggers the microcontroller to exit deep sleep mode.

[0065] In deep sleep mode, the microcontroller's real-time clock module is periodically woken up. The real-time clock module acquires the downstream pressure value of the pressure reducing valve at a preset sampling period of 5 seconds. The real-time clock module contains a low-power timer; when the timer counts to the number of clock cycles corresponding to 5 seconds, a wake-up operation is triggered. After waking up, the real-time clock module reads the output signal from the pressure transmitter and measures the downstream pressure value of the pressure reducing valve through the analog-to-digital converter (ADC). The ADC is powered off in deep sleep mode; therefore, during each wake-up, the microcontroller temporarily restores power to the ADC, completes one sampling cycle, and then powers it off again.

[0066] When the absolute value of the deviation between the downstream pressure value of the pressure reducing valve collected by the real-time clock module and the standby reference pressure value exceeds the preset wake-up pressure fluctuation threshold, the microcontroller is triggered to exit deep sleep mode and resume the voltage regulation priority control strategy via the external interrupt pin. The preset wake-up pressure fluctuation threshold is set to 0.01 MPa. The absolute value of the deviation is calculated by subtracting the absolute value of the standby reference pressure value from the real-time collected downstream pressure value of the pressure reducing valve. If the absolute value of the deviation is greater than 0.01 MPa, the real-time clock module outputs a high-level pulse to the external interrupt pin of the microcontroller. After detecting the external interrupt, the microcontroller exits deep sleep mode, restores the main clock frequency to 16 MHz, re-enables the analog-to-digital conversion module and the pulse width modulation module, and executes the voltage regulation priority control strategy.

[0067] Example 5: In specific implementation, when an abnormal power generation event is detected, a fault handling control strategy is executed.

[0068] The system monitors the output voltage amplitude, frequency, and motion status of the guide vane actuator in real time. The output voltage amplitude is measured by a voltage transformer to determine the peak value of the three-phase output line voltage of the permanent magnet synchronous generator. After rectification and filtering, it is converted into a DC voltage signal and sampled by an analog-to-digital converter module with a sampling period of 10 milliseconds. The output voltage frequency is obtained by measuring the zero-crossing period of the permanent magnet synchronous generator's output voltage. A zero-crossing detection circuit captures the zero-crossing points of the voltage waveform, calculates the time interval between adjacent zero-crossing points, and takes the reciprocal to obtain the frequency value, with a sampling period of 10 milliseconds. The motion status of the guide vane actuator is acquired by a magnetic encoder mounted on the actuator. The encoder outputs quadrature encoded pulse signals, with a 90-degree electrical angle difference between phases A and B.

[0069] An electrical fault flag is generated when the output voltage amplitude exceeds the preset overvoltage protection threshold or falls below the preset undervoltage protection threshold. The preset overvoltage protection threshold is set to 400 volts, and the preset undervoltage protection threshold is set to 100 volts. The output voltage amplitude is based on the actual measured value in volts. When the output voltage amplitude is greater than 400 volts or less than 100 volts, the electrical fault flag is set to 1; otherwise, it is set to 0.

[0070] A mechanical fault flag is generated when the output voltage frequency exceeds the preset upper speed limit threshold or falls below the preset lower speed limit threshold. The preset upper speed limit threshold is set to 60 Hz, and the preset lower speed limit threshold is set to 40 Hz. The output voltage frequency is measured in Hertz. When the output voltage frequency is greater than 60 Hz or less than 40 Hz, the mechanical fault flag is set to 1; otherwise, it is set to 0.

[0071] A guide vane jamming flag is generated when the motion state of the guide vane actuator does not match the pulse width modulation signal sequence output by the stepper motor driver, and the duration exceeds the preset jamming judgment time window. The preset jamming judgment time window is set to 2 seconds. The method for determining whether the motion state of the guide vane actuator matches the pulse width modulation signal sequence is as follows.

[0072] The system acquires the number of rising edges of pulses in the pulse width modulation (PWM) signal sequence output by the stepper motor driver to generate the desired step count. Each rising edge of the PWM signal sequence corresponds to a desired number of steps for the stepper motor. The microcontroller counts the rising edges of pulses via an external interrupt pin, and the counter accumulates to obtain the desired step count. The system also acquires the quadrature encoded pulse signal output from the magnetic encoder mounted on the guide vane actuator. Phase detection processing is performed on the quadrature encoded pulse signal to generate the actual step count and motion direction indicator. Phase detection is achieved by comparing the phase relationship between phases A and B of the quadrature encoded pulse signal: when phase B is high at the rising edge of phase A, it is determined to be forward rotation, and the actual step count increases by 1; when phase B is low at the rising edge of phase A, it is determined to be reverse rotation, and the actual step count decreases by 1. The motion direction indicator is set to 1 or 0 depending on whether it is forward or reverse. The system measures the pulse width of the quadrature encoded pulse signal to generate a time interval sequence between adjacent pulses. Pulse width measurement is achieved through the microcontroller's input capture module, which captures the time values ​​of the rising edges of adjacent pulses and subtracts them to obtain the time interval in microseconds. The instantaneous velocity sequence of the guide vane actuator is calculated based on the time interval sequence. The instantaneous velocity is equal to the step angle parameter divided by the time interval. The step angle parameter is set to 0.9 degrees per step, and the time interval is converted to seconds before calculation. The unit of instantaneous velocity is degrees per second. A moving average filter is applied to the instantaneous velocity sequence to generate a smooth velocity curve. The window length of the moving average filter is set to 5 data points, and the average of the current instantaneous velocity and the previous 4 instantaneous velocities is used as the smoothed velocity value.

[0073] A motion mismatch is determined when the absolute value of the difference between the expected step count and the actual step count exceeds a preset step loss threshold. The preset step loss threshold is set to 3 steps. A motion mismatch is also determined when the motion direction indicator is inconsistent with the direction command implicit in the pulse width modulation signal sequence. The direction command is extracted from the stepper motor rotation direction control signal; a high level corresponds to forward, and a low level corresponds to reverse. A motion mismatch is determined when the speed value in the smooth motion speed curve continuously decreases while the expected step count continues to increase. Continuous decrease is defined as the smooth motion speed value at three consecutive sampling points being less than the smooth motion speed value at the previous sampling point. A motion mismatch is determined when any one of these three conditions is met. When a motion mismatch is determined and the duration exceeds 2 seconds, the guide vane jamming flag is set to 1.

[0074] When any of the electrical fault flag, mechanical fault flag, or guide vane jamming flag is generated, a shut-off pulse signal is sent to the electric actuator of the bypass inlet isolation valve. The electric actuator of the bypass inlet isolation valve receives a 24V DC pulse signal with a pulse width set to 500 milliseconds and a pulse amplitude of 24V. After sending the shut-off pulse signal, the valve position status feedback signal of the bypass inlet isolation valve is continuously acquired. The valve position status feedback signal is provided by a limit switch installed on the isolation valve. The limit switch outputs a normally open contact signal; when the isolation valve is fully closed, the contact closes, and the signal is high; when the isolation valve is not fully closed, the contact opens, and the signal is low. The acquisition period is set to 100 milliseconds. When the valve position status feedback signal indicates that the bypass inlet isolation valve is fully closed, the microcontroller in the control unit is switched to fault lockout mode. In fault lockout mode, the microcontroller stops sending any control signals to the stepper motor driver, the stepper motor driver is in a no-pulse input state, and the stepper motor is turned off. A fault alarm data frame is sent to the upper-level management platform through the control unit's communication interface. The communication interface uses an RS485 bus, and the communication protocol is Modbus RTU. The fault alarm data frame includes status codes for electrical abnormality flags, mechanical abnormality flags, and guide vane jamming flags, as well as a timestamp of the fault occurrence. The status code uses 3 binary bits, corresponding to the three flag bits, with 0 indicating no fault and 1 indicating fault occurrence. The timestamp is provided by the microcontroller's internal real-time clock module, with an accuracy of seconds.

[0075] When the energy storage battery's charge level falls below a preset undervoltage switching threshold, a power supply redundancy control strategy is implemented. The battery's terminal voltage, charging / discharging current, and temperature are monitored in real time, and the remaining battery percentage is calculated using a coulomb counter method. The terminal voltage is measured via a voltage divider network and an analog-to-digital converter (ADC), the charging / discharging current is measured using a Hall effect current sensor, and the temperature is measured using a thermistor. The coulomb counter method calculates the remaining charge percentage by integrating the accumulated charging / discharging current over time. The initial charge level is calibrated using an open-circuit voltage method, with an integration period of 100 milliseconds. When the remaining charge percentage falls below the undervoltage switching threshold, the first switching element between the energy storage battery and the DC output is disconnected. The undervoltage switching threshold is set to 20%. The first switching element is a P-channel MOSFET, model IRF9540, which controls the gate voltage via a microcontroller's general-purpose input / output port to achieve on / off switching. After disconnection, the input voltage of the external DC backup power supply interface is detected. The external DC backup power supply interface is connected to a backup battery or a regulated power supply, and its input voltage is measured via a voltage divider network and an ADC. When the input voltage is within the preset effective voltage range of the backup power supply, the second switching element between the external DC backup power supply interface and the DC output terminal is closed. The effective voltage range of the backup power supply is set to 11.4 volts to 12.6 volts. The second switching element is also a P-channel MOSFET, model IRF9540. Simultaneously, the charging circuit between the external DC backup power supply interface and the energy storage battery remains open, allowing the external DC backup power supply interface to charge the energy storage battery in a constant current-limited voltage manner. The constant current-limited voltage charging current is set to 0.1 amperes, and the upper limit of the charging voltage is set to 12.6 volts.

[0076] When the remaining charge percentage of the energy storage battery rises above the preset recovery charging threshold, the second switching element is disconnected, the first switching element is closed, and the energy storage battery resumes power supply to the DC output terminal. The recovery charging threshold is set to 80%. When the input voltage value is outside the effective voltage range of the backup power supply and the remaining charge percentage is below the preset shutdown protection threshold, the non-critical load power supply ports on the DC output terminal are shut down step by step, leaving only the lowest power consumption power supply channel for the control unit and communication interface. The shutdown protection threshold is set to 10%. Non-critical load power supply ports include sensor power supply ports, indicator light power supply ports, etc., which are shut down step by step via MOSFET switches. The lowest power consumption power supply channel is directly powered by the regulated output pin of the microcontroller, maintaining the normal operation of the microcontroller and the RS485 communication interface.

[0077] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.

Claims

1. A method for coordinated pressure and power control in micro hydropower generation with an integrated pressure reducing valve, characterized in that, The method includes: High-pressure water flow is drawn from upstream of the pressure reducing valve through a bypass pipeline, which is arranged in parallel with the pressure reducing valve. The high-pressure water flow passes through the micro turbine generator unit and drives the permanent magnet synchronous generator to rotate, generating electrical energy. An improved particle swarm optimization algorithm is used to iteratively optimize the guide vane opening. The improved particle swarm optimization algorithm generates adaptive inertial weights for particle velocity updates based on the deviation direction between the real-time collected downstream pressure value of the pressure reducing valve and the downstream pressure set value. When the absolute value of the deviation between the downstream pressure value of the pressure reducing valve and the downstream pressure set value is greater than the preset pressure stabilization dead zone threshold, the pressure stabilization priority control strategy is executed. The pressure stabilization priority control strategy calculates the guide vane opening adjustment amount through the improved particle swarm optimization algorithm and drives the stepper motor to adjust the guide vane opening so that the downstream pressure value of the pressure reducing valve approaches the downstream pressure set value. When the absolute value of the deviation between the downstream pressure value of the pressure reducing valve and the downstream pressure set value is less than or equal to the pressure stabilization dead zone threshold, the system switches to the residual energy power generation control strategy. The residual energy power generation control strategy searches for the optimal guide vane opening with theoretical recoverable power as the optimization target through the improved particle swarm optimization algorithm, so as to maximize the output power of the micro hydro-generator unit.

2. The method for coordinated pressure and power control of a micro hydropower generation system with an integrated pressure reducing valve according to claim 1, characterized in that, The improved particle swarm optimization algorithm iteratively updates the particle swarm position vector and particle swarm velocity vector, and performs the following steps: Initialize the particle swarm, where each particle carries a candidate guide vane opening value as a particle position vector, and randomly initialize the particle velocity vector corresponding to each particle. Obtain the fitness value of each particle in the current iteration round. The fitness value is calculated based on the absolute value of the deviation between the downstream pressure value of the pressure reducing valve and the downstream pressure set value under the pressure stabilization priority control strategy. The fitness value is calculated based on the theoretical recoverable power value under the waste energy power generation control strategy. Based on the fitness value of each particle in the current iteration round, determine the global optimal particle position vector and the individual optimal particle position vector of each particle in the current iteration round. Based on the difference between the global optimal particle position vector of the current iteration and the individual optimal particle position vector of each particle, the gravitational component of each particle is generated. Based on the difference between the particle position vector of each particle in the current iteration and the particle position vector of each particle in the previous iteration, the momentum component of each particle is generated. Based on the deviation direction between the downstream pressure value of the pressure reducing valve in the current iteration and the downstream pressure set value, a dynamic adjustment factor for inertia weight is generated, wherein the deviation direction is either a positive deviation direction or a negative deviation direction. The preset inertia weight benchmark value is adjusted by using the dynamic adjustment factor to obtain the adaptive inertia weight of each particle in the current iteration round. The particle velocity vector of each particle is updated based on the adaptive inertia weight, the gravitational component, and the momentum component of each particle. Update the particle position vector of each particle based on the updated particle velocity vector of each particle. When the preset maximum number of iterations is reached or the rate of change of the fitness values ​​of all particles in the particle swarm is less than the preset convergence threshold, the globally optimal particle position vector is output as the guide vane opening command value.

3. The method for coordinated control of pressure and power in micro hydropower generation using an integrated pressure reducing valve according to claim 2, characterized in that, Under the pressure stabilization priority control strategy, the adaptive inertia weight decreases monotonically as the absolute value of the deviation between the downstream pressure value of the pressure reducing valve and the downstream pressure set value increases.

4. The method for coordinated control of pressure and power in micro hydropower generation using an integrated pressure reducing valve according to claim 2, characterized in that, Based on the deviation direction between the downstream pressure value of the pressure reducing valve in the current iteration and the downstream pressure setpoint, a dynamic adjustment factor for the inertia weight is generated, including: When the deviation direction is a positive deviation direction, the positive deviation direction indicates that the downstream pressure value of the pressure reducing valve is greater than the downstream pressure setting value. The ratio of the absolute value of the deviation between the downstream pressure value of the pressure reducing valve and the downstream pressure setting value in the current iteration to the preset pressure upper limit safety margin value is obtained to generate a positive deviation strength coefficient. The positive deviation intensity coefficient is used to scale the preset positive deviation inertia weight attenuation factor to generate a dynamic adjustment factor corresponding to the positive deviation direction. When the deviation direction is a negative deviation direction, the negative deviation direction indicates that the downstream pressure value of the pressure reducing valve is less than the downstream pressure setting value. The ratio of the absolute value of the deviation between the downstream pressure value of the pressure reducing valve and the downstream pressure setting value in the current iteration to the preset pressure lower limit safety margin value is obtained to generate a negative deviation strength coefficient. The negative deviation intensity coefficient is used to scale the preset negative deviation inertia weight enhancement factor to generate a dynamic adjustment factor corresponding to the negative deviation direction.

5. The method for coordinated control of pressure and power in micro hydropower generation using an integrated pressure reducing valve according to claim 2, characterized in that, The implementation of the voltage stabilization priority control strategy, which calculates the guide vane opening adjustment amount through the improved particle swarm optimization algorithm and drives the stepper motor to adjust the guide vane opening, includes: The guide vane opening command value output by the improved particle swarm optimization algorithm is compared with the current actual guide vane opening value to generate the opening deviation. The sign of the opening deviation is determined to generate a stepper motor rotation direction control signal; The number of steps required for the stepper motor to run is calculated based on the absolute value of the opening deviation and the step angle parameter of the stepper motor. The stepper motor rotation direction control signal and the number of steps required for the stepper motor to run are encoded into a pulse width modulation signal sequence; The pulse width modulation signal sequence is sent to the stepper motor driver, so that the stepper motor drives the guide vane actuator according to the stepper motor rotation direction control signal and the number of steps required for the stepper motor to run; After the stepper motor completes the required number of steps, the actual guide vane opening value output by the guide vane position feedback sensor is collected. When the absolute value of the residual deviation between the actual guide vane opening value and the guide vane opening command value is greater than the preset guide vane positioning dead zone threshold, the step of generating the opening deviation amount is repeated until the step of collecting the actual guide vane opening value output by the guide vane position feedback sensor is completed.

6. The method for coordinated control of pressure and power in micro hydropower generation using an integrated pressure reducing valve according to claim 2, characterized in that, Switching to a waste energy power generation control strategy, which searches for the optimal guide vane opening using the improved particle swarm optimization algorithm with theoretically recoverable power as the optimization objective, includes: Real-time acquisition of bypass flow rate, upstream pressure of pressure reducing valve, and downstream pressure of pressure reducing valve on the bypass pipeline; Calculate the current pressure difference value based on the upstream pressure value and the downstream pressure value of the pressure reducing valve; Calculate the current theoretical recoverable power value based on the current differential pressure value, the bypass flow rate value, and the preset water flow density parameter; The current theoretical recoverable power value is used as the fitness function input of the improved particle swarm optimization algorithm, so that the improved particle swarm optimization algorithm iteratively searches for the optimal guide vane opening that maximizes the fitness function within the feasible search space of the guide vane opening. In each iteration of the improved particle swarm optimization algorithm, the estimated downstream pressure change of the pressure reducing valve is calculated based on the estimated bypass flow rate corresponding to the candidate guide vane opening value in the current iteration round. Based on the estimated downstream pressure change of the pressure reducing valve, it is determined whether the candidate guide vane opening value of the current iteration round meets the downstream pressure constraint condition. The downstream pressure constraint condition requires that the absolute value of the deviation between the downstream pressure value of the pressure reducing valve and the downstream pressure set value is less than or equal to the pressure stability dead zone threshold. When the candidate guide vane opening value in the current iteration does not meet the downstream pressure constraint, a penalty factor is applied to the fitness value corresponding to the candidate guide vane opening value to reduce the probability that the candidate guide vane opening value is selected as the global optimal particle.

7. The method for coordinated control of pressure and power in micro hydropower generation using an integrated pressure reducing valve according to claim 6, characterized in that, The penalty factor increases exponentially based on the absolute value of the deviation between the downstream pressure value and the downstream pressure set value caused by the candidate guide vane opening value.

8. The method for coordinated control of pressure and power in micro hydropower generation using an integrated pressure reducing valve according to claim 1, characterized in that, The pressure stabilization dead zone threshold is adaptively adjusted based on the standard deviation of water load fluctuation in the downstream pipeline of the pressure reducing valve.

9. The method for coordinated control of pressure and power in micro hydropower generation using an integrated pressure reducing valve according to claim 1, characterized in that, The method further includes executing a low-power standby control strategy when the absolute value of the deviation between the downstream pressure value and the downstream pressure setpoint is less than or equal to the pressure stabilization dead zone threshold and the current differential pressure value is less than a preset low differential pressure sleep threshold. The low-power standby control strategy includes: The stepper motor drives the guide vane actuator to adjust the guide vane opening to the fully closed position, cutting off the high-pressure water flow in the bypass pipeline and stopping the micro water turbine generator from rotating. Record the downstream pressure value of the pressure reducing valve at the moment when the guide vane is fully closed as the standby reference pressure value; The microcontroller in the control unit is switched to a deep sleep mode. In the deep sleep mode, the internal clock divider of the microcontroller is configured to the lowest operating frequency, the analog-to-digital conversion module and the pulse width modulation module of the microcontroller are powered off, and the external interrupt pin of the microcontroller is configured as a wake-up source. In deep sleep mode, the real-time clock module of the microcontroller is periodically woken up, and the real-time clock module collects the downstream pressure value of the pressure reducing valve at a preset sampling period. When the absolute value of the deviation between the downstream pressure value of the pressure reducing valve collected by the real-time clock module and the standby reference pressure value is greater than the preset wake-up pressure fluctuation threshold, the microcontroller is triggered to exit the deep sleep mode and resume the voltage regulation priority control strategy through the external interrupt pin.

10. The method for coordinated control of pressure and power in micro hydropower generation using an integrated pressure reducing valve according to claim 1, characterized in that, The method further includes executing a fault handling control strategy when a power generation anomaly event is detected, the fault handling control strategy including: Real-time monitoring of the output voltage amplitude and frequency of the permanent magnet synchronous generator and the motion status of the guide vane actuator; An electrical abnormality flag is generated when the output voltage amplitude exceeds a preset overvoltage protection threshold or when the output voltage amplitude is lower than a preset undervoltage protection threshold. When the output voltage frequency exceeds the preset upper limit threshold of rotational speed or the output voltage frequency is lower than the preset lower limit threshold of rotational speed, a mechanical abnormality flag is generated. When the motion state of the guide vane actuator does not match the pulse width modulation signal sequence output by the stepper motor driver and the duration exceeds the preset jamming judgment time window, a guide vane jamming flag is generated. When any one of the electrical abnormality flag, the mechanical abnormality flag, or the guide vane jamming flag is generated, a shut-off pulse signal is sent to the electric actuator of the bypass pipeline inlet isolation valve; After sending the shut-off pulse signal, the valve position status feedback signal of the bypass pipeline inlet isolation valve is continuously collected; When the valve position status feedback signal indicates that the bypass pipeline inlet isolation valve is completely closed, the microcontroller in the control unit is switched to fault lockout mode. In fault lockout mode, the microcontroller stops sending any control signals to the stepper motor driver. The fault alarm data frame is sent to the upper management platform through the communication interface of the control unit. The fault alarm data frame includes the status codes of the electrical abnormality flag, the mechanical abnormality flag and the guide vane jamming flag, as well as the timestamp of the time when the fault occurred.