Servo parameter determination method, servo driver and storage medium
Through automated iterative model identification and high-frequency signal input, the servo system can quickly and safely determine servo parameters, solving the problems of high debugging costs and safety hazards in traditional systems, and achieving efficient and safe adaptive parameter adjustment.
Patent Information
- Application Number
- CN202411673196.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-11-20
AI Technical Summary
Parameter debugging of existing servo systems requires a deep understanding of servo control principles and the influence of various factors, resulting in high manpower and time costs, and traditional debugging methods pose safety hazards.
By acquiring input signals and utilizing iterative processing and model identification techniques, the load and resonance parameters of the servo system are automatically determined without manual operation. High-frequency signals are used to reduce the risk of machine collisions, and the parameters are adaptively adjusted internally by the servo driver.
It can automatically determine servo parameters within seconds, reducing manpower and time costs, improving safety and applicability, and adapting to load changes in different application scenarios.
Smart Images

Figure CN119620587B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method for determining servo parameters, a servo driver, and a storage medium. Background Technology
[0002] Servo systems are characterized by high control precision, strong overload capacity, fast response speed, high power density, and wide speed range. They are widely used in various fields of automation, such as robots, automated production lines, CNC machine tools, textile equipment, medical machinery, and semiconductor manufacturing. However, the application scenarios in each field are different, and the common transmission mechanisms vary, such as direct drive, lead screw drive, belt drive, gear and rack drive, and multi-stage connection drive. The common load inertia ratio varies widely, generally between 0 and 200. The common load operating space distribution is also different, such as horizontal XY direction (load is not affected by gravity), vertical Z direction (load is affected by gravity), and pendulum operation (load changes with angle).
[0003] Therefore, servo drives provide parameter adjustment interfaces, allowing users to adjust parameters according to the actual operating conditions of the scenario to achieve a certain level of responsiveness and stability in the servo system. However, adjusting parameters requires not only an understanding of servo control principles but also a clear understanding of how each factor affects the application effect, significantly increasing the demands on application personnel and requiring substantial investment of both manpower and time. Summary of the Invention
[0004] Therefore, it is necessary to provide a servo parameter determination method, servo driver, and storage medium to address the above-mentioned technical problems, which can reduce labor and time costs.
[0005] A servo parameter determination method, applied to a servo driver, the method comprising:
[0006] Acquire a first input signal, input the first input signal into the first servo system, and obtain a first output signal;
[0007] 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, iterative processing is performed. When the iteration condition is met, the load parameter value of the reference load model is obtained.
[0008] Based on the relationship between the load parameters and the resonance parameters, and the load parameter values, the resonance parameter values of the first servo system are determined.
[0009] A servo driver includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of an embodiment of a method for determining various servo parameters.
[0010] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of an embodiment of a method for determining various servo parameters.
[0011] The aforementioned 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. Based on the target model determined by the first input signal and the first output signal, and a reference load model, iterative processing is performed to obtain the load parameter value of the reference load model. The resonance parameter value is then determined based on the load parameter value. In other words, the load model parameters are adaptively adjusted according to the servo system under actual working conditions. The resonance point can be automatically identified within a few seconds based on the working environment. Furthermore, the servo parameter determination process requires no manual operation or user input of any parameters, and identification can be completed with a single click, reducing the labor and time costs of servo parameter determination. Attached Figure Description
[0012] Figure 1 This is an application environment diagram of the servo parameter determination method in one embodiment;
[0013] Figure 2 This is a flowchart illustrating a method for determining servo parameters in one embodiment;
[0014] Figure 3 This is a schematic diagram of the structure of the first servo system in one embodiment;
[0015] Figure 4 This is a schematic diagram of the structure of the second servo system in one embodiment;
[0016] Figure 5 This is a schematic diagram of the structure of the second servo system in another embodiment. Detailed Implementation
[0017] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0019] It should be noted that all directional indicators (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicator will also change accordingly. The connection can be a direct connection or an indirect connection.
[0020] Furthermore, the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. If the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed in this application.
[0021] The terms "first," "second," etc., used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of this application, 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. Both the first servo system and the second servo system are servo systems, but they are not the same servo system.
[0022] It is understood that the term "connection" in the following embodiments should be understood as "electrical connection," "communication connection," etc., if the connected circuits, modules, units, etc., have electrical signal or data transmission with each other.
[0023] The servo parameter determination method provided in this application can be applied to, for example... Figure 1 In the application environment. Figure 1 This diagram illustrates the application environment of a servo parameter determination method in one embodiment. It includes a servo driver 110, a second servo system 120, and a first servo system 130. Both the second servo system 120 and the first servo system 130 are hardware systems. The second servo system 120 includes the hardware of the first servo system 130.
[0024] In one embodiment, such as Figure 2 The diagram shown is a flowchart of a servo parameter determination method in one embodiment, taking an application to a servo driver as an example, and includes the following steps:
[0025] Step 202: Obtain the first input signal, input the first input signal into the first servo system, and obtain the first output signal.
[0026] The servo driver employs an open-loop excitation mode. The first input signal can be an excitation signal. The amplitude of the excitation signal is preferably 10% to 50% of the rated current. This first servo system refers to a physical hardware servo system.
[0027] It is understandable 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 the signal input to the first servo system, and the first output signal is the 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, by inputting the first input signal into the first servo system and obtaining the first output signal, a true servo system response can be obtained.
[0029] Step 204: 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, perform iterative processing. When the iteration conditions are met, obtain the load parameter values of the reference load model.
[0030] The target model determined by the first input signal and the first output signal refers to a model that characterizes the load. Specifically, it can 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 undefined.
[0032] Figure 3 This is a schematic diagram of the structure of the first servo system in one embodiment. Figure 3 Includes 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). When the current loop model G i When (s) is 1, the load model can be obtained by dividing the first output signal C(s) and R(s). It is understandable that G... i (s) can also be non-1, without affecting 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 frequency-dependent complex variable, s = jω(k); m and n are the model order, which can be selected according to requirements, with m = 6 and n = 7 being preferred; (a1a2a3……a n ) and (b1b2b3……b m+1 ) represents the load parameters to be determined.
[0036] Specifically, iterative processing 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 values of the reference load model are obtained. The servo drive can iteratively solve this objective function using methods such as gradient descent. The iteration condition is to obtain the minimum value of the objective function. Specifically, this could be the minimum value obtained after a preset number of iterations or a preset iteration duration. When the minimum value of the objective function is obtained, the load parameter values corresponding to the minimum value of the objective function are obtained. Here, the objective function represents the difference between the reference load model and the target model.
[0037] Optionally, 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:
[0038]
[0039]
[0040] Where k is the number of sampling points, ω(l) is the frequency corresponding to sampling point k, the first input signal is R(ω(k)), and the first output signal is C(ω(k)).
[0041] Step 206: Based on the relationship between the load parameters and the resonance parameters and the load parameter values, determine the resonance parameter values of the first servo system.
[0042] The relationship between load parameters and resonance parameters refers to the relationship between the value of s (when the denominator of the reference load model G(s) containing load parameters is 0) and the resonance parameters. Resonance parameters include the resonance frequency parameter and may also include the damping ratio parameter. Therefore, the resonance parameter value can include both the resonance frequency parameter value and the damping ratio value.
[0043] Specifically, after the load parameter values are solved, the denominator s of the reference load model G(s) is taken. n +a1s n-1 +a2s n -2 ...+a n When the denominator is 0, the value of s is obtained. Then, 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. It then iteratively processes the target model determined by the first input signal and the first output signal, along with a reference load model, to obtain the load parameter values of the reference load model. Based on these load parameter values, the resonance parameter values are determined. This means that the load model parameters are adaptively adjusted according to the servo system under actual operating conditions. Resonance point identification can be automatically completed within seconds based on the operating environment. Furthermore, the servo parameter determination process requires no manual operation or user input of any parameters; identification can be completed with a single click, reducing the manpower and time costs associated with servo parameter determination. Moreover, the process can be completed internally within the servo driver, adapting to the servo driver's processing capabilities without the need for a host computer.
[0045] In one embodiment, the first input signal includes an M-sequence signal or a Chirp signal.
[0046] Specifically, an M-sequence (Maximum Length Sequence, MLS) is a virtual random digital signal in basic communication circuit design. An M-sequence signal contains signals with different frequencies. A chirp signal is a signal whose frequency changes over time.
[0047] In this embodiment, the traditional method finds the resonance parameters of the servo system by rotating the motor, which can lead to machine collision damage. 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 virtually no operating distance, which greatly reduces the possibility of machine collision damage to equipment or injury to people.
[0048] In one embodiment, 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 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 explanation will take the resonance parameter values, including the resonance frequency and damping ratio, as an example. The denominator s of the reference load model G(s) will be taken as... n +a1s n-1 +a2s n-2 ...+a n Construct a characteristic polynomial, and take the load parameter values a1, a2, ... a1 from it. n Construct the companion matrix A, and diagonalize the companion matrix to obtain the conjugate eigenvalues s1 and s2.
[0050]
[0051] Diagonalizing the companion matrix allows us to obtain the conjugate eigenvalues s1 and s2.
[0052] Based on the conjugate eigenvalues s1 and s2 and the resonance frequency ω n The relationship between the damping ratio ξ and the damping ratio ξ is as follows:
[0053]
[0054] The equation has two unknowns ω n If ξ has a conjugate complex solution, i.e., ξ < 1, then the resonant frequency ω can be solved. n The value of the damping ratio ξ. Where ξ < 1 indicates an underdamped system, which will vibrate. It is understandable that without a conjugate solution, there is no resonance point.
[0055] In this embodiment, by constructing a companion matrix of load parameter values and diagonalizing the companion matrix to obtain conjugate eigenvalues, the resonant frequency value of the servo system is determined. This transforms complex multi-order polynomials into matrix operations, which can greatly improve the speed of obtaining resonant parameter values and reduce the time for determining servo parameters.
[0056] In one embodiment, iterative processing is performed 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. When the iteration conditions are met, the load parameter values of the reference load model are obtained, including:
[0057] Obtain the frequency of the sampling points, and the corresponding value of the target model determined based on the first input signal and the first output signal;
[0058] The initial load value of the reference load model is obtained by fitting the frequency of the sampling points with the corresponding values of the target model.
[0059] Based on the target model and the reference load model with the initial load value, iterative processing is performed. When the iteration conditions are met, the load parameter values of the reference load model are obtained.
[0060] Specifically, the target model g(ω(k)) is
[0061]
[0062] Given the frequency ω(k) of sampling point k, and the corresponding first input and first output signals, the value of the target model g(ω(k)) can be obtained, thus yielding multiple scatter points. Fitting these scatter points yields the initial load value of the reference load model. The fitting method is unrestricted and can include least squares, interpolation, etc.
[0063] The servo drive iterates over the objective function between the target model and the reference load model with the initial load value. When the iteration conditions are met, the load parameter values of the reference load model are obtained.
[0064] In this embodiment, the reference load model contains a large number of load parameter values. Therefore, an initial load value should be provided to make the parameter iteration process faster. By fitting, the initial parameter values of the reference load model can be obtained as reference values. 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 both the first time-domain input signal and the first time-domain output signal have had their DC components removed.
[0066] 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, iterative processing is performed. When the iteration conditions are met, the load parameter values of the reference load model are obtained, including:
[0067] Perform a Fourier transform on the first time-domain input signal to obtain the first frequency-domain input signal;
[0068] Perform a Fourier transform on the first time-domain output signal to obtain the 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, the first servo system and the reference load model are iteratively processed. When the iteration conditions are met, the load parameter values of the reference load model are obtained.
[0070] In this configuration, the DC component of the first time-domain input signal can be removed before it is input into the first servo system, thus the DC component of the obtained first time-domain output signal will also be removed. Alternatively, the DC component of the first time-domain input signal can be removed after it is input into the first servo system, and the DC component of the first time-domain output signal will also be removed.
[0071] Specifically, the servo driver performs a Fourier transform on the first time-domain input signal R(t) to obtain the first frequency-domain input signal R(s); and performs a Fourier transform on the first time-domain output signal C(t) to obtain the first frequency-domain output signal C(s). 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, the servo driver performs iterative processing. When the iteration conditions are met, it obtains the load parameter values of the reference load model in the frequency domain space.
[0072] In this embodiment, since servo systems generally perform transformation calculations based on the time domain, the first time domain input signal is input into the first servo system to obtain the first time domain output signal, which can be adapted to most servo systems. Furthermore, the DC component is removed in the time domain before Fourier transform, and only the frequency change part is retained, reflecting the frequency characteristics of the servo system without affecting the results of the load parameter values.
[0073] In one embodiment, the method for determining the servo parameters further includes: obtaining the torque coefficient and the equivalent delay time of the current loop; and determining the 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, it fluctuates at different frequencies, causing its magnitude to change. Through numerous experiments and studies, it was found that when the motor frequency f is less than a preset frequency (such as 40Hz, 50Hz, 60Hz, etc.), a simplified reference load model can be used, and the inertia ratio calculated by the simplified model is essentially the same as the actually measured inertia ratio. This simplified reference load model is as follows:
[0075]
[0076] Where, k t T is the torque coefficient (constant). c is the equivalent delay time of the current loop (constant), and J is the inertia ratio.
[0077] Then the inertia ratio J is
[0078]
[0079] The above expression contains only one variable, s. However, 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 by using the first input signal, the first output signal, the torque coefficient, and the equivalent delay time of the current loop, so as to quickly obtain the inertia ratio and reduce the time for determining servo parameters.
[0081] In one embodiment, the servo parameter determination method further includes: inputting load parameter values and resonance parameter values into a second servo system, adjusting the parameters in the second servo system, and after 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 both the phase margin and gain margin meet preset conditions, the corresponding servo parameter values are used as the parameter values for the second servo system, resulting in the adjusted second servo system. The first servo system may only include a current loop model and a load model, while the second servo system includes the first servo system and may also include others, including but not limited to a speed controller, current command filter, notch filter, speed feedback filter, etc., depending on the specific requirements. Figure 4 The diagram shown is a schematic representation of the structure of the second servo system in one embodiment. Figure 4 Includes 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 including velocity feedback filter Gspd lpf (s). At this time, the second servo system has no actual input. 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. This can avoid the phenomenon of system loss of control, machine collision damage to equipment or injury to people when the system parameters have not been adjusted.
[0083] In this embodiment, the second servo system includes a connected speed controller, command filter, notch filter, current loop model, and load model, with the input of the speed feedback filter connected to the output of the load model and the output of the feedback filter connected to the speed controller.
[0084] Assuming the speed controller is a conventional PI controller, the speed control model expression is:
[0085]
[0086] Where, k p For proportional gain, k i This is the integral gain.
[0087] The current command transfer function corresponding to the command filter is:
[0088]
[0089] Among them, T lpf This is the torque command filtering time.
[0090] The transfer function of the notch filter is
[0091]
[0092] ω n ω is the resonant frequency, ξ is the damping ratio, and ξ² is the notch filter coefficient.n Both ξ and ξ are resonance parameter values, which were known when the first servo system was calculated.
[0093] The velocity feedback filter function is
[0094]
[0095] Among them, Tspd lpf This is the velocity feedback filtering time.
[0096] The open-loop speed loop model of the second servo system is:
[0097]
[0098] Therefore, the open-loop velocity model is a complex number, and its phase margin and gain margin can be obtained. The phase margin is G. c The angle between (s) and the gain margin, i.e., G c The modulus of (s). The preset phase margin condition can be a phase margin between 30° and 60°. The preset gain margin condition can be a gain margin greater than 6dB.
[0099] The load and resonance parameters are then input into the second servo system, and the parameters in the second servo system are adjusted. After each adjustment, the phase margin and gain margin corresponding to the second servo system are determined. The adjustment method can be implemented using traversal methods, genetic algorithms, or other intelligent optimization algorithms. The parameters to be adjusted can be parameters other than the load and resonance parameters, such as those including the proportional gain k. p Integral gain k i Notch filter coefficient ξ2, torque command filtering time T lpf and velocity feedback filter time Tspd lpf .
[0100] When the phase margin reaches the preset phase margin condition and the gain margin reaches the preset gain margin condition, it means that the parameters in the second servo system have met the conditions for servo drive. Therefore, the corresponding servo parameter values at this time are used as the parameter values in the second servo system to obtain the adjusted second servo system.
[0101] In this embodiment, appropriate phase margin and gain margin can prevent the effects of component aging in the servo system. In order to obtain satisfactory performance, both phase margin and gain margin should meet the corresponding conditions. Therefore, by adjusting the parameters in the second servo system and determining the corresponding phase margin and gain margin, the system can 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] The system characteristics of the second servo system are determined based on the second input signal and the second output signal, and the phase margin and magnitude margin of the system characteristics are determined.
[0104] When the phase margin of the system characteristics does not meet the preset phase margin condition or the gain margin of the system characteristics does not meet the preset gain margin, the parameters of the adjusted second servo system are adjusted to determine the reference phase margin and reference gain margin after parameter adjustment.
[0105] When the reference phase margin meets the preset phase margin condition and the reference gain margin reaches the preset gain margin condition, the 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 can also be an M-sequence signal or a chirp signal. The second output signal refers to the signal output by the second servo system. For example... Figure 5 The diagram shown is a schematic representation of the structure of the second servo system in another embodiment. Figure 5 Includes 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 including velocity feedback filter Gspd lpf (s). At this time, the second servo system has an excitation input, namely the second input signal R′(s), and after the response of the second servo system, the second output signal C′(s) is obtained. Furthermore, since the servo parameter values corresponding to the second servo system have already been obtained before, relatively accurate servo parameter values have been obtained before the second adjustment (fine-tuning). Therefore, the operation of the second servo system at this time can avoid the problem of large vibrations. However, there are still some differences between the servo model after the first adjustment and the actual running servo model. Subsequent input of the second input signal is equivalent to fine-tuning the second servo system during actual operation, which can obtain the target servo parameter values according to the actual working conditions and improve the accuracy of the obtained target servo parameter values.
[0107] Specifically, in this embodiment, the second servo system is a hardware system. A second input signal is input to the second servo system to obtain a second output signal. The system characteristics of the second servo system are determined based on the second input signal and the second output signal. The system characteristics can be either open-loop or closed-loop; this embodiment uses open-loop characteristics as an example for explanation.
[0108] The closed-loop response G of the second servo system o (s)
[0109]
[0110] Where R′(s) is the second input signal and C′(s) is the second output signal.
[0111] The open-loop characteristics of the second servo system G c (s)
[0112]
[0113] The phase margin and gain margin can be determined by the open-loop characteristics of the system. When the phase margin and gain margin of the open-loop characteristics of the system meet the preset phase margin condition and the gain margin meet the preset gain margin condition, the servo parameter value can be used as the target parameter value of the second servo system.
[0114] If either the phase margin or the gain margin of the open-loop characteristic does not meet the corresponding conditions, it indicates that the parameters of the second servo system are not yet sufficient to meet the actual operating requirements, and therefore the parameters need to be adjusted a second time. The servo driver then adjusts the parameters of the adjusted second servo system, determining the reference phase margin and reference gain margin after parameter adjustment; it then checks whether the reference phase margin and reference gain margin meet the corresponding conditions. If not, it returns to the step of adjusting the parameters of the adjusted second servo system until the reference phase margin meets the preset phase margin condition and the reference gain margin reaches the preset gain margin condition, thus obtaining the target servo parameter values of the second servo system.
[0115] In this embodiment, by inputting the second input signal into the second servo system, the actual second output signal is obtained. Then, the second servo system, which has been coarsely adjusted, is further finely adjusted according to the actual working conditions. No manual operation is required, and self-adjustment can be achieved with one click. It also fits the actual working conditions, and the obtained target servo parameter values are more accurate.
[0116] In one embodiment, a traditional method for determining servo parameters involves controlling the rotation of a motor to find the resonance parameter value. However, this method requires running the servo system during actual debugging, and if the system parameters are not yet fully adjusted, system malfunction can easily occur, leading to machine collisions that damage equipment or injure people. Therefore, the servo parameter determination method proposed in this embodiment aims to solve the problem of automatically debugging satisfactory tuning parameters more applicablely, safely, and quickly in various application scenarios across different fields.
[0117] I. Model Identification—Resonance Point Identification and Inertia Identification
[0118] 1. Model Identification Input: The servo driver adopts an 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%–50% of the excitation current. The excitation signal type can be an M-sequence or a chirp signal. Model Identification Output: Servo driver speed feedback.
[0119] 2. The expression for constructing the reference load model G(s) of the first servo system is:
[0120]
[0121] Where s is a frequency-dependent complex variable, s = jω(k); m and n are the model order, which can be selected according to requirements, with m = 6 and n = 7 being preferred; (a1a2a3……a n ) and (b1b2b3……b m+1 ) represents the load parameters to be determined.
[0122] 3. Model Parameter Solving: Perform a Fourier transform on the first input signal R(t) to obtain R(s), and perform a Fourier transform on the first output signal C(t) to obtain C(s). The initial load value of the model can be estimated using the frequency domain least squares method, and then the load parameters (a1a2a3…a…) can be iteratively solved using the gradient descent method. 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] Where k is the number of sampling points, ω(k) is the frequency corresponding to sampling point k, the first input signal is R(ω(k)), and the first output signal is C(ω(k)).
[0125] 4. Resonance point solution: After the model parameters are solved, take the denominator s of G(s). n +a1s n-1 +a2s n-2 ......+a n Construct a characteristic polynomial, and take the load parameter values a1, a2, ... a1 from it. n Construct the companion matrix A, and diagonalize the companion matrix to obtain the solutions s1 and s2 of the characteristic equation, and finally find the resonance point.
[0126]
[0127] Find the conjugate eigenvalues of A.
[0128]
[0129]
[0130] If ξ < 1, then the resonant frequency ω can be solved. n The value of the damping ratio ξ.
[0131] 5. Inertia Ratio Calculation: When the frequency f is less than 50Hz, the simplified load model is as follows:
[0132]
[0133] Where, k t T is the torque coefficient (constant). c is the equivalent delay time of the current loop (constant), and J is the inertia ratio.
[0134] Then the inertia ratio J is
[0135]
[0136] The inertia ratio of the servo system can be obtained by calculating the J value using the s value within the range of 0-50Hz.
[0137] II. Preset parameters for the speed closed-loop controller
[0138] Assuming the speed controller is a conventional PI controller, the speed control model expression is:
[0139]
[0140] Where, k p For proportional gain, k i This is the integral gain.
[0141] The current command transfer function corresponding to the command filter is:
[0142]
[0143] Among them, T lpf This is the torque command filtering time.
[0144] The transfer function of the notch filter is
[0145]
[0146] ω n ω is the resonant frequency, ξ is the damping ratio, and ξ² is the notch filter coefficient. n The identification results for ξ and ξ are based on the previous model.
[0147] The velocity feedback filter function is
[0148]
[0149] Among them, Tspd lpf This is the velocity feedback filtering time.
[0150] The open-loop speed loop model of the second servo system is:
[0151]
[0152] Appropriate phase and gain margins can prevent the effects of component aging in the system. To obtain satisfactory performance, G c The phase margin of (s) should be between 30° and 60°, and the gain margin should be greater than 6dB.
[0153] To meet stability requirements, the proportional gain k p Integral gain k i Notch filter coefficient ξ2, torque command filtering time T lpf and velocity feedback filter time Tspd lpf After parameter optimization, parameter preset is performed. The optimization scheme can be implemented using traversal methods, genetic algorithms, or other intelligent optimization algorithms.
[0154] III. Speed Closed-Loop Controller Parameter Check
[0155] 1. Model Identification Input: The servo driver 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%–50% of the excitation current. The excitation signal type can be an M-sequence or a chirp signal. Model Identification Output: The servo driver controller outputs the second output signal G. pi (s).
[0156] 2. Perform an FFT on the input signal R(t) to obtain R(s), and perform an FFT on the output signal C(t) to obtain the system closed-loop response G. o (s)
[0157]
[0158] Where 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 systems are the same, and using either closed-loop or open-loop does not affect parameter adjustment.
[0162] 3. Based on the parameters set in the previous step, assuming the speed controller is a conventional PI controller, 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 velocity feedback filter function is
[0169]
[0170] Perform proportional gain k o Integral gain k i Notch filter coefficient ξ2, torque command filtering time T lpf and velocity feedback filter time Tspd lpf The parameters are optimized for fine-tuning to meet the open-loop system stability margin requirements: the amplitude margin is greater than 6dB, and the phase margin is between 30° and 60°.
[0171] Therefore, the following effects can be achieved through the above methods:
[0172] 1. The entire controller parameter tuning time only takes a dozen 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, effectively controlling the manpower and time costs that do not need to be invested.
[0173] 2. The input signal is a Chirp or M-sequence signal, which is a high-frequency injection signal. The servo system has virtually no operating distance, which greatly reduces the possibility of machine collisions damaging equipment or injuring people.
[0174] 3. It can accommodate different load operating space distributions. During load operation, if gravity changes, the integral term of the PI controller will automatically adjust according to the speed deviation, without needing to consider gravity changes. Since the integral term is constantly adjusting the output, it has the advantage of automatic adjustment. Removing the DC component from the input / output results before performing the Fourier transform will not affect the identification results.
[0175] 4. The servo system can identify the gain parameters with one click during the self-tuning process, without requiring the user to input any parameters. Moreover, the process is completed within the servo driver without the need for the host computer to participate.
[0176] In one embodiment, a servo parameter determination method includes:
[0177] Step (a1): Obtain a first input signal, input the first input signal into the first servo system, and obtain a first output signal. The first input signal includes an M-sequence signal or a Chirp signal.
[0178] Step (a2) is to obtain 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) involves fitting the frequency of the sampling points to the corresponding values of the target load model to obtain the initial load values of the reference load model.
[0180] Step (a4): Perform a Fourier transform on the first time-domain input signal to obtain the first frequency-domain input signal.
[0181] Step (a5): Perform a Fourier transform on the first time-domain output signal to obtain the first frequency-domain output signal.
[0182] Step (a6) involves iteratively processing the target model determined by the first frequency domain input signal and the first frequency domain output signal, as well as the reference load model of the first servo system with the initial load value substituted. When the iteration conditions are met, the load parameter values of the reference load model are obtained.
[0183] Step (a7) constructs the companion matrix of the load parameter values.
[0184] Step (a8) involves diagonalizing the companion matrix to obtain conjugate eigenvalues.
[0185] Step (a9) determines the resonance parameter values of the servo system based on the relationship between the conjugate eigenvalues and the resonance parameters.
[0186] Step (a10) obtains the torque coefficient and the equivalent delay time of the current loop.
[0187] Step (a11) determines the 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.
[0188] Step (a12): Input the load parameter values and resonance parameter values into the second servo system, adjust the parameters in the second servo system, and after adjustment, determine 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 meets the preset phase margin condition and the gain margin meets the preset gain 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.
[0190] Step (a14): Input the second input signal into the second servo system to obtain the second output signal.
[0191] Step (a15) determines the system characteristics of the second servo system based on the second input signal and the second output signal, and determines the phase margin and amplitude margin of the system characteristics.
[0192] Step (a16): When the phase margin of the system characteristics does not meet the preset phase margin condition or the gain margin of the system characteristics does not meet the preset gain margin, the parameters of the adjusted second servo system are adjusted to determine the reference phase margin and reference gain margin after parameter adjustment.
[0193] Step (a17): When the reference phase margin meets the preset phase margin condition and the reference amplitude margin reaches the preset amplitude margin condition, the 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. Based on the target model determined by the first input signal and the first output signal, and the reference load model, iterative processing is performed to obtain the load parameter value of the reference load model. The resonance parameter value is then determined based on the load parameter value. That is, the load model parameters are adaptively adjusted according to the servo system under actual working conditions. The resonance point identification can be automatically completed within a few seconds according to the working environment. Furthermore, no manual operation or user input is required during the servo parameter determination process. Identification can be completed with one click, reducing the manpower and time costs of servo parameter determination. In addition, it can be completed inside the servo driver, which is compatible with the processing capabilities of the servo driver and does not require the participation of a host computer.
[0195] It should be understood that, although the above Figure 2 In the flowchart, the steps are shown sequentially according to the arrows, and the steps (a1) to (a17) are shown sequentially according to their numbers. However, these steps are not necessarily executed in the order indicated by the arrows or numbers. Unless explicitly stated herein, there is no strict order requirement for the execution of these steps; they can be executed in other orders. Figure 2 At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.
[0196] In one embodiment, a servo driver is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method embodiments.
[0197] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method embodiments.
[0198] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer instructions 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, causing the computer device to perform the steps in the above method embodiments.
[0199] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes described in the embodiments of the above methods. Any references to memory, storage, databases, 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 can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0200] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for determining servo parameters, characterized in that, Applied to a servo drive, the method includes: A first input signal is acquired, and the first input signal is input into a first servo system to obtain a first output signal; the first input signal includes an M-sequence signal or a Chirp signal. 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, iterative processing is performed. When the iteration condition is met, the load parameter value of the reference load model is obtained. Construct the companion matrix of the load parameter values; Diagonalize the companion matrix to obtain conjugate eigenvalues; Based on the relationship between the conjugate eigenvalues and the resonance parameters, the resonance parameter values of the first servo system are determined.
2. The method according to claim 1, characterized in that, The iterative processing of 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, to obtain the load parameter values of the reference load model when the iteration conditions are met, includes: Obtain the frequency of the sampling points, and the value of the target model corresponding to the frequency, determined based on the first input signal and the first output signal; The initial load value of the reference load model of the first servo system is obtained by fitting the frequency of the sampling points with the corresponding target model value. Based on the target model and the reference load model substituted with the initial load value, iterative processing is performed. When the iteration condition is met, the load parameter value of the reference load model is obtained.
3. The method according to claim 1, characterized in that, The first input signal is a first time-domain input signal, and the first output signal is a first time-domain output signal. Both the first time-domain input signal and the first time-domain output signal have had their DC components removed. The iterative processing of 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, to obtain the load parameter values of the reference load model when the iteration conditions are met, includes: Perform a Fourier transform on the first time-domain input signal to obtain the first frequency-domain input signal; Perform a Fourier transform on the first time-domain output signal to obtain the first frequency-domain output signal; 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, iterative processing is performed. When the iteration conditions are met, the load parameter values of the reference load model are obtained.
4. The method according to claim 1, characterized in that, The method further includes: Obtain the torque coefficient and the equivalent delay time of the current loop; The inertia ratio of the first servo system is determined based on the first input signal, the first output signal, the torque coefficient, and the equivalent delay time of the current loop.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The load parameter values and the resonance parameter values are input into the second servo system, and the parameters in the second servo system are adjusted. After adjustment, the phase margin and amplitude margin corresponding to the second servo system are determined; the second servo system includes the first servo system. When the phase margin meets the preset phase margin condition and the gain margin meets the preset gain 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.
6. The method according to claim 5, characterized in that, The method further includes: The second input signal is input into the second servo system to obtain the second output signal; The system characteristics of the second servo system are determined based on the second input signal and the second output signal, and the phase margin and magnitude margin of the system characteristics are determined. When the phase margin of the system characteristics does not meet the preset phase margin condition or the gain margin of the system characteristics does not meet the preset gain margin condition, the parameters of the adjusted second servo system are adjusted to determine the reference phase margin and reference gain margin after parameter adjustment. When the reference phase margin satisfies the preset phase margin condition and the reference amplitude margin reaches the preset amplitude margin condition, the target servo parameter value of the second servo system is obtained.
7. A servo driver, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method for designing servo system
CN101639667A
Servo parameter adjustment method and adjustment device
WO2024185790A1