Motor and control method and device thereof, storage medium and program product
By dynamically adjusting the speed acceleration based on the motor speed error and stability evaluation index, the problem of speed loop control instability during the motor frequency increase loading process is solved, thereby improving the system's stability and loading speed.
Patent Information
- Application Number
- CN202511569429.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-02-13
AI Technical Summary
In the process of increasing the frequency and speed of a motor, the existing technology uses a fixed acceleration strategy, which leads to instability in the speed loop control, causing problems such as motor oscillation, excessive speed fluctuations, or even loss of control.
By obtaining the difference between the motor's setpoint speed and the actual speed, the speed error is calculated. The speed loop is then used to adjust the output speed loop current command. The current command data is collected and frequency domain converted to calculate the stability evaluation index. Combined with the preset stability threshold and mapping weight, the speed acceleration is dynamically adjusted to form an adaptive control closed loop.
This approach achieves improved motor loading speed and control precision while ensuring system stability, thus avoiding system instability issues caused by traditional fixed acceleration strategies.
Smart Images

Figure CN121530239A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of motor control technology, specifically relating to a motor control method, device, motor, storage medium, and computer program product. Background Technology
[0002] Dual-loop vector control (FOC, Field-Oriented Control) is the mainstream technology for achieving precise speed tracking of a permanent magnet synchronous motor (PMSM) to a given speed, and it is widely used in various devices requiring motor drive. However, in practical applications, especially in situations where there are high requirements for the motor's frequency ramp-up speed, the existing fixed acceleration ramp-up control strategy has significant drawbacks: since the acceleration for a given speed depends on the system's adjustment capability, when the fixed acceleration setpoint exceeds the system's actual adjustment speed, the error between the given speed and the motor's actual speed will accumulate over time. Once this error accumulates to a certain level, it will directly lead to instability in the speed loop control, resulting in problems such as motor oscillation, excessive speed fluctuations, or even loss of control.
[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The purpose of this invention is to provide a motor control method, device, motor, storage medium, and computer program product to solve the problem that, under the premise of ensuring system stability, the fixed acceleration speed-up control strategy cannot maximize the increase of motor loading speed, thereby improving the system stability, loading speed, and control accuracy.
[0005] This invention provides a motor control method applied to a motor drive system. The method includes: acquiring the motor's speed setpoint from the previous moment and determining an initial speed setpoint for the current moment based on the speed acceleration; subtracting the initial speed setpoint from the actual speed of the motor to obtain a speed error, and outputting a speed loop current command after speed loop adjustment; acquiring the speed loop current command to form current command sampling data; calculating an evaluation index characterizing system stability based on the current command sampling data; adjusting the speed acceleration according to the relationship between the stability evaluation index and a preset stability threshold, combined with preset mapping weights; and updating the speed setpoint for the next moment using the adjusted speed acceleration to form an adaptive control closed loop.
[0006] In some implementations, calculating an evaluation index characterizing system stability based on the current command sampling data includes: performing frequency domain transformation on the current command sampling data to extract frequency domain energy within a preset frequency band; the preset frequency band is a frequency band that can reflect the characteristic harmonics when the motor drive system is unstable; and calculating the stability evaluation index based on the frequency domain energy and the frequency domain energy of the fundamental frequency point corresponding to the current operating frequency of the motor.
[0007] In some implementations, the frequency domain conversion of the current command sampling data is performed using a fast Fourier transform.
[0008] In some implementations, the rotational acceleration is adjusted based on the relationship between the stability evaluation index and a preset stability threshold, combined with a preset mapping weight. This includes: when the stability evaluation index is less than the preset stability threshold, calculating the rotational acceleration based on the difference between the stability evaluation index and the preset stability threshold, and the preset mapping weight; and when the stability evaluation index is greater than or equal to the preset stability threshold, adjusting the rotational acceleration to zero.
[0009] In some implementations, updating the speed setpoint for the next moment using the adjusted speed acceleration includes: if the motor is in an acceleration state, the current speed setpoint is added to the adjusted speed acceleration to obtain the speed setpoint for the next moment; if the motor is in a deceleration state, the current speed setpoint is decremented from the adjusted speed acceleration to obtain the speed setpoint for the next moment.
[0010] In conjunction with the above method, another aspect of the present invention provides a motor control device applied to a motor drive system, characterized in that the device comprises: an acquisition unit configured to acquire the speed setpoint of the motor at the previous moment and determine the initial value of the speed setpoint at the current moment based on the speed acceleration; a control unit configured to subtract the initial value of the speed setpoint from the actual speed of the motor to obtain a speed error, the speed error being adjusted by a speed loop and then outputting a speed loop current command; the control unit is further configured to collect the speed loop current command to form current command sampling data; the control unit is further configured to calculate an evaluation index characterizing system stability based on the current command sampling data; the control unit is further configured to adjust the speed acceleration according to the relationship between the stability evaluation index and a preset stability threshold, combined with a preset mapping weight; and the control unit is further configured to update the speed setpoint at the next moment using the adjusted speed acceleration to form an adaptive control closed loop.
[0011] In some implementations, the control unit calculates an evaluation index characterizing system stability based on the current command sampling data, including: performing frequency domain conversion on the current command sampling data to extract frequency domain energy within a preset frequency band; the preset frequency band is a frequency band that can reflect the characteristic harmonics when the motor drive system is unstable; and calculating the stability evaluation index based on the frequency domain energy and the frequency domain energy of the fundamental frequency point corresponding to the current operating frequency of the motor.
[0012] In some implementations, the frequency domain conversion of the current command sampling data is performed using a fast Fourier transform.
[0013] In some implementations, the control unit adjusts the rotational acceleration based on the relationship between the stability evaluation index and a preset stability threshold, combined with a preset mapping weight. This includes: when the stability evaluation index is less than the preset stability threshold, calculating the rotational acceleration based on the difference between the stability evaluation index and the preset stability threshold, and the preset mapping weight; and when the stability evaluation index is greater than or equal to the preset stability threshold, adjusting the rotational acceleration to zero.
[0014] In some implementations, the control unit updates the speed setpoint for the next moment using the adjusted speed acceleration, including: if the motor is in acceleration mode, the speed setpoint at the current moment is added to the adjusted speed acceleration to obtain the speed setpoint for the next moment; if the motor is in deceleration mode, the speed setpoint at the current moment is decremented by adding the adjusted speed acceleration to obtain the speed setpoint for the next moment.
[0015] In conjunction with the above-described device, the present invention further provides a motor, comprising: the motor control device described above.
[0016] In conjunction with the above method, the present invention further provides a storage medium comprising a stored program, wherein, when the program is executed, the device on which the storage medium is located executes the motor control method described above.
[0017] In conjunction with the above method, the present invention further provides a computer program product comprising a computer program that, when processed and executed, implements the steps of the above-described motor control method.
[0018] The present invention obtains the motor speed setpoint from the previous moment, determines the initial value of the current speed setpoint based on the speed acceleration, calculates the speed error by subtracting the initial value from the actual motor speed, and outputs a speed loop current command through the speed loop adjustment. This current command is collected to form current command sampling data. An evaluation index characterizing system stability is calculated based on the sampling data. The speed acceleration is dynamically adjusted according to the relationship between the evaluation index and a preset stability threshold, combined with preset mapping weights. The adjusted speed acceleration is then used to update the speed setpoint for the next moment. This avoids the system instability problems easily caused by traditional fixed acceleration strategies, improving system stability, loading speed, and control accuracy.
[0019] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention.
[0020] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating an embodiment of the motor control method of the present invention;
[0022] Figure 2 This is a schematic diagram of a structure of an embodiment of the motor control device of the present invention;
[0023] Figure 3 This is a schematic diagram of an acceleration adaptive control system.
[0024] Referring to the accompanying drawings, the reference numerals in the embodiments of the present invention are as follows:
[0025] 102 - Acquisition unit; 104 - Control unit. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0027] According to embodiments of the present invention, a motor control method is provided, applied to a motor drive system, specifically a motor drive system employing dual-closed-loop vector control. Dual-closed-loop vector control is a control architecture commonly used in permanent magnet synchronous motor drive systems, comprising a speed loop (outer loop) and a current loop (inner loop). Through coordinate transformation, the motor stator current is decomposed into excitation and torque components, achieving precise control of the motor speed and torque. Figure 1 The flowchart of an embodiment of the method of the present invention is shown. The motor control method may include steps S110 to S160.
[0028] In step S110, the speed setpoint of the motor at the previous moment is obtained, and the initial value of the speed setpoint at the current moment is determined based on the speed acceleration.
[0029] Motor speed control needs to be adjusted gradually based on historical control states. The speed setpoint at the previous moment is the basic reference for current control. Speed acceleration determines the transition rate of speed from historical state to current target state. Reasonably setting speed acceleration can avoid system shock caused by sudden speed changes, and at the same time reserve space for subsequent dynamic adjustment based on stability.
[0030] Specifically, firstly, the speed setpoint used to control the motor at the previous moment is extracted from the system's control record; then, based on the preset or previously adjusted speed acceleration, the initial reference value of the speed setpoint at the current moment is obtained through the calculation method of "initial value of current speed setpoint = previous speed setpoint ± speed acceleration" ("+" corresponds to the scenario of desired acceleration, and "-" corresponds to the scenario of desired deceleration).
[0031] In step S120, the initial value of the speed setpoint is subtracted from the actual speed of the motor to obtain the speed error. The speed error is then adjusted by the speed loop to output the speed loop current command.
[0032] The initial value of the speed setpoint is the control target, and the actual speed is the control result. The difference between the two (speed error) directly reflects the degree of deviation of the current speed control. The core function of the speed loop regulation is to convert the speed control requirement into a current control command by processing the speed error. Since the speed of the motor is determined by the torque, and the torque is related to the stator current, the speed can be indirectly controlled by controlling the current.
[0033] Specifically, the current actual speed of the motor is first obtained through a speed detection device; then, the "speed error = initial value of the current speed setpoint - actual speed of the motor" is calculated; next, the speed error is input into the speed loop adjustment algorithm, which performs calculations based on the magnitude and trend of the speed error (such as whether the error continues to increase or fluctuates), and finally outputs the speed loop current command to guide the current control.
[0034] In step S130, the rotational speed loop current command is collected to form current command sampling data.
[0035] Changes in the speed loop current command can indirectly reflect the stable state of the system. When the system approaches instability, the speed loop will frequently adjust the output current command to correct speed errors, resulting in specific regular fluctuations in the current command. Specifically, the speed loop current command is continuously collected according to a preset sampling period (the sampling period needs to be determined based on the frequency of change of the current command to ensure complete capture of fluctuation characteristics; the specific period value needs to be set according to the actual application scenario and cannot be determined here). The multiple discrete current command values collected are arranged in chronological order to form current command sampling data.
[0036] Optional, by sampling rate The speed loop current command is collected, with N collection points. According to the Nyquist sampling theorem, the sampling rate is... It should be at least twice the maximum value of the sampling frequency band (50Hz), and the number of sampling points should be a power of 2.
[0037] In step S140, an evaluation index characterizing the system stability is calculated based on the current command sampling data.
[0038] The current command sampling data contains dynamic characteristic information of the system. For example, when the system is stable, the current command fluctuation is gentle and there are few harmonic components in a specific frequency band. When the system is close to instability, the current command fluctuation is violent and the harmonic components in a specific frequency band increase. By analyzing and calculating these data, the stable state of the system can be transformed from a "qualitative description" to a "quantitative indicator", providing a clear basis for subsequent adjustment of speed and acceleration.
[0039] In some implementations, step S140 involves calculating an evaluation index characterizing system stability based on the current command sampling data, including steps S210 and S220.
[0040] Step S210: Perform frequency domain conversion on the current command sampling data and extract the frequency domain energy within a preset frequency band; the preset frequency band is a frequency band that can reflect the characteristic harmonics when the motor drive system is unstable.
[0041] In a dual-loop vector control system, when the system is running stably, the time-domain signal of the current command in the speed loop is relatively stable, and its energy in the frequency domain is mainly concentrated near the fundamental frequency. However, when the system approaches or is in an unstable state, the speed loop, in order to correct the continuously increasing speed deviation, causes abnormal fluctuations in the current command, which in turn excites characteristic harmonics in a specific frequency range in the frequency domain. The energy of these characteristic harmonics increases with the degree of instability. Through frequency domain transformation, the characteristic harmonics that are difficult to identify directly in the time domain can be converted into clear frequency components in the frequency domain. Then, the frequency domain energy within a preset frequency band (including the frequency band containing the characteristic harmonics) can be extracted, and the magnitude of this energy can indirectly reflect the instability risk of the system.
[0042] Specifically, first, the collected current command sampling data is acquired; then, the current command sampling data in the time domain is processed using a preset frequency domain conversion method to obtain the amplitude or energy distribution result of the data in the frequency domain; next, based on a predetermined preset frequency band that can reflect the characteristic harmonics when the system is unstable, the energy data corresponding to all frequency points in the frequency band is selected from the frequency domain distribution result; finally, the energy data of each frequency point in the selected preset frequency band is accumulated and calculated to obtain the total frequency domain energy in the preset frequency band.
[0043] In some implementations, the frequency domain conversion of the current command sampling data is performed using a fast Fourier transform.
[0044] Fast Fourier Transform (FFT) can quickly process the frequency domain conversion of current command sampling data, avoiding delays in stability evaluation due to excessive data processing time. This ensures that subsequent stability judgments and acceleration adjustments based on frequency domain results can respond in real time to changes in motor operating status. Furthermore, FFT can precisely control the frequency resolution after frequency domain conversion by setting the sampling rate and number of sampling points, ensuring accurate coverage and extraction of preset characteristic harmonic frequency bands (such as specific frequency bands reflecting system instability), and reducing energy extraction errors caused by insufficient frequency resolution or frequency domain aliasing.
[0045] Optionally, use Fast Fourier Transform (FFT) to calculate each frequency point in the 5-50Hz band. frequency domain complex numbers :
[0046] ,
[0047] ,
[0048] Where k is the frequency domain index. This is the sampling data for the current command output by the speed loop. For the 5-50Hz frequency band, the minimum index is... The maximum index for the 5-50Hz frequency band. This indicates rounding to the nearest integer.
[0049] Calculate the energy and E in the 5-50Hz frequency band:
[0050] ,
[0051] in, () indicates the real part. () indicates the imaginary part.
[0052] Step S220: Based on the frequency domain energy and the frequency domain energy of the fundamental frequency point corresponding to the current operating frequency of the motor, the stability evaluation index is calculated.
[0053] System stability cannot be accurately determined solely by the frequency domain energy within a preset frequency band, as the absolute value of this energy is affected by the current operating conditions of the motor. However, the frequency domain energy at the fundamental frequency corresponding to the motor's current operating frequency reflects the energy level of the system's normal operating signal under the current conditions. By combining the frequency domain energy within the preset frequency band with the fundamental frequency energy, the energy within the preset frequency band can be normalized, eliminating the interference of operating condition differences on stability assessment and obtaining an evaluation index that can objectively quantify the degree of system stability.
[0054] Specifically, first, based on the current operating frequency of the motor, the fundamental frequency point corresponding to that operating frequency in the frequency domain is determined; then, the frequency domain energy corresponding to that fundamental frequency point is extracted from the frequency domain distribution result obtained from the frequency domain conversion; next, the two energy parameters are calculated using a preset calculation method; finally, the calculation result is used as an evaluation index characterizing the stability of the system.
[0055] Optionally, calculate the energy at the frequency corresponding to the fundamental wave. :
[0056] ,
[0057] in, This refers to the frequency point corresponding to the current operating frequency.
[0058] Calculate the stability evaluation index S: .
[0059] By extracting the characteristic harmonic frequency band energy reflecting system instability through frequency domain transformation and performing normalized calculations in conjunction with the fundamental frequency energy, the interference of different operating conditions of the motor on stability judgment can be effectively eliminated, avoiding misjudgments caused by relying solely on time domain signals or single frequency band energy, thereby more accurately identifying the stable state of the system.
[0060] In step S150, the rotational acceleration is adjusted based on the relationship between the stability evaluation index and the preset stability threshold, combined with the preset mapping weight.
[0061] The preset stability threshold is the critical standard for stable system operation. The comparison between the stability evaluation index and this threshold can directly determine whether the system is currently in a safe and stable range. When the system has sufficient stability margin, the rotational acceleration can be appropriately increased to improve the loading speed. When the system is close to instability, the rotational acceleration needs to be reduced or stopped to ensure stability. The preset mapping weight can match the adjustment amount of rotational acceleration with the system stability margin, avoiding excessive adjustment that could lead to new instability.
[0062] In some implementations, step S150, adjusting the rotational acceleration based on the relationship between the stability evaluation index and the preset stability threshold, combined with a preset mapping weight, includes: when the stability evaluation index is less than the preset stability threshold, calculating the rotational acceleration based on the difference between the stability evaluation index and the preset stability threshold, and the preset mapping weight; when the stability evaluation index is greater than or equal to the preset stability threshold, adjusting the rotational acceleration to zero.
[0063] If the stability evaluation index is less than the preset stability threshold, it indicates that the system is currently in a stable operating range with a certain stability margin. Maintaining a fixed acceleration at this point might result in a low loading speed due to insufficient utilization of the stability margin. However, by quantifying the stability margin using the difference between the index and the threshold, and then combining this with preset mapping weights to convert the stability margin into an acceleration adjustment, we can achieve the adaptation logic of "the more sufficient the stability margin, the greater the acceleration." This avoids excessive acceleration that could exceed the stability boundary while fully exploring the system's acceleration potential and improving motor loading efficiency.
[0064] When the stability evaluation index is greater than or equal to the preset stability threshold, the system's stability margin has been exhausted. If the original speed acceleration is continued to increase or maintained at this point, the error between the speed setpoint and the actual speed will continue to accumulate, leading to speed loop control instability, motor oscillation, or even runaway. Adjusting the speed acceleration to zero can stop the speed setpoint from increasing (or decrease), maintain the current speed operating state, avoid exacerbating system instability due to continuous acceleration, provide a buffer time for the system to recover stability, and ensure the safety of the motor and drive system.
[0065] Optionally, the system is stable when the stability evaluation index S is less than or equal to 0.05. To ensure system reliability, a stability threshold of 0.04 is set. Speed mapping weights are then set. Based on the difference between the stability index S and the stability threshold of 0.04, the rotational acceleration is adjusted. :
[0066] ,
[0067] That is, when the stability evaluation index S < 0.04, the closer S is to 0.04, the faster the acceleration. The smaller the value. When S≥0.04, the acceleration... The value is zero, and the rotational speed remains constant.
[0068] At step S160, the adjusted rotational acceleration is used to update the rotational speed setpoint for the next moment, forming an adaptive control closed loop.
[0069] The adjusted speed acceleration is a parameter optimized based on the current stable state of the system. It is used to update the speed setpoint for the next moment, ensuring that the speed control at the next moment meets both the loading requirements and the system stability. Through this step, the entire control process forms a loop from "initial setpoint, error calculation, stability evaluation, parameter adjustment, new setpoint", realizing the adaptive capability of the system to continuously optimize control according to its own state.
[0070] In some implementations, step S160, updating the speed setpoint for the next moment using the adjusted speed acceleration, includes: if the motor is in acceleration mode, then the current speed setpoint and the adjusted speed acceleration are added together to obtain the speed setpoint for the next moment; if the motor is in deceleration mode, then the current speed setpoint and the adjusted speed acceleration are decremented to obtain the speed setpoint for the next moment.
[0071] During acceleration, the motor's control objective is to increase speed to match higher loads or speed regulation requirements. The adjusted speed acceleration, optimized based on the system's stable state, is added to the current speed setpoint. This ensures the next speed reference value increases at an optimized rate, guaranteeing speed increases meet operating conditions while preventing system instability due to excessive acceleration, achieving efficient acceleration under stable conditions. During deceleration, the motor's control objective is to reduce speed to match lower loads or speed regulation requirements, while avoiding system shocks caused by sudden speed drops. The adjusted speed acceleration, optimized based on the system's stable state, is decremented from the current speed setpoint. This ensures the next speed reference value decreases at an optimized rate, guaranteeing speed reduction meets operating conditions while avoiding system shocks through a controllable deceleration rate, ensuring the safe operation of both the motor and the load equipment.
[0072] Specifically, the current operating condition of the permanent magnet synchronous motor is determined to be either acceleration or deceleration. If it is acceleration, the summation of the current speed setpoint and the adjusted speed acceleration is performed to obtain the speed setpoint for the next moment, and this result is used as the speed setpoint for the next control cycle. If it is deceleration, the decrementation of the current speed setpoint and the adjusted speed acceleration is performed to obtain the speed setpoint for the next moment, and this result is used as the speed setpoint for the next control cycle.
[0073] Optionally, the given rotational speed at the current moment. Equal to the given rotational speed at the previous moment Add (during acceleration) or subtract (during deceleration) the engine speed acceleration. ,Right now: .
[0074] Figure 3 This is a schematic diagram of an acceleration adaptive control system. The specific process is as follows: the rotational speed setpoint at the previous moment... After rotational acceleration Adjust to obtain the current speed setpoint. Speed setpoint The speed error is obtained by subtracting the actual speed We from the input of the FOC control system. The speed error is then used by the speed loop PI calculation to output the speed loop current command Is. On one hand, the current command Is is input to the subsequent current loop and SVPWM calculation to generate the motor control signal; on the other hand, the current command Is is acquired to generate the current command array. After stability evaluation index calculation and acceleration adjustment, the following results were obtained. The rotational speed setpoint for the next moment is adjusted.
[0075] The adaptive control process of this invention can dynamically optimize the rotational speed and acceleration in real time based on the stable state of the system. This avoids the system instability problem that is easily caused by traditional fixed acceleration strategies, and can fully tap the acceleration potential of the motor within the stable range, effectively improving the stability, loading efficiency and control accuracy of the motor drive system.
[0076] For example, for a permanent magnet synchronous motor used to drive a conveyor belt, the speed needs to be increased from 1000 r / min to 2000 r / min; the motor's speed setpoint from the previous moment is 1000 r / min, and the initial speed acceleration is preset to 50 r / min. 2 Therefore, the initial value of the speed setpoint at the current moment = 1000 r / min + 50 r / min 2=1050r / min; the actual motor speed is obtained as 1020r / min through speed detection, and the speed error is calculated as 1050r / min - 1020r / min = 30r / min; the speed loop uses a proportional-integral algorithm to process the 30r / min speed error and outputs the speed loop current command; the 5A speed loop current command is collected at a sampling period of 0.01s, and continuously collected 100 times to form a current command sample containing 100 current values (all close to 5A, with slight fluctuations). Sample data; frequency domain analysis is performed on the current command sample data to extract the frequency domain energy of a specific frequency band (e.g., 5-50Hz) that reflects system instability. Combined with the frequency domain energy of the motor's current operating frequency (corresponding to the fundamental frequency of 1020r / min), a stability evaluation index (e.g., 0.03) is calculated. The preset stability threshold is 0.04. Since 0.03 < 0.04, the preset mapping weight is 1000. Based on the calculation of "(0.04-0.03)×1000", a new speed acceleration of 10r / min is obtained. 2 That is, the adjusted rotational speed acceleration is 10 r / min 2 The motor is in acceleration mode. The current speed setpoint is 1050 r / min. The next speed setpoint will be 1050 r / min + 10 r / min. 2 =1060r / min; When controlling the next moment, based on the speed setpoint of 1060r / min at the previous moment, repeat the above steps to gradually increase the motor speed to 2000r / min, and the system remains stable throughout the process without oscillation or runaway.
[0077] The technical solution of this embodiment obtains the motor speed setpoint from the previous moment, and determines the initial value of the current speed setpoint based on the speed acceleration. The difference between this initial value and the actual motor speed is used to obtain the speed error, which is then used to output a speed loop current command via speed loop regulation. This current command is collected to form current command sampling data. An evaluation index characterizing system stability is calculated based on the sampling data. The speed acceleration is dynamically adjusted according to the relationship between the evaluation index and a preset stability threshold, combined with preset mapping weights. The adjusted speed acceleration is then used to update the speed setpoint for the next moment. This avoids the system instability problems easily caused by traditional fixed acceleration strategies, improving system stability, loading speed, and control accuracy.
[0078] According to embodiments of the present invention, a motor control device corresponding to the motor control method is also provided, applied to a motor drive system, specifically a motor drive system employing dual-closed-loop vector control. Dual-closed-loop vector control is a control architecture commonly used in permanent magnet synchronous motor drive systems, comprising a speed loop (outer loop) and a current loop (inner loop). Through coordinate transformation, the motor stator current is decomposed into excitation and torque components, achieving precise control of the motor speed and torque. See also Figure 2 The diagram shows a structural schematic of an embodiment of the device of the present invention. The control device for the motor may include: an acquisition unit 102 and a control unit 104.
[0079] The acquisition unit 102 is configured to acquire the speed setpoint of the motor at the previous moment and determine the initial value of the speed setpoint at the current moment based on the speed acceleration. The specific functions and processing of the acquisition unit 102 are described in step S110.
[0080] Motor speed control needs to be adjusted gradually based on historical control states. The speed setpoint at the previous moment is the basic reference for current control. Speed acceleration determines the transition rate of speed from historical state to current target state. Reasonably setting speed acceleration can avoid system shock caused by sudden speed changes, and at the same time reserve space for subsequent dynamic adjustment based on stability.
[0081] Specifically, firstly, the speed setpoint used to control the motor at the previous moment is extracted from the system's control record; then, based on the preset or previously adjusted speed acceleration, the initial reference value of the speed setpoint at the current moment is obtained through the calculation method of "initial value of current speed setpoint = previous speed setpoint ± speed acceleration" ("+" corresponds to the scenario of desired acceleration, and "-" corresponds to the scenario of desired deceleration).
[0082] Control unit 104 is configured to calculate the speed error by subtracting the initial value of the speed setpoint from the actual speed of the motor, and output a speed loop current command after the speed error is adjusted by the speed loop. The specific functions and processing of this control unit 104 are described in step S120.
[0083] The initial value of the speed setpoint is the control target, and the actual speed is the control result. The difference between the two (speed error) directly reflects the degree of deviation of the current speed control. The core function of the speed loop regulation is to convert the speed control requirement into a current control command by processing the speed error. Since the speed of the motor is determined by the torque, and the torque is related to the stator current, the speed can be indirectly controlled by controlling the current.
[0084] Specifically, the current actual speed of the motor is first obtained through a speed detection device; then, the "speed error = initial value of the current speed setpoint - actual speed of the motor" is calculated; next, the speed error is input into the speed loop adjustment algorithm, which performs calculations based on the magnitude and trend of the speed error (such as whether the error continues to increase or fluctuates), and finally outputs the speed loop current command to guide the current control.
[0085] The control unit 104 is also configured to acquire the speed loop current command and form current command sampling data. The specific functions and processing of the control unit 104 are described in step S130.
[0086] Changes in the speed loop current command can indirectly reflect the stable state of the system. When the system approaches instability, the speed loop will frequently adjust the output current command to correct speed errors, resulting in specific regular fluctuations in the current command. Specifically, the speed loop current command is continuously collected according to a preset sampling period (the sampling period needs to be determined based on the frequency of change of the current command to ensure complete capture of fluctuation characteristics; the specific period value needs to be set according to the actual application scenario and cannot be determined here). The multiple discrete current command values collected are arranged in chronological order to form current command sampling data.
[0087] Optional, by sampling rate The speed loop current command is collected, with N collection points. According to the Nyquist sampling theorem, the sampling rate is... It should be at least twice the maximum value of the sampling frequency band (50Hz), and the number of sampling points should be a power of 2.
[0088] The control unit 104 is also configured to calculate an evaluation index characterizing the system stability based on the current command sampling data. For the specific functions and processing of the control unit 104, please refer to step S140.
[0089] The current command sampling data contains dynamic characteristic information of the system. For example, when the system is stable, the current command fluctuation is gentle and there are few harmonic components in a specific frequency band. When the system is close to instability, the current command fluctuation is violent and the harmonic components in a specific frequency band increase. By analyzing and calculating these data, the stable state of the system can be transformed from a "qualitative description" to a "quantitative indicator", providing a clear basis for subsequent adjustment of speed and acceleration.
[0090] In some implementations, the control unit 104 calculates evaluation indicators characterizing system stability based on the current command sampling data, including:
[0091] The control unit 104 is further configured to perform frequency domain conversion on the current command sampling data and extract frequency domain energy within a preset frequency band; the preset frequency band is a frequency band that can reflect the characteristic harmonics when the motor drive system is unstable. The specific functions and processing of the control unit 104 are described in step S210.
[0092] In a dual-loop vector control system, when the system is running stably, the time-domain signal of the current command in the speed loop is relatively stable, and its energy in the frequency domain is mainly concentrated near the fundamental frequency. However, when the system approaches or is in an unstable state, the speed loop, in order to correct the continuously increasing speed deviation, causes abnormal fluctuations in the current command, which in turn excites characteristic harmonics in a specific frequency range in the frequency domain. The energy of these characteristic harmonics increases with the degree of instability. Through frequency domain transformation, the characteristic harmonics that are difficult to identify directly in the time domain can be converted into clear frequency components in the frequency domain. Then, the frequency domain energy within a preset frequency band (including the frequency band containing the characteristic harmonics) can be extracted, and the magnitude of this energy can indirectly reflect the instability risk of the system.
[0093] Specifically, first, the collected current command sampling data is acquired; then, the current command sampling data in the time domain is processed using a preset frequency domain conversion method to obtain the amplitude or energy distribution result of the data in the frequency domain; next, based on a predetermined preset frequency band that can reflect the characteristic harmonics when the system is unstable, the energy data corresponding to all frequency points in the frequency band is selected from the frequency domain distribution result; finally, the energy data of each frequency point in the selected preset frequency band is accumulated and calculated to obtain the total frequency domain energy in the preset frequency band.
[0094] In some implementations, the frequency domain conversion of the current command sampling data is performed using a fast Fourier transform.
[0095] Fast Fourier Transform (FFT) can quickly process the frequency domain conversion of current command sampling data, avoiding delays in stability evaluation due to excessive data processing time. This ensures that subsequent stability judgments and acceleration adjustments based on frequency domain results can respond in real time to changes in motor operating status. Furthermore, FFT can precisely control the frequency resolution after frequency domain conversion by setting the sampling rate and number of sampling points, ensuring accurate coverage and extraction of preset characteristic harmonic frequency bands (such as specific frequency bands reflecting system instability), and reducing energy extraction errors caused by insufficient frequency resolution or frequency domain aliasing.
[0096] Optionally, use Fast Fourier Transform (FFT) to calculate each frequency point in the 5-50Hz band. frequency domain complex numbers :
[0097] ,
[0098] ,
[0099] Where k is the frequency domain index. This is the sampling data for the current command output by the speed loop. For the 5-50Hz frequency band, the minimum index is... The maximum index for the 5-50Hz frequency band. This indicates rounding to the nearest integer.
[0100] Calculate the energy and E in the 5-50Hz frequency band:
[0101] ,
[0102] in, () indicates the real part. () indicates the imaginary part.
[0103] The control unit 104 is further configured to calculate the stability evaluation index based on the frequency domain energy and the frequency domain energy of the fundamental frequency point corresponding to the current operating frequency of the motor. The specific functions and processing of this control unit 104 are described in step S220.
[0104] System stability cannot be accurately determined solely by the frequency domain energy within a preset frequency band, as the absolute value of this energy is affected by the current operating conditions of the motor. However, the frequency domain energy at the fundamental frequency corresponding to the motor's current operating frequency reflects the energy level of the system's normal operating signal under the current conditions. By combining the frequency domain energy within the preset frequency band with the fundamental frequency energy, the energy within the preset frequency band can be normalized, eliminating the interference of operating condition differences on stability assessment and obtaining an evaluation index that can objectively quantify the degree of system stability.
[0105] Specifically, first, based on the current operating frequency of the motor, the fundamental frequency point corresponding to that operating frequency in the frequency domain is determined; then, the frequency domain energy corresponding to that fundamental frequency point is extracted from the frequency domain distribution result obtained from the frequency domain conversion; next, the two energy parameters are calculated using a preset calculation method; finally, the calculation result is used as an evaluation index characterizing the stability of the system.
[0106] Optionally, calculate the energy at the frequency corresponding to the fundamental wave. :
[0107] ,
[0108] in, This refers to the frequency point corresponding to the current operating frequency.
[0109] Calculate the stability evaluation index S: .
[0110] By extracting the characteristic harmonic frequency band energy reflecting system instability through frequency domain transformation and performing normalized calculations in conjunction with the fundamental frequency energy, the interference of different operating conditions of the motor on stability judgment can be effectively eliminated, avoiding misjudgments caused by relying solely on time domain signals or single frequency band energy, thereby more accurately identifying the stable state of the system.
[0111] The control unit 104 is further configured to adjust the rotational acceleration based on the relationship between the stability evaluation index and a preset stability threshold, combined with a preset mapping weight. The specific functions and processing of this control unit 104 are described in step S150.
[0112] The preset stability threshold is the critical standard for stable system operation. The comparison between the stability evaluation index and this threshold can directly determine whether the system is currently in a safe and stable range. When the system has sufficient stability margin, the rotational acceleration can be appropriately increased to improve the loading speed. When the system is close to instability, the rotational acceleration needs to be reduced or stopped to ensure stability. The preset mapping weight can match the adjustment amount of rotational acceleration with the system stability margin, avoiding excessive adjustment that could lead to new instability.
[0113] In some embodiments, the control unit 104 adjusts the rotational acceleration based on the relationship between the stability evaluation index and the preset stability threshold, combined with a preset mapping weight, including: when the stability evaluation index is less than the preset stability threshold, calculating the rotational acceleration based on the difference between the stability evaluation index and the preset stability threshold and the preset mapping weight; when the stability evaluation index is greater than or equal to the preset stability threshold, adjusting the rotational acceleration to zero.
[0114] If the stability evaluation index is less than the preset stability threshold, it indicates that the system is currently in a stable operating range with a certain stability margin. Maintaining a fixed acceleration at this point might result in a low loading speed due to insufficient utilization of the stability margin. However, by quantifying the stability margin using the difference between the index and the threshold, and then combining this with preset mapping weights to convert the stability margin into an acceleration adjustment, we can achieve the adaptation logic of "the more sufficient the stability margin, the greater the acceleration." This avoids excessive acceleration that could exceed the stability boundary while fully exploring the system's acceleration potential and improving motor loading efficiency.
[0115] When the stability evaluation index is greater than or equal to the preset stability threshold, the system's stability margin has been exhausted. If the original speed acceleration is continued to increase or maintained at this point, the error between the speed setpoint and the actual speed will continue to accumulate, leading to speed loop control instability, motor oscillation, or even runaway. Adjusting the speed acceleration to zero can stop the speed setpoint from increasing (or decrease), maintain the current speed operating state, avoid exacerbating system instability due to continuous acceleration, provide a buffer time for the system to recover stability, and ensure the safety of the motor and drive system.
[0116] Optionally, the system is stable when the stability evaluation index S is less than or equal to 0.05. To ensure system reliability, a stability threshold of 0.04 is set. Speed mapping weights are then set. Based on the difference between the stability index S and the stability threshold of 0.04, the rotational acceleration is adjusted. :
[0117] ,
[0118] That is, when the stability evaluation index S < 0.04, the closer S is to 0.04, the faster the acceleration. The smaller the value. When S≥0.04, the acceleration... The value is zero, and the rotational speed remains constant.
[0119] The control unit 104 is further configured to update the speed setpoint for the next moment using the adjusted speed acceleration, forming an adaptive control closed loop. The specific functions and processing of this control unit 104 are described in step S160.
[0120] The adjusted speed acceleration is a parameter optimized based on the current stable state of the system. It is used to update the speed setpoint for the next moment, ensuring that the speed control at the next moment meets both the loading requirements and the system stability. Through this step, the entire control process forms a loop from "initial setpoint, error calculation, stability evaluation, parameter adjustment, new setpoint", realizing the adaptive capability of the system to continuously optimize control according to its own state.
[0121] In some embodiments, the control unit 104 updates the speed setpoint for the next moment using the adjusted speed acceleration, including: if the motor is in an acceleration state, the speed setpoint for the current moment is added to the adjusted speed acceleration to obtain the speed setpoint for the next moment; if the motor is in a deceleration state, the speed setpoint for the current moment is decremented by adding the adjusted speed acceleration to obtain the speed setpoint for the next moment.
[0122] During acceleration, the motor's control objective is to increase speed to match higher loads or speed regulation requirements. The adjusted speed acceleration, optimized based on the system's stable state, is added to the current speed setpoint. This ensures the next speed reference value increases at an optimized rate, guaranteeing speed increases meet operating conditions while preventing system instability due to excessive acceleration, achieving efficient acceleration under stable conditions. During deceleration, the motor's control objective is to reduce speed to match lower loads or speed regulation requirements, while avoiding system shocks caused by sudden speed drops. The adjusted speed acceleration, optimized based on the system's stable state, is decremented from the current speed setpoint. This ensures the next speed reference value decreases at an optimized rate, guaranteeing speed reduction meets operating conditions while avoiding system shocks through a controllable deceleration rate, ensuring the safe operation of both the motor and the load equipment.
[0123] Specifically, the current operating condition of the permanent magnet synchronous motor is determined to be either acceleration or deceleration. If it is acceleration, the summation of the current speed setpoint and the adjusted speed acceleration is performed to obtain the speed setpoint for the next moment, and this result is used as the speed setpoint for the next control cycle. If it is deceleration, the decrementation of the current speed setpoint and the adjusted speed acceleration is performed to obtain the speed setpoint for the next moment, and this result is used as the speed setpoint for the next control cycle.
[0124] Optionally, the given rotational speed at the current moment. Equal to the given rotational speed at the previous moment Add (during acceleration) or subtract (during deceleration) the engine speed acceleration. ,Right now: .
[0125] The adaptive control process of this invention can dynamically optimize the rotational speed and acceleration in real time based on the stable state of the system. This avoids the system instability problem that is easily caused by traditional fixed acceleration strategies, and can fully tap the acceleration potential of the motor within the stable range, effectively improving the stability, loading efficiency and control accuracy of the motor drive system.
[0126] For example, for a permanent magnet synchronous motor used to drive a conveyor belt, the speed needs to be increased from 1000 r / min to 2000 r / min; the motor's speed setpoint from the previous moment is 1000 r / min, and the initial speed acceleration is preset to 50 r / min. 2 Therefore, the initial value of the speed setpoint at the current moment = 1000 r / min + 50 r / min 2 =1050r / min; the actual motor speed is obtained as 1020r / min through speed detection, and the speed error is calculated as 1050r / min - 1020r / min = 30r / min; the speed loop uses a proportional-integral algorithm to process the 30r / min speed error and outputs the speed loop current command; the 5A speed loop current command is collected at a sampling period of 0.01s, and continuously collected 100 times to form a current command sample containing 100 current values (all close to 5A, with slight fluctuations). Sample data; frequency domain analysis is performed on the current command sample data to extract the frequency domain energy of a specific frequency band (e.g., 5-50Hz) that reflects system instability. Combined with the frequency domain energy of the motor's current operating frequency (corresponding to the fundamental frequency of 1020r / min), a stability evaluation index (e.g., 0.03) is calculated. The preset stability threshold is 0.04. Since 0.03 < 0.04, the preset mapping weight is 1000. Based on the calculation of "(0.04-0.03)×1000", a new speed acceleration of 10r / min is obtained. 2 That is, the adjusted rotational speed acceleration is 10 r / min2 The motor is in acceleration mode. The current speed setpoint is 1050 r / min. The next speed setpoint will be 1050 r / min + 10 r / min. 2 =1060r / min; When controlling the next moment, based on the speed setpoint of 1060r / min at the previous moment, repeat the above steps to gradually increase the motor speed to 2000r / min, and the system remains stable throughout the process without oscillation or runaway.
[0127] Since the processing and functions implemented by the device in this embodiment are basically the same as the embodiments, principles and examples of the aforementioned methods, any details not covered in the description of this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.
[0128] The technical solution of this invention obtains the motor speed setpoint from the previous moment, and determines the initial value of the current speed setpoint based on the speed acceleration. The difference between this initial value and the actual motor speed is used to obtain the speed error, which is then used to output a speed loop current command via speed loop regulation. This current command is collected to form current command sampling data. Based on the sampling data, an evaluation index characterizing system stability is calculated. According to the relationship between the evaluation index and a preset stability threshold, and combined with preset mapping weights, the speed acceleration is dynamically adjusted. The adjusted speed acceleration is used to update the speed setpoint for the next moment. This avoids the system instability problems easily caused by traditional fixed acceleration strategies, improving system stability, loading speed, and control accuracy.
[0129] According to an embodiment of the present invention, a motor corresponding to a control device for a motor is also provided. This motor may include the control device for the motor described above.
[0130] Since the processing and functions implemented by the motor in this embodiment are basically the same as the embodiments, principles and examples of the aforementioned device, any details not covered in this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.
[0131] The technical solution of this invention obtains the motor speed setpoint from the previous moment, and determines the initial value of the current speed setpoint based on the speed acceleration. The difference between this initial value and the actual motor speed is used to obtain the speed error, which is then used to output a speed loop current command via speed loop regulation. This current command is collected to form current command sampling data. Based on the sampling data, an evaluation index characterizing system stability is calculated. According to the relationship between the evaluation index and a preset stability threshold, and combined with preset mapping weights, the speed acceleration is dynamically adjusted. The adjusted speed acceleration is used to update the speed setpoint for the next moment. This avoids the system instability problems easily caused by traditional fixed acceleration strategies, improving system stability, loading speed, and control accuracy.
[0132] According to an embodiment of the present invention, a storage medium corresponding to a motor control method is also provided, the storage medium including a stored program, wherein the program controls the device where the storage medium is located to execute the motor control method described above when it is executed.
[0133] Since the processing and functions implemented by the storage medium in this embodiment are basically the same as the embodiments, principles and examples of the aforementioned methods, any details not covered in the description of this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.
[0134] The technical solution of this invention obtains the motor speed setpoint from the previous moment, and determines the initial value of the current speed setpoint based on the speed acceleration. The difference between this initial value and the actual motor speed is used to obtain the speed error, which is then used to output a speed loop current command via speed loop regulation. This current command is collected to form current command sampling data. Based on the sampling data, an evaluation index characterizing system stability is calculated. According to the relationship between the evaluation index and a preset stability threshold, and combined with preset mapping weights, the speed acceleration is dynamically adjusted. The adjusted speed acceleration is used to update the speed setpoint for the next moment. This avoids the system instability problems easily caused by traditional fixed acceleration strategies, improving system stability, loading speed, and control accuracy.
[0135] According to an embodiment of the present invention, a computer program product corresponding to a motor control method is also provided, the computer program product comprising a computer program that, when processed and executed, implements the steps of the above-described motor control method.
[0136] Since the processing and functions implemented by the computer program product in this embodiment are basically corresponding to the embodiments, principles and examples of the aforementioned methods, any details not covered in the description of this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.
[0137] The technical solution of this invention obtains the motor speed setpoint from the previous moment, and determines the initial value of the current speed setpoint based on the speed acceleration. The difference between this initial value and the actual motor speed is used to obtain the speed error, which is then used to output a speed loop current command via speed loop regulation. This current command is collected to form current command sampling data. Based on the sampling data, an evaluation index characterizing system stability is calculated. According to the relationship between the evaluation index and a preset stability threshold, and combined with preset mapping weights, the speed acceleration is dynamically adjusted. The adjusted speed acceleration is used to update the speed setpoint for the next moment. This avoids the system instability problems easily caused by traditional fixed acceleration strategies, improving system stability, loading speed, and control accuracy.
[0138] In summary, it is readily understood by those skilled in the art that, without conflict, the aforementioned advantageous methods can be freely combined and superimposed.
[0139] The above description is merely an embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of the claims of the present invention.
Claims
1. A method for controlling an electric motor, applied to a motor drive system, characterized in that, The method includes: Obtain the motor speed setpoint from the previous moment, and determine the initial value of the current speed setpoint based on the speed acceleration; The speed error is obtained by subtracting the initial value of the speed setpoint from the actual speed of the motor. The speed error is then adjusted by the speed loop and the speed loop current command is output. The rotational speed loop current command is collected to form current command sampling data; The evaluation index characterizing the system stability is calculated based on the current command sampling data; Based on the relationship between the stability evaluation index and the preset stability threshold, and in conjunction with the preset mapping weight, the rotational acceleration is adjusted. The adjusted rotational acceleration is used to update the rotational speed setpoint for the next moment, forming an adaptive control closed loop.
2. The motor control method according to claim 1, characterized in that, Evaluation metrics characterizing system stability are calculated based on the current command sampling data, including: The current command sampling data is frequency domain converted to extract frequency domain energy within a preset frequency band; the preset frequency band is a frequency band that can reflect the characteristic harmonics when the motor drive system is unstable; Based on the frequency domain energy and the frequency domain energy of the fundamental frequency point corresponding to the current operating frequency of the motor, the stability evaluation index is calculated.
3. The motor control method according to claim 2, characterized in that, The frequency domain conversion of the current command sampling data is performed using a fast Fourier transform.
4. The motor control method according to claim 1, characterized in that, Based on the relationship between the stability evaluation index and the preset stability threshold, and in conjunction with the preset mapping weight, the rotational acceleration is adjusted, including: When the stability evaluation index is less than the preset stability threshold, the rotational acceleration is calculated based on the difference between the stability evaluation index and the preset stability threshold, and the preset mapping weight. When the stability evaluation index is greater than or equal to the preset stability threshold, the rotational acceleration is adjusted to zero.
5. The motor control method according to claim 1, characterized in that, Using the adjusted rotational acceleration, the rotational speed setpoint is updated for the next moment, including: If the motor is in acceleration mode, the current speed setpoint is added to the adjusted speed acceleration to obtain the speed setpoint for the next moment. If the motor is in a deceleration state, the current speed setpoint and the adjusted speed acceleration are decreased to obtain the speed setpoint for the next moment.
6. A control device for an electric motor, applied to a motor drive system, characterized in that, The device includes: The acquisition unit is configured to acquire the speed setpoint of the motor at the previous moment and determine the initial value of the speed setpoint at the current moment based on the speed acceleration; The control unit is configured to calculate the difference between the initial value of the speed setpoint and the actual speed of the motor to obtain the speed error, and the speed error is adjusted by the speed loop to output a speed loop current command. The control unit is also configured to collect the rotational speed loop current command and form current command sampling data; The control unit is also configured to calculate an evaluation index characterizing the system stability based on the current command sampling data; The control unit is further configured to adjust the rotational acceleration based on the relationship between the stability evaluation index and the preset stability threshold, combined with a preset mapping weight. The control unit is also configured to update the speed setpoint for the next moment using the adjusted speed acceleration, thus forming an adaptive control closed loop.
7. An electric motor, characterized in that, include: The motor control device as described in claim 6.
8. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, the device containing the storage medium is controlled to perform the motor control method according to any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the motor control method according to any one of claims 1 to 5.
Citation Information
Cited By
A method and system for synchronous control of two-component adhesive spraying based on electronic gear algorithm
CN122308110A