A PID control method for metallographic specimen grinding and polishing based on improved multi-material compatibility

Through the improved multi-material-compatible metallographic specimen grinding and polishing PID control method, the improved escape optimization algorithm and multiple optimization mechanisms are used to optimize PID control parameters, and the problems of slow response speed and insufficient control accuracy in a multi-material environment are solved, achieving more efficient and more stable grinding and polishing control.

CN119535952BActive Publication Date: 2025-04-29CHONGQING ZHEZHICHENG TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510088480.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-04-29
Estimated Expiration
2045-01-21

AI Technical Summary

Technical Problem

The traditional PID control method is difficult to adapt to the characteristics of various materials, and the response speed is slow and the control accuracy is insufficient, resulting in uneven grinding and polishing, surface damage and tissue structure distortion during the grinding and polishing of metallographic samples.

Method used

The improved multi-material compatible metallographic sample grinding and polishing PID control method is adopted, and the parameters of the PID controller are optimized using an improved escape optimization algorithm, and the control parameters are dynamically adjusted and optimized in combination with the star surge piloting mechanism, time-varying cosine attenuation mechanism, elite gravity-oriented method and trace heuristic optimization method.

Benefits of technology

It improves the accuracy of pressure control, system response speed and stability during grinding and polishing, enhances the system's adaptability to different materials, and improves the quality and efficiency of sample preparation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119535952B_ABST
    Figure CN119535952B_ABST
Patent Text Reader

Abstract

The invention discloses a PID control method for metallographic sample grinding and polishing based on improved multi-material compatibility, which belongs to the technical field of PID control. The specific steps include: S10, establishing a multi-material compatible metallographic sample grinding and polishing control model based on a PID controller; S20, improving an escape optimization algorithm, including initializing a population based on a star surge navigation mechanism, introducing an adaptive agility factor, dynamically adjusting a panic index, updating a population position using an elite gravity guidance method, and improving the diversity and stability of an elite pool update using a trace-inspired optimization method; S30, iteratively obtaining optimal PID controller parameters using the improved escape optimization algorithm; S40, simulating a PID controller of a multi-material compatible metallographic sample grinding and polishing control model; the improved algorithm not only improves the optimization efficiency, response speed and accuracy of PID control, but also significantly enhances the robustness of the system and its adaptability under different material conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of PID control optimization, and in particular relates to a PID control method for metallographic sample grinding and polishing based on improved multi-material compatibility. Background Art

[0002] In the field of metallographic sample preparation, due to the variety of sample materials and significant differences in physical properties such as hardness and toughness, traditional grinding and polishing methods often cannot meet the preparation requirements of different materials. Especially for the preparation of samples of high-hardness alloy materials, brittle ceramic materials and composite materials, the conventional grinding and polishing parameter settings are not flexible enough, which can easily lead to problems such as uneven grinding and polishing, surface damage and structural distortion, which seriously affects the accuracy of microstructure analysis results.

[0003] In this context, an improved multi-material compatible metallographic specimen grinding and polishing system came into being. The system uses a PID closed-loop control algorithm to achieve real-time monitoring and dynamic adjustment of different material parameters during the grinding and polishing process. The system can automatically optimize the grinding and polishing pressure according to complex working conditions with large differences in hardness, toughness, and particle removal characteristics of the sample material, thereby ensuring the stability and consistency of the grinding and polishing process. Compared with traditional methods, this method significantly improves the surface finish and structural integrity of the sample, and reduces the errors caused by human operation.

[0004] PID control is a technology widely used in industrial automation, which includes three parts: proportional (P), integral (I) and differential (D). It uses the proportional part to quickly respond to system deviations, the integral part to correct accumulated errors, and the differential part to predict the trend of deviation changes. The three work together to achieve precise control of the system. During the grinding and polishing process, the hardness, toughness and particle removal of different sample materials vary significantly, which puts higher requirements on the control system. The traditional PID control method relies on fixed proportional, integral and differential parameters, which makes it difficult to flexibly respond to complex and changeable grinding and polishing environments, resulting in reduced control accuracy and insufficient response speed. Therefore, it is necessary to design a more intelligent and adaptable PID control method to meet the requirements of high precision, high response and high stability for complex working conditions during the grinding and polishing process.

[0005] The Escape Optimization Algorithm (ESC) is a new optimization method inspired by crowd evacuation behavior. The algorithm simulates the dynamic behavior of the crowd during the evacuation process and divides the population into three subgroups: calm group, sheep group and panic group. In the exploration phase, individuals in the calm group guide the search with rational strategies, individuals in the sheep group adjust their positions by following and imitating the behaviors of other groups, and individuals in the panic group introduce diversity in exploration through randomness to prevent falling into local optimality. In the development phase of the algorithm, all individuals gradually converge to the optimal solution stored in the elite pool to further optimize the quality of the solution. By integrating the dynamic characteristics of crowd behavior, the algorithm can effectively balance global exploration and local development, and excels in convergence speed, optimization efficiency, robustness and ability to escape local optimality, and is particularly suitable for complex optimization problems. Summary of the invention

