Vibration motor optimization control method of sputum excretion instrument
By improving the crystal structure algorithm, introducing adaptive mechanisms and random variation strategies, dynamically adjusting PID parameters, the problem of PID control in the existing technology is solved, the precise control of the vibration motor is realized, and the control performance is improved and robustness to ensure the effectiveness and comfort of the treatment.
Patent Information
- Application Number
- CN202411365678.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-07
AI Technical Summary
Existing PID controls are difficult to find the optimal parameter combination in complex or nonlinear systems, especially in vibrating motor control, which may lead to poor control effects and insufficient flexibility, especially when dealing with systems with large-scale dynamic changes.
By improving the crystal structure algorithm (ICryStAl), an adaptive mechanism and random variation strategy are introduced, the parameters of the PID controller are dynamically adjusted, and the position PID control algorithm is combined to achieve precise control of the vibrating motor.
Improve the global search capability and local search accuracy of the PID controller, ensure the system responds quickly and accurately in complex environments, improve control performance and robustness, ensure patients can discharge sputum safely and in a timely manner, and ensure the effectiveness and comfort of treatment. sex.
Smart Images

Figure CN119276169A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of PID control optimization, and in particular to a vibration motor optimization control method for a sputum removal instrument. Background Art
[0002] An expectorant is a medical device used to help patients clear sputum from their respiratory tract. It is widely used in patients who are unable to effectively expectorate on their own. The vibration motor is one of the core components of the expectorant. The motor usually used is a brushless DC motor, which generates mechanical vibrations and transmits vibration energy to the patient's chest and lungs, loosening the sputum in the patient's lungs and bronchi, making it easier for the patient to expel sputum through coughing or suction, thereby alleviating airway obstruction, preventing infection, and improving the patient's respiratory function. The frequency and intensity of the vibration motor can usually be adjusted according to the needs of different patients to ensure the effectiveness and comfort of the treatment.
[0003] PID control, as a control method with simple structure and powerful performance, is widely used in the control of vibration motors of sputum ejectors. Through proportional control (P), integral control (I) and differential control (D), the vibration motor in the sputum ejector can accurately respond to control signals, ensuring that the equipment can provide the best vibration effect under different patient conditions, thereby improving the effectiveness and safety of treatment. Although the PID controller can achieve precise control of the vibration motor by adjusting the three parameters of P, I and D, finding the optimal parameter combination often requires a lot of experiments and adjustments, especially in complex or nonlinear systems. It cannot provide ideal control effects and may not be flexible enough when dealing with systems with a large range of dynamic changes.
[0004] In order to improve the performance of the sputum ejector, an intelligent optimization algorithm is applied to optimize PID control parameters; the crystal structure algorithm (CryStAl) is a novel meta-heuristic optimization method, which is inspired by the formation principle of the matrix and lattice points in the crystal structure; the symmetrical arrangement and construction characteristics of the crystal structure are used in the design of the algorithm, enabling it to perform effective global and local searches in a complex search space; the CryStAl algorithm is used to quickly find the optimal PID parameter combination in a complex search space, so that the PID controller can quickly achieve the best control effect; although the crystal structure algorithm has shown extremely powerful performance in many cases, in a complex structure space, the algorithm may fall into a local optimal solution, and in some cases, the convergence speed of the algorithm may be slow, especially when facing a more complex vibration motor control system during the optimization process.
[0005] The purpose of the present invention is: to address the deficiencies in the prior art, the present invention proposes a vibration motor optimization control method for a sputum discharger, optimizes the PID controller by improving the crystal structure algorithm (ICryStAl), dynamically adjusts the control parameters of the PID controller according to the real-time feedback of the vibration motor angle information, and achieves precise control of the PID controller, thereby ensuring that the patient can safely and timely discharge sputum, and ensuring the effectiveness and comfort of the treatment.
[0006] In order to achieve the above object, the present invention adopts the following technical scheme: a vibration motor optimization control method for a sputum removal instrument, comprising: an improved crystal structure algorithm (ICryStAl) and a position PID control algorithm, and the specific steps are:
[0007] Step 1, determine the optimization target of the optimal control of the sputum ejector vibration motor, and establish a mathematical model of the sputum ejector vibration motor, wherein the mathematical model includes an objective function model and a control system model.
[0008] Step 2: Improve the crystal structure algorithm by introducing an adaptive mechanism and a random mutation strategy. The improvements are as follows: S1, dynamically adjust the random parameters r1, r2 and r3 in the algorithm by introducing an adaptive mechanism; S2. Improve the algorithm by introducing random mutation strategies to enhance the diversity of individual solutions of the algorithm.
[0009] Step 3: Optimize the PID controller parameters through ICryStAl algorithm. The algorithm performs global iterative optimization and searches for the optimal PID control parameter vector in the search space by simulating the behavior of crystallographers in establishing crystal structures. The optimal PID control method, namely ICryStAl-PID control method, is obtained.
[0010] Step 4: Accurately control the vibration angle of the sputum ejector vibration motor through the ICryStAl-PID control method. According to the real-time feedback of the vibration motor angle information, calculate the deviation value Δθ(t) between the target angle and the real-time angle of the motor, and differentiate Δθ(t) to obtain the motor speed difference e(t). Calculate and input it into the ICryStAl-PID controller to obtain the output control quantity, thereby realizing closed-loop control of the vibration motor control system.
[0011] Furthermore, the mathematical model of the sputum removal instrument vibration motor, the objective function model is the core of the mathematical model, comprehensively considering the efficiency, stability, response speed and other performances of the vibration motor, and realizing accurate control of the vibration frequency of the vibration motor, the objective function model is selected as: In formula (1), J is the fitness value calculated by the objective function, θ refis the target angle of the vibration motor, θ(t) is the real-time angle of the vibration motor at time t, P(t) is the real-time power of the vibration motor at time t, ω(t) is the real-time speed of the vibration motor at time t, α1, α2, α 3为 The weight coefficient is used to balance the weights of various indicators. T is the total system operation time, and t is the actual system operation time.
[0012] Furthermore, a control system model of the sputum removal instrument vibration motor is established, and the control system model includes: a subtractor module, a PID controller module, an SVPWM module, a brushless DC motor module, a motor drive module, and a position information acquisition module, wherein the mathematical model of the brushless DC motor is: In formula (2), u α 、u β is the stator voltage in the stationary coordinate system, i α 、i β is the stator current in the stationary coordinate, L is the phase inductance of the stator winding, e α 、e β is the back electromotive force in the stationary coordinate, ψ is the magnetic flux of the vibration motor, and θ is the rotation angle of the vibration motor.
[0013] Furthermore, the control system model uses a position PID controller to achieve speed control of the vibration motor, and the mathematical model of the position PID controller is: In formula (3), U(t) is the output control quantity at time t, the output control quantity is the motor voltage value, e(t) is the speed difference of the vibration motor at time t, Kp, Ki, Kd are proportional, integral and differential control parameters respectively, T is the total system operation time, and t is the actual system operation time; the control mathematical model is discretized, and the discretized position PID controller mathematical model can be obtained as follows: In formula (4), e(t-1) is the motor speed difference at the previous moment, and the other parameters have the same meanings as above.
[0014] Furthermore, in the control system model, the position information acquisition module is used to collect the rotation angle of the vibration motor, the SVPWM module is used to generate three pairs of complementary PWM signals to control the output voltage value of the motor drive module, and the motor drive module is used to output three-phase voltage to the brushless DC motor.
[0015] Furthermore, the step 2 is to improve the crystal structure optimization algorithm by introducing an adaptive mechanism and a random mutation strategy, and the specific steps are as follows: S1. Introduce an adaptive mechanism to dynamically adjust the random parameters r1, r2 and r3 in the algorithm, improve the mathematical model of the simulation in the algorithm to form the best and balanced crystal structure, and balance the global search and local search capabilities of the algorithm. The improved mathematical model is: Cr new =Cr old +r1Cr man +r2Cr b +r3F c (5); In formula (5), Cr new is the updated individual position, Cr old is the individual position in the current iteration, Cr main is the individual position randomly selected from the algorithm population in the current iteration, Cr b is the best individual position in the current iteration, F c is the average value of the randomly selected position set in the current iteration; the mathematical model after introducing the adaptive mechanism to dynamically adjust r1, r2 and r3 is: In formula (6), r1, r2 and r3 are the improved random parameters, F Crb Cr b The fitness of the individual position, F Cold Cr old The fitness of the individual position, τ is the current iteration number, and to avoid the minimum constant with a denominator of zero, σ(F Cov ) is the standard deviation of the fitness of the current individual solution set, which is used to measure the dispersion of the solution. Cov is the current candidate solution set, T max is the total number of algorithm iterations, τ / T max It gradually decreases with the number of iterations to ensure that the algorithm converges in the later stages; S2. Introduce random mutation strategy to improve the mathematical model of the best crystal structure established by simulation in the algorithm, enhance the local search ability of the algorithm in the later stage, and avoid falling into the local optimum. The improved mathematical model is: Cr new =Cr old +r1Cr main +r2F c +η×M(Cr old , t) (7); In formula (7), Cr new is the updated individual position, Cr old is the individual position in the current iteration, Cr main is the position of an individual randomly selected from the algorithm population in the current iteration, F cis the average value of the randomly selected position set in the current iteration, r1 and r2 are random numbers between [0,1]; η is a parameter that controls the intensity of mutation, which usually decreases with the number of iterations. The mathematical model of η is: In formula (8), η0 is the initial mutation intensity, λ is the rate of controlling mutation attenuation, and the other parameters have the same meanings as above. old , t) is in accordance with Gaussian distribution, with mean 0 and variance σ 2 function.
[0016] Furthermore, in step 3, the PID controller parameters are optimized by ICryStAl algorithm, the algorithm globally iterates and optimizes, and by simulating the behavior of crystallographers in establishing crystal structures, the optimal PID control parameter individual solution is searched in the search space to obtain the optimal PID control method. The specific steps are: S1. Initialize the population size N of the improved crystal structure algorithm (ICryStAl) max , the maximum number of iterations T max , problem dimension Dim, and parameter space [Ub,Lb], where Ub and Lb are column vectors of order Dim; S2. Initialize the individual positions of the improved crystal structure algorithm, generate the initial positions of the population individuals, and the mathematical model of the initial individual positions is: Cr init =Lb+ξ(Ub-Lb) (9); In formula (9), Cr init is the initial position of the individuals in the population generated by initialization, ξ is a random number between [0,1], and Ub and Lb have the same meaning as above; S3, calculate and save the fitness values of all individual positions. According to the principle that the smaller the fitness, the better the individual position solution, the individual with the smallest fitness is recorded as the best individual position in the current iteration, and the individual fitness is the best fitness; S4, the algorithm enters the position update stage, and simulates the formation of a single crystal structure to establish a mathematical model to update the individual. The mathematical model is: Cr new =Cr old +rCr main (10); In formula (10), Cr new is the updated individual position, Cr old is the individual position in the current iteration, Cr main is the individual position randomly selected from the algorithm population in the current iteration, and r is a random number between [0,1]; S5. According to formula (7), a random mutation strategy is introduced to improve the mathematical model of the best crystal structure established by simulating the algorithm, and the position of the individual is updated through the improved mathematical model; S6. Simulate the formation of a balanced crystal structure to establish a mathematical model to update the individual. The mathematical model is: Cr new =Cr old +r1Cr main +r2F c (11); In formula (11), Cr new is the updated individual position, Cr old is the individual position in the current iteration, Cr main is the position of an individual randomly selected from the algorithm population in the current iteration, F c is the average value of the set of randomly selected positions in the current iteration, r1 and r2 are random numbers between [0,1]; S7, according to formula (5), introduce an adaptive mechanism to dynamically adjust the random parameters r1, r2 and r3 in the algorithm, improve the mathematical model established by the simulation in the algorithm to form the best and balanced crystal structure, and update the position of the individual through the improved mathematical model; S9. Check whether the current number of iterations τ is equal to the maximum number of iterations T max If yes, then output the optimal PID control parameter individual solution; if not, execute τ=τ+1 and return to step S3 to continue optimizing.
[0017] Furthermore, in step 4, the vibration angle of the sputum discharge instrument vibration motor is accurately controlled by the ICryStAl-PID control method, and the deviation value θ(t) between the target angle and the real-time angle of the vibration motor is calculated according to the real-time feedback vibration motor angle information, and θ(t) is derived to obtain the motor speed difference e(t), which is calculated and input into the ICryStAl-PID controller to calculate the output control quantity, thereby realizing closed-loop control of the vibration motor control system. The specific steps are as follows: S1. Set the target angle of the vibration motor control system to θ ref , according to the real-time feedback of the vibration motor angle information θ(t), calculate θ ref The deviation value θ(t) between θ(t) and θ(t) is obtained by taking the derivative of θ(t) to obtain the motor speed difference e(t), which is calculated and input into the ICryStAl-PID controller module; S2, ICryStAl-PID controller module performs proportional-integral-differential control on the input e(t) and outputs the control quantity U(t), where U(t) is the target current value; S3, subtract U(t) from the current value I(t) collected in real time to obtain ΔI(t), input I(t) into the current PID controller module, and output the control quantity V(t) after proportional-integral-differential control, where V(t) is the voltage value; S4. Input v(t) into the SVPWM module, and after modulation, output three pairs of complementary PWM signals to the motor drive module; S5. After the motor drive module obtains the PWM signal, it modulates the DC voltage into a square wave voltage and inputs it into the brushless DC motor; S6. The brushless DC motor runs, continuously collecting and transmitting the motor angle information and real-time current value, to realize closed-loop control of the vibration motor control system.
[0018] The present invention proposes a vibration motor optimization control method for a sputum removal instrument, and optimizes the PID controller by improving the crystal structure algorithm (ICryStAl). Due to the adoption of the above technical solution, the beneficial effects of the present invention are as follows: M1. By introducing an adaptive mechanism to dynamically adjust the random parameters r1, r2 and r3 in the algorithm, adaptive adjustments can be made at different optimization stages to ensure that the algorithm has a strong global search capability in the early stage and enhances the local search accuracy in the later stage; M2, introduce random mutation strategy to improve the algorithm to simulate and establish the mathematical model of the best crystal structure, increase the diversity in the search space through random perturbations, and thus improve the global search capability; M3. By optimizing the PID controller with the improved ICryStAl algorithm, the system can respond more quickly and accurately in complex dynamic environments, and dynamically adjust the PID parameters (Kp, Ki, Kd) so that the system can achieve stable control performance under different working conditions, thereby improving the robustness of the system. More importantly, it ensures that patients can safely and promptly discharge sputum and ensures the effectiveness and comfort of treatment. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A diagram showing the steps for optimizing the vibration motor for a sputum extraction device.
[0020] Figure 2 Optimize PID controller flow chart for improved crystal structure algorithm.
[0021] Figure 3 To improve the crystal structure algorithm and optimize the Kp, Ki, and Kd parameter curves of the PID controller of the sputum removal instrument vibration motor.
[0022] Figure 4 Comparison chart of the fitness value curves for optimizing the PID controller of the vibration motor of the sputum ejector using the improved crystal structure algorithm and the common crystal structure algorithm.
[0023] Figure 5Comparison chart of the effects of optimizing the PID controller of the vibration motor of the sputum ejector using the improved crystal structure algorithm and the ordinary crystal structure algorithm. DETAILED DESCRIPTION
[0024] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0025] The present invention provides a vibration motor optimization control method for a sputum removal instrument, comprising: an improved crystal structure algorithm (ICryStAl) and a position PID control algorithm, such as Figure 1 As shown, the specific steps are:
[0026] Step 1, determine the optimization target of the optimal control of the sputum ejector vibration motor, and establish a mathematical model of the sputum ejector vibration motor, wherein the mathematical model includes an objective function model and a control system model.
[0027] Furthermore, the mathematical model of the sputum removal instrument vibration motor comprehensively considers the efficiency, stability, response speed and other performances of the vibration motor, and realizes precise control of the vibration frequency of the vibration motor, and the objective function model is selected as: In formula (1), J is the fitness value calculated by the objective function, θ ref is the target angle of the vibration motor, θ(t) is the real-time angle of the vibration motor at time t, P(t) is the real-time power of the vibration motor at time t, ω(t) is the real-time speed of the vibration motor at time t, α1, α2, α3 are weight coefficients, which are set to 0.2, 0.2, and 0.6 respectively, and are used to balance the weights of various indicators. T is the total system running time, which is set to 50s in the simulation software. t is the actual running time of the system, and the sampling time is set to 0.5s.
[0028] Furthermore, a control system model of the sputum removal instrument vibration motor is established, and the control system model includes: a subtractor module, a PID controller module, an SVPWM module, a brushless DC motor module, a motor drive module, and a position information acquisition module, wherein the mathematical model of the brushless DC motor is: In formula (2), u α 、u β is the stator voltage in the stationary coordinate system, i α 、i β is the stator current in the stationary coordinate, L is the phase inductance of the stator winding, eα 、e β is the back electromotive force in the stationary coordinate, ψ is the magnetic flux of the vibration motor, and θ is the rotation angle of the vibration motor.
[0029] Furthermore, the control system model uses a position PID controller to achieve speed control of the vibration motor, and the mathematical model of the position PID controller is: In formula (3), U(t) is the output control quantity at time t, the output control quantity is the motor voltage value, e(t) is the speed difference of the vibration motor at time t, Kp, Ki, Kd are proportional, integral and differential control parameters respectively, T is the total system operation time, and t is the actual system operation time; the control mathematical model is discretized, and the discretized position PID controller mathematical model can be obtained as follows: In formula (4), e(t-1) is the motor speed difference at the previous moment, and the other parameters have the same meanings as above.
[0030] Furthermore, in the control system model, the position information acquisition module is used to collect the rotation angle information of the vibration motor, the SVPWM module is used to generate 3 pairs of complementary PWM signals to control the output voltage value of the motor drive module, and the motor drive module is used to output three-phase voltage to the brushless DC motor body.
[0031] Step 2: Improve the crystal structure algorithm by introducing an adaptive mechanism and a random mutation strategy. The improvements are as follows: S1, introduce adaptive mechanism to dynamically adjust the random parameters r1, r2 and r3 in the algorithm, improve the simulation in the algorithm to form the best and balanced crystal structure to establish the mathematical model, the improved mathematical model is: Cr new =Cr old +r1Cr main +r2Cr b +r3F c (5); In formula (5), Cr new is the updated individual position, Cr old is the individual position in the current iteration, Cr main is the individual position randomly selected from the algorithm population in the current iteration, Cr b is the best individual position in the current iteration, F c is the average value of the randomly selected position set in the current iteration, and the size of the randomly selected position set is set to half of the population size, that is, 10; the mathematical model after the introduction of the adaptive mechanism to dynamically adjust r1, r2, and r3 is: In formula (6), r1, r2 and r3 are the improved random parameters, F Crb Cr b The fitness of the individual position, F Cold Cr old The fitness of the individual position, τ is the current iteration number, to avoid the minimum constant with the denominator being zero, it is set to 0.001, σ(F Cov ) is the standard deviation of the fitness of the current candidate solution set, which is used to measure the dispersion of the solution. Cov is the current candidate solution set, T max is the total number of algorithm iterations, τ / T max It gradually decreases with the number of iterations; S2. The mathematical model for establishing the best crystal structure by introducing random mutation strategy to improve the algorithm is as follows: Cr new =Cr old +r1Cr main +r2F c +η×M(Cr old , t) (7); In formula (7), Cr new is the updated individual position, Cr old is the individual position in the current iteration, Cr main is the position of an individual randomly selected from the algorithm population in the current iteration, F c is the average value of the randomly selected position set in the current iteration, r1 and r2 are random numbers between [0,1]; η is a parameter that controls the intensity of mutation, which usually decreases with the number of iterations. The mathematical model of η is: In formula (8), η0 is the initial mutation intensity, which is set to 2, λ is the rate of controlling mutation attenuation, which is set to 0.1, and the other parameters have the same meanings as above. old , t) is in accordance with Gaussian distribution, with mean 0 and variance σ 2 function.
[0032] Step 3, optimize the PID controller parameters by ICryStAl algorithm, the algorithm globally iterates and optimizes, by simulating the behavior of crystallographers to establish crystal structure, search for the optimal PID control parameter vector in the search space, and obtain the optimal PID control method, that is, ICryStAl-PID control method, optimize the PID controller parameters by ICryStAl algorithm, the algorithm globally iterates and optimizes, by simulating the behavior of crystallographers to establish crystal structure, search for the optimal PID control parameter individual solution in the search space, and obtain the optimal PID control method, the specific steps are: S1. Initialize the population size N of the improved crystal structure algorithm (ICryStAl) max is 30, the maximum number of iterations is T max is 20, the problem dimension Dim is 3, and the parameter space is [Ub, Lb], where Ub and Lb are set to [0.001; 0.001; 0.001] and [20; 20; 20] respectively; S2. Initialize the individual positions of the improved crystal structure algorithm, generate the initial positions of the population individuals, and the mathematical model of the initial individual positions is: Cr init =Lb+ξ(Ub-Lb) (9); In formula (9), Cr init is the initial position of the individuals in the population generated by initialization, ξ is a random number between [0,1], and Ub and Lb have the same meaning as above; S3, calculate and save the fitness values of all individual positions. According to the principle that the smaller the fitness, the better the individual position solution, the individual with the smallest fitness is recorded as the best individual position in the current iteration, and the individual fitness is the best fitness; S4, the algorithm enters the position update stage, and simulates the formation of a single crystal structure to establish a mathematical model to update the individual. The mathematical model is: Cr new =Cr old +rCr main (10); In formula (10), Cr new is the updated individual position, Cr old is the individual position in the current iteration, Cr main is the individual position randomly selected from the algorithm population in the current iteration, and r is a random number between [0,1]; S5. According to formula (7), a random mutation strategy is introduced to improve the mathematical model of the best crystal structure established by simulating the algorithm, and the position of the individual is updated through the improved mathematical model; S6. Simulate the establishment of a balanced crystal structure to establish a mathematical model to update the individual. The mathematical model is: Cr new =Cr old +r1Cr main +r2F c (11); In formula (11), Cr new is the updated individual position, Cr old is the individual position in the current iteration, Cr main is the position of an individual randomly selected from the algorithm population in the current iteration, F cis the average value of the set of randomly selected positions in the current iteration, r1 and r2 are random numbers between [0,1]; S7, according to formula (5), introduce an adaptive mechanism to dynamically adjust the random parameters r1, r2 and r3 in the algorithm, improve the mathematical model established by the simulation in the algorithm to form the best and balanced crystal structure, and update the position of the individual through the improved mathematical model; S9. Check whether the current number of iterations τ is equal to the maximum number of iterations T max If yes, then output the optimal PID control parameter individual solution; if no, execute τ=τ+1 and return to step S3 to continue the optimization; S10, such as Figure 3 As shown in the figure, after the global iterative optimization of the algorithm, the values of Kp and Kd remain relatively stable, and the value of Ki drops a lot. Finally, the individual solutions of the optimal PID control parameters of the vibration motor control system are 16.655, 1.027, and 0.0432 respectively.
[0033] Step 4: The vibration angle of the sputum discharge instrument vibration motor is precisely controlled by the ICryStAl-PID control method. According to the real-time feedback of the vibration motor angle information, the deviation value Δθ(t) between the target angle and the real-time angle of the vibration motor is calculated. The motor speed difference e(t) is obtained by derivation of Δθ(t). The motor speed difference is calculated and input into the ICryStAl-PID controller to obtain the output control quantity, thereby realizing the closed-loop control of the vibration motor control system. The specific steps are as follows: S1. Set the target angle θ of the vibration motor control system ref is 1°, and according to the real-time feedback of the vibration motor angle information θ(t), calculate θ ref The deviation value θ(t) between θ(t) and θ(t) is obtained by taking the derivative of θ(t) to obtain the motor speed difference e(t), which is calculated and input into the ICryStAl-PID controller module; S2, ICryStAl-PID controller module performs proportional-integral-differential control on the input e(t) and outputs the control quantity U(t), where U(t) is the target current value; S3, subtract U(t) from the current value I(t) collected in real time to obtain ΔI(t), input I(t) into the current PID controller module, and after proportional-integral-differential control, output the control quantity V(t), where v(t) is the voltage value; S4, input V(t) into the SVPWM module, and after modulation, output three pairs of complementary PWM signals to the motor drive module; S5, after the motor drive module obtains the PWM signal, it modulates the DC voltage into a square wave voltage and inputs it into the brushless DC motor; S6, the brushless DC motor runs, continuously collects and transmits the motor angle information and real-time current value, and realizes closed-loop control of the vibration motor control system.
[0034] like Figure 4 As shown in the figure, the fitness value curves of the improved crystal structure algorithm and the ordinary crystal structure algorithm for optimizing the PID controller of the vibration motor of the sputum discharge instrument are compared and analyzed. It can be seen that in the early stage of the algorithm iteration, the fitness of the ordinary crystal structure algorithm is relatively small, indicating that the algorithm solution found by the ordinary crystal structure algorithm in the initial stage is superior, but with the increase of the number of iterations, the improved crystal structure algorithm converges quickly. When the iteration reaches the third time, the performance of the improved crystal structure algorithm and the ordinary crystal structure algorithm is already equal, and the improved crystal structure algorithm is still converging rapidly, while the ordinary crystal structure algorithm has had a significant convergence since the fourth iteration. In addition, the fitness value has basically not changed, which means that the ordinary crystal structure algorithm has fallen into the local optimum, but cannot jump out of the local optimum, and the final fitness value is close to 0.019; and after the 5th iteration, although the improved crystal structure algorithm has also fallen into the local optimum, it can jump out quickly and is still converging, and the final fitness is close to 0.0037. According to the principle that the smaller the fitness value, the better the individual solution found by the algorithm, it can be concluded that when optimizing the control parameters of the PID controller of the sputum discharge instrument vibration motor, the optimization performance of the improved crystal structure algorithm is stronger than that of the ordinary crystal structure algorithm.
[0035] like Figure 5As shown in the figure, the response curves of the PID controller of the vibration motor of the sputum discharge instrument are optimized by comparing the improved crystal structure algorithm and the ordinary crystal structure algorithm, and the response speed, overshoot and dynamic stabilization time are analyzed. It can be seen that the response speeds of the improved crystal structure algorithm and the ordinary crystal structure algorithm are basically the same in the early stage. Although the ordinary crystal structure algorithm reaches the target value faster than the improved crystal structure algorithm, the time for the ordinary crystal structure algorithm to reach the target value is 0.35s, and the time for the improved crystal structure algorithm to reach the target value is 0.52s, but the overshoot of the ordinary crystal structure algorithm is significantly greater than that of the improved crystal structure algorithm, and the time to reach dynamic stability is It is much higher than the improved crystal structure algorithm. The ordinary crystal structure algorithm optimized the PID controller of the vibration motor of the sputum ejector to reach a stable state in 20s, while the improved crystal structure algorithm optimized the PID controller of the vibration motor of the sputum ejector to basically reach a stable state after reaching the target value. Through comprehensive analysis of the response speed, overshoot and dynamic stabilization time of the PID controller of the vibration motor of the sputum ejector optimized by the improved crystal structure algorithm and the ordinary crystal structure algorithm, it is shown that the performance of the PID controller of the vibration motor of the sputum ejector optimized by the improved crystal structure algorithm is very powerful, and it is effective to optimize the PID controller of the vibration motor of the sputum ejector by using the improved crystal structure algorithm.
[0036] In summary, the present invention provides a vibration motor optimization control method for a sputum ejector. The method optimizes the vibration motor control system PID controller by improving the crystal structure algorithm (ICryStAl), so that the system can respond more quickly and accurately in a complex dynamic environment, and dynamically adjusts the PID parameters (Kp, Ki, Kd), so that the system can achieve stable control performance under different working conditions, thereby improving the robustness of the system, and more importantly, ensuring that patients can safely and timely discharge sputum and ensure the effectiveness and comfort of treatment.
Claims
1. A vibration motor optimization control method for a sputum removal instrument, comprising: Improve the crystal structure algorithm (ICryStAl) and position PID control algorithm. The specific steps are as follows: Step 1, determining the optimization target of the optimal control of the sputum ejector vibration motor, and establishing a mathematical model of the sputum ejector vibration motor, wherein the mathematical model includes an objective function model and a control system model; Step 2: Improve the crystal structure algorithm by introducing adaptive mechanism and random mutation strategy; Step 3, optimize the PID controller parameters by ICryStAl algorithm, the algorithm globally iterates to find the best, and by simulating the behavior of crystallographers in establishing crystal structures, searches for the optimal PID control parameter vector in the search space, and obtains the ICryStAl-PID control method; Step 4: Accurately control the vibration angle of the sputum ejector vibration motor through the ICryStAl-PID control method. According to the real-time feedback of the vibration motor angle information, calculate the deviation value Δθ(t) between the target angle and the real-time angle of the motor, and differentiate Δθ(t) to obtain the motor speed difference e(t). Calculate and input it into the ICryStAl-PID controller to obtain the output control quantity, thereby realizing closed-loop control of the vibration motor control system.
2. The vibration motor optimization control method of a sputum removal instrument according to claim 1 is characterized in that: In the step 1, the mathematical model of the sputum removal instrument vibration motor is established as follows: In formula (1), J is the fitness value calculated by the objective function, θ ref is the target angle of the vibration motor, θ(t) is the real-time angle of the vibration motor at time t, P(t) is the real-time power of the vibration motor at time t, ω(t) is the real-time speed of the vibration motor at time t, α1, α2, α 3为 Weight coefficient, used to balance the weights of various indicators, T is the total system operation time, and t is the actual system operation time; The control system model of the sputum removal instrument vibration motor includes: a subtractor module, a PID controller module, an SVPWM module, a brushless DC motor module, a motor drive module, and a position information acquisition module.
3. The vibration motor optimization control method of a sputum removal device according to claim 2 is characterized in that: In step 2, an adaptive mechanism is introduced to dynamically adjust the random parameters r1, r2 and r3 in the algorithm, and the simulation in the improved algorithm is formed to form a mathematical model for the best and balanced crystal structure. The improved mathematical model is: Cr new =C old +r1Cr main +r2Cr b +r3F c (2); In formula (2), Cr new is the updated individual position, Cr old is the individual position in the current iteration, Cr main is the individual position randomly selected from the algorithm population in the current iteration, Cr b is the best individual position in the current iteration, F c is the average value of the randomly selected position set in the current iteration; the mathematical model after introducing the adaptive mechanism to dynamically adjust r1, r2 and r3 is: In formula (3), r1, r2 and r3 are the improved random parameters, F Crb Cr b The fitness of the individual position, F Cold Cr old The fitness of the individual position, τ is the current iteration number, and to avoid the minimum constant with a denominator of zero, σ(F Cov ) is the standard deviation of the fitness of the current candidate solution set, F Cov is the current candidate solution set, T max is the total number of algorithm iterations, τ / T max It gradually decreases with the number of iterations to ensure that the algorithm converges in the later stages.
4. The vibration motor optimization control method of a sputum removal device according to claim 3 is characterized in that: In step 2, the crystal structure algorithm is improved by introducing a random mutation strategy, specifically: The mathematical model of the best crystal structure established by simulation formation in the improved algorithm is introduced into the random mutation strategy. The improved mathematical model is: Cr new =Cr old +r1Cr main +r2F c +η×M(C old ,t) (4); In formula (4), Cr new is the updated individual position, Cr old is the individual position in the current iteration, Cr main is the position of an individual randomly selected from the algorithm population in the current iteration, F c is the average value of the randomly selected position set in the current iteration, r1 and r2 are random numbers between [0,1]; η is a parameter that controls the intensity of mutation, which usually decreases with the number of iterations. The mathematical model of η is: In formula (5), η0 is the initial mutation intensity, λ is the rate of controlling mutation attenuation, and the other parameters have the same meanings as above. old ,t) is in accordance with Gaussian distribution, with mean 0 and variance σ 2 function.
5. The vibration motor optimization control method of a sputum removal device according to claim 4 is characterized in that: In step 3, the PID controller parameters are optimized by ICryStAl algorithm, the algorithm globally iterates and optimizes, and by simulating the behavior of crystallographers in establishing crystal structures, the optimal PID control parameter individual solution is searched in the search space to obtain the optimal PID control method. The specific steps are: S1. Initialize the population size N of the improved crystal structure algorithm (ICryStAl) max , the maximum number of iterations T max , problem dimension Dim, and parameter space [Ub, Lb], where Ub and Lb are column vectors of dimension Dim; S2. Initialize the individual positions of the improved crystal structure algorithm to generate the initial positions of the population individuals. The mathematical model of the initial individual positions is: Cr init =Lb+ξ(Ub-Lb) (6); In formula (6), Cr init is the initial position of the individuals in the population generated by initialization, ξ is a random number between [0, 1], and Ub and Lb have the same meaning as above; S3, calculate the fitness values of all individual positions and save them, record the individual with the smallest fitness as the best individual position in the current iteration, and the individual fitness is the best fitness; S4, the algorithm enters the position update stage, and simulates the formation of a single crystal structure to establish a mathematical model to update the individual. The mathematical model is: Cr new =Cr old +rCr main (7); In formula (7), Cr new is the updated individual position, Cr old is the individual position in the current iteration, Cr main is the individual position randomly selected from the algorithm population in the current iteration, and r is a random number between [0, 1]; S5. According to formula (4), a random mutation strategy is introduced to improve the algorithm to simulate the formation of the best crystal structure and establish a mathematical model, and the position of the individual is updated through the improved mathematical model; S6. Simulate the formation of a balanced crystal structure to establish a mathematical model to update the individual. The mathematical model is: Cr new =Cr old +r1Cr main +r2F c (8); In formula (8), Cr new is the updated individual position, Cr old is the individual position in the current iteration, Cr main is the position of an individual randomly selected from the algorithm population in the current iteration, F c is the average value of the set of randomly selected positions in the current iteration, r1 and r2 are random numbers between [0, 1]; S7, according to formula (2), introduce an adaptive mechanism to dynamically adjust the random parameters r1, r2 and r3 in the algorithm, improve the simulation in the algorithm to form the best and balanced crystal structure to establish a mathematical model, and update the position of the individual through the improved mathematical model; S9. Check whether the current number of iterations τ is equal to the maximum number of iterations T max If yes, then output the optimal PID control parameter individual solution; if not, execute τ=τ+1 and return to step S3 to continue optimizing.