Servo parameter determination method, servo driver and storage medium
By adaptively adjusting the load parameters of the servo system, the automated servo parameter determination is solved, and the problems of high labor and time costs in the existing technology are suitable for servo systems in different application scenarios.
Patent Information
- Application Number
- CN202411673196.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-20
AI Technical Summary
The debugging parameters of existing servo systems in different application scenarios requires high labor and time costs, and users need to understand the principles of servo control and the impact of various factors.
By obtaining the input signal and inputting it into the servo system, iteratively process iteratively based on the target model and the reference load model, the load parameters are adaptively adjusted, thereby determining the resonance parameter value, and automatic servo parameter determination is realized.
Automatically identify resonance point in a few seconds, reducing labor and time costs, and no manual operation or user input parameters are required, suitable for servo systems in different application scenarios.
Smart Images

Figure CN119620587A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a servo parameter determination method, a servo driver and a storage medium. Background Art
[0002] The servo system has the characteristics of high control accuracy, strong overload capacity, fast response speed, high power density and wide speed regulation range, and is widely used in various fields of the automation industry, such as robots, automated production lines, CNC machine tools, textile equipment, medical machinery, semiconductor manufacturing, etc. However, the application scenarios in various fields are different, and the common transmission mechanisms are different, such as direct drive, screw drive, pulley drive, gear rack drive, multi-stage connection drive, etc. The common load inertia ratio has a large range of variation, and the inertia ratio is generally between 0 and 200. The common load operation space distribution is different, such as horizontal XY operation (load is not affected by gravity), vertical Z direction (load is affected by gravity), simple pendulum operation (load changes with angle), etc.
[0003] Therefore, the servo drive provides a parameter adjustment interface, and users can adjust the parameters according to the actual operating conditions in order to make the servo system achieve a certain degree of responsiveness and stability. However, parameter adjustment requires not only an understanding of the servo control principle, but also a clear understanding of how each factor affects the application effect, which greatly increases the requirements for application personnel and requires high human and time costs. Summary of the invention
[0004] Based on this, it is necessary to provide a servo parameter determination method, a servo driver and a storage medium to address the above technical problems, which can reduce labor costs and time costs.
[0005] A servo parameter determination method is applied to a servo drive, the method comprising:
[0006] Acquire a first input signal, input the first input signal into a first servo system, and obtain a first output signal;
[0007] Performing iterative processing based on a target model determined by the first input signal and the first output signal, and a reference load model of the first servo system, and obtaining a load parameter value of the reference load model when an iteration condition is met;
[0008] Based on the relationship between the load parameter and the resonance parameter and the load parameter value, a resonance parameter value of the first servo system is determined.
[0009] A servo driver comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of each servo parameter determination method embodiment when executing the computer program.
[0010] A computer-readable storage medium stores a computer program, which implements the steps of each servo parameter determination method embodiment when the computer program is executed by a processor.
[0011] The above-mentioned servo parameter determination method, servo driver and storage medium obtain a first output signal by inputting a first input signal into a first servo system, and iteratively processes a target model determined by the first input signal and the first output signal, and a reference load model, thereby obtaining a load parameter value of the reference load model, and determining a resonance parameter value based on the load parameter value, that is, adaptively adjusting the load model parameters according to the servo system under actual working conditions, and can automatically complete the resonance point identification according to the working conditions within a few seconds, and no manual operation is required during the servo parameter determination process, and the user does not need to input any parameters, and the identification can be completed with one click, reducing the labor cost and time cost of servo parameter determination. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A diagram showing an application environment of a servo parameter determination method in one embodiment;
[0013] Figure 2 is a flow chart of a method for determining servo parameters in one embodiment;
[0014] Figure 3 is a schematic structural diagram of a first servo system in one embodiment;
[0015] Figure 4 is a schematic structural diagram of a second servo system in one embodiment;
[0016] Figure 5 FIG. 4 is a schematic diagram of the structure of a second servo system in another embodiment. DETAILED DESCRIPTION
[0017] 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.
[0018] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0019] It should be noted that all directional indications in the embodiments of the present application (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly. The connection can be a direct connection or an indirect connection.
[0020] In addition, in this application, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0021] As used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, a first servo system may be referred to as a second servo system, and similarly, a second servo system may be referred to as a first servo system without departing from the scope of this application. Both the first servo system and the second servo system are servo systems, but they are not the same servo system.
[0022] It can be understood that the “connection” in the following embodiments should be understood as “electrical connection”, “communication connection”, etc. if the connected circuits, modules, units, etc. have electrical signals or data transmission between each other.
[0023] The servo parameter determination method provided in this application can be applied to Figure 1 application environment. Figure 1 FIG. 1 is an application environment diagram of a servo parameter determination method in an embodiment. The servo driver 110, the second servo system 120 and the first servo system 130 are included. The second servo system 120 and the first servo system 130 are both hardware systems. The second servo system 120 includes the hardware of the first servo system 130.
[0024] In one embodiment, Figure 2 FIG. 1 is a flow chart of a method for determining servo parameters in an embodiment, which is applied to a servo drive as an example and includes the following steps:
[0025] Step 202: Acquire a first input signal, input the first input signal into a first servo system, and obtain a first output signal.
[0026] The servo driver adopts an open-loop excitation mode. The first input signal may be an excitation signal. The amplitude of the excitation signal is preferably 10% to 50% of the rated current. The first servo system refers to a physical hardware servo system.
[0027] It can be understood that the first input signal can be a time domain signal or a frequency domain signal. Similarly, the first output signal can be a time domain signal or a frequency domain signal. The first input signal refers to a signal input to the first servo system, and the first output signal is a signal output after the first input signal passes through the first servo system. When the first input signal is a time domain signal, the first output signal is a time domain signal; when the first input signal is a frequency domain signal, the first output signal is a frequency domain signal.
[0028] Specifically, the first input signal is input into the first servo system to obtain the first output signal, thereby obtaining a true servo system response.
[0029] Step 204 , performing iterative processing based on the target model determined by the first input signal and the first output signal, and the reference load model of the first servo system, and obtaining the load parameter value of the reference load model when the iteration condition is met.
[0030] The target model determined by the first input signal and the first output signal refers to a model that characterizes the load, and may specifically be a model characterized by the ratio of the first output signal to the first input signal.
[0031] The reference load model is a common model in servo drives, but the load parameter values are not determined.
[0032] Figure 3 FIG. 4 is a schematic diagram of the structure of a first servo system in an embodiment. Figure 3 The current loop model G i (s) and load model G(s). The excitation input is the first input signal R(s), and the speed output is the first output signal C(s). i When G(s) is 1, the load model can be obtained by dividing the first output signal C(s) and R(s). i (s) may also not be 1, which does not affect obtaining the minimum value of the objective function.
[0033] The expression for constructing the reference load model G(s) of the first servo system is:
[0034]
[0035] Where s is a complex variable related to frequency, s = jω(k); m and n are the model orders, which can be selected according to needs, and the preferred model order is m = 6 and n = 7; (a1a2a3...a n ) and (b1b2b3…b m+1 ) is the load parameter to be determined.
[0036] Specifically, an iterative process can be performed based on the objective function between the target model and the reference load model. When the iteration condition is met, the load parameter value of the reference load model is obtained. The servo drive can iteratively solve the objective function by the gradient descent method, etc. The iteration condition is to obtain the minimum value of the objective function. Specifically, the number of iterations reaches a preset number of times and the minimum value is taken, or the iteration time reaches a preset time and the minimum value is taken, etc. When the minimum value of the objective function is obtained, the load parameter value corresponding to the minimum value of the objective function is obtained. The objective function is used to represent the difference between the reference load model and the target model.
[0037] Optionally, the objective function Z for calculating the difference between the target model g(ω(k)) and the reference load model G(jω(k)) may be:
[0038]
[0039]
[0040] Wherein, k is the number of sampling points, ω(l) is the frequency corresponding to the sampling point k, the first input signal is R(ω(k)), and the first output signal is C(ω(k)).
[0041] Step 206 : Determine the resonance parameter value of the first servo system based on the relationship between the load parameter and the resonance parameter and the load parameter value.
[0042] The relationship between the load parameter and the resonance parameter is the relationship between the value of s when the denominator of the reference load model G(s) containing the load parameter is 0 and the resonance parameter. The resonance parameter includes a resonance frequency parameter and may also include a damping ratio parameter. Then the resonance parameter value may include a resonance frequency parameter value and may also include a damping ratio value.
[0043] Specifically, after the load parameter value is solved, take the denominator part s of the reference load model G(s) n +a1s n-1 +a2s n -2 ……+a n When the denominator is 0, the value of s is obtained. The resonance parameter value of the first servo system is obtained through the relationship between the value of s and the resonance parameter.
[0044] The servo parameter determination method in this embodiment obtains a first output signal by inputting a first input signal into a first servo system, and performs iterative processing based on a target model determined by the first input signal and the first output signal, and a reference load model, so as to obtain a load parameter value of the reference load model, and determine a resonance parameter value according to the load parameter value, that is, adaptively adjust the load model parameters according to the servo system under actual working conditions, and can automatically complete the resonance point identification according to the working conditions within a few seconds, and no manual operation is required during the servo parameter determination process, and the user does not need to input any parameters, and the identification can be completed with one click, thereby reducing the labor cost and time cost of servo parameter determination; in addition, it can be completed inside the servo drive, adapted to the processing capability of the servo drive, and no host computer participation is required.
[0045] In one embodiment, the first input signal includes an M-sequence signal or a Chirp signal.
[0046] Specifically, M-sequence (Maximum length sequence, MLS) is a virtual random digital signal in basic communication circuit design. M-sequence signals contain signals with different frequencies. Chirp signals are signals whose frequency changes over time.
[0047] In this embodiment, the resonance parameters of the servo system parameters are found by rotating the motor in the traditional way, which causes the machine to collide and be damaged. However, since both the M-sequence signal and the Chirp signal are high-frequency injection signals, by inputting the M-sequence signal or the Chirp signal, the servo system has basically no running distance, which greatly reduces the possibility of machine collision and damage to equipment or injury to people.
[0048] In one embodiment, based on the relationship between the load parameter and the resonance parameter and the load parameter value, determining the resonance parameter value of the first servo system includes: constructing a companion matrix of the load parameter value; diagonalizing the companion matrix to obtain conjugate eigenvalues; and determining the resonance parameter value of the servo system based on the relationship between the conjugate eigenvalues and the resonance parameter.
[0049] Specifically, the resonance parameter value includes the resonance frequency value and the damping ratio value. Take the denominator s of the reference load model G(s) n +a1s n-1 +a2s n-2 ……+a n Construct the characteristic polynomial and take the load parameter values a1, a2, ... a n Construct the partner matrix A, diagonalize the partner matrix, and obtain the conjugate eigenvalues s1 and s2.
[0050]
[0051] Diagonalizing the partner matrix can yield the conjugate eigenvalues s1 and s2.
[0052] According to the conjugate eigenvalues s1 and s2 and the resonance frequency ω n The relationship between the damping ratio ξ is:
[0053]
[0054] There are two unknowns in the equation n If there is a conjugate complex solution, that is, ξ<1, then the resonant frequency value ω can be solved. n and the value of the damping ratio ξ. Where ξ<1 is an underdamped system and the system will vibrate. It can be understood that if there is no conjugate solution, there is no resonance point.
[0055] In this embodiment, a companion matrix of the load parameter value is constructed and diagonalized to obtain conjugate eigenvalues, thereby determining the resonant frequency value of the servo system. Converting complex multi-order polynomials into matrix operations can greatly increase the speed of obtaining the resonant parameter value and reduce the servo parameter determination time.
[0056] In one embodiment, performing iterative processing based on a target model determined by the first input signal and the first output signal, and a reference load model of the first servo system, and obtaining a load parameter value of the reference load model when an iteration condition is met, includes:
[0057] Acquire the frequency of the sampling point and the value of the target model determined based on the first input signal and the first output signal corresponding to the frequency;
[0058] Fitting the frequency of the sampling point and the corresponding value of the target model to obtain the initial load value of the reference load model;
[0059] Iteration is performed based on the target model and the reference load model into which the initial load value is substituted, and when the iteration condition is met, the load parameter value of the reference load model is obtained.
[0060] Specifically, the target model g(ω(k)) is
[0061]
[0062] Then, given the frequency ω(k) of the sampling point k, and the corresponding first input signal and first output signal, the value of the target model g(ω(k)) can be obtained, thereby obtaining multiple scattered points. By fitting the multiple scattered points, the initial load value of the reference load model can be obtained. The fitting method is not limited and can be the least square method, interpolation method, etc.
[0063] The servo drive performs iterative processing based on an objective function between the target model and a reference load model into which the initial load value is substituted, and when an iteration condition is met, a load parameter value of the reference load model is obtained.
[0064] In this embodiment, the reference load model contains a large number of load parameter values, so an initial load value should be given to make the parameter iteration process faster. The initial parameter value of the reference load model can be obtained by fitting as a reference value. Subsequent iterations can greatly reduce the iteration time, thereby reducing the servo parameter determination time.
[0065] In one embodiment, the first input signal is a first time domain input signal, the first output signal is a first time domain output signal, and the first time domain input signal and the first time domain output signal have both had DC components removed;
[0066] Iterative processing is performed based on a target model determined by the first input signal and the first output signal, and a reference load model of the first servo system, and when an iteration condition is met, a load parameter value of the reference load model is obtained, including:
[0067] Performing Fourier transform on the first time domain input signal to obtain a first frequency domain input signal;
[0068] Performing Fourier transform on the first time domain output signal to obtain a first frequency domain output signal;
[0069] Based on the target model determined by the first frequency domain input signal and the first frequency domain output signal, iterative processing is performed with the first servo system and the reference load model, and when the iteration condition is met, the load parameter value of the reference load model is obtained.
[0070] The DC component of the first time domain input signal can be removed before it is input into the first servo system, and the DC component of the first time domain output signal is also removed. Alternatively, the DC component of the first time domain input signal is removed after it is input into the first servo system, and the DC component of the first time domain output signal is also removed.
[0071] Specifically, the servo driver performs Fourier transform on the first time domain input signal R(t) to obtain the first frequency domain input signal R(s); and performs Fourier transform on the first time domain output signal C(t) to obtain the first frequency domain output signal C(s). The servo driver performs iterative processing based on the target model determined by the first frequency domain input signal R(s) and the first frequency domain output signal C(s), and the reference load model, and when the iteration condition is met, the load parameter value of the reference load model in the frequency domain space is obtained.
[0072] In this embodiment, since the servo system generally performs transformation calculations based on the time domain, the first time domain input signal is input into the first servo system to obtain a first time domain output signal, which can be adapted to most servo systems, and the DC component is removed in the time domain before Fourier transform is performed, retaining only the frequency change part, reflecting the frequency characteristics of the servo system, and will not affect the result of the load parameter value.
[0073] In one embodiment, the method for determining the servo parameters further includes: obtaining a torque coefficient and an equivalent delay time of a current loop; and determining an inertia ratio of the first servo system based on the first input signal, the first output signal, the torque coefficient and the equivalent delay time of the current loop.
[0074] Specifically, the inertia ratio should be a constant. However, at different frequencies, the inertia ratio will fluctuate, causing the inertia ratio to change. After many experiments and studies, it was found that when the motor frequency f is less than the preset frequency (such as 40Hz, 50Hz, 60Hz, etc.), the reference load model can be simplified, and the inertia ratio calculated by the simplified reference load model is basically the same as the actual measured inertia ratio. The simplified reference load model is
[0075]
[0076] Among them, k t is the torque coefficient (constant), T c is the current loop equivalent delay time (constant), and J is the inertia ratio.
[0077] Then the inertia ratio J is
[0078]
[0079] There is only one variable s in the above expression, but since the inertia ratio J is a constant, s can actually take any data within the preset frequency range (except 0), and the corresponding J value can be calculated to obtain the inertia ratio of the servo system.
[0080] In this embodiment, since the inertia ratio is a constant, the calculation of the inertia ratio can be simplified through the first input signal, the first output signal, the torque coefficient and the current loop equivalent delay time, the inertia ratio can be quickly obtained, and the servo parameter determination time can be reduced.
[0081] In one embodiment, the servo parameter determination method further includes: inputting the load parameter value and the resonance parameter value into a second servo system, adjusting the parameters in the second servo system, and after the adjustment, determining the phase margin and amplitude margin corresponding to the second servo system; the second servo system includes the first servo system;
[0082] When the phase margin meets the preset phase margin condition and the amplitude margin meets the preset amplitude margin condition, the corresponding servo parameter value is used as the parameter value of the second servo system to obtain the adjusted second servo system. The first servo system may only include the current loop model and the load model, while the second servo system includes the first servo system and may also include other components, including but not limited to a speed controller, a current command filter, a notch filter, a speed feedback filter, etc., which are specifically set according to the requirements. Figure 4 FIG. 1 is a schematic diagram of the structure of a second servo system in an embodiment. Figure 4 Including the connected speed controller G pi (s), current command filter G lpf (s), notch filter G notch (s), current loop model G j (s), load model G(s), and speed feedback filter Gspd lpf (s). At this time, the second servo system has no actual input, and the parameters of the second servo system are adjusted based on the first input signal and the first output signal of the first servo system, thereby avoiding the phenomenon that the system is out of control and the machine collides to damage the equipment or injure people when the system parameters have not been adjusted.
[0083] In this embodiment, the second servo system includes a connected speed controller, a command filter, a notch filter, a current loop model, and a load model, and the input end of the speed feedback filter is connected to the output end of the load model, and the output end of the feedback filter is connected to the speed controller.
[0084] Assuming the speed controller is a conventional PI controller, the speed control model expression is:
[0085]
[0086] Among them, k p is the proportional gain, k i is the integral gain.
[0087] The current command transfer function corresponding to the command filter is:
[0088]
[0089] Among them, T lpf It is the torque command filtering time.
[0090] The transfer function of the notch filter is
[0091]
[0092] ω n is the resonant frequency value, ξ is the damping ratio, and ξ2 is the notch filter coefficient.n and ξ are resonance parameter values and are known when calculating the first servo system.
[0093] The speed feedback filter function is:
[0094]
[0095] Among them, Tspd lpf It is the speed feedback filter time.
[0096] The speed loop open-loop model of the second servo system is:
[0097]
[0098] Therefore, the speed open-loop model is a complex number, and its phase margin and amplitude margin can be obtained. The phase margin is G c (s), the amplitude margin is G c The preset phase margin condition may be that the phase margin is between 30° and 60°. The preset amplitude margin condition may be that the amplitude margin is greater than 6 dB.
[0099] Then, the load parameter value and the resonance parameter value are input into the second servo system, and the parameters in the second servo system are adjusted. After each adjustment, the phase margin and amplitude margin corresponding to the second servo system are determined. The adjustment method can be implemented by traversal method, genetic algorithm, other intelligent optimization algorithms, etc. The adjusted parameters can be parameters other than the load parameter value and the resonance parameter value, such as the proportional gain k p , integral gain k i , notch filter coefficient ξ2, torque command filter time T lpf and speed feedback filter time Tspd lpf .
[0100] When the phase margin reaches the preset phase margin condition and the amplitude margin reaches the preset amplitude margin condition, it means that the parameters in the second servo system have met the servo drive conditions. Therefore, the corresponding servo parameter value at this time is used as the parameter value in the second servo system to obtain the adjusted second servo system.
[0101] In this embodiment, appropriate phase margin and amplitude margin can prevent the influence caused by aging of components in the servo system. In order to obtain satisfactory performance, both the phase margin and the amplitude margin should meet corresponding conditions. Then, by adjusting the parameters in the second servo system and determining the corresponding phase margin and amplitude margin, it is possible to self-adjust to obtain parameters that meet the performance of the servo system and greatly reduce the time spent on parameter adjustment.
[0102] In one embodiment, the servo parameter determination method further includes: inputting a second input signal into a second servo system to obtain a second output signal;
[0103] determining a system characteristic of the second servo system based on the second input signal and the second output signal, and determining a phase margin and an amplitude margin of the system characteristic;
[0104] When the phase margin of the system characteristic does not satisfy the preset phase margin condition or the amplitude margin of the system characteristic does not satisfy the preset amplitude margin, adjusting the parameters of the adjusted second servo system to determine the reference phase margin and reference amplitude margin after the parameter adjustment;
[0105] When the reference phase angle margin satisfies a preset phase angle margin condition and the reference amplitude margin reaches a preset amplitude margin condition, a target servo parameter value of the second servo system is obtained.
[0106] The second input signal refers to the signal input to the second servo system. The second input signal may also be an M sequence signal or a Chirp signal. The second output signal refers to the signal output by the second servo system. Figure 5 FIG. 2 is a schematic diagram of the structure of a second servo system in another embodiment. Figure 5 Including the connected speed controller G pi (s), current command filter G lpf (s), notch filter G notch (s), current loop model G j (s), load model G(s), and speed feedback filter Gspd lpf (s). At this time, the second servo system has an excitation input, namely, a second input signal R′(s), and after the response of the second servo system, a second output signal C′(s) is obtained. Moreover, since the servo parameter value corresponding to the second servo system has been obtained before this, a relatively accurate servo parameter value has been obtained before the second adjustment (fine-tuning), so the problem of large vibration can be avoided when running the second servo system at this time; and there are still some differences between the servo model after the first adjustment and the servo model actually running. Subsequently, inputting the second input signal is equivalent to fine-tuning the second servo system during the actual operation process, and the target servo parameter value can be obtained according to the actual working conditions, thereby improving the accuracy of the obtained target servo parameter value.
[0107] Specifically, the second servo system in this embodiment is a hardware system. The second input signal is input into the second servo system to obtain a second output signal. The system characteristics of the second servo system are determined according to the second input signal and the second output signal. The system characteristics can be open-loop characteristics or closed-loop characteristics. In this embodiment, the open-loop characteristics are used as an example for description.
[0108] The closed-loop response G of the second servo system o (s)
[0109]
[0110] Wherein, R′(s) is the second input signal, and C′(s) is the second output signal.
[0111] The system open loop characteristic G of the second servo system c (s)
[0112]
[0113] The corresponding phase margin and amplitude margin can be determined by the system open-loop characteristic. When the phase margin of the system open-loop characteristic satisfies the preset phase margin condition and the amplitude margin satisfies the preset amplitude margin condition, the servo parameter value can be used as the target parameter value of the second servo system.
[0114] When any one of the phase margin and amplitude margin of the open-loop characteristic does not meet the corresponding conditions, it means that the parameters of the second servo system are not enough to meet the actual operation requirements, so the parameters need to be adjusted for the second time. Then the servo driver adjusts the parameters of the adjusted second servo system to determine the reference phase margin and reference amplitude margin after the parameter adjustment; judges whether the reference phase margin and reference amplitude margin meet the corresponding conditions, and returns to the step of adjusting the parameters of the adjusted second servo system if they do not meet the conditions, until the reference phase margin meets the preset phase margin condition and the reference amplitude margin reaches the preset amplitude margin condition, and the target servo parameter value of the second servo system is obtained.
[0115] In this embodiment, the second input signal is input into the second servo system to obtain the actual second output signal, and the coarsely adjusted second servo system is further fine-tuned according to the actual working conditions. No manual operation is required, and self-adjustment can be achieved with one button. It fits the actual working conditions, and the target servo parameter value obtained is more accurate.
[0116] In one embodiment, the conventional servo parameter determination method is to find the resonance parameter value by controlling the rotation of the motor. This method requires the servo system to be run during the actual debugging process. When the system parameters have not been adjusted, it is very easy for the system to lose control, causing the machine to collide and damage the equipment or injure people. Therefore, the servo parameter determination method in this embodiment is proposed to solve the problem of automatically debugging satisfactory setting parameters in a more applicable, safer and faster manner under different application scenarios in various fields.
[0117] 1. Model identification - resonance point identification and inertia identification
[0118] 1. Model identification input: The servo drive adopts open-loop excitation mode. Read the rated current I of the servo motor in the servo system. The amplitude of the excitation current is preferably 10% to 50% of the excitation current. The excitation signal type can be M sequence or Chirp signal. Model identification output: servo drive speed feedback.
[0119] 2. The expression of the reference load model G(s) of the first servo system is constructed as follows:
[0120]
[0121] Where s is a complex variable related to frequency, s = jω(k); m and n are the model orders, which can be selected according to needs, and the preferred model order is m = 6 and n = 7; (a1a2a3...a n ) and (b1b2b3…b m+1 ) is the load parameter to be determined.
[0122] 3. Model parameter solution: Perform Fourier transform on the first input signal R(t) to obtain R(s), and perform Fourier transform on the first output signal C(t) to obtain C(s). The initial load value of the model can be estimated by the frequency domain least squares method, and then the load parameters (a1a2a3…a n ) and (b1b2b3…b m+1 ). The objective function Z used to calculate the difference between the target model g(ω(k)) and the reference load model G(jω(k)) can be:
[0123]
[0124] Wherein, k is the number of sampling points, ω(k) is the frequency corresponding to the sampling point k, the first input signal is R(ω(k)), and the first output signal is C(ω(k)).
[0125] 4. Solving the resonance point: After the model parameters are solved, take the denominator part s of G(s) n +a1s n-1 +a2s n-2 ......+a n Construct the characteristic polynomial and take the load parameter values a1, a2, ... a n Construct the partner matrix A, diagonalize the partner matrix, obtain the solutions s1 and s2 of the characteristic equation, and finally obtain the resonance point.
[0126]
[0127] Find the conjugate eigenvalue of A
[0128]
[0129]
[0130] If ξ<1, the resonant frequency ω can be solved n and the value of the damping ratio ξ.
[0131] 5. Inertia ratio solution: When the frequency f is less than 50Hz, the simplified load model is:
[0132]
[0133] Among them, k t is the torque coefficient (constant), T c is the current loop equivalent delay time (constant), and J is the inertia ratio.
[0134] Then the inertia ratio J is
[0135]
[0136] Take s in the range of 0-50Hz to calculate the J value, and you can get the inertia ratio of the servo system.
[0137] 2. Speed closed-loop controller parameter preset
[0138] Assuming the speed controller is a conventional PI controller, the speed control model expression is:
[0139]
[0140] Among them, k p is the proportional gain, k i is the integral gain.
[0141] The current command transfer function corresponding to the command filter is:
[0142]
[0143] Among them, T lpf It is the torque command filtering time.
[0144] The transfer function of the notch filter is
[0145]
[0146] ω n is the resonant frequency value, ξ is the damping ratio, and ξ2 is the notch filter coefficient. n and ξ adopt the previous model identification results.
[0147] The speed feedback filter function is:
[0148]
[0149] Among them, Tspd lpf It is the speed feedback filter time.
[0150] The speed loop open-loop model of the second servo system is:
[0151]
[0152] Appropriate phase margin and amplitude margin can prevent the impact of component aging in the system. In order to obtain satisfactory performance, G c The phase margin of (s) should be between 30° and 60°, and the amplitude margin should be greater than 6dB.
[0153] To meet the stability requirements, the proportional gain k p , integral gain k i , notch filter coefficient ξ2, torque command filter time T lpf and speed feedback filter time Tspd lpf After parameter optimization, the parameters are preset. The optimization scheme can be implemented by traversal method, genetic algorithm, or other intelligent optimization algorithms.
[0154] 3. Speed closed-loop controller parameter check
[0155] 1. Model identification input: The servo drive adopts a closed-loop excitation mode. Read the rated current I of the servo motor in the servo system. The amplitude of the excitation current is preferably 10% to 50% of the excitation current. The excitation signal type can be an M sequence or a Chirp signal. Model identification output: The servo drive controller outputs the second output signal G pi (s).
[0156] 2. Perform fft transformation on the input signal R(t) to obtain R(s), and perform fft transformation on the output signal C(t) to obtain the closed-loop response G of the system. o (s)
[0157]
[0158] Wherein, R′(s) is the second input signal, and C′(s) is the second output signal.
[0159] System characteristics G of the second servo system c (s)
[0160]
[0161] Note: The servo parameters involved in the closed loop and open loop of the system are consistent, and the use of closed loop or open loop does not affect the parameter adjustment.
[0162] 3. According to the parameters set in the previous step, the speed controller is set to a conventional PI controller, and the speed control model expression is
[0163]
[0164] The current command transfer function corresponding to the command filter is:
[0165]
[0166] The transfer function of the notch filter is
[0167]
[0168] The speed feedback filter function is:
[0169]
[0170] Proportional gain k o , integral gain k i , notch filter coefficient ξ2, torque command filter time T lpf and speed feedback filter time Tspd lpf The parameters are optimized for fine-tuning to meet the open-loop system stability margin requirements of an amplitude margin greater than 6dB and a phase margin between 30° and 60°.
[0171] Then through the above method, the following effects can be achieved:
[0172] 1. The entire controller parameter setting time only takes more than 10 seconds to automatically complete the resonance point identification, inertia identification, speed loop controller, command filter, and speed feedback filter settings according to the working environment, and the manpower cost and time cost that need to be invested are effectively controlled.
[0173] 2. The input signal is a Chirp or M sequence signal, which is a high-frequency injection signal. The servo system has basically no running distance, which greatly reduces the possibility of machine collision, damage to equipment or injury to people.
[0174] 3. It can meet the different load operation space distribution. When the load is running, if the gravity changes, the integral term of the PI regulator will automatically adjust according to the speed deviation, without considering the change of gravity. Since the integral link has been adjusting the output, it has the advantage of automatic adjustment. Removing the DC component in the input and output results before Fourier transform will not affect the identification results.
[0175] 4. The servo system completes the identification with one click during the gain parameter self-tuning process, without the user having to input any parameters, and it is completed inside the servo drive without the involvement of the host computer.
[0176] In one embodiment, a servo parameter determination method includes:
[0177] Step (a1), obtaining a first input signal, inputting the first input signal into a first servo system, and obtaining a first output signal. The first input signal includes an M sequence signal or a Chirp signal.
[0178] Step (a2), obtaining the frequency of the sampling point and the value of the target model determined based on the first input signal and the first output signal corresponding to the frequency.
[0179] Step (a3), fitting the frequency of the sampling point and the corresponding value of the target load model to obtain the initial load value of the reference load model.
[0180] Step (a4), performing Fourier transform on the first time domain input signal to obtain a first frequency domain input signal.
[0181] Step (a5), performing Fourier transform on the first time domain output signal to obtain a first frequency domain output signal.
[0182] Step (a6) performs iterative processing based on the target model determined by the first frequency domain input signal and the first frequency domain output signal, and the reference load model of the first servo system with the initial load value substituted, and when the iteration condition is met, obtains the load parameter value of the reference load model.
[0183] Step (a7), construct a companion matrix of load parameter values.
[0184] Step (a8), diagonalize the partner matrix to obtain the conjugate eigenvalues.
[0185] Step (a9), determining the resonance parameter value of the servo system based on the relationship between the conjugate eigenvalue and the resonance parameter.
[0186] Step (a10), obtaining the torque coefficient and the current loop equivalent delay time.
[0187] Step (a11), determining the inertia ratio of the first servo system based on the first input signal, the first output signal, the torque coefficient and the current loop equivalent delay time.
[0188] Step (a12), inputting the load parameter value and the resonance parameter value into the second servo system, adjusting the parameters in the second servo system, and after the adjustment, determining the phase margin and amplitude margin corresponding to the second servo system; the second servo system includes the first servo system.
[0189] Step (a13), when the phase margin satisfies a preset phase margin condition and the amplitude margin satisfies a preset amplitude margin condition, the corresponding servo parameter value is used as the parameter value of the second servo system to obtain an adjusted second servo system.
[0190] Step (a14), inputting the second input signal into the second servo system to obtain a second output signal.
[0191] Step (a15), determining the system characteristics of the second servo system based on the second input signal and the second output signal, and determining the phase margin and amplitude margin of the system characteristics.
[0192] Step (a16), when the phase margin of the system characteristic does not meet the preset phase margin condition or the amplitude margin of the system characteristic does not meet the preset amplitude margin, the adjusted second servo system is parameter adjusted to determine the reference phase margin and reference amplitude margin after the parameter adjustment.
[0193] Step (a17), when the reference phase angle margin satisfies a preset phase angle margin condition and the reference amplitude margin reaches a preset amplitude margin condition, a target servo parameter value of the second servo system is obtained.
[0194] In this embodiment, a first output signal is obtained by inputting a first input signal into a first servo system, and an iterative processing is performed based on a target model determined by the first input signal and the first output signal, and a reference load model, so as to obtain a load parameter value of the reference load model, and determine a resonance parameter value according to the load parameter value, that is, adaptive adjustment of the load model parameters is performed according to the servo system under actual working conditions, and the resonance point identification can be automatically completed within a few seconds according to the working conditions. In addition, no manual operation is required during the servo parameter determination process, and the user does not need to input any parameters. The identification can be completed with one click, thereby reducing the labor cost and time cost of determining the servo parameters. In addition, it can be completed inside the servo drive, adapted to the processing capability of the servo drive, and no host computer participation is required.
[0195] It should be understood that although the above Figure 2 In the flowchart, each step is shown in sequence as indicated by the arrows, and each step from step (a1) to step (a17) is shown in sequence as indicated by the numbers, but these steps are not necessarily performed in the order indicated by the arrows or numbers. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be performed in other orders. Moreover, Figure 2 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0196] In one embodiment, a servo drive is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
[0197] 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 of the above-mentioned method embodiments are implemented.
[0198] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-mentioned method embodiments.
[0199] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods 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 in the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. 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).
[0200] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for determining servo parameters, characterized in that: Applied to a servo drive, the method comprises: Acquire a first input signal, input the first input signal into a first servo system, and obtain a first output signal; Performing iterative processing based on a target model determined by the first input signal and the first output signal, and a reference load model of the first servo system, and obtaining a load parameter value of the reference load model when an iteration condition is met; Based on the relationship between the load parameter and the resonance parameter and the load parameter value, a resonance parameter value of the first servo system is determined.
2. The method according to claim 1, characterized in that The first input signal includes an M-sequence signal or a Chirp signal.
3. The method according to claim 1, characterized in that The determining the resonance parameter value of the first servo system based on the relationship between the load parameter and the resonance parameter and the load parameter value comprises: constructing a companion matrix of the load parameter values; Diagonalizing the partner matrix to obtain conjugate eigenvalues; Based on the relationship between the conjugate eigenvalue and the resonance parameter, a resonance parameter value of the servo system is determined.
4. The method according to claim 1, characterized in that The target model determined based on the first input signal and the first output signal and the reference load model of the first servo system are iteratively processed, and when an iteration condition is met, a load parameter value of the reference load model is obtained, including: Acquire the frequency of the sampling point, and the value of the target model determined based on the first input signal and the first output signal corresponding to the frequency; Fitting the frequency of the sampling point and the value of the corresponding target model to obtain an initial load value of a reference load model of the first servo system; An iterative process is performed based on the target model and a reference load model into which the initial load value is substituted, and when an iteration condition is satisfied, a load parameter value of the reference load model is obtained.
5. The method according to claim 1, characterized in that The first input signal is a first time domain input signal, the first output signal is a first time domain output signal, and the first time domain input signal and the first time domain output signal have both had their DC components removed; The target model determined based on the first input signal and the first output signal and the reference load model of the first servo system are iteratively processed, and when an iteration condition is met, a load parameter value of the reference load model is obtained, including: Performing Fourier transform on the first time domain input signal to obtain a first frequency domain input signal; Performing Fourier transform on the first time domain output signal to obtain a first frequency domain output signal; Iterative processing is performed based on the target model determined by the first frequency domain input signal and the first frequency domain output signal, and a reference load model of the first servo system, and when an iteration condition is met, a load parameter value of the reference load model is obtained.
6. The method according to claim 1, characterized in that The method further comprises: Get the torque coefficient and current loop equivalent delay time; An inertia ratio of the first servo system is determined based on the first input signal, the first output signal, the torque coefficient, and the current loop equivalent delay time.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Inputting the load parameter value and the resonance parameter value into a second servo system, adjusting the parameters in the second servo system, and determining the phase margin and amplitude margin corresponding to the second servo system after the adjustment; the second servo system includes the first servo system; When the phase margin satisfies a preset phase margin condition and the amplitude margin satisfies a preset amplitude margin condition, the corresponding servo parameter value is used as the parameter value of the second servo system to obtain an adjusted second servo system.
8. The method according to claim 7, characterized in that The method further comprises: Inputting a second input signal into the second servo system to obtain a second output signal; determining a system characteristic of the second servo system based on the second input signal and the second output signal, and determining a phase margin and an amplitude margin of the system characteristic; When the phase margin of the system characteristic does not satisfy the preset phase margin condition or the amplitude margin of the system characteristic does not satisfy the preset amplitude margin, adjusting parameters of the adjusted second servo system to determine a reference phase margin and a reference amplitude margin after the parameter adjustment; When the reference phase angle margin satisfies the preset phase angle margin condition and the reference amplitude margin reaches the preset amplitude margin condition, a target servo parameter value of the second servo system is obtained.
9. A servo drive, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 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 8 are implemented.
Citation Information
Patent Citations
Method for designing servo system
CN101639667A
Resonance characteristic offline identification method for servo system
CN111464098A
Robot control method with automatic parameter optimization function, control device and robot
CN112792813A
Servo system and parameter online adjusting method thereof
CN115291569A
Parameter determination method and device of double-inertia servo motor system, medium and system
CN117614341A