Unmanned aerial vehicle motor control method and device, electronic equipment, medium and product
By using a UAV motor control method that utilizes three-phase current signals and real-time angular velocity for speed compensation and amplitude limiting filtering, the high hardware cost and unstable response issues of traditional solutions are resolved, achieving high-precision and stable motor control suitable for high-performance UAVs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-04-07
AI Technical Summary
Traditional drone motor control solutions require the introduction of additional hardware sensors, increasing costs and lacking dynamic compensation mechanisms, resulting in insufficient control accuracy and unstable response, making it difficult to meet the flight requirements of high-performance drones.
By acquiring the three-phase current signal of the UAV motor and estimating the angular velocity in real time, speed compensation calculation is performed. Combined with amplitude limiting and filtering, the motor drive voltage signal is calculated to achieve accurate acquisition and smooth response of speed and rotor position.
Without adding hardware sensors, it improves the accuracy and stability of motor control, reduces system costs, adapts to compact designs, and meets the needs of high-performance drones.
Smart Images

Figure CN121376180B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of unmanned aerial vehicle (UAV) technology, specifically to a UAV motor control method, device, electronic equipment, medium, and product. Background Technology
[0002] With the rapid development of drone technology, the precision requirements for flight attitude and motor control are increasing. Traditional drone motor control solutions typically require additional hardware sensors, such as resolver decoding chips, to obtain accurate rotor position. This not only significantly increases the system's material costs but also places higher demands on the compact drone structure design. Furthermore, these solutions often lack dynamic compensation mechanisms for estimated rotational speed and fail to effectively limit and filter flight control commands, resulting in insufficient control precision and unstable response under high-speed or complex operating conditions, making it difficult to meet the flight requirements of high-performance drones. Summary of the Invention
[0003] In view of the above problems, this application provides a method, device, electronic device, medium and product for controlling drone motors, which can solve the problems of insufficient control accuracy and unstable response of drone motors.
[0004] In a first aspect, this application provides a method for controlling the motors of an unmanned aerial vehicle (UAV), including:
[0005] During drone operation, the three-phase current signal of the drone motor is acquired and the angular velocity is estimated in real time.
[0006] Based on the historical motor control commands from the previous control cycle, the three-phase current signals, and the real-time estimated angular velocity, speed compensation calculations are performed to obtain the real-time motor speed and the motor rotor position angle.
[0007] The received current motor control command is limited to obtain the target throttle control signal;
[0008] The motor drive voltage signal is calculated based on the target throttle control signal, the real-time speed of the motor, and the rotor position angle of the motor.
[0009] The motor is driven to run according to the motor drive voltage signal.
[0010] In the above technical solution, the method can accurately obtain the motor speed and rotor position by fusing multiple parameters for dynamic speed compensation without the need for additional hardware sensors; at the same time, it limits and filters the control commands to avoid abnormal signals causing sudden changes in the drive voltage; finally, it calculates the drive voltage based on accurate parameters and optimized commands, which can improve the control accuracy under complex working conditions and make the motor response more stable, thereby reducing system costs, adapting to compact designs, and meeting the needs of high-performance UAVs.
[0011] In some implementations, the step of performing speed compensation calculations based on the historical motor control commands of the previous control cycle, the three-phase current signals, and the real-time estimated angular velocity to obtain the real-time motor speed and the motor rotor position angle includes:
[0012] The three-phase current signal is converted into direct-axis current components and quadrature-axis current components in a two-phase rotating coordinate system for motor vector control.
[0013] Based on the historical motor control commands of the previous control cycle, the direct-axis current component, and the quadrature-axis current component, calculate the flux linkage observation value;
[0014] Based on the real-time estimated angular velocity, the preset flux linkage gain compensation coefficient, and the basic flux linkage gain, the flux linkage observation value is fed back and corrected to obtain the flux linkage correction value.
[0015] Calculate the phase error of the current rotor angle estimate of the motor based on the flux linkage correction value;
[0016] The real-time estimated angular velocity is compensated and corrected by the PI control algorithm and the phase error to obtain the corrected real-time angular velocity.
[0017] Based on the corrected real-time angular velocity, calculate the motor rotor position angle and the motor real-time speed.
[0018] In the above technical solution, the method can accurately suppress the deviation caused by operating condition fluctuations through current coordinate transformation, magnetic flux feedback correction and PI compensation closed-loop optimization, and greatly improve the dynamic accuracy and stability of motor speed and rotor position detection, providing reliable state parameter support for vector control.
[0019] In some implementations, the step of feedback correction of the observed flux linkage value based on the real-time estimated angular velocity, a preset flux linkage gain compensation coefficient, and a base flux linkage gain to obtain a flux linkage correction value includes:
[0020] The flux linkage estimate is calculated based on the inductance of the motor stator and the observed flux linkage values.
[0021] Calculate the flux linkage amplitude based on the flux linkage estimate;
[0022] The adaptive gain coefficient is determined based on the real-time estimated angular velocity and the flux linkage amplitude.
[0023] The flux linkage observation is corrected by feedback based on the adaptive gain coefficient to obtain the flux linkage correction value.
[0024] In the above technical solution, the method can derive the flux estimation value by combining the stator inductance and flux observation value, and then dynamically determine the adaptive gain coefficient based on the real-time estimated angular velocity and flux amplitude, so as to realize the accurate feedback correction of the flux observation value, effectively offset the estimation deviation caused by the change of angular velocity and flux amplitude, and improve the accuracy and adaptability of the flux correction value.
[0025] In some implementations, determining the adaptive gain coefficient based on the real-time estimated angular velocity and the flux linkage amplitude includes:
[0026] Based on the real-time estimated angular velocity, the preset flux linkage gain compensation coefficient, and the basic flux linkage gain, the adaptive gain parameter is calculated.
[0027] The adaptive gain coefficient is calculated based on the flux linkage amplitude, the preset reference flux linkage amplitude, and the adaptive gain parameter.
[0028] In the above technical solution, the method can integrate real-time estimated angular velocity and flux amplitude, and combine preset flux gain compensation coefficient, basic flux gain and reference flux amplitude to dynamically calculate adaptive gain coefficient, so that the gain adjustment adapts to the real-time changes of angular velocity and flux, thereby improving the accuracy of flux correction and the adaptability of working conditions.
[0029] In some implementations, calculating the motor rotor position angle and the motor real-time speed based on the corrected real-time angular velocity includes:
[0030] The corrected real-time angular velocity is filtered and smoothed to obtain the target motor angular velocity;
[0031] The target motor angular velocity is normalized to obtain the normalized motor rotor angle.
[0032] Determine the motor rotor position angle based on the motor rotor angle;
[0033] The real-time speed of the motor is determined based on the target motor angular velocity.
[0034] In the above technical solution, the method can filter out fluctuation noise in the angular velocity by filtering, smoothing and normalizing the corrected real-time angular velocity, optimize the stability of rotor angle calculation, and thus accurately determine the motor rotor position angle and real-time speed, thereby improving the smoothness and reliability of the state parameter output.
[0035] In some embodiments, calculating the motor drive voltage signal based on the target throttle control signal, the real-time speed of the motor, and the rotor position angle of the motor includes:
[0036] Generate a speed drive command for controlling the motor based on the target throttle control signal;
[0037] The target speed value is determined according to the speed drive command;
[0038] The motor drive voltage signal is calculated based on the target speed value, the real-time speed of the motor, and the rotor position angle of the motor.
[0039] In the above technical solution, the method can convert the target throttle control signal into a clear speed drive command and target speed value, and then combine the real-time motor speed and rotor position angle to accurately calculate the drive voltage signal, so that the voltage output is accurately matched with the speed requirement and the real-time status of the motor, ensuring the targeted nature and response accuracy of the motor drive.
[0040] Secondly, this application provides a drone motor control device, comprising:
[0041] The acquisition unit is used to acquire the three-phase current signal of the drone motor and estimate the angular velocity in real time during drone operation;
[0042] The first calculation unit is used to perform speed compensation calculation based on the historical motor control command of the previous control cycle, the three-phase current signal and the real-time estimated angular velocity, so as to obtain the real-time motor speed and the motor rotor position angle.
[0043] The limiting unit is used to limit the received current motor control command to obtain the target throttle control signal;
[0044] The second calculation unit is used to calculate the motor drive voltage signal based on the target throttle control signal, the real-time speed of the motor, and the rotor position angle of the motor.
[0045] The drive unit is used to drive the motor to run according to the motor drive voltage signal.
[0046] In the above technical solution, the device can accurately obtain the motor speed and rotor position by fusing multiple parameters for dynamic speed compensation without the need for additional hardware sensors; at the same time, it limits and filters the control commands to avoid abnormal signals causing sudden changes in the drive voltage; finally, it calculates the drive voltage based on accurate parameters and optimized commands, which can improve the control accuracy under complex working conditions and make the motor response more stable, thereby reducing system costs, adapting to compact designs, and meeting the needs of high-performance UAVs.
[0047] Thirdly, this application provides an electronic device including a memory and a processor, the memory storing a computer program, and the processor running the computer program to cause the electronic device to perform the unmanned aerial vehicle motor control method described in any one of the first aspects.
[0048] Fourthly, this application provides a readable storage medium storing a computer program, which, when executed by a processor, performs the unmanned aerial vehicle motor control method described in any one of the first aspects.
[0049] Fifthly, this application provides a computer program product, which includes a computer program that, when executed by a processor, performs the UAV motor control method described in any one of the first aspects.
[0050] The beneficial effects of this application are as follows: without the need for additional hardware sensors, the motor speed and rotor position can be accurately obtained by fusing multiple parameters for dynamic speed compensation; at the same time, the control commands are limited and filtered to avoid abnormal signals causing sudden changes in the drive voltage; finally, the drive voltage is calculated based on accurate parameters and optimized commands, which can improve the control accuracy under complex working conditions and make the motor response more stable, thereby reducing system costs, adapting to compact designs, and meeting the needs of high-performance UAVs. Attached Figure Description
[0051] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1 This is a flowchart illustrating the unmanned aerial vehicle (UAV) motor control method in some embodiments of this application;
[0053] Figure 2 This is a schematic diagram of the structure of the UAV motor control device in some embodiments of this application;
[0054] Figure 3 This is a schematic diagram of the structure of an electronic device in some embodiments of this application. Detailed Implementation
[0055] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.
[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0057] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more (including two), similarly, "multiple sets" refers to two or more sets (including two sets), and "multiple pieces" refers to two or more pieces (including two pieces) unless otherwise explicitly defined.
[0058] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0059] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0060] With the rapid development of drone technology, the precision requirements for flight attitude and motor control are increasing. Traditional drone motor control solutions typically require additional hardware sensors, such as resolver decoding chips, to obtain accurate rotor position. This not only significantly increases the system's material costs but also places higher demands on the compact drone structure design. Furthermore, these solutions often lack dynamic compensation mechanisms for estimated rotational speed and fail to effectively limit and filter flight control commands, resulting in insufficient control precision and unstable response under high-speed or complex operating conditions, making it difficult to meet the flight requirements of high-performance drones.
[0061] To address the aforementioned technical issues, this application provides a method for controlling a drone motor. This method can accurately obtain the motor speed and rotor position by fusing multiple parameters for dynamic speed compensation without requiring additional hardware sensors. Simultaneously, it limits and filters control commands to prevent abnormal signals from causing sudden changes in drive voltage. Finally, it calculates the drive voltage based on accurate parameters and optimized commands. This method can improve control accuracy under complex operating conditions while making the motor response smoother, thereby reducing system costs, adapting to compact designs, and ultimately meeting the needs of high-performance drones.
[0062] like Figure 1 As shown, some embodiments of this application provide a method for controlling the motors of a drone, which includes:
[0063] S101. During drone operation, acquire the three-phase current signal of the drone motor and estimate the angular velocity in real time;
[0064] S102. Based on the historical motor control commands, three-phase current signals and real-time estimated angular velocity from the previous control cycle, speed compensation calculation is performed to obtain the real-time motor speed and motor rotor position angle.
[0065] S103. Limit the received current motor control command to obtain the target throttle control signal;
[0066] S104. Calculate the motor drive voltage signal based on the target throttle control signal, the real-time speed of the motor, and the position angle of the motor rotor.
[0067] S105. Drive the motor to run according to the motor drive voltage signal.
[0068] In some embodiments, the three-phase current signal refers to the real-time current data (usually U-phase, V-phase, and W-phase) flowing through the three-phase stator windings of the UAV motor, which is collected by a current sampling device when the UAV motor is running. It is one of the core electrical signals reflecting the motor's operating status.
[0069] In some embodiments, real-time estimated angular velocity refers to the instantaneous angular velocity of the motor rotor calculated in real time based on historical motor operating data, control commands, and related algorithms (such as flux linkage observation, PI compensation, etc.).
[0070] In some embodiments, historical motor control commands refer to command signals (such as voltage control commands, PWM drive commands, etc.) sent by the UAV flight control system or motor controller to the motor in the previous control cycle to control the motor's operating status, such as speed and torque.
[0071] In some embodiments, the real-time speed of the motor refers to the rotational speed of the motor rotor per unit time (the unit can be rad / s or r / min) obtained after speed compensation calculation and filtering, and is one of the core output parameters of the motor's operating status.
[0072] In some embodiments, the motor rotor position angle refers to the real-time spatial position angle of the motor rotor relative to the stator winding (usually in radians, ranging from 0 to 2π), which is used for phase matching between the stator current and the rotor magnetic field in motor vector control.
[0073] In some embodiments, the current motor control command refers to the control command (such as the desired speed command, throttle control signal, etc.) sent by the UAV flight control system to the motor according to the requirements of flight attitude, operation commands, etc. during the current control cycle.
[0074] In some embodiments, the target throttle control signal refers to the throttle control signal obtained after the current motor control command has been subjected to amplitude limiting processing. This signal is used for subsequent calculation of the motor drive voltage and meets the requirements for safe motor operation.
[0075] In some embodiments, the motor drive voltage signal refers to the voltage signal (usually the α-axis, β-axis voltage or three-phase voltage in a two-phase rotating coordinate system) calculated by a vector control algorithm based on the target throttle control signal, the real-time speed of the motor and the rotor position angle, and used to drive the stator winding of the motor.
[0076] For example, this method can use a three-resistor lower bridge sampling scheme to collect the three-phase current signal of the UAV motor during operation; then, the collected three-phase current signal is input into a sensorless FOC observer, and the signal is processed and identified by the built-in coordinate transformation, flux linkage observation, phase error compensation, filtering and smoothing algorithms to obtain the motor rotor position angle and the real-time speed of the motor.
[0077] For example, this method can acquire the flight control throttle signal (i.e., the current motor control command) sent by the flight controller, and perform slope limiting and low-pass filtering optimization to obtain the processed flight control signal (i.e., the target throttle control signal).
[0078] In the above embodiments, the method can accurately obtain the motor speed and rotor position by fusing multiple parameters for dynamic speed compensation without the need for additional hardware sensors; at the same time, it limits and filters the control commands to avoid abnormal signals causing sudden changes in the drive voltage; finally, it calculates the drive voltage based on accurate parameters and optimized commands, which can improve the control accuracy under complex working conditions and make the motor response more stable, thereby reducing system costs, adapting to compact designs, and meeting the needs of high-performance UAVs.
[0079] In some embodiments, speed compensation calculations are performed based on historical motor control commands from the previous control cycle, three-phase current signals, and real-time estimated angular velocity to obtain the real-time motor speed and motor rotor position angle, including:
[0080] The three-phase current signal is converted into direct-axis current components and quadrature-axis current components in a two-phase rotating coordinate system for motor vector control.
[0081] Calculate the flux linkage observation value based on the historical motor control commands, direct-axis current component, and quadrature-axis current component from the previous control cycle;
[0082] Based on the real-time estimated angular velocity, the preset flux linkage gain compensation coefficient, and the basic flux linkage gain, the flux linkage observation value is fed back and corrected to obtain the flux linkage correction value.
[0083] Calculate the phase error of the current rotor angle estimate of the motor based on the flux linkage correction value;
[0084] The real-time estimated angular velocity is compensated and corrected by PI control algorithm and phase error to obtain the corrected real-time angular velocity;
[0085] Based on the corrected real-time angular velocity, calculate the rotor position angle and the real-time speed of the motor.
[0086] In some embodiments, this method can fuse the motor stator resistance, direct-axis current component, quadrature-axis current component, direct-axis voltage component, and quadrature-axis voltage component to obtain intermediate variables, preparing for subsequent calculation of flux linkage observations. The calculation formula is as follows:
[0087] Y α =-R s I α +V α ;
[0088] Y β =-R s I β +V β ;
[0089] Among them, Y α The intermediate calculation variable for the α axis;
[0090] Y β This serves as an intermediate calculation variable for the β-axis;
[0091] R s This refers to the stator resistance of the motor (an inherent parameter of the motor).
[0092] I α The converted direct-axis current component;
[0093] I β The converted quadrature-axis current component;
[0094] V α The voltage component of the α-axis (output corresponding to historical motor control commands);
[0095] V β This is the β-axis voltage component (output corresponding to historical motor control commands).
[0096] In some embodiments, this method can be based on the historical state of the previous cycle (i.e., historical motor control commands), combined with intermediate variables and the control cycle, to integrate and obtain the flux linkage observation value for the current cycle. The calculation formula is as follows:
[0097] X α (t)=X α (t-1)+Y α ·T s ;
[0098] X β (t)=X β (t-1)+Y β ·T s ;
[0099] Among them, X α (t), X β (t) represents the state variable (i.e., the flux linkage observation) for the current period.
[0100] X α (t-1),X β (t-1) is the state variable of the previous cycle (corresponding to the historical motor control command of the previous control cycle);
[0101] Y α Y β For intermediate calculation variables;
[0102] T s Sampling time.
[0103] In some embodiments, the formula for calculating the phase error (the deviation between the current rotor angle estimate and the actual rotor angle) based on the flux linkage correction value is as follows:
[0104] ;
[0105] Where ε is the phase error;
[0106] , This is the magnetic flux linkage correction value;
[0107] θ is the current estimated rotor angle;
[0108] For flux linkage amplitude ( ).
[0109] In some embodiments, the real-time estimated angular velocity is compensated and corrected by a PI control algorithm and phase error, and the formula for calculating the corrected real-time angular velocity is as follows:
[0110] ε int (t)=ε int (t-1)+ε·T s ;
[0111] ω e =2aε+a 2 ε int ;
[0112] Where, ε int (t) is the integral value of the phase error (the integral term of the PI controller);
[0113] ε represents the phase error;
[0114] T s To control the cycle;
[0115] ω e This is the corrected real-time angular velocity;
[0116] 'a' represents the parameter of the PI controller.
[0117] In the above embodiments, the method can accurately suppress deviations caused by operating condition fluctuations through current coordinate transformation, flux feedback correction and PI compensation closed-loop optimization, significantly improve the dynamic accuracy and stability of motor speed and rotor position detection, and provide reliable state parameter support for vector control.
[0118] In some embodiments, the flux linkage observation value is corrected by feedback based on the real-time estimated angular velocity, a preset flux linkage gain compensation coefficient, and a base flux linkage gain to obtain a flux linkage correction value, including:
[0119] Calculate the estimated flux linkage value based on the observed values of the inductance and flux linkage of the motor stator;
[0120] Calculate the flux linkage amplitude based on the flux linkage estimate;
[0121] The adaptive gain coefficient is determined based on the real-time estimated angular velocity and flux linkage amplitude.
[0122] The flux linkage observations are corrected by feedback based on the adaptive gain coefficient to obtain the flux linkage correction value.
[0123] In some embodiments, the formula for calculating the flux linkage estimate based on the observed values of the motor stator inductance and flux linkage is as follows:
[0124] ;
[0125] ;
[0126] in, , For the flux linkage estimate (α-axis and β-axis components);
[0127] X α X β These are magnetic flux linkage observations;
[0128] L s The inductance of the motor stator;
[0129] I α I β These are the direct-axis and quadrature-axis current components.
[0130] In some embodiments, the method can perform a sum-of-squares operation on the flux linkage estimate to obtain the square of the flux linkage amplitude (the square root of which is the flux linkage amplitude). The calculation formula is as follows:
[0131] ;
[0132] in, It is the square of the flux linkage amplitude (the square root of which is the flux linkage amplitude).
[0133] , These are the flux linkage estimates (α-axis and β-axis components).
[0134] In some embodiments, the adaptive gain coefficient is calculated using the following formula based on the real-time estimated angular velocity and flux linkage amplitude:
[0135] ;
[0136] In actual engineering, the denominator needs to be supplemented. ;
[0137] K is the adaptive gain coefficient;
[0138] γ is the adaptive gain parameter (calculated from "basic flux linkage gain + flux linkage gain compensation coefficient × real-time estimated angular velocity", i.e., γ = γ g +γ c ×ω);
[0139] Ψ ref This is the preset reference flux linkage amplitude;
[0140] It is the square of the flux linkage amplitude.
[0141] In some embodiments, the flux linkage observation is corrected based on the adaptive gain coefficient, and the calculation formula for the flux linkage correction value is as follows:
[0142] ;
[0143] ;
[0144] ;
[0145] ;
[0146] Where, χ α , χ β For magnetic flux correction components;
[0147] K is the adaptive gain coefficient;
[0148] , For the flux linkage estimate (α-axis and β-axis components);
[0149] , This is the flux linkage correction value (i.e., the updated state variable);
[0150] T s To control the cycle.
[0151] In the above embodiments, the method can derive the flux linkage estimate by combining the stator inductance and flux linkage observation values, and then dynamically determine the adaptive gain coefficient based on the real-time estimated angular velocity and flux linkage amplitude, so as to achieve accurate feedback correction of the flux linkage observation values, effectively offset the estimation deviation caused by the changes in angular velocity and flux linkage amplitude, and improve the accuracy and adaptability of the flux linkage correction value.
[0152] In some embodiments, determining the adaptive gain coefficient based on the real-time estimated angular velocity and flux linkage amplitude includes:
[0153] The adaptive gain parameters are calculated based on the real-time estimated angular velocity, the preset flux linkage gain compensation coefficient, and the basic flux linkage gain.
[0154] The adaptive gain coefficient is calculated based on the flux linkage amplitude, the preset reference flux linkage amplitude, and the adaptive gain parameter.
[0155] In the above embodiments, the method can integrate real-time estimated angular velocity and flux amplitude, and combine preset flux gain compensation coefficient, basic flux gain and reference flux amplitude to dynamically calculate adaptive gain coefficient, so that the gain adjustment adapts to the real-time changes of angular velocity and flux, thereby improving the accuracy of flux correction and the adaptability of operating conditions.
[0156] In some embodiments, calculating the motor rotor position angle and the motor real-time speed based on the corrected real-time angular velocity includes:
[0157] The corrected real-time angular velocity is filtered and smoothed to obtain the target motor angular velocity;
[0158] The target motor angular velocity is normalized to obtain the normalized motor rotor angle.
[0159] Determine the motor rotor position angle based on the motor rotor angle;
[0160] The real-time speed of the motor is determined based on the target motor angular velocity.
[0161] In some embodiments, the corrected real-time angular velocity is filtered and smoothed to obtain the following formula for calculating the target motor angular velocity:
[0162] ω lpf (t)=(1-k)ω e +k·ω lpf (t-1)
[0163] Where, ω lpf (t) represents the target motor angular velocity obtained after filtering and smoothing;
[0164] ω e The corrected real-time angular velocity (from the result after PI compensation);
[0165] ω lpf (t-1) represents the target motor angular velocity of the previous cycle (historical smoothed value).
[0166] k is the low-pass filter coefficient (values range from 0 to 1; the larger the k value, the smoother the filter; the smaller the k value, the faster the response).
[0167] t represents the current control cycle;
[0168] t-1 is the previous control cycle.
[0169] In some embodiments, the target motor angular velocity is normalized to obtain the normalized rotor angle; the calculation formulas for determining the final rotor position angle and real-time speed are as follows:
[0170] θ temp (t)=θ temp (t-1)+ω lpf (t)·T s ;
[0171] θ final =θ temp (t) mod 2π;
[0172] Where, θtemp (t) represents the temporary rotor angle for the current cycle (the angle not normalized by the integral).
[0173] θ temp (t-1) is the temporary rotor angle of the previous cycle (historical integral value).
[0174] ω lpf (t) represents the target motor angular velocity;
[0175] T s To control the cycle (time step of integration);
[0176] θ final This is the normalized motor rotor angle, which ranges from 0 to 2π.
[0177] In the above embodiments, the method can filter out fluctuation noise in the angular velocity by filtering, smoothing and normalizing the corrected real-time angular velocity, optimize the stability of rotor angle calculation, and thus accurately determine the motor rotor position angle and real-time speed, thereby improving the smoothness and reliability of the state parameter output.
[0178] In some embodiments, the motor drive voltage signal is calculated based on the target throttle control signal, the real-time motor speed, and the motor rotor position angle, including:
[0179] Generate speed drive commands to control the motor based on the target throttle control signal;
[0180] The target speed value is determined based on the speed drive command;
[0181] The motor drive voltage signal is calculated based on the target speed, the real-time speed of the motor, and the rotor position angle.
[0182] For example, this method can convert the processed flight control signal (i.e., the target throttle control signal) into a specific speed drive command (i.e., a speed drive command).
[0183] In the above embodiments, the method can convert the target throttle control signal into a clear speed drive command and target speed value, and then accurately calculate the drive voltage signal by combining the real-time motor speed and rotor position angle, so that the voltage output is accurately matched with the speed requirement and the real-time status of the motor, ensuring the targeting and response accuracy of the motor drive.
[0184] Figure 2 A schematic diagram of a drone motor control device is shown. It should be understood that this device is related to... Figure 1 The method executed in the middle corresponds to the steps involved in the aforementioned method. The specific functions and effects of the device can be found in the description above. To avoid repetition, detailed descriptions are omitted here.
[0185] The drone motor control device includes:
[0186] The acquisition unit 210 is used to acquire the three-phase current signal of the drone motor and estimate the angular velocity in real time during drone operation;
[0187] The first calculation unit 220 is used to perform speed compensation calculation based on the historical motor control commands, three-phase current signals and real-time estimated angular velocity of the previous control cycle, so as to obtain the real-time motor speed and the motor rotor position angle.
[0188] The limiting unit 230 is used to limit the received current motor control command to obtain the target throttle control signal;
[0189] The second calculation unit 240 is used to calculate the motor drive voltage signal based on the target throttle control signal, the real-time speed of the motor and the rotor position angle of the motor.
[0190] The drive unit 250 is used to drive the motor to run according to the motor drive voltage signal.
[0191] In some embodiments, the first computing unit 220 includes:
[0192] The conversion subunit 221 is used to convert the three-phase current signal into the direct-axis current component and quadrature-axis current component in a two-phase rotating coordinate system for motor vector control.
[0193] The calculation subunit 222 is used to calculate the flux linkage observation value based on the historical motor control commands, direct-axis current component and quadrature-axis current component of the previous control cycle;
[0194] The correction subunit 223 is used to correct the observed flux linkage value based on the real-time estimated angular velocity, the preset flux linkage gain compensation coefficient and the basic flux linkage gain, so as to obtain the flux linkage correction value.
[0195] The calculation subunit 222 is also used to calculate the phase error of the current rotor angle estimate of the motor based on the flux linkage correction value;
[0196] The correction subunit 223 is also used to compensate and correct the real-time estimated angular velocity through PI control algorithm and phase error to obtain the corrected real-time angular velocity.
[0197] The calculation subunit 222 is also used to calculate the motor rotor position angle and the motor real-time speed based on the corrected real-time angular velocity.
[0198] In some embodiments, the correction subunit 223 is specifically used to calculate the flux linkage estimate based on the observed values of the inductance and flux linkage of the motor stator;
[0199] The correction subunit 223 is also used to calculate the flux amplitude based on the flux estimate;
[0200] The correction subunit 223 is also used to determine the adaptive gain coefficient based on the real-time estimated angular velocity and flux amplitude.
[0201] The correction subunit 223 is also used to perform feedback correction on the flux linkage observation value based on the adaptive gain coefficient to obtain the flux linkage correction value.
[0202] In some embodiments, the correction subunit 223 includes:
[0203] The first calculation module is used to calculate the adaptive gain parameters based on the real-time estimated angular velocity, the preset flux linkage gain compensation coefficient, and the basic flux linkage gain.
[0204] The second calculation module is also used to calculate the adaptive gain coefficient based on the flux linkage amplitude, the preset reference flux linkage amplitude, and the adaptive gain parameter.
[0205] In some embodiments, the calculation subunit 222 is specifically used to perform filtering and smoothing on the corrected real-time angular velocity to obtain the target motor angular velocity;
[0206] The calculation subunit 222 is also used to normalize the angular velocity of the target motor to obtain the normalized motor rotor angle.
[0207] The calculation subunit 222 is also used to determine the motor rotor position angle based on the motor rotor angle.
[0208] The calculation subunit 222 is also used to determine the real-time speed of the motor based on the target motor angular velocity.
[0209] In some embodiments, the second computing unit 240 includes:
[0210] The generation subunit 241 is used to generate a speed drive command for controlling the motor based on the target throttle control signal;
[0211] Determine subunit 242, which is used to determine the target speed value according to the speed drive command;
[0212] The calculation subunit 243 is used to calculate the motor drive voltage signal based on the target speed value, the real-time speed of the motor, and the rotor position angle of the motor.
[0213] like Figure 3As shown, this application provides an electronic device 300, which includes a processor 301 and a memory 302. The processor 301 and the memory 302 are interconnected and communicate with each other through a communication bus 303 and / or other forms of connection mechanism (not shown). The memory 302 stores a computer program that can be executed by the processor 301. When the computing device is running, the processor 301 executes the computer program to perform the method in any of the aforementioned optional implementations.
[0214] This application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the method in any of the aforementioned optional implementations.
[0215] The computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0216] This application provides a computer program product, which includes a computer program that, when run by a processor, executes the method in any of the aforementioned optional implementations.
[0217] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and they should all be covered within the scope of the claims and specification of this application. In particular, as long as there is no conflict, the various technical features mentioned in the embodiments can be combined in any way. This application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A method for controlling the motors of an unmanned aerial vehicle (UAV), characterized in that, include: During drone operation, the three-phase current signal of the drone motor is acquired and the angular velocity is estimated in real time. Based on the historical motor control commands from the previous control cycle, the three-phase current signals, and the real-time estimated angular velocity, speed compensation calculations are performed to obtain the real-time motor speed and the motor rotor position angle. The received current motor control command is limited to obtain the target throttle control signal; The motor drive voltage signal is calculated based on the target throttle control signal, the real-time speed of the motor, and the rotor position angle of the motor. The motor is driven to run according to the motor drive voltage signal.
2. The UAV motor control method according to claim 1, characterized in that, The step of performing speed compensation calculation based on the historical motor control commands from the previous control cycle, the three-phase current signals, and the real-time estimated angular velocity to obtain the real-time motor speed and the motor rotor position angle includes: The three-phase current signal is converted into direct-axis current components and quadrature-axis current components in a two-phase rotating coordinate system for motor vector control. Based on the historical motor control commands of the previous control cycle, the direct-axis current component, and the quadrature-axis current component, calculate the flux linkage observation value; Based on the real-time estimated angular velocity, the preset flux linkage gain compensation coefficient, and the basic flux linkage gain, the flux linkage observation value is fed back and corrected to obtain the flux linkage correction value. Calculate the phase error of the current rotor angle estimate of the motor based on the flux linkage correction value; The real-time estimated angular velocity is compensated and corrected by the PI control algorithm and the phase error to obtain the corrected real-time angular velocity. Based on the corrected real-time angular velocity, calculate the motor rotor position angle and the motor real-time speed.
3. The UAV motor control method according to claim 2, characterized in that, The step of feeding back and correcting the observed flux linkage value based on the real-time estimated angular velocity, the preset flux linkage gain compensation coefficient, and the basic flux linkage gain to obtain the flux linkage correction value includes: The flux linkage estimate is calculated based on the inductance of the motor stator and the observed flux linkage values. Calculate the flux linkage amplitude based on the flux linkage estimate; The adaptive gain coefficient is determined based on the real-time estimated angular velocity and the flux linkage amplitude. The flux linkage observation is corrected by feedback based on the adaptive gain coefficient to obtain the flux linkage correction value.
4. The UAV motor control method according to claim 3, characterized in that, The step of determining the adaptive gain coefficient based on the real-time estimated angular velocity and the flux linkage amplitude includes: Based on the real-time estimated angular velocity, the preset flux linkage gain compensation coefficient, and the basic flux linkage gain, the adaptive gain parameter is calculated. The adaptive gain coefficient is calculated based on the flux linkage amplitude, the preset reference flux linkage amplitude, and the adaptive gain parameter.
5. The UAV motor control method according to claim 2, characterized in that, The step of calculating the motor rotor position angle and the motor real-time speed based on the corrected real-time angular velocity includes: The corrected real-time angular velocity is filtered and smoothed to obtain the target motor angular velocity; The target motor angular velocity is normalized to obtain the normalized motor rotor angle. Determine the motor rotor position angle based on the motor rotor angle; The real-time speed of the motor is determined based on the target motor angular velocity.
6. The UAV motor control method according to claim 1, characterized in that, The step of calculating the motor drive voltage signal based on the target throttle control signal, the real-time speed of the motor, and the rotor position angle of the motor includes: Generate a speed drive command for controlling the motor based on the target throttle control signal; The target speed value is determined according to the speed drive command; The motor drive voltage signal is calculated based on the target speed value, the real-time speed of the motor, and the rotor position angle of the motor.
7. A drone motor control device, characterized in that, The UAV motor control device includes: The acquisition unit is used to acquire the three-phase current signal of the drone motor and estimate the angular velocity in real time during drone operation; The first calculation unit is used to perform speed compensation calculation based on the historical motor control command of the previous control cycle, the three-phase current signal and the real-time estimated angular velocity, so as to obtain the real-time motor speed and the motor rotor position angle. The limiting unit is used to limit the received current motor control command to obtain the target throttle control signal; The second calculation unit is used to calculate the motor drive voltage signal based on the target throttle control signal, the real-time speed of the motor, and the rotor position angle of the motor. The drive unit is used to drive the motor to run according to the motor drive voltage signal.
8. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform the unmanned aerial vehicle motor control method according to any one of claims 1 to 6.
9. A readable storage medium, characterized in that, The readable storage medium stores a computer program, which, when executed by a processor, performs the UAV motor control method according to any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, performs the UAV motor control method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Motor control method and system, computer readable storage medium and household appliance
CN112422011A
Motor position estimation method
CN118381401A
Motor control method and device, electronic equipment and storage medium
CN120582515A