Method for controlling electric machine, aircraft and medium

By obtaining the instantaneous current and voltage of the motor, using the current outer ring and speed inner ring in the closed-loop control system to determine the speed control signal, the problem of unstable speed of the motor when the load changes is solved, the stable control of the motor power is achieved, and the operation stability and reliability of the motor and the carrier are improved.

CN120454567APending Publication Date: 2025-08-08BEIJING HELI GUOFANG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510913365.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

During the motor operation, the constant current output cannot maintain a stable rotation speed, causing fluctuations in the carrier speed, affecting stability and safety, especially when load changes.

Method used

By obtaining the instantaneous current and voltage of the motor, determining the effective value of the target current, and when the instantaneous power of the motor exceeds the target power, the speed control signal is determined using the current outer ring and the speed inner ring in the closed-loop control system to control the speed of the motor, so that the current approaches the effective value of the target current, and achieving stable control of the motor power.

Benefits of technology

On the premise of ensuring the stable motor speed, effective control of motor power is achieved, and the operation stability and reliability of the motor and carrier are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120454567A_ABST
    Figure CN120454567A_ABST
Patent Text Reader

Abstract

The invention discloses a method for controlling a motor, an aircraft and a medium, and relates to the technical field of motors, and the method for controlling the motor comprises the steps: obtaining an effective value and an instantaneous voltage of an instantaneous current of a DC bus of the motor; determining an effective value of a target current based on the instantaneous voltage and a preset target power; determining the instantaneous power of the motor based on the effective values of the instantaneous voltage and the instantaneous current; under the condition that the instantaneous power is greater than the target power, inputting an effective value of the instantaneous current and an effective value of the target current into a current outer ring in a closed-loop control system to obtain a first rotating speed; determining a second rotating speed from the first rotating speed and a preset target rotating speed; inputting the second rotating speed into a speed inner ring in the closed-loop control system to obtain a rotating speed control signal for controlling the rotating speed of the motor; and controlling the rotating speed of the motor based on the rotating speed control signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of motor technology, and more particularly to a method, an aircraft, and a medium for controlling a motor. Background Art

[0002] To keep the motor operating at a power-limited state (i.e., the instantaneous power does not exceed the preset target power), a complete current control loop must be constructed, and field-oriented control technology must be used to precisely control the current in the motor to control the motor's speed. Since the load of a moving vehicle (such as a motor-driven aircraft) varies with the motor's speed, the constant electromagnetic torque produced by a constant current output cannot maintain a stable speed when paired with a fluctuating load, causing the vehicle's speed to fluctuate, affecting its stable operation and safety. Therefore, improving the stability of the motor's speed while controlling the motor's power is an urgent issue. Summary of the Invention

[0003] Embodiments of the present disclosure provide a method for controlling a motor, an aircraft, and a medium.

[0004] In a first aspect, an embodiment of the present disclosure provides a method for controlling a motor, comprising: obtaining the effective value of the instantaneous current and the instantaneous voltage of the DC bus of the motor; determining the effective value of the target current based on the instantaneous voltage and a preset target power; when the instantaneous power of the motor is greater than the target power, inputting the effective value of the instantaneous current and the effective value of the target current into a current outer loop in a closed-loop control system to obtain a first speed; determining a second speed from the first speed and the preset target speed; inputting the second speed into a speed inner loop in the closed-loop control system to obtain a speed control signal for controlling the speed of the motor; and controlling the speed of the motor based on the speed control signal.

[0005] In a second aspect, an embodiment of the present disclosure provides an aircraft, comprising a controller and a motor, wherein the motor is a sensorless brushless DC motor for driving the aircraft to move; the controller is configured to control the motor using the method for controlling the motor in the above embodiment.

[0006] In a third aspect, an embodiment of the present disclosure provides a non-transitory computer storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for controlling a motor in the above embodiment is implemented.