[0006] The purpose of the present invention is to propose a PID control method for metallographic sample grinding and polishing based on improved multi-material compatibility. The method enables the system to accurately adjust the pressure in real time according to the characteristics of different materials during the grinding and polishing process. It is particularly suitable for complex working conditions with large differences in material hardness, toughness and particle removal characteristics in the grinding and polishing environment. It can dynamically balance between global search and local development, and more efficiently find the global optimal solution. It not only solves the problems that traditional control methods are difficult to adapt to the characteristics of multiple materials, have slow response speeds and insufficient control accuracy, but also improves the system's adaptability to material characteristics and pressure control accuracy, and enhances the stability and robustness of the system.

[0007] To achieve the above object, the present invention adopts the following technical solutions:

[0008] A PID control method for metallographic specimen grinding and polishing based on improved multi-material compatibility is proposed. The method uses an improved escape optimization algorithm to quickly find the optimal PID control parameters of the multi-material compatible metallographic specimen grinding and polishing system, improves the pressure control accuracy, system response speed and stability during the grinding and polishing process, thereby enhancing the adaptability of the metallographic specimen grinding and polishing system to different materials and improving the quality and efficiency of specimen preparation. The specific steps are as follows.

[0009] S10. Establish a multi-material compatible metallographic specimen grinding and polishing control model based on PID controller.

[0010] S20. Improved escape optimization algorithm.

[0011] S30, using the improved escape optimization algorithm to optimize and adjust the parameters of the PID controller, and iteratively obtain the optimal three control parameters Kp, Ki, and Kd.

[0012] S40, simulating the PID control model, applying the optimized grinding and polishing parameters to the PID control model, verifying the control performance and adaptability of the grinding and polishing system under different material conditions, and realizing adaptive control of a multi-material compatible metallographic specimen grinding and polishing system.

[0013] There are four improvements to the algorithm in step S20, and the specific improvements are as follows.

[0014] First, in the population initialization stage, the population position is initialized based on the star surge navigation mechanism. The relevant formula is as follows:

[0015] (1);

[0016] In the formula, For the The individual in Initialization position in dimension, and Respectively represent upper and lower bounds on the dimension parameter, is the boundary adjustment function, The pilot weight is used to control the degree of trust in the guidance path in Xingyong pilot. For the dimensional navigation vector, For the The individual in A random variable in dimension, uniformly distributed , increase the global exploratory power of the initial population and avoid over-concentration, is Gaussian noise.

[0017] Second, based on the time-varying cosine attenuation mechanism, an adaptive dynamic factor is introduced , dynamically adjust the sensitivity of the panic index to fitness feedback, guide the search collaboration of individuals in different groups, balance the search behavior, and improve the overall optimization efficiency of the algorithm. The relevant formula is:

[0018] (2);

[0019] (3);

[0020] In the formula, For the The adaptive flexibility factor value of the iteration, To adapt to the benchmark value of the agility factor, it is a fixed value. Current Iteration The standard deviation of the population fitness at , indicates the degree of dispersion of the population. is the maximum value of the fitness standard deviation, is the current iteration number, is the maximum number of iterations, For the current iteration The panic index reflects the degree of confusion in the current crowd behavior. is the minimum value of the panic index, is the maximum value of the panic index, is the fitness value of the current optimal individual, is the average fitness value of the current population, is an exponential function, is the attenuation factor, which controls the attenuation rate.

[0021] Third, use the elite gravity guidance method to update the individual position. The relevant formula is:

[0022] (4);

[0023] (5);

[0024] (6);

[0025] In the formula, , are the current dynamic guidance factor and the initial dynamic guidance factor values, respectively. is the current iteration number, is the maximum number of iterations, is the Levy weight, , is a random variable, is the scale parameter, , is the gamma function, For the updated individual No. The location of the dimension, For individuals No. The current position in dimension, is the first elite solution vector selected from the elite pool The location of the dimension, is a random selection from the population The individual The location of the dimension, , A binary variable generated from a Bernoulli distribution, , are two Levy weights, is the disturbance adjustment factor, is the random disturbance term, is the average individual fitness of the current population, For individuals The fitness value of is a random number in the interval [0,1], is a sign function used to control the perturbation direction.

[0026] Fourth, the trace-inspired optimization method is used to improve the diversity and stability of the elite pool update by utilizing the dynamic balance mechanism of the current elite solution and the historical elite solution, combined with time decay disturbance. The relevant formula is:

[0027] (7);

[0028] In the formula, is the current iteration number, is the maximum number of iterations, , , are the sets of the top ten solution vectors selected by calculating the fitness values ​​in the current elite pool, the current iteration, and the historical elite pool. is the dynamic balance factor, is the disturbance control coefficient, is a random disturbance term.

[0029] Furthermore, in step S10, the multi-material compatible metallographic sample grinding and polishing control model of the PID controller mainly includes a pressure difference calculation module, an improved escape optimization algorithm module, a pressure control module, a load compensation calculation module, a pressure adjustment module, an abrasive detection module and a speed and pressure detection module;

[0030] Wherein, the pressure difference calculation module is used to calculate the deviation between the target pressure and the actual pressure;

[0031] The improved escape optimization algorithm module optimizes three parameters of the PID controller, and transmits the optimized PID control parameters to the pressure control module to improve the control performance;

