Loop control method, system and storage medium
Through the combination of servo controller, position sensor and loop controller, the PID method is used to calculate the moving distance of the electric cylinder, which solves the problem of inaccurate loop position and improves the efficiency and accuracy of the loop.
Patent Information
- Application Number
- CN202211399943.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-09
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2042-11-09
AI Technical Summary
In the prior art, the position of the collar is inaccurate, resulting in low collar efficiency and manual inspection, which wastes manpower and material resources.
The combination of servo controller, position sensor and loop controller is used to calculate the movement distance of the electric cylinder through the PID method to ensure the accuracy and efficiency of the loop.
There is no need to manually check the accuracy of the collar, which improves the efficiency and accuracy of the collar and reduces the waste of manpower and material resources.
Smart Images

Figure CN115635222B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of air conditioner accessories, and in particular to a collar control method, system and storage medium. Background Art
[0002] During the production process, copper tubes are divided into large U tubes and small U tubes. The large U tubes are inserted into the corresponding holes of the aluminum foil, and then the ends of the large U tubes are connected with small U tubes. In the process of connecting and fixing the large and small U tubes, welding is required. Welding and fixing require connecting solder. Generally, a solder ring (referred to as a solder ring) is put on the small U tube. However, in the actual production process, the position of the ring is not accurate due to various reasons. For example, there will be some deviations in the position of the solder ring entering the core rod head each time. These deviations will cause the position of the ring to be not so accurate; for example, there are some oil stains on the processed small U tube. These oil stains will give the solder ring a friction when the ring is put on, and this friction will also cause the position of the ring to deviate. In the prior art, manually detecting whether the position of the ring is accurate not only wastes manpower and material resources, but also reduces the efficiency of the ring. Summary of the invention
[0003] The embodiments of the present invention provide a loop control method, system and storage medium, aiming to solve the problem of low efficiency of existing loops.
[0004] In a first aspect, an embodiment of the present invention provides a loop control method, which includes:
[0005] The servo controller receives the set moving distance sent by the collar controller, and controls the movement of the electric cylinder according to the set moving distance;
[0006] The position sensor obtains the moving distance of the electric cylinder as the k-1 moving distance, and sends the k-1 moving distance to the collar controller, k≥2;
[0007] The collar controller calculates the k-times moving distance according to the set moving distance and the k-1-times moving distance by a PID method, and sends the k-times moving distance to the servo controller;
[0008] The servo controller controls the electric cylinder to move according to the k movement distances to perform the ring forming.
[0009] In a second aspect, an embodiment of the present invention further provides a collar control system, which includes a first control unit and a second control unit configured in a servo controller, an acquisition and transmission unit configured in a position sensor, and a calculation unit configured in a collar controller, wherein:
[0010] The first control unit is used for the servo controller to receive the set moving distance sent by the collar controller, and control the movement of the electric cylinder according to the set moving distance;
[0011] The acquisition and sending unit is used for a position sensor to acquire the moving distance of the electric cylinder as the k-1 moving distance, and send the k-1 moving distance to the collar controller, k≥2;
[0012] The calculation unit is used for the collar controller to calculate the k-times moving distance according to the set moving distance and the k-1-times moving distance by a PID method, and send the k-times moving distance to the servo controller;
[0013] The second control unit is used by the servo controller to control the movement of the electric cylinder to perform the ring according to the k movement distances.
[0014] In a third aspect, an embodiment of the present invention further provides a collar control system, which includes a collar controller, a servo controller, an electric cylinder, a motor and a position sensor, wherein the position sensor is mounted on the electric cylinder, and the collar controller, the servo controller and the position sensor each include a memory and a processor, wherein a computer program is stored in the memory, and the collar controller, the servo controller and the processor of the position sensor jointly implement the above method when executing their respective computer programs.
[0015] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program can implement the above method when executed by multiple processors.
[0016] The embodiment of the present invention provides a loop control method, system and storage medium. The method includes: a servo controller receives a set moving distance sent by a loop controller, and controls the movement of an electric cylinder according to the set moving distance; a position sensor obtains the moving distance of the electric cylinder as a k-1 moving distance, and sends the k-1 moving distance to the loop controller, k≥2; the loop controller calculates the k moving distance by a PID method according to the set moving distance and the k-1 moving distance, and sends the k moving distance to the servo controller; the servo controller controls the movement of the electric cylinder according to the k moving distance to perform the loop. In the technical solution of the embodiment of the present invention, the loop controller first calculates the k moving distance according to the set moving distance and the k-1 moving distance, and the servo controller controls the movement of the electric cylinder according to the k moving distance to perform the loop. The entire loop process not only does not require manual inspection of the loop accuracy, saving time and effort, but also uses the PID method to adjust the moving distance, ensuring the accuracy of the loop, thereby improving the efficiency of the loop. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0018] Figure 1 A schematic diagram of a scenario of a collar control system provided by an embodiment of the present invention;
[0019] Figure 2 A schematic flow chart of a loop control method provided by an embodiment of the present invention;
[0020] Figure 3 A schematic diagram of a sub-process of a loop control method provided by an embodiment of the present invention;
[0021] Figure 4 A schematic diagram of a sub-process of a loop control method provided by an embodiment of the present invention;
[0022] Figure 5 A control diagram of a loop control method provided by an embodiment of the present invention;
[0023] Figure 6 A schematic block diagram of a collar control system provided by an embodiment of the present invention;
[0024] Figure 7 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] 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. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of 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.
[0026] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0027] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0028] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0029] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0030] See also Figure 1 , Figure 1 It is a scene schematic diagram of the collar control system provided by an embodiment of the present invention. The collar control system includes a collar controller, a servo controller, an electric cylinder, a motor and a position sensor, wherein the collar controller is an STM32 single-chip microcomputer, and the position sensor is a high-precision laser position sensor, and is installed on the electric cylinder. In this embodiment, the collar controller communicates with the servo controller through the CAN protocol to send the set moving distance or the k-time moving distance to the servo driver. It can be understood that the CAN protocol is a CAN bus protocol; the servo controller communicates with the motor to send the set moving distance or the k-time moving distance to the motor, and the motor controls the electric cylinder to move according to the set moving distance or the k-time moving distance to connect the welding ring to the small U tube; the position sensor communicates with the collar controller, receives the moving distance of the electric cylinder sent by the position sensor as the k-1-time moving distance, and calculates the k-time moving distance according to the k-1-time moving distance and the set moving distance. It should be noted that, in this embodiment, the ring controller first calculates the k-time moving distance based on the set moving distance and the k-1-time moving distance, and the servo controller then controls the movement of the electric cylinder to perform the ring according to the k-time moving distance. The entire ring process not only does not require manual inspection of the ring accuracy, saving time and effort, but also uses the PID method to adjust the moving distance, thereby ensuring the accuracy of the ring, thereby improving the efficiency of the ring.
[0031] Figure 2 FIG. 1 is a flow chart of the loop control method provided by an embodiment of the present invention. Figure 2 As shown, the method includes the following steps S110-S140.
[0032] S110, the servo controller receives the set moving distance sent by the collar controller, and controls the movement of the electric cylinder according to the set moving distance.
[0033] In this embodiment, the collar controller first sends a start instruction to the servo controller, the servo controller receives the start instruction, and controls the electric cylinder to move to the initial position according to the start instruction. Specifically, the servo controller detects whether the electric cylinder is in the initial position according to the start instruction, and moves the electric cylinder to the initial position if the electric cylinder is not in the initial position; understandably, if the electric cylinder is already in the initial position, there is no need to move the electric cylinder. After the electric cylinder moves to the initial position, it sends a position instruction to the servo driver, the servo driver receives the position instruction, and sends the position instruction to the collar controller, the collar controller receives the position instruction, and sends a set moving distance to the servo controller, the servo controller receives the set moving distance, and controls the movement of the electric cylinder according to the set moving distance.
[0034] S120, the position sensor obtains the moving distance of the electric cylinder as the k-1 moving distance, and sends the k-1 moving distance to the collar controller, k≥2.
[0035] In this embodiment, after the electric cylinder moves, the high-precision laser position sensor installed on the electric cylinder will obtain the moving distance of the electric cylinder, and send the moving distance of the electric cylinder as the k-1 moving distance to the collar controller, where k≥2. It should be noted that in this embodiment, the accuracy of the high-precision laser position sensor is 2μm, the detection distance is 0-100mm, and the deviation of the small U tube is approximately in the range of 0-5mm, so the laser position sensor can be used to detect the collar of the small U tube.
[0036] S130, the collar controller calculates the k-th moving distance according to the set moving distance and the k-1-th moving distance by using a PID method, and sends the k-th moving distance to the servo controller.
[0037] In this embodiment, the collar controller receives the k-1 movement distance, calculates the k movement distance by a PID method according to the set movement distance and the k-1 movement distance, and sends the k movement distance to the servo controller.
[0038] In some embodiments, such as the present embodiment, Figure 3 As shown, the step S130 may include steps S131-S132.
[0039] S131, the collar controller defines the difference between the k-1 movement distance and the set movement distance as the k movement distance deviation value;
[0040] S132, calculating the k-th moving distance by a PID method according to the k-th moving distance deviation value, the k-1-th moving distance, and the preset k-1-th moving distance deviation initial value and k-2-th moving distance deviation initial value.
[0041] In this embodiment, for ease of understanding, it is assumed that the k-time moving distance deviation value is e(k), the k-1-time moving distance is u(k-1), the k-time moving distance is u(k), and the set moving distance is o(k), then e(k)=u(k)-o(k), the preset k-1-time moving distance deviation initial value e(k-1) and the k-2-time moving distance deviation initial value e(k-2) are both 0, that is, e(k-1)=e(k-2)=0, and the k-time moving distance u(k) can be calculated based on e(k), e(k-1), e(k-2) and u(k-1).
[0042] In some embodiments, such as the present embodiment, Figure 4 As shown, the step S132 may include steps S1321-S1322.
[0043] S1321, calculating the k-th moving distance difference value through the PID increment formula according to the k-th moving distance deviation value and the preset k-1-th moving distance deviation initial value and k-2-th moving distance deviation initial value;
[0044] S1322. Calculate the sum of the difference between the k-1 moving distances and the k moving distances to obtain the k moving distance.
[0045] In this embodiment, for ease of understanding, the PID discretization expression formula is first introduced, as shown in formula (1), where t in formula (1) is the sampling time, and the PID increment formula (2) can be derived from formula (1), and the PID output formula (3) can be derived from formula (2). In formulas (1)-(3), △u(k) is the k-th moving distance difference, Kp is the proportional coefficient, Ki is the integral coefficient, Kd is the differential coefficient, e(k) is the k-th moving distance deviation value, e(k-1) is the k-1-th moving distance deviation value, that is, the difference between the previous moving distance and the set moving distance, e(k-2) is the k-2-th moving distance deviation value, that is, the difference between the k-2-th moving distance and the set moving distance, u(k-1) is the k-1-th moving distance, and u(k) is the k-th moving distance. It can be understood that the k-time moving distance difference △u(k) can be calculated by formula (2), and the k-time moving distance u(k)=△u(k)+u(k-1) can be calculated according to formula (3).
[0046]
[0047] △u(k)=Kp*e(k-1)+Ki*e(k)+Kd*(e(k)-2e(k-1)+e(k-2)) (2)
[0048] u(k)=Kp*e(k-1)+Ki*e(k)+Kd*(e(k)-2e(k-1)+e(k-2))+u(k-1) (3)
[0049] It should be noted that, in other embodiments, u(k) can also be set to the kth output of the loop controller, u(k-1) is set to the k-1th output, △u(k) is set to the output change, e(k) is set to the kth output deviation value, e(k-1) is set to the k-1th output deviation value, and e(k-2) is set to the k-2th output deviation value.
[0050] Furthermore, after calculating the k-th moving distance u(k), the collar controller will also set the k-2 moving distance deviation value to the k-1 moving distance deviation value, that is, e(k-2)=e(k-1); and set the k-1 moving distance deviation value to the k-th moving distance deviation value, that is, e(k-1)=e(k). It can be understood that e(k) is set to 0 in order to calculate the next moving distance. The code implementation of the above process is as follows:
[0051]
[0052]
[0053] The above code is written in C language, where pid.SetSpeed is the set moving distance, pid.ActualSpeed is the moving distance of the electric cylinder, pid.errk is the moving distance deviation value, pid.err_next is the k-1 moving distance deviation value, pid.err_last is the k-2 moving distance deviation value, floatincrementSpeed is the k-time moving distance difference, Kp is the proportional coefficient, Ki is the integral coefficient, and Kd is the differential coefficient.
[0054] It should also be noted that, in this embodiment, the PID algorithm is used to control the moving distance of the electric cylinder because P in PID is proportional control, I is integral control, and D is differential control. The error can be well reduced through proportional control P, integral control I and differential control D. Specifically, the output signal of proportional control P is proportional to the error signal fed back. The error signal will become smaller as time goes by, but it will never reach 0. Therefore, pure p control will cause the system to have steady-state error, and it needs to be used together with I and D. The output signal of integral control I is proportional to the integral of the error signal fed back. The integral here is the integral of the error signal and time. After p control is stable, the error fed back is the steady-state error. This error is constant. This error is integrated over time to obtain the sum of the errors during this period. The error is multiplied by I to obtain the average error during this period, thereby eliminating the steady-state error. The output signal of differential control D is proportional to the differential value of the error signal fed back. The differential is the first-order derivative of the current error. Since P control will have overshoot, resulting in the output signal exceeding the given value too much, D control will give a reverse signal to reduce the oscillation of the output signal. Therefore, in this embodiment, the error of the moving distance of the electric cylinder can be reduced by the PID method.
[0055] S140, the servo controller controls the movement of the electric cylinder to perform the ring according to the k movement distances.
[0056] In this embodiment, the servo controller receives the k movement distances sent by the collar controller, and controls the movement of the electric cylinder according to the k movement distances to sleeve the welding ring on the small U tube. After the sleeve connection is completed, the collar controller detects whether the preset sampling time has been reached; if the preset sampling time has been reached, the position sensor is executed to obtain the movement distance of the electric cylinder as the k-1 movement distance, and the k-1 movement distance is sent to the collar controller, that is, the movement distance of the electric cylinder sent by the position sensor is received, and the next movement distance is calculated according to the movement distance and the set movement distance, and the cycle is repeated until the stop collar instruction is received. It can be understood that if the preset sampling time has not been reached, the waiting continues until the preset sampling time is reached.
[0057] For ease of understanding, Figure 5 A control diagram of a loop control method provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, the moving distance of the electric cylinder is first set, that is, the set moving distance, and then the collar controller, that is, the STM32 single chip microcomputer, calculates the k-time electric cylinder required moving distance through the PID method according to the set moving distance and the actual moving distance of the electric cylinder fed back by the high-precision laser position sensor, and transmits the k-time electric cylinder required moving distance to the servo controller through the CAN protocol, and the servo controller receives the distance and controls the movement of the electric cylinder through the motor, and the welding ring is sleeved on the small U tube, and then the high-precision laser position sensor installed on the electric cylinder sends the k-time electric cylinder actual moving distance to the STM32 single chip microcomputer, and the STM32 single chip microcomputer calculates the next electric cylinder moving distance according to the k-time electric cylinder actual moving distance and the set moving distance, and the cycle is repeated, that is, the collar accuracy can be improved by adjusting the electric cylinder moving distance each time, thereby improving the generation efficiency.
[0058] Figure 6 is a schematic block diagram of a collar control system 70 provided in an embodiment of the present invention. Figure 6 As shown, it corresponds to the above loop control method. The loop control system 70 includes a unit for executing the above loop control method. Specifically, please refer to Figure 6 The collar control system 70 includes a first control unit 101 and a second control unit 102 configured in the servo controller 10 , an acquisition and transmission unit 201 configured in the position sensor 20 , and a calculation unit 301 configured in the collar controller 30 .
[0059] Among them, the first control unit 101 is used for the servo controller to receive the set moving distance sent by the ring controller, and control the movement of the electric cylinder according to the set moving distance; the acquisition and sending unit 201 is used for the position sensor to obtain the moving distance of the electric cylinder as the k-1 moving distance, and send the k-1 moving distance to the ring controller, k≥2; the calculation unit 301 is used for the ring controller to calculate the k moving distance according to the set moving distance and the k-1 moving distance through the PID method, and send the k moving distance to the servo controller; the second control unit 102 is used for the servo controller to control the movement of the electric cylinder according to the k moving distance to perform the ring.
[0060] In some embodiments, such as this embodiment, the calculation unit 301 includes a definition unit and a first calculation subunit.
[0061] Among them, the definition unit is used for the ring controller to define the difference between the k-1 movement distance and the set movement distance as the k-1 movement distance deviation value; the first calculation subunit is used to calculate the k-1 movement distance through the PID method according to the k-1 movement distance deviation value, the k-1 movement distance and the preset k-1 movement distance deviation initial value and k-2 movement distance deviation initial value.
[0062] In some embodiments, such as the present embodiment, the first computing subunit includes a second computing subunit and a third computing subunit.
[0063] Among them, the second calculation subunit is used to calculate the k-times moving distance difference according to the k-times moving distance deviation value and the preset k-1-times moving distance deviation initial value and k-2-times moving distance deviation initial value through the PID increment formula; the third calculation subunit is used to calculate the sum of the k-1-times moving distance and the k-times moving distance difference to obtain the k-times moving distance.
[0064] In some embodiments, such as this embodiment, the second computing subunit includes a fourth computing subunit.
[0065] Wherein, the fourth calculation subunit is used to substitute the k-time moving distance deviation value and the preset k-1-time moving distance deviation initial value and k-2-time moving distance deviation initial value into the PID increment formula to calculate the k-time moving distance difference value, wherein the PID increment formula is △u(k)=Kp*e(k-1)+Ki*e(k)+Kd*(e(k)-2e(k-1)+e(k-2)), △u(k) is the k-time moving distance difference value, Kp is the proportional coefficient, Ki is the integral coefficient, Kd is the differential coefficient, e(k) is the k-time moving distance deviation value, e(k-1) is the k-1-time moving distance deviation value, and e(k-2) is the k-2-time moving distance deviation value.
[0066] In some embodiments, such as the present embodiment, the collar control system 70 further includes a first setting unit, a second setting unit, a detection unit, and an execution unit configured in the collar controller 30 , and a receiving control unit configured in the servo drive control 10 .
[0067] Wherein, the first setting unit is used for the collar controller to set the k-2 movement distance deviation value as the k-1 movement distance deviation value; the second setting unit is used for the collar controller to set the k-1 movement distance deviation value as the k-1 movement distance deviation value; the detection unit is used for the collar controller to detect whether the preset sampling time has been reached; the execution unit is used for executing the step of the position sensor obtaining the movement distance of the electric cylinder as the k-1 movement distance and sending the k-1 movement distance to the collar controller if the preset sampling time has been reached; the receiving control unit is used for the servo controller to receive the start instruction sent by the collar controller, and control the electric cylinder to move to the initial position according to the start instruction.
[0068] The above-mentioned collar control system can be implemented in the form of a computer program, which can be used in Figure 7 Runs on the computer device shown.
[0069] See also Figure 7 , Figure 7 900 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 900 may be the collar controller, servo controller and position sensor.
[0070] See also Figure 7 The computer device 900 includes a processor 902 , a memory and an interface 907 connected via a system bus 901 , wherein the memory may include a non-volatile storage medium 903 and an internal memory 904 .
[0071] The non-volatile storage medium 903 may store an operating system 9031 and a computer program 9032. When the computer program 9032 is executed, the processor 902 may execute a loop control method.
[0072] The processor 902 is used to provide computing and control capabilities to support the operation of the entire computer device 900 .
[0073] The internal memory 904 provides an environment for the execution of the computer program 9032 in the non-volatile storage medium 903 .
[0074] The interface 905 is used to communicate with other devices. Those skilled in the art will appreciate that Figure 7 The structure shown in the figure is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device 900 to which the solution of the present application is applied. The specific computer device 900 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0075] The processors 902 in the host computer, the filling machine PLC system and the line body PLC system are used to run the computer program 9032 stored in their respective memories. When the computer program 3032 is executed, the processor 902 can execute a loop control method.
[0076] It should be understood that in the embodiment of the present application, the processor 902 may be a central processing unit (CPU), and the processor 902 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0077] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.
[0078] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program. When the computer program is executed by a processor, the processor executes any embodiment of the above-mentioned collar control method.
[0079] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.
[0080] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0081] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0082] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0083] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.
[0084] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0085] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
[0086] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A loop control method, characterized in that: include: The servo controller receives the set moving distance sent by the collar controller, and controls the movement of the electric cylinder according to the set moving distance; The position sensor obtains the moving distance of the electric cylinder as the k-1 moving distance, and sends the k-1 moving distance to the collar controller, k≥2; The collar controller defines the difference between the k-1 movement distance and the set movement distance as the k-1 movement distance deviation value; substitutes the k-1 movement distance deviation value and the preset k-1 movement distance deviation initial value and k-2 movement distance deviation initial value into the PID increment formula to calculate the k-1 movement distance difference value, wherein the PID increment formula is △u(k)=Kp*e(k-1)+Ki*e(k)+Kd*(e(k)-2e(k-1)+e(k-2)), △u(k) is the k-1 movement distance difference value, Kp is the proportional coefficient, Ki is the integral coefficient, Kd is the differential coefficient, e(k) is the k-1 movement distance deviation value, e(k-1) is the k-1 movement distance deviation value, and e(k-2) is the k-2 movement distance deviation value; calculates the sum of the k-1 movement distance and the k-1 movement distance difference value to obtain the k-1 movement distance; and sends the k-1 movement distance to the servo controller; The servo controller controls the electric cylinder to move according to the k movement distances to perform the ring forming.
2. The method according to claim 1, characterized in that The method further comprises: The collar controller sets the k-2 movement distance deviation value to the k-1 movement distance deviation value; The collar controller sets the k-1th moving distance deviation value as the kth moving distance deviation value.
3. The method according to claim 2, characterized in that The method further comprises: The collar controller detects whether a preset sampling time has been reached; If the preset sampling time is reached, the step of obtaining the moving distance of the electric cylinder as the k-1 moving distance by the position sensor and sending the k-1 moving distance to the collar controller is executed.
4. The method according to claim 1, characterized in that: The method further comprises: The servo controller receives a start instruction sent by the collar controller, and controls the electric cylinder to move to an initial position according to the start instruction.
5. A collar control system, characterized in that: include: A first control unit and a second control unit are configured in the servo controller, an acquisition and transmission unit is configured in the position sensor, and a calculation unit is configured in the collar controller, wherein: The first control unit is used for the servo controller to receive the set moving distance sent by the collar controller, and control the movement of the electric cylinder according to the set moving distance; The acquisition and sending unit is used for a position sensor to acquire the moving distance of the electric cylinder as the k-1 moving distance, and send the k-1 moving distance to the collar controller, k≥2; The calculation unit is used for the collar controller to define the difference between the k-1 movement distance and the set movement distance as the k-1 movement distance deviation value; substitute the k-1 movement distance deviation value and the preset k-1 movement distance deviation initial value and k-2 movement distance deviation initial value into the PID increment formula to calculate the k-1 movement distance difference value, wherein the PID increment formula is △u(k)=Kp*e(k-1)+Ki*e(k)+Kd*(e(k)-2e(k-1)+e(k-2)), △u(k) is the k-1 movement distance difference value, Kp is the proportional coefficient, Ki is the integral coefficient, Kd is the differential coefficient, e(k) is the k-1 movement distance deviation value, e(k-1) is the k-1 movement distance deviation value, and e(k-2) is the k-2 movement distance deviation value; calculate the sum of the k-1 movement distance and the k-1 movement distance difference value to obtain the k-1 movement distance; and send the k-1 movement distance to the servo controller; The second control unit is used by the servo controller to control the movement of the electric cylinder to perform the ring according to the k movement distances.
6. A collar control system, characterized in that: The method comprises a collar controller, a servo controller, an electric cylinder, a motor and a position sensor, wherein the position sensor is mounted on the electric cylinder, the collar controller, the servo controller and the position sensor all comprise a memory and a processor, a computer program is stored in the memory, and the collar controller, the servo controller and the processor of the position sensor jointly implement the method as described in any one of claims 1 to 4 when executing their respective computer programs.
7. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a plurality of processors, the method according to any one of claims 1 to 4 can be implemented.
Citation Information
Patent Citations
Welded joint detecting and tracking system and method based on video analysis
CN104493336A
Welding ring position detection method and device
CN114266722A