Servo drive tuning method, system, and computer-readable storage medium

CN122717501APending Publication Date: 2026-09-08SHENZHEN HUACHUANG INTELLIGENT ENTERPRISE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610888638.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-09-08

AI Technical Summary

Technical Problem

[0003]本发明要解决的技术问题在于,针对上述伺服驱动器参数手动整定成本高、自动整定及自适应整定精度不足的问题,提供一种伺服驱动器整定方法、系统及计算机可读存储介质

Benefits of technology

[0014] The present invention has the following technical effects: by injecting a sinusoidal sweep frequency excitation signal of preset amplitude into the speed loop of the servo driver to be tuned, and by obtaining a set of parameter suggestion values ​​including speed loop proportional gain Kp, integral gain Ki, acceleration feedforward coefficient Ka, control bandwidth and integral time through the generated twelve-dimensional feature vector, the parameter tuning operation of the servo driver can be greatly simplified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122717501A_ABST
    Figure CN122717501A_ABST
Patent Text Reader

Abstract

The application provides a servo driver setting method, system and computer readable storage medium, the method comprises the following steps: injecting an excitation signal into the reference voltage input end of the speed loop, and collecting the speed reference instruction signal and the measured speed feedback response signal at the injection point; generating a Bode diagram according to the collected signals, and extracting a twelve-dimensional feature vector from the Bode diagram; obtaining a parameter suggestion value set according to the twelve-dimensional feature vector; after writing the parameters in the parameter suggestion value set into the servo driver, applying a step command with a rated speed of 10% amplitude to the voltage reference command input to the speed loop, and collecting the speed feedback response curve of the servo driver; when the rise time, overshoot and steady-state error obtained from the speed feedback response curve are all less than the preset value, confirming that the parameter suggestion value set passes the time domain verification. The application can greatly simplify the parameter setting operation of the servo driver.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of servo drives, and more specifically, to a servo drive tuning method, system, and computer-readable storage medium. Background Technology

[0002] Servo driver tuning is a key technical challenge in industrial automation. Existing tuning methods mainly fall into three categories: (1) Manual tuning: It relies on experienced engineers to achieve this through repeated trial and adjustment, which takes a long time (usually 1~4 hours / axis). The tuning quality is greatly affected by the engineer's experience and is difficult to replicate and standardize. When the product line covers dozens of motor models and hundreds of load configurations, the cost of manual tuning is extremely high. (2) Model-based automatic tuning: such as the Ziegler-Nichols method and the frequency response method, which require the known or identified model of the controlled object, and are not accurate enough for complex mechanical systems (multiple resonance peaks, nonlinear friction); (3) Adaptive control method: It has strong online self-adjustment capability, but has a high risk of parameter drift and low acceptance in industrial scenarios. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to provide a servo drive tuning method, system and computer-readable storage medium, addressing the issues of high cost of manual tuning and insufficient accuracy of automatic and adaptive tuning of servo drive parameters.

[0004] The technical solution of the present invention to solve the above-mentioned technical problems is to provide a servo driver tuning method, comprising the following steps: A. Inject a sinusoidal sweep frequency excitation signal with a preset amplitude into the reference voltage input terminal of the speed loop, and collect the speed reference command signal and the measured speed feedback response signal at the injection point; B. Generate a Bode plot containing amplitude-frequency characteristics and phase-frequency characteristics based on the speed reference command signal and the measured speed feedback response signal, and extract a twelve-dimensional feature vector from the Bode plot. The twelve-dimensional feature vector includes resonant frequency, resonant peak amplitude, anti-resonant frequency, phase margin, gain margin, and low-frequency slope. C. Obtain a set of parameter suggestions based on the twelve-dimensional feature vector. The set of parameter suggestions includes the velocity loop proportional gain, integral gain, acceleration feedforward coefficient, control bandwidth, and integral time. D. After writing the parameters from the parameter suggestion set into the servo driver, apply a step command with a rated speed of 10% amplitude to the voltage reference command input to the speed loop, and collect the speed feedback response curve of the servo driver. E. Obtain the rise time, overshoot, and steady-state error from the speed feedback response curve, and confirm that the set of recommended parameter values ​​passes time-domain verification when the overshoot does not exceed a first preset value, the rise time does not exceed a second preset value, and the steady-state error does not exceed a third preset value. The rise time is the time required for the response to rise from 10% to 90% of the target value, the overshoot is the percentage by which the peak speed exceeds the target speed, and the steady-state error is the root mean square of the speed deviation after adjustment.