[0032] The pressure control module adjusts the pressure control signal according to the pressure error value output by the pressure difference calculation module and transmits it to the load compensation calculation module by using the PID control parameters optimized by the improved escape optimization algorithm module;

[0033] The load compensation calculation module adjusts the pressure signal based on the pressure control signal output by the pressure control module and the system deviation caused by the load change, and outputs the pressure signal to the pressure adjustment module;

[0034] The pressure adjustment module adjusts and controls the output of the final pressure according to the pressure signal of the load compensation calculation module to ensure accurate control of the system pressure;

[0035] The abrasive detection module is used to detect the use of abrasives in real time and provide feedback information on abrasive consumption during grinding and polishing to optimize the pressure control effect;

[0036] The speed and pressure detection module is used to detect the actual speed and pressure output of the motor, feedback key information in the grinding and polishing process, and provide support for the precise adjustment of the grinding and polishing pressure.

[0037] Furthermore, in step S30, the specific steps of optimizing the PID controller by using the improved escape optimization algorithm are:

[0038] S31, Initialize the parameters of the improved escape optimization algorithm: Initialize the population position based on the star surge navigation mechanism, and the upper bound of the algorithm search and the lower bound , solution space dimension , population size , the maximum number of iterations of the population ,The relevant formula of the star surge pilot mechanism is shown in formula (1);

[0039] S32, select a fitness function for evaluating the adaptability and performance of the solution in a dynamic environment, and the fitness function formula is:

[0040] (8);

[0041] In the formula, is the time variable, It is the real-time error between the actual pressure and the target pressure of the multi-material compatible metallographic specimen grinding and polishing system. is the instantaneous rate of change of the actual pressure value, is the fitness function value;

[0042] S33. In the behavior-driven exploration stage, based on the time-varying cosine decay mechanism, an adaptive factor is introduced to improve the panic index, thereby dynamically adjusting the sensitivity of the panic index to fitness feedback to coordinate the search behavior in different groups, balance the exploration and development process, and improve the overall optimization performance of the algorithm. The time-varying cosine decay formula is shown in equations (2) and (3);

[0043] S34. In the behavior-driven exploration stage, the fitness value of the population is calculated, and the population is sorted in ascending order according to the fitness value. The individuals are divided into three groups according to the proportion. The calm group has a proportion of c=0.15, the flock group has a proportion of h=0.35, and the panic group has a proportion of p=0.5. This stratification reflects the different reactions of individuals in the crowd during the evacuation process. Some people remain calm, some follow group behavior, and some panic.

[0044] S35. In the behavior-driven exploration stage, the position update formula of the algorithm is determined according to the individual groups. The position update formula of the calm group is:

[0045] (9);

[0046] The formula for updating the position of a sheep group is:

[0047] (10);

[0048] The panic group position update formula is:

[0049] (11);

[0050] in, Indicates The individual in The updated position in the dimension, Indicates The individual in The current position in dimensions, , A binary variable generated for Bernoulli distribution, used to control whether to update the current position. This parameter simulates randomness. is the first Levy weight, is the second Levy weight, which is used to dynamically adjust the search step size and give exploration diversity. The Levy weight formula is shown in formula (6). For the current population The center position of the dimension is used to guide individuals to converge to the center. , , is the random perturbation vector generated between the current individual and the center, which is used to introduce local randomness and enhance exploration capabilities. is the panic index. The panic index formula is shown in formula (3). The current population The individual in The position in dimension, An individual randomly selected from the current population is The position in the dimension is used to introduce randomness and avoid premature maturation. is an elite individual randomly selected from the elite pool in the Position in dimension.

[0051] S36. In the orderly escape stage, the elite gravity guidance method is used to improve the individual position update formula. In this stage, all individuals are considered calm, and the focus is shifted to position fine-tuning based on the best solution determined so far. In this stage, the elite pool represents a possible safe exit, and individuals optimize their positions by approaching members of the elite pool, thereby simulating the process of the crowd gradually converging to the best exit. The relevant formula of the elite gravity guidance method is shown in formula (6);

[0052] S37. In the elite screening stage, the fitness value of the new solution is evaluated, and the trace heuristic optimization method is used to integrate historical information and take advantage of the current solution to achieve the inheritance of excellent solutions. The relevant formula of the trace heuristic optimization method is shown in formula (7);

[0053] S38. In the position correction stage, the position is corrected using the following formula to facilitate finding the global optimal solution:

[0054] (12);

[0055] in, Represents an individual location, Represents an individual The new position in this iteration, and Respectively represent individuals Fitness values ​​before and after update;

[0056] S39. Determine whether the maximum number of iterations has been reached. If so, the algorithm stops iterating and decomposes the current optimal solution into three parameters Kp, Ki, and Kd of the PID controller to complete the optimization of the PID parameters. If the maximum number of iterations has not been reached, return to step S30 and continue iterating to further search for a better solution.

