An integrated PLC data acquisition and process control system
By improving the position update method and fitness function of the sparrow search algorithm and optimizing the PID parameter tuning, the problems of slow convergence speed and easy getting trapped in local optima in the existing technology are solved, and faster PID parameter tuning and better automatic control effect are achieved.
Patent Information
- Application Number
- CN202410432384.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-11
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-04-11
AI Technical Summary
Existing sparrow search algorithms in PLC data acquisition and process control systems suffer from problems such as slow convergence speed, susceptibility to local optima, sensitivity to parameter settings, and lack of adaptability, resulting in the algorithm being inflexible and ineffective in certain situations.
The position update method and follower position update formula of the sparrow search algorithm are improved by using the proportional, integral and derivative coefficients of the PID controller as optimization variables, and combining the system overshoot and settling time as fitness functions to optimize the position update of the discoverer and follower, thereby improving the adaptability and robustness of the algorithm.
It improves the real-time speed and adaptability of PID parameter tuning, enhances the automation control effect of PLC system in coal mining machinery, avoids the algorithm getting stuck in local optima, and improves the optimization speed.
Smart Images

Figure CN118331164B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of coal mining, and in particular relates to an integrated PLC data acquisition and process control system. Background Art
[0002] In the coal mining industry, the degree of automated production is getting higher and higher. Mining machinery needs to monitor and accurately control the operating status of the machinery through programming to ensure the safe and stable operation of the machinery. PLC (Programmable Logic Controller) technology plays a core role in coal mining machinery, realizing the automated control of the coal mining process. For example, the adjustment of parameters such as the cutting speed and depth of the coal mining machine is achieved through PLC, which improves the coal mining efficiency. During the coal transportation process, the PLC control system can realize the automated control of the conveyor, including start, stop, speed adjustment and other functions.
[0003] In the PLC control process, PID parameter tuning is very important. The steps of PID tuning are as follows: Ensure that the prerequisites are met: Check whether the feedback signal is stable, whether the actuator is normal, and whether the positive and negative effects of the controller are set correctly. Initialize the parameters, start to gradually increase the proportional gain, and observe its impact on the control process. The proportional coefficient Kp has a direct impact on the control effect. Increasing Kp will enhance the proportional action, speed up the dynamic response of the system, and enhance the ability to eliminate errors, but may cause the overshoot to increase; reducing Kp will weaken the proportional action, slow down the dynamic response of the system, but the stability may increase. When the process variable reaches the given value and fluctuates around the given value, adjust the adjusted proportional coefficient to 50% to 80%, and then start to reduce the integral time from large to small until the process value is equal to or infinitely close to the set value. The integral time Ti also affects the control effect. A reasonable integral time can eliminate steady-state errors, but too strong an integral action may lead to integral saturation and cause system oscillation. After the proportional and integral actions are adjusted to satisfaction, the differential action is introduced to reflect the rate of change of the system deviation signal to achieve an advanced control effect. The selection of differential time Td will also affect the control effect and needs to be adjusted repeatedly according to actual conditions.
[0004] Since PID tuning is a process of trial and error, it may be necessary to make multiple adjustments according to the actual situation to achieve a satisfactory control effect. At the same time, it is also necessary to consider whether the PID sampling time is suitable for the current system, because signal changes shorter than the sampling time interval cannot be measured. Therefore, swarm intelligence algorithms such as sparrow search algorithms are usually used for tuning.
[0005] Although the existing sparrow search algorithm shows high efficiency and accuracy in solving optimization problems, it still has some problems and challenges. For example, it has slow convergence speed, is easy to fall into local optimum, is sensitive to parameter settings, lacks adaptability, and lacks the ability to adaptively adjust the search strategy according to the characteristics of the problem and the progress of the search. This may make the algorithm not flexible and effective in some cases.
[0006] Therefore, it is necessary to overcome these problems, improve and optimize the sparrow search algorithm, and improve the adaptability and robustness of the algorithm to adapt to different problems and scenarios. Summary of the invention
[0007] In view of this, the object of the present invention is to use an improved sparrow search algorithm to adjust the PID parameters of the PLC data acquisition and process control system to improve the adaptability and robustness of the algorithm. The improved sparrow search algorithm optimizes the position update mode of the finder and the position update mode of the follower to avoid the algorithm falling into the local optimum.
[0008] To achieve the above-mentioned purpose, the integrated PLC data acquisition and process control system disclosed in the present application includes a digital input module, a display, a D / A conversion module, a power module, a sensor and a frequency converter, and a PLC controller. The PLC controller is used to collect real-time data of the PLC module from each sensor and provide service support for storing, distributing and querying the real-time data of the sensor; the digital input module, the display, the D / A conversion module, the power module, the sensor and the frequency converter are electrically connected to the PLC controller respectively, and the sensor includes a temperature sensor, a current sensor, a pressure sensor, a gas sensor, a displacement sensor and an inclination sensor, wherein the PID tuning process of the PLC controller is configured as follows:
[0009] The proportional, integral and differential coefficients of the PID controller are used as optimization variables, and the overshoot and adjustment time of the system are used as the fitness function of the sparrow search algorithm;
[0010] Set the initial parameters of the sparrow search algorithm, including population size, number of iterations, and search space range;
[0011] In each iteration, the algorithm evaluates the performance of the current parameter combination according to the fitness function and updates the parameter values based on the search strategy of swarm intelligence;
[0012] As iterations proceed, a better combination of PID parameters is gradually found; after each parameter update, the system performance is re-evaluated;
[0013] Termination condition and result output: When the maximum number of iterations is reached, the algorithm stops iterating and outputs the final PID parameter tuning results.
[0014] Furthermore, the position update formula of the follower is:
[0015]
[0016] in, represents the optimal position of the sparrow in the dth dimension at the t+1th iteration, represents the position of the i-th sparrow in the d-th dimension at the t-th iteration, represents the global worst position at the tth iteration, the polar angle θ = 360 / i, a is the quotient of the difference between the upper and lower bounds of the search space and the number of iterations t, A + =A T (AA T )- 1 , A represents a 1×d matrix, in which the elements are randomly assigned 1 or -1.
[0017] Furthermore, the sparrows whose fitness improvement is greater than a preset threshold are also selected as discoverers, together with the sparrows whose fitness values of the number of PDs are in the top ranks in each iteration.
[0018] Furthermore, the finder's position update formula is as follows:
[0019]
[0020] Among them, t represents the current iteration number, represents the position of the i-th sparrow in the t+1th generation in the d-th dimension, is the position of the i-th sparrow in the d-th dimension in the t-th iteration, T represents the maximum number of iterations, ST∈[0.5,1] is the preset population safety value, α is a random number uniformly distributed between (0,1], Q is a random number that obeys the standard normal distribution, L represents a 1×d matrix with all elements being 1, R is the warning value, w t is the inertia weight of the tth iteration.
[0021] Furthermore, w t The calculation is as follows:
[0022]
[0023] Among them, n t is the number of sparrows whose fitness improvement in the t-th iteration is greater than the preset threshold compared with the t-1th iteration, I iter is the maximum number of iterations, and PD is the number of sparrows after the fitness values are arranged from large to small.
[0024] The beneficial effects of this application are as follows:
[0025] The sparrow search algorithm is used in the PID tuning process of the PLC system. The sparrows whose fitness improvement is greater than a preset threshold in the two rounds of iterations of the sparrow algorithm are also used as discoverers, which increases the number of discoverers and the optimization speed. Hyperbolic spiral weighting is performed in the follower position update calculation formula of the present application, so that a part of the followers are far enough away from the discoverer position to avoid falling into the local optimum. By improving the sparrow search algorithm, the real-time speed of PID tuning is improved, which is better adapted to the automated control of coal mining machinery. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 The framework diagram of the present invention;
[0027] Figure 2 Image of a double helix curve. DETAILED DESCRIPTION
[0028] The present invention is further described below in conjunction with the accompanying drawings, but the present invention is not limited in any way. Any changes or substitutions made based on the teachings of the present invention belong to the protection scope of the present invention.
[0029] The swarm intelligence optimization algorithm is a search process that simulates groups of animals or things. The swarm optimization algorithm simulates individuals in various animal groups by designing a massless particle. The individual has only two attributes: speed and position. The speed represents the speed of movement, and the position represents the direction of movement. Each individual searches for the optimal solution in the search space separately, and records it as the current individual extreme value, and shares the individual extreme value with other individuals in the entire group, and finds the optimal individual extreme value as the current global optimal solution for the entire group.
[0030] Before introducing the embodiments of the present application, some terms involved in the present application are explained. The sparrow search algorithm is a swarm intelligence optimization algorithm that simulates the foraging mechanism of sparrows. The finder looks for a location with sufficient food in the search area and guides the direction for the followers. In each round of iteration, the sparrow that finds a better location can become the finder, but the proportion of finders in the group is fixed.
[0031] The finder's position update formula is as follows:
[0032]
[0033] Where t represents the current number of iterations, T represents the maximum number of iterations, ST∈[0.5,1] is the preset population safety value, α is a random number uniformly distributed between (0,1], Q is a random number that obeys the standard normal distribution, L represents a 1×d matrix with all elements being 1, and R is the warning value. is the position of the i-th sparrow in the d-th dimension in the t-th iteration.
[0034] The follower's position update formula is:
[0035]
[0036] in, Indicates the current optimal position found by the finder, Indicates the current global worst position. A + =A T (AA T ) -1 , A represents a 1×d matrix, in which the elements are randomly assigned 1 or -1.
[0037] The technical solution provided in the embodiments of the present application relates to intelligent algorithm technology, which is specifically introduced and explained through the following embodiments.
[0038] Please refer to Figure 1 The integrated PLC data acquisition and process control system provided in the embodiment of the present application includes a digital input module, a display, a D / A conversion module, a power module, a sensor, a frequency converter and a PLC controller. The PLC controller is used to collect real-time data of the PLC module from each sensor and provide service support for storing, distributing and querying the real-time data of the sensor; the digital input module, the display, the D / A conversion module, the power module, the sensor and the frequency converter are electrically connected to the PLC controller respectively, and the sensors include temperature sensors, current sensors, pressure sensors, gas sensors, displacement sensors and inclination sensors.
[0039] Temperature sensors are used to monitor the temperature of the coal mining machine motor to avoid damage caused by overheating. They are installed at the cooling water inlet and outlet and inside the oil tank to monitor temperature changes in real time.
[0040] The current sensor is installed on the traction motor of the coal mining machine to monitor the current changes of the motor and thus determine the load condition and operating status of the motor.
[0041] Pressure sensors are used to monitor pressure changes in hydraulic waterways, oil cylinders and other components to ensure the normal operation of the hydraulic system of the coal mining machine. They are installed on both sides of key oil circuits and oil cylinders.
[0042] Gas sensors are used to monitor the gas concentration in the working environment of coal mining machines to ensure operational safety. When the gas concentration exceeds the safety threshold, the sensor will send out an alarm signal to remind the operator to take timely measures.
[0043] The displacement sensor is based on the principle of linear differential transformer and is installed inside the cylinder to monitor the extension and contraction of the cylinder to determine the position and posture of the coal mining machine.
[0044] The inclination sensor is used to measure the inclination change of the coal mining machine's rocker arm and other components relative to the horizontal plane to ensure that the coal mining machine maintains a stable posture during operation.
[0045] These sensors collect data and transmit it to the PLC controller to achieve precise control and status monitoring of the coal mining machine. At the same time, according to the changes in sensor data, the PLC controller can promptly detect and deal with potential safety hazards to ensure the safe operation of the coal mining machine.
[0046] The transfer function of the shearer when mining coal:
[0047]
[0048] Y1, y2, y3 are the depth parameters of the drill bit in the x-axis, y-axis and z-axis respectively, v1, v2, v3 are the cutting speeds of the drill bit in the x-axis, y-axis and z-axis respectively, and L is the comprehensive parameter of the coal mining machine. The determination of the comprehensive parameter L requires the use of PID to adjust and set so that its operating performance is stable in a steady state, but it will have some overshoot in the transient state. Therefore, its adjustment is relatively complicated and needs to be adjusted by a heuristic intelligent algorithm. In this application, the overshoot and adjustment time of the system are used as the fitness of the sparrow search algorithm.
[0049] In one embodiment, as the number of iterations increases, the present application uses a hyperbolic spiral acosθ / θ to perform weighted updates on the follower position, balancing the global and local searches of the algorithm. Figure 2 It can be seen from the hyperbolic spiral that most of the points are in the center and a few points are far away from the center. Therefore, it can prevent a small number of followers from falling into the local optimum and jumping to the global area.
[0050] The follower's position update formula is:
[0051]
[0052] in, represents the optimal position of the sparrow in the dth dimension at the t+1th iteration, represents the position of the i-th sparrow in the d-th dimension at the t-th iteration, represents the global worst position at the tth iteration, the polar angle θ = 360 / i, a is the quotient of the difference between the upper and lower bounds of the search space and the number of iterations t,
[0053] A + =A T (AA T ) -1 , A represents a 1×d matrix, in which the elements are randomly assigned 1 or -1.
[0054] During the population iteration process, if the global search capability is too strong, the algorithm will have poor convergence. If the local development capability is too strong, the algorithm will fall into the local optimum and cannot converge to the optimal value. Therefore, the balance between exploration and development of the swarm intelligence algorithm is very important.
[0055] In the prior art, in each iteration, sparrows with fitness values in the top PD number are selected as discoverers. However, there are some situations where the followers have a large fitness increase in the next iteration, and it is very likely that these sparrows are close to the optimal solution. Therefore, in one embodiment, the present application selects sparrows with a large fitness increase as discoverers, together with the sparrows with fitness values in the top PD number in each iteration. Therefore, in each iteration of the present application, the number of discoverers is not fixed, and can be equal to PD or greater than PD, which improves the quality of the searcher. The selection criteria are not based solely on the absolute value of the sparrow's fitness, but also on the improvement of the sparrow's fitness.
[0056] In one embodiment, the present application calculates the finder's location update as follows:
[0057] The finder's position update formula is as follows:
[0058]
[0059] Among them, t represents the current iteration number, represents the position of the i-th sparrow in the t+1th generation in the d-th dimension, is the position of the i-th sparrow in the d-th dimension in the t-th iteration, T represents the maximum number of iterations, ST∈[0.5,1] is the preset population safety value, α is a random number uniformly distributed between (0,1], Q is a random number that obeys the standard normal distribution, L represents a 1×d matrix with all elements being 1, R is the warning value, w t is the inertia weight of the tth iteration, calculated as follows:
[0060]
[0061] Among them, n t is the number of sparrows whose fitness improvement in the t-th iteration is greater than the preset threshold compared with the t-1th iteration, I iter is the maximum number of iterations, and PD is the number of sparrows after the fitness values are arranged from large to small.
[0062] Compared with the prior art, the present invention has the following beneficial effects:
[0063] The present application applies the sparrow search algorithm to the PID tuning process of the PLC system, and regards the sparrows whose fitness improvement is greater than a preset threshold in the two rounds of iterations of the sparrow algorithm as finders, thereby increasing the number of finders and improving the optimization speed; the present application uses hyperbolic spiral weighting in the follower position update calculation formula, so that a part of the followers are sufficiently far away from the finder position to avoid falling into the local optimum. By improving the sparrow search algorithm, the real-time speed of PID tuning is improved, which is better adapted to the automated control of coal mining machinery.
[0064] As used herein, the word "preferred" is intended to be used as an example, instance, or illustration. Any aspect or design described herein as "preferred" is not necessarily to be construed as being more advantageous than other aspects or designs. On the contrary, the use of the word "preferred" is intended to present concepts in a specific way. The term "or" as used in this application is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless otherwise specified or clear from the context, "X uses A or B" means any one of the naturally included permutations. That is, if X uses A; X uses B; or X uses both A and B, then "X uses A or B" is satisfied in any of the foregoing examples.
[0065] Moreover, although the present disclosure has been shown and described with respect to one or implementations, those skilled in the art will think of equivalent variations and modifications based on the reading and understanding of this specification and the accompanying drawings. The present disclosure includes all such modifications and variations, and is limited only by the scope of the appended claims. In particular, with respect to the various functions performed by the above-mentioned components (such as elements, etc.), the terms used to describe such components are intended to correspond to any component (unless otherwise indicated) that performs the specified function of the component (such as it is functionally equivalent), even if the structure is not equivalent to the disclosed structure of the function in the exemplary implementation of the present disclosure shown herein. In addition, although the specific features of the present disclosure have been disclosed with respect to only one of several implementations, such features can be combined with one or other features of other implementations that may be desired and advantageous for a given or specific application. Moreover, insofar as the terms "including", "having", "containing" or their variations are used in specific embodiments or claims, such terms are intended to be included in a manner similar to the term "comprising".
[0066] The functional units in the embodiments of the present invention may be integrated into a processing module, or each unit may exist physically separately, or multiple or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc. The above-mentioned devices or systems may execute the storage method in the corresponding method embodiment.
[0067] To sum up, the above embodiment is an implementation mode of the present invention, but the implementation mode of the present invention is not limited by the embodiment. Any other changes, modifications, substitutions, combinations, and simplifications that deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. An integrated PLC data acquisition and process control system, comprising a digital input module, a display, a D / A conversion module, a power module, a sensor and a frequency converter, characterized in that: It also includes: a PLC controller, which is used to collect real-time data of the PLC module from each sensor, and to provide service support for storing, distributing and querying the real-time data of the sensor; a digital input module, a display, a D / A conversion module, a power module, a sensor and a frequency converter are electrically connected to the PLC controller respectively, and the sensor includes a temperature sensor, a current sensor, a pressure sensor, a gas sensor, a displacement sensor and an inclination sensor, wherein the PID tuning process of the PLC controller is configured as follows: The proportional, integral and differential coefficients of the PID controller are used as optimization variables, and the overshoot and adjustment time of the system are used as the fitness function of the sparrow search algorithm; Set the initial parameters of the sparrow search algorithm, including population size, number of iterations, and search space range; In each iteration, the algorithm evaluates the performance of the current parameter combination according to the fitness function and updates the parameter values based on the search strategy of swarm intelligence; As iterations proceed, a better combination of PID parameters is gradually found; after each parameter update, the system performance is re-evaluated; Termination condition and result output: When the maximum number of iterations is reached, the algorithm stops iterating and outputs the final PID parameter tuning result; Among them, the follower's position update formula is: in, represents the optimal position of the sparrow in the dth dimension at the t+1th iteration, represents the position of the i-th sparrow in the d-th dimension at the t-th iteration, represents the global worst position at the tth iteration, the polar angle θ = 360 / i, a is the quotient of the difference between the upper and lower bounds of the search space and the number of iterations t, A + =A T (AA T ) -1 , A represents a 1×d matrix whose elements are randomly assigned to 1 or -1; L represents a 1×d matrix whose elements are all 1.
2. The integrated PLC data acquisition and process control system according to claim 1 is characterized in that: Sparrows whose fitness improvement is greater than a preset threshold are also considered discoverers, together with the sparrows whose fitness values are at the top of the list in terms of the number of PDs selected in each iteration.
3. The integrated PLC data acquisition and process control system according to claim 1 is characterized in that: The finder's position update formula is as follows: Where t represents the current iteration number, represents the position of the i-th sparrow in the t+1th generation in the d-th dimension, is the position of the i-th sparrow in the d-th dimension in the t-th iteration, T represents the maximum number of iterations, ST∈[0.5,1] is the preset population safety value, α is a random number uniformly distributed between (0,1], Q is a random number that obeys the standard normal distribution, L represents a 1×d matrix with all elements being 1, R is the warning value, w t is the inertia weight of the tth iteration.
4. The integrated PLC data acquisition and process control system according to claim 3 is characterized in that: w t The calculation is as follows: Among them, n t is the number of sparrows whose fitness improvement in the t-th iteration is greater than the preset threshold compared with the t-1th iteration, I iter is the maximum number of iterations, and PD is the number of sparrows before PD after the fitness values are arranged from large to small.
Citation Information
Patent Citations
Optimization control algorithm of chilled water system
CN113124552A
PID parameter optimization method based on improved sparrow algorithm
CN114397807A
PID parameter setting method, system and device and storage medium
CN114637190A
Parameter setting method of linear active disturbance rejection controller based on sparrow search algorithm
CN115032897A
Spherical amphibious robot path planning method based on improved sparrow search algorithm
CN116795098A
