An improved fan speed control optimization method
Through the improved hyperbolic sine cosine optimization algorithm, the PID controller parameters are optimized, and the problems of slow response and large steady-state error in fan speed control are solved, and the rapid response and high accuracy of fan speed control are achieved, which improves the robustness and operating efficiency of the fan.
Patent Information
- Application Number
- CN202510786983.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-06-13
AI Technical Summary
Traditional PID controllers are difficult to deal with complex nonlinear coupling load changes in fan speed control, resulting in slow response, severe overshoot and large steady-state errors, which affects the energy-saving effect and service life of the fan.
The improved hyperbolic sine cosine optimization algorithm is used to optimize the parameters of the PID controller. Through nonlinear hybrid group-driven strategy and multi-frequency signal dynamic perturbation development strategy, the global search ability and robustness of the algorithm are enhanced, and the control parameters are dynamically adjusted to adapt to environmental changes.
It improves the response speed and control accuracy of fan speed control, enhances robustness and anti-interference ability, reduces energy consumption, extends the service life of the equipment, and improves overall operating efficiency and economy.
Smart Images

Figure CN120292102B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of PID control optimization, and in particular relates to an improved fan speed control optimization method. Background Art
[0002] As a commonly used power equipment in industrial production and daily life, the operating efficiency and stability of fans directly affect the overall performance and energy consumption level of the system. Traditional fan speed control mostly adopts PID control strategy. PID controller mainly relies on fixed proportional, integral, and differential parameters to adjust the fan speed. However, due to the complex load changes and nonlinear coupling characteristics of fans, as well as the different control environments, the fixed control parameters of traditional PID controllers are difficult to cope with the complex control environment of fans. It is often difficult to balance fast response and system stability. Problems such as slow response, severe overshoot, and large steady-state error are prone to occur, which leads to a decline in fan control performance and affects the energy saving effect and service life of the fan. In recent years, optimization methods for fan speed control have continued to emerge, especially adaptive parameter adjustment technology based on intelligent optimization, which provides an effective means to address the shortcomings of traditional control. Therefore, an improved method that can dynamically adapt to changing operating conditions and improve the response speed and control accuracy of fan speed control has important practical significance and application value.
[0003] The Hyperbolic Sine-Cosine Optimization (SCHO) algorithm is a swarm intelligence optimization algorithm designed based on hyperbolic sine and cosine functions. By introducing the nonlinear characteristics of hyperbolic functions, the algorithm effectively balances the capabilities of global exploration and local development, improving the algorithm's convergence speed and accuracy in complex optimization problems. The SCHO algorithm adopts a phased search strategy combined with an adaptive weight adjustment strategy to achieve dynamic adjustment of search intensity. SCHO has demonstrated good performance in function optimization and engineering optimization. However, in some optimization problems that require handling multiple constraints and dynamically changing environments, the algorithm still suffers from limited convergence speed and is prone to falling into local optimality. Therefore, its search mechanism and parameters need to be improved to improve the algorithm's stability and robustness. Summary of the Invention
[0004] In response to the problems existing in the above-mentioned background technology, the present invention proposes an improved fan speed control optimization method, which aims to use an improved hyperbolic sine-cosine optimization algorithm to optimize the control parameters of the PID controller in the fan speed control system. The improved hyperbolic sine-cosine optimization algorithm has stronger global search capability and better adaptability. When the algorithm falls into a local optimal solution, it can quickly jump out, thereby improving the algorithm's optimization accuracy. By optimizing the PID control parameters, the response speed and control accuracy in the fan speed control process are improved. When the external environment changes, the parameters can be adaptively adjusted to improve the stability of the control system, enhance the robustness and anti-interference ability of the fan under complex working conditions, reduce energy consumption and extend the service life of the equipment, and significantly improve the overall operating efficiency and economy of the fan.
[0005] The present invention proposes an improved fan speed control optimization method, the specific steps of which are as follows.
[0006] S1. Construct a fan speed control system, which includes: a speed error calculation module, a PID controller module, an improved hyperbolic sine-cosine optimization algorithm module, a motor drive module, a fan load module, and an encoder module.
[0007] S2. Modify the hyperbolic sine and cosine optimization algorithm, including two improvements:
[0008] S21. Improve the mathematical model of the first stage of the exploration process of the hyperbolic sine-cosine optimization algorithm using a nonlinear hybrid swarm-driven exploration update strategy. This strategy uses random numbers to divide the update into two different modes. The first update mode uses sine and logarithmic functions to nonlinearly modulate the current agent position, and uses the difference between the group mean and the optimal solution as a guide term. The second update mode uses cosine and hyperbolic tangent functions to nonlinearly adjust the difference between the current agent position and the group mean, and adjusts the update amplitude based on the group standard deviation.
[0009] S22. A multi-frequency signal dynamic perturbation development strategy is used to improve the mathematical model of the second stage of the development process of the hyperbolic sine-cosine optimization algorithm. The strategy adjusts the current agent position by introducing a jump perturbation signal and a direction reset signal. The direction reset signal is dynamically adjusted according to the search progress of the algorithm and the changing trend of the fitness value.
[0010] S3. Use the improved hyperbolic sine-cosine optimization algorithm to optimize the parameters of the PID controller module of the fan speed control system, and obtain a set of optimal control parameters Kp, Ki, and Kd values under the set number of iterations.
[0011] S4. Input a set of optimal control parameters obtained by S3 optimization into the PID controller module, and adjust the fan speed to reach the target speed by controlling the motor drive module.
[0012] Preferably, in S1, the execution process of each module in the fan speed control system is as follows: the target speed is set according to the air volume required by the fan, and the encoder module detects the real-time speed of the fan, and the real-time speed and the target speed are input into the error calculation module to calculate the speed error e(t), and e(t) is input into the PID controller module. The improved hyperbolic sine cosine optimization algorithm module is started to optimize the control parameters of the PID controller module, and a set of optimal solutions is obtained under the set number of algorithm iterations. The control quantity U(t) of the optimized PID controller is input into the motor drive module. The motor drive module controls the three-phase current of the motor through the three-phase inverter, thereby driving the motor to drive the fan load module to reach the target speed. The mathematical model of the fan load module is as follows:
[0013] The load torque of the fan consists of two parts. One part is the inertia load torque generated by the fan due to its rotational inertia, specifically:
[0014] (1);
[0015] In formula (1), represents the inertia load torque, Represents the moment of inertia of the fan, and the calculation formula is shown in formula (2). represents the motor's moment of inertia, Indicates net torque, which refers to the torque applied by the motor when driving the fan minus other load torques;
[0016] (2);
[0017] In formula (2), N represents the number of fan blades, m represents the mass of the fan blades, and L represents the length of the fan blades;
[0018] The other part is the load torque generated by wind resistance during the operation of the fan. When considering that aerodynamic force is associated with the change of kinetic energy in the rotating system, the wind resistance torque is proportional to the cube of the rotation speed in actual conditions, that is, , represents wind resistance torque, k represents wind resistance coefficient, and ω represents wind speed of the fan.
[0019] Preferably, in S21, a nonlinear hybrid population-driven exploration update strategy is used to improve the mathematical model of the first stage of the exploration process of the hyperbolic sine-cosine optimization algorithm. First, a random number r is generated. When r>0.5, the first update method is used to add two adjustment items on the basis of the current global optimal position. The first is to use the oscillation of the sine function to adjust the search trajectory of the current position. The second is to use the logarithmic function to perform a nonlinear transformation on the absolute value of the current position vector to adjust the scale of the search step. At the same time, the strategy also adds the difference between the mean of the group position and the current global optimal solution as a guide item to adjust the search direction. When r<=0.5, the second update method is used to subtract a weighted nonlinear adjustment item from the current global optimal position. The difference between the current agent position and the mean of the current agent position and the group position is adjusted by the cosine function and the hyperbolic tangent function respectively. Finally, the standard deviation of the individual position in the population is used as the convergence control factor. The specific update formula is as follows:
[0020] (3);
[0021] In formula (3), X(iter+1) represents the updated individual position, w1 represents the step weight coefficient, w1=(1-iter / max_iter), iter represents the current number of iterations, max_iter represents the maximum number of iterations, X(iter) represents the current individual position, r1 and r2 represent random numbers between [0,1], λ represents the logarithmic amplitude factor, v represents the hyperbolic tangent scaling factor, Pop represents the difference between the average position and the optimal position of the population, represents the standard deviation of the individuals in the population, η represents the standard deviation scaling factor, Xbest represents the position of the best individual, and X_mean represents the average position of the population.
[0022] Preferably, an exploration update strategy based on nonlinear mixed population drive enhances the complexity and diversity of the search path by introducing multiple nonlinear functions, and combines the statistical characteristics of the population to realize a more directional and dynamically adaptable individual position update mechanism, effectively improving the coverage of the algorithm in the global search process. Applying this strategy to the PID controller parameter optimization of the fan speed control system can better adapt to the fan control system with nonlinear and strong coupling characteristics, while ensuring the rapid response of the system, suppressing overshoot and oscillation, and improving the control accuracy and stability.
[0023] Preferably, in S22, a multi-frequency signal dynamic perturbation development strategy is used to improve the mathematical model of the second stage of the development process of the hyperbolic sine-cosine optimization algorithm. In this strategy, the jump amplitude adjustment coefficient is dynamically adjusted by a decreasing function, and the symbol perturbation factor is defined by the product of multiple different frequency parameters and independent random functions to form a nonlinear symbol perturbation sequence. The multi-scale perturbation factor integrates the distance term and the group standard deviation term between the current solution and the optimal solution to construct a complex dimensional perturbation scale. The direction difference vector integrates the guiding direction of the global optimal solution and the group mean, combined with dual weight control, and the direction reset item determines whether to introduce periodic directional perturbation according to the change of individual fitness value. At the same time, a linearly decreasing reset weight is set to adjust the degree of influence of this item, thereby forming an overall nonlinear perturbation update expression structure. The specific update formula is as follows:
[0024] (4);
[0025] In formula (4), X(iter+1) represents the updated individual position, X(iter) represents the current individual position, ψ represents the jump amplitude adjustment factor, ψ=exp(-iter / 2max_iter), max_iter represents the maximum number of iterations, represents the symbol perturbation factor, and the calculation formula is shown in formula (5). represents the multi-scale perturbation factor, and the calculation formula is shown in formula (6). ref represents the direction difference vector, and the calculation formula is shown in formula (7). ρ represents the reset weight factor, and the value is 0.6. represents the direction reset term, and the calculation formula is shown in formula (8);
[0026] (5);
[0027] In formula (5), m represents the frequency dimension of the disturbance, represents the kth frequency factor, which is used to adjust the periodic disturbance. Represents a random number between [0,1], sign() represents the sign function;
[0028] (6);
[0029] In formula (6), c1 and c2 represent weight balancing factors, which are 0.6 and 0.4 respectively, α represents the nonlinear response factor, which is 0.5, and pop_norm represents the normalized standard deviation of the population position;
[0030] (7);
[0031] In formula (7), rand1 and rand2 represent random numbers between [0,1], Xbest represents the position of the best individual, X_mean represents the average position of the population, and X(iter) represents the current individual position;
[0032] (8);
[0033] In formula (8), τ represents the disturbance amplitude control factor, and its value range is [0.1, 1]. Represents the random disturbance term, which follows a uniform random distribution, σ is the boundary of the uniform disturbance interval, fitval represents the rate of change of the current individual's fitness value, and ε represents the threshold value of the rate of change of the fitness value.
[0034] Preferably, compared with traditional optimization strategies, a multi-frequency signal dynamic perturbation development strategy has higher dynamics and randomness in the disturbance structure, which helps to increase the diversity and jumping ability of the search path. In particular, when the algorithm falls into a local optimal solution, the algorithm can quickly jump out through the disturbance. In the task of optimizing the PID controller parameters, this strategy can perform adaptive disturbances according to the real-time state changes of the control system, reducing the impact of dynamic errors on the system control accuracy during the tuning process.
[0035] Preferably, in S3, the improved hyperbolic sine-cosine optimization algorithm is used to optimize the parameters of the PID controller module of the fan speed control system, and the specific steps are as follows:
[0036] S31. Initialize the basic parameters of the hyperbolic sine-cosine optimization algorithm for the modified machine, including: the number of populations N of the algorithm, the problem dimension dim of the algorithm, the maximum number of iterations max_iter, the upper and lower limits of the algorithm's search space [lb, ub], and set the initial position of the population using the basic parameters of the algorithm;
[0037] S32. Based on the performance requirements of the fan speed control system, a mapping mechanism is constructed between the improved hyperbolic sine-cosine optimization algorithm and the PID controller parameters of the fan speed control system. That is, the position vectors of the individuals in the population during the algorithm iteration are regarded as the PID control parameters to be adjusted, thereby achieving an effective mapping from the search space position to the control parameter space. During the optimization process, the algorithm calculates the fitness value based on the deviation between the system output and the target speed, and uses this to dynamically evolve the individual positions, thereby achieving continuous adjustment and updating of the controller parameters.
[0038] S33. Set the fitness value calculation function of the improved hyperbolic sine-cosine optimization algorithm, and calculate the fitness value of the initial population position through the fitness value calculation function, sort according to the fitness value, and select the optimal individual position in the population. The specific fitness value calculation function is as follows:
[0039] (9);
[0040] In formula (9), J represents the fitness value, T represents the system running time, and e(t) represents the speed error;
[0041] S34. Update the positions of individuals in the population using the improved mathematical model of the hyperbolic sine-cosine optimization algorithm. The specific steps are as follows:
[0042] Step 1: Calculate the switching factor A, which is used to switch between the development and exploration phases. The calculation formula is:
[0043] (10);
[0044] In formula (10), p and q represent the balance parameters, where p = 10, q = 9, and rand represents a random number between [0, 1];
[0045] Step 2: If A>1, enter the exploration phase and update the positions of individuals in the population through the mathematical model of the algorithm exploration phase;
[0046] Step 3: If A <= 1, then enter the development phase and update the positions of individuals in the population using the mathematical model of the algorithm development phase;
[0047] Step 4: Calculate the fitness value of the updated individual and update the optimal individual position in the population;
[0048] Step 5: Determine whether the current number of iterations has reached the maximum number of iterations max_iter. If it has not reached the maximum number of iterations, continue to execute S34 to perform algorithm optimization. If it has reached the maximum number of iterations, exit the algorithm optimization and output the optimal individual position in the population as the optimal solution.
[0049] This paper proposes an improved wind turbine speed control optimization method with the following advantages: Based on improvements to the mathematical models of the exploration and development phases of the hyperbolic sine-cosine optimization algorithm, this method significantly enhances the algorithm's global search and local fine-tuning capabilities in multidimensional, strongly coupled control systems. Specifically, the adoption of a nonlinear hybrid swarm drive strategy dynamically adjusts the search path, enhancing the diversity and directionality of the search process and improving the ability to escape complex error surfaces. The introduction of a multi-frequency signal dynamic perturbation development mechanism provides enhanced disturbance resilience and robustness during the local refinement of controller parameters, reducing the likelihood of falling into local optimality and improving the control system's transient response characteristics. The entire optimization process constructs a fitness function guided by the wind turbine speed error, continuously updating the PID parameters during algorithm iterations, achieving systematic improvements in response speed, steady-state accuracy, and anti-interference performance. This method can adapt to dynamic changes in wind turbine operation under different operating conditions, reduce tuning errors, improve system efficiency, and effectively extend equipment life while ensuring control quality. It has significant engineering practical value and potential for promotion. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 Flowchart of an improved fan speed control optimization method.
[0051] Figure 2 This is the model diagram of the fan speed control system.
[0052] Figure 3 Comparison chart of PID controller response in fan speed control system optimized by standard hyperbolic sine-cosine optimization algorithm and improved hyperbolic sine-cosine optimization algorithm.
[0053] Figure 4 is a comparison of the fitness value changes during the optimization process of the standard hyperbolic sine-cosine optimization algorithm and the improved hyperbolic sine-cosine optimization algorithm. DETAILED DESCRIPTION
[0054] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work shall fall within the scope of protection of the present invention.
[0055] The present invention provides a technical solution: an improved fan speed control optimization method, which specifically includes the following steps, as shown in FIG1 .
[0056] S1. Construct a fan speed control system, which includes: a speed error calculation module, a PID controller module, an improved hyperbolic sine cosine optimization algorithm module, a motor drive module, a fan load module, and an encoder module. Figure 2 shown.
[0057] Furthermore, in S1, the execution process of each module in the fan speed control system is as follows: the target speed is set according to the air volume required by the fan, and the encoder module detects the real-time speed of the fan, and the real-time speed and the target speed are input into the error calculation module to calculate the speed error e(t), and e(t) is input into the PID controller module. The improved hyperbolic sine cosine optimization algorithm module is started to optimize the control parameters of the PID controller module, and a set of optimal solutions is obtained under the set number of algorithm iterations. The control quantity U(t) of the optimized PID controller is input into the motor drive module. The motor drive module controls the three-phase current of the motor through the three-phase inverter, thereby driving the motor to drive the fan load module to reach the target speed. The mathematical model of the fan load module is as follows:
[0058] The load torque of the fan consists of two parts. One part is the inertia load torque generated by the fan due to its rotational inertia, specifically:
[0059] (1);
[0060] In formula (1), represents the inertia load torque, Represents the moment of inertia of the fan, and the calculation formula is shown in formula (2). represents the motor's moment of inertia, Indicates net torque, which refers to the torque applied by the motor when driving the fan minus other load torques;
[0061] (2);
[0062] In formula (2), N represents the number of fan blades, m represents the mass of the fan blades, and L represents the length of the fan blades;
[0063] The other part is the load torque generated by wind resistance during the operation of the fan. When considering that aerodynamic force is associated with the change of kinetic energy in the rotating system, the wind resistance torque is proportional to the cube of the rotation speed in actual conditions, that is, , represents wind resistance torque, k represents wind resistance coefficient, and ω represents wind speed of the fan.
[0064] S2. Modify the hyperbolic sine and cosine optimization algorithm, including two improvements:
[0065] S21. Improve the mathematical model of the first stage of the exploration process of the hyperbolic sine-cosine optimization algorithm using a nonlinear hybrid swarm-driven exploration update strategy. This strategy uses random numbers to divide the update into two different modes. The first update mode uses sine and logarithmic functions to nonlinearly modulate the current agent position, and uses the difference between the group mean and the optimal solution as a guide term. The second update mode uses cosine and hyperbolic tangent functions to nonlinearly adjust the difference between the current agent position and the group mean, and adjusts the update amplitude based on the group standard deviation.
[0066] S22. A multi-frequency signal dynamic perturbation development strategy is used to improve the mathematical model of the second stage of the development process of the hyperbolic sine-cosine optimization algorithm. The strategy adjusts the current agent position by introducing a jump perturbation signal and a direction reset signal. The direction reset signal is dynamically adjusted according to the search progress of the algorithm and the changing trend of the fitness value.
[0067] Furthermore, in S21, a nonlinear hybrid population-driven exploration update strategy is used to improve the mathematical model of the first stage of the exploration process of the hyperbolic sine-cosine optimization algorithm. First, a random number r is generated. When r>0.5, the first update method is used to add two adjustment items on the basis of the current global optimal position. The first is to use the oscillation of the sine function to adjust the search trajectory of the current position. The second is to use the logarithmic function to perform a nonlinear transformation on the absolute value of the current position vector to adjust the scale of the search step. At the same time, the strategy also adds the difference between the mean of the group position and the current global optimal solution as a guide item to adjust the search direction. When r<=0.5, the second update method is used to subtract a weighted nonlinear adjustment item from the current global optimal position. The difference between the current agent position and the mean of the current agent position and the group position is adjusted by the cosine function and the hyperbolic tangent function respectively. Finally, the standard deviation of the individual position in the population is used as the convergence control factor. The specific update formula is as follows:
[0068] (3);
[0069] In formula (3), X(iter+1) represents the updated individual position, w1 represents the step weight coefficient, w1=(1-iter / max_iter), iter represents the current number of iterations, max_iter represents the maximum number of iterations, X(iter) represents the current individual position, r1 and r2 represent random numbers between [0,1], λ represents the logarithmic amplitude factor, v represents the hyperbolic tangent scaling factor, Pop represents the difference between the average position and the optimal position of the population, represents the standard deviation of the individuals in the population, η represents the standard deviation scaling factor, Xbest represents the position of the best individual, and X_mean represents the average position of the population.
[0070] Furthermore, in S22, a multi-frequency signal dynamic perturbation development strategy is used to improve the mathematical model of the second stage of the development process of the hyperbolic sine-cosine optimization algorithm. In this strategy, the jump amplitude adjustment coefficient is dynamically adjusted by a decreasing function, and the symbol perturbation factor is defined by the product of multiple different frequency parameters and independent random functions to form a nonlinear symbol perturbation sequence. The multi-scale perturbation factor integrates the distance term and the group standard deviation term between the current solution and the optimal solution to construct a complex dimensional perturbation scale. The direction difference vector integrates the guiding direction of the global optimal solution and the group mean, combined with dual weight control, and the direction reset item determines whether to introduce periodic directional perturbation through the change of individual fitness value. At the same time, a linearly decreasing reset weight is set to adjust the degree of influence of this item, thereby forming an overall nonlinear perturbation update expression structure. The specific update formula is as follows:
[0071] (4);
[0072] In formula (4), X(iter+1) represents the updated individual position, X(iter) represents the current individual position, ψ represents the jump amplitude adjustment factor, ψ=exp(-iter / 2max_iter), max_iter represents the maximum number of iterations, represents the symbol perturbation factor, and the calculation formula is shown in formula (5). represents the multi-scale perturbation factor, and the calculation formula is shown in formula (6). ref represents the direction difference vector, and the calculation formula is shown in formula (7). ρ represents the reset weight factor, and the value is 0.6. represents the direction reset term, and the calculation formula is shown in formula (8);
[0073] (5);
[0074] In formula (5), m represents the frequency dimension of the disturbance, represents the kth frequency factor, which is used to adjust the periodic disturbance. Represents a random number between [0,1], sign() represents the sign function;
[0075] (6);
[0076] In formula (6), c1 and c2 represent weight balancing factors, which are 0.6 and 0.4 respectively, α represents the nonlinear response factor, which is 0.5, and pop_norm represents the normalized standard deviation of the population position;
[0077] (7);
[0078] In formula (7), rand1 and rand2 represent random numbers between [0,1], Xbest represents the position of the best individual, X_mean represents the average position of the population, and X(iter) represents the current individual position;
[0079] (8);
[0080] In formula (8), τ represents the disturbance amplitude control factor, and its value range is [0.1, 1]. Represents the random disturbance term, which follows a uniform random distribution, σ is the boundary of the uniform disturbance interval, fitval represents the rate of change of the current individual's fitness value, and ε represents the threshold value of the rate of change of the fitness value.
[0081] S3. Use the improved hyperbolic sine-cosine optimization algorithm to optimize the parameters of the PID controller module of the fan speed control system, and obtain a set of optimal control parameters Kp, Ki, and Kd values under the set number of iterations.
[0082] Furthermore, in S3, the improved hyperbolic sine-cosine optimization algorithm is used to optimize the parameters of the PID controller module of the fan speed control system, and the specific steps are as follows:
[0083] S31. Initialize the basic parameters of the hyperbolic sine-cosine optimization algorithm for the modified machine, including: the number of populations N of the algorithm, the problem dimension dim of the algorithm, the maximum number of iterations max_iter, the upper and lower limits of the algorithm's search space [lb, ub], and set the initial position of the population using the basic parameters of the algorithm;
[0084] S32. Based on the performance requirements of the fan speed control system, a mapping mechanism is constructed between the improved hyperbolic sine-cosine optimization algorithm and the PID controller parameters of the fan speed control system. That is, the position vectors of the individuals in the population during the algorithm iteration are regarded as the PID control parameters to be adjusted, thereby achieving an effective mapping from the search space position to the control parameter space. During the optimization process, the algorithm calculates the fitness value based on the deviation between the system output and the target speed, and uses this to dynamically evolve the individual positions, thereby achieving continuous adjustment and updating of the controller parameters.
[0085] S33. Set the fitness value calculation function of the improved hyperbolic sine-cosine optimization algorithm, and calculate the fitness value of the initial population position through the fitness value calculation function, sort according to the fitness value, and select the optimal individual position in the population. The specific fitness value calculation function is as follows:
[0086] (9);
[0087] In formula (9), J represents the fitness value, T represents the system running time, and e(t) represents the speed error;
[0088] S34. Update the positions of individuals in the population using the improved mathematical model of the hyperbolic sine-cosine optimization algorithm. The specific steps are as follows:
[0089] Step 1: Calculate the switching factor A, which is used to switch between the development and exploration phases. The calculation formula is:
[0090] (10);
[0091] In formula (10), p and q represent the balance parameters, where p = 10, q = 9, and rand represents a random number between [0, 1];
[0092] Step 2: If A>1, enter the exploration phase and update the positions of individuals in the population through the mathematical model of the algorithm exploration phase;
[0093] Step 3: If A <= 1, then enter the development phase and update the positions of individuals in the population using the mathematical model of the algorithm development phase;
[0094] Step 4: Calculate the fitness value of the updated individual and update the optimal individual position in the population;
[0095] Step 5: Determine whether the current number of iterations has reached the maximum number of iterations max_iter. If it has not reached the maximum number of iterations, continue to execute S34 to perform algorithm optimization. If it has reached the maximum number of iterations, exit the algorithm optimization and output the optimal individual position in the population as the optimal solution.
[0096] S4. Input a set of optimal control parameters obtained by S3 optimization into the PID controller module, and adjust the fan speed to reach the target speed by controlling the motor drive module.
[0097] Furthermore, in order to verify that the present invention has certain advantages over the traditional method, Matlab and Simulink are used to carry out simulation experiments. First, the code of the hyperbolic sine cosine optimization algorithm is improved by Matlab, and the fan simulation model code is written by the mathematical model of the fan load torque module. The parameters are initialized in the main function, the population size N=30, the maximum number of iterations max_iter=100, the search space range [lb, ub]=[0.001, 100], and the problem dimension dim=3. The initial parameters and the fitness value function written by formula (9) are respectively passed as parameters to the standard hyperbolic sine cosine optimization algorithm and the improved hyperbolic sine cosine optimization algorithm code function. The simulation model of the fan speed control system is constructed by Simulink, and the controlled field function of the fan is set to the second-order transfer function G(s). , s represents the variable in the complex frequency domain. Run the main function code, pass the control parameters found by the algorithm into the Simulink model, and pass the output of the model into the fitness value calculation function as the optimization standard for individual updates. The optimization results of each iteration are retained and visualized after the algorithm iteration is completed, as shown in Figure 3 and Figure 4 shown.
[0098] Furthermore, Figure 3 This is a comparison chart of the PID controller response in the fan speed control system optimized by the standard hyperbolic sine-cosine optimization algorithm and the improved hyperbolic sine-cosine optimization algorithm. The target value is set to 1 unit. It can be seen from the figure that the overshoot of the PID controller response curve in the fan speed control system optimized by the improved hyperbolic sine-cosine optimization algorithm is lower, indicating better stability. It reaches the target value in a very short time and tends to be stable without obvious oscillation. Figure 4 is a comparison chart of the fitness value changes during the optimization process of the standard hyperbolic sine-cosine optimization algorithm and the improved hyperbolic sine-cosine optimization algorithm. It can be seen from the figure that the improved hyperbolic sine-cosine optimization algorithm has stronger adaptability in the optimization process, the fitness value of the individual position found is lower, the optimization accuracy is higher, and it still maintains excellent optimization ability in the later stage of the algorithm.
Claims
1. An improved fan speed control optimization method, characterized in that: The specific steps are as follows: S1. Construct a fan speed control system, which includes: a speed error calculation module, a PID controller module, an improved hyperbolic sine-cosine optimization algorithm module, a motor drive module, a fan load module, and an encoder module; S2. Improve the hyperbolic sine-cosine optimization algorithm, including two improvements: S21. Improve the mathematical model of the first stage of the exploration process of the hyperbolic sine-cosine optimization algorithm using a nonlinear hybrid swarm-driven exploration update strategy. This strategy uses random numbers to divide the update into two different modes. The first update mode uses sine and logarithmic functions to nonlinearly modulate the current agent position, and uses the difference between the group mean and the optimal solution as a guide term. The second update mode uses cosine and hyperbolic tangent functions to nonlinearly adjust the difference between the current agent position and the group mean, and adjusts the update amplitude based on the group standard deviation. S22. Improve the mathematical model of the second stage of the development process of the hyperbolic sine-cosine optimization algorithm using a multi-frequency signal dynamic perturbation development strategy. This strategy adjusts the current agent position by introducing a jump perturbation signal and a direction reset signal. The direction reset signal is dynamically adjusted based on the algorithm's search progress and the changing trend of the fitness value. S3. Optimize the parameters of the PID controller module of the fan speed control system using an improved hyperbolic sine-cosine optimization algorithm, and obtain a set of optimal control parameters Kp, Ki, and Kd under a set number of iterations; S4. Input a set of optimal control parameters obtained by S3 optimization into the PID controller module, and adjust the fan speed to reach the target speed by controlling the motor drive module.
2. The improved fan speed control optimization method according to claim 1, characterized in that: In S1, the execution process of each module in the fan speed control system is to set the target speed according to the air volume required by the fan, and at the same time, the encoder module detects the real-time speed of the fan, and transmits the real-time speed and the target speed together to the error calculation module to calculate the speed error e(t), and input e(t) to the PID controller module, and start the improved hyperbolic sine cosine optimization algorithm module to optimize the control parameters of the PID controller module, obtain a set of optimal solutions under the set number of algorithm iterations, and input the control quantity U(t) of the optimized PID controller into the motor drive module. The motor drive module controls the three-phase current of the motor through the three-phase inverter, thereby driving the motor to drive the fan load module to reach the target speed.
3. The improved fan speed control optimization method according to claim 2, characterized in that: In the S21, an exploration update strategy based on nonlinear mixed group driving is used to improve the mathematical model of the first stage of the exploration process of the hyperbolic sine cosine optimization algorithm. First, a random number r is generated. When r>0.5, the first update method is adopted. Two adjustment items are added on the basis of the current global optimal position. The first is to use the oscillation of the sine function to adjust the search trajectory of the current position. The second is to use the logarithmic function to perform a nonlinear transformation on the absolute value of the current position vector to adjust the scale of the search step. At the same time, the strategy also adds the difference between the mean of the group position and the current global optimal solution as a guide item to adjust the search direction. When r<=0.5, the second update method is adopted. A weighted nonlinear adjustment item is subtracted from the current global optimal position. The difference between the current agent position and the mean of the current agent position and the group position is adjusted by the cosine function and the hyperbolic tangent function respectively. Finally, the standard deviation of the individual position in the population is used as the convergence control factor. The specific update formula is as follows: (3); In formula (3), X(iter+1) represents the updated individual position, w1 represents the step weight coefficient, w1=(1-iter / max_iter), iter represents the current number of iterations, max_iter represents the maximum number of iterations, X(iter) represents the current individual position, r1 and r2 represent random numbers between [0,1], λ represents the logarithmic amplitude factor, v represents the hyperbolic tangent scaling factor, Pop represents the difference between the average position and the optimal position of the population, represents the standard deviation of the individuals in the population, η represents the standard deviation scaling factor, Xbest represents the position of the best individual, and X_mean represents the average position of the population.
4. The improved fan speed control optimization method according to claim 3, characterized in that: In the S22, a multi-frequency signal dynamic perturbation development strategy is used to improve the mathematical model of the second stage of the development process of the hyperbolic sine-cosine optimization algorithm. In this strategy, the jump amplitude adjustment coefficient is dynamically adjusted by a decreasing function, and the symbol perturbation factor is defined by the product of multiple different frequency parameters and independent random functions to form a nonlinear symbol perturbation sequence. The multi-scale perturbation factor integrates the distance term and the group standard deviation term between the current solution and the optimal solution to construct a complex dimensional perturbation scale. The direction difference vector integrates the guiding direction of the global optimal solution and the group mean, combined with dual weight control, and the direction reset item determines whether to introduce periodic directional perturbation through the change of individual fitness value. At the same time, a linearly decreasing reset weight is set to adjust the degree of influence of this item, thereby forming an overall nonlinear perturbation update expression structure. The specific update formula is as follows: (4); In formula (4), X(iter+1) represents the updated individual position, X(iter) represents the current individual position, ψ represents the jump amplitude adjustment factor, ψ=exp(-iter / 2max_iter), max_iter represents the maximum number of iterations, represents the symbol disturbance factor, and the calculation formula is shown in formula (5). represents the multi-scale perturbation factor, and the calculation formula is shown in formula (6). ref represents the direction difference vector, and the calculation formula is shown in formula (7). ρ represents the reset weight factor, and the value is 0.
6. represents the direction reset term, and the calculation formula is shown in formula (8); (5); In formula (5), m represents the frequency dimension of the disturbance, represents the kth frequency factor, which is used to adjust the periodic disturbance. Represents a random number between [0,1], sign() represents the sign function; (6); In formula (6), c1 and c2 represent weight balancing factors, which are 0.6 and 0.4 respectively, α represents the nonlinear response factor, which is 0.5, and pop_norm represents the normalized standard deviation of the population position; (7); In formula (7), rand1 and rand2 represent random numbers between [0,1], Xbest represents the position of the best individual, X_mean represents the average position of the population, and X(iter) represents the current individual position; (8); In formula (8), τ represents the disturbance amplitude control factor, and its value range is [0.1, 1]. Represents the random disturbance term, which follows a uniform random distribution, σ is the boundary of the uniform disturbance interval, fitval represents the rate of change of the current individual's fitness value, and ε represents the threshold value of the rate of change of the fitness value.
5. The improved fan speed control optimization method according to claim 4, characterized in that: In S3, the improved hyperbolic sine-cosine optimization algorithm is used to optimize the parameters of the PID controller module of the fan speed control system. The specific steps are as follows: S31. Initialize the basic parameters of the hyperbolic sine-cosine optimization algorithm for the modified machine, including: the number of populations N of the algorithm, the problem dimension dim of the algorithm, the maximum number of iterations max_iter, the upper and lower limits of the algorithm's search space [lb, ub], and set the initial position of the population using the basic parameters of the algorithm; S32. Based on the performance requirements of the fan speed control system, a mapping mechanism is constructed between the improved hyperbolic sine-cosine optimization algorithm and the PID controller parameters of the fan speed control system. That is, the position vectors of the individuals in the population during the algorithm iteration are regarded as the PID control parameters to be adjusted, thereby achieving an effective mapping from the search space position to the control parameter space. During the optimization process, the algorithm calculates the fitness value based on the deviation between the system output and the target speed, and uses this to dynamically evolve the individual positions, thereby achieving continuous adjustment and updating of the controller parameters. S33, setting a fitness value calculation function of the improved hyperbolic sine-cosine optimization algorithm, and calculating the fitness value of the initial population position through the fitness value calculation function, sorting according to the fitness value, and selecting the optimal individual position in the population; S34. Update the positions of individuals in the population using the improved mathematical model of the hyperbolic sine-cosine optimization algorithm. The specific steps are as follows: Step 1: Calculate the switching factor A for switching between the development and exploration phases. Step 2: If A>1, enter the exploration phase and update the positions of individuals in the population through the mathematical model of the algorithm exploration phase; Step 3: If A <= 1, then enter the development phase and update the positions of individuals in the population using the mathematical model of the algorithm development phase; Step 4: Calculate the fitness value of the updated individual and update the optimal individual position in the population; Step 5: Determine whether the current number of iterations has reached the maximum number of iterations max_iter. If it has not reached the maximum number of iterations, continue to execute S34 to perform algorithm optimization. If it has reached the maximum number of iterations, exit the algorithm optimization and output the optimal individual position in the population as the optimal solution.
Citation Information
Patent Citations
Doubly-fed fan control parameter identification method and system based on improved black hole algorithm
CN119937302A
Multi-fan operation system and self-adaptive control method and device
CN120007614A