[0005] As a further improvement of the present invention, the method includes the following steps: F. The speed loop proportional gain, integral gain, acceleration feedforward coefficient, control bandwidth, and integral time in the parameter suggestion value set are verified by the pre-stored speed loop proportional gain safety range, integral gain safety range, acceleration feedforward coefficient safety range, control bandwidth safety range, and integral time safety range, respectively. When any parameter in the parameter suggestion value set exceeds the corresponding safety range, the parameter that exceeds the safety range is replaced with the corresponding safety range boundary value. The set of parameter suggestions written to the servo driver in step D is the set of parameter suggestions verified in step F.

[0006] As a further improvement of the present invention, the method includes the following steps: G. When the overshoot exceeds the first preset value, the rise time exceeds the second preset value, or the steady-state error exceeds the third preset value, the twelve-dimensional feature vector generated in step B is corrected according to the additional performance feedback constraint, and the corrected twelve-dimensional feature vector is used as input to regenerate the set of parameter suggestion values. The additional performance feedback constraint is a quantity that characterizes the degree to which the overshoot, rise time, and steady-state error exceed their respective preset values.

[0007] As a further improvement of the present invention, in step C, obtaining the parameter suggestion value set based on the twelve-dimensional feature vector includes: inputting the twelve-dimensional feature vector into a multilayer perceptron neural network trained with historical data, and having the multilayer perceptron neural network output the parameter suggestion value set; the multilayer perceptron neural network has an input dimension of 12 and an output dimension of 5. The method includes the following steps: H1. Write the set of recommended parameter values ​​and the corresponding twelve-dimensional feature vectors when the servo drive tuning is confirmed to be complete into the historical database. H2. The multilayer perceptron neural network is incrementally learned and updated using a historical database according to a preset period or when a trigger signal is received.

[0008] As a further improvement of the present invention, the method includes: connecting low-rank matrix pairs in parallel in each fully connected layer of the multilayer perceptron neural network, and optimizing the low-rank matrix with the twelve-dimensional feature vector and the set of actual parameter values ​​in the measured samples of the target model servo driver, thereby optimizing the multilayer perceptron neural network, wherein the target model servo driver is a servo driver of the same model as the servo driver to be tuned.

[0009] As a further improvement of the present invention, in step A, when injecting the sinusoidal sweep frequency excitation signal with a preset amplitude into the reference voltage input terminal of the speed loop, a multi-sinusoidal superposition excitation method is adopted, and the amplitude of the excitation signal is adaptively adjusted by controlling the signal-to-noise ratio to be no less than 20dB.

[0010] As a further improvement of the present invention, step B, extracting a twelve-dimensional feature vector from the Bode graph, includes: B1. When multiple resonance peaks are detected in the same Bode plot, the top N resonance peaks are selected as features after sorting them from high to low amplitude. N is a positive integer greater than or equal to 2 and less than or equal to 8. B2. Calculate the quality factor for each resonance peak and include resonance peaks with quality factors exceeding a preset threshold into the twelve-dimensional feature vector; B3. Compare the identified resonance peak with the first M twelve-dimensional feature vectors stored locally by the servo driver, and return to step A when the frequency change of the identified resonance peak exceeds 15%.

[0011] As a further improvement of the present invention, step E is followed by a frequency domain verification step, which includes: A broadband excitation signal with an amplitude not exceeding 5% of the rated speed is injected into the reference voltage input terminal of the speed loop. The speed reference command signal and the measured speed feedback response signal at the injection point are collected. The closed-loop transfer function and the actual closed-loop bandwidth are estimated by the frequency response function. The actual closed-loop bandwidth is the frequency corresponding to the point where the amplitude-frequency response of the closed-loop transfer function drops by 3dB relative to the DC gain. When the deviation between the actual closed-loop bandwidth and the target bandwidth does not exceed ±10% and the phase margin is not less than 40°, the set of recommended parameter values ​​is verified in the frequency domain. When the deviation between the actual closed-loop bandwidth and the target bandwidth exceeds ±10% or the phase margin is less than 40°, the velocity loop proportional gain in the set of recommended parameter values ​​is adjusted according to the functional relationship of the ratio of the actual closed-loop bandwidth to the target bandwidth, and the frequency domain verification step is re-executed with the adjusted set of recommended parameter values.

