Gain adjustment method, electronic equipment and readable storage medium
By obtaining feedback signals in the motor control system and calculating the speed loop delay time, the appropriate speed loop and position loop gain parameters are directly calculated, which solves the problem of excessively long control adjustment of the motor driver in the prior art, and achieves faster and accurate parameter settings.
Patent Information
- Application Number
- CN202411627944.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-11-14
AI Technical Summary
The three-ring control adjustment process of existing motor drivers takes a long time and cannot meet many application scenarios with high requirements for real-time performance.
By obtaining the feedback signal of the motor under the preset control signal when the motor control system is in the speed open loop mode, determining the speed loop delay time, and using this delay time to calculate the appropriate speed loop and position loop gain parameters, avoiding manual test Compile the process.
It significantly reduces the time required for parameter adjustment, making the parameter settings of the speed ring and position ring faster and more accurate, and adapts to more application scenarios.
Smart Images

Figure CN119401877A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of motor control, and in particular to a gain adjustment method, an electronic device and a readable storage medium. Background Art
[0002] In the control scheme of the motor drive, three-loop position control and two-loop speed control are common configurations. In the three-loop position control structure, from the inside to the outside, there are current loop, speed loop and position loop. In the existing three-loop control adjustment technology, whether it is time domain adjustment or frequency domain adjustment, it is necessary to first calculate the parameters of the current loop according to the electrical parameters of the motor, and then use the proportional gain of the speed loop as a reference, and use manual trial and error or automatic trial and error to adjust and set the proportional and integral gains of the speed loop. After the speed loop parameter adjustment and setting are completed, the subsequent position loop gain adjustment and setting can be performed. The entire parameter adjustment process is relatively time-consuming, usually taking tens of seconds to several minutes. This adjustment time cannot meet customers' needs for fast response in many applications with high real-time requirements.
[0003] Therefore, how to provide a solution to the above technical problems is a problem that those skilled in the art need to solve at present. Summary of the invention
[0004] The purpose of the present invention is to provide a gain adjustment method, an electronic device and a readable storage medium, which can avoid repeated manual trial and error, significantly reduce the time required for parameter adjustment, and make the parameter setting of the speed loop and the position loop faster and more accurate, thereby adapting to more application scenarios.
[0005] In order to solve the above technical problems, the present invention provides a gain adjustment method, comprising:
[0006] When the motor control system is in a speed open-loop mode, obtaining a feedback signal of the motor under a preset control signal;
[0007] Based on the feedback signal, determining a speed loop delay time of the motor control system in a speed closed loop mode;
[0008] The first speed loop gain parameter is determined using the speed loop delay time.
[0009] Optionally, the process of determining the speed loop delay time of the motor control system in the speed closed-loop mode based on the feedback signal includes:
[0010] Acquire a phase difference between a fundamental wave of the feedback signal and the preset control signal;
[0011] Based on the phase difference, a speed loop delay time of the motor control system in a speed closed-loop mode is determined.
[0012] Optionally, based on the phase difference, the process of determining the speed loop delay time of the motor control system in the speed closed-loop mode includes:
[0013] Calculating an inner loop delay angle based on the phase difference;
[0014] The speed loop delay time of the motor control system in the speed closed loop mode is determined by using the inner loop delay angle.
[0015] Optionally, the process of determining the first speed loop gain parameter by using the speed loop delay time includes:
[0016] Determine the speed loop proportional gain coefficient according to the speed loop delay time and the first corresponding relationship; the first corresponding relationship is the corresponding relationship between the speed loop delay time and the speed loop proportional gain coefficient;
[0017] Determine the speed loop integral gain coefficient according to the speed loop delay time and a second corresponding relationship; the second corresponding relationship is the corresponding relationship between the speed loop delay time and the speed loop integral gain coefficient;
[0018] The first speed loop gain parameter includes the speed loop proportional gain coefficient and the speed loop integral gain coefficient.
[0019] Optionally, before obtaining the feedback signal of the motor under the preset control signal, the gain adjustment method further includes:
[0020] Obtaining a minimum natural vibration frequency of a mechanical system; the mechanical system is based on the motor and a mechanical load connected thereto;
[0021] The frequency of the preset control signal is determined based on the lowest natural vibration frequency.
[0022] Optionally, after determining the first speed loop gain parameter using the speed loop delay time, the gain adjustment method further includes:
[0023] Obtaining the mechanical inertia of a mechanical system; the mechanical system is based on the motor and a mechanical load connected thereto;
[0024] Obtaining a second speed loop gain parameter according to the mechanical inertia and the first speed loop gain parameter;
[0025] A speed loop controller is configured according to the second speed loop gain parameter.
[0026] Optionally, before obtaining the mechanical inertia of the mechanical system, the gain adjustment method further includes:
[0027] When the motor control system is in a speed open-loop mode, obtaining a mechanical resonance point of the mechanical system when the motor responds to each set of preset control signals;
[0028] Selecting a mechanical resonance point with the lowest frequency among the plurality of mechanical resonance points as a target resonance point;
[0029] After the notch frequency of the notch filter of the motor control system is set to the frequency of the target resonance point, the operation of acquiring the mechanical inertia of the mechanical system is performed.
[0030] Optionally, the gain adjustment method further includes:
[0031] When the motor control system includes a position loop, the position loop gain parameter is determined according to the speed loop delay time and a third corresponding relationship; the third corresponding relationship is the corresponding relationship between the speed loop delay time and the position loop proportional gain.
[0032] In order to solve the above technical problems, the present invention further provides an electronic device, comprising:
[0033] Memory for storing computer programs;
[0034] A processor is used to implement the steps of the gain adjustment method as described in any one of the above when executing the computer program.
[0035] To solve the above technical problem, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the gain adjustment method as described in any one of the above are implemented.
[0036] The present invention provides a gain adjustment method. When the motor control system is in a speed open-loop mode, the speed loop is not affected by the feedback speed. At this time, the motor operation is directly controlled by a preset control signal. By analyzing the feedback signal, it is convenient to determine the time delay between the motor receiving the control signal and the actual response, thereby determining the speed loop delay time. The speed loop delay time is a key parameter for adjusting the speed loop gain, which directly affects the response speed and stability of the controller to speed changes. The present invention can calculate appropriate speed loop gain parameters and position loop gain parameters through the speed loop delay time, avoid repeated manual trial and error, thereby significantly reducing the time required for parameter adjustment, making the parameter settings of the speed loop and the position loop faster and more accurate, and adapting to more application scenarios.
[0037] The present invention also provides a gain adjustment system, an electronic device and a computer-readable storage medium, which have the same beneficial effects as the above-mentioned gain adjustment method. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A flow chart of the steps of a gain adjustment method provided by the present invention;
[0040] Figure 2 A schematic diagram of calculating the delay time of the speed inner loop control provided by the present invention;
[0041] Figure 3 A flow chart of speed inner loop control provided by the present invention;
[0042] Figure 4 A flow chart of speed inner loop control after a delay time simplification provided by the present invention;
[0043] Figure 5 A flow chart of signal injection and sampling provided by the present invention;
[0044] Figure 6 A flow chart of the control gain adjustment steps provided by the present invention;
[0045] Figure 7 A flowchart of the steps of performing parameter adjustment when powering on for the first time provided by the present invention;
[0046] Figure 8 A flow chart of the steps of adjusting the parameters for each operation provided by the present invention;
[0047] Fig. 9 A schematic diagram of the structure of a gain adjustment system provided by the present invention;
[0048] Fig.10 A schematic diagram of the structure of an electronic device provided by the present invention;
[0049] Fig.11 This is a schematic diagram of the structure of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION
[0050] The core of the present invention is to provide a gain adjustment method, an electronic device and a readable storage medium, which can avoid repeated manual trial and error, significantly reduce the time required for parameter adjustment, and make the parameter setting of the speed loop and the position loop faster and more accurate, thereby adapting to more application scenarios.
[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] First, please refer to Figure 1 The present invention provides a gain adjustment method, comprising:
[0053] S101: When the motor control system is in a speed open-loop mode, a feedback signal of the motor under a preset control signal is obtained.
[0054] It can be understood that the motor control system is used to adjust the speed, position, torque and other parameters of the motor to achieve precise motion control. For a motor control system with two rings, it includes a current loop and a speed loop from the inside to the outside. For a motor control system with three rings, it includes a current loop, a speed loop and a position loop from the inside to the outside. It can be understood that the current loop gain coefficient is determined by the current loop control scheme and the motor parameters. This embodiment does not limit its adjustment scheme. Speed open loop is a control mode of the motor control system. In this mode, the speed output of the motor is not subject to feedback control. The motor driver can drive the motor according to a preset control signal (such as a voltage or current command), but does not adjust the actual operating speed of the motor through a feedback mechanism.
[0055] In this embodiment, the motor control system can be manually controlled to be in speed open-loop mode and torque current loop closed-loop mode, and then one or a series of preset control signals are output to the motor through the motor driver. The preset control signal can be a specific current signal or torque signal. These signals can be constant (such as constant current or torque) or variable (such as sinusoidal waveform signals). They can be selected according to actual engineering needs. This embodiment is not specifically limited here. While the motor responds to the preset control signal, the actual feedback signal of the motor is obtained. Specifically, the actual speed signal (feedback speed) and / or actual position signal of the motor can be collected by a sensor (such as an encoder) installed on the motor. It can be understood that the feedback signal in this embodiment includes but is not limited to a speed signal and / or a position signal.
[0056] The feedback signal reflects the performance of the motor under a specific signal. By obtaining the actual feedback signal of the motor in the speed open-loop mode, the response characteristics of the motor can be analyzed, because the response of the motor can be evaluated without being affected by the closed-loop control, which simplifies the system debugging process and facilitates the subsequent determination of the delay time of the speed loop, thereby providing a basis for the parameter adjustment of the closed-loop control mode. In addition, testing in the open-loop mode can also reduce the potential risks caused by improper parameter settings. As another optional embodiment, when the motor control system is in the speed open-loop mode, when the motor is in the static mode, a preset control signal is output to the motor to obtain the feedback signal of the motor under the preset control signal. When the motor is in a static state, the dynamic changes of the system are less, and there is no need to consider factors such as speed changes and load fluctuations, thereby simplifying the test conditions, reducing the mechanical vibration and electromagnetic interference caused by the rotation of the motor, and making the feedback signal more stable and reliable. In addition, in a static state, because there is no time measurement error caused by the rotation of the motor, it is easier to measure and calculate the response time of the motor.
[0057] Of course, in other non-stationary modes of the motor, such as the motor running state or a specific operating point of the motor, a preset control signal can also be output to the motor to obtain a feedback signal of the motor under the preset control signal and execute subsequent steps. It can be selected according to actual engineering needs, and this embodiment is not specifically limited here.
[0058] S102: Determine a speed loop delay time of the motor control system in a speed closed-loop mode based on the feedback signal.
[0059] Through the analysis of the speed closed-loop control stability, it can be seen that the closed-loop bandwidth of the speed loop is determined by the current loop delay, speed loop execution delay, speed feedback sampling delay, speed feedback filter delay, notch filter delay and mechanical vibration inside the speed loop. All the above open-loop delays are combined into the speed loop delay time Td. The combined speed loop delay time can be equivalent to a first-order low-pass link 1 / (Td×s+1). After Td is known, based on the principle of the third-order control system, the speed loop proportional gain coefficient Kv and integral gain coefficient Kvi can be calculated, as follows: Figure 2 shown.
[0060] It can be understood that in the speed open-loop mode, the motor driver outputs preset control signals, the motor generates movement according to these signals, and the actual feedback signals of the motor in response to the preset control signals are collected and recorded through sensors (such as encoders) installed on the motor. These signals may include the actual speed (speed signal) and / or actual position (position signal) of the motor. Since the feedback signal is the direct response of the motor control system to a given input, these feedback signals are analyzed, such as comparing the time history of the input signal and the feedback signal. In addition, in the speed open-loop mode, the response of the motor is only affected by the preset control signal and not by the closed-loop control. Therefore, the inherent characteristics of the system can be understood by analyzing these responses, such as the speed loop delay time of the motor control system in the speed closed-loop mode.
[0061] Among them, the speed loop delay time is an important parameter in the motor control system, which affects the stability and response speed of the system. If the speed loop delay time is too long, it may cause the system to respond slowly or even become unstable. Therefore, by analyzing the feedback signal in the speed open-loop mode to determine the speed loop delay time, it is convenient to set the appropriate speed loop gain to optimize the system performance and ensure that in the closed-loop control mode, the motor can respond quickly and accurately to the speed setting value while maintaining the stability and robustness of the system.
[0062] S103: Determine a first speed loop gain parameter using the speed loop delay time.
[0063] In this embodiment, the speed loop delay time is used to calculate the first speed loop gain parameter, and the first speed loop gain parameter is applied to the motor control system and adaptively fine-tuned to improve the stability of the motor control system under various working conditions, ensuring that the motor can respond to speed changes quickly and accurately under speed closed-loop control, while reducing overshoot and oscillation.
[0064] It can be understood that directly using the speed loop delay time to determine the first speed loop gain parameter not only improves the debugging efficiency and accuracy, but also reduces the manual trial and error process. Moreover, the calculation method based on actual measurement data can quickly determine the near-optimal gain parameter, thereby shortening the system debugging time, enhancing the system's resistance to load changes and environmental disturbances, and improving the robustness of the system.
[0065] Among them, the process of calculating the first speed loop gain parameter based on the speed loop delay time can be calculated by the method in PI control, such as according to a preset mathematical model or a related relationship, etc., and can be selected according to the actual engineering needs. This embodiment is not specifically limited here. For example, taking the mathematical model scheme as an example, first, a mathematical model is established according to the characteristics of the motor and the control system. The model may include a transfer function, a state space equation or a differential equation. The delay time of the speed loop is clearly included in the model, such as setting a delay link, and using control theory (such as root trajectory, frequency response analysis, etc.) to calculate the proportional gain Kp and the integral gain Ki to ensure that the system is stable and meets performance requirements. Taking the related relationship scheme as an example, a suitable relationship can be selected according to experience or standardized control rules to estimate the gain parameters, and the speed loop delay time is used as input. The gain value is calculated by the relationship, and then these parameters can be tested in the actual system and fine-tuned according to the response of the system.
[0066] It can be seen that in this embodiment, when the motor control system is in the speed open-loop mode, the speed loop is not affected by the feedback speed. At this time, the motor operation is directly controlled by the preset control signal. By analyzing the feedback signal, it is convenient to determine the time delay between the motor receiving the control signal and the actual response, thereby determining the speed loop delay time. The speed loop delay time is a key parameter for adjusting the speed loop gain, which directly affects the response speed and stability of the controller to speed changes. The present invention can calculate appropriate speed loop gain parameters and position loop gain parameters through the speed loop delay time, avoiding repeated manual trial and error, thereby significantly reducing the time required for parameter adjustment, making the parameter settings of the speed loop and the position loop faster and more accurate, and adapting to more application scenarios.
[0067] Based on the above embodiments:
[0068] In an exemplary embodiment, the process of determining the speed loop delay time of the motor control system in the speed closed loop mode based on the feedback signal includes:
[0069] Obtaining a phase difference between a fundamental wave of a feedback signal and a preset control signal;
[0070] Based on the phase difference, the speed loop delay time of the motor control system in the speed closed loop mode is determined.
[0071] It can be understood that when the preset control signal acts on the motor, the response of the motor will not occur immediately, but there will be a time delay. This delay can be determined by analyzing the phase difference between the fundamental wave of the feedback signal (usually a signal with a sine waveform) and the preset control signal. Specifically, the fundamental wave component is extracted from the feedback signal. The fundamental wave component is the main part of the signal, which characterizes the steady-state response of the motor. The extracted fundamental wave is compared with the preset control signal. Fourier transform or other signal processing techniques are used to calculate the phase difference between the fundamental wave of the feedback signal and the preset control signal. The phase difference represents the time delay between the control signal and the actual response. The larger the phase difference, the longer the delay time. It can be understood that the phase difference is the angular difference between the control signal and the actual response, which can be converted into a time delay by a preset relationship. By adopting the solution of this embodiment, the parameters of the motor control system in the speed closed-loop mode can be accurately configured, thereby improving the performance and stability of the system, reducing the trial and error process of manually adjusting the parameters, and speeding up the system debugging.
[0072] In an exemplary embodiment, the process of determining the speed loop delay time of the motor control system in the speed closed loop mode based on the phase difference includes:
[0073] Calculate the inner loop delay angle based on the phase difference;
[0074] The inner loop delay angle is used to determine the speed loop delay time of the motor control system in the speed closed loop mode.
[0075] In this embodiment, considering that the phase difference between the fundamental wave of the feedback signal and the preset control signal corresponds to the total delay angle Theta, including the inner loop delay angle Theta1 of the speed loop and other system delays (such as the delay caused by the electromechanical time constant of the motor), therefore, this embodiment can calculate the inner loop delay angle Theta1 of the speed loop through the total delay angle Theta corresponding to the phase difference between the fundamental wave of the feedback signal and the preset control signal, and the preset angle relationship. Among them, the preset angle relationship can be Theta=90 degrees+Theta1. Then, based on the inner loop delay angle Theta1, the speed loop delay time Td of the motor control system in the speed closed loop mode is calculated. The delay time calculated in this way is the delay time of the inner loop of the speed loop, which can accurately reflect the actual performance of the speed loop, so as to more accurately adjust the gain parameters of the speed loop, thereby optimizing the performance of the motor control system. At the same time, accurate delay time calculation helps to reduce the oscillation of the system when responding to speed changes and improve the stability and robustness of the system.
[0076] As another optional embodiment, the speed loop delay time can be calculated by the following conversion relationship, which is Td=1000 / (tan(Theta1)×Ws), where Ws is the frequency in radians per second and is related to the fundamental frequency. The conversion relationship directly relates the phase difference (inner loop delay angle Theta1) to the system's angular frequency Ws, so that the delay time Td can be calculated more accurately. The calculation method is simple and can be applied to different types of motor control systems. As long as the phase difference and the system's angular frequency can be accurately measured, the formula can be used to calculate the speed loop delay time, saving debugging time.
[0077] In an exemplary embodiment, the process of determining the first speed loop gain parameter using the speed loop delay time includes:
[0078] Determine the speed loop proportional gain coefficient according to the speed loop delay time and the first corresponding relationship; the first corresponding relationship is the corresponding relationship between the speed loop delay time and the speed loop proportional gain coefficient;
[0079] Determine the speed loop integral gain coefficient according to the speed loop delay time and the second corresponding relationship; the second corresponding relationship is the corresponding relationship between the speed loop delay time and the speed loop integral gain coefficient;
[0080] The first speed loop gain parameter includes a speed loop proportional gain coefficient and a speed loop integral gain coefficient.
[0081] In this embodiment, after the speed loop delay time Td is known, the bandwidth parameter Wn (rad / s) of the third-order system including the speed loop delay time Td can be obtained, where Wn=1 / (k1×Td). Among them, the first corresponding relationship is Kv=1 / (k1×Td), Kv is the position loop proportional gain coefficient, k1 is the first coefficient, and the value range of k1 is 3~6, Kvi=1 / (k2×Td×Td), Kvi is the position loop integral gain coefficient, k2 is the second coefficient, and the value range of k2 is 45~60.
[0082] As an optional embodiment, for a motor control system including a position loop, the method further includes:
[0083] The position loop gain parameter is determined according to the speed loop delay time and the third corresponding relationship; the third corresponding relationship is the corresponding relationship between the speed loop delay time and the position loop proportional gain.
[0084] The third corresponding relationship is Kp=Kv / k3, where Kp is the position loop proportional gain coefficient, k3 is the third coefficient, and the value range of k3 is 4~6.
[0085] It can be understood that directly calculating the position loop gain parameters based on the speed loop delay time can reduce the number of manual debugging and experiments required, thereby saving time and resources.
[0086] In an exemplary embodiment, before obtaining the feedback signal of the motor under the preset control signal, the gain adjustment method further includes:
[0087] Obtain the lowest natural vibration frequency of the mechanical system; the mechanical system is composed of the motor and its connected mechanical load;
[0088] The frequency of the preset control signal is determined based on the lowest natural vibration frequency.
[0089] In this embodiment, combined with Figure 2 , Figure 3 and Figure 4 , analyze the speed inner loop structure and delay, Figure 3 It is the flow chart of speed inner loop control. Figure 4 This is the speed inner loop control flow chart after the delay time is simplified.
[0090] The speed inner loop delay time Td' is equal to the sum of the notch filter, torque low-pass filter, current loop delay, speed sampling delay, speed feedback filter and mechanical vibration delay. Since the torque low-pass filter and speed feedback filter are manually set by the driver, the delay time is large and the setting time is known, so when the function is implemented, the above functions can be closed frequently to merge the above delay times into the delay time Td1. Delay time Td1 = torque low-pass filter time + speed feedback filter time. Since the delay time of delay factors such as notch filter, current loop delay, speed sampling delay and mechanical vibration delay is small and the delay time is unclear, they can be combined for measurement, that is, delay time Td2 = notch filter time + mechanical vibration delay + current loop delay + speed sampling delay.
[0091] In the driver control program, after the frequency torque low-pass filter time + speed feedback filter time, the driver injects a low-frequency sinusoidal current signal into the motor and measures the delay time Td2. Then the known set delay time Td1 and the measured delay time Td2 are combined and superimposed to obtain the speed inner loop delay time Td'. Speed inner loop delay time Td' = set delay time Td1 + measured delay time Td2. It can be understood that the delay time Td2 in this embodiment is equivalent to the current inner loop delay time Td in the above embodiment, which reduces the complexity of system analysis and improves measurement accuracy.
[0092] Considering that mechanical resonance obviously affects the measurement accuracy of the delay time Td2, in order to improve the measurement accuracy of the delay time, this embodiment accurately controls the frequency of the preset control signal (low-frequency sinusoidal current signal). The frequency f of the preset control signal is equal to k times the square root of the minimum mechanical resonance frequency of the driver's total inertia ratio. K is a number between 2-4. That is, the frequency f of the injected preset control signal = minimum mechanical resonance frequency / (k times × square root of total inertia ratio). It can be understood that by selecting a suitable frequency of the control signal, the influence of mechanical resonance on the system response can be reduced and the accuracy of the measurement can be improved.
[0093] In an exemplary embodiment, after determining the first speed loop gain parameter using the speed loop delay time, the gain adjustment method further includes:
[0094] Obtain the mechanical inertia of the mechanical system; the mechanical system is based on the motor and its connected mechanical load;
[0095] According to the mechanical inertia and the first speed loop gain parameter, the second speed loop gain parameter is obtained;
[0096] Obtaining a second position loop gain parameter according to the mechanical inertia and the first position loop gain parameter;
[0097] Configure the speed loop controller according to the second speed loop gain parameter;
[0098] The position loop controller is configured according to the second position loop gain parameter.
[0099] In this embodiment, the mechanical system includes a motor and a mechanical load connected thereto, and the mechanical inertia specifically refers to the sum of the motor rotor inertia and the inertia of all connected mechanical loads. Considering that the inertia of the motor and the load directly affects the performance of the motor control system during acceleration, deceleration and steady-state operation, when calculating the speed loop proportional gain and the position loop gain, the mechanical inertia should be further calculated.
[0100] That is, after the speed loop proportional gain Kv, speed loop integral gain Kvi and position proportional gain Kp are identified, the control gains of the speed loop and position loop are not updated immediately, but multiplied by the total inertia of the system first to adjust the gain parameters of each control loop to a level suitable for the actual system, and then the speed loop controller is configured according to the second speed loop gain parameter, and the position loop controller is configured according to the second position loop gain parameter. The controller parameters are matched with the specific mechanical system characteristics, thereby improving the performance and adaptability of the control system. By multiplying by the total inertia, it can be ensured that the control system can maintain a good control effect under different load conditions.
[0101] In an exemplary embodiment, before obtaining the mechanical inertia of the mechanical system, the gain adjustment method further includes:
[0102] When the motor control system is in a speed open-loop mode, obtaining a mechanical resonance point of the mechanical system when the motor responds to each set of preset control signals;
[0103] Selecting a mechanical resonance point with the lowest frequency from among multiple mechanical resonance points as a target resonance point;
[0104] After setting the notch frequency of the notch filter of the motor control system to the frequency of the target resonance point, the operation of acquiring the mechanical inertia of the mechanical system is performed.
[0105] In this embodiment, the motor control system is first placed in the speed open-loop mode so that the motor directly responds to the output signal of the controller without closed-loop feedback adjustment. A series of preset control signals are applied to the motor, which are usually sinusoidal signals of different frequencies and amplitudes, so as to stimulate the response of the mechanical system, record the response of the motor and the mechanical system to each control signal, analyze the measurement data, and find the peak value in the system response, where the peak value corresponds to the resonance point of the mechanical system. The resonance point is usually manifested as a significant increase in the amplitude of the system response. Among the multiple resonance points identified, the resonance point with the lowest frequency is selected as the target resonance point, and the notch frequency of the notch filter in the motor control system is set to the frequency of the target resonance point. The function of the notch filter is to suppress vibrations at a specific frequency, thereby reducing the impact of mechanical resonance on the performance of the control system. After the notch filter is set, the operation of obtaining the mechanical inertia of the mechanical system is performed.
[0106] Take a set of sinusoidal AC commands with a frequency between 100 Hz and 4000 Hz as an example. During the first vibration detection, the motor driver injects a set of sinusoidal AC torque commands into the motor. Through fast FFT analysis, the lowest frequency set of mechanical resonance points and anti-resonance points after the servo motor is connected to the mechanical system is detected, and the approximate frequency range of the resonance point and anti-resonance point is obtained. Then, after determining the frequency change resolution based on this approximate frequency range, the second vibration detection is performed, and the motor driver injects the second set of sinusoidal AC torque commands into the motor. The frequency of the sinusoidal torque command is still a continuously changing frequency between 100 Hz and 4000 Hz, but the frequency change resolution is significantly improved compared to the previous vibration detection. Through fast FFT analysis, the lowest frequency set of mechanical resonance points and anti-resonance points after the servo motor is connected to the mechanical system is detected, the frequencies of the resonance point Fr and the anti-resonance point Fa are accurately identified, and the notch filter frequency is set to Fr.
[0107] By adopting the solution of this embodiment, the negative impact caused by mechanical resonance in the motor control system is effectively identified and suppressed, thereby improving the stability and performance of the system. Setting the notch frequency to the resonance point with the lowest frequency helps to ensure that the control system can remain stable at the most critical frequency, making the obtained mechanical inertia more accurate.
[0108] In this embodiment, steps S101 to S103 can be executed when the motor driver injects a set of sinusoidal AC torque instructions into the motor for the first time, or when the motor driver injects a set of sinusoidal AC torque instructions into the motor for the second time. The selection can be made according to actual engineering needs, and this embodiment is not limited here.
[0109] Combined with the above, refer to Figure 5 and Figure 6 As shown, Figure 5 A schematic diagram of signal injection and sampling of velocity feedback and position feedback. Figure 6 The present invention is a flow chart of control gain adjustment steps, including controlling the motor to be in a stationary mode, and then sequentially performing the first vibration detection, the second vibration detection, the bandwidth measurement, the gain setting and other operations.
[0110] As another optional embodiment, the gain parameter configuration of the current loop and the position loop can be performed only at the first power-on, such as Figure 7 As shown, it can also be executed every time the runtime is enabled, such as Figure 8 As shown, the signal injection and sampling of the two configuration modes refer to Figure 5 .
[0111] In summary, the present invention can be used for servo drives, frequency converter drives, and various application sites using asynchronous motors, synchronous motors, DC motors and other motors as power. Compared with the traditional three-loop control gain adjustment method, the present invention can quickly identify the speed loop and position loop gain coefficients within 500ms. The corresponding parameter self-tuning time of the driver is significantly reduced, so that the driver can be used in many occasions that require parameter setting time or do not operate for parameter adjustment, and the application and adaptability of the product are greatly improved.
[0112] Second, please refer to Fig. 9 The present invention provides a gain adjustment system, comprising:
[0113] A first acquisition module 11 is used to acquire a feedback signal of the motor under a preset control signal when the motor control system is in a speed open-loop mode;
[0114] A first calculation module 12 is used to determine a speed loop delay time of the motor control system in a speed closed loop mode based on a feedback signal;
[0115] The second calculation module 13 is used to determine the first speed loop gain parameter by using the speed loop delay time.
[0116] It can be seen that in this embodiment, when the motor control system is in the speed open-loop mode, the speed loop is not affected by the feedback speed. At this time, the motor operation is directly controlled by the preset control signal. By analyzing the feedback signal, it is convenient to determine the time delay between the motor receiving the control signal and the actual response, thereby determining the speed loop delay time. The speed loop delay time is a key parameter for adjusting the speed loop gain, which directly affects the response speed and stability of the controller to speed changes. The present invention can calculate appropriate speed loop gain parameters and position loop gain parameters through the speed loop delay time, avoiding repeated manual trial and error, thereby significantly reducing the time required for parameter adjustment, making the parameter settings of the speed loop and the position loop faster and more accurate, and adapting to more application scenarios.
[0117] In an exemplary embodiment, the process of determining the speed loop delay time of the motor control system in the speed closed loop mode based on the feedback signal includes:
[0118] Obtaining a phase difference between a fundamental wave of a feedback signal and a preset control signal;
[0119] Based on the phase difference, the speed loop delay time of the motor control system in the speed closed loop mode is determined.
[0120] In an exemplary embodiment, the process of determining the speed loop delay time of the motor control system in the speed closed loop mode based on the phase difference includes:
[0121] Calculate the inner loop delay angle based on the phase difference;
[0122] The inner loop delay angle is used to determine the speed loop delay time of the motor control system in the speed closed loop mode.
[0123] In an exemplary embodiment, the process of determining the first speed loop gain parameter using the speed loop delay time includes:
[0124] Determine the speed loop proportional gain coefficient according to the speed loop delay time and the first corresponding relationship; the first corresponding relationship is the corresponding relationship between the speed loop delay time and the speed loop proportional gain coefficient;
[0125] Determine the speed loop integral gain coefficient according to the speed loop delay time and the second corresponding relationship; the second corresponding relationship is the corresponding relationship between the speed loop delay time and the speed loop integral gain coefficient;
[0126] The first speed loop gain parameter includes a speed loop proportional gain coefficient and a speed loop integral gain coefficient.
[0127] In an exemplary embodiment, the gain adjustment system further comprises:
[0128] A second acquisition module is used to acquire the lowest natural vibration frequency of the mechanical system before acquiring the feedback signal of the motor under the preset control signal; the mechanical system is composed of the motor and the mechanical load connected thereto;
[0129] The frequency of the preset control signal is determined based on the lowest natural vibration frequency.
[0130] In an exemplary embodiment, the gain adjustment system further comprises:
[0131] A third acquisition module is used to acquire the mechanical inertia of the mechanical system after determining the first speed loop gain parameter using the speed loop delay time; the mechanical system is composed of a motor and a mechanical load connected thereto;
[0132] According to the mechanical inertia and the first speed loop gain parameter, the second speed loop gain parameter is obtained;
[0133] Configure the speed loop controller according to the second speed loop gain parameter.
[0134] In an exemplary embodiment, the gain adjustment system further comprises:
[0135] A fourth acquisition module is used to acquire the mechanical resonance point of the mechanical system when the motor responds to each set of preset control signals when the motor control system is in a speed open-loop mode before acquiring the mechanical inertia of the mechanical system;
[0136] Selecting a mechanical resonance point with the lowest frequency from among multiple mechanical resonance points as a target resonance point;
[0137] After setting the notch frequency of the notch filter of the motor control system to the frequency of the target resonance point, the operation of acquiring the mechanical inertia of the mechanical system is performed.
[0138] In an exemplary embodiment,
[0139] The second calculation module 13 is also used to determine the position loop gain parameter according to the speed loop delay time and the third corresponding relationship when the motor control system includes a position loop; the third corresponding relationship is the corresponding relationship between the speed loop delay time and the position loop proportional gain.
[0140] Third, please refer to Fig.10 The present invention also provides an electronic device, comprising:
[0141] A memory 21, used for storing computer programs;
[0142] The processor 22 is configured to implement the steps of the gain adjustment method described in any one of the above embodiments when executing a computer program.
[0143] The electronic device also includes:
[0144] The input interface 23 is connected to the processor 22 via the communication bus 26, and is used to obtain the computer programs, parameters and instructions imported from the outside, and save them in the memory 21 under the control of the processor 22. The input interface can be connected to an input device to receive parameters or instructions manually input by the user. The input device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the terminal housing.
[0145] The display unit 24 is connected to the processor 22 via the communication bus 26 and is used to display the data sent by the processor 22. The display unit can be a liquid crystal display or an electronic ink display.
[0146] The network port 25 is connected to the processor 22 via the communication bus 26, and is used to communicate with various external terminal devices. The communication technology used in the communication connection can be a wired communication technology or a wireless communication technology, such as mobile high-definition link technology, universal serial bus, high-definition multimedia interface, wireless fidelity technology, Bluetooth communication technology, low-power Bluetooth communication technology, communication technology based on IEEE802.11s, etc.
[0147] Fourth, please refer to Fig.11 The present invention further provides a computer-readable storage medium 30, on which a computer program 31 is stored. When the computer program 31 is executed by a processor, the steps of the gain adjustment method described in any one of the above embodiments are implemented.
[0148] The computer-readable storage medium 30 may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0149] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0150] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A gain adjustment method, characterized in that: include: When the motor control system is in a speed open-loop mode, obtaining a feedback signal of the motor under a preset control signal; Based on the feedback signal, determining a speed loop delay time of the motor control system in a speed closed loop mode; The first speed loop gain parameter is determined using the speed loop delay time.
2. The gain adjustment method according to claim 1, characterized in that: The process of determining the speed loop delay time of the motor control system in the speed closed loop mode based on the feedback signal includes: Acquire a phase difference between a fundamental wave of the feedback signal and the preset control signal; Based on the phase difference, a speed loop delay time of the motor control system in a speed closed-loop mode is determined.
3. The gain adjustment method according to claim 2, characterized in that: Based on the phase difference, the process of determining the speed loop delay time of the motor control system in the speed closed loop mode includes: Calculating an inner loop delay angle based on the phase difference; The speed loop delay time of the motor control system in the speed closed loop mode is determined by using the inner loop delay angle.
4. The gain adjustment method according to claim 1, characterized in that: The process of determining the first speed loop gain parameter by using the speed loop delay time includes: Determine the speed loop proportional gain coefficient according to the speed loop delay time and the first corresponding relationship; the first corresponding relationship is the corresponding relationship between the speed loop delay time and the speed loop proportional gain coefficient; Determine the speed loop integral gain coefficient according to the speed loop delay time and a second corresponding relationship; the second corresponding relationship is the corresponding relationship between the speed loop delay time and the speed loop integral gain coefficient; The first speed loop gain parameter includes the speed loop proportional gain coefficient and the speed loop integral gain coefficient.
5. The gain adjustment method according to claim 1, characterized in that: Before obtaining the feedback signal of the motor under the preset control signal, the gain adjustment method further includes: Obtaining a minimum natural vibration frequency of a mechanical system; the mechanical system is based on the motor and a mechanical load connected thereto; The frequency of the preset control signal is determined based on the lowest natural vibration frequency.
6. The gain adjustment method according to claim 1, characterized in that: After determining the first speed loop gain parameter by using the speed loop delay time, the gain adjustment method further includes: Obtaining the mechanical inertia of a mechanical system; the mechanical system is based on the motor and a mechanical load connected thereto; Obtaining a second speed loop gain parameter according to the mechanical inertia and the first speed loop gain parameter; A speed loop controller is configured according to the second speed loop gain parameter.
7. The gain adjustment method according to claim 6, characterized in that: Before obtaining the mechanical inertia of the mechanical system, the gain adjustment method further includes: When the motor control system is in a speed open-loop mode, obtaining a mechanical resonance point of the mechanical system when the motor responds to each set of preset control signals; Selecting a mechanical resonance point with the lowest frequency among the plurality of mechanical resonance points as a target resonance point; After the notch frequency of the notch filter of the motor control system is set to the frequency of the target resonance point, the operation of acquiring the mechanical inertia of the mechanical system is performed.
8. The gain adjustment method according to any one of claims 1 to 7, characterized in that: The gain adjustment method further includes: When the motor control system includes a position loop, the position loop gain parameter is determined according to the speed loop delay time and a third corresponding relationship; the third corresponding relationship is the corresponding relationship between the speed loop delay time and the position loop proportional gain.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the gain adjustment method according to any one of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the gain adjustment method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Servo drive system and speed ring parameter setting system thereof
CN102790584A
Servomotor control device, servomotor control method, and computer readable recording medium
CN107659241A
Asynchronous motor speed loop PI parameter optimization design method
CN109995286A
Permanent magnet synchronous motor speed loop control method based on differential feedforward and parameter self-tuning
CN115580194A
Servo controlling apparatus and regulating method
JP2005348536A
Cited By
Parameter adjustment method and device, equipment and storage medium
CN121541559A