[0007] The method for controlling a motor in an embodiment of the present disclosure, when the instantaneous power of the motor is greater than the target power, uses a current outer loop to determine a first speed based on the effective value of the instantaneous current and the effective value of the target current, and determines a second speed from the first speed and the target speed, and then uses a speed inner loop to determine a speed control signal based on the second speed, so as to control the speed of the motor so that the current in the motor approaches the effective value of the target current, thereby achieving control of the motor power. The power control of the motor can be achieved while ensuring a stable motor speed, which helps to improve the stability and reliability of the operation of the motor and the carrier.

[0008] Other features and advantages of the present disclosure will be described in the following description, and in part will become more apparent from the description, or understood by practicing the present disclosure. Other advantages of the present disclosure can be realized and obtained by the solutions described in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The accompanying drawings are used to provide an understanding of the technical solution of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solution of the present disclosure and do not constitute a limitation to the technical solution of the present disclosure.

[0010] Figure 1 A flow chart of an embodiment of a method for controlling a motor disclosed herein; Figure 2 A schematic diagram of a flow chart of determining an effective value of an instantaneous current in one embodiment of a method for controlling a motor disclosed herein; Figure 3 Schematic diagram of the structure of a closed-loop control system in one embodiment of the method for controlling a motor disclosed herein. DETAILED DESCRIPTION

[0011] To make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other in any manner.

[0012] The embodiments of the present disclosure are not necessarily limited to the dimensions shown in the drawings, and the shapes and sizes of the components in the drawings do not reflect the true proportions. In addition, the drawings schematically illustrate ideal examples, and the embodiments of the present disclosure are not limited to the shapes or values shown in the drawings.

[0013] In the present disclosure, ordinal numbers such as “first” and “second” are provided to avoid confusion among constituent elements and do not indicate any order, quantity or importance.

[0014] In this disclosure, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be interpreted broadly. For example, they can refer to fixed, removable, or integral connections; mechanical or electrical connections; direct connections, indirect connections through intermediaries, or internal communication between two components. Those skilled in the art will understand the specific meanings of these terms in this disclosure based on the specific circumstances.

[0015] In order to improve the stability of the speed control of the motor under the power limiting state, the embodiment of the present disclosure provides a method for controlling the motor, such as Figure 1 As shown, the method may include the following steps.

[0016] Step 110: Obtain the effective value of the instantaneous current and the instantaneous voltage of the DC bus of the motor.

[0017] In this embodiment, the motor may be a sensorless brushless DC motor (BLDC). When the six-step commutation technology is used to control the motor, current flows in the DC bus only when the upper bridge arm of the motor is turned on. At this time, the DC bus can be sampled to obtain instantaneous current and instantaneous voltage.

[0018] The value of the instantaneous current obtained by sampling is fluctuating, and its waveform can be, for example, a T-wave, a sine wave, etc. By performing an approximate calculation on the instantaneous current, the average value of the instantaneous current in a specific time period can be obtained as the effective value of the instantaneous current.

[0019] In some optional implementations of this embodiment, step 110 can obtain the effective value of the instantaneous current in the following manner: sampling the negative bus of the DC bus at a preset time to obtain the instantaneous current and instantaneous voltage, the preset time being the moment when the upper bridge arm of the motor is opened and located in the middle position; determining the effective value of the instantaneous current.

[0020] In related technologies, the instantaneous current in the DC bus is typically collected when the upper bridge arm is just turned on. However, this instantaneous current often fluctuates significantly, resulting in low accuracy in the collected instantaneous current value. When the upper bridge arm of the motor is in the middle position, the instantaneous current in the DC bus is relatively stable and has a smaller fluctuation amplitude, resulting in higher accuracy in the instantaneous current collected at this moment.

[0021] In this embodiment, the instantaneous current of the negative bus of the DC bus is collected when the upper bridge arm of the motor is open and in the middle position, which can improve the collection accuracy of the instantaneous current. The effective value of the instantaneous current is then calculated based on this, which can improve the accuracy of the effective value of the instantaneous current and help improve the control accuracy of the motor.

[0022] Step 120: Determine the effective value of the target current based on the instantaneous voltage and the preset target power.

[0023] In this embodiment, the target power represents an input power threshold value pre-set for the motor, and the purpose is to control the rotation speed of the motor so that the instantaneous power of the motor does not exceed the target power.

