Servo system control method, servo system, computer equipment and storage medium
By obtaining the feedback amount of calculation time and non-calculated time in the servo system, calculating the difference amount, and using proportional and integral control algorithms, combined with smooth filtering technology, optimizing the control of the servo system, the problem of low control accuracy in traditional methods is solved. , achieving higher control accuracy and system performance.
Patent Information
- Application Number
- CN202411221349.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-10
AI Technical Summary
In the traditional servo system control method, the control ring is adjusted by simply comparing the given quantity and the feedback quantity, resulting in low control accuracy and unable to effectively improve the control accuracy of the servo system.
By obtaining the feedback amount at the calculation time and non-calculation time, calculating the difference amount, and using the proportional control algorithm and the integral control algorithm, the proportional control amount and integral control amount are determined respectively, and combined with smooth filtering technology, the dynamic and steady state of the control loop are optimized. performance.
It improves the accuracy of servo system control, takes into account both dynamic performance and steady-state performance, and enhances the response speed and steady-state accuracy of the control ring.
Smart Images

Figure CN119105409A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automatic control technology, and in particular to a servo system control method, a servo system, a computer device and a storage medium. Background Art
[0002] The servo system is an automatic control system that changes the state of the controlled object with any change in a given quantity. With the continuous advancement of servo system control technology, the servo system has expanded from the traditional mechanical field to the broader field of mechatronics. For example, as a key component in CNC machine tools, the servo system is of great significance for improving processing efficiency.
[0003] In the conventional technology, the control loop of the servo system performs feedback adjustment by simply comparing the given quantity of the control loop with the feedback quantity of the controlled object to obtain the control quantity used to control the controlled object. Obviously, this method is quite limited, resulting in the control quantity used to control the controlled object being inaccurate, which in turn leads to low accuracy of servo system control. Summary of the invention
[0004] Based on this, it is necessary to provide a servo system control method, servo system, computer device and storage medium that can improve accuracy in response to the above technical problems.
[0005] In a first aspect, the present application provides a servo system control method, comprising:
[0006] Acquire a first feedback amount collected from the controlled object at a calculation time and a reference feedback amount collected from the controlled object at a non-calculation time;
[0007] determining a first difference between a first feedback quantity and a given quantity of a control loop;
[0008] Determining a proportional control amount that matches the first difference amount according to a proportional control algorithm;
[0009] Performing smoothing filtering on the first feedback amount and the reference feedback amount to obtain a second feedback amount;
[0010] determining a second difference between the second feedback amount and the given amount;
[0011] Determining an integral control amount matching the second difference amount according to an integral control algorithm;
[0012] The controlled object is controlled according to the integral control quantity and the proportional control quantity.
[0013] In a second aspect, the present application further provides a servo system, the servo system comprising an acquisition unit, a first operation unit, a proportional controller, a filtering unit, a second operation unit, an integral controller and a third operation unit; wherein the acquisition unit is connected to the filtering unit and the first operation unit respectively; the filtering unit is connected to the second operation unit; the first operation unit is connected to the proportional controller; the second operation unit is connected to the integral controller; the third operation unit is connected to the integral controller and the proportional controller respectively;
[0014] A collection unit, used to obtain a first feedback amount collected from the controlled object at a calculation time and a reference feedback amount collected from the controlled object at a non-calculation time;
[0015] A first operation unit, used for determining a first difference between a first feedback amount and a given amount of a control loop;
[0016] A proportional controller, used to determine a proportional control amount matching the first difference amount according to a proportional control algorithm;
[0017] A filtering unit, used for performing smoothing filtering on the first feedback amount and the reference feedback amount to obtain a second feedback amount;
[0018] A second operation unit, used for determining a second difference between a second feedback amount and a given amount;
[0019] An integral controller, used to determine an integral control amount matching the second difference amount according to an integral control algorithm;
[0020] The third operation unit is used to control the controlled object according to the integral control amount and the proportional control amount.
[0021] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above method when executing the computer program.
[0022] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above method when the computer program is executed by a processor.
[0023] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps in the above method when executed by a processor.
[0024] The above-mentioned servo system control method, device, computer equipment, storage medium and computer program product obtain the first feedback amount collected from the controlled object at the calculation time and the reference feedback amount collected from the controlled object at the non-calculation time. The first feedback amount is collected at the calculation time, reflects the physical state of the controlled object at the calculation time, and has more dynamic characteristics. Determine the first difference amount between the first feedback amount and the given amount of the control loop, and the first difference amount also has more dynamic characteristics. For the control loop of the servo system, the proportional control part can quickly reduce the error and speed up the response speed of the system. The dynamic performance of the control loop is mainly determined by the proportional control part. Therefore, according to the proportional control algorithm, the proportional control amount matching the first difference amount is determined, and the first difference amount with more dynamic characteristics is combined in the proportional control part, which can ensure the dynamic performance of the control loop. In addition, the first feedback amount and the reference feedback amount are smoothed and filtered to obtain the second feedback amount. The second feedback amount is a combination of the first feedback amount corresponding to the calculation time and the reference feedback amount corresponding to the non-calculation time, which can reflect the state of the controlled object in multiple moments, and has more steady-state characteristics. The second difference between the second feedback amount and the given amount is determined, and the second difference also has more steady-state characteristics. For the control loop of the servo system, the integral control part can eliminate the steady-state error and improve the steady-state accuracy of the system. The steady-state performance of the control loop is mainly determined by the integral control part. Therefore, the integral control amount matching the second difference is determined according to the integral control algorithm, and the second difference with more steady-state characteristics is combined in the integral control part, which can ensure the steady-state performance of the control loop. Therefore, the controlled object is controlled according to the integral control amount and the proportional control amount, which can take into account the dynamic performance and steady-state performance of the control loop, and improve the accuracy of the servo system control. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 An application environment diagram of a servo system control method provided in an embodiment of the present application.
[0026] Figure 2 A flowchart of a servo system control method provided in an embodiment of the present application.
[0027] Figure 3 A schematic diagram of a current loop of a servo system provided in an embodiment of the present application.
[0028] Figure 4 A schematic diagram of a feedback current path of a proportional controller and a feedback current path of an integral controller provided in an embodiment of the present application.
[0029] Figure 5 A structural block diagram of a servo system provided in an embodiment of the present application.
[0030] Figure 6An internal structure diagram of a computer device provided in an embodiment of the present application.
[0031] Figure 7 An internal structure diagram of another computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0033] The servo system control method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. The servo system includes a control loop, and the servo system transmits the given amount to the first operation unit and the second operation unit in the control loop respectively. The acquisition unit in the control loop collects the first feedback amount and the reference feedback amount from the controlled object, wherein the first feedback amount collected by the acquisition unit is transmitted to the first operation unit, and then the first operation unit can determine the first difference amount between the first feedback amount and the given amount. The first difference amount output by the first operation unit is transmitted to the proportional controller, and the proportional controller can output a proportional control amount matching the first difference amount according to the proportional control algorithm.
[0034] The first feedback amount and the reference feedback amount collected by the collection unit are transmitted to the filtering unit, and then the filtering unit can perform smoothing filtering on the first feedback amount and the reference feedback amount to obtain the second feedback amount. The second feedback amount output by the filtering unit is transmitted to the second operation unit, and then the second operation unit can determine the second difference amount between the second feedback amount and the given amount. The second difference amount output by the second operation unit is transmitted to the integral controller, and the integral controller can output an integral control amount matching the second difference amount according to the integral control algorithm.
[0035] The proportional control amount output by the proportional controller and the integral control amount output by the integral controller are input to the third operation unit, and then the third operation unit can control the controlled object according to the proportional control amount and the integral control amount.
[0036] In an exemplary embodiment, Figure 2 As shown, a servo system control method is provided, which can be applied to at least one of a computer device or a control loop of a servo system. The computer device may include at least one of a terminal or a server. The method is applied to a servo system as an example for description, including the following steps 202 to 214.
[0037] Step 202 : obtaining a first feedback amount collected from the controlled object at a calculation time and a reference feedback amount collected from the controlled object at a non-calculation time.
[0038] Among them, the control loop refers to a closed-loop feedback loop used to control the controlled object in the servo system. The control loop may include at least one of a current loop or a speed loop. The controlled object refers to an object controlled in the servo system. The controlled object may include at least one of a motor, a hydraulic servo mechanism or a pneumatic servo mechanism. The first feedback quantity is used to characterize the state of the controlled object at the calculation time. The reference feedback quantity is used to characterize the state of the controlled object at the non-calculation time. It can be understood that the feedback quantity of the controlled object will be collected at the calculation time and the non-calculation time, and the calculation time and the non-calculation time are essentially used to indicate the sampling time for collecting the feedback quantity of the controlled object. The calculation time is actually a specific time among multiple sampling times, and the non-calculation time is a time other than the calculation time among multiple sampling times. The calculation time can be, but is not limited to, a time in a preset sequence position among multiple sampling times. For multiple sampling times, the feedback quantity collected at the last time has the most dynamic characteristics. Therefore, in order to ensure the dynamic characteristics of the first feedback quantity collected at the calculation time as much as possible, the preset sequence position can be the last sequence position, and the calculation time can be the last time among multiple sampling times, then the non-calculation time is the previous time before the calculation time. It should be noted that, for multiple sampling moments, the feedback amount collected at moments other than the last moment also has certain dynamic characteristics, the preset sequence position is not limited to the last sequence position, and the calculation moment is not limited to the last moment among the multiple sampling moments.
[0039] Exemplarily, the servo system can detect the state physical quantity of the controlled object at the non-computation time to obtain a reference feedback quantity, and detect the state physical quantity of the controlled object at the calculation time to obtain a first feedback quantity. It can be understood that the servo system is a system that causes the state physical quantity of the controlled object to change with the change of a given quantity. The first feedback quantity is used to characterize the actual physical state of the controlled object at the calculation time. The reference feedback quantity is used to characterize the actual physical state of the controlled object at the non-computation time.
[0040] In some embodiments, the control loop may be, but is not limited to, a current loop. The state physical quantity of the controlled object may include the current in the controlled object. The current loop may detect the current of the controlled object at the calculation time to obtain a first feedback quantity, and detect the current of the controlled object at the non-calculation time to obtain a reference feedback quantity. The first feedback quantity is used to characterize the actual current state of the controlled object at the calculation time. The reference feedback quantity is used to characterize the actual current state of the controlled object at the non-calculation time.
[0041] In some embodiments, the control loop may be, but is not limited to, a speed loop. The state physical quantity of the controlled object may include the movement speed of the controlled object. The speed loop may detect the movement speed of the controlled object at the calculation time to obtain a first feedback quantity, and detect the movement speed of the controlled object at the non-calculation time to obtain a reference feedback quantity. The first feedback quantity is used to characterize the actual speed state of the controlled object at the calculation time. The reference feedback quantity is used to characterize the actual speed state of the controlled object at the non-calculation time.
[0042] In some embodiments, the control loop may include an acquisition unit. The acquisition unit is used to detect the state physical quantity of the controlled object. The acquisition unit may detect the state physical quantity of the controlled object at the calculation time to obtain a first feedback quantity, and detect the state physical quantity of the controlled object at the non-calculation time to obtain a reference feedback quantity. The acquisition unit may include at least one of a position sensor, a current sensor, or a speed sensor. Among them, the position sensor may be used to detect at least one of the position or movement speed of the controlled object. The current sensor may be used to detect the current in the controlled object. The speed sensor may be used to detect the movement speed of the controlled object.
[0043] Step 204 : determining a first difference between the first feedback value and a given value of the control loop.
[0044] The given quantity is used to characterize the state physical quantity that the controlled object is to reach or needs to approach. It can be understood that in the servo system, the given quantity is used as the input of the control loop, and through the control processing logic inside the control loop, the state physical quantity of the controlled object can reach or be closer to the given quantity. In this process, the feedback mechanism in the control loop obtains the feedback quantity by detecting the state physical quantity of the controlled object, reduces the difference between the feedback quantity and the given quantity, and ensures that the state physical quantity of the controlled object gradually approaches the given quantity.
[0045] Exemplarily, the given amount of the control loop may be input by an external device of the servo system, or may be generated inside the servo system. In the servo system, the given amount is transmitted to the control loop. The control loop may obtain the given amount, perform a subtraction operation on the given amount and the first feedback amount, and obtain a first difference amount. It can be understood that the first difference amount is actually the difference between the given amount and the first feedback amount.
[0046] In some embodiments, the control loop may include a first operation unit and a collection unit. The first operation unit is used to perform a subtraction operation. The first operation unit is connected to the collection unit, and is used to receive a first feedback amount from the collection unit, and receive a given amount of the control loop, and then perform a subtraction operation on the first feedback amount and the given amount, and output a first difference amount. It can be understood that in the servo system, the given amount and the first feedback amount will be transmitted to the first operation unit. The first operation unit can obtain the given amount and the first feedback amount. Perform a subtraction operation on the first feedback amount and the given amount to obtain the first difference amount.
[0047] In some embodiments, the carrier of data transmission in the control loop is a circuit, and the expression form of various data quantities involved in the control loop is an electrical signal. That is, if the servo system control method provided by the present application is applied to the servo system, in the control loop of the servo system, the expression form of the first feedback quantity is the first feedback signal, the expression form of the reference feedback quantity is the reference feedback signal, the expression form of the first difference quantity is the first difference quantity signal, the expression form of the proportional control quantity is the proportional control signal, the expression form of the second feedback quantity is the second feedback signal, the expression form of the second difference quantity is the second difference quantity signal, and the expression form of the integral control quantity is the integral control signal, etc. It can be understood that if the servo system control method provided by the present application is applied to a computer device, the expression form of the various data quantities mentioned above is not limited to electrical signals.
[0048] Step 206 : determining a proportional control amount that matches the first difference amount according to a proportional control algorithm.
[0049] The proportional control amount is proportional to the first difference amount. The proportional control algorithm includes calculating the proportional control amount proportional to the first difference amount.
[0050] Exemplarily, the servo system may calculate a proportional control amount proportional to the first difference amount using a proportional control algorithm.
[0051] In some embodiments, the control loop may include a proportional controller for implementing a proportional control algorithm. The servo system may determine a proportional control amount that matches the first difference amount through the proportional controller. It is understood that in the servo system, the first difference amount will be transmitted to the proportional controller, and the proportional controller may determine a proportional control amount that matches the first difference amount when the first difference amount is obtained.
[0052] Step 208: Smoothing and filtering the first feedback amount and the reference feedback amount to obtain a second feedback amount.
[0053] Among them, the second feedback quantity has better steady-state performance than the first feedback quantity. It can be understood that the first feedback quantity is collected at the calculation time, reflecting the physical state of the controlled object at the calculation time, and has more dynamic performance. The second feedback quantity is a combination of the first feedback quantity corresponding to the calculation time and the reference feedback quantity corresponding to the non-calculation time, reflecting the physical state of the controlled object in the calculation time and the non-calculation time, and has more steady-state performance.
[0054] Exemplarily, the control loop may include a filter unit. The servo system may perform smooth filtering on the first feedback amount and the reference feedback amount through the filter unit in the control loop to obtain the second feedback amount.
[0055] In some embodiments, the servo system may perform any one of mean filtering, low-pass filtering, median filtering, Gaussian filtering, etc. on the first feedback amount and the reference feedback amount to obtain the second feedback amount.
[0056] In some embodiments, the control loop may include a filtering unit for implementing any one of mean filtering, low-pass filtering, median filtering, Gaussian filtering, and the like.
[0057] Step 210: Determine a second difference between the second feedback amount and the given amount.
[0058] For example, in the servo system, the control loop can perform a subtraction operation on the given amount and the second feedback amount to obtain a second difference amount. It can be understood that the second difference amount is actually the difference between the given amount and the second feedback amount.
[0059] In some embodiments, the control loop may include a second operation unit and a filtering unit. The second operation unit is used to perform a subtraction operation. The second operation unit is connected to the filtering unit, and is used to receive the second feedback amount from the filtering unit, and receive the given amount of the control loop, and then perform a subtraction operation on the second feedback amount and the given amount, and output a second difference amount. It can be understood that in the servo system, the given amount and the second feedback amount will be transmitted to the second operation unit. The second operation unit can obtain the given amount and the second feedback amount, and perform a subtraction operation on the second feedback amount and the given amount to obtain the second difference amount.
[0060] Step 212: Determine an integral control amount that matches the second difference amount according to an integral control algorithm.
[0061] The function of the integral control algorithm includes performing an integral operation according to the second difference amount to obtain a current integral amount, and then calculating a proportional control amount proportional to the current integral amount.
[0062] For example, the servo system can use an integral control algorithm to perform an integral operation on the second difference amount to obtain a current integral amount, and calculate an integral control amount proportional to the current integral amount. It can be understood that different calculation moments correspond to different second difference amounts. The integral operation is essentially to perform a cumulative calculation of the second difference amount corresponding to the current calculation moment and the second difference amount corresponding to the previous calculation moment.
[0063] In some embodiments, the control loop may include an integral controller for implementing an integral control algorithm. In the servo system, the second difference is transmitted to the integral controller. The integral controller may determine an integral control amount matching the second difference when the second difference is obtained.
[0064] Step 214, controlling the controlled object according to the integral control amount and the proportional control amount.
[0065] Exemplarily, the control loop may include a third operation unit. In the servo system, the integral control amount and the proportional control amount are input to the third operation unit, the third operation unit may obtain the integral control amount and the proportional control amount, determine the target control amount according to the integral control amount and the proportional control amount, and control the controlled object according to the target control amount.
[0066] In some embodiments, the control loop may be, but is not limited to, a current loop. The servo system controls the current of the controlled object according to the integral control amount and the proportional control amount.
[0067] In some embodiments, the control loop may be, but is not limited to, a speed loop. The speed loop includes a current loop. The servo system determines a target control amount according to an integral control amount and a proportional control amount. The target control amount is used as a given amount of the current loop, and the controlled object is controlled through the current loop.
[0068] In some embodiments, the control loop may be, but is not limited to, a speed loop. The third operation unit in the speed loop may transmit the target control amount to the current loop as a given amount of the current loop.
[0069] In the above servo system control method, a first feedback amount collected from the controlled object at the calculation time and a reference feedback amount collected from the controlled object at the non-calculation time are obtained. The first feedback amount is collected at the calculation time, reflects the physical state of the controlled object at the calculation time, and has more dynamic characteristics. A first difference amount between the first feedback amount and the given amount of the control loop is determined, and the first difference amount also has more dynamic characteristics. For the control loop of the servo system, the proportional control part can quickly reduce the error and speed up the response speed of the system. The dynamic performance of the control loop is mainly determined by the proportional control part. Therefore, the proportional control amount matching the first difference amount is determined according to the proportional control algorithm, and the first difference amount with more dynamic characteristics is combined in the proportional control part, which can ensure the dynamic performance of the control loop. In addition, the first feedback amount and the reference feedback amount are smoothed and filtered to obtain a second feedback amount. The second feedback amount is a combination of the first feedback amount corresponding to the calculation time and the reference feedback amount corresponding to the non-calculation time, which can reflect the state of the controlled object in multiple moments, and has more steady-state characteristics. A second difference amount between the second feedback amount and the given amount is determined, and the second difference amount also has more steady-state characteristics. For the control loop of the servo system, the integral control part can eliminate the steady-state error and improve the steady-state accuracy of the system. The steady-state performance of the control loop is mainly determined by the integral control part. Therefore, the integral control amount matching the second difference amount is determined according to the integral control algorithm, and the second difference amount with more steady-state characteristics is combined in the integral control part to ensure the steady-state performance of the control loop. Therefore, the controlled object is controlled according to the integral control amount and the proportional control amount, which can take into account the dynamic performance and steady-state performance of the control loop and improve the accuracy of the servo system control.
[0070] In some embodiments, obtaining a first feedback amount collected from a controlled object at a calculation moment and a reference feedback amount collected from the controlled object at a non-calculation moment includes: obtaining a reference feedback amount collected from the controlled object at a non-calculation moment within a control cycle; obtaining a first feedback amount collected from the controlled object at a calculation moment within the control cycle; wherein the control cycle is used to describe the time interval between two adjacent calculation moments.
[0071] It can be understood that the control cycle includes multiple sampling moments for indicating the collection of feedback amount of the controlled object. The calculation moment can be, but is not limited to, the last sampling moment in the control cycle. The non-calculation moment can be, but is not limited to, the sampling moment other than the calculation moment in the control cycle.
[0072] Exemplarily, the control cycle includes a calculation moment and at least one non-calculation moment. The control loop includes an acquisition unit. The acquisition unit may include an analog-to-digital converter and a microcontroller. In the servo system, the microcontroller in the acquisition unit can implement sampling of the controlled object at multiple sampling moments through the analog-to-digital converter within one control cycle to obtain a first feedback amount collected at the calculation moment and a reference feedback amount collected at the non-calculation moment.
[0073] In some embodiments, the calculation time is the last sampling time in the control cycle. Before the calculation time in the control cycle arrives, the acquisition unit collects the reference feedback amount, and when the calculation time in the control cycle arrives, the acquisition unit collects the first feedback amount. It can be understood that after the calculation time of the current control cycle arrives, the next control cycle begins.
[0074] In some embodiments, the control loop may include a collection unit, a filtering unit, and a first operation unit. When the calculation moment in the control cycle arrives, the collection unit may transmit the reference feedback amount and the first feedback amount collected in the control cycle to the filtering unit, and transmit the first feedback amount collected in the control cycle to the first operation unit.
[0075] In this embodiment, a reference feedback amount collected from the controlled object at a non-computational moment within the control cycle is obtained; and a first feedback amount collected from the controlled object at a calculation moment within the control cycle is obtained; wherein the control cycle is used to describe the time interval between two adjacent calculation moments, and subsequently a second feedback amount can be obtained by smoothing and filtering the first feedback amount and the reference feedback amount collected within the same control cycle, thereby effectively controlling the time range of the smoothing filter, avoiding excessive delays caused by a time range that is too large relative to the time range of the first feedback amount, and poor smoothing effect caused by a time range that is too small, thereby ensuring that the second feedback amount obtained through smoothing filtering is more accurate.
[0076] In some embodiments, the control loop includes a proportional controller for implementing a proportional control algorithm; determining a proportional control amount that matches the first difference amount according to the proportional control algorithm includes: weighting the first difference amount according to a proportional gain through the proportional controller to obtain a proportional control amount that matches the first difference amount.
[0077] Exemplarily, the control loop may include a proportional controller, a first operation unit and a collection unit. The collection unit is connected to the first operation unit, and the first operation unit is connected to the proportional controller. In the servo system, the given amount is transmitted to the first operation unit. When the calculation moment in the control cycle arrives, the collection unit can transmit the first feedback amount collected at the calculation moment to the first operation unit. The first operation unit can obtain the given amount and the first feedback amount, and perform a subtraction operation on the given amount and the first feedback amount to obtain a first difference amount. The first operation unit can transmit the first difference amount to the proportional controller. Then, the proportional controller can weight the first difference amount according to the proportional gain when the first difference amount is obtained, and output a proportional control amount matching the first difference amount.
[0078] In some embodiments, the proportional controller may calculate the product of the proportional gain and the first difference amount to obtain a proportional control amount that matches the first difference amount.
[0079] In this embodiment, the control loop includes a proportional controller for implementing a proportional control algorithm; the proportional controller weights the first difference amount according to the proportional gain to obtain a proportional control amount matching the first difference amount, and the proportional controller can quickly respond to the first difference amount and output the proportional control amount matching the first difference amount in a timely manner, thereby improving the control efficiency of the servo system. In addition, the parameter adjustment of the proportional controller is relatively simple, mainly adjusting the proportional gain. By adjusting the proportional gain, the response speed and accuracy can be changed more conveniently, thereby improving convenience.
[0080] In some embodiments, performing smoothing filtering on the first feedback amount and the reference feedback amount to obtain the second feedback amount includes: performing mean filtering on the first feedback amount and the reference feedback amount to obtain the second feedback amount.
[0081] Exemplarily, the control loop may include a filtering unit and a collection unit. The collection unit is connected to the filtering unit. When the calculation moment in the control cycle arrives, the collection unit may transmit the reference feedback amount collected at the non-calculation moment and the first feedback amount collected at the calculation moment to the filtering unit. The filtering unit may obtain the reference feedback amount and the first feedback amount collected in the same control cycle, and perform mean filtering on the reference feedback amount and the first feedback amount collected in the same control cycle, and output the second feedback amount.
[0082] Assuming that there are N-1 non-calculation moments and 1 calculation moment in the control cycle, there are correspondingly N-1 reference feedback quantities and 1 first feedback quantity. The second feedback quantity obtained by mean filtering the above reference feedback quantity and the first feedback quantity is shown in formula (1).
[0083]
[0084] Among them, I_flt is the second feedback quantity. When k < N, I(k) is the reference feedback quantity. When k = N, I(k) is the first feedback quantity. N is the total number of non-calculation times and calculation times in the control period.
[0085] It can be understood that the N feedback quantities for mean filtering are within the same control period, which enables the filtered second feedback quantity I _flt because the delay caused by filtering can be minimized as much as possible, and at the same time, mean filtering can suppress the noise in the feedback quantity to ensure the accuracy of the second feedback quantity.
[0086] In this embodiment, by performing mean filtering on the first feedback quantity and the reference feedback quantity, the second feedback quantity is obtained, and by synthesizing the feedback quantities corresponding to the non-calculation time and the calculation time respectively, the second feedback quantity after mean filtering has better steady-state characteristics, and mean filtering can suppress the noise in the feedback quantity to ensure the accuracy of the second feedback quantity.
[0087] In some embodiments, the control loop includes an integral controller for implementing an integral control algorithm; determining an integral control quantity matching the second difference quantity according to the integral control algorithm, including: determining the current integral quantity according to the second difference quantity and the historical integral quantity through the integral controller, and weighting the current integral quantity according to the integral gain to obtain an integral control quantity matching the second difference quantity.
[0088] Exemplarily, the control loop may include an integral controller, a second arithmetic unit, and a filtering unit. Among them, the filtering unit is connected to the second arithmetic unit, and the second arithmetic unit is connected to the integral controller. In the servo system, the given quantity is transmitted to the second arithmetic unit. The filtering unit can perform smoothing filtering on the reference feedback quantity and the first feedback quantity to obtain the second feedback quantity. The filtering unit can transmit the second feedback quantity to the second arithmetic unit. The second arithmetic unit can obtain the given quantity and the second feedback quantity, and perform a subtraction operation on the given quantity and the second feedback quantity to obtain the second difference quantity. The second arithmetic unit can transmit the second difference quantity to the integral controller. Further, the integral controller can, when obtaining the second difference quantity, accumulate the second difference quantity and the historical integral quantity to obtain the current integral quantity, weight the current integral quantity according to the integral gain, and output an integral control quantity matching the second difference quantity. The integral controller can, when obtaining a new second difference quantity, determine the current integral quantity as the historical integral quantity. It can be understood that the historical integral quantity refers to the result of integrating the previously obtained second difference quantity before the integral controller obtains the new second difference quantity.
[0089] In some embodiments, after the second difference is input to the integral controller, the integral controller may calculate the cumulative amount of the second difference currently obtained and the second difference previously obtained to obtain the integral amount of the second difference. It can be understood that different calculation times correspond to different second difference amounts. The calculation time corresponding to the second difference currently obtained by the integral controller is later than the calculation time corresponding to the second difference previously obtained by the integral controller.
[0090] In some embodiments, the integral controller may calculate the product of the integral gain and the integral amount of the second difference amount to obtain an integral control amount that matches the second difference amount.
[0091] In this embodiment, the control loop includes an integral controller for implementing an integral control algorithm; the integral controller determines the current integral amount according to the second difference amount and the historical integral amount, and weights the current integral amount according to the integral gain to obtain an integral control amount that matches the second difference amount. The integral controller can respond quickly to the second difference amount, and output the integral control amount that matches the second difference amount in a timely manner, thereby improving the control efficiency of the servo system. In addition, the parameter adjustment of the integral controller is relatively simple, mainly adjusting the integral gain. By adjusting the integral gain, the response speed and accuracy can be changed more conveniently, thereby improving convenience.
[0092] In some embodiments, controlling the controlled object according to the integral control amount and the proportional control amount includes: performing weighted summation of the integral control amount and the proportional control amount to obtain a target control amount; and controlling the controlled object according to the target control amount.
[0093] Exemplarily, the control loop may include an integral controller, a proportional controller and a third operation unit. The integral controller is connected to the third operation unit, and the proportional controller is connected to the third operation unit. The integral controller may transmit the integral control amount to the third operation unit. The proportional controller may transmit the proportional control amount to the third operation unit. The third operation unit may obtain the integral control amount and the proportional control amount, and perform a weighted sum operation on the integral control amount and the proportional control amount to obtain a target control amount. The third control unit may transmit the target control amount to the controlled object to instruct the controlled object to adjust its own state physical quantity according to the target control amount.
[0094] In some embodiments, the servo system can perform weighted summation of the proportional control amount and the integral control amount according to the first weight corresponding to the proportional control amount and the second weight corresponding to the integral control amount to obtain the target control amount. It can be understood that the target control amount is the product of the first weight and the proportional control amount plus the product of the second weight and the integral control amount.
[0095] In some embodiments, controlling the controlled object according to the integral control amount and the proportional control amount includes: summing the integral control amount and the proportional control amount to obtain a target control amount; and controlling the controlled object according to the target control amount.
[0096] It can be understood that the sum can be regarded as a weighted sum when all weights are 1.
[0097] In this embodiment, the integral control amount is obtained based on the second difference amount with more steady-state characteristics, which can ensure the steady-state performance of the control loop, while the proportional control amount is obtained based on the first difference amount with more dynamic characteristics, which can ensure the dynamic performance of the control loop. By summing the integral control amount and the proportional control amount, the target control amount is obtained, which can take into account both the dynamic performance and the steady-state performance of the control loop, and then the controlled object is controlled according to the target control amount, which can ensure control accuracy.
[0098] In some embodiments, the control loop includes a current loop; obtaining a first feedback quantity collected from the controlled object at a calculation time and a reference feedback quantity collected from the controlled object at a non-calculation time, including: obtaining the first feedback quantity obtained by sampling the current of the controlled object in the current loop at the calculation time and the reference feedback quantity obtained by sampling the current of the controlled object at the non-calculation time.
[0099] For example, Figure 3As shown, a current loop of a servo system is provided. In the servo system, a current instruction is transmitted to a first operation unit and a second operation unit in the current loop. The current instruction is a given amount input into the current loop. The acquisition unit in the current loop is connected to the first operation unit and the second operation unit respectively. The acquisition unit can sample the current of the motor at a non-calculation time and a calculation time in a control cycle, and then can feed back the sampled current to the first operation unit and the filter unit. When the calculation time in the control cycle arrives, the servo system can determine the reference feedback amount collected by the acquisition unit at a non-calculation time in the control cycle and the first feedback amount collected by the acquisition unit at a calculation time in the control cycle, transmit the reference feedback amount and the first feedback amount to the filter unit, and transmit the first feedback amount to the first operation unit. The servo system can perform a subtraction operation on the current instruction and the first feedback amount through the first operation unit to obtain a first difference amount. The reference feedback amount and the first feedback amount are averaged and filtered by the filter unit to obtain a second feedback amount. The servo system can transmit the second feedback amount to the second operation unit, and the current instruction and the second feedback amount are subtracted by the second operation unit to obtain a second difference amount. The servo system may transmit the first difference to a proportional controller, and the proportional controller calculates the product of the proportional gain and the second difference to obtain the proportional control amount. The servo system may transmit the second difference to an integral controller to instruct the integral controller to calculate the cumulative amount between the currently acquired second difference and the historical integral amount to obtain the current integral amount, and calculate the product between the integral gain and the integral amount of the second difference to obtain the integral control amount. The servo system may transmit the proportional control amount and the integral control amount to a third operation unit, and the third operation unit sums the proportional control amount and the integral control amount to obtain the target control amount. The servo system may transmit the target control amount to the motor to instruct the motor to adjust its current according to the target control amount.
[0100] In this embodiment, in the servo system, the current loop is the control loop located in the innermost loop, directly controls the current of the controlled object, and has the most direct impact on the dynamic response and output of the controlled object. Therefore, the current loop has high requirements for dynamic performance. However, the current of the controlled object will be affected by various factors such as switches, and there will be large noise. If the current obtained by sampling, that is, the feedback amount, is directly used, the noise therein will enter the entire loop, affecting the steady-state accuracy of the current control. By obtaining the first feedback amount obtained by sampling the current of the controlled object in the current loop at the calculation time and the reference feedback amount obtained by sampling the current of the controlled object in the current loop at the non-calculation time, the reference feedback amount and the first feedback amount are subsequently integrated to obtain the second feedback amount with more steady-state characteristics, and the first difference amount between the given amount and the first feedback amount with more dynamic characteristics is introduced in the proportional control part of the current loop, so as to ensure the dynamic performance of the current loop, and the second difference amount between the given amount and the second feedback amount with more steady-state characteristics is introduced in the integral control part of the current loop, so as to ensure the steady-state performance of the current loop, thereby taking into account the dynamic performance and steady-state performance of the current loop, and improving the control accuracy of the servo system.
[0101] In some embodiments, Figure 4 As shown, a schematic diagram of current loop control is provided. The current difference is obtained by subtracting the current command and the feedback current collected by the collection unit through the subtraction unit, and then the current difference is used as the input of the proportional-integral control unit. After being adjusted by the proportional controller and the integral controller in the proportional-integral control unit, the current difference is summed up through the addition unit and input to the motor, thereby adjusting the size of the current in the motor to achieve the effect that the current of the motor is close to the current command.
[0102] Generally, the transfer function of the proportional-integral control unit is as shown in formula (2).
[0103]
[0104] Among them, K p is the proportional gain. K i is the integral gain. G(s) is the transfer function. s is a complex variable and is a basic element in Laplace transform.
[0105] In some embodiments, in order to address the problem that the dynamic performance and steady-state performance of the current loop cannot be taken into account at the same time, the present application proposes to set two feedback current paths for the proportional controller and the integral controller respectively, and then perform different filtering processing on the feedback currents on these two paths respectively, so as to ensure the dynamic response performance of the proportional control part and the steady-state performance of the integral control part. In this way, the dynamic performance and steady-state performance of the current loop control are taken into account at the same time.
[0106] like Figure 6The feedback current path of the proportional controller and the feedback current path of the integral controller are shown. For the feedback current path of the proportional controller, the current command and the collected feedback current are subtracted by the subtraction unit to obtain a first difference, and the first difference is input into the proportional controller. It can be understood that in the proportional-integral control unit, the proportional control part can be adjusted in real time with the difference between the feedback current and the current command, and the dynamic performance is mainly controlled by the proportional control part. Therefore, for the proportional controller, a real-time feedback current with a smaller delay is required to facilitate the rapid adjustment of the current error, so the unfiltered feedback circuit is given to the feedback current path of the proportional controller.
[0107] For the feedback current path of the integral controller, the feedback current is first filtered by the filter unit, and then the current command and the filtered current are subtracted by the subtraction unit to obtain the second difference, which is input into the integral controller. In the proportional integral control unit, the integral control part is used to reduce the steady-state error so that the current error approaches 0 in the steady state. Therefore, the integral control part has higher requirements for the steady-state accuracy of the feedback current, so the feedback current path of the integral controller uses the filtered current. By separating the feedback current path, the dynamic and steady-state performance of the current loop can be taken into account at the same time.
[0108] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0109] Based on the same inventive concept, the embodiment of the present application also provides a servo system for implementing the servo system control method involved above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more servo system embodiments provided below can refer to the limitations on the servo system control method above, and will not be repeated here.
[0110] In an exemplary embodiment, Figure 5As shown, a servo system 500 is provided, including a control loop; the control loop includes a collection unit 502, a first operation unit 504, a proportional controller 506, a filter unit 508, a second operation unit 510, an integral controller 512 and a third operation unit 514. The collection unit 502 is connected to the filter unit 508 and the first operation unit 504 respectively; the filter unit 508 is connected to the second operation unit 510; the first operation unit 504 is connected to the proportional controller 506; the second operation unit 510 is connected to the integral controller 512; the third operation unit 514 is connected to the integral controller 512 and the proportional controller 506 respectively.
[0111] The collecting unit 502 is used to obtain a first feedback amount collected from the controlled object at a calculation time and a reference feedback amount collected from the controlled object at a non-calculation time.
[0112] The first operation unit 504 is used to determine a first difference between the first feedback amount and the given amount of the control loop.
[0113] The proportional controller 506 is used to determine a proportional control amount that matches the first difference amount according to a proportional control algorithm.
[0114] The filtering unit 508 is used to perform smoothing filtering on the first feedback amount and the reference feedback amount to obtain a second feedback amount.
[0115] The second operation unit 510 is used to determine a second difference between the second feedback amount and the given amount.
[0116] The integral controller 512 is used to determine an integral control amount that matches the second difference amount according to an integral control algorithm.
[0117] The third operation unit 514 is used to control the controlled object according to the integral control amount and the proportional control amount.
[0118] In some embodiments, the acquisition unit 502 is used to obtain a reference feedback amount collected from the controlled object at a non-computational moment within a control cycle; obtain a first feedback amount collected from the controlled object at a calculation moment within the control cycle; wherein the control cycle is used to describe the time interval between two adjacent calculation moments.
[0119] In some embodiments, the proportional controller 506 is used to implement a proportional control algorithm; the proportional controller 506 is specifically used to, when a first difference amount is obtained, weight the first difference amount according to a proportional gain and output a proportional control amount that matches the first difference amount.
[0120] In some embodiments, the filtering unit 508 is used to perform mean filtering on the first feedback amount and the reference feedback amount to obtain the second feedback amount.
[0121] In some embodiments, the integral controller 512 is used to implement an integral control algorithm; the integral controller 512 is specifically used to determine the current integral amount based on the currently acquired second difference amount and the historical integral amount when the second difference amount is obtained, weight the current integral amount according to the integral gain, and output an integral control amount that matches the second difference amount.
[0122] In some embodiments, the third operation unit 514 is used to sum the integral control amount and the proportional control amount to obtain a target control amount; and control the controlled object according to the target control amount.
[0123] In some embodiments, the control loop includes a current loop; an acquisition unit 502 is used to obtain a first feedback amount obtained by sampling the current of the controlled object at a calculation time and a reference feedback amount obtained by sampling the current of the controlled object at a non-calculation time.
[0124] Each unit in the above servo system can be implemented in whole or in part by software, hardware or a combination thereof. Each unit can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the corresponding operations of each unit.
[0125] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store a first feedback amount and a reference feedback amount. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a servo system control method is implemented.
[0126] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 7As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a servo system control method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0127] Those skilled in the art will understand that Figure 6 or Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0128] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0129] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0130] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0131] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, variable resistance memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a quantum computing-based quantity processing logic device, etc., but are not limited to this.
[0132] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0133] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A servo system control method, characterized in that: The method comprises: Acquire a first feedback amount collected from the controlled object at a calculation time and a reference feedback amount collected from the controlled object at a non-calculation time; determining a first difference between the first feedback amount and a given amount of the control loop; Determining a proportional control amount that matches the first difference amount according to a proportional control algorithm; Performing smoothing filtering on the first feedback amount and the reference feedback amount to obtain a second feedback amount; determining a second difference between the second feedback amount and the given amount; Determining an integral control amount matching the second difference amount according to an integral control algorithm; The controlled object is controlled according to the integral control amount and the proportional control amount.
2. The method according to claim 1, characterized in that The obtaining of a first feedback amount collected from the controlled object at a calculation time and a reference feedback amount collected from the controlled object at a non-calculation time includes: Obtain reference feedback collected from the controlled object at non-computational moments within a control cycle; A first feedback amount collected from the controlled object at a calculation moment within the control cycle is obtained; wherein the control cycle is used to describe the time interval between two adjacent calculation moments.
3. The method according to claim 1, characterized in that The control loop includes a proportional controller for implementing the proportional control algorithm; the determining of the proportional control amount matching the first difference amount according to the proportional control algorithm includes: The first difference amount is weighted by the proportional controller according to the proportional gain to obtain a proportional control amount matching the first difference amount.
4. The method according to claim 1, characterized in that: The step of smoothing and filtering the first feedback amount and the reference feedback amount to obtain a second feedback amount includes: Mean filtering is performed on the first feedback amount and the reference feedback amount to obtain a second feedback amount.
5. The method according to claim 1, characterized in that The control loop includes an integral controller for implementing the integral control algorithm; the step of determining the integral control amount matching the second difference amount according to the integral control algorithm includes: The integral controller determines a current integral amount according to the second difference amount and the historical integral amount, and weights the current integral amount according to the integral gain to obtain an integral control amount matching the second difference amount.
6. The method according to claim 1, characterized in that The controlling the controlled object according to the integral control amount and the proportional control amount includes: Summing the integral control amount and the proportional control amount to obtain a target control amount; The controlled object is controlled according to the target control amount.
7. The method according to any one of claims 1 to 6, characterized in that: The control loop includes a current loop; the obtaining of a first feedback amount collected from the controlled object at a calculation time and a reference feedback amount collected from the controlled object at a non-calculation time includes: A first feedback amount obtained by sampling the current of a controlled object in a current loop at a calculation time and a reference feedback amount obtained by sampling the current of the controlled object at a non-calculation time are obtained.
8. A servo system, characterized in that: The servo system comprises an acquisition unit, a first operation unit, a proportional controller, a filtering unit, a second operation unit, an integral controller and a third operation unit; wherein the acquisition unit is connected to the filtering unit and the first operation unit respectively; the filtering unit is connected to the second operation unit; the first operation unit is connected to the proportional controller; the second operation unit is connected to the integral controller; the third operation unit is connected to the integral controller and the proportional controller respectively; The acquisition unit is used to acquire a first feedback amount collected from the controlled object at a calculation time and a reference feedback amount collected from the controlled object at a non-calculation time; The first operation unit is used to determine a first difference between the first feedback amount and a given amount of the control loop; The proportional controller is used to determine a proportional control amount matching the first difference amount according to a proportional control algorithm; The filtering unit is used to perform smoothing filtering on the first feedback amount and the reference feedback amount to obtain a second feedback amount; The second operation unit is used to determine a second difference between the second feedback amount and the given amount; The integral controller is used to determine an integral control amount matching the second difference amount according to an integral control algorithm; The third operation unit is used to control the controlled object according to the integral control amount and the proportional control amount.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