[0057] Furthermore, in step S40, the pressure PID controller of the multi-material compatible metallographic sample grinding and polishing control model simulated by MATLAB and Simulink includes: an expected pressure value, a deviation calculation module, a PID controller module, an output control amount module, an execution unit module, a controlled object module and an output pressure value. The pressure PID controller obtains the deviation e(t) between the expected pressure value (target_pressure) and the actual pressure value (actual_pressure) through the deviation calculation module, and outputs the control signal u(t) to the execution unit module using the Kp, Ki, and Kd parameters calculated by the improved escape optimization algorithm, and then sends a command to the controlled object to control the controlled object to quickly adjust the actual pressure value so that the output actual pressure value quickly stabilizes near the expected pressure value. During the simulation, the transfer function of the corresponding system controlled object is selected, which proves the superiority of the improved escape optimization algorithm for PID controller parameter optimization. The transfer function formula is:

[0058] (13);

[0059] In the formula, is the transfer function, is a function variable.

[0060] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0061] Compared with the prior art, the improved multi-material compatible metallographic sample grinding and polishing PID control method provided by the present invention uses the star surge pilot mechanism to initialize the population on the basis of the traditional escape optimization algorithm, effectively expands the search breadth of the algorithm, and significantly improves the diversity of understanding;

[0062] At the same time, by adopting the time-varying cosine attenuation mechanism, introducing the adaptive flexibility factor, combining the elite gravity guidance method to update the individual position, and using the trace-inspired optimization method to improve the diversity and stability of the elite pool update, the algorithm can dynamically balance between global search and local development, and can more efficiently find the global optimal solution. It not only speeds up the efficiency of finding the global optimal solution, but also improves the adjustment accuracy and response speed of the system, significantly enhances the stability and reliability of the system in complex environments, and provides a more sensitive and reliable control strategy for the metallographic sample grinding and polishing system, significantly improving the robustness and adaptability of the system;

[0063] In contrast, although traditional PID control methods and basic escape optimization algorithms provide basic performance, they have the problems of slow convergence, easy to fall into local optimality and limited optimization accuracy, especially when dealing with complex environmental conditions (such as the grinding and polishing process of metallographic specimens with large differences in material properties). The improved multi-material compatible metallographic specimen grinding and polishing PID control method provided by the present invention effectively overcomes these shortcomings through dynamic adjustment and optimization strategies. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 The PID control flow chart of the multi-material compatible metallographic specimen grinding and polishing system is optimized based on the improved escape optimization algorithm.

[0065] Figure 2 This is the model diagram of the pressure PID controller optimized based on the improved escape optimization algorithm.

[0066] Figure 3 This is the block diagram of the multi-material compatible metallographic specimen grinding and polishing control system.

[0067] Figure 4 This is a comparison chart of the optimization of the proportional gain Kp of PID using the improved escape optimization algorithm and the basic escape optimization algorithm.

[0068] Figure 5 This is a comparison chart of the optimization of the integral gain Ki of PID using the improved escape optimization algorithm and the basic escape optimization algorithm.

[0069] Figure 6 This is a comparison chart of the optimization of the differential gain Kd of PID using the improved escape optimization algorithm and the basic escape optimization algorithm.

[0070] Figure 7 A comparison chart of the changes in fitness values ​​during the optimization process of the improved escape optimization algorithm and the basic escape optimization algorithm.

[0071] Figure 8 Comparison chart of control effects of PID optimization using improved escape optimization algorithm and basic escape optimization algorithm. DETAILED DESCRIPTION

[0072] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. It should be noted that the following embodiments are only part of the embodiments of the present invention, not all of them, and are only used to more clearly illustrate the technical solutions of the present invention, but the implementation methods of the present invention are not limited to this. Therefore, based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0073] Please refer to Figures 1 to 8, the present invention provides a technical solution:

[0074] A PID control method for metallographic specimen grinding and polishing based on improved multi-material compatibility is proposed. The method uses an improved escape optimization algorithm to quickly find the optimal PID control parameters of the multi-material compatible metallographic specimen grinding and polishing system, improves the pressure control accuracy, system response speed and stability during the grinding and polishing process, thereby enhancing the adaptability of the metallographic specimen grinding and polishing system to different materials and improving the quality and efficiency of specimen preparation. The specific steps are as follows.

[0075] S10, such as Figure 3 As shown in the figure, a multi-material compatible metallographic specimen grinding and polishing control model based on PID controller is established.

[0076] S20. Improved escape optimization algorithm.

[0077] S30, using the improved escape optimization algorithm to optimize and adjust the parameters of the PID controller, and iteratively obtain the optimal three control parameters Kp, Ki, and Kd.

[0078] S40, simulating the PID control model, applying the optimized grinding and polishing parameters to the PID control model, verifying the control performance and adaptability of the grinding and polishing system under different material conditions, and realizing adaptive control of a multi-material compatible metallographic specimen grinding and polishing system.

[0079] There are four improvements to the algorithm in step S20, and the specific improvements are as follows.

[0080] First, in the population initialization stage, the population position is initialized based on the star surge navigation mechanism. The relevant formula is as follows:

[0081] (1);

[0082] In the formula, For the The individual in Initialization position in dimension, and Respectively represent upper and lower bounds on the dimension parameter, It is a boundary adjustment function used to ensure that the initialized individual is within the legal range. That is, if the individual position exceeds the lower bound, it is adjusted to the lower bound value. If the individual position exceeds the upper limit, it is adjusted to the upper limit value , the individual position within the legal range remains unchanged, The pilot weight is used to control the degree of trust in the guidance path in Xingyong pilot. For the The dimensional navigation vector provides a navigation beacon for individuals in the population, helping them to move quickly to favorable areas. For the The individual in A random variable in dimension, uniformly distributed , used to generate uniform random positions, increase the global exploratory power of the initial population, and avoid over-concentration, is Gaussian noise, which is used to introduce diversity and disturbance to help population individuals maintain dynamic diversity during the initialization stage.

