Method and device for automatically adjusting PID (Proportion Integration Differentiation) control parameters of motor of swing gate machine
By automatically adjusting PID control parameters based on acceleration and vibration frequency in the swing gate, the problem of time-consuming and labor-intensive adjustment of PID parameters in the existing technology is solved, and rapid parameter adjustment in different environments is achieved, and the accuracy of the motor is improved. stability.
Patent Information
- Application Number
- CN202410952016.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-11-12
Smart Images

Figure CN118944526A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of motor control technology, and in particular to a method and device for automatically adjusting motor PID control parameters of a swing gate. Background Art
[0002] The proportional-integral-differential (PID) control algorithm is the most commonly used control algorithm in motor control systems. Achieving a smooth and accurate servo motor requires an excellent set of PID control parameters, but it is difficult to adjust the three parameters of the PID control algorithm. It requires rigorous simulation and experienced engineers to continuously adjust the parameters in actual development to finally complete the adjustment of the optimal parameters for this environment.
[0003] PID simulation is an effective method to verify and optimize the performance of PID controller. Through simulation, PID parameters can be adjusted and optimized without affecting the actual system, but first it is necessary to establish a mathematical model for the controlled object and determine the three parameters of the PID controller, kp, ki, and kd. Through the simulation results, observe the response curve of the system and make adjustments according to the response characteristics of the system until a satisfactory control effect is achieved.
[0004] In actual product development, it is difficult to achieve the desired effect only through simulation. Engineers with rich engineering experience are required to make empirical adjustments based on the specific environment. The adjustment method is not universal and requires high engineering experience from engineers. In particular, for swing gates of different weights, different PID parameters need to be adjusted and adopted, which will take a lot of time. Summary of the invention
[0005] The present application provides a method and device for automatically adjusting the motor PID control parameters of a swing gate machine, so as to solve the defect that the PID parameter adjustment in the prior art is time-consuming and labor-intensive.
[0006] In a first aspect, the present application provides a method for automatically adjusting motor PID control parameters of a swing gate machine, comprising: Determine the moment of inertia of the swing gate machine based on the acceleration of the swing gate machine under the reference current; Based on the moment of inertia of the swing gate machine, determining a first proportional integral differential PID control parameter; Based on the vibration amplitude and vibration frequency of the swing gate machine, the first PID control parameter is adjusted to obtain the second PID control parameter.
[0007] Optionally, before determining the moment of inertia of the swing gate machine based on the acceleration of the swing gate machine under the reference current, the method further includes: Collecting operation data of the motor rotating under the reference current; filtering the operating data to obtain filtered data; Perform linear regression on the filtered data to obtain the acceleration of the swing gate machine under the reference current.
[0008] Optionally, determining the moment of inertia of the swing gate machine based on the acceleration of the swing gate machine under the reference current includes: Obtaining the acceleration and corresponding moment of inertia of swing gate machines of different weights and different areas under the reference current; Determining a first corresponding relationship between the acceleration and the moment of inertia based on the acceleration and the corresponding moment of inertia under the reference current; Based on the acceleration and the first corresponding relationship, the moment of inertia of the swing gate machine is determined.
[0009] Optionally, the first PID control parameter is adjusted based on the vibration amplitude and vibration frequency of the swing gate to obtain the second PID control parameter, including: Determine a second corresponding relationship between the adjustment range of the proportional parameter, the integral parameter and the differential parameter in the first PID control parameter and the vibration amplitude and vibration frequency change of the swing gate machine; Based on the second corresponding relationship, the first PID control parameter is adjusted to obtain the second PID control parameter.
[0010] Optionally, the method further comprises: Determine the vibration amplitude and vibration frequency of the swing gate machine under the second PID control parameters; Verify whether the vibration amplitude and vibration frequency under the second PID control parameter meet the preset conditions.
[0011] Optionally, the method further comprises: When the preset condition is not met, determining the deviation between the vibration amplitude and the vibration frequency under the second PID control parameter and the preset condition; When the deviation is greater than a preset threshold, adjusting the proportional parameter, integral parameter and differential parameter in the second PID control parameter; When the deviation is less than or equal to the preset threshold, a proportional parameter in the second PID control parameter is adjusted.
[0012] In a second aspect, the present application also provides a device for automatically adjusting motor PID control parameters of a swing gate machine, comprising: A first determination module is used to determine the moment of inertia of the swing gate machine based on the acceleration of the swing gate machine under the reference current; A second determination module is used to determine a first proportional integral differential PID control parameter based on the moment of inertia of the swing gate machine; The adjustment module is used to adjust the first PID control parameter based on the vibration amplitude and vibration frequency of the swing gate to obtain the second PID control parameter.
[0013] In a third aspect, the present application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the program.
[0014] In a fourth aspect, the present application further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0015] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which implements the method described in the first aspect when executed by a processor.
[0016] The present application provides a method and device for automatically adjusting the motor PID control parameters of a swing gate machine, which automatically adjusts the PID control parameters through the vibration amplitude and vibration frequency of the swing gate machine to obtain the target parameters, and can dynamically adjust the proportional coefficient, integral coefficient, and differential coefficient of the PID suitable for the swing gate machine under different environments. Moreover, by providing a roughly similar PID coefficient given by the estimated moment of inertia after startup, and by adjusting in the direction of gradient descent through the PID adjustment rule, a suitable position loop PID parameter can be quickly adjusted to meet the swing gate machine's requirements for accurate and stable motor stops, effectively improving applicability and reducing time costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 It is a flow chart of a method for automatically adjusting the motor PID control parameters of a swing gate provided by the present application; Figure 2 It is a schematic diagram of a flow chart of determining the moment of inertia of a swing gate machine based on the acceleration of the swing gate machine under a reference current provided by the present application; Figure 3 It is a flow chart of determining the second corresponding relationship between the adjustment range of the proportional parameter, the integral parameter and the differential parameter in the first PID control parameter provided by the present application and the vibration amplitude and the vibration frequency change of the swing gate machine; Figure 4It is a flow chart of the second PID control parameter adjustment provided by the present application; Figure 5 It is a structural schematic diagram of the motor PID control parameter automatic adjustment device of the swing gate provided by the present application; Figure 6 It is a schematic diagram of the structure of the electronic device provided by this application. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0020] Figure 1 This is a flow chart of the method for automatically adjusting the motor PID control parameters of the swing gate provided by this application. Figure 1 The embodiment of the present application provides a method for automatically adjusting the motor PID control parameters of a swing gate machine, the execution subject of which may be an electronic device, for example, a controller, and the method may include: Step 110, determining the moment of inertia of the swing gate machine based on the acceleration of the swing gate machine under the reference current; Step 120: Determine a first proportional integral differential PID control parameter based on the moment of inertia of the swing gate machine; Step 130: Based on the vibration amplitude and vibration frequency of the swing gate machine, adjust the first PID control parameter to obtain the second PID control parameter.
[0021] In step 110, the controller can determine the moment of inertia of the swing gate by determining the corresponding relationship between acceleration and moment of inertia. Specifically, a reference current (usually the rated current) is given to make the swing gate stably run for a distance. The controller can obtain position, speed, current, voltage and other data during a period of time when the current is stable through the sensor. Then filter the data to remove some abnormal points in the collected data. And analyze the collected data to obtain acceleration, conduct multiple experiments to determine the acceleration that can be generated by the reference current, and actually measure the moment of inertia of the gate, and finally obtain the corresponding relationship between acceleration and moment of inertia under the reference current.
[0022] In step 120, the relationship between the moment of inertia and an estimated PID parameter can be determined through empirical analysis and actual measurement. Then, based on the moment of inertia of the current swing gate machine, the first proportional integral differential PID control parameter is determined.
[0023] In step 130, the controller can drive the motor to move a fixed distance to determine the vibration frequency and vibration amplitude of the gate displacement end. According to the relationship between the PID control parameter adjustment amount and the vibration frequency and vibration amplitude change amount, the PID parameters are adjusted to gradually reduce the vibration frequency and vibration amplitude to obtain the second PID control parameters.
[0024] The method for automatically adjusting the motor PID control parameters of the swing gate provided in the embodiment of the present application automatically adjusts the PID control parameters through the vibration amplitude and vibration frequency of the swing gate to obtain the target parameters, and can dynamically adjust the proportional coefficient, integral coefficient, and differential coefficient of the PID suitable for the swing gate under different environments. Moreover, by giving a roughly similar PID coefficient through the estimated moment of inertia after startup, and adjusting in the direction of gradient descent through the PID adjustment rule, a suitable position loop PID parameter can be quickly adjusted to meet the swing gate's requirements for accurate and stable motor stops, effectively improving applicability and reducing time costs.
[0025] In one embodiment, determining the moment of inertia of the swing gate machine based on the acceleration of the swing gate machine under the reference current includes: Obtain the acceleration and corresponding moment of inertia of swing gates of different weights and areas under reference current; Determine a first corresponding relationship between the acceleration and the moment of inertia based on the acceleration and the corresponding moment of inertia under the reference current; Based on the acceleration and the first corresponding relationship, the moment of inertia of the swing gate is determined.
[0026] like Figure 2 As shown, the following steps may be specifically included: (1) Place the swing gate of the gate machine in a position where it can run a certain distance after starting and will not be blocked by the baffle. Close the motor position loop and speed loop, and only use the current loop. The current reference value of the current loop is set to the reference current (taking the rated current as an example). The motor starts to rotate, and the motor current is stabilized at the rated current through the current loop. The controller collects the motor position, speed, current, voltage and other operating data at this fixed distance. After the sensor knows that the motor has completed this distance, open the speed loop and quickly decelerate to zero to prevent the swing gate from hitting the baffle and being damaged.
[0027] (2) The controller can filter and pre-process the data collected in step (1). First, analyze the current and intercept the data of the part where the motor current is stable at the rated current. Then analyze the voltage to specifically analyze whether the voltage is abnormal, for example, too high or too low. If it is too high or too low, this section of data cannot be used and the motor needs to be re-initialized and collected again. If there is no abnormality, filter out some abnormal points of position and speed that may exist in this section of data. If too many data points are eliminated, data collection needs to be performed again.
[0028] (3) The controller performs linear analysis calculation on the position information and velocity information in the filtered data after preprocessing in step (2) in the data processing software or program to obtain the acceleration. In this embodiment, linear regression is performed on the velocity information to obtain the slope, which is the acceleration. Furthermore, the controller can also repeat the first three steps to reduce the measurement error and calculate the average acceleration.
[0029] (4) The controller can record the acceleration and moment of inertia under rated current, and by changing the weight, area and other factors of the swing gate machine and repeating the measurement, more data including the acceleration and corresponding moment of inertia under rated current can be obtained, and finally the first corresponding relationship between acceleration and moment of inertia can be obtained. Based on the current acceleration and the first corresponding relationship, the controller can determine the moment of inertia of the gate machine.
[0030] The embodiment of the present application provides a method for automatically adjusting the motor PID control parameters of a swing gate machine. By determining the rotational inertia of the swing gate machine through the acceleration of the swing gate machine under a reference current, the method facilitates the rapid and accurate acquisition of the rotational inertia, thereby initializing the PID coefficient, effectively improving the applicability and reducing the time cost.
[0031] In one embodiment, before determining the moment of inertia of the swing gate machine based on the acceleration of the swing gate machine under the reference current, the method further includes: Collect the running data of the motor rotating under the reference current; Filtering the running data to obtain filtered data; Perform linear regression on the filtered data to obtain the acceleration of the swing gate under the reference current.
[0032] This embodiment is similar to the previous embodiment in determining acceleration in that the rated current is maintained through the current loop, the motor is driven to move a certain distance, and certain operating data such as position, speed, current and voltage are collected. For the filtering preprocessing of the operating data, since it is in actual operation, even if the data obtained is not accurate enough, it only causes the obtained approximate PID parameters to be offset more, and after adjustment in the subsequent stages, it will not affect the final result. Therefore, it is not as strict as the previous stage, and the requirements for abnormal determination and noise point elimination are reduced, reducing the possibility of needing to re-collect data.
[0033] The controller performs linear regression processing on the filtered operating data and performs matrix calculations on the DSP chip of the microcontroller to obtain the acceleration under the rated current. Then, based on the corresponding relationship between acceleration and moment of inertia under the reference current, the moment of inertia corresponding to the acceleration at this time is obtained, and then the corresponding position loop PID parameters are determined.
[0034] The method for automatically adjusting the motor PID control parameters of the swing gate provided in the embodiment of the present application determines the acceleration of the swing gate under the reference current by collecting the operating data of the motor rotating under the reference current, thereby providing data preparation for subsequent steps, effectively improving applicability and reducing time cost.
[0035] In one embodiment, based on the vibration amplitude and vibration frequency of the swing gate machine, the first PID control parameter is adjusted to obtain the second PID control parameter, including: Determine a second corresponding relationship between the adjustment range of the proportional parameter, the integral parameter and the differential parameter in the first PID control parameter and the vibration amplitude and vibration frequency change of the swing gate machine; Based on the second corresponding relationship, the first PID control parameter is adjusted to obtain the second PID control parameter.
[0036] like Figure 3 As shown, the specific steps of determining the second corresponding relationship are as follows: (1) In the previous stage, a roughly similar PID parameter, namely the first PID control parameter, has been determined, and then the motor is operated through the position loop under this PID parameter. Under the control of the position loop, the motor is moved to a specific position. Since the position loop PID parameter of the motor is not adjusted to a suitable value, the gate swing door will vibrate in the final stage of displacement. At this time, the controller records the vibration amplitude and vibration frequency of the gate swing door in the final stage of displacement.
[0037] (2) After the motor runs stably, the controller can make a small modification to the proportional parameter kp, integral parameter ki, and differential parameter kd in the PID parameters of the position loop, and then move it to a specific position through the position loop again. At this time, the vibration amplitude and vibration frequency of the gate swing door in the final stage of displacement are analyzed. The change in vibration amplitude and vibration frequency recorded in step (1) is obtained. Among them, the process of making small modifications to the proportional parameter kp, integral parameter ki, and differential parameter kd can be: increase the kp parameter of PID in a small range, and drive the motor to move a distance the same as step (1). Observe the change in vibration amplitude and vibration frequency of the gate relative to the vibration amplitude and vibration frequency recorded in step (1) at this time, and record it. Reduce the kp parameter of PID in a small range, and perform the above-mentioned moving, observing and recording steps in the same way. Then perform the same process for the ki and kd parameters of PID, and finally determine the change in vibration frequency and vibration amplitude caused by adjusting kp, ki, and kd respectively.
[0038] (3) According to step (2), the kp, ki, and kd parameters in the PID parameters are adjusted respectively. For the change in vibration amplitude and vibration, the guiding rules for adjusting the kp, ki, and kd parameters are obtained, that is, the second corresponding relationship is determined.
[0039] The purpose of adjusting the PID parameters is to gradually reduce the vibration amplitude and frequency of the swing door in the final stage of displacement, so that the swing door can stop accurately and stably in the final stage of displacement.
[0040] The embodiment of the present application provides an automatic adjustment method for the motor PID control parameters of a swing gate machine, which determines the second corresponding relationship by adjusting the amplitude of the proportional parameter, integral parameter and differential parameter in the first PID control parameter and the change in the vibration amplitude and vibration frequency of the swing gate machine, thereby accurately adjusting the PID control parameters to meet the swing gate machine's requirement for accurate and stable stopping of the motor.
[0041] In one embodiment, the method for automatically adjusting the motor PID control parameters of the swing gate machine further includes: Determine the vibration amplitude and vibration frequency of the swing gate under the second PID control parameters; Verify whether the vibration amplitude and vibration frequency under the second PID control parameters meet the preset conditions.
[0042] The preset condition is the maximum acceptable range of the swing door vibration amplitude and vibration frequency determined according to the actual situation. The controller can swing the gate machine vibration amplitude and vibration frequency under the second PID control parameter, and then compare it with the preset condition. If it exceeds the range of the preset condition, it does not meet the preset condition; if it is within the range of the preset condition, it meets the preset condition.
[0043] The automatic adjustment method of the motor PID control parameters of the swing gate provided in the embodiment of the present application can determine the control effect of the second PID control parameters by verifying whether the vibration amplitude and vibration frequency under the second PID control parameters meet the preset conditions, thereby effectively improving the applicability and reducing the time cost.
[0044] In one embodiment, the method for automatically adjusting the motor PID control parameters of the swing gate machine further includes: When the preset conditions are not met, determining the deviation between the vibration amplitude and the vibration frequency under the second PID control parameter and the preset conditions; When the deviation is greater than a preset threshold, adjusting the proportional parameter, integral parameter and differential parameter in the second PID control parameter; When the deviation is less than or equal to a preset threshold, a proportional parameter in the second PID control parameter is adjusted.
[0045] Specifically, Figure 4 As shown, the motor is driven to move to a specific position through the position loop, and the vibration amplitude and frequency of the swing door in the final stage of displacement are observed. If the vibration amplitude and frequency of the swing door are already within an acceptable range, that is, the preset conditions are met, the process is terminated and the PID parameters are adjusted. Otherwise, the adjustment continues.
[0046] Determine the deviation between the vibration amplitude and the vibration frequency under the second PID control parameter and the preset conditions. If the deviation is too large, that is, the deviation is greater than the preset threshold, the kp, ki, and kd parameters are adjusted at the same time, and the direction and amplitude of the adjustment are obtained according to the second corresponding relationship. If the difference is small and within a certain range, that is, the deviation is less than or equal to the preset threshold, only the kp parameter is adjusted at this time, and the direction of the adjustment is also obtained according to the second corresponding relationship, but the adjustment amplitude is reduced at an appropriate ratio.
[0047] Re-observe the vibration amplitude and frequency of the swing door in the final stage of displacement, and determine whether the adjustment is appropriate and whether to end the adjustment based on whether the preset conditions are met.
[0048] The method for automatically adjusting the motor PID control parameters of the swing gate provided in the embodiment of the present application automatically adjusts the PID control parameters through the vibration amplitude and vibration frequency of the swing gate to obtain the target parameters, and can dynamically adjust the proportional coefficient, integral coefficient, and differential coefficient of the PID suitable for the swing gate under different environments. Moreover, by giving a roughly similar PID coefficient through the estimated moment of inertia after startup, and adjusting in the direction of gradient descent through the PID adjustment rule, a suitable position loop PID parameter can be quickly adjusted to meet the swing gate's requirements for accurate and stable motor stops, effectively improving applicability and reducing time costs.
[0049] The automatic adjustment device for the motor PID control parameters of the swing gate machine provided in the present application is described below. The automatic adjustment device for the motor PID control parameters of the swing gate machine described below and the automatic adjustment method for the motor PID control parameters of the swing gate machine described above can be referenced to each other.
[0050] Figure 5 This is a schematic diagram of the structure of the motor PID control parameter automatic adjustment device for the swing gate provided by the present application. Figure 5 The motor PID control parameter automatic adjustment device of the swing gate provided in the embodiment of the present application may include: A first determination module 510, for determining the moment of inertia of the swing gate machine based on the acceleration of the swing gate machine under a reference current; A second determination module 520, for determining a first proportional integral differential PID control parameter based on the moment of inertia of the swing gate machine; The adjustment module 530 is used to adjust the first PID control parameter based on the vibration amplitude and vibration frequency of the swing gate machine to obtain the second PID control parameter.
[0051] The motor PID control parameter automatic adjustment device of the swing gate provided in the embodiment of the present application automatically adjusts the PID control parameters through the vibration amplitude and vibration frequency of the swing gate to obtain the target parameters, and can dynamically adjust the proportional coefficient, integral coefficient, and differential coefficient of the PID suitable for the swing gate under different environments. Moreover, by giving a roughly similar PID coefficient through the estimated moment of inertia after startup, and adjusting in the direction of gradient descent through the PID adjustment rule, a suitable position loop PID parameter can be quickly adjusted to meet the swing gate's requirements for accurate and stable motor stops, effectively improving applicability and reducing time costs.
[0052] Specifically, the automatic adjustment device for the motor PID control parameters of the above-mentioned swing gate provided in the embodiment of the present application can implement all the method steps implemented by the method embodiment in which the above-mentioned execution subject is the controller, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0053] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the method for automatically adjusting the motor PID control parameters of the swing gate machine, for example, including: Determine the moment of inertia of the swing gate machine based on the acceleration of the swing gate machine under the reference current; Based on the moment of inertia of the swing gate machine, determining a first proportional integral differential PID control parameter; Based on the vibration amplitude and vibration frequency of the swing gate machine, the first PID control parameter is adjusted to obtain the second PID control parameter.
[0054] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0055] On the other hand, the present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for automatically adjusting the motor PID control parameters of the swing gate provided by the above methods, for example, including: Determine the moment of inertia of the swing gate machine based on the acceleration of the swing gate machine under the reference current; Based on the moment of inertia of the swing gate machine, determining a first proportional integral differential PID control parameter; Based on the vibration amplitude and vibration frequency of the swing gate machine, the first PID control parameter is adjusted to obtain the second PID control parameter.
[0056] On the other hand, the present application further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute the steps of the method for automatically adjusting the motor PID control parameters of the swing gate provided by the above methods, for example, including: Determine the moment of inertia of the swing gate machine based on the acceleration of the swing gate machine under the reference current; Based on the moment of inertia of the swing gate machine, determining a first proportional integral differential PID control parameter; Based on the vibration amplitude and vibration frequency of the swing gate machine, the first PID control parameter is adjusted to obtain the second PID control parameter.
[0057] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0058] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0059] It should also be noted that the terms "first", "second", etc. in the embodiments of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first" and "second" are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more.
[0060] In the embodiments of the present application, the term "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0061] "Determine B based on A" in the embodiments of the present application means that the factor A should be considered when determining B. It is not limited to "B can be determined based on A alone", but should also include: "Determine B based on A and C", "Determine B based on A, C and E", "Determine C based on A, and further determine B based on C", etc. In addition, it can also include taking A as a condition for determining B, for example, "When A meets the first condition, use the first method to determine B"; for another example, "When A meets the second condition, determine B", etc.; for another example, "When A meets the third condition, determine B based on the first parameter", etc. Of course, it can also be a condition that takes A as a factor for determining B, for example, "When A meets the first condition, use the first method to determine C, and further determine B based on C", etc.
[0062] In the embodiments of the present application, the term "plurality" refers to two or more than two, and other quantifiers are similar.
[0063] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for automatically adjusting the motor PID control parameters of a swing gate machine, characterized in that: include: Determine the moment of inertia of the swing gate machine based on the acceleration of the swing gate machine under the reference current; Based on the moment of inertia of the swing gate machine, determining a first proportional integral differential PID control parameter; Based on the vibration amplitude and vibration frequency of the swing gate machine, the first PID control parameter is adjusted to obtain the second PID control parameter.
2. The method for automatically adjusting the motor PID control parameters of a swing gate machine according to claim 1 is characterized in that: Before determining the moment of inertia of the swing gate machine based on the acceleration of the swing gate machine under the reference current, the method further includes: Collecting operation data of the motor rotating under the reference current; filtering the operating data to obtain filtered data; Perform linear regression on the filtered data to obtain the acceleration of the swing gate machine under the reference current.
3. The method for automatically adjusting the motor PID control parameters of a swing gate machine according to claim 1, characterized in that: Determining the moment of inertia of the swing gate machine based on the acceleration of the swing gate machine under the reference current includes: Obtaining the acceleration and corresponding moment of inertia of swing gate machines of different weights and different areas under the reference current; Determining a first corresponding relationship between the acceleration and the moment of inertia based on the acceleration and the corresponding moment of inertia under the reference current; Based on the acceleration and the first corresponding relationship, the moment of inertia of the swing gate machine is determined.
4. The method for automatically adjusting the motor PID control parameters of a swing gate according to claim 1, characterized in that: The first PID control parameter is adjusted based on the vibration amplitude and vibration frequency of the swing gate machine to obtain the second PID control parameter, including: Determine a second corresponding relationship between the adjustment range of the proportional parameter, the integral parameter and the differential parameter in the first PID control parameter and the vibration amplitude and vibration frequency change of the swing gate machine; Based on the second corresponding relationship, the first PID control parameter is adjusted to obtain the second PID control parameter.
5. The method for automatically adjusting the motor PID control parameters of a swing gate machine according to any one of claims 1 to 4, characterized in that: The method further comprises: Determine the vibration amplitude and vibration frequency of the swing gate machine under the second PID control parameters; Verify whether the vibration amplitude and vibration frequency under the second PID control parameter meet the preset conditions.
6. The method for automatically adjusting the motor PID control parameters of a swing gate machine according to claim 5, characterized in that: The method further comprises: When the preset condition is not met, determining the deviation between the vibration amplitude and the vibration frequency under the second PID control parameter and the preset condition; When the deviation is greater than a preset threshold, adjusting the proportional parameter, integral parameter and differential parameter in the second PID control parameter; When the deviation is less than or equal to the preset threshold, a proportional parameter in the second PID control parameter is adjusted.
7. A device for automatically adjusting the motor PID control parameters of a swing gate machine, characterized in that: include: A first determination module is used to determine the moment of inertia of the swing gate machine based on the acceleration of the swing gate machine under the reference current; A second determination module is used to determine a first proportional integral differential PID control parameter based on the moment of inertia of the swing gate machine; The adjustment module is used to adjust the first PID control parameter based on the vibration amplitude and vibration frequency of the swing gate to obtain the second PID control parameter.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for automatically adjusting the motor PID control parameters of the swing gate machine as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, the method for automatically adjusting the motor PID control parameters of the swing gate machine as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by the processor, the method for automatically adjusting the motor PID control parameters of the swing gate machine as described in any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Channel gate based on face recognition and control method of channel gate
CN122336879A