[0024] As an example, the effective value of the target current may be a ratio of the target power to the instantaneous voltage.

[0025] Step 130 : When the instantaneous power of the motor is greater than the target power, the effective value of the instantaneous current and the effective value of the target current are input into the current outer loop of the closed-loop control system to obtain a first speed.

[0026] In this embodiment, when the instantaneous power of the motor is greater than the target power, the motor enters a power-limited state. The current outer loop can output a control variable for controlling the motor speed, i.e., the first speed, through proportional and integral operations based on the difference between the effective value of the instantaneous current and the effective value of the target current.

[0027] As an example, whether the instantaneous power is greater than the target power can be determined by comparing the effective value of the instantaneous current with the effective value of the target current. If the effective value of the instantaneous current is greater than the effective value of the target current, it means that the instantaneous power of the motor is greater than the target power.

[0028] Step 140: Determine a second speed from the first speed and a preset target speed.

[0029] In this embodiment, the target speed represents a preset motor speed, and the second speed represents a control variable used to control the motor speed at the current moment.

[0030] In this embodiment, when the motor is in a line power state (ie, the instantaneous power in step 130 is greater than the target power), the smaller one between the first speed and the target speed may be used as the second speed.

[0031] In some optional implementations of this embodiment, the process may further include: Step 131 : when the motor meets a preset condition, using the target speed as the second speed.

[0032] The preset condition includes that the maximum value of the instantaneous current is not greater than the effective value of the target current.

[0033] In this embodiment, the maximum instantaneous current value represents the maximum value of the instantaneous current within a specific time period (e.g., a sampling period). The maximum instantaneous current value is no greater than the effective value of the target current, ensuring that the instantaneous power of the motor does not exceed the target power. In this case, the motor is in an unlimited power state, and the target speed can be used directly as the second speed to increase the motor speed.

[0034] Step 150: Input the second speed into the speed inner loop of the closed-loop control system to obtain a speed control signal for controlling the speed of the motor.

[0035] In this embodiment, the speed inner loop can output a speed control signal that can act on the motor through proportional operation, integral operation, etc. according to the input second speed, for example, a PWM (pulse width modulation) wave.

[0036] Step 160: Control the speed of the motor based on the speed control signal.

[0037] As an example, a speed control signal may be input into a driver of a motor to control the speed of the motor.

[0038] The method for controlling a motor in an embodiment of the present disclosure, when the instantaneous power of the motor is greater than the target power, uses a current outer loop to determine a first speed based on the effective value of the instantaneous current and the effective value of the target current, and determines a second speed from the first speed and the target speed, and then uses a speed inner loop to determine a speed control signal based on the second speed, so as to control the speed of the motor so that the current in the motor approaches the effective value of the target current, thereby achieving control of the motor power. The power control of the motor can be achieved while ensuring a stable motor speed, which helps to improve the stability and reliability of the operation of the motor and the carrier.

[0039] Figure 2 A flow chart showing the method for controlling a motor according to some embodiments of the present disclosure for determining the effective value of the instantaneous current is shown. Figure 2 As shown, the process may include the following steps.

[0040] Step 210: Approximate the waveform of the instantaneous current to a rectangular wave, and calculate a first effective value.

[0041] As an example, the waveform of the instantaneous current can be approximated as a rectangular wave. In this case, the collected instantaneous current is the height of the rectangular wave, the PWM value is the width of the rectangle, and the first effective value of the instantaneous current is determined according to the duty cycle of the rectangular wave.

[0042] Step 220: Input the first effective value into a first-order low-pass filter to obtain a second effective value after removing high-frequency noise.

[0043] In this embodiment, the effective value of the instantaneous current can be the effective value within a PWM cycle. In order to avoid the adverse effect of the irregular waveform of the instantaneous current appearing at the six-part commutation moment on the control accuracy, a first-order low-pass filter can be used to remove the high-frequency noise in the first effective value to obtain the second effective value.

[0044] Step 230: Input the second effective value into a sliding average filter to obtain a smoothed third effective value.