[0083] Second, based on the time-varying cosine attenuation mechanism, an adaptive dynamic factor is introduced , dynamically adjust the sensitivity of the panic index to fitness feedback, guide the search collaboration of individuals in different groups, balance the search behavior, and improve the overall optimization efficiency of the algorithm. The relevant formula is:

[0084] (2);

[0085] (3);

[0086] In the formula, For the The adaptive flexibility factor value of the iteration, To adapt to the benchmark value of the agility factor, it is a fixed value. Current Iteration The standard deviation of the population fitness at , indicates the degree of dispersion of the population. is the maximum value of the fitness standard deviation, is the current iteration number, is the maximum number of iterations, For the current iteration The panic index reflects the degree of confusion in the current crowd behavior. is the minimum value of the panic index, is the maximum value of the panic index, is the fitness value of the current optimal individual, is the average fitness value of the current population, is an exponential function, is the attenuation factor, which controls the attenuation rate.

[0087] Third, use the elite gravity guidance method to update the individual position. The relevant formula is:

[0088] (4);

[0089] (5);

[0090] (6);

[0091] In the formula, is the current dynamic guidance factor value, is the initial dynamic guidance factor value, is the current iteration number, is the maximum number of iterations, For the Levy weights are used to adjust the step size of the individual in each dimension. For the Normal distribution A random variable, is the scale parameter of the Levy distribution, , is the Gamma function, For the Normal distribution A random variable, For the updated The individual in The location of the dimension, For the The individual in The current position in dimension, is the first elite solution vector selected from the elite pool The position of the dimension is used to guide the individual to converge to the optimal solution. is a random selection from the population The individual The location of the dimension, , A binary variable generated by Bernoulli distribution, which determines whether the corresponding dimension is updated. is the first Levy weight, is the second Levy weight, is the disturbance adjustment factor, dynamically controlling the weight of the additional disturbance term, is a random perturbation term, which is introduced to enhance the search capability. is the average individual fitness of the current population, For the The fitness value of each individual, is a random number in the interval [0,1], is a sign function used to control the perturbation direction.

[0092] Fourth, the trace-inspired optimization method is used to improve the diversity and stability of the elite pool update by utilizing the dynamic balance mechanism of the current elite solution and the historical elite solution, combined with time decay disturbance. The relevant formula is:

[0093] (7);

[0094] In the formula, is the current iteration number, is the maximum number of iterations, is the set of top ten solution vectors selected by calculating fitness values ​​in the current elite pool. is the set of top ten solution vectors selected by calculating fitness values ​​in the current iteration. is the set of top ten solution vectors retained in the historical elite pool, is a dynamic balance factor that controls the influence weight of the current solution and the historical solution. is the disturbance control coefficient, which adjusts the amplitude of the disturbance term. is a random perturbation term, which is used to introduce small random changes to the elite solution and increase the diversity of the solution.

[0095] Furthermore, in step S10, the multi-material compatible metallographic sample grinding and polishing control model of the PID controller mainly includes a pressure difference calculation module, an improved escape optimization algorithm module, a pressure control module, a load compensation calculation module, a pressure adjustment module, an abrasive detection module and a speed and pressure detection module;

[0096] Wherein, the pressure difference calculation module is used to calculate the deviation between the target pressure and the actual pressure;

[0097] The improved escape optimization algorithm module optimizes three parameters of the PID controller, and transmits the optimized PID control parameters to the pressure control module to improve the control performance;

[0098] The pressure control module adjusts the pressure control signal according to the pressure error value output by the pressure difference calculation module and transmits it to the load compensation calculation module by using the PID control parameters optimized by the improved escape optimization algorithm module;

[0099] The load compensation calculation module adjusts the pressure signal based on the pressure control signal output by the pressure control module and the system deviation caused by the load change, and outputs the pressure signal to the pressure adjustment module;

[0100] The pressure adjustment module adjusts and controls the output of the final pressure according to the pressure signal of the load compensation calculation module to ensure accurate control of the system pressure;

[0101] The abrasive detection module is used to detect the use of abrasives in real time and provide feedback information on abrasive consumption during grinding and polishing to optimize the pressure control effect;

[0102] The speed and pressure detection module is used to detect the actual speed and pressure output of the motor, feedback key information in the grinding and polishing process, and provide support for the precise adjustment of the grinding and polishing pressure.

[0103] Further, such as Figure 1As shown, in step S30, the specific steps of optimizing the PID controller by using the improved escape optimization algorithm are:

[0104] S31, Initialize the parameters of the improved escape optimization algorithm: Initialize the population position based on the star surge navigation mechanism, and the upper bound of the algorithm search and the lower bound , solution space dimension , population size , the maximum number of iterations of the population ,The relevant formula of the star surge pilot mechanism is shown in formula (1);

[0105] S32, select a fitness function for evaluating the adaptability and performance of the solution in a dynamic environment, and the fitness function formula is:

