Improved fan speed control optimization method
Through the improved hyperbolic sine cosine optimization algorithm, the parameters of the PID controller are optimized, and the problems of slow response and steady-state error in the fan speed control are solved, faster response and higher precision control are achieved, and the operation efficiency and life of the fan are improved.
Patent Information
- Application Number
- CN202510786983.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-07-11
- 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 control parameters of the PID controller. Through the nonlinear hybrid group-driven strategy and the multi-frequency signal dynamic perturbation development strategy, the algorithm's global search ability and robustness are enhanced, and the parameters are dynamically adjusted to adapt to environmental changes.
It improves the response speed and control accuracy of fan speed control, enhances the fan's robustness and anti-interference ability under complex working conditions, reduces energy consumption and extends the service life of the equipment.
Smart Images

Figure CN120292102A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of PID control optimization, and particularly relates to an improved method for optimizing the speed control of a fan. Background Art
[0002] As a commonly used power device in industrial production and daily life, the operating efficiency and stability of a fan directly affect the overall performance and energy consumption level of the system. Traditional fan speed control mostly adopts the PID control strategy. The PID controller mainly relies on fixed proportional, integral, and differential parameters to adjust the fan speed. However, due to the complex load changes of the fan and the characteristics of non-linear coupling, as well as the different control environments, the fixed control parameters of the traditional PID controller are difficult to cope with the complex control environment of the fan, and it is often difficult to balance rapid response and system stability, easily resulting in problems such as slow response, serious overshoot, and large steady-state error, thus leading to a decline in the control performance of the fan, affecting the energy-saving effect and service life of the fan. In recent years, optimization methods for fan speed control have emerged continuously, especially the adaptive parameter adjustment technology based on intelligent optimization, which provides an effective means to solve the deficiencies of traditional control. Therefore, an improved method that can dynamically adapt to working condition changes, improve the response speed and control accuracy of fan speed control has important practical significance and application value.
[0003] The hyperbolic sine-cosine optimization algorithm (SCHO) is a swarm intelligence optimization algorithm designed based on the hyperbolic sine function and the hyperbolic cosine function. By introducing the non-linear characteristics of the hyperbolic function, the algorithm effectively balances the global exploration and local exploitation capabilities, and improves the convergence speed and accuracy of the algorithm in complex optimization problems. The SCHO algorithm adopts a phased search strategy and combines an adaptive weight adjustment strategy to achieve dynamic adjustment of the search intensity. SCHO shows good performance in function optimization and engineering optimization, but in some optimization problems that need to handle multi-constraints and dynamic change environments, the algorithm still has deficiencies such as limited convergence speed and being easily trapped in local optima. Therefore, it is necessary to improve its search mechanism and parameters to improve the stability and robustness of the algorithm. Summary of the Invention
[0004] In view of the problems existing in the above-mentioned background technology, the present invention proposes an improved fan speed control optimization method, aiming to optimize the control parameters of the PID controller in the fan speed control system using an improved hyperbolic sine-cosine optimization algorithm. The improved hyperbolic sine-cosine optimization algorithm has stronger global search ability and better adaptability. It can quickly jump out when the algorithm falls into a local optimal solution, improving the optimization accuracy of the algorithm. 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, significantly improving the overall operating efficiency and economy of the fan.
[0005] The present invention proposes an improved fan speed control optimization method, and the specific steps are as follows.
[0006] S1. Construct a fan speed control system, which includes: a rotational 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-cosine optimization algorithm, including two improvements: S21. Use an exploration and update strategy based on non-linear hybrid population drive to improve the mathematical model of the first stage of the exploration process of the hyperbolic sine-cosine optimization algorithm. This strategy divides two different update methods through random numbers. The first update method non-linearly modulates the current agent position using the sine function and logarithmic function, and combines the difference between the population mean and the optimal solution as a guiding term. The second update method non-linearly adjusts the difference between the current agent position and the population mean using the cosine function and hyperbolic tangent function, and at the same time adjusts the update amplitude in combination with the population standard deviation; S22. Use a multi-frequency signal dynamic perturbation development strategy to improve the mathematical model of the second stage of the development process of the hyperbolic sine-cosine optimization algorithm. This strategy adjusts the current agent position by introducing a jump perturbation signal and a direction reset signal, where the direction reset signal is dynamically adjusted according to the search progress of the algorithm and the change trend of the fitness value.
[0008] S3. Use the improved hyperbolic sine-cosine optimization algorithm to optimize the parameters of the PID controller module in the fan speed control system, and obtain a set of optimal control parameter values of Kp, Ki, and Kd under the set number of iterations.
[0009] S4. Input the set of optimal control parameters optimized in S3 into the PID controller module, and adjust the fan speed to the target rotational speed by controlling the motor drive module.
[0010] Preferably, in S1, the execution process of each module in the fan speed control system is as follows: set the target speed according to the required air volume of the fan. At the same time, the encoder module detects the real-time speed of the fan, and inputs the real-time speed and the target speed into the error calculation module to calculate the speed error e(t). Input e(t) into 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 a 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: The load torque of the fan includes two parts. One part is the inertial load torque generated by the fan due to its moment of inertia, specifically: (1); In formula (1), represents the inertial load torque, represents the moment of inertia of the fan, and its calculation formula is shown in formula (2), represents the moment of inertia of the motor, represents the net torque, which refers to the torque applied when the motor drives the fan minus other load torques; (2); In formula (2), N represents the number of fan blades, m represents the mass of the blades, and L represents the length of the fan blades; The other part is the load torque generated by the wind resistance during the operation of the fan. When considering the change of aerodynamic force associated with the kinetic energy in the rotating system, in actual situations, the wind resistance torque is proportional to the cube of the speed, that is , represents the wind resistance torque, k represents the wind resistance coefficient, and ω represents the speed of the fan.
[0011] Preferably, in S21, an exploration update strategy based on non - linear hybrid swarm drive 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. On the basis of the current global optimal position, two adjustment terms are added. The first is to use the oscillation of the sine function to adjust the search trajectory of the current position, and the second is to use the logarithmic function to perform non - linear transformation on the absolute value of the current position vector to adjust the scale of the search step. At the same time, the difference between the swarm position mean and the current global optimal solution is added as a guiding term to adjust the search direction. When r <= 0.5, the second update method is adopted. On the basis of the current global optimal position, a weighted non - linear adjustment term is subtracted. The current agent position and the difference between the current agent position and the mean of the swarm position are adjusted by the cosine function and the hyperbolic tangent function respectively. Finally, the standard deviation of the individual positions 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 - size weight coefficient, w1=(1 - iter / max_iter), iter represents the current iteration number, max_iter represents the maximum iteration number, 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 population individuals, η represents the standard - deviation scaling factor, Xbest represents the position of the optimal individual, and X_mean represents the average position of the population.
[0012] Preferably, an exploration update strategy based on non - linear hybrid swarm drive enhances the complexity and diversity of the search path by introducing multiple non - linear functions, and realizes a more directional and dynamically adaptive individual position update mechanism by combining population statistical characteristics, 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 non - linear and strong - coupling characteristics, suppress overshoot and oscillation while ensuring the fast response of the system, and improve the control accuracy and stability.
[0013] Preferably, in S22, a multi-frequency signal dynamic perturbation development strategy is used to improve the mathematical model in 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 sign perturbation factor is defined as the product of multiple different frequency parameters and an independent random function to form a non-linear sign perturbation sequence. The multi-scale perturbation factor fuses the distance term between the current solution and the optimal solution and the population standard deviation term to construct a complex dimensional perturbation scale. The direction difference vector synthesizes the guiding directions of the global optimal solution and the population mean, and combines double-weight regulation. The direction reset term judges whether to introduce periodic direction perturbation according to the change of the individual fitness value, and at the same time sets a linearly decreasing reset weight to adjust the influence degree of this term, so as to form an overall non-linear perturbation type 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), and max_iter represents the maximum number of iterations. represents the sign perturbation factor, and its calculation formula is shown in formula (5). represents the multi-scale perturbation factor, and its calculation formula is shown in formula (6). ref represents the direction difference vector, and its calculation formula is shown in formula (7). ρ represents the reset weight factor, and its value is 0.6. represents the direction reset term, and its calculation formula is shown in formula (8); (5); In formula (5), m represents the number of frequency dimensions of the perturbation. represents the k-th frequency factor, which is used to adjust the periodic perturbation. represents a random number between [0, 1], and sign() represents the sign function; (6); In formula (6), c1 and c2 represent the weight balance factors, with values of 0.6 and 0.4 respectively, α represents the non-linear response factor, with a value of 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 optimal 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 change rate of the fitness value of the current individual, and ε represents the threshold of the fitness value change rate.
[0014] Preferably, compared with the traditional optimization strategy, a multi-frequency signal dynamic disturbance development strategy has higher dynamicity and randomness in the disturbance structure, which helps the diversity and jumping ability of the search path. Especially when the algorithm falls into the local optimal solution, the algorithm can quickly jump out through disturbance. In the task of optimizing the PID controller parameters, this strategy can perform adaptive disturbance according to the real-time state changes of the control system, reducing the influence of dynamic error in the tuning process on the control accuracy of the system.
[0015] 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. The specific steps are as follows: S31. Initialize the basic parameters of the improved hyperbolic sine-cosine optimization algorithm, including: the population size N of the algorithm, the problem dimension dim of the algorithm, the maximum number of iterations max_iter, the upper and lower limit range [lb, ub] of the search space of the algorithm, and set the initial position of the population through the basic parameters of the algorithm. S32. Based on the performance requirements of the fan speed control system, construct a mapping mechanism between the improved hyperbolic sine-cosine optimization algorithm and the parameters of the PID controller of the fan speed control system, that is, regard the position vector of the population individuals in the algorithm iteration process as the PID control parameters to be adjusted, and then realize the effective mapping from the search space position to the control parameter space. During the optimization process, the algorithm calculates the fitness value according to the deviation between the system output and the target speed, and performs dynamic evolution of the individual position based on this, realizing continuous adjustment and update of the controller parameters. 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: (9); In formula (9), J represents the fitness value, T represents the system operation time, and e(t) represents the speed error. S34. Update the positions of the individuals in the population through the mathematical model of the improved hyperbolic sine-cosine optimization algorithm. The specific steps are as follows: step1. Calculate the switching factor A for switching between the exploration and exploitation phases. The calculation formula is: (10); In formula (10), p and q represent balance parameters, where p = 10, q = 9, and rand represents a random number between [0, 1]; Step 2: If A > 1, enter the exploration stage, and update the positions of population individuals through the mathematical model in the exploration stage of the algorithm; Step 3: If A <= 1, enter the exploitation stage, and update the positions of population individuals through the mathematical model in the exploitation stage of the algorithm; Step 4: Calculate the fitness value of the updated individual, and simultaneously update the position of the optimal individual in the population; Step 5: Determine whether the current iteration number has reached the maximum iteration number max_iter. If it has not reached the maximum iteration number, continue to execute S34 for algorithm optimization. If it has reached the maximum iteration number, jump out of the algorithm optimization, and output the position of the optimal individual in the population as the optimal solution.
[0016] An improved optimization method for fan speed control proposed in this paper has the following advantages: This method is based on improving the mathematical models in the exploration stage and exploitation stage of the hyperbolic sine-cosine optimization algorithm, significantly enhancing the global search and local fine-tuning capabilities of the algorithm in multi-dimensional and strongly coupled control systems. Specifically, the adoption of a non-linear hybrid population driving strategy can dynamically adjust the search path, strengthen the diversity and directionality of the search process, and improve the jumping-out ability in complex error surfaces; the introduction of a multi-frequency signal dynamic perturbation exploitation mechanism provides stronger perturbation flexibility and robustness during the local refinement of controller parameters, reduces the possibility of falling into local optima, and improves the transient response characteristics of the control system. The entire optimization process constructs a fitness function guided by the fan speed error, continuously updates the PID parameters during algorithm iteration, and achieves a systematic improvement in response speed, steady-state accuracy, and anti-interference performance. This method can adapt to the dynamic changes in different operating states during the operation of the fan, reduce the tuning error, improve the system efficiency, effectively extend the service life of the equipment while ensuring the control quality, and has significant engineering practical value and promotion prospects. Description of the Drawings
[0017] Figure 1 It is a flowchart of an improved optimization method for fan speed control.
[0018] Figure 2 It is a model diagram of the fan speed control system.
[0019] Figure 3 It is a comparison diagram of the responses of the PID controller in the fan speed control system optimized by the standard hyperbolic sine-cosine optimization algorithm and the improved hyperbolic sine-cosine optimization algorithm.
[0020] 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. Specific implementation mode
[0021] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a 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 those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present invention.
[0022] The present invention provides a technical solution: an improved fan speed control optimization method, which specifically includes the following steps, as shown in Figure 1.
[0023] S1. Construct a fan speed control system, which includes: a rotational 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, as Figure 2 shown.
[0024] Further, in S1, the execution process of each module in the fan speed control system is as follows: set the target rotational speed through the air volume required by the fan. At the same time, the encoder module detects the actual rotational speed of the fan, and inputs the actual rotational speed and the target rotational speed into the error calculation module together to calculate the rotational speed error e(t). Input e(t) into the PID controller module, 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, input the control quantity U(t) of the optimized PID controller into the motor drive module, and the motor drive module controls the three-phase current of the motor through a three-phase inverter, thereby driving the motor to drive the fan load module to reach the target rotational speed. The mathematical model of the fan load module is as follows: The load torque of the fan includes two parts. One part is the inertial load torque generated by the fan due to the moment of inertia, specifically: (1); In formula (1), represents the inertial load torque, represents the moment of inertia of the fan, and the calculation formula is as shown in formula (2), represents the moment of inertia of the motor, represents the net torque, which refers to the torque applied when the motor drives the fan minus other load torques; (2); 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 of the fan. Another part is the load torque generated by the wind resistance during the operation of the fan. When considering the change of aerodynamic force associated with the kinetic energy in the rotating system, in actual situation, the wind resistance torque is proportional to the cube of the rotational speed, that is , represents the wind resistance torque, k represents the wind resistance coefficient, and ω represents the rotational speed of the fan.
[0025] S2. The hyperbolic sine-cosine optimization algorithm of this machine modification includes two improvements: S21. Use an exploration update strategy based on non-linear hybrid swarm drive to improve the mathematical model of the first stage of the exploration process of the hyperbolic sine-cosine optimization algorithm. This strategy divides two different update methods through random numbers. The first update method uses the sine function and logarithmic function to non-linearly modulate the current agent position, and combines the difference between the swarm mean and the optimal solution as a guiding term. The second update method uses the cosine function and hyperbolic tangent function to non-linearly adjust the difference between the current agent position and the swarm mean, and at the same time combines the swarm standard deviation to adjust the update amplitude; S22. Use a multi-frequency signal dynamic perturbation development strategy to improve the mathematical model of the second stage of the development process of the hyperbolic sine-cosine optimization algorithm. This strategy adjusts the current agent position by introducing a jump perturbation signal and a direction reset signal, where the direction reset signal is dynamically adjusted according to the search progress of the algorithm and the change trend of the fitness value.
[0026] Furthermore, in S21, use an exploration update strategy based on non-linear hybrid swarm drive to improve the mathematical model of the first stage of the exploration process of the hyperbolic sine-cosine optimization algorithm. First, generate a random number r. When r > 0.5, adopt the first update method. Add two adjustment terms 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, and the second is to use the logarithmic function to non-linearly transform the absolute value of the current position vector to adjust the scale of the search step. At the same time, this strategy also adds the difference between the swarm position mean and the current global optimal solution as a guiding term to adjust the search direction. When r <= 0.5, adopt the second update method. Subtract a weighted non-linear adjustment term on the basis of the current global optimal position. Adjust the current agent position and the difference between the current agent position and the swarm position mean through the cosine function and hyperbolic tangent function respectively. Finally, use the standard deviation of the individual positions in the population as the convergence control factor. The specific update formula is as follows: (3); In Equation (3), X(iter + 1) represents the updated individual position, w1 represents the step size weight coefficient, w1 = (1 - iter / max_iter), iter represents the current iteration number, max_iter represents the maximum iteration number, 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 population individuals, η represents the standard deviation scaling factor, Xbest represents the position of the optimal individual, and X_mean represents the average position of the population.
[0027] Further, in S22, a multi-frequency signal dynamic perturbation development strategy is used to improve the mathematical model in 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, the sign perturbation factor is defined by the product of multiple different frequency parameters and independent random functions to form a non-linear sign perturbation sequence, the multi-scale perturbation factor fuses the distance term between the current solution and the optimal solution and the population standard deviation term to construct a complex dimensional perturbation scale, the direction difference vector synthesizes the guiding directions of the global optimal solution and the population mean, combined with double-weight regulation, the direction reset term determines whether to introduce periodic direction perturbation based on the change of the individual fitness value, and at the same time, a linearly decreasing reset weight is set to adjust the influence degree of this term, thus forming an overall non-linear perturbation formula update expression structure. The specific update formula is as follows: (4); In Equation (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 iteration number, represents the sign perturbation factor, and its calculation formula is shown in Equation (5), represents the multi-scale perturbation factor, and its calculation formula is shown in Equation (6), ref represents the direction difference vector, and its calculation formula is shown in Equation (7), ρ represents the reset weight factor, and its value is 0.6, represents the direction reset term, and its calculation formula is shown in Equation (8); (5); In Equation (5), m represents the number of frequency dimensions of the perturbation, represents the k-th frequency factor, which is used to adjust the periodic perturbation, represents a random number between [0, 1], and sign() represents the sign function; (6); In Equation (6), c1 and c2 represent the weight balance factors, with values of 0.6 and 0.4 respectively, α represents the non-linear response factor, with a value of 0.5, and pop_norm represents the normalized standard deviation of the population position; (7); In Equation (7), rand1 and rand2 represent random numbers between [0, 1], Xbest represents the position of the optimal individual, X_mean represents the average position of the population, and X(iter) represents the current individual position; (8); In Equation (8), τ represents the perturbation amplitude control factor, with a value range of [0.1, 1], represents the random perturbation term, following a uniform random distribution, σ is the boundary of the uniform perturbation interval, fitval represents the change rate of the fitness value of the current individual, and ε represents the threshold of the fitness value change rate.
[0028] 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 parameter values of Kp, Ki, and Kd under the set number of iterations.
[0029] Furthermore, in the above S3, using the improved hyperbolic sine-cosine optimization algorithm 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 improved hyperbolic sine-cosine optimization algorithm, including: the population size N of the algorithm, the problem dimension dim of the algorithm, the maximum number of iterations max_iter, the upper and lower bounds range [lb, ub] of the search space of the algorithm, and set the initial position of the population through the basic parameters of the algorithm; S32. Based on the performance requirements of the fan speed control system, construct a mapping mechanism between the improved hyperbolic sine-cosine optimization algorithm and the parameters of the PID controller of the fan speed control system, that is, regard the position vector of the population individuals in the algorithm iteration process as the PID control parameters to be adjusted, and then realize the effective mapping from the search space position to the control parameter space. During the optimization process, the algorithm calculates the fitness value according to the deviation between the system output and the target speed, and dynamically evolves the individual position based on this to realize the continuous adjustment and update of the controller parameters; 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: (9); In Equation (9), J represents the fitness value, T represents the system running time, and e(t) represents the speed error; S34. Update the positions of the individuals in the population through the mathematical model of the improved hyperbolic sine-cosine optimization algorithm. The specific steps are as follows: Step 1. Calculate the switching factor A for switching between the exploration and exploitation phases. The calculation formula is: (10); In Equation (10), p and q represent the balance parameters, where p = 10, q = 9, and rand represents a random number between [0, 1]; Step 2. If A > 1, enter the exploration phase, and update the positions of the population individuals through the mathematical model of the exploration phase of the algorithm; Step 3. If A <= 1, enter the exploitation phase, and update the positions of the population individuals through the mathematical model of the exploitation phase of the algorithm; Step 4. Calculate the fitness value of the updated individuals, and simultaneously update the position of the optimal individual in the population; Step 5. Determine whether the current iteration number has reached the maximum iteration number max_iter. If it has not reached the maximum iteration number, continue to execute S34 for algorithm optimization. If it has reached the maximum iteration number, jump out of the algorithm optimization, and output the position of the optimal individual in the population as the optimal solution.
[0030] S4. Input a set of optimal control parameters optimized by S3 into the PID controller module, and adjust the fan speed to reach the target speed by controlling the motor drive module.
[0031] Furthermore, to verify that the present invention has certain superiority compared with traditional methods, Matlab and Simulink are used for simulation experiments. First, improve the code of the hyperbolic sine-cosine optimization algorithm through Matlab, and write the fan simulation model code through the mathematical model of the fan load torque module. Initialize the parameters in the main function. The population size N = 30, the maximum iteration number max_iter = 100, the search space range [lb, ub] = [0.001, 100], and the problem dimension dim = 3. Input the initial parameters and the fitness value function written by Equation (9) into the standard hyperbolic sine-cosine optimization algorithm and the improved hyperbolic sine-cosine optimization algorithm code functions as parameters respectively. Build a simulation model of the fan speed control system through Simulink, and set the controlled field function of the fan to the second-order transfer function G(s). , s represents the variable in the complex frequency domain. Run the main function code, input the control parameters found by the algorithm into the Simulink model, and input the output of the model into the fitness value calculation function as the optimization criterion for individual update. Retain the optimization results of each iteration. When the algorithm iteration ends, perform visualization, such as Figure 3 and Figure 4 shown.
[0032] Furthermore, Figure 3 Figure 4 is the comparison chart of the responses of the PID controllers optimized by the standard hyperbolic sine-cosine optimization algorithm and the improved hyperbolic sine-cosine optimization algorithm in the fan speed control system. The target value is set to 1 unit. It can be seen from the figure that the overshoot of the response curve of the PID controller optimized by the improved hyperbolic sine-cosine optimization algorithm in the fan speed control system is lower, indicating better stability. And it reaches the target value and tends to be stable in a very short time without obvious oscillation. Figure 4 is also the comparison chart of the changes in fitness values 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 during the optimization process, the fitness value of the found individual position is lower, and the optimization accuracy is higher. It still maintains excellent optimization ability in the later stage of the algorithm.
Claims
1. An improved method for optimizing the speed control of a fan, characterized in that, The specific steps are as follows: S1. Construct a fan speed control system, which includes: a rotational 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. Use an exploration update strategy based on non-linear hybrid swarm drive to improve the mathematical model in the first stage of the exploration process of the hyperbolic sine-cosine optimization algorithm. This strategy divides two different update methods through random numbers. The first update method uses the sine function and the logarithmic function to non-linearly modulate the current agent position, and combines the difference between the swarm mean and the optimal solution as a guiding term. The second update method uses the cosine function and the hyperbolic tangent function to non-linearly adjust the difference between the current agent position and the swarm mean, and at the same time adjusts the update amplitude in combination with the swarm standard deviation; S22. Use a multi-frequency signal dynamic perturbation development strategy to improve the mathematical model in the second stage of the development process of the hyperbolic sine-cosine optimization algorithm. This strategy adjusts the current agent position by introducing a jump perturbation signal and a direction reset signal, where the direction reset signal is dynamically adjusted according to the search progress of the algorithm and the change trend of the fitness value; S3. Use the improved hyperbolic sine-cosine optimization algorithm to optimize the parameters of the PID controller module in the fan speed control system, and obtain a set of optimal control parameter values of Kp, Ki, and Kd under the set number of iterations; S4. Input the set of optimal control parameters optimized in S3 into the PID controller module, and adjust the fan speed to the target rotational speed by controlling the motor drive module.
2. An improved method for optimizing the speed control of a fan according to claim 1, characterized in that, In S1, the execution process of each module in the fan speed control system is as follows: set the target rotational speed according to the air volume required by the fan. At the same time, the encoder module detects the real-time rotational speed of the fan, and inputs the real-time rotational speed and the target rotational speed into the error calculation module together to calculate the rotational speed error e(t). Input e(t) into the PID controller module, 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, input the control quantity U(t) of the optimized PID controller into the motor drive module, and the motor drive module controls the three-phase current of the motor through a three-phase inverter, thereby driving the motor to drive the fan load module to reach the target rotational speed.
3. An improved method for optimizing the speed control of a fan according to claim 2, characterized in that, In S21, an exploration update strategy based on non-linear hybrid swarm drive 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. On the basis of the current global optimal position, two adjustment terms are added. The first is to use the oscillation of the sine function to adjust the search trajectory of the current position, and the second is to use the logarithmic function to perform non-linear transformation on the absolute value of the current position vector to adjust the scale of the search step. At the same time, the difference between the swarm position mean and the current global optimal solution is added as a guiding term to adjust the search direction. When r <= 0.5, the second update method is adopted. On the basis of the current global optimal position, a weighted non-linear adjustment term is subtracted. The current agent position and the difference between the current agent position and the mean of the swarm position are adjusted by the cosine function and the hyperbolic tangent function respectively. Finally, the standard deviation of the individual positions in the population is used as the convergence control factor. The specific update formula is as follows: (3); In Equation (3), X(iter + 1) represents the updated individual position, w1 represents the step size weight coefficient, w1 = (1 - iter / max_iter), iter represents the current iteration number, max_iter represents the maximum iteration number, 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 population individuals, η represents the standard deviation scaling factor, Xbest represents the position of the optimal individual, and X_mean represents the average position of the population.
4. An improved method for optimizing the speed control of a fan according to claim 3, characterized in that, 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 sign perturbation factor is defined by the product of multiple different frequency parameters and independent random functions to form a non-linear sign perturbation sequence. The multi-scale perturbation factor combines the distance term between the current solution and the optimal solution and the swarm standard deviation term to construct a complex dimensional perturbation scale. The direction difference vector synthesizes the guiding directions of the global optimal solution and the swarm mean, combined with double weight control. The direction reset term determines whether to introduce periodic direction perturbation according to the change of the individual fitness value, and at the same time sets a linearly decreasing reset weight to adjust the influence degree of this term, thus forming an overall non-linear perturbation update expression structure. The specific update formula is as follows: (4); In Equation (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), and max_iter represents the maximum number of iterations. represents the symbol perturbation factor, and its calculation formula is shown in Equation (5). represents the multi-scale perturbation factor, and its calculation formula is shown in Equation (6). ref represents the direction difference vector, and its calculation formula is shown in Equation (7). ρ represents the reset weight factor, and its value is 0.
6. represents the direction reset term, and its calculation formula is shown in Equation (8). (5); In formula (5), m represents the number of frequency dimensions of the perturbation, represents the k-th frequency factor, which is used to adjust the periodic perturbation, represents a random number between [0, 1], and sign() represents the sign function; (6); In formula (6), c1 and c2 represent the weight balance factors, with values of 0.6 and 0.4 respectively, α represents the non-linear response factor, with a value of 0.5, and pop_norm represents the normalized standard deviation of the swarm position; (7); In formula (7), rand1 and rand2 represent random numbers between [0, 1], Xbest represents the position of the optimal individual, X_mean represents the average position of the swarm, and X(iter) represents the current individual position; (8); In Equation (8), τ represents the disturbance amplitude control factor, and its value range is [0.1, 1]. represents the random disturbance term, which follows the uniform random distribution, σ is the boundary of the uniform disturbance interval, fitval represents the change rate of the fitness value of the current individual, and ε represents the threshold of the change rate of the fitness value.
5. An improved method for optimizing the speed control of a fan 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 improved hyperbolic sine-cosine optimization algorithm, including: the population size 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 search space of the algorithm [lb, ub], and set the initial position of the swarm through the basic parameters of the algorithm; S32. Based on the performance requirements of the fan speed control system, a mapping mechanism between the improved hyperbolic sine-cosine optimization algorithm and the PID controller parameters of the fan speed control system is constructed. That is, the position vector of the population individuals in the algorithm iteration process is regarded as the PID control parameters to be adjusted, so as to realize the effective mapping from the search space position to the control parameter space. During the optimization process, the algorithm calculates the fitness value according to the deviation between the system output and the target speed, and dynamically evolves the individual positions based on this, realizing the continuous adjustment and update of the controller parameters; S33. Set the fitness value calculation function of the improved hyperbolic sine-cosine optimization algorithm, 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; S34. Update the positions of the individuals in the population through the mathematical model of the improved hyperbolic sine-cosine optimization algorithm. The specific steps are as follows: step1. Calculate the switching factor A for switching between the exploration and exploitation phases; step2. If A > 1, enter the exploration phase, and update the positions of the population individuals through the mathematical model in the exploration phase of the algorithm; step3. If A <= 1, enter the exploitation phase, and update the positions of the population individuals through the mathematical model in the exploitation phase of the algorithm; step4. Calculate the fitness value of the updated individuals, and at the same time update the optimal individual position in the population; step5. Judge whether the current iteration number has reached the maximum iteration number max_iter. If it has not reached the maximum iteration number, continue to execute S34 for algorithm optimization. If it has reached the maximum iteration number, jump out of 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
Self-adaptive control method based on large-inertia fan
CN120010269A
Blower system and method for controlling the same
US20130320889A1
Method for optimizing the efficiency and / or the running performance of a fan or a fan arrangement
US20210033097A1
Cited By
Coal injection Roots blower control method based on improved cheongfish optimization algorithm
CN120993714A
Method, device and equipment for determining control parameters of wind generating set
CN121300170A