Servo parameter setting method, computer device and storage medium
By using a neural network-based servo parameter tuning method, the target servo parameters are obtained through Bode plots and convolutional neural network training. This solves the problems of high debugging costs and poor stability in AC servo systems, and achieves efficient and accurate parameter tuning and improved system stability.
Patent Information
- Application Number
- CN202410097505.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-23
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-01-23
AI Technical Summary
Parameter debugging of existing AC servo systems requires a lot of manpower and time, and the debugging process is easily limited by the operating status of the equipment, and there are also vibration and noise problems.
A servo parameter tuning method based on neural networks is adopted. By obtaining the Bode plot of the servo system and inputting it into the target servo parameter tuning model, the target servo parameters are obtained by training a convolutional neural network, which simplifies the debugging process and improves the accuracy of the parameters.
It reduces the manpower and time costs of servo parameter tuning, improves the accuracy of parameters and the stability of the servo system, reduces noise during the tuning process, expands the applicable working conditions, and realizes the versatility of the equipment in different environments.
Smart Images

Figure CN117930751B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automatic control technology, and in particular to a servo parameter tuning method, computer equipment, and storage medium. Background Technology
[0002] AC servo systems are characterized by high control precision, strong overload capacity, and fast response speed, and are widely used in various fields of automation, such as robotics, automated production lines, CNC machine tools, textile equipment, medical machinery, and semiconductor manufacturing. However, due to the different application scenarios in each field, the transmission mechanisms and load sizes vary significantly. Common transmission mechanisms include direct-drive, lead screw drive, belt drive, and rack and pinion drive, and the common load inertia ratios also differ. Therefore, AC servo drives provide parameter setting interfaces, allowing users to adjust parameters according to actual load conditions and response requirements to achieve a certain level of responsiveness and stability for the servo system. However, current servo systems require numerous parameters to adjust, necessitating experienced engineers to spend considerable time and effort to establish a suitable set of parameters, resulting in significant investment of manpower and time. Summary of the Invention
[0003] Therefore, it is necessary to provide a servo parameter tuning method, computer equipment, and storage medium that can reduce labor and time costs in response to the above-mentioned technical problems.
[0004] A servo parameter tuning method, the method comprising:
[0005] Obtain the Bode plot of the servo system to be tuned;
[0006] The Bode plot of the servo system to be tuned is input into the target servo parameter tuning model based on a neural network to obtain the target servo parameters; the target servo parameter tuning model is trained based on the sample Bode plot and the corresponding servo parameter annotations; the servo parameter annotations are used to ensure that the sample servo system is in a stable state.
[0007] Servo drive is performed based on the target servo parameters.
[0008] A computer device 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 tuning various servo parameters.
[0009] 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 tuning various servo parameters.
[0010] The aforementioned servo parameter tuning method, computer equipment, and storage medium utilize Bode plots to represent the system's frequency response characteristics. These plots contain many features of the servo system and can reflect certain performance characteristics. By inputting the Bode plot of the servo system to be tuned into a target servo parameter tuning model based on a neural network, the target servo parameters can be obtained. This leads to reasonable servo parameters, reducing the manpower and time costs involved, thereby lowering the cost of servo parameter tuning. The servo parameters are highly accurate, and the servo system exhibits better stability. Attached Figure Description
[0011] Figure 1 This is an application environment diagram of the servo parameter tuning method in one embodiment;
[0012] Figure 2 This is a flowchart illustrating a servo parameter tuning method in one embodiment;
[0013] Figure 3 This is a block diagram of a closed-loop servo system in one embodiment;
[0014] Figure 4 This is a schematic diagram of the waveform and spectrum of an M-sequence white noise signal in one embodiment;
[0015] Figure 5 This is a schematic diagram of the time-domain waveform and spectrum of the chirp signal in one embodiment;
[0016] Figure 6 This is a schematic diagram of a Bode plot in one embodiment;
[0017] Figure 7 This is a flowchart illustrating a training method for a servo parameter tuning model in one embodiment.
[0018] Figure 8 This is a schematic diagram of the architecture of a convolutional neural network in one embodiment;
[0019] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0020] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0021] 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.
[0022] 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.
[0023] In one embodiment, such as Figure 1 The diagram shown illustrates the application environment of a servo parameter tuning method in one embodiment. Figure 1 The system includes a servo system 110 and a computer device 120. The software portion of the servo system 110 can run on the computer device 120 or run independently. The servo parameter tuning method in this embodiment runs on the computer device.
[0024] In one embodiment, such as Figure 2 The diagram shown is a flowchart of a servo parameter tuning method in one embodiment, including:
[0025] Step 202: Obtain the Bode plot of the servo system to be tuned.
[0026] Specifically, the servo system to be tuned can be an open-loop servo system, a closed-loop servo system, or something similar, and is not limited to these. The Bode plot of the servo system to be tuned can be the Bode plot obtained when the speed command input signal is 0. A Bode plot is a graphical representation of the system's frequency response, including an amplitude-frequency plot and a phase-frequency plot. It is understood that the amplitude-frequency plot and the phase-frequency plot can be on the same graph.
[0027] Step 204: Input the Bode plot of the servo system to be tuned into the target servo parameter tuning model based on the neural network to obtain the target servo parameters; the target servo parameter tuning model is trained based on the sample Bode plot and the corresponding servo parameter annotations; the servo parameter annotations are used to ensure that the sample servo system is in a stable state.
[0028] Among them, the target servo parameter tuning model based on neural networks is a pre-trained model, which can be a neural network model based on image recognition, such as convolutional neural networks, but is not limited to this.
[0029] The sample Bode plot can be obtained based on data collected from a real servo system. The servo parameter annotations corresponding to the sample Bode plot can be manually annotated to ensure that the servo system is in a stable state under the system conditions corresponding to that Bode plot. That is, driving the sample servo system corresponding to the sample Bode plot using these servo parameter annotations can ensure that the sample servo system is in a stable state.
[0030] Specifically, the computer device inputs the Bode plot of the servo system to be tuned into the target servo parameter tuning model based on the neural network to obtain the target servo parameters output by the target servo parameter tuning model.
[0031] In this embodiment, the target servo parameters may include the target system inertia, the target vibration suppression setting, and the target velocity loop controller parameters. Similarly, the servo parameter annotations may include system inertia annotations, vibration suppression setting annotations, and velocity loop controller parameter annotations. Among these, the system inertia, vibration suppression setting, and velocity loop controller parameters are crucial parameters for servo system stability, and there is a certain relationship between the Bode plot and these three parameters. Therefore, the three parameters output by the target servo parameter tuning model are accurate and can maintain system stability. Furthermore, the number of parameters is small, the training speed is fast, and the required training samples are also small, greatly reducing the model training time.
[0032] Step 206: Drive the servo based on the target servo parameters.
[0033] Specifically, the target servo parameters are used to drive the servo system to be tuned.
[0034] In this embodiment, the Bode plot is used to represent the frequency response characteristics of the system, which includes many features of the servo system and can reflect certain performance characteristics of the servo system. By inputting the Bode plot of the servo system to be tuned into the target servo parameter tuning model based on a neural network, the target servo parameters can be obtained. Reasonable servo parameters can be obtained, reducing the manpower and time costs invested, thereby reducing the cost of servo parameter tuning. The servo parameters are highly accurate and the stability of the servo system is better. Compared with the traditional method, which performs parameter tuning under unstable conditions, there is less noise during the tuning process.
[0035] In one embodiment, the servo parameter tuning method further includes: acquiring sample Bode plots and corresponding servo parameter annotations; inputting the sample Bode plots and corresponding servo parameter annotations into a neural network-based servo parameter tuning model for training until the iteration conditions are met, thereby obtaining the target servo parameter tuning model.
[0036] Specifically, the sample Bode plots and corresponding servo parameter annotations are input into a neural network-based servo parameter tuning model for training. A loss function is determined based on the servo parameter annotations and the servo parameters output by the model. The parameters in the neural network-based servo parameter tuning model are then adjusted based on the loss function until the iteration conditions are met, resulting in the target servo parameter tuning model. It can be understood that the iteration conditions could be a preset number of training iterations, a preset value for the loss function, or a preset training duration.
[0037] In this embodiment, the Bode plot of the sample and the corresponding servo parameter annotations are obtained and input into the servo parameter tuning model based on the neural network for training until the iteration conditions are met, and the target servo parameter tuning model is obtained. By extracting the features of the sample servo system through the Bode plot, the current state of the sample servo system can be correctly obtained. The servo parameter annotations indicate the parameters for tuning the sample servo system, that is, the improvement direction of the sample servo system. The target servo parameter tuning model trained in this way can accurately tune the servo system and reduce the cost of manpower and material resources.
[0038] In one embodiment, the sample Bode plot and corresponding servo parameter annotations are input into a neural network-based servo parameter tuning model for training until the iteration conditions are met, thereby obtaining the target servo parameter tuning model, including:
[0039] On the simulation platform, the sample Bode plot and the corresponding servo parameter annotations are input into the neural network-based servo parameter tuning model for training to obtain the initial servo parameter tuning model.
[0040] On the functional testing platform, the sample Bode plots and corresponding servo parameter annotations are input into the initial servo parameter tuning model for training until the iteration conditions are met, and the target servo parameter tuning model is obtained.
[0041] Among them, the servo parameter tuning model is the untrained model. The initial servo parameter tuning model is the model that already contains the initial model parameters. The target servo parameter tuning model is the trained model.
[0042] Specifically, some simulation platforms, such as Simulink, provide the function of initial training for neural network models and can provide samples. Therefore, by training the neural network-based servo parameter tuning model with the Bode plots and corresponding standard input servo parameters provided by the simulation platform, the initial neural network parameters can be trained, and the initial servo parameter tuning model can be obtained.
[0043] The functional testing platform can simulate real-world environments, providing various operating conditions for model training. Therefore, by inputting actual sample Bode plots and corresponding servo parameter annotations into the initial servo parameter tuning model on the functional testing platform, the neural network parameters under real-world conditions can be trained until the iteration conditions are met, thus obtaining the target servo parameter tuning model.
[0044] In this embodiment, the model is first trained on the simulation platform, and then trained on the functional testing platform, which can greatly reduce the training time and improve the accuracy of the model.
[0045] In one embodiment, the sample Bode plot and corresponding servo parameter annotations are input into a neural network-based servo parameter tuning model for training until the iteration conditions are met, thereby obtaining the target servo parameter tuning model, including:
[0046] The sample Bode plot and corresponding servo parameter labels are input into the neural network-based servo parameter tuning model. An optimizer is used to accelerate the adjustment of the parameters of the servo parameter tuning model until the iteration conditions are met, and the target servo parameter tuning model is obtained.
[0047] Specifically, the optimizer updates the neural network parameters based on gradient information, thereby minimizing the loss function and achieving fast convergence. The optimizer can be, for example, the Adam (Adaptive Moment Estimation) optimizer. The computer inputs the sample Bode plot and corresponding servo parameter annotations into the neural network-based servo parameter tuning model. The optimizer accelerates the convergence of the loss function, thus speeding up the adjustment of the servo parameter tuning model's parameters until the iteration conditions are met, obtaining the target servo parameter tuning model.
[0048] In this embodiment, the sample Bode plot and the corresponding servo parameter annotations are input into the servo parameter tuning model based on the neural network. An optimizer is used to accelerate the adjustment of the parameters of the servo parameter tuning model until the iteration conditions are met, and the target servo parameter tuning model is obtained, which can speed up the model training.
[0049] In one embodiment, such as Figure 3 The diagram shown is a block diagram of a closed-loop servo system in one embodiment. R(s) is the speed command input, G1(s) is the speed controller transfer function, C1(s) is the speed controller output signal, N(s) is the torque disturbance input signal, G2(s) is the controlled object transfer function model, H(s) is the feedback transfer function, and C(s) is the servo system speed output signal. The speed command input can be set to 0 to ensure that the displacement of the servo motor end is minimized after the torque disturbance input. The feedback transfer function H(s) can be set to 1.
[0050] In one embodiment, the sample Bode plot includes a sample amplitude-frequency plot and a sample phase-frequency plot; the method of obtaining the sample Bode plot includes:
[0051] Acquire the torque disturbance input signal;
[0052] The amplitude-frequency diagram of the sample is obtained by performing Fourier transform on the torque disturbance input signal and the speed controller output signal of the sample servo system.
[0053] The open-loop transfer function is determined based on the speed controller output signal and the torque disturbance input signal.
[0054] Plotting sample phase-frequency diagrams based on open-loop transfer functions.
[0055] The torque disturbance input signal can be a chirp signal or an M-sequence white noise signal. For example... Figure 4 The image shows a waveform and spectrum diagram of an M-sequence white noise signal in one embodiment. Figure 5 The image shows the time-domain waveform and spectrum of the chirp signal in one embodiment. The computer device performs Fourier transform on the torque disturbance input signal and the speed controller output signal of the servo system to obtain the sample amplitude-frequency diagram.
[0056] by Figure 3 Taking the servo system in the example, the closed-loop transfer function of the system under the sole action of the torque disturbance input signal N(s) is:
[0057]
[0058] Where C1(s) is the output signal of the speed controller, G1(s) is the transfer function of the speed controller, G2(s) is the transfer function of the controlled object, and H(s) is the feedback transfer function, which can be set as needed and can be 1.
[0059] The corresponding open-loop transfer function G(s):
[0060]
[0061] Therefore, the sample phase-frequency diagram can be plotted based on the open-loop transfer function. For example... Figure 6 The diagram shown is a schematic representation of a Bode plot in one embodiment. The upper diagram is the amplitude-frequency plot, and the lower diagram is the phase-frequency plot.
[0062] Understandably, the Bode plot of the servo system to be tuned can also be achieved using the steps described above. Furthermore, the Bode plot of the servo system to be tuned can also be achieved by setting the speed command input signal to 0 and the feedback transfer function to 1.
[0063] In this embodiment, a sample amplitude-frequency diagram is obtained by performing Fourier transforms on the torque disturbance input signal and the speed controller output signal of the servo system and then plotting the results. Based on the speed controller output signal and the torque disturbance input signal, the closed-loop transfer function is determined, thereby determining the open-loop transfer function. A sample phase-frequency diagram is then plotted. This assumes the speed command input signal of the servo system is zero, thus enabling the acquisition of accurate...
[0064] In one embodiment, the speed command input signal of the sample servo system is set to 0, and the feedback transfer function is set to 1.
[0065] Specifically, setting the speed command input signal of the sample servo system to 0 ensures that the displacement of the motor end is minimized after the torque disturbance input signal is input, meaning the system is in a relatively stable state. When the sample servo system is a closed-loop system, setting the feedback transfer function to 1 ensures that the output signal of the sample servo system is fully transmitted. It is understandable that if it is an open-loop servo system, there is no feedback transfer function.
[0066] In this embodiment, the traditional method calculates the transfer function when the speed command input signal is not 0. This is because the calculation is performed when the movement distance is large and overcurrent and collisions are likely to occur, resulting in large errors. By setting the speed command input signal of the servo system to 0, the speed is kept relatively small during parameter tuning, which is safer and more accurate. After parameter tuning, the servo system can run at normal speed and the system is stable.
[0067] In one embodiment, servo driving based on target servo parameters includes:
[0068] The servo system to be tuned is driven by the target servo parameters. Other parameters of the servo system to be tuned, excluding the target servo parameters, are adjusted to obtain the set of operating parameters of the servo system.
[0069] Specifically, when the types of target servo parameters are incomplete, such as those including target system inertia, target vibration suppression settings, and target velocity loop controller parameters, the servo system is driven according to these three types of parameters. Other parameters of the servo system to be tuned, excluding the target servo parameter, are adjusted manually or through other programs to obtain the set of operating parameters for the servo system to be tuned. This set of operating parameters includes the target servo parameter. It is understood that the response requirements of the servo system differ for different application scenarios; therefore, the set of operating parameters for the servo system can be adjusted according to requirements.
[0070] In this embodiment, since the parameters other than the target servo parameter are of low importance and can be determined or calculated based on other parameters, the servo system to be tuned is driven to run based on the target servo parameter, and the other parameters other than the target servo parameter are adjusted to obtain the set of running parameters. This can further optimize the performance of the servo system and does not take long.
[0071] In one embodiment, such as Figure 7 The diagram shown is a flowchart illustrating a training method for a servo parameter tuning model in one embodiment, including:
[0072] Step 702: Obtain the Bode plot of the sample and the corresponding servo parameter annotations; the servo parameter annotations are used to ensure that the sample servo system is in a stable state.
[0073] Step 704: Input the sample Bode plot and the corresponding servo parameter annotations into the neural network-based servo parameter tuning model for training until the iteration conditions are met, and obtain the target servo parameter tuning model.
[0074] In this embodiment, the Bode plot of the sample and the corresponding servo parameter annotations are obtained and input into the servo parameter tuning model based on the neural network for training until the iteration conditions are met, and the target servo parameter tuning model is obtained. By extracting the features of the sample servo system through the Bode plot, the current state of the sample servo system can be correctly obtained. The servo parameter annotations indicate the parameters for tuning the sample servo system, that is, the improvement direction of the sample servo system. The target servo parameter tuning model trained in this way can accurately tune the servo system and reduce the cost of manpower and material resources.
[0075] In one embodiment, the current servo parameter tuning has the following three problems:
[0076] ① Currently, there are many main parameters to debug for servo systems. It takes experienced engineers a certain amount of time to debug a suitable set of parameters, which requires a high investment of manpower and time.
[0077] ② When adjusting the parameters of the current servo system, the system needs to maintain a certain operating state. However, in some working conditions, the equipment cannot operate freely, and the operating environment is greatly restricted.
[0078] ③ During the current servo system parameter tuning process, the increase in system gain will cause the system to resonate, generating vibration and noise. Then, vibration suppression is performed, and then the gain is further increased. This process takes a long time.
[0079] Therefore, servo parameter tuning methods in various embodiments of this application are proposed. The main steps of the servo parameter tuning methods in various embodiments of this application include system feature extraction, neural network model, pre-running module, and determining the system operating parameter set.
[0080] I. System Feature Extraction
[0081] by Figure 3 The following servo system is used as an example for explanation. R(s) is the speed command input, G1(s) is the speed controller transfer function, C1(s) is the speed controller output signal, N(s) is the torque disturbance input signal, G2(s) is the controlled object transfer function, H(s) is the feedback transfer function, and C(s) is the servo system speed output signal.
[0082] Under the action of R(s) alone, the closed-loop transfer function of the system is:
[0083]
[0084] Under the action of N(s) alone, the closed-loop transfer function is:
[0085]
[0086] It can be seen that when R(s) = 0 and H(s) = 1, the closed-loop transfer function of the system is equivalent to the closed-loop transfer function of N(s) acting alone. This allows for the extraction of system characteristics even with small positional changes.
[0087] II. Feature Extraction and Bode Plot Construction
[0088] The amplitude-frequency diagram is obtained by performing Fourier transforms on the torque disturbance input signal and the speed controller output signal of the servo system. The phase-frequency diagram is then plotted using the system's open-loop transfer function.
[0089] III. Neural Network Module
[0090] It is instantiated using a CNN convolutional neural network. Other neural networks can also be used.
[0091] 1. Collect training samples. Under different working conditions, use the Bode plots output by the above method as sample inputs, and manually label the system inertia, vibration suppression settings, and velocity loop controller parameters.
[0092] 2. Build a neural network learning framework, such as... Figure 8 The diagram shown illustrates the architecture of a convolutional neural network in one embodiment. Each module has four convolutional layers (excluding the 1×1 convolutional layer for the identity mapping), plus the first 7×7 convolutional layer and the last fully connected layer, for a total of 18 layers. It is understood that... Figure 8 This is just an example; the model in this application embodiment can be implemented using other neural network models.
[0093] 3. Use neural networks to train training samples. First, use the Simulink model to collect and train simulated samples to obtain initial parameters, and then train on actual samples to shorten the training time.
[0094] Using the Bode plot as input to the convolutional neural network, the minimum mean squared error loss function is employed, and the network is optimized using the Adam optimizer.
[0095] 4. Continue until the trained target servo parameter tuning model is obtained. Input the Bode plot of the servo system to be tuned into the target servo parameter tuning model to obtain the target servo parameters.
[0096] IV. Pre-run module
[0097] The trajectory is set and run. The model gain is configured according to the speed loop gain, and the control loop is simulated inside the servo drive to generate position commands, speed feedforward, and torque feedforward. The disturbance observer is configured according to the speed loop gain, and the parameters are adjusted reasonably by the set time in the running trajectory to obtain the optimal operating parameters.
[0098] In this embodiment, by using a trained servo parameter tuning model for servo parameter tuning, the tuning steps can be simplified, the servo parameter tuning time can be shortened, and the labor and time costs can be reduced; the application conditions can be expanded to meet the equipment requirements under different conditions; and the noise during the tuning process is low, no mobile equipment is required, test samples can be continuously collected to improve the accuracy of the model, and it can be universal for all environments.
[0099] In one embodiment, a servo parameter tuning method includes:
[0100] Step (a1): Obtain the torque disturbance input signal.
[0101] In step (a2), the torque disturbance input signal of the servo system and the output signal of the speed controller are subjected to Fourier transform and plotted to obtain a sample amplitude-frequency diagram. The speed command input signal of the servo system is set to 0, and the feedback transfer function is set to 1.
[0102] Step (a3) determines the open-loop transfer function based on the speed controller output signal and the torque disturbance input signal.
[0103] Step (a4): Draw the sample phase frequency diagram based on the open-loop transfer function.
[0104] Step (a5) involves combining the sample amplitude-frequency diagram and the sample phase-frequency diagram to obtain the Bode plot.
[0105] Step (a6) is to obtain the sample Bode plot and the corresponding servo parameter annotations.
[0106] In step (a7), on the simulation platform, the sample Bode plot and the corresponding servo parameter annotations are input into the servo parameter tuning model based on the neural network for training. An optimizer is used to accelerate the adjustment of the parameters of the servo parameter tuning model to obtain the initial servo parameter tuning model.
[0107] In step (a8), on the functional test platform, the sample Bode plot and the corresponding servo parameter annotations are input into the initial servo parameter tuning model for training. An optimizer is used to accelerate the adjustment of the parameters of the servo parameter tuning model until the iteration conditions are met, and the target servo parameter tuning model is obtained.
[0108] Step (a9): Obtain the Bode plot of the servo system to be tuned.
[0109] Step (a10) involves inputting the Bode plot of the servo system to be tuned into the target servo parameter tuning model based on a neural network to obtain the target servo parameters. Servo parameter annotation is used to ensure the servo system is in a stable state.
[0110] Step (a11) involves driving the servo system to run based on the target servo parameters, adjusting other parameters of the servo system besides the target servo parameters, and obtaining the set of operating parameters of the servo system.
[0111] In this embodiment, by using a trained servo parameter tuning model for servo parameter tuning, the tuning steps can be simplified, the servo parameter tuning time can be shortened, the noise during the tuning process is low, and no mobile device is required. Test samples can be continuously collected to improve the model accuracy, making it universal for all environments.
[0112] 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 from (a1) to (a11) are shown sequentially according to their numbers. However, these steps are not necessarily executed in the order indicated by the arrows or numbers. Unless otherwise specified in this document, there is no strict order requirement for the execution of these steps; they can be executed in other orders. Figure 2 and Figure 7 At least some of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.
[0113] In one embodiment, a computer device is provided, which may be a terminal device, and its internal structure diagram may be as follows: Figure 9As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a servo parameter tuning method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0114] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0115] In one embodiment, a servo parameter tuning device is provided to implement the steps of the above method embodiments.
[0116] In one embodiment, a computer device 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.
[0117] 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.
[0118] 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.
[0119] 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.
[0120] 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 tuning servo parameters, characterized in that, The method includes: Obtain the Bode plot of the servo system to be tuned; The Bode plot of the servo system to be tuned is input into the target servo parameter tuning model based on a neural network to obtain the target servo parameters. The target servo parameter tuning model is trained based on the sample Bode plot and the corresponding servo parameter annotations. The servo parameter annotations are used to ensure that the sample servo system is in a stable state. The sample Bode plot includes a sample amplitude-frequency plot and a sample phase-frequency plot. Servo drive is performed based on the target servo parameters; The methods for obtaining the sample Bode plot include: Acquire the torque disturbance input signal; The sample amplitude-frequency diagram is obtained by performing Fourier transform on the torque disturbance input signal and the speed controller output signal of the sample servo system; the speed command input signal of the sample servo system is set to 0, and the feedback transfer function is set to 1. The open-loop transfer function is determined based on the speed controller output signal and the torque disturbance input signal. The sample phase frequency diagram is plotted based on the open-loop transfer function.
2. The method according to claim 1, characterized in that, The method further includes: Obtain the Bode plot of the sample and the corresponding servo parameter annotations; The sample Bode plot and corresponding servo parameter annotations are input into the neural network-based servo parameter tuning model for training until the iteration conditions are met, thereby obtaining the target servo parameter tuning model.
3. The method according to claim 2, characterized in that, The step of inputting the sample Bode plot and corresponding servo parameter annotations into a neural network-based servo parameter tuning model for training until the iteration conditions are met to obtain the target servo parameter tuning model includes: On the simulation platform, the sample Bode plot and the corresponding servo parameter annotations are input into the neural network-based servo parameter tuning model for training to obtain the initial servo parameter tuning model. On the functional testing platform, the sample Bode plot and the corresponding servo parameter annotations are input into the initial servo parameter tuning model for training until the iteration conditions are met, and the target servo parameter tuning model is obtained.
4. The method according to claim 2, characterized in that, The step of inputting the sample Bode plot and corresponding servo parameter annotations into a neural network-based servo parameter tuning model for training until the iteration conditions are met to obtain the target servo parameter tuning model includes: The sample Bode plot and corresponding servo parameter labels are input into a neural network-based servo parameter tuning model. An optimizer is used to accelerate the adjustment of the parameters of the servo parameter tuning model until the iteration conditions are met, thereby obtaining the target servo parameter tuning model.
5. The method according to any one of claims 1 to 4, characterized in that, The servo drive based on the target servo parameters includes: The servo system to be tuned is driven to run based on the target servo parameters, and other parameters besides the target servo parameters are adjusted to obtain the set of operating parameters of the servo system to be tuned.
6. A computer device 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 5.
7. 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 5.
Citation Information
Patent Citations
Control system and control method of anti-interference compensation of servo motor
CN103095204A
PID controller parameter setting method based on neural network
CN109459927A
