A method for optimizing the atomization speed controller of a pediatric nebulizer
By improving the starfish optimization algorithm and optimizing the atomization speed of the pediatric atomizer, the PID controller solves the problem that traditional PID controllers are difficult to achieve optimal control effects in complex nonlinear systems, significantly improving control accuracy and system performance, and improving treatment effect and user experience.
Patent Information
- Application Number
- CN202510065505.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-01-16
AI Technical Summary
Traditional PID controllers are difficult to achieve optimal control effects in children's atomizers, especially when facing complex nonlinear systems, the parameter adjustment is complex and the accuracy is not high.
By improving the starfish optimization algorithm, introducing adaptive strategies and dimension adjustment mechanisms, optimizing the atomization speed PID controller of the pediatric atomizer, improving the algorithm's global search ability and convergence speed, and accurately finding the best PID control parameter sequence.
It significantly improves the control accuracy, dynamic response and robustness of the PID controller, enhances the overall performance of the pediatric atomizer, improves the treatment effect and user experience, and provides a more stable, accurate and comfortable treatment environment.
Smart Images

Figure CN119472820B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of PID control optimization, and in particular relates to an optimization method for an atomization speed controller of a pediatric atomizer. Background Art
[0002] A pediatric nebulizer is a medical device designed specifically for children and is widely used in hospitals and homes. The principle is to use high-speed compressed air or ultrasonic oscillation technology to atomize the drug solution into tiny particles for the patient to inhale through the mouth and nose, and then deliver it to the lower respiratory tract through a mask or nasal congestion, thereby achieving rapid drug absorption and reducing systemic side effects, thereby treating respiratory diseases such as asthma, bronchitis and allergic rhinitis. Pediatric nebulizers are mainly divided into three types: compression type, ultrasonic type and mesh type. The compression type is suitable for high-viscosity drug solutions, the ultrasonic type has low noise, and the mesh type has high atomization efficiency and is highly portable. The key components of a pediatric nebulizer include a nebulizer host, a drug solution cup, a vibration module or compressor, a sieve plate, as well as a mask and a connecting tube. In order to improve the treatment effect, the atomization speed can usually be controlled by adjusting the airflow or vibration frequency, and some intelligent devices can also dynamically adjust the rate according to the patient's breathing status.
[0003] PID control algorithm is a classic closed-loop control method, which is often used in pediatric nebulizers to adjust the nebulization speed and maintain a stable nebulization rate to ensure the uniformity of the drug liquid particles and the inhalation effect. The PID control algorithm is simple to implement. It only needs to adjust the Kp (proportional), Ki (integral), and Kd (differential) parameters to make the nebulization speed quickly reach the target value and remain stable, avoiding the uneven drug liquid particles caused by fluctuations. However, the performance of traditional PID controllers depends on the adjustment of Kp, Ki, and Kd parameters. Under different drug liquids and usage conditions, these parameters need to be manually adjusted by the staff, which is not only complicated to operate but also has low accuracy. In addition, in pediatric nebulizers, the drug liquid characteristics or airflow pressure may have nonlinear characteristics. Traditional PID controllers may find it difficult to achieve optimal control effects when faced with complex nonlinear systems.
[0004] Optimizing the parameters of the PID controller through the starfish optimization algorithm can not only greatly reduce the staff's parameter adjustment time, but also significantly improve the control accuracy of the nebulizer speed and the system response performance of the pediatric nebulizer; the starfish optimization algorithm (ISFOA) is a meta-heuristic optimization algorithm designed based on the behavioral characteristics of the marine organism - the starfish. It aims to solve complex multi-dimensional optimization problems by simulating the tentacle exploration, predation development and regeneration behavior of the starfish; it simulates the division of labor, central coordination and regeneration ability of the five tentacles of the starfish, thereby achieving a balance between global search and local development; although the starfish optimization algorithm has good global search and local development capabilities, there are still some limitations, such as the limited population diversity of the regeneration mechanism in the algorithm, which makes it difficult to jump out of the local optimal solution in the later stage, and the local development ability is weak, resulting in slow convergence of the algorithm when searching for the optimal solution. Summary of the invention
[0005] The purpose of the present invention is to: in view of the shortcomings of the prior art, the present invention proposes an optimization method for an atomization speed controller of a pediatric nebulizer, optimizes the atomization speed PID controller of the pediatric nebulizer by improving the starfish optimization algorithm (ISFOA), and takes the performance evaluation index of the control system as the objective function of the algorithm, and quickly finds the optimal PID control parameter sequence in the process of simulating the natural selection and adaptive evolution of starfish by the improved starfish optimization algorithm (ISFOA), which can not only effectively improve the global search ability and convergence speed of the algorithm, optimize the control accuracy, dynamic response and robustness of the PID controller, but more importantly, enhance the overall performance of the pediatric nebulizer, improve the therapeutic effect and user experience of the pediatric nebulizer, and enable the system to provide a more stable, accurate and comfortable treatment environment, ensuring that pediatric patients can obtain the best treatment effect in the shortest time.
[0006] In order to achieve the above object, the present invention adopts the following technical scheme: a method for optimizing the atomization speed controller of a pediatric nebulizer, comprising: an improved starfish optimization algorithm (ISFOA) and a position PID control algorithm, and the specific steps are:
[0007] S1. Determine to establish a mathematical model for the pediatric nebulizer control system with the nebulization rate as the target, wherein the mathematical model includes a performance evaluation mathematical model of the control system and a nebulization speed control system model.
[0008] S2. Use the position PID control algorithm to establish a PID controller model for the nebulization speed for the pediatric nebulizer control system.
[0009] S3, introduce adaptive strategy and dimension adjustment mechanism to improve the starfish optimization algorithm, and establish a mathematical model for improving the starfish optimization algorithm. The specific improvements are:
[0010] S31, introduce adaptive strategy to improve parameter GP;
[0011] S32. Introduce dimension adjustment mechanism to improve the hybrid search mode of the algorithm.
[0012] S4. Automatic optimization of the parameters of the atomization speed PID controller is achieved through the iterative process of the improved starfish optimization algorithm (ISFOA). During the algorithm iteration process, by simulating the natural selection and adaptive evolution process of starfish, the algorithm continuously searches for individual solutions in the search space and gradually approaches the individual optimal solution. The values of the individual optimal solution in different dimensions are decoded into a control parameter sequence of the PID controller, thereby obtaining the optimal atomization speed control method, namely the ISFOA-PID control method, which can effectively improve the control accuracy and robustness of the atomization speed PID controller.
[0013] S5. Apply the ISFOA-PID control method to the pediatric nebulizer control system, so that the system can provide a more stable, precise and comfortable treatment environment.
[0014] Further, in the mathematical model of the pediatric nebulizer control system in S1, the performance evaluation mathematical model is used to quantify the performance of the pediatric nebulizer control system in the nebulized drug flow rate control, and to improve or adjust the behavior of the system through numerical indicators. The performance evaluation mathematical model is also used as the objective function of the improved starfish optimization algorithm to guide the optimization direction of the algorithm to determine whether the current control system needs further optimization, and comprehensively measure the overshoot, steady-state error and adjustment time of the pediatric nebulizer control system to determine the performance evaluation mathematical model as follows:
[0015]
[0016] In formula (1), J is the quantified performance index value, that is, the fitness value of the algorithm, e(t) is the error between the target value and the actual value, t is the actual running time of the system, and T is the total running time of the system.
[0017] Furthermore, in the mathematical model of the pediatric nebulizer control system in S1, the nebulization speed control system model includes: an input signal module, a nebulizer model, a PID controller module, a feedback loop module, and an error calculation module, wherein the nebulizer model needs to consider the dynamic response of the control system, the relationship between the nebulization flow rate and the control signal, and the working principle of the nebulizer can be approximated as a linear system, and its dynamic response equation is:
[0018]
[0019] In formula (2), ζ is the damping ratio, K is the system gain, τ is the time constant, and s is the complex frequency domain variable after Laplace transformation.
[0020] Furthermore, the system gain K describes the effect of changes in the input voltage or control signal on the atomization speed. Given the input voltage of the control system is U in , the output atomization speed is v out , then K = v out / U in .
[0021] Furthermore, in order to simulate the real-time dynamic behavior of the pediatric nebulizer during operation, a second-order transfer function was designed as the mathematical model of the pediatric nebulizer. The system gain K was set to 1.4, the time constant t was set to 2s, and the damping ratio was set to 0.8. The mathematical model of the second-order transfer function was obtained as follows:
[0022]
[0023] In formula (3), G(s) is the output value of the transfer function.
[0024] Furthermore, in S2, a position PID control algorithm is used to establish a PID controller model of the atomization speed for the pediatric nebulizer control system to achieve precise control of the atomization speed of the pediatric nebulizer. The mathematical model of the position PID controller is:
[0025]
[0026] In formula (4), u(t) is the control quantity output by the PID controller at time t, e(t) is the difference between the target speed and the actual speed at time t, Kp is the proportional parameter, Ki is the integral parameter, and Kd is the differential parameter.
[0027] Furthermore, in S3, an adaptive strategy and a dimension adjustment mechanism are introduced to improve the starfish optimization algorithm, specifically: S31, an adaptive strategy is introduced to improve the parameter GP, and the improved GP mathematical model is:
[0028]
[0029] In formula (5), iter is the current iteration number of the algorithm, MaxIter is the maximum iteration number of the algorithm, GP0 is the initial parameter value, λ is the weight decay coefficient, which is used to control the decay speed of GP, and f(x i (iter)) is x i (iter) fitness, i = 1, ..., nPop, nPop is the number of algorithm populations, f best is the best individual fitness of starfish;
[0030] S32. Introduce a dimension adjustment mechanism to improve the hybrid search mode of the algorithm. During the iteration process of the ordinary starfish optimization algorithm, the hybrid search mode of the control algorithm is controlled by whether the dimension value Dim is greater than 5. It is not suitable for parameter optimization of the PID control algorithm. By introducing the dimension adjustment mechanism, Dim is changed to be randomly selected in {2, 3}. When the Dim value is 3, the overall control parameter sequence of the PID controller is optimized. When the Dim value is 2, Kd is not optimized. For the PID controller, Kd usually has little effect on the control effect. Therefore, through the dimension adjustment mechanism, the optimization of Kd is selectively skipped, which can reduce redundant searches in the early stage and reduce the time overhead of the algorithm. In the later stage, as the algorithm gradually converges, the convergence stability of the algorithm can be improved.
[0031] Furthermore, in S3, a mathematical model is established for the starfish optimization algorithm, and the specific steps are as follows:
[0032] Ss1, initialize the population size nPop of the improved starfish optimization algorithm (ISFOA), the maximum number of iterations MaxIter, the problem dimension Dim, and the algorithm search space [ub, lb], where ub and lb represent the upper and lower bounds of the algorithm search space respectively;
[0033] Ss2, initialize the GP0 parameters of the improved starfish optimization algorithm, initialize the position of each individual in the improved starfish optimization algorithm in the search space, and initialize the mathematical model of the individual position of the starfish as:
[0034] x init =(ub-lb)×r0+lb (6);
[0035] In formula (6), x init is the initial position of the randomly generated starfish individual, r0 is a random number between [0, 1], and ub and lb have the same meanings as above;
[0036] Ss3. Calculate the fitness of all starfish individuals, update the positions and fitness of all starfish individuals through greedy selection, select the individual with the smallest fitness value in the population as the best starfish individual, and mark the position of the individual as the best starfish individual position. The mathematical model of greedy selection is:
[0037]
[0038] In formula (7), x i (iter+1) is the position of the i-th starfish individual after greedy selection, x i (iter) is the position of the i-th starfish individual in the current iteration, x i new is the position of the i-th starfish individual after the algorithm iteration, f(xi (iter)) is x i The fitness value of (iter), f(x i new ) is x i new The fitness value of
[0039] Ss4, when rand>GP, rand is a random number between [0, 1], the algorithm is in the exploration stage, and the angle θ and energy E of the starfish individual are calculated. t , θ and E t The mathematical model is:
[0040]
[0041] The parameters in formula (8) and formula (9) have the same meaning as above;
[0042] Ss5. When the algorithm is in the exploration stage, the dimension adjustment mechanism is used to improve the hybrid search mode of the algorithm. When the value of Dim is 3, the starfish is simulated to use all arms to search for food to establish a mathematical model to update the individual position. The mathematical model is:
[0043]
[0044] In formula (10), x i (iter) represents the position of the i-th starfish individual in the current iteration, x i (iter+1) represents the updated position of the i-th starfish individual, x best (iter) represents the best individual position of starfish in the current iteration, r is a random number between [0, 1], and the mathematical model of a1 is:
[0045] a1=(2r-1)×π (11);
[0046] In formula (11), r is a random number between [0, 1];
[0047] Ss6, when Dim is 2, the starfish is simulated to use one arm to search for food and establish a mathematical model to update the individual position. The mathematical model is:
[0048]
[0049] In formula (12), A1 and A2 are random numbers between [-1, 1], x k1 (iter) and x k2 (iter) is the position of two starfish individuals randomly selected in the current iteration, and the other parameters have the same meanings as above;
[0050] Ss7, when rand ≤ GP, the algorithm is in the development stage, using a parallel bidirectional search mode to calculate the distance between the best starfish individual and three randomly selected starfish individuals in the population. The mathematical model for calculating the distance is:
[0051] d m =(x best (inter)-x m (iter)) (13);
[0052] In formula (13), d m is the calculated distance, m = 1, ..., 3, x best (iter) is the best individual position of starfish, x m (iter) is the position of a randomly selected individual starfish in the population;
[0053] Ss8, when the algorithm is in the development stage, the predation behavior of starfish is simulated to establish a mathematical model to update the individual position. The mathematical model is:
[0054] x i (iter+1)=x i (iter)+r1×d m1 +r2×d m2 (14);
[0055] In formula (14), r1 and r2 are random numbers between [0, 1], d m1 and d m2 are two distances randomly selected from the three distances, and the other parameters are the same as above;
[0056] Ss9, when the position is updated to the last starfish individual, simulate the starfish being attacked by a predator and losing an arm to establish a mathematical model to update the individual position. The mathematical model is:
[0057]
[0058] In formula (15), the parameters have the same meaning as above;
[0059] Ss10, check whether all starfish individuals are out of bounds, check whether the current number of iterations iter is greater than MaxIter, if so, output the individual optimal solution of the improved starfish optimization algorithm, decode the optimal solution into the optimal control parameter sequence of the PID controller, if not, execute iter=iter+1, and return to step Ss3 to continue iterative optimization.
[0060] The present invention proposes an optimization method for the atomization speed controller of a pediatric nebulizer, and optimizes the atomization speed PID controller by improving the starfish optimization algorithm (ISFOA). Due to the adoption of the above technical solution, the beneficial effects of the present invention are as follows:
[0061] G1. By introducing adaptive strategies to improve the parameter GP, the algorithm can automatically adapt to different iteration processes. In the early stage of algorithm iteration, iter is small, the algorithm's exploration behavior is strong, allowing a larger search space and higher group position adjustment. In the later stage of algorithm iteration, iter is large, the algorithm will automatically reduce the exploration scope and enhance the local development ability, thereby enhancing the precision of the individual optimal solution;
[0062] G2. By introducing a dimension adjustment mechanism to improve the hybrid search mode of the algorithm, the optimization of Kd can be selectively skipped, which can not only reduce redundant searches and reduce the time overhead of the algorithm in the early stage, but also improve the convergence stability of the algorithm as the algorithm gradually converges in the later stage;
[0063] G3. By optimizing the position PID controller through the improved Starfish Optimization Algorithm (ISFOA), the optimal PID control parameter sequence can be found more accurately during the algorithm iteration process, the accuracy of the PID control parameters can be improved, the dynamic response capability of the nebulization speed PID controller can be enhanced, the stability and robustness of the control system can be improved, and the efficiency and accuracy of the pediatric nebulizer can be improved, ensuring the safety and comfort of the patients. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 Diagram of the overall technical framework optimized for pediatric nebulizer control systems.
[0065] Figure 2 Flowchart of the parameter sequence of the nebulization speed PID controller for pediatric nebulizers to improve the Starfish optimization algorithm.
[0066] Figure 3 Comparison chart of fitness evolution of PID controller for nebulizer speed optimized for children using improved starfish optimization algorithm and common starfish optimization algorithm.
[0067] Figure 4 Optimizing the atomization speed PID controller parameter sequence process change diagram of the pediatric nebulizer to improve the starfish optimization algorithm.
[0068] Figure 5 A comparison chart of the effects of optimizing the atomization speed PID controller of the pediatric nebulizer using the improved starfish optimization algorithm and the ordinary starfish optimization algorithm. DETAILED DESCRIPTION
[0069] The following examples further illustrate the content of the present invention, but should not be construed as limiting the present invention. Without departing from the spirit and substance of the present invention, modifications or substitutions made to the methods, steps or conditions of the present invention all fall within the scope of the present invention.
[0070] The present invention provides an optimization method for the atomization speed controller of a pediatric nebulizer. The Starfish Optimization Algorithm (ISFOA) is improved by introducing an adaptive strategy and a dimensional adjustment mechanism, and the improved Starfish Optimization Algorithm is used to optimize the atomization speed PID controller parameter sequence of the pediatric nebulizer to enhance the overall performance of the pediatric nebulizer. The implementation process includes two parts: Matlab mathematical modeling and Simulink control system simulation. Figure 1 As shown, the specific steps are S1 to S5.
[0071] S1. Determine to establish a mathematical model for the pediatric nebulizer control system with the nebulization rate as the target, wherein the mathematical model includes a performance evaluation mathematical model of the control system and a nebulization speed control system model.
[0072] Further, in this implementation step, in the mathematical model of the pediatric nebulizer control system, the performance evaluation mathematical model is used to quantify the performance of the pediatric nebulizer control system in the nebulized drug flow rate control, and to improve or adjust the behavior of the system through numerical indicators. The performance evaluation mathematical model is also used as the objective function of the improved starfish optimization algorithm to guide the optimization direction of the algorithm to determine whether the current control system needs further optimization, and comprehensively measure the overshoot, steady-state error and adjustment time of the pediatric nebulizer control system to determine the performance evaluation mathematical model:
[0073]
[0074] In formula (1), J is the quantified performance index value, that is, the fitness value of the algorithm, e(t) is the error between the target value and the actual value, t is the actual running time of the system, and T is the total running time of the system.
[0075] Furthermore, in the present implementation step, in the mathematical model of the pediatric nebulizer control system, the nebulization speed control system model includes: an input signal module, a nebulizer model, a PID controller module, a feedback loop module, and an error calculation module, wherein the nebulizer model needs to consider the dynamic response of the control system, the relationship between the nebulization flow rate and the control signal, and the working principle of the nebulizer can be approximated as a linear system, and its dynamic response equation is:
[0076]
[0077] In formula (2), ζ is the damping ratio, K is the system gain, τ is the time constant, and s is the complex frequency domain variable after Laplace transformation.
[0078] Furthermore, the system gain K describes the effect of changes in the input voltage or control signal on the atomization speed. Given the input voltage of the control system is U in , the output atomization speed is v out , then K = v out / U in。
[0079] Furthermore, in order to simulate the real-time dynamic behavior of the pediatric nebulizer during operation, a second-order transfer function was designed as the mathematical model of the pediatric nebulizer. The system gain K was set to 1.4, the time constant t was set to 2s, and the damping ratio was set to 0.8. The mathematical model of the second-order transfer function was obtained as follows:
[0080]
[0081] In formula (3), G(s) is the output value of the transfer function.
[0082] S2. Use the position PID control algorithm to establish a PID controller model for the nebulization speed for the pediatric nebulizer control system.
[0083] Furthermore, in this implementation step, a position PID control algorithm is used to establish a PID controller model of the atomization speed for the pediatric nebulizer control system to achieve precise control of the atomization speed of the pediatric nebulizer. The mathematical model of the position PID controller is:
[0084]
[0085] In formula (4), u(t) is the control quantity output by the PID controller at time t, e(t) is the difference between the target speed and the actual speed at time t, Kp is the proportional parameter, Ki is the integral parameter, and Kd is the differential parameter.
[0086] S3. Introduce adaptive strategies and dimension adjustment mechanisms to improve the starfish optimization algorithm, and establish a mathematical model for improving the starfish optimization algorithm.
[0087] Furthermore, in this implementation step, an adaptive strategy and a dimension adjustment mechanism are introduced to improve the starfish optimization algorithm, specifically:
[0088] S31, introduce the adaptive strategy to improve the parameter GP, the improved GP mathematical model is:
[0089]
[0090] In formula (5), iter is the current iteration number of the algorithm, MaxIter is the maximum iteration number of the algorithm, GP0 is the initial parameter value, λ is the weight decay coefficient, which is set to 0.44 and is used to control the decay speed of GP, and f(x i (iter)) is x i (iter) fitness, i = 1, ..., nPop, nPop is the number of algorithm populations, f best is the best individual fitness of starfish;
[0091] S32. Introduce a dimension adjustment mechanism to improve the hybrid search mode of the algorithm. During the iteration process of the ordinary starfish optimization algorithm, the hybrid search mode of the control algorithm is not suitable for parameter optimization of the PID control algorithm by checking whether the dimension value Dim is greater than 5. By introducing the dimension adjustment mechanism, Dim is changed to be randomly selected from {2, 3}. When the Dim value is 3, the overall control parameter sequence of the PID controller is optimized. When the Dim value is 2, Kd is not optimized. For the PID controller, Kd usually has little effect on the control effect. Therefore, the optimization of Kd can be selectively skipped through the dimension adjustment mechanism.
[0092] Furthermore, in this implementation step, MATLAB is used to build a mathematical model for the starfish optimization algorithm, such as Figure 2 As shown, the specific steps are:
[0093] Ss1, initialize the population size nPop of the improved starfish optimization algorithm (ISFOA) to 30, the maximum number of iterations MaxIter to 20, the problem dimension Dim to 3, and the upper and lower bounds of the algorithm search space [Ub, Lb] to [100, 0.0001];
[0094] Ss2, initialize the GP0 parameter of the improved starfish optimization algorithm to 0.5, initialize the position of each individual in the improved starfish optimization algorithm in the search space, and initialize the mathematical model of the individual position of the starfish as:
[0095] x init =(ub-lb)×r0+lb (6);
[0096] In formula (6), x init is the initial position of the randomly generated starfish individual, r0 is a random unit vector with a value between [0, 1] at each latitude, and ub and lb have the same meaning as above;
[0097] Ss3. Calculate the fitness of all starfish individuals, update the positions and fitness of all starfish individuals through greedy selection, select the individual with the smallest fitness value in the population as the best starfish individual, and mark the position of the individual as the best starfish individual position. The mathematical model of greedy selection is:
[0098]
[0099] In formula (7), x i (iter+1) is the position of the i-th starfish individual after greedy selection, x i (iter) is the position of the i-th starfish individual in the current iteration, x i new is the position of the i-th starfish individual after the algorithm iteration, f(x i(iter)) is x i The fitness value of (iter), f(x i new ) is x i new The fitness value of
[0100] Ss4, when rand>GP, rand is a random number between [0, 1], the algorithm is in the exploration stage, and the angle θ and energy E of the starfish individual are calculated. t , θ and E t The mathematical model is:
[0101]
[0102] The parameters in formula (8) and formula (9) have the same meaning as above;
[0103] Ss5. When the algorithm is in the exploration stage, the dimension adjustment mechanism is used to improve the hybrid search mode of the algorithm. When the value of Dim is 3, the starfish is simulated to use all arms to search for food to establish a mathematical model to update the individual position. The mathematical model is:
[0104]
[0105] In formula (10), x i (iter) represents the position of the i-th starfish individual in the current iteration, x i (iter+1) represents the updated position of the i-th starfish individual, x best (iter) represents the best individual position of starfish in the current iteration, r is a random number between [0, 1], and the mathematical model of a1 is:
[0106] a1=(2r-1)×π (11);
[0107] In formula (11), r is a random number between [0, 1];
[0108] Ss6, when Dim is 2, the starfish is simulated to use one arm to search for food and establish a mathematical model to update the individual position. The mathematical model is:
[0109]
[0110] In formula (12), A1 and A2 are random numbers between [-1, 1], x k1 (iter) and x k2 (iter) is the position of two starfish individuals randomly selected in the current iteration, and the other parameters have the same meanings as above;
[0111] Ss7, when rand ≤ GP, the algorithm is in the development stage, using a parallel bidirectional search mode to calculate the distance between the best starfish individual and three randomly selected starfish individuals in the population. The mathematical model for calculating the distance is:
[0112] d m =(x best (iter)-x m (iter)) (13);
[0113] In formula (13), d m is the calculated distance, m = 1, ..., 3, x best (iter) is the best individual position of starfish, x m (iter) is the position of a randomly selected individual starfish in the population;
[0114] Ss8, when the algorithm is in the development stage, the predation behavior of starfish is simulated to establish a mathematical model to update the individual position. The mathematical model is:
[0115] x i (iter+1)=x i (iter)+r1×d m1 +r2×d m2 (14);
[0116] In formula (14), r1 and r2 are random numbers between [0, 1], d m1 and d m2 are two distances randomly selected from the three distances, and the other parameters are the same as above;
[0117] Ss9, when the position is updated to the last starfish individual, simulate the starfish being attacked by a predator and losing an arm to establish a mathematical model to update the individual position. The mathematical model is:
[0118]
[0119] In formula (15), the parameters have the same meaning as above;
[0120] Ss10, check whether all starfish individuals are out of bounds, check whether the current number of iterations iter is greater than MaxIter, if so, output the individual optimal solution of the improved starfish optimization algorithm, decode the optimal solution into the optimal control parameter sequence of the PID controller, if not, execute iter=iter+1, and return to step Ss3 to continue iterative optimization.
[0121] S4. Automatic optimization of the parameters of the atomization speed PID controller is achieved through the iterative process of the improved starfish optimization algorithm (ISFOA). During the algorithm iteration process, by simulating the natural selection and adaptive evolution process of starfish, the algorithm continuously searches for individual solutions in the search space and gradually approaches the individual optimal solution. The values of the individual optimal solution in different dimensions are decoded into a control parameter sequence of the PID controller, thereby obtaining the optimal atomization speed control method, namely the ISFOA-PID control method.
[0122] Further, in this implementation step, the specific steps of automatically optimizing the parameters of the atomization speed PID controller by the iterative process of the improved starfish optimization algorithm (ISFOA) are as follows:
[0123] Ss1. Use Siumulink to establish a simulation model for the pediatric nebulizer control system and a simulation model for the performance evaluation mathematical model. Set the running time of the control system simulation model to 30 seconds, the sampling time to 0.5 seconds, the initial nebulization speed to 0 mL / s, and the target nebulization speed to 1 mL / s.
[0124] Ss2. Use Matlab to write a connection function to connect the control system simulation model with the improved starfish optimization algorithm mathematical model; Ss3. Run the improved starfish optimization algorithm mathematical model, and in the iterative process of the algorithm, output the individual solutions found by the algorithm, and decode the individual solutions into a control parameter sequence of the PID controller;
[0125] Ss4, input the control parameter sequence into the control system simulation model through the connection function, and run the control system simulation model; Ss5, the input signal module outputs the target atomization speed, the feedback loop feeds back the actual atomization speed output by the atomization model in real time, the error calculation module calculates the deviation value e(t) between the target atomization speed and the actual atomization speed, and inputs e(t) into the ISFOA-PID controller;
[0126] Ss6, ISFOA-PID controller outputs the control quantity u(t), and adjusts the output atomization speed by using the second-order transfer function designed to simulate the real-time dynamic behavior of the pediatric nebulizer when it is working;
[0127] Ss7, performance evaluation mathematical model calculates the quantitative index of each set of PID control parameter sequence and feeds it back to the improved starfish optimization algorithm mathematical model as fitness;
[0128] Ss8, determine whether the algorithm iteration is terminated. If it is terminated, output the individual optimal solution of the improved starfish optimization algorithm, and decode the individual optimal solution into the optimal PID control parameter sequence, such as Figure 3As shown, the optimal Kp, Ki, and Kd parameters are: 48.813, 1.118, and 23.243, thereby realizing the closed-loop control of the pediatric nebulizer control system by the improved starfish optimization algorithm.
[0129] S5. Apply the ISFOA-PID control method to the pediatric nebulizer control system to improve the overall performance of the pediatric nebulizer control system.
[0130] Furthermore, in this implementation step, if Figure 4 As shown in the figure, the fitness value curves of the atomization speed PID controller optimized by the improved starfish optimization algorithm and the ordinary starfish optimization algorithm are compared and analyzed. It can be seen that in the initial iteration stage of the algorithm, the ISFOA algorithm expands the search range of the algorithm by introducing an adaptive strategy to improve the parameter GP, so that the algorithm exhibits a stronger global search ability. In the later iteration stage of the algorithm, the ISFOA algorithm still maintains a faster convergence speed and higher accuracy. The fitness value is stable at about 0.7599, while the SFOA algorithm converges slowly and finally stabilizes at about 0.8980. This shows that the convergence ability of the SFOA algorithm in the later stage is not as good as that of the ISFOA algorithm, and overall, the balance between the global search and the local search of the ISFOA algorithm is better. In summary, the improved starfish optimization algorithm is superior to the ordinary starfish optimization algorithm in terms of global search ability in the early stage, convergence speed in the middle stage, and local search ability in the later stage.
[0131] Furthermore, in this implementation step, if Figure 5 As shown, by comparing and analyzing the response curves of the atomization speed PID controller optimized by the improved starfish optimization algorithm and the ordinary starfish optimization algorithm, it can be seen that in terms of response speed, in the startup phase, the rising speeds of the two are comparable, and the atomization speed PID controller optimized by the ISFOA algorithm has almost no overshoot phenomenon, and the system always remains near the target value from startup to stability, while the atomization speed PID controller optimized by the SFOA algorithm has obvious overshoot phenomenon, and the atomization speed once exceeds 20% of the target value. In terms of stabilization time, the atomization speed PID controller optimized by the ISFOA algorithm quickly enters a stable state after approaching the target atomization speed, and has stabilized near the target value of 1mL / s at about 3s, and there is no obvious oscillation or deviation, while the atomization speed PID control optimized by the SFOA algorithm stabilizes near the target value after 5s, indicating that the performance of the PID controller is insufficient, and the system needs more time to stabilize. In summary, the atomization speed PID controller optimized by the improved starfish optimization algorithm is superior to the ordinary starfish optimization algorithm in terms of response speed, overshoot, stabilization time, etc., and the improvement method proposed in the present invention is effective.
[0132] In summary, the present invention provides an optimization method for an atomization speed controller for a pediatric nebulizer. The method improves the starfish optimization algorithm (ISFOA) by introducing an adaptive strategy and a dimensional adjustment mechanism to optimize the atomization speed PID controller of the pediatric nebulizer. This method can not only effectively improve the global search capability and convergence speed of the algorithm, optimize the control accuracy, dynamic response and robustness of the PID controller, but more importantly, enhance the overall performance of the pediatric nebulizer, improve the therapeutic effect and user experience of the pediatric nebulizer, and enable the system to provide a more stable, precise and comfortable treatment environment, ensuring that pediatric patients can obtain the best treatment effect in the shortest time.
Claims
1. A method for optimizing a nebulizer speed controller for children, characterized in that: Specifically include: S1. Determine to establish a mathematical model for the pediatric nebulizer control system with the nebulization rate as the target, wherein the mathematical model includes a performance evaluation mathematical model of the control system and a nebulization speed control system model; S2, using the position PID control algorithm to establish a PID controller model for the nebulizer speed for the pediatric nebulizer control system; S3, introduce adaptive strategy and dimension adjustment mechanism to improve the starfish optimization algorithm, and establish a mathematical model for improving the starfish optimization algorithm. The specific improvements are: S31, introduce the adaptive strategy to improve the parameter GP, the improved GP mathematical model is: In formula (1), iter is the current iteration number of the algorithm, MaxIter is the maximum iteration number of the algorithm, GP0 is the initial parameter value, λ is the weight attenuation coefficient, and x i (iter) represents the position of the i-th starfish individual in the current iteration, f(x i (iter)) is x i (iter) fitness, i = 1, ..., nPop, nPop is the number of algorithm populations, f best is the best individual fitness of starfish; S32. Introduce a dimension adjustment mechanism to improve the hybrid search mode of the algorithm. During the iteration of the ordinary starfish optimization algorithm, the hybrid search mode of the control algorithm is controlled by checking whether the dimension value Dim is greater than 5. By introducing a dimension adjustment mechanism, Dim is changed to be randomly selected from {2, 3}. When the Dim value is 3, the overall control parameter sequence of the PID controller is optimized. When the Dim value is 2, only Kp and Kd are optimized. S4. Automatic optimization of the parameters of the atomization speed PID controller is achieved through the iterative process of the improved starfish optimization algorithm (ISFOA). During the algorithm iteration process, the algorithm continuously searches for individual solutions in the search space and gradually approaches the individual optimal solution. The values of the individual optimal solution in different dimensions are decoded into the control parameter sequence of the PID controller, thereby obtaining the ISFOA-PID control method. S5. Apply the ISFOA-PID control method to the pediatric nebulizer control system.
2. The method for optimizing the atomization speed controller of a pediatric nebulizer according to claim 1, characterized in that: In the mathematical model of the pediatric nebulizer control system in S1, the nebulization speed control system model includes: an input signal module, a nebulizer model, a PID controller module, a feedback loop module, and an error calculation module. In order to simulate the real-time dynamic behavior of the pediatric nebulizer when working, a second-order transfer function is designed as the mathematical model of the pediatric nebulizer. The mathematical model of the second-order transfer function is: In formula (2), G(s) is the output value of the transfer function, and s is the complex frequency domain variable after Laplace transformation.
3. The method for optimizing the atomization speed controller for a pediatric nebulizer according to claim 1, characterized in that: In S3, a mathematical model is established to improve the starfish optimization algorithm, and the specific steps are as follows: Ss1, initialize the population size nPop of the improved starfish optimization algorithm (ISFOA), the maximum number of iterations MaxIter, the problem dimension Dim, and the algorithm search space [ub, lb], where ub and lb represent the upper and lower bounds of the algorithm search space respectively; Ss2, initialize the GP0 parameters of the improved starfish optimization algorithm, initialize the position of each individual in the improved starfish optimization algorithm in the search space, and initialize the mathematical model of the individual position of the starfish as: x init =(ub-lb)×r0+lb(3); In formula (3), x init is the initial position of the randomly generated starfish individual, r0 is a random number between [0, 1], and ub and lb have the same meanings as above; Ss3, calculate the fitness of all starfish individuals, update the positions and fitness of all starfish individuals by greedy selection, select the individual with the smallest fitness value in the population as the best starfish individual, and mark the position of the individual as the best starfish individual position; Ss4, when rand>GP, rand is a random number between [0, 1], the algorithm is in the exploration stage, calculate the angle θ and energy E of the starfish individual t , θ and E t The mathematical model is: In formula (4) and formula (5), iter is the current iteration number of the algorithm, and MaxIter is the maximum iteration number of the algorithm; Ss5, when the algorithm is in the exploration stage, the dimension adjustment mechanism is used to improve the algorithm's hybrid search mode. When Dim is 3, the starfish is simulated to use all arms to search for food and establish a mathematical model to update the individual position; Ss6, when Dim is 2, the starfish is simulated to use one arm to search for food and establish a mathematical model to update the individual position; Ss7, when rand ≤ GP, the algorithm is in the development stage, using a parallel bidirectional search mode to calculate the distance between the best starfish individual and three randomly selected starfish individuals in the population; Ss8, when the algorithm is in the development stage, the predation behavior of starfish is simulated to establish a mathematical model to update the individual position; Ss9, when the position is updated to the last starfish individual, simulate the starfish being attacked by a predator and losing an arm to establish a mathematical model to update the individual position; Ss10, check whether the current number of iterations iter is greater than MaxIter. If so, output the individual optimal solution of the improved starfish optimization algorithm and decode the optimal solution into the optimal control parameter sequence of the PID controller. If not, execute iter=iter+1 and return to step Ss3 to continue iterative optimization.
4. The method for optimizing the atomization speed controller for a pediatric nebulizer according to claim 3, characterized in that: In said S3, step Ss3, the mathematical model of greedy selection is: In formula (6), x i (iter+1) is the position of the i-th starfish individual after greedy selection, x i (iter) is the position of the i-th starfish individual in the current iteration, x i new is the position of the i-th starfish individual after the algorithm iteration, f(x i (iter)) is x i The fitness value of (iter), f(x i new ) is x i new The fitness value of .
5. The method for optimizing the atomization speed controller for a pediatric nebulizer according to claim 3, characterized in that: In step S3, step Ss5 simulates the starfish using all arms to search for food and establishes a mathematical model to update the individual position. The mathematical model is: In formula (7), x i (iter) represents the position of the i-th starfish individual in the current iteration, x i (iter+1) represents the updated position of the i-th starfish individual, x best (iter) represents the best individual position of starfish in the current iteration, r is a random number between [0, 1], and the mathematical model of a1 is: a1=(2r-1)×π(8); In formula (8), r is a random number between [0, 1].
6. The method for optimizing the atomization speed controller for a pediatric nebulizer according to claim 3, characterized in that: In step S3, step Ss6 simulates the starfish using one arm to search for food and establishes a mathematical model to update the individual position. The mathematical model is: In formula (9), x i (iter+1) represents the updated position of the i-th starfish individual, x i (iter) represents the position of the i-th starfish in the current iteration, A1 and A2 are random numbers between [-1, 1], and x k1 (iter) and x k2 (iter) is the position of two starfish individuals randomly selected in the current iteration, E t The energy of individual starfish.
7. The method for optimizing the atomization speed controller for a pediatric nebulizer according to claim 3, characterized in that: In step S3, step Ss7, the mathematical model for calculating the distance is: d m =(x best (iter)-x m (iter))(10); In formula (10), d m is the calculated distance, m = 1, ..., 3, x best (iter) is the best individual position of starfish, x m (iter) is the position of a randomly selected individual starfish in the population.
8. The method for optimizing the atomization speed controller for a pediatric nebulizer according to claim 3, characterized in that: In step S3, step Ss8 simulates the predation behavior of the starfish to establish a mathematical model to update the individual position. The mathematical model is: x i (iter+1)=x i (iter)+r1×d m1 +r2×d m2 (11); In formula (11), r1 and r2 are random numbers between [0, 1], d m1 and d m2 are two distances randomly selected from the three distances, and the other parameters have the same meanings as above.
9. The method for optimizing the atomization speed controller for a pediatric nebulizer according to claim 3, characterized in that: In step S3, step Ss9 simulates the behavior of a starfish being attacked by a predator and losing an arm to establish a mathematical model to update the individual position. The mathematical model is: In formula (12), x i (iter+1) represents the updated position of the i-th starfish individual, x i (iter) represents the position of the i-th starfish individual in the current iteration, iter is the current iteration number of the algorithm, MaxIter is the maximum iteration number of the algorithm, and nPop is the population size of the algorithm.
Citation Information
Patent Citations
Unmanned aerial vehicle automatic cruise control optimization method based on Beidou positioning
CN118466530A
Air compression control method and system for atomizer
CN118567405A