[0045] Step 240 : Based on a predetermined weighting coefficient, perform weighted calculation on the third effective value according to the following formula (1) to obtain the effective value of the instantaneous current.

[0046] (1) Where, represents the weighting coefficient, and ; z represents the effective value of the instantaneous current, x represents the second effective value, and y represents the third effective value.

[0047] In this embodiment, the first effective value of the instantaneous current is subjected to noise reduction processing to obtain the second effective value, and the third effective value is obtained by smoothing processing. Then, the effective value of the instantaneous current is determined based on the second effective value, the third effective value and the weighting coefficient. This not only reduces the interference of noise on the effective value of the instantaneous current, but also enables the effective value of the instantaneous current to more accurately characterize the distribution characteristics of the current data at the current moment, thereby improving the accuracy of the effective value of the instantaneous current.

[0048] In some optional implementations of this embodiment, the process may further include the following steps.

[0049] Step 250: Determine the difference between the second effective value and the third effective value as the first component.

[0050] Step 260: Determine the difference between the effective value of the instantaneous current and the third effective value as the second component.

[0051] Step 270: Adjust the weighting coefficient based on the first component and the second component.

[0052] In this embodiment, the difference between the second effective value output by the first-order low-pass filter and the third effective value output by the sliding average filter can be used as the first component, which can be used to characterize the distribution characteristics of the current data at the current moment; the difference between the effective value of the instantaneous current and the third effective value can be used as the second component to characterize the gap between the final calculation result and the stable data, and then the weighting coefficient is adjusted based on the first component and the second component, thereby realizing dynamic adjustment of the weighting coefficient based on the collected data, so that the weighting coefficient can more accurately reflect the characteristics of the current in the motor, which helps to improve the accuracy of the effective value of the instantaneous current at the next moment, thereby improving the control accuracy of the motor.

[0053] In an optional example of this embodiment, the above step 270 may determine the weighting coefficient based on the following equations (2), (3), and (4).

[0054] (2) (3) (4) Where, represents the first component, represents the second component; 、 c Represents a constant.

[0055] In this example, the first component and the second component can represent the different stages of the motor. The value of the first component is determined according to the interval of the difference between the second effective value and the third effective value; the value of the second component is determined according to the interval of the difference between the third effective value and the effective value of the instantaneous current; and the sum of the first component and the second component is used as the weighting coefficient. In this way, the weighting coefficient corresponding to the motor in different stages is also different. The effective value of the instantaneous current obtained can reflect the different stages of the motor, and the speed control signal obtained can better match the stage of the motor, which helps to further improve the control accuracy of the motor.

[0056] In an optional example of this embodiment, after the above step 270, the process may further include the following steps.

[0057] Step 280: Determine the state of the motor according to the preset parameters of the motor.

[0058] The preset parameters include at least one of the following: instantaneous power and actual speed.

[0059] Step 290: Adjust the value of the weighting coefficient according to the state of the motor.

[0060] Typically, the motor power limit control process consists of three phases: the non-power-limited state, the initial power-limited state, and the power-limited state adjustment phase. The motor has different states and characteristics in each phase, and accordingly, the control strategy requirements vary. For example, when the motor is in the non-power-limited state, the control strategy requires a high degree of real-time instantaneous current; when the motor is in the initial power-limited state, the control strategy requires a high degree of instantaneous current stability; and when the motor is in the power-limited state adjustment phase, the control strategy requires both stability and real-time instantaneous current.

[0061] For example, when the instantaneous power of the motor is greater than the target power, the motor is in a non-power-limited state and a non-power-limited state phase. During this phase, the motor needs to be controlled to enter a power-limited state. The weighting coefficient can be set to 1 to improve the real-time performance of the effective value of the instantaneous current. When the speed control signal takes effect, the motor enters the initial stage of the power-limited state. At this time, the weighting coefficient can be adjusted to a first preset interval to improve the stability of the effective value of the instantaneous current. For example, the first preset interval can be (0.6, 1). The larger the value of the weighting coefficient, the faster the motor speed response. When the actual speed of the motor is greater than the target speed and the difference between the two is greater than a preset threshold (for example, 1000 rpm), the motor is in a power-limited state and a power-limited adjustment phase. At this time, the weighting coefficient can be adjusted to a second preset interval to achieve a relatively balanced real-time performance and stability of the effective value of the instantaneous current of the motor. For example, the second preset interval can be [0, 0.6]. Here, the first preset interval and the second preset interval can be determined based on the parameters of the motor during the commissioning phase.