[0106] (8);

[0107] In the formula, is the time variable, It is the real-time error between the actual pressure and the target pressure of the multi-material compatible metallographic specimen grinding and polishing system. is the instantaneous rate of change of the actual pressure value, is the fitness function value;

[0108] S33. In the behavior-driven exploration stage, based on the time-varying cosine decay mechanism, an adaptive factor is introduced to improve the panic index, thereby dynamically adjusting the sensitivity of the panic index to fitness feedback to coordinate the search behavior in different groups, balance the exploration and development process, and improve the overall optimization performance of the algorithm. The time-varying cosine decay formula is shown in equations (2) and (3);

[0109] S34. In the behavior-driven exploration stage, the fitness value of the population is calculated, and the population is sorted in ascending order according to the fitness value. The individuals are divided into three groups according to the proportion. The calm group has a proportion of c=0.15, the flock group has a proportion of h=0.35, and the panic group has a proportion of p=0.5. This stratification reflects the different reactions of individuals in the crowd during the evacuation process. Some people remain calm, some follow group behavior, and some panic.

[0110] S35. In the behavior-driven exploration stage, the position update formula of the algorithm is determined according to the individual groups. The position update formula of the calm group is:

[0111] (9);

[0112] The formula for updating the position of a sheep group is:

[0113] (10);

[0114] The panic group position update formula is:

[0115] (11);

[0116] in, Indicates The individual in The updated position in the dimension, Indicates The individual in The current position in dimensions, , A binary variable generated for Bernoulli distribution, used to control whether to update the current position. This parameter simulates randomness. is the first Levy weight, is the second Levy weight, which is used to dynamically adjust the search step size and give exploration diversity. The Levy weight formula is shown in formula (6). For the current population The center position of the dimension is used to guide individuals to converge to the center. , , is the random perturbation vector generated between the current individual and the center, which is used to introduce local randomness and enhance exploration capabilities. is the panic index. The panic index formula is shown in formula (3). The current population The individual in The position in dimension, An individual randomly selected from the current population is The position in the dimension is used to introduce randomness and avoid premature maturation. is an elite individual randomly selected from the elite pool in the Position in dimension.

[0117] S36. In the orderly escape stage, the elite gravity guidance method is used to improve the individual position update formula. In this stage, all individuals are considered calm, and the focus is shifted to position fine-tuning based on the best solution determined so far. In this stage, the elite pool represents a possible safe exit, and individuals optimize their positions by approaching members of the elite pool, thereby simulating the process of the crowd gradually converging to the best exit. The relevant formula of the elite gravity guidance method is shown in formula (6);

[0118] S37. In the elite screening stage, the fitness value of the new solution is evaluated, and the trace heuristic optimization method is used to integrate historical information and take advantage of the current solution to achieve the inheritance of excellent solutions. The relevant formula of the trace heuristic optimization method is shown in formula (7);

[0119] S38. In the position correction stage, the position is corrected using the following formula to facilitate finding the global optimal solution:

[0120] (12);

[0121] in, Represents an individual location, Represents an individual The new position in this iteration, and Respectively represent individuals Fitness values ​​before and after update;

[0122] S39. Determine whether the maximum number of iterations has been reached. If so, the algorithm stops iterating and decomposes the current optimal solution into three parameters Kp, Ki, and Kd of the PID controller to complete the optimization of the PID parameters. If the maximum number of iterations has not been reached, return to step S30 and continue iterating to further search for a better solution.

[0123] Further, such as Figure 2 As shown, in the step S40, the pressure PID controller of the multi-material compatible metallographic sample grinding and polishing control model is simulated by using MATLAB and Simulink, and includes: an expected pressure value, a deviation calculation module, a PID controller module, an output control amount module, an execution unit module, a controlled object module and an output pressure value. The pressure PID controller obtains the deviation e(t) between the expected pressure value (target_pressure) and the actual pressure value (actual_pressure) through the deviation calculation module, and outputs the control signal u(t) to the execution unit module using the Kp, Ki, Kd parameters calculated by the improved escape optimization algorithm, and then sends a command to the controlled object to control the controlled object to quickly adjust the actual pressure value so that the output actual pressure value quickly stabilizes near the expected pressure value. During the simulation process, the transfer function of the corresponding system controlled object is selected, which proves the superiority of the improved escape optimization algorithm for PID controller parameter optimization. The transfer function formula is:

[0124] (13);

[0125] In the formula, is the transfer function, is a function variable.

[0126] By analyzing Figure 4 , Figure 5 and Figure 6The performance of the improved escape optimization algorithm and the basic escape optimization algorithm in the process of optimizing PID control parameters shown in the figure shows that the improved escape optimization algorithm can stabilize near the optimal Kp, Ki, and Kd values ​​in fewer iterations than the basic escape optimization algorithm, and achieve the optimal control effect of the model. This shows that the improved version of the algorithm is faster in optimization and convergence speed, while improving the stability of the system. This makes the improved escape optimization algorithm more effective in complex application environments, and can quickly adapt to different conditions and optimize the parameters of the PID controller, significantly improving control accuracy and response performance.