[0012] The present invention also provides a servo driver tuning system, including a storage unit and a control chip. The storage unit stores a computer program that can be executed on the control chip, and the control chip executes the computer program to implement the steps of the servo driver tuning method described above.

[0013] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the servo drive tuning method described above.

[0014] The present invention has the following technical effects: by injecting a sinusoidal sweep frequency excitation signal of preset amplitude into the speed loop of the servo driver to be tuned, and by obtaining a set of parameter suggestion values ​​including speed loop proportional gain Kp, integral gain Ki, acceleration feedforward coefficient Ka, control bandwidth and integral time through the generated twelve-dimensional feature vector, the parameter tuning operation of the servo driver can be greatly simplified. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the servo driver tuning method provided in an embodiment of the present invention.

[0016] Figure 2 This is a schematic diagram of extracting a twelve-dimensional vector from a Bode diagram in the servo driver tuning method provided in this embodiment of the invention. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0018] like Figure 1 The diagram shows a flowchart of the servo drive tuning method of the present invention, which can be applied to the rapid tuning of servo drive parameters. This method can be combined with a servo drive and a host computer connected to the servo drive. Those skilled in the art will understand that the host computer can read the servo drive's nameplate parameters, load configuration, safety boundaries, etc. (these parameters can also be manually input into the host computer), as well as inject excitation signals into the servo drive and modify the servo drive's parameters, such as the speed loop proportional gain Kp, integral gain Ki, acceleration feedforward coefficient Ka, control bandwidth, and integral time.

[0019] The method in this embodiment can be implemented by software code running on the aforementioned host computer, and the servo drive tuning method includes the following steps: Step S11: Inject a sinusoidal sweep frequency excitation signal with a preset amplitude into the reference voltage input terminal of the speed loop, and collect the speed reference command signal and the measured speed feedback response signal at the injection point.

[0020] Specifically, a host computer can generate control commands and input these commands to the servo driver. The servo driver then generates a sinusoidal sweep excitation signal with a preset amplitude based on the control commands and injects it into the reference voltage input terminal of the speed loop. The frequency range of the sinusoidal sweep excitation signal can be set as needed, for example, from 0.1Hz to 2000Hz; similarly, the sweep step size of the sinusoidal sweep excitation signal can also be set as needed.

[0021] Simultaneously, the host computer generates a signal acquisition command, enabling the servo drive to acquire the speed reference command signal and the measured speed feedback response signal at the injection point under different sinusoidal excitation signal injection conditions. The measured speed feedback response signal is not obtained directly from the motor using an additional sensor, but rather is the speed feedback quantity inherent in the servo drive's closed-loop control. Specifically, it is the speed feedback value estimated by differential or observer based on the position signal output from the position encoder (e.g., an absolute encoder) at the servo motor shaft end, and is acquired synchronously with the speed reference command signal at the speed loop feedback point.

[0022] Those skilled in the art will understand that the above-mentioned injection of excitation signals into the velocity loop and the acquisition of related signals can all be carried out using conventional techniques in the field, and will not be elaborated further here.

[0023] Step S12: Generate a Bode plot containing amplitude-frequency and phase-frequency characteristics based on the speed reference command signal and the measured speed feedback response signal, and extract a twelve-dimensional feature vector from the Bode plot. The twelve-dimensional feature vector includes the resonant frequency, resonant peak amplitude, anti-resonant frequency, phase margin, gain margin, and low-frequency slope.

[0024] Specifically, for the acquired velocity reference command signal u(n) and measured velocity feedback response signal y(n) at the injection point, the host computer can calculate the frequency response function H(f) = Syu(f) / Suu(f) using the H1 estimation method, where Syu(f) = Y(f)·U(f) is the cross-power spectral density, and Suu(f) = |U(f)|² is the input self-power spectral density. This generates a Bode plot containing amplitude and phase frequency characteristics. The entire measurement process (including injecting a sinusoidal sweep excitation signal of preset amplitude into the reference voltage input terminal of the velocity loop) is completed within 30 seconds without stopping the motor. Those skilled in the art will understand that mathematical software tools such as MATLAB, Python (using the SciPy and Matplotlib libraries), and Mathematica can be used to automatically generate the Bode plot. Generating a Bode plot containing amplitude and phase frequency characteristics based on the velocity reference command signal and the measured velocity feedback response signal using frequency response function estimation (e.g., the H1 estimation method) is a common technique in this field and will not be elaborated further here.

