A gain adjustment method, electronic device and readable storage medium
By acquiring feedback signals in the open-loop speed mode of the motor control system, determining the speed loop delay time, and calculating appropriate gain parameters, the problem of long parameter adjustment time in existing technologies is solved, enabling fast and accurate parameter setting, and making it suitable for more application scenarios.
Patent Information
- Application Number
- CN202411627944.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2044-11-14
AI Technical Summary
In existing three-ring motor driver control schemes, the parameter adjustment time is relatively long, which cannot meet the application requirements of high real-time performance, especially in scenarios requiring rapid response.
When the motor control system is in open-loop speed mode, the speed loop delay time is determined by acquiring the feedback signal, and the gain parameters of the speed loop and position loop are calculated using this delay time, thus avoiding the manual trial-and-error process.
It significantly reduces parameter adjustment time, making the parameter settings of the speed loop and position loop faster and more accurate, and adaptable to more application scenarios.
Smart Images

Figure CN119401877B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motor control, and in particular to a gain adjustment method, electronic device, and readable storage medium. Background Technology
[0002] In motor drive control schemes, three-loop position control and two-loop speed control are common configurations. In a three-loop position control structure, the loops from the inside out are the current loop, speed loop, and position loop. In existing three-loop control adjustment technologies, whether using time-domain or frequency-domain adjustment, the parameters of the current loop must first be calculated based on the motor's electrical parameters. Then, using the proportional gain of the speed loop as a reference, the proportional and integral gains of the speed loop are adjusted and set using manual or automatic trial and error methods. Only after the speed loop parameters are adjusted and set can the gain of the position loop be adjusted and set. The entire parameter adjustment process is time-consuming, typically requiring tens of seconds to several minutes. This adjustment time cannot meet the customer's need for rapid response in many applications with high real-time requirements.
[0003] Therefore, how to provide a solution to the above-mentioned technical problems is a problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] The purpose of this invention is to provide a gain adjustment method, electronic device, and readable storage medium that can avoid repeated manual trial and error processes, significantly reduce the time required for parameter adjustment, and make the parameter settings of the speed loop and position loop faster and more accurate, thereby adapting to more application scenarios.
[0005] To solve the above-mentioned technical problems, the present invention provides a gain adjustment method, comprising:
[0006] When the motor control system is in speed open-loop mode, the feedback signal of the motor under the preset control signal is obtained.
[0007] Based on the feedback signal, the speed loop delay time of the motor control system in speed closed-loop mode is determined;
[0008] The first velocity loop gain parameter is determined using the velocity loop delay time.
[0009] Optionally, the process of determining the speed loop delay time of the motor control system in speed closed-loop mode based on the feedback signal includes:
[0010] Obtain the phase difference between the fundamental frequency of the feedback signal and the preset control signal;
[0011] Based on the phase difference, the speed loop delay time of the motor control system in speed closed-loop mode is determined.
[0012] Optionally, the process of determining the speed loop delay time of the motor control system in speed closed-loop mode based on the phase difference includes:
[0013] The inner loop delay angle is calculated based on the phase difference.
[0014] The speed loop delay time of the motor control system in speed closed-loop mode is determined using the inner loop delay angle.
[0015] Optionally, the process of determining the first velocity loop gain parameter using the velocity loop delay time includes:
[0016] The velocity loop proportional gain coefficient is determined based on the velocity loop delay time and the first correspondence; the first correspondence is the correspondence between the velocity loop delay time and the velocity loop proportional gain coefficient.
[0017] The velocity loop integral gain coefficient is determined based on the velocity loop delay time and the second correspondence; the second correspondence is the relationship between the velocity loop delay time and the velocity loop integral gain coefficient.
[0018] The first velocity loop gain parameter includes the velocity loop proportional gain coefficient and the velocity loop integral gain coefficient.
[0019] Optionally, before acquiring the feedback signal of the motor under a preset control signal, the gain adjustment method further includes:
[0020] The lowest natural vibration frequency of the mechanical system is obtained; the mechanical system is based on the motor and the mechanical load connected to it.
[0021] The frequency of the preset control signal is determined based on the lowest natural vibration frequency.
[0022] Optionally, after determining the first velocity loop gain parameter using the velocity loop delay time, the gain adjustment method further includes:
[0023] The mechanical inertia of the mechanical system is obtained; the mechanical system is based on the motor and the mechanical load connected to it.
[0024] The second velocity loop gain parameter is obtained based on the mechanical inertia and the first velocity loop gain parameter;
[0025] Configure the speed loop controller 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 speed open-loop mode, the mechanical resonance point of the mechanical system is obtained when the motor responds to each set of preset control signals.
[0028] The mechanical resonance point with the lowest frequency among the multiple mechanical resonance points is selected as the target resonance point;
[0029] 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 obtaining 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 the third correspondence relationship; the third correspondence relationship is the correspondence between the speed loop delay time and the position loop proportional gain.
[0032] To address the aforementioned technical problems, the present invention also provides an electronic device, comprising:
[0033] Memory, used to store computer programs;
[0034] A processor, configured to implement the gain adjustment method as described in any of the preceding descriptions when executing the computer program.
[0035] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the gain adjustment method as described in any of the preceding claims.
[0036] This invention provides a gain adjustment method. When the motor control system is in open-loop speed mode, the speed loop is not affected by the feedback speed. At this time, the motor is directly controlled by a preset control signal. By analyzing the feedback signal, it is easy 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 controller's response speed and stability to speed changes. This invention can calculate appropriate speed loop gain parameters and position loop gain parameters by using the speed loop delay time, avoiding repeated manual trial and error, thus significantly reducing the time required for parameter adjustment. This makes the parameter settings of the speed loop and position loop faster and more accurate, 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-described gain adjustment method. Attached Figure Description
[0038] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 A flowchart illustrating the steps of a gain adjustment method provided by the present invention;
[0040] Figure 2 A schematic diagram illustrating the calculation of the speed inner loop control delay time provided by the present invention;
[0041] Figure 3 A speed inner loop control flowchart provided by the present invention;
[0042] Figure 4 A simplified speed inner loop control flowchart with a time delay provided by the present invention;
[0043] Figure 5 A flowchart of signal injection and sampling provided by the present invention;
[0044] Figure 6 A flowchart of a control gain adjustment step provided by the present invention;
[0045] Figure 7 A flowchart of the steps for adjusting parameters during the first power-on process provided by this invention;
[0046] Figure 8 A flowchart illustrating the steps for adjusting execution parameters during each run, provided by this invention;
[0047] Figure 9 This is a schematic diagram of the structure of a gain adjustment system provided by the present invention;
[0048] Figure 10 This is a schematic diagram of the structure of an electronic device provided by the present invention;
[0049] Figure 11 This is a schematic diagram of the structure of a computer-readable storage medium provided by the present invention. Detailed Implementation
[0050] The core of this invention is to provide a gain adjustment method, an electronic device, and a readable storage medium that can avoid repeated manual trial and error processes, significantly reduce the time required for parameter adjustment, and make the parameter settings of the speed loop and position loop faster and more accurate, thereby adapting to more application scenarios.
[0051] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0052] Firstly, please refer to Figure 1 The present invention provides a gain adjustment method, comprising:
[0053] S101: When the motor control system is in speed open-loop mode, obtain the feedback signal of the motor under the preset control signal.
[0054] It is understood that a motor control system is used to adjust parameters such as the motor's speed, position, and torque to achieve precise motion control. For a two-loop motor control system, the loop consists of a current loop and a speed loop from the inside out. For a three-loop motor control system, the loop consists of a current loop, a speed loop, and a position loop from the inside out. 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 control is a control mode of the motor control system. In this mode, the motor's speed output is not controlled by feedback. The motor driver can drive the motor according to preset control signals (such as voltage or current commands), 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 operate in either a speed open-loop mode or a torque / current closed-loop mode. Then, the motor driver outputs one or a series of preset control signals to the motor. These preset control signals can be specific current or torque signals, and can be constant (e.g., constant current or torque) or variable (e.g., sinusoidal waveform signals), depending on the actual engineering requirements. This embodiment does not impose specific limitations. Simultaneously with the motor responding to the preset control signals, the actual feedback signals from the motor are acquired. Specifically, sensors (e.g., encoders) installed on the motor can collect the actual motor speed signal (feedback speed) and / or actual position signal. It is understood that the feedback signals in this embodiment include, but are not limited to, speed signals and / or position signals.
[0056] Feedback signals reflect the motor's performance under specific signals. By acquiring the actual feedback signal of the motor in open-loop speed mode, the motor's response characteristics can be analyzed. This is because the motor's response can be evaluated without being affected by closed-loop control, simplifying the system debugging process and facilitating the subsequent determination of the speed loop delay time. This provides a basis for adjusting the parameters of the closed-loop control mode. Furthermore, testing in open-loop mode can reduce potential risks caused by improper parameter settings. As another optional embodiment, when the motor control system is in open-loop speed mode and the motor is stationary, 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 stationary, the system's dynamic changes are minimal, and factors such as speed changes and load fluctuations do not need to be considered, thus simplifying the test conditions and reducing mechanical vibration and electromagnetic interference caused by motor rotation, making the feedback signal more stable and reliable. In addition, in the stationary state, because there is no time measurement error caused by motor rotation, the motor's response time can be more easily measured and calculated.
[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 the feedback signal of the motor under the preset control signal and execute subsequent steps. The selection can be made according to the actual engineering needs, and this embodiment does not make specific limitations here.
[0058] S102: Based on the feedback signal, determine the speed loop delay time of the motor control system in speed closed-loop mode.
[0059] Stability analysis of the speed closed-loop control reveals that the closed-loop bandwidth is determined by the internal current loop delay, speed loop execution delay, speed feedback sampling delay, speed feedback filtering delay, notch filter delay, and mechanical vibration. All these open-loop delays are combined into a single speed loop delay time, Td. This combined speed loop delay time can be equivalent to a first-order low-pass circuit, 1 / (Td×s+1). Given Td, based on the principles of a third-order control system, the proportional gain coefficient Kv and integral gain coefficient Kvi of the speed loop can be calculated, as follows: Figure 2 As shown.
[0060] It is understandable that in speed open-loop mode, the motor driver outputs a preset control signal, and the motor generates motion according to these signals. Sensors (such as encoders) installed on the motor collect and record the actual feedback signals of the motor when responding to the preset control signals. These signals may include the actual speed (speed signal) and / or the 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 can be analyzed, such as by comparing the time history of the input signal and the feedback signal. Furthermore, since the motor response in speed open-loop mode is only affected by the preset control signal and not by the closed-loop control, the intrinsic characteristics of the system can be understood by analyzing these responses, such as the speed loop delay time of the motor control system in speed closed-loop mode.
[0061] Speed loop delay time is a crucial parameter in motor control systems, affecting system stability and response speed. Excessive speed loop delay time can lead to slow system response or even instability. Therefore, analyzing feedback signals in open-loop speed control mode to determine the speed loop delay time facilitates the setting of appropriate speed loop gain to optimize system performance. This ensures that in closed-loop control mode, the motor can respond quickly and accurately to the speed setpoint while maintaining system stability and robustness.
[0062] S103: Determine the first velocity loop gain parameter using the velocity loop delay time.
[0063] In this embodiment, the speed loop delay time is used to calculate the first speed loop gain parameter, which is then applied to the motor control system and adaptively fine-tuned to improve the stability of the motor control system under various operating conditions. This ensures that the motor can respond quickly and accurately to speed changes under speed closed-loop control, while reducing overshoot and oscillation.
[0064] It is understandable that directly using the speed loop delay time to determine the first speed loop gain parameter not only improves debugging efficiency and accuracy, but also reduces the process of manual trial and error. 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 system's robustness.
[0065] The process of calculating the first speed loop gain parameter based on the speed loop delay time can be performed using methods from PI control, such as calculations based on a preset mathematical model or relevant relational formulas. The appropriate method can be chosen based on actual engineering needs, and this embodiment does not impose specific limitations. For example, taking a mathematical model approach, firstly, a mathematical model is established based on the characteristics of the motor and control system. This model may include transfer functions, state-space equations, or difference equations. The model explicitly includes the speed loop delay time, such as setting a delay element. Control theory (such as root locus, frequency response analysis, etc.) is used to calculate the proportional gain Kp and integral gain Ki to ensure system stability and meet performance requirements. Taking a relational formula approach, a suitable relational formula can be selected based on experience or standardized control rules to estimate the gain parameters. Using the speed loop delay time as input, the gain value is calculated through the relational formula. These parameters can then be tested in an actual system and fine-tuned based on the system response.
[0066] As can be seen, in this embodiment, when the motor control system is in open-loop speed mode, the speed loop is not affected by the feedback speed. At this time, the motor is directly controlled by a preset control signal. By analyzing the feedback signal, it is easy 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 controller's response speed and stability to speed changes. This invention can calculate appropriate speed loop gain parameters and position loop gain parameters by using the speed loop delay time, avoiding repeated manual trial and error, thereby significantly reducing the time required for parameter adjustment. This makes the parameter settings of the speed loop and position loop faster and more accurate, 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 speed closed-loop mode based on the feedback signal includes:
[0069] The phase difference between the fundamental frequency of the feedback signal and the preset control signal is obtained;
[0070] Based on the phase difference, the speed loop delay time of the motor control system in speed closed-loop mode is determined.
[0071] It is understandable that when a preset control signal is applied to the motor, the motor's response will not occur immediately, but rather with a time delay. This delay can be determined by analyzing the phase difference between the fundamental component of the feedback signal (usually a sinusoidal signal) and the preset control signal. Specifically, the fundamental component is extracted from the feedback signal. The fundamental component is the main part of the signal and characterizes the steady-state response of the motor. The extracted fundamental component is compared with the preset control signal, and Fourier transform or other signal processing techniques are used to calculate the phase difference between the fundamental component 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. 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 using a preset formula. Using the scheme of this embodiment, the parameters of the motor control system in speed closed-loop mode can be accurately configured, thereby improving the system's performance and stability, reducing the trial-and-error process of manually adjusting parameters, and accelerating the system debugging speed.
[0072] In an exemplary embodiment, the process of determining the speed loop delay time of the motor control system in speed closed-loop mode based on the phase difference includes:
[0073] Calculate the inner loop delay angle based on the phase difference;
[0074] The speed loop delay time of the motor control system in speed closed-loop mode is determined by using the inner loop delay angle.
[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, which includes 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), this embodiment can calculate the inner loop delay angle Theta1 of the speed loop using 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. 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. This calculated delay time is the inner loop delay time of the speed loop, which can accurately reflect the actual performance of the speed loop, allowing for more accurate adjustment of the speed loop gain parameters, thereby optimizing the performance of the motor control system. Simultaneously, accurate delay time calculation helps reduce system oscillations when responding to speed changes, improving system stability and robustness.
[0076] As an alternative embodiment, the speed loop delay time can be calculated using the following conversion formula: Td = 1000 / (tan(Theta1) × Ws), where Ws is the frequency in radians per second, related to the fundamental frequency. This conversion formula directly relates the phase difference (inner loop delay angle Theta1) to the system's angular frequency Ws, thus enabling a more accurate calculation of the delay time Td. The calculation method is simple and applicable to different types of motor control systems. As long as the phase difference and the system's angular frequency can be accurately measured, this 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 velocity loop gain parameter using the velocity loop delay time includes:
[0078] The velocity loop proportional gain coefficient is determined based on the velocity loop delay time and the first correspondence relationship; the first correspondence relationship is the relationship between the velocity loop delay time and the velocity loop proportional gain coefficient.
[0079] The velocity loop integral gain coefficient is determined based on the velocity loop delay time and the second correspondence; the second correspondence is the relationship between the velocity loop delay time and the velocity loop integral gain coefficient.
[0080] The first velocity loop gain parameter includes the velocity loop proportional gain coefficient and the velocity loop integral gain coefficient.
[0081] In this embodiment, given the velocity loop delay time Td, the bandwidth parameter Wn (rad / s) of the third-order system including the velocity loop delay time Td can be obtained, where Wn = 1 / (k1 × Td). The first correspondence is Kv = 1 / (k1 × Td), where Kv is the position loop proportional gain coefficient, k1 is the first coefficient, and k1's value ranges from 3 to 6. Kvi = 1 / (k2 × Td × Td), where Kvi is the position loop integral gain coefficient, and k2 is the second coefficient, and k2's value ranges from 45 to 60.
[0082] As an optional embodiment, for a motor control system including a position loop, the method further includes:
[0083] The position loop gain parameters are determined based on the velocity loop delay time and the third correspondence; the third correspondence is the relationship between the velocity loop delay time and the position loop proportional gain.
[0084] The third correspondence is Kp=Kv / k3, where Kp is the position loop proportional gain coefficient, k3 is the third coefficient, and the value of k3 ranges from 4 to 6.
[0085] It is understandable that directly calculating the position loop gain parameters based on the velocity loop delay time can reduce the number of manual adjustments and experiments required, thereby saving time and resources.
[0086] In an exemplary embodiment, before acquiring the feedback signal of the motor under a preset control signal, the gain adjustment method further includes:
[0087] To obtain the lowest natural vibration frequency of the mechanical system; the mechanical system is based on the motor and the mechanical loads connected to it.
[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 The speed inner loop structure and delay are analyzed. Figure 3 This is the flowchart for the speed inner loop control. Figure 4 The simplified speed inner loop control flowchart is shown below, with a time delay.
[0090] The speed inner loop delay time Td' is equal to the sum of the delays from 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, their delay times are relatively large and their setting times are known. Therefore, in implementation, these delay times can be combined into a single delay time Td1 by disabling the above functions. Delay time Td1 = Torque low-pass filter time + Speed feedback filter time. Because the delay times of the notch filter, current loop delay, speed sampling delay, and mechanical vibration delay are relatively small and their durations are not clearly defined, they can be measured together, i.e., 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 plus the speed feedback filter time, the driver injects a low-frequency sinusoidal current signal into the motor, and the delay time Td2 is measured. 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'. The speed inner loop delay time Td' = set delay time Td1 + measured delay time Td2. It can be understood that in this embodiment, the delay time Td2 is equivalent to the current inner loop delay time Td in the above embodiment, reducing the complexity of system analysis and improving measurement accuracy.
[0092] Considering that mechanical resonance significantly affects the measurement accuracy of the delay time Td2, this embodiment precisely controls the frequency of the preset control signal (low-frequency sinusoidal current signal) to improve the measurement accuracy. The frequency f of the preset control signal is equal to k times the square root of the minimum mechanical resonance frequency relative to the total inertia ratio of the driver. K is a number between 2 and 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 control signal frequency, the influence of mechanical resonance on the system response can be reduced, and the measurement accuracy can be improved.
[0093] In an exemplary embodiment, after determining the first velocity loop gain parameter using the velocity loop delay time, the gain adjustment method further includes:
[0094] To obtain the mechanical inertia of a mechanical system; the mechanical system is based on the motor and the mechanical loads connected to it.
[0095] The second velocity loop gain parameters are obtained based on the mechanical inertia and the first velocity loop gain parameters.
[0096] The second position loop gain parameters are obtained based on the mechanical inertia and the first position loop gain parameters.
[0097] Configure the speed loop controller according to the second speed loop gain parameters;
[0098] Configure the position loop controller according to the second position loop gain parameter.
[0099] In this embodiment, the mechanical system includes a motor and its connected mechanical loads. Specifically, mechanical inertia 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 loads directly affects the performance of the motor control system during acceleration, deceleration, and steady-state operation, the mechanical inertia should be considered in the calculation of the speed loop proportional gain and position loop gain.
[0100] In other words, after identifying the speed loop proportional gain Kv, speed loop integral gain Kvi, and position proportional gain Kp, the control gains of the speed and position loops are not immediately updated. Instead, they are first multiplied by the total inertia of the system to adjust the gain parameters of each control loop to a level suitable for the actual system. Then, the speed loop controller is configured based on the second speed loop gain parameters, and the position loop controller is configured based on the second position loop gain parameters. This ensures that the controller parameters match 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 maintains good control performance under different load conditions.
[0101] In one 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 speed open-loop mode, the mechanical resonance point of the mechanical system is obtained when the motor responds to each set of preset control signals.
[0103] The mechanical resonance point with the lowest frequency among multiple mechanical resonance points is selected as the target resonance point;
[0104] After setting the notch filter frequency of the motor control system to the frequency of the target resonance point, the operation of obtaining the mechanical inertia of the mechanical system is performed.
[0105] In this embodiment, the motor control system is first placed in open-loop speed mode so that the motor directly responds to the controller's output signal without closed-loop feedback adjustment. A series of preset control signals, typically sinusoidal signals of different frequencies and amplitudes, are applied to the motor to stimulate the mechanical system's response. The responses of the motor and mechanical system to each control signal are recorded, and the measurement data is analyzed to identify peak values in the system response. These peak values correspond to the resonance points of the mechanical system. Resonance points are typically characterized by a significant increase in the amplitude of the system response. Among the identified resonance points, the lowest frequency resonance point is selected as the target resonance point, and the notch filter frequency in the motor control system is set to the frequency of the target resonance point. The notch filter suppresses vibrations at specific frequencies, thereby reducing the impact of mechanical resonance on the control system's performance. After the notch filter is set, the mechanical inertia of the mechanical system is acquired.
[0106] This explanation uses a set of continuously varying sinusoidal AC commands with frequencies between 100Hz and 4000Hz as an example. In 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 mechanical resonance and anti-resonance points are detected after the servo motor is connected to the mechanical system, obtaining the approximate frequency range of the resonance and anti-resonance points. Then, based on this approximate frequency range and after determining the frequency change resolution, a second vibration detection is performed. The motor driver injects a second set of sinusoidal AC torque commands into the motor. This sinusoidal torque command still has a continuously varying frequency between 100Hz and 4000Hz, but the frequency change resolution is significantly improved compared to the previous vibration detection. Through fast FFT analysis, the lowest frequency mechanical resonance and anti-resonance points are detected after the servo motor is connected to the mechanical system, accurately identifying the frequencies of the resonance point Fr and the anti-resonance point Fa, and setting the notch filter frequency to Fr.
[0107] The solution in this embodiment effectively identifies and suppresses the negative impact caused by mechanical resonance in the motor control system, thereby improving the system's stability and performance. Setting the notch filter frequency to the lowest frequency resonance point helps ensure that the control system can remain stable at the most critical frequencies, 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 commands into the motor for the first time, or when the motor driver injects a set of sinusoidal AC torque commands into the motor for the second time. The choice can be made according to the actual engineering needs, and this embodiment does not limit it.
[0109] Based on the above, refer to Figure 5 and Figure 6 As shown, Figure 5 This is a schematic diagram illustrating signal injection and sampling rate feedback, as well as position feedback. Figure 6 This is a flowchart of a control gain adjustment process, which includes controlling the motor to be in a stationary mode, and then performing operations such as first vibration detection, second vibration detection, bandwidth measurement, and gain setting in sequence.
[0110] As an alternative embodiment, the configuration of the gain parameters for the current loop and position loop can be performed only on the first power-on, such as... Figure 7 As shown, it can also be executed every time the program is enabled, such as... Figure 8 As shown, the signal injection and sampling in both configuration modes refer to Figure 5 .
[0111] In summary, this invention can be used in various applications involving servo drives, frequency converters, and motors such as asynchronous motors, synchronous motors, and DC motors. Compared to traditional three-loop control gain adjustment methods, this invention can quickly identify the speed loop and position loop gain coefficients within 500ms. This significantly reduces the self-tuning time of the drive's parameters, allowing the drive to be used in many situations where parameter tuning time is critical or where parameter adjustments are performed without operation. This greatly expands the product's applicability and adaptability.
[0112] Secondly, please refer to Figure 9 The present invention provides a gain adjustment system, comprising:
[0113] The first acquisition module 11 is used to acquire the feedback signal of the motor under a preset control signal when the motor control system is in the speed open-loop mode.
[0114] The first calculation module 12 is used to determine the speed loop delay time of the motor control system in the speed closed-loop mode based on the feedback signal.
[0115] The second calculation module 13 is used to determine the first velocity loop gain parameter using the velocity loop delay time.
[0116] As can be seen, in this embodiment, when the motor control system is in open-loop speed mode, the speed loop is not affected by the feedback speed. At this time, the motor is directly controlled by a preset control signal. By analyzing the feedback signal, it is easy 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 controller's response speed and stability to speed changes. This invention can calculate appropriate speed loop gain parameters and position loop gain parameters by using the speed loop delay time, avoiding repeated manual trial and error, thereby significantly reducing the time required for parameter adjustment. This makes the parameter settings of the speed loop and position loop faster and more accurate, 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 speed closed-loop mode based on the feedback signal includes:
[0118] The phase difference between the fundamental frequency of the feedback signal and the preset control signal is obtained;
[0119] Based on the phase difference, the speed loop delay time of the motor control system in 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 speed closed-loop mode based on the phase difference includes:
[0121] Calculate the inner loop delay angle based on the phase difference;
[0122] The speed loop delay time of the motor control system in speed closed-loop mode is determined by using the inner loop delay angle.
[0123] In an exemplary embodiment, the process of determining the first velocity loop gain parameter using the velocity loop delay time includes:
[0124] The velocity loop proportional gain coefficient is determined based on the velocity loop delay time and the first correspondence relationship; the first correspondence relationship is the relationship between the velocity loop delay time and the velocity loop proportional gain coefficient.
[0125] The velocity loop integral gain coefficient is determined based on the velocity loop delay time and the second correspondence; the second correspondence is the relationship between the velocity loop delay time and the velocity loop integral gain coefficient.
[0126] The first velocity loop gain parameter includes the velocity loop proportional gain coefficient and the velocity loop integral gain coefficient.
[0127] In one exemplary embodiment, the gain adjustment system further includes:
[0128] The 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 based on the motor and the mechanical load connected to it.
[0129] The frequency of the preset control signal is determined based on the lowest natural vibration frequency.
[0130] In one exemplary embodiment, the gain adjustment system further includes:
[0131] The 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 based on the motor and the mechanical load connected to it.
[0132] The second velocity loop gain parameters are obtained based on the mechanical inertia and the first velocity loop gain parameters.
[0133] Configure the speed loop controller according to the second speed loop gain parameters.
[0134] In one exemplary embodiment, the gain adjustment system further includes:
[0135] The 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, before acquiring the mechanical inertia of the mechanical system, while the motor control system is in speed open-loop mode.
[0136] The mechanical resonance point with the lowest frequency among multiple mechanical resonance points is selected as the target resonance point;
[0137] After setting the notch filter frequency of the motor control system to the frequency of the target resonance point, the operation of obtaining the mechanical inertia of the mechanical system is performed.
[0138] In one exemplary embodiment,
[0139] The second calculation module 13 is also used to determine the position loop gain parameters based on the speed loop delay time and the third correspondence when the motor control system includes a position loop; the third correspondence is the correspondence between the speed loop delay time and the position loop proportional gain.
[0140] Thirdly, please refer to Figure 10 The present invention also provides an electronic device, comprising:
[0141] Memory 21 is used to store computer programs;
[0142] The processor 22 is configured to execute a computer program to implement the steps of the gain adjustment method as described in any of the embodiments above.
[0143] The electronic device also includes:
[0144] Input interface 23, connected to processor 22 via communication bus 26, is used to acquire externally imported computer programs, parameters, and instructions, and save them to memory 21 under the control of processor 22. This input interface can be connected to an input device to receive parameters or instructions manually entered by the user. This input device can be a touch layer covering the display screen, or buttons, a trackball, or a touchpad mounted on the terminal casing.
[0145] Display unit 24 is connected to processor 22 via communication bus 26 and is used to display data sent by processor 22. This display unit can be a liquid crystal display screen or an electronic ink display screen, etc.
[0146] Network port 25 is connected to processor 22 via communication bus 26 and is used for communication with external terminal devices. The communication technology used for this connection can be wired or wireless communication technology, such as mobile high-definition link technology, universal serial bus, high-definition multimedia interface, wireless fidelity technology, Bluetooth communication technology, Bluetooth low power communication technology, and communication technology based on IEEE 802.11s.
[0147] Fourthly, please refer to Figure 11 The present invention also provides a computer-readable storage medium 30, on which a computer program 31 is stored, and when the computer program 31 is executed by a processor, it implements the steps of the gain adjustment method as described in any of the embodiments above.
[0148] The computer-readable storage medium 30 may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0149] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0150] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily 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 invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A gain adjustment method characterized by, The method comprises: acquiring a feedback signal of the motor under a preset control signal when the motor control system is in a speed open loop mode; determining a speed loop delay time of the motor control system in a speed closed loop mode based on the feedback signal; determining a first speed loop gain parameter by using the speed loop delay time; 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 comprises: acquiring a phase difference between a fundamental wave of the feedback signal and the preset control signal; calculating an inner loop delay angle based on the phase difference; determining the speed loop delay time of the motor control system in the speed closed loop mode by using the inner loop delay angle.
2. The gain adjustment method according to claim 1, characterized by, the process of determining the first speed loop gain parameter by using the speed loop delay time comprises: determining a speed loop proportional gain coefficient according to the speed loop delay time and a first corresponding relationship; the first corresponding relationship is a corresponding relationship between the speed loop delay time and the speed loop proportional gain coefficient; determining a speed loop integral gain coefficient according to the speed loop delay time and a second corresponding relationship; the second corresponding relationship is a corresponding relationship between the speed loop delay time and the speed loop integral gain coefficient; the first speed loop gain parameter comprises the speed loop proportional gain coefficient and the speed loop integral gain coefficient.
3. The gain adjustment method of claim 1, wherein, Before acquiring the feedback signal of the motor under the preset control signal, the gain adjustment method further comprises: acquiring a lowest inherent vibration frequency of a mechanical system; the mechanical system is constituted based on the motor and a mechanical load connected to the motor; determining a frequency of the preset control signal based on the lowest inherent vibration frequency.
4. The gain adjustment method of claim 1, wherein, After determining the first speed loop gain parameter by using the speed loop delay time, the gain adjustment method further comprises: acquiring a mechanical inertia of the mechanical system; the mechanical system is constituted based on the motor and a mechanical load connected to the motor; obtaining a second speed loop gain parameter according to the mechanical inertia and the first speed loop gain parameter; configuring a speed loop controller according to the second speed loop gain parameter.
5. The gain adjustment method according to claim 4, characterized by, Before acquiring the mechanical inertia of the mechanical system, the gain adjustment method further comprises: acquiring mechanical resonance points of the mechanical system when the motor responds to each group of preset control signals when the motor control system is in the speed open loop mode; selecting a mechanical resonance point with the lowest frequency from the mechanical resonance points as a target resonance point; after setting a notch frequency of a notch filter of the motor control system to a frequency of the target resonance point, performing the operation of acquiring the mechanical inertia of the mechanical system.
6. The gain adjustment method according to any one of claims 1 to 5, characterized by, The gain adjustment method further comprises: when the motor control system comprises a position loop, determining a position loop gain parameter according to the speed loop delay time and a third corresponding relationship; the third corresponding relationship is a corresponding relationship between the speed loop delay time and a position loop proportional gain.
7. An electronic device, comprising: The device comprises: a memory for storing a computer program; a processor for executing the computer program to implement the steps of the gain adjustment method according to any one of claims 1-6.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the gain adjustment method in any one of claims 1-6.
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