[0062] In this example, the state of the motor can be determined based on the preset parameters of the motor, and then the weighting coefficient can be adjusted according to the state of the motor. The speed control signal thus obtained is more closely matched with the state of the motor, thereby improving the control effect of the motor.

[0063] Figure 3 FIG. 1 shows a schematic structural diagram of a closed-loop control system in an embodiment of a method for controlling a motor disclosed herein. Figure 3 As shown, the closed-loop control system may include a speed inner loop 310 and a current outer loop 320. The speed inner loop 310 adopts a position PI controller to improve the steady-state accuracy of the speed control signal.

[0064] The current outer loop 310 includes a hysteresis controller and an incremental PI controller. Step 130 can obtain the first speed by: determining the difference between the effective value of the target current and the effective value of the instantaneous current, inputting the difference into the hysteresis controller, filtering out current fluctuations in the difference using a preset hysteresis interval, and obtaining a first difference; determining the difference between the first difference and the effective value of the instantaneous current, and obtaining a second difference; and inputting the second difference into the incremental PI controller to obtain the first speed.

[0065] In this embodiment, the hysteresis controller in the current outer loop 310 can effectively eliminate the normal current fluctuations caused by the hardware structure when the motor is running smoothly, so as to avoid interfering with the incremental PI controller; the incremental PI controller has the characteristics of fast dynamic response, strong anti-disturbance ability and anti-integral saturation, which helps to improve the accuracy of the first speed.

[0066] like Figure 3As shown, in some embodiments, the closed-loop control system may further include a speed command source selector 330 .

[0067] In this embodiment, the speed command source selector 330 includes an output end and two input ends, wherein the output end is connected to the input end of the speed inner loop 310 to input the second speed into the speed inner loop 320; one input end is connected to the output end of the current outer loop 310 to receive the first speed; and the other input end is used to receive the target speed.

[0068] With the help of the speed instruction source selector 330, the above step 140 can determine the second speed from the first speed and the preset target speed in the following manner: the first speed and the target speed are input into the speed instruction source selector, and when the first speed is less than the target speed, the first speed is used as the second speed and output; when the first speed is greater than or equal to the target speed, the target speed is used as the second speed and output.

[0069] In this embodiment, when the instantaneous power of the motor is greater than the target power, the speed command source selector 330 may use the smaller one between the first speed and the target speed as the second speed and output it to the speed inner loop 310 .

[0070] In some optional implementations of this embodiment, the speed instruction source selector 330 is further configured to: when the motor meets a preset condition, obtain the target speed and output it as the second speed.

[0071] In this embodiment, when the motor meets the preset conditions, it indicates that the motor is in a power-limited state. At this time, the motor speed can be controlled to be close to the target speed. The speed instruction source selector 330 can directly input the target speed to the speed inner loop 310 without the current outer loop 320 calculating the first speed, which can improve the timeliness of motor control and reduce the amount of calculation.

[0072] An embodiment of the present disclosure also provides an aircraft, including a controller and a motor, wherein the motor is a sensorless brushless DC motor for driving the aircraft to move; the controller is configured to control the motor using the method for controlling the motor in any of the above embodiments.

[0073] An embodiment of the present disclosure further provides a non-transitory computer storage medium, which stores a computer program. When the computer program is executed by a processor, the method for controlling a motor in any of the above embodiments is implemented.

[0074] Those skilled in the art will appreciate that all or some of the steps, systems, and functional modules / units in the methods, systems, and devices disclosed above may be implemented as software, firmware, hardware, or any combination thereof. In hardware implementations, the division between functional modules / units described above does not necessarily correspond to the division between physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is well known to those skilled in the art, the term computer storage media encompasses both volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