[0127] Fitness values ​​are often used to evaluate the quality of solutions in a population. Generally speaking, the smaller the fitness value of a solution, the higher its quality. Therefore, by analyzing Figure 7 The fitness data of the improved escape optimization algorithm and the basic escape optimization algorithm shown are easy to see. The fitness value of the improved escape optimization algorithm is smaller, and the fitness value of the improved escape optimization algorithm reaches a stable state faster, which shows that the improved escape optimization algorithm can have a better convergence state within a smaller number of iterations, thereby providing faster and more stable optimization performance. Therefore, compared with the basic version, the improved escape optimization algorithm shows obvious advantages in performance.

[0128] from Figure 8 The results show that the overshoot of the PID control system in the improved escape optimization algorithm is significantly lower, and the improved algorithm can track the response more quickly and shorten the iteration time required to reach a stable state. This shows that in a complex environment, the improved escape optimization algorithm can achieve steady-state control more efficiently, show better response speed and control performance, and have stronger robustness. These characteristics enable the algorithm to perform well in the application of multi-material compatible metallographic specimen grinding and polishing systems, effectively improving the efficiency, stability and overall performance of the system.

Claims

1. A PID control method for metallographic specimen grinding and polishing based on improved multi-material compatibility, characterized in that: The specific steps include: S10, establishing a multi-material compatible metallographic sample grinding and polishing control model based on PID controller; S20, improved escape optimization algorithm; S30, optimizing and adjusting the parameters of the PID controller using the improved escape optimization algorithm, and iteratively obtaining the optimal three control parameters Kp, Ki, and Kd; S40, simulating the PID control model, applying the optimized grinding and polishing parameters to the PID control model, verifying the control performance and adaptability of the grinding and polishing system under different material conditions, and realizing adaptive control of the multi-material compatible metallographic sample grinding and polishing system; Step S20 includes: S21. In the population initialization stage, the population position is initialized based on the star surge navigation mechanism. The relevant formula is as follows: (1); In the formula, For the The individual in Initialization position in dimension, and Respectively represent upper and lower bounds on the dimension parameter, is the boundary adjustment function, The pilot weight is used to control the degree of trust in the guidance path in Xingyong pilot. For the dimensional navigation vector, For the The individual in A random variable in dimension, uniformly distributed , increase the global exploratory power of the initial population and avoid over-concentration, is Gaussian noise; S22, based on the time-varying cosine attenuation mechanism, introduces the adaptive dynamic factor , dynamically adjust the sensitivity of the panic index to fitness feedback, guide the search collaboration of individuals in different groups, balance the search behavior, and improve the overall optimization efficiency of the algorithm. The relevant formula is: (2); (3); In the formula, For the The adaptive flexibility factor value of the iteration, To adapt to the benchmark value of the agility factor, it is a fixed value. Current Iteration The standard deviation of the population fitness at , indicates the degree of dispersion of the population. is the maximum value of the fitness standard deviation, is the current iteration number, is the maximum number of iterations, For the current iteration The panic index reflects the degree of confusion in the current crowd behavior. is the minimum value of the panic index. is the maximum value of the panic index, is the fitness value of the current optimal individual, is the average fitness value of the current population, is an exponential function, is the attenuation factor, which controls the attenuation rate.

2. The improved multi-material compatible metallographic sample grinding and polishing PID control method according to claim 1 is characterized in that: Step S20 also includes: S23. Use the elite gravity guidance method to update the individual position. The relevant formula is: (4); (5); (6); In the formula, , are the current dynamic guidance factor and the initial dynamic guidance factor values, respectively. is the current iteration number, is the maximum number of iterations, is the Levy weight, , is a random variable, is the scale parameter, , is the gamma function, For the updated individual No. The location of the dimension, For individuals No. The current position in dimension, is the first elite solution vector selected from the elite pool The location of the dimension, is a random selection from the population The individual The location of the dimension, , A binary variable generated from a Bernoulli distribution, , are two Levy weights, is the disturbance adjustment factor, is the random disturbance term, is the average individual fitness of the current population, For individuals The fitness value of is a random number in the interval [0,1], is a sign function used to control the perturbation direction; S24. Using the trace-inspired optimization method, the diversity and stability of the elite pool update are improved by utilizing the dynamic balance mechanism of the current elite solution and the historical elite solution, combined with time decay disturbance. The relevant formula is: (7); In the formula, is the current iteration number, is the maximum number of iterations, , , are the sets of the top ten solution vectors selected by calculating the fitness values ​​in the current elite pool, the current iteration, and the historical elite pool. is the dynamic balance factor, is the disturbance control coefficient, is a random disturbance term.