[0025] The host computer can obtain the aforementioned twelve-dimensional feature vector by performing automatic peak-valley search and piecewise linear fitting calculation on the amplitude-frequency and phase-frequency curves of the Bode plot, such as... Figure 2 As shown. The 12-dimensional feature vector extracted from the Bode plot specifically includes: the first resonant frequency fr1 (the frequency of the highest peak of the amplitude-frequency curve), the first resonant peak gain Ar1 (dB), the second resonant frequency fr2 (the frequency of the second peak, or 0 if none), the second resonant peak gain Ar2 (dB), the anti-resonant frequency far (the frequency of the deepest valley of the amplitude-frequency curve), the anti-resonant valley gain Aar (dB), the phase margin PM (the difference between the phase at the gain crossing frequency and -180°, in °), the gain margin GM (the reciprocal of the absolute value of the open-loop gain at the phase crossing frequency, in dB), the current closed-loop bandwidth fbw (the frequency at which the amplitude of the closed-loop transfer function drops by 3dB from the DC value, in Hz), the low-frequency slope klf (the slope of the linear fitting of the amplitude-frequency curve below 10Hz, in dB / decade), the first resonant quality factor Q1 (Q1=fr1 / Δf3dB_1, where Δf3dB_1 is the half-power bandwidth of the first resonant peak), and the equivalent pure delay τ (the transmission delay estimated by the slope of the phase-frequency curve in the high-frequency band, in ms). In practical applications, each quantity in the twelve-dimensional feature vector can be used as needed.

[0026] Step S13: Obtain a set of parameter suggestions based on the twelve-dimensional eigenvector. The set of parameter suggestions includes the velocity loop proportional gain Kp, integral gain Ki, acceleration feedforward coefficient Ka, control bandwidth, and integral time.

[0027] Specifically, the host computer can obtain a set of parameter suggestion values ​​through a multilayer perceptron (MLP) neural network. This MLP neural network can be trained on historical data and contains multiple fully connected layers with an input dimension of 12 (corresponding to a twelve-dimensional feature vector) and an output dimension of 5 (corresponding to the set of parameter suggestion values). During the training of the MLP neural network, the mean squared error (MSE) is used as the loss function, and the Adam optimizer is used to train on a large number of accumulated engineering field test samples (i.e., historical data, each sample including a twelve-dimensional feature vector and a set of parameters verified by experienced technicians, including velocity loop proportional gain Kp, integral gain Ki, acceleration feedforward coefficient Ka, control bandwidth, and integration time) until the validation set loss converges. The training process of the MLP neural network is a common technique in this field and will not be described in detail here.

[0028] In this step, the multilayer perceptron neural network takes the twelve-dimensional feature vector obtained in step S12 as input and outputs a set of parameter suggestions including the velocity loop proportional gain Kp, integral gain Ki, acceleration feedforward coefficient Ka, control bandwidth and integration time. The inference delay does not exceed 10ms.

[0029] Step S14: After writing the parameters (i.e., speed loop proportional gain Kp, integral gain Ki, acceleration feedforward coefficient Ka, control bandwidth and integral time) from the parameter suggestion set into the servo drive to be tuned, apply a step command of 10% amplitude of rated speed to the voltage reference command input to the speed loop of the servo drive to be tuned, and collect the speed feedback response curve of the servo drive.

[0030] That is, after the host computer receives the parameters from the parameter suggestion value set, it adjusts the voltage reference command input to the speed loop to change the speed feedback value of the servo driver, and then generates the corresponding curve based on the speed feedback value of the servo driver.

[0031] Step S15: Obtain the rise time, overshoot, and steady-state error from the speed feedback response curve, and confirm that the set of recommended parameter values ​​passes the time domain verification when the overshoot does not exceed the first preset value, the rise time does not exceed the second preset value, and the steady-state error does not exceed the third preset value. The rise time is the time required for the response to rise from 10% to 90% of the target value, the overshoot is the percentage of the peak speed exceeding the target speed, and the steady-state error is the root mean square of the speed deviation after adjustment.

[0032] Specifically, the first preset value can be 10%, the second preset value (rise time threshold) can be 120% of the design target, and the third preset value (steady-state error threshold) can be 0.5% of the target speed (i.e., the root mean square of the steady-state error does not exceed 0.5% of the target speed, and the speed feedback value of the servo drive does not have continuous oscillation). That is, when the overshoot does not exceed 10%, the rise time does not exceed 120% of the design target, the root mean square of the steady-state error does not exceed 0.5% of the target speed, and no continuous oscillation is detected, the host computer confirms that the set of recommended parameter values ​​has passed the time domain verification, and the above recommended parameter values ​​can be used as the alternative set of parameters.

[0033] The aforementioned servo drive tuning method injects a sinusoidal sweep excitation signal of preset amplitude into the speed loop of the servo drive to be tuned, and generates a Bode diagram containing amplitude-frequency and phase-frequency characteristics based on the acquired speed reference command signal and the measured speed feedback response signal. Then, it generates a set of parameter suggestion values ​​including speed loop proportional gain Kp, integral gain Ki, acceleration feedforward coefficient Ka, control bandwidth, and integral time by using the twelve-dimensional feature vector obtained from the Bode diagram. This greatly simplifies the parameter tuning operation of the servo drive.

[0034] In one embodiment of the present invention, the above-mentioned servo driver tuning method further includes: verifying the speed loop proportional gain, integral gain, acceleration feedforward coefficient, control bandwidth, and integral time in the parameter suggestion value set using pre-stored speed loop proportional gain safety range, integral gain safety range, acceleration feedforward coefficient safety range, control bandwidth safety range, and integral time safety range, respectively; and when any parameter in the parameter suggestion value set exceeds the corresponding safety range, replacing the parameter exceeding the safety range with the corresponding safety range boundary value. For example, when the pre-stored speed loop proportional gain Kp safety range is Kp∈[0.5,20], and the speed loop proportional gain in the parameter suggestion value set is 22, this step adjusts the speed loop proportional gain in the parameter suggestion value set to 20 (at this time, an alarm signal can be output to remind relevant personnel to pay attention).

[0035] Specifically, the safe ranges for the speed loop proportional gain, integral gain, acceleration feedforward coefficient, control bandwidth, and integral time can be obtained by reading the nameplate of the servo drive to be tuned, and these safe ranges are saved to the host computer. The verification operations for the speed loop proportional gain, integral gain, acceleration feedforward coefficient, control bandwidth, and integral time can be performed before step S14, i.e., the set of parameter recommendation values ​​written to the servo drive to be tuned is a verified set of parameter recommendation values. Through these steps, it can be ensured that the servo drive operates safely after the set of parameter recommendation values ​​is written to it.

[0036] In one embodiment of the present invention, the above-mentioned servo drive tuning method further includes: in step S15, if any one of the rise time, overshoot, and steady-state error obtained from the speed feedback response curve exceeds the corresponding preset value, i.e., the overshoot exceeds the first preset value, the rise time exceeds the second preset value, or the steady-state error exceeds the third preset value, the host computer retains the twelve-dimensional feature vector extracted in step S12 (without re-injecting the excitation signal), and corrects the twelve-dimensional feature vector according to the additional performance feedback constraint to obtain the corrected twelve-dimensional feature vector. Then, the corrected twelve-dimensional feature vector is re-inputted into the multilayer perceptron neural network, which re-infers and outputs a more conservative set of parameter suggestion values, and continues to execute subsequent steps S14 and S15. It should be noted that the additional performance feedback constraint does not increase the input dimension of the multilayer perceptron neural network as an additional input; the input dimension of the multilayer perceptron neural network is always kept at 12. During re-inference, the same multilayer perceptron neural network trained with historical data is reused, without adding new input neurons or retraining the network. The aforementioned additional performance feedback constraints include the difference between the current overshoot and the first preset value, the difference between the rise time and the second preset value, and the difference between the steady-state error and the third preset value. When correcting the twelve-dimensional eigenvector, the above differences can be superimposed on the corresponding eigencomponents representing the system's stability margin in the twelve-dimensional eigenvector according to a preset mapping relationship (which can be set in advance based on experience). This is done by effectively increasing the resonant peak gain, decreasing the phase margin, and adjusting the closed-loop bandwidth. The corrected twelve-dimensional eigenvector corresponds to a condition with a lower stability margin, thereby guiding the multilayer perceptron neural network to appropriately reduce the gain and increase the integration time in the next inference iteration, resulting in more conservative output parameters. This method improves the tuning accuracy of the servo driver.

[0037] In one embodiment of the present invention, when the multilayer perceptron neural network inference outputs a set of suggested parameter values ​​in step S13, the above-mentioned servo driver tuning method further includes: the host computer writes the set of suggested parameter values ​​and the corresponding twelve-dimensional feature vector when the servo driver tuning is confirmed to be completed into a historical database, and incrementally learns and updates the multilayer perceptron neural network using the historical database according to a preset period or when a trigger signal is received.

[0038] The above method can improve the accuracy of the parameter suggestion values ​​inferred by the multilayer perceptron neural network. That is, the more servo drives that use the above method for parameter tuning, the higher the accuracy of the parameter suggestion values ​​inferred by the multilayer perceptron neural network.

[0039] In one embodiment of the present invention, the above-mentioned servo driver tuning method further includes: connecting low-rank matrix pairs in parallel in each fully connected layer of the multilayer perceptron neural network, and optimizing the low-rank matrix with the twelve-dimensional feature vector and the set of actual parameter values ​​in the measured samples of the target model servo driver, thereby optimizing the multilayer perceptron neural network, wherein the target model servo driver is a servo driver of the same model as the servo driver to be tuned.

[0040] That is, the multilayer perceptron neural network is fine-tuned by low-rank adaptive (LoRA) method: all weights of the backbone network are frozen, low-rank matrix pairs are connected in parallel in each fully connected layer, and only a small number (no more than 50 sets) of sample pairs (twelve-dimensional feature vectors, the optimal parameter set verified by engineers) of the low-rank matrix are optimized. After fine-tuning, a special inference model for the target model is obtained. For example, a sample pair can be: a twelve-dimensional feature vector [first resonant frequency fr1=320Hz, first resonant peak gain Ar1=8.5dB, second resonant frequency fr2=0Hz, second resonant peak gain Ar2=0dB, anti-resonant frequency far=210Hz, anti-resonant valley gain Aar=-12dB, phase margin PM=55°, gain margin GM=14dB, current closed-loop bandwidth fbw=120Hz, low-frequency slope klf=-2dB / decade, first resonant quality factor Q1=6.2, equivalent pure delay τ=0.4ms], and the corresponding optimal parameter set verified by engineers [speed loop proportional gain Kp=3.2, integral gain Ki=85, acceleration feedforward coefficient Ka=0.35, control bandwidth=148Hz, integration time=8ms]; collecting no more than 50 similar sample pairs is sufficient to complete LoRA migration fine-tuning for the target model. This method can further improve the accuracy of servo driver tuning.

[0041] In one embodiment of the present invention, in step S11 above, when injecting a sinusoidal sweep excitation signal of preset amplitude into the reference voltage input terminal of the velocity loop, a multi-sinusoidal superposition excitation method can be adopted, and the amplitude of the excitation signal can be adaptively adjusted by controlling the signal-to-noise ratio to be no less than 20dB. This can significantly shorten the measurement time of the complete Bode plot.

[0042] In one embodiment of the present invention, in step S11 above, extracting a twelve-dimensional feature vector from the Bode diagram includes: when multiple resonance peaks are detected in the same Bode diagram, sorting them by amplitude from high to low and taking the first N resonance peaks as features, where N is a positive integer greater than or equal to 2 and less than or equal to 8; calculating the quality factor for each resonance peak, and including resonance peaks with quality factors exceeding a preset threshold into the twelve-dimensional feature vector, while resonance peaks with excessively low quality factors are considered damping features and are not included in the twelve-dimensional feature vector; comparing the identified resonance peaks with the first M twelve-dimensional feature vectors stored locally by the servo driver, and returning to step S11 when the frequency change of the identified resonance peaks exceeds 15%, re-injecting a sinusoidal sweep frequency excitation signal of preset amplitude into the speed loop and regenerating the Bode diagram.

[0043] By using the methods described above, the accuracy of the twelve-dimensional feature vector can be improved, and the occurrence of errors can be reduced.

[0044] In one embodiment of the present invention, the above-mentioned servo driver tuning method further includes: after confirming the time-domain verification in step S15, performing a frequency-domain verification step, which includes: injecting a broadband excitation signal with an amplitude not exceeding 5% of the rated speed into the reference voltage input terminal of the speed loop, and acquiring the speed reference command signal and the measured speed feedback response signal at the injection point of the broadband excitation signal, and performing multiple estimations using the same H1 frequency response function estimation method as in step S12 (i.e., using the ratio of cross power spectral density Syu(f) to input self-power spectral density Suu(f) H(f) = Syu(f) / Suu(f)). The closed-loop transfer function is calculated on average to obtain the actual closed-loop bandwidth, which is the frequency corresponding to the 3dB drop in the amplitude-frequency response of the closed-loop transfer function relative to the DC gain. When the deviation between the actual closed-loop bandwidth and the target bandwidth does not exceed ±10% and the phase margin is not less than 40°, the set of recommended parameter values ​​is verified in the frequency domain. If the deviation exceeds ±10% or the phase margin is less than 40°, the velocity loop proportional gain in the set of recommended parameter values ​​is adjusted according to the functional relationship between the actual closed-loop bandwidth and the target bandwidth, and the frequency domain verification step is re-executed with the adjusted set of recommended parameter values. The above frequency domain verification can be iterated 5 times; exceeding 5 iterations will result in an error.

[0045] The set of recommended parameter values ​​that have undergone time-domain and frequency-domain verification can be used as the tuning parameters for the servo drive, thus completing the servo drive tuning. Of course, in practical applications, the set of recommended parameter values ​​that have only undergone time-domain verification can also be used as the tuning parameters without frequency-domain verification, but this may affect the operating efficiency of the servo drive.

[0046] The present invention also provides a servo driver tuning system, including a storage unit and a control chip. The storage unit stores a computer program that can be executed on the control chip, and the control chip executes the computer program to implement the steps of the servo driver tuning method described above.

[0047] The servo driver in this embodiment is the same as the one described above. Figures 1-2 The servo driver tuning methods in the corresponding embodiments belong to the same concept. The specific implementation process can be found in the corresponding method embodiments. The technical features in the method embodiments are all applicable to this system embodiment, and will not be repeated here.

[0048] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the servo drive tuning method described above.

[0049] The computer-readable storage medium in this embodiment is the same as described above. Figures 1-2 The servo driver tuning methods in the corresponding embodiments belong to the same concept. The specific implementation process can be found in the corresponding method embodiments. The technical features in the method embodiments are also applicable to the computer-readable storage medium embodiments, and will not be repeated here.

[0050] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0051] Those skilled in the art will understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the functions can be assigned to different functional units and modules as needed. The functional units and modules in the embodiments can be integrated into a single processor, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units can be implemented in hardware or as software functional units. Furthermore, the specific names of the functional units and modules are merely for easy differentiation and are not intended to limit the scope of protection of this application. The specific working processes of the units and modules in the above system can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0052] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0053] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0054] In the embodiments provided in this application, it should be understood that the disclosed servo driver tuning method and system can be implemented in other ways. For example, the servo driver tuning system embodiments described above are merely illustrative. Furthermore, the functional units in the various embodiments of this application can be integrated into a single processor, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The integrated units described above can be implemented in hardware or as software functional units.

[0055] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or interface switching device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0056] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A servo driver tuning method, characterized in that, Includes the following steps: A. Inject a sinusoidal sweep frequency excitation signal with a preset amplitude into the reference voltage input terminal of the speed loop, and collect the speed reference command signal and the measured speed feedback response signal at the injection point; B. Generate a Bode plot containing amplitude-frequency characteristics and phase-frequency characteristics based on the speed reference command signal and the measured speed feedback response signal, and extract a twelve-dimensional feature vector from the Bode plot. The twelve-dimensional feature vector includes resonant frequency, resonant peak amplitude, anti-resonant frequency, phase margin, gain margin, and low-frequency slope. C. Obtain a set of parameter suggestions based on the twelve-dimensional feature vector. The set of parameter suggestions includes the velocity loop proportional gain, integral gain, acceleration feedforward coefficient, control bandwidth, and integral time. D. After writing the parameters from the parameter suggestion set into the servo driver, apply a step command with a rated speed of 10% amplitude to the voltage reference command input to the speed loop, and collect the speed feedback response curve of the servo driver. E. Obtain the rise time, overshoot, and steady-state error from the speed feedback response curve, and confirm that the set of recommended parameter values ​​passes time-domain verification when the overshoot does not exceed a first preset value, the rise time does not exceed a second preset value, and the steady-state error does not exceed a third preset value. The rise time is the time required for the response to rise from 10% to 90% of the target value, the overshoot is the percentage by which the peak speed exceeds the target speed, and the steady-state error is the root mean square of the speed deviation after adjustment.

2. The servo driver tuning method according to claim 1, characterized in that, The method includes the following steps: F. The speed loop proportional gain, integral gain, acceleration feedforward coefficient, control bandwidth, and integral time in the parameter suggestion value set are verified by the pre-stored speed loop proportional gain safety range, integral gain safety range, acceleration feedforward coefficient safety range, control bandwidth safety range, and integral time safety range, respectively. When any parameter in the parameter suggestion value set exceeds the corresponding safety range, the parameter that exceeds the safety range is replaced with the corresponding safety range boundary value. The set of parameter suggestions written to the servo driver in step D is the set of parameter suggestions verified in step F.

3. The servo driver tuning method according to claim 2, characterized in that, The method includes the following steps: G. When the overshoot exceeds the first preset value, the rise time exceeds the second preset value, or the steady-state error exceeds the third preset value, the twelve-dimensional feature vector generated in step B is corrected according to the additional performance feedback constraint, and the corrected twelve-dimensional feature vector is used as input to regenerate the set of parameter suggestion values. The additional performance feedback constraint is a quantity that characterizes the degree to which the overshoot, rise time, and steady-state error exceed their respective preset values.

4. The servo driver tuning method according to claim 1, characterized in that, In step C, obtaining the parameter suggestion value set based on the twelve-dimensional feature vector includes: inputting the twelve-dimensional feature vector into a multilayer perceptron neural network trained on historical data, and having the multilayer perceptron neural network output the parameter suggestion value set; the multilayer perceptron neural network has an input dimension of 12 and an output dimension of 5. The method includes the following steps: H1. Write the set of recommended parameter values ​​and the corresponding twelve-dimensional feature vectors when the servo drive tuning is confirmed to be complete into the historical database. H2. The multilayer perceptron neural network is incrementally learned and updated using a historical database according to a preset period or when a trigger signal is received.

5. The servo driver tuning method according to claim 4, characterized in that, The method includes: connecting low-rank matrix pairs in parallel in each fully connected layer of the multilayer perceptron neural network, and optimizing the low-rank matrix with the twelve-dimensional feature vector and actual parameter value set in the measured samples of the target model servo driver, thereby optimizing the multilayer perceptron neural network, wherein the target model servo driver is a servo driver of the same model as the servo driver to be tuned.

6. The servo driver tuning method according to claim 1, characterized in that, In step A, when injecting a sinusoidal sweep excitation signal with a preset amplitude into the reference voltage input terminal of the speed loop, a multi-sinusoidal superposition excitation method is adopted, and the amplitude of the excitation signal is adaptively adjusted by controlling the signal-to-noise ratio to be no less than 20dB.

7. The servo driver tuning method according to claim 1, characterized in that, In step B, extracting a twelve-dimensional feature vector from the Bode graph includes: B1. When multiple resonance peaks are detected in the same Bode plot, the top N resonance peaks are selected as features after sorting them from high to low amplitude. N is a positive integer greater than or equal to 2 and less than or equal to 8. B2. Calculate the quality factor for each resonance peak and include resonance peaks with quality factors exceeding a preset threshold into the twelve-dimensional feature vector; B3. Compare the identified resonance peak with the first M twelve-dimensional feature vectors stored locally by the servo driver, and return to step A when the frequency change of the identified resonance peak exceeds 15%.

8. The servo driver tuning method according to claim 1, characterized in that, Step E is followed by a frequency domain verification step, which includes: A broadband excitation signal with an amplitude not exceeding 5% of the rated speed is injected into the reference voltage input terminal of the speed loop. The speed reference command signal and the measured speed feedback response signal at the injection point are collected. The closed-loop transfer function and the actual closed-loop bandwidth are estimated by the frequency response function. The actual closed-loop bandwidth is the frequency corresponding to the point where the amplitude-frequency response of the closed-loop transfer function drops by 3dB relative to the DC gain. When the deviation between the actual closed-loop bandwidth and the target bandwidth does not exceed ±10% and the phase margin is not less than 40°, the set of recommended parameter values ​​is verified in the frequency domain. When the deviation between the actual closed-loop bandwidth and the target bandwidth exceeds ±10% or the phase margin is less than 40°, the velocity loop proportional gain in the set of recommended parameter values ​​is adjusted according to the functional relationship of the ratio of the actual closed-loop bandwidth to the target bandwidth, and the frequency domain verification step is re-executed with the adjusted set of recommended parameter values.

9. A servo driver tuning system, characterized in that, The device includes a storage unit and a control chip. The storage unit stores a computer program that can be executed on the control chip, and when the control chip executes the computer program, it implements the steps of the servo drive tuning method as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the steps of the servo drive tuning method as described in any one of claims 1-8.