Claims

1. A method for controlling a motor, characterized in that: include: Obtain the instantaneous effective value of the current and instantaneous voltage of the DC bus of the motor; Determining an effective value of a target current based on the instantaneous voltage and a preset target power; When the instantaneous power of the motor is greater than the target power, inputting the effective value of the instantaneous current and the effective value of the target current into a current outer loop in a closed-loop control system to obtain a first speed; determining a second speed from the first speed and a preset target speed; Inputting the second speed into a speed inner loop of the closed-loop control system to obtain a speed control signal for controlling the speed of the motor; Based on the speed control signal, the speed of the motor is controlled.

2. The method according to claim 1, characterized in that Also includes: When the motor meets a preset condition, the target speed is used as the second speed. The preset condition includes that the maximum value of the instantaneous current is not greater than the effective value of the target current.

3. The method according to claim 1, characterized in that Obtain the instantaneous RMS current and voltage of the motor's DC bus, including: Sampling the negative bus of the DC bus at a preset time to obtain the instantaneous current and the instantaneous voltage, wherein the preset time is the time when the upper bridge arm of the motor is opened and located at a middle position; The effective value of the instantaneous current is determined.

4. The method according to claim 3, characterized in that Determining the effective value of the instantaneous current includes: Approximating the waveform of the instantaneous current to a rectangular wave and calculating a first effective value; Inputting the first effective value into a first-order low-pass filter to obtain a second effective value after removing high-frequency noise; Inputting the second effective value into a sliding average filter to obtain a smoothed third effective value; Based on a predetermined weighting coefficient, the third effective value is weighted and calculated according to the following formula to obtain the effective value of the instantaneous current: Where, represents the weighting coefficient, and ; z represents the effective value of the instantaneous current, x represents the second effective value, and y represents the third effective value.

5. The method according to claim 4, characterized in that After obtaining the effective value of the instantaneous current, the method further includes: determining a difference between the second effective value and the third effective value as a first component; determining a difference between the effective value of the instantaneous current and the third effective value as a second component; The weighting coefficient is adjusted based on the first component and the second component.

6. The method according to claim 5, characterized in that Determining the weighting coefficient based on the first component and the second component includes: determining the weighting coefficient based on the following formula: Where, represents the first component, represents the second component; 、 c Represents a constant.

7. The method according to claim 5, characterized in that After determining the weighting coefficient, the method further includes: Determining the state of the motor according to preset parameters of the motor, wherein the preset parameters include at least one of the following: instantaneous power and actual speed; The value of the weighting coefficient is adjusted according to the state of the motor.

8. The method according to claim 1, characterized in that The current outer loop includes a hysteresis controller and an incremental PI controller; as well as, The effective value of the instantaneous current and the effective value of the target current are input into the current outer loop in the closed-loop control system to obtain a first speed, including: determining the difference between the effective value of the target current and the effective value of the instantaneous current, and inputting the difference into the hysteresis controller, using a preset hysteresis interval to filter out current fluctuations of the difference to obtain a first difference; determining the difference between the first difference and the effective value of the instantaneous current to obtain a second difference; and inputting the second difference into the incremental PI controller to obtain the first speed.

9. The method according to claim 2, characterized in that The closed-loop control system further includes a speed instruction source selector; as well as, Determining a second speed from the first speed and a preset target speed includes: inputting the first speed and the target speed into the speed instruction source selector; when the first speed is less than the target speed, outputting the first speed as the second speed; and when the first speed is greater than or equal to the target speed, outputting the target speed as the second speed.

10. The method according to claim 9, characterized in that The output end of the speed instruction source selector is connected to the input end of the speed inner loop, and the speed instruction source selector is configured to: when the motor meets the preset condition, obtain the target speed and output it as the second speed.

11. An aircraft comprising a controller and a motor, wherein: The motor is a sensorless brushless DC motor, used to drive the aircraft to move; the controller is configured to control the motor by using the method for controlling a motor according to any one of claims 1 to 10.

12. A non-transitory computer storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for controlling a motor according to any one of claims 1 to 10 is implemented.