3. The improved multi-material compatible metallographic sample grinding and polishing PID control method according to claim 1 is characterized in that: In step S10, the multi-material compatible metallographic sample grinding and polishing control model of the PID controller mainly includes a pressure difference calculation module, an improved escape optimization algorithm module, a pressure control module, a load compensation calculation module, a pressure adjustment module, an abrasive detection module and a speed and pressure detection module; Wherein, the pressure difference calculation module is used to calculate the deviation between the target pressure and the actual pressure; The improved escape optimization algorithm module optimizes three parameters of the PID controller, and transmits the optimized PID control parameters to the pressure control module to improve the control performance; The pressure control module adjusts the pressure control signal according to the pressure error value output by the pressure difference calculation module and transmits it to the load compensation calculation module by using the PID control parameters optimized by the improved escape optimization algorithm module; The load compensation calculation module adjusts the pressure signal based on the pressure control signal output by the pressure control module and the system deviation caused by the load change, and outputs the pressure signal to the pressure adjustment module; The pressure adjustment module adjusts and controls the output of the final pressure according to the pressure signal of the load compensation calculation module to ensure accurate control of the system pressure; The abrasive detection module is used to detect the use of abrasives in real time and provide feedback information on abrasive consumption during grinding and polishing to optimize the pressure control effect; The speed and pressure detection module is used to detect the actual speed and pressure output of the motor, feedback key information in the grinding and polishing process, and provide support for the precise adjustment of the grinding and polishing pressure.

4. The improved multi-material compatible metallographic sample grinding and polishing PID control method according to claim 1 is characterized in that: Step S30 includes: S31. Initialize and improve the parameters of the escape optimization algorithm: Initialize the population position based on the star surge navigation mechanism, and the upper bound of the algorithm search and lower bound , solution space dimension , population size , the maximum number of iterations of the population ,The relevant formula of the star surge pilot mechanism is shown in formula (1); S32, select a fitness function for evaluating the adaptability and performance of the solution in a dynamic environment, the fitness function formula is: (8); In the formula, is the time variable, It is the real-time error between the actual pressure and the target pressure of the multi-material compatible metallographic specimen grinding and polishing system. is the instantaneous rate of change of the actual pressure value, is the fitness function value; S33. In the behavior-driven exploration stage, based on the time-varying cosine decay mechanism, an adaptive factor is introduced to improve the panic index, thereby dynamically adjusting the sensitivity of the panic index to fitness feedback to coordinate the search behavior in different groups, balance the exploration and development process, and improve the overall optimization performance of the algorithm. The time-varying cosine decay formula is shown in equations (2) and (3); S34. In the behavior-driven exploration stage, the fitness value of the population is calculated, and the population is sorted in ascending order according to the fitness value. The individuals are divided into three groups according to the proportion. The calm group has a proportion of c=0.15, the flock group has a proportion of h=0.35, and the panic group has a proportion of p=0.

5. This stratification reflects the different reactions of individuals in the crowd during the evacuation process. Some people remain calm, some follow group behavior, and some panic.

5. The improved multi-material compatible metallographic sample grinding and polishing PID control method according to claim 4 is characterized in that: Step S30 also includes: S35. In the behavior-driven exploration stage, the position update formula of the algorithm is determined according to the individual groups. The position update formula of the calm group is: (9); The formula for updating the position of a sheep group is: (10); The panic group position update formula is: (11); in, Indicates The individual in The updated position in the dimension, Indicates The individual in The current position in dimensions, , A binary variable generated for Bernoulli distribution, used to control whether to update the current position. This parameter simulates randomness. is the first Levy weight, is the second Levy weight, which is used to dynamically adjust the search step size and give exploration diversity. The Levy weight formula is shown in formula (6). For the current population The center position of the dimension is used to guide individuals to converge to the center. , , is the random perturbation vector generated between the current individual and the center, which is used to introduce local randomness and enhance exploration capabilities. is the panic index. The panic index formula is shown in formula (3). The current population The individual in The position in dimension, An individual randomly selected from the current population is The position in the dimension is used to introduce randomness and avoid premature maturation. is an elite individual randomly selected from the elite pool in the Position in dimension.

6. The improved multi-material compatible metallographic sample grinding and polishing PID control method according to claim 5 is characterized in that: Step S30 also includes: S36. In the orderly escape stage, the elite gravity guidance method is used to improve the individual position update formula. In this stage, all individuals are considered calm, and the focus is shifted to position fine-tuning based on the best solution determined so far. In this stage, the elite pool represents a possible safe exit, and individuals optimize their positions by approaching members of the elite pool, thereby simulating the process of the crowd gradually converging to the best exit. The relevant formula of the elite gravity guidance method is shown in formula (6); S37. In the elite screening stage, the fitness value of the new solution is evaluated, and the trace heuristic optimization method is used to integrate historical information and take advantage of the current solution to achieve the inheritance of excellent solutions. The relevant formula of the trace heuristic optimization method is shown in formula (7); S38. In the position correction stage, the position is corrected using the following formula to facilitate finding the global optimal solution: (12); in, Represents an individual location, Represents an individual The new position in this iteration, and Respectively represent individuals Fitness values ​​before and after update; S39. Determine whether the maximum number of iterations has been reached. If so, the algorithm stops iterating and decomposes the current optimal solution into three parameters Kp, Ki, and Kd of the PID controller to complete the optimization of the PID parameters. If the maximum number of iterations has not been reached, return to step S30 and continue iterating to further search for a better solution.

7. The improved multi-material compatible metallographic sample grinding and polishing PID control method according to claim 1 is characterized in that: In step S40, MATLAB and Simulink are used to simulate the PID control model of the multi-material compatible metallographic sample grinding and polishing system.

Citation Information

Patent Citations

  • PID controller optimization method based on dragonfly algorithm

    CN107703751A

  • Optimal robustness control method based on improved PID

    CN116627027A