Motor control method and related equipment
By introducing a speed ring control method in the vehicle motor control system, using a feedforward control module and a PI controller to perform motor control according to the real-time speed and torque difference, the problem of slow motor control response in the prior art is solved, and the effect of fast response and stable operation is achieved.
Patent Information
- Application Number
- CN202510152019.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-11
- Publication Date
- 2025-05-13
AI Technical Summary
The existing vehicle motor controller does not have a speed ring, so it cannot respond quickly to the motor control.
A motor control method is provided, by obtaining the real-time rotation speed of the motor every preset period, calculating the speed difference value. If the difference is greater than or equal to the threshold, the first-stage feedforward control module or the second-stage feedforward control module and the PI controller are triggered, and the torque is determined based on the input moment of inertia and acceleration, and the motor control is performed.
It realizes a rapid response to motor control, fully utilizes the capabilities of the motor control system, enables the motor output to quickly reach the expected state, and maintains the stable operation of the system in steady-state control.
Smart Images

Figure CN119995457A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a motor control method and related equipment. Background Art
[0002] At present, most vehicle motor controllers are torque loop controllers, which directly perform torque lookup to obtain the current value according to the torque command issued by the vehicle control unit (VCU), and control the motor based on the current value. However, the existing vehicle motor controllers are not equipped with a speed loop and cannot quickly respond to the control of the motor. Summary of the invention
[0003] In view of the above, it is necessary to provide a motor control method, a storage device and an electronic device to quickly respond to the control of the motor.
[0004] In a first aspect, the present application provides a motor control method for application in an electronic device, wherein the electronic device includes a motor, and the method includes: obtaining the real-time rotation speed of the motor every preset period; determining a first difference between the real-time rotation speed obtained in the current preset period and the real-time rotation speed obtained in the previous preset period of the current preset period; if the first difference is greater than or equal to a first threshold, triggering the start of a first-level feedforward control module, the first-level feedforward control module determining a first torque based on an input moment of inertia and an input acceleration; and controlling the motor based on the first torque.
[0005] In some embodiments of the present application, controlling the motor according to the first torque includes: determining a first current according to the first torque; determining a first target current according to the first current, the motor current, and the motor rotor angle, and converting the first target current into a first voltage; converting the first voltage to obtain a first control voltage, and controlling the motor according to the first control voltage.
[0006] In some embodiments of the present application, determining the first torque according to the input rotational inertia and the input acceleration includes: according to the formula Determine the first torque, where J is the input moment of inertia, a is the input acceleration, is the first torque.
[0007] In some embodiments of the present application, the method further includes: detecting the current of the motor by a current sensor to obtain the motor current; and detecting the rotor angle of the motor by a rotary transformer to obtain the motor rotor angle.
[0008] In some embodiments of the present application, the method also includes: determining a second difference between the real-time speed of the motor and the actual speed of the motor; if the second difference is less than a second threshold, triggering the start of a secondary feedforward control module and a proportional integral PI controller, wherein the secondary feedforward control module determines a second torque based on the real-time speed of the motor, and the PI controller determines a third torque based on the second difference; determining the sum of the second torque and the third torque to obtain a torque sum; and controlling the motor based on the torque sum.
[0009] In some embodiments of the present application, controlling the motor according to the torque and value includes: determining a second current according to the torque and value; determining a second target current according to the second current, the motor current, and the motor rotor angle, and converting the second target current into a second voltage; performing voltage conversion on the second voltage to obtain a second control voltage, and controlling the motor according to the second control voltage.
[0010] In some embodiments of the present application, determining the second torque according to the real-time speed of the motor includes: searching a torque-speed relationship table according to the real-time speed of the motor, and determining a torque corresponding to the real-time speed of the motor as the second torque.
[0011] In some embodiments of the present application, determining the third torque according to the second difference includes: according to the formula Determine the third torque, where is the proportionality coefficient, is the integration coefficient, is the difference between the real-time speed of the motor obtained in the current preset period and the actual speed of the motor corresponding to the current preset period, The difference between the real-time rotation speed of the motor obtained in the preset period before the current preset period and the actual rotation speed of the motor corresponding to the preset period before the current preset period.
[0012] In a second aspect, the present application provides an electronic device, comprising a motor, a memory and a processor: the memory is used to store program instructions; the processor is used to read and execute the program instructions stored in the memory, and when the program instructions are executed by the processor, the electronic device executes the above-mentioned motor control method.
[0013] In a third aspect, the present application provides a computer storage medium storing program instructions, which, when executed on an electronic device, enables the electronic device to execute the above-mentioned motor control method.
[0014] In the embodiment of the present application, when the first difference between the real-time speed obtained in the current preset cycle and the real-time speed obtained in the previous preset cycle of the current preset cycle is greater than or equal to the first threshold value, the first voltage can be determined according to the first torque, the motor current, and the motor rotor angle, and the first voltage can be converted into a first control voltage, and the motor can be controlled according to the first control voltage, so that the ability of the motor control system can be fully utilized, so that the output of the motor of the motor control system can quickly reach the expected state, and thus the control of the motor can respond quickly. When the second difference between the real-time speed of the motor and the actual speed of the motor is less than the second threshold value, the control parameters of the steady-state control (such as the second torque and the third torque) are output through the secondary feedforward control module and the PI controller, and the motor is controlled according to the second torque and the third torque, so that the motor control system can operate stably. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is an application environment diagram of the motor control method provided in an embodiment of the present application.
[0016] Figure 2 A flow chart of a motor control method provided in an embodiment of the present application.
[0017] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0018] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0019] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. The following embodiments and features in the embodiments may be combined with each other without conflict.
[0020] At present, most vehicle motor controllers are torque loop controllers, which directly perform torque lookup to obtain the current value according to the torque command issued by the vehicle control unit (VCU), and control the motor based on the current value. However, the existing vehicle motor controllers are not equipped with a speed loop and cannot quickly respond to the control of the motor.
[0021] In order to solve the above technical problems, an embodiment of the present application provides a motor control method, which will be described below in combination with an application scenario and a flow chart.
[0022] refer to Figure 1 , which is an application environment diagram of the motor control method provided in the embodiment of the present application. The motor control method is applied in a motor control system 100, such as a motor control system of a vehicle. Figure 1 As shown, the motor control system 100 includes a speed setting module 101, a first speed difference module 102, a first judgment module 103, a first setting module 104, a second judgment module 105, a first feedforward control module 106, a second speed difference module 107, a second feedforward control module 108, a proportional integral (PI) controller 109, a current loop controller 110, an inverter module 111, a motor 112, a current sensor 113, a rotary transformer 114, a feedback speed module 115, a third judgment module 116, a second setting module 117 and a calculation module 118. In some embodiments of the present application, the modules in the motor control system 100 may be software modules or hardware modules.
[0023] The speed setting module 101 is connected to the first speed difference module 102, the second speed difference module 107 and the secondary feedforward control module 108 respectively. The speed setting module 101 is used to obtain the real-time speed of the motor 112, and transmit the real-time speed to the first speed difference module 102, the second speed difference module 107 and the secondary feedforward control module 108. In some embodiments of the present application, the speed setting module 101 obtains the real-time speed of the motor 112 once every preset period. Specifically, the speed setting module 101 obtains the real-time speed of the motor 112 once every preset period according to the torque command issued by the vehicle control unit. For example, the speed setting module 101 obtains the real-time speed of the motor 112 once every 0.1ms according to the torque command issued by the vehicle control unit.
[0024] The first speed difference module 102 is connected to the first judgment module 103. The first speed difference module 102 is used to calculate the first difference between the real-time speed obtained in the current preset period and the real-time speed obtained in the previous preset period. The first judgment module 103 is connected to the first setting module 104. The first judgment module 103 determines whether the first difference is greater than the first threshold. If the first difference is greater than the first threshold, the first comparison result that the first difference is greater than the first threshold is notified to the first setting module 104. The first setting module 104 sets the feedforward flag to the first preset value according to the first comparison result, for example, the first preset value is set to 1. If the first difference is less than or equal to the first threshold, no response is given.
[0025] The first setting module 104 is connected to the second judgment module 105. The second judgment module 105 is used to determine whether the feedforward flag is a first preset value. If the feedforward flag is the first preset value, the first feedforward control module 106 is triggered to start. The first feedforward control module 106 is connected to the current loop controller 110, and the first feedforward control module 106 determines the first torque according to the input moment of inertia and the input acceleration, determines the first current according to the first torque, and transmits the first current to the current loop controller 110. The input moment of inertia is the input moment of inertia of the vehicle power system, and the input acceleration is the input acceleration of the vehicle power system.
[0026] The current loop controller 110 is connected to the inverter module 111, the current sensor 113 and the rotary transformer 114 respectively. The current sensor 113 is used to sense the motor current of the motor 112 and send the motor current to the current loop controller 110. The rotary transformer 114 is used to obtain the motor rotor angle of the motor 112 and send the motor rotor angle to the current loop controller 110. The current loop controller 110 is used to determine the first target current according to the first current, the motor current and the motor rotor angle, convert the first target current into a first voltage, and output the first voltage to the inverter module 111.
[0027] The inverter module 111 is connected to the motor 112. The inverter module 111 is used to convert the first voltage into a first control voltage, and control the motor 112 according to the first control voltage. For example, the inverter module 111 controls the speed of the motor 112 according to the first control voltage. In some embodiments of the present application, the first voltage is a DC voltage, and the first control voltage is an AC voltage. It should be noted that since the first-level feedforward control module 106 can give full play to the capabilities of the motor control system 100, the output of the motor of the motor control system 100 can quickly reach the expected state, so the control of the motor can respond quickly.
[0028] In some embodiments of the present application, the rotary transformer 114 is connected to the feedback speed module 115. The rotary transformer 114 is used to obtain the speed of the motor 112 and transmit the speed of the motor 112 to the feedback speed module 115. The feedback speed module 115 is used to filter the speed of the motor 112 to obtain the actual speed of the motor 112.
[0029] The second speed difference module 107 is connected to the third judgment module 116. The second speed difference module 107 is used to calculate the second difference between the real-time speed of the motor 112 and the actual speed of the motor 112. The third judgment module 116 is used to determine whether the second difference is less than the second threshold value. If the second difference is less than the second threshold value, the second comparison result that the second difference is less than the second threshold value is sent to the second setting module 117; if the second difference is greater than or equal to the second threshold value, no response is given. The second setting module 117 sets the feedforward flag to the second preset value according to the second comparison result, for example, the feedforward flag is set to 0. The second setting module 117 is connected to the second judgment module 105. Since the feedforward flag has been set to the second preset value at this time, the second judgment module 105 determines that the feedforward flag is not the first preset value, then turns off the output of the first-level feedforward control module 106, and triggers the start of the second-level feedforward control module 108 and the PI controller 109. The second-level feedforward control module 108 is connected to the calculation module 118. The secondary feedforward control module 108 is used to determine the second torque according to the real-time rotation speed of the motor 112 , and transmit the second torque to the calculation module 118 .
[0030] The PI controller 109 is connected to the calculation module 118 . The PI controller 109 is used to determine a third torque according to the second difference, and transmit the third torque to the calculation module 118 .
[0031] The calculation module 118 is connected to the current loop controller 110. The calculation module 118 is used to calculate the sum of the second torque and the third torque to obtain the torque sum, calculate the second current according to the torque sum, and transmit the second current to the current loop controller 110. The current loop controller 110 is used to determine the second target current according to the second current, the motor current, and the motor rotor angle, convert the second target current into a second voltage, and output the second voltage to the inverter module 111. The inverter module 111 is used to convert the second voltage into a second control voltage, and control the motor 112 according to the second control voltage. For example, the inverter module 111 controls the speed of the motor 112 according to the second control voltage. It should be noted that since the secondary feedforward control module 108 and the PI controller 109 can output the control parameters of the steady-state control (such as the second torque and the third torque), the motor control system 100 can operate stably, especially the PI controller 109 can dynamically adjust the load disturbance of the steady-state error according to the second error.
[0032] Combine as follows Figure 1 The motor control method of the embodiment of the present application is described in detail. Figure 2 FIG. 1 is a flow chart of a motor control method provided in an embodiment of the present application. The method is applied to electronic devices such as vehicles. The electronic device includes Figure 1 The motor control system 100 shown in FIG. is described below by taking a vehicle as an electronic device as an example. According to different requirements, Figure 2 The order of the steps in the flowchart shown can be adjusted according to actual detection requirements, and some steps can be omitted.
[0033] Step S201, obtaining the real-time rotation speed of the motor every preset period.
[0034] In some embodiments of the present application, the vehicle obtains the real-time speed of the motor 112 once every preset period. In some embodiments of the present application, the vehicle obtains the real-time speed of the motor 112 once every preset period according to the torque command issued by the vehicle control unit. For example, the vehicle obtains the real-time speed of the motor 112 once every 0.1 ms according to the torque command issued by the vehicle control unit.
[0035] Step S202: determining a first difference between the real-time rotation speed obtained in the current preset period and the real-time rotation speed obtained in the previous preset period.
[0036] In some embodiments of the present application, the vehicle calculates a first difference between the real-time speed obtained in the current preset period and the real-time speed obtained in the previous preset period, and the first difference is the absolute value of the difference between the real-time speed obtained in the current preset period and the real-time speed obtained in the previous preset period.
[0037] Step S203, determining whether the first difference is greater than a first threshold.
[0038] In some embodiments of the present application, if the first difference is greater than the first threshold, step S204 is executed, and if the first difference is less than or equal to the first threshold, no response is performed. In some embodiments of the present application, the first threshold can be set according to the speed of the motor, and the present application does not limit this.
[0039] Step S204 , triggering and starting a primary feedforward control module, wherein the primary feedforward control module determines a first torque according to an input moment of inertia and an input acceleration, and determines a first current according to the first torque.
[0040] In some embodiments of the present application, when the first difference is greater than the first threshold, the feedforward flag is set to a first preset value, for example, the first preset value is set to 1; it is determined whether the feedforward flag is the first preset value; if the feedforward flag is the first preset value, a first-level feedforward control module is triggered to start, and the first torque is determined by the first-level feedforward control module, and the first current is determined according to the first torque to control the motor.
[0041] In some embodiments of the present application, determining the first torque according to the input rotational inertia and the input acceleration includes: according to the formula Determine the first torque, where J is the input moment of inertia, a is the input acceleration, is the first torque. In some embodiments of the present application, the input moment of inertia is the input moment of inertia of the vehicle power system, and the input acceleration is the input acceleration of the vehicle power system. In some embodiments of the present application, the vehicle power system may be Figure 1 A motor control system 100 is shown.
[0042] In some embodiments of the present application, determining the first current based on the first torque includes: searching a torque-current relationship table based on the first torque, and determining the current corresponding to the first torque as the first current, wherein the torque-current relationship table includes the corresponding relationship between the torque and the current of the motor, and different torques correspond to different currents.
[0043] Step S205, determining a first target current according to the first current, the motor current, and the motor rotor angle, and converting the first target current into a first voltage.
[0044] In some embodiments of the present application, the vehicle can obtain the motor current by detecting the motor current through a current sensor. In some embodiments of the present application, the vehicle can obtain the motor rotor angle by detecting the motor rotor angle through a rotary transformer. The vehicle's current loop controller determines the first target current based on the first current, the motor current, and the motor rotor angle, and converts the first target current into a first voltage, wherein the first voltage is a DC voltage.
[0045] Step S206: convert the first voltage into a first control voltage, and control the motor according to the first control voltage.
[0046] In some embodiments of the present application, the first control voltage is an AC voltage. In some embodiments of the present application, the vehicle controls the speed of the motor according to the first control voltage.
[0047] In an embodiment of the present application, the vehicle determines a first voltage based on the first current, the motor current, and the motor rotor angle, converts the first voltage into a first control voltage, and controls the motor according to the first control voltage. This can fully utilize the capabilities of the motor control system so that the output of the motor of the motor control system can quickly reach an expected state, thereby enabling the control of the motor to respond quickly.
[0048] Step S207, acquiring the rotation speed of the motor, and filtering the rotation speed of the motor to obtain the actual rotation speed of the motor.
[0049] In some embodiments of the present application, the vehicle obtains the speed of the motor at every preset period and stores the obtained speed of the motor. In some embodiments of the present application, obtaining the speed of the motor and filtering the speed of the motor to obtain the actual speed of the motor includes: obtaining a preset number of speeds and calculating the average of the preset number of speeds to obtain the actual speed of the motor. In some embodiments of the present application, the vehicle obtains the speed of the motor according to the formula S0=(S N +S N-1 + S N-2 +…+S N-n-1 ) / n to calculate the actual speed of the motor, where n is a preset positive integer value, for example, n can be 10, S N Indicates the motor speed obtained in the current preset cycle, S N-1 Indicates the motor speed obtained in the previous preset cycle of the current preset cycle, S N-2 Indicates the motor speed obtained in the two preset cycles before the current preset cycle, S N-n-1 Indicates the motor speed obtained in the (n-1) preset cycles before the current preset cycle.
[0050] Step S208, determining a second difference between the real-time rotation speed of the motor and the actual rotation speed of the motor.
[0051] In some embodiments of the present application, the second difference is an absolute value of a difference between the real-time rotation speed of the motor and the actual rotation speed of the motor.
[0052] Step S209, determining whether the second difference is less than the second threshold value. If the second difference is less than the second threshold value, executing step S210, if the second difference is greater than or equal to the second threshold value, then no response is given.
[0053] Step S210, triggering and starting a secondary feedforward control module and a PI controller, wherein the secondary feedforward control module determines the second torque according to the real-time rotation speed of the motor, and the PI controller determines the third torque according to the second difference.
[0054] In some embodiments of the present application, if the second difference is less than the second threshold, the feedforward flag is set to the second preset value. Since the feedforward flag has been set to the second preset value at this time, when it is determined that the feedforward flag is not the first preset value, the vehicle turns off the output of the primary feedforward control module and triggers the start of the secondary feedforward control module and the PI controller.
[0055] In some embodiments of the present application, the secondary feedforward control module determines the second torque according to the real-time speed of the motor, including: searching the torque and speed relationship table according to the real-time speed of the motor, and determining the torque corresponding to the real-time speed of the motor as the second torque, wherein the torque and speed relationship table includes the corresponding relationship between the speed of the motor and the torque, and different motor speeds correspond to different torques.
[0056] In some embodiments of the present application, the PI controller determines the third torque according to the second difference, including: according to the formula A third torque is determined, where is the proportionality coefficient, is the integration coefficient, The difference between the real-time speed of the motor obtained in the current preset cycle and the actual speed of the motor corresponding to the current preset cycle, The difference between the real-time rotation speed of the motor obtained in the preset period before the current preset period and the actual rotation speed of the motor corresponding to the preset period before the current preset period.
[0057] Step S211, determining the sum of the second torque and the third torque to obtain the torque sum, and calculating the second current according to the torque sum.
[0058] In some embodiments of the present application, calculating the second current according to the torque sum value includes: searching a torque-current relationship table according to the torque sum value, and determining a current corresponding to the torque sum value as the second current.
[0059] Step S212, determining the second current according to the second current, the motor current, and the motor rotor angle, and converting the second current into a second voltage.
[0060] Step S213, performing voltage conversion on the second voltage to obtain a second control voltage, and controlling the motor according to the second control voltage.
[0061] In some embodiments of the present application, the vehicle controls the speed of the motor according to the second control voltage. In the embodiment of the present application, the control parameters of the steady-state control (such as the second torque and the third torque) are output through the secondary feedforward control module and the PI controller, and the motor is controlled according to the second torque and the third torque, so that the motor control system can operate stably.
[0062] refer to Figure 3, which is a schematic diagram of the structure of an electronic device 300 provided in an embodiment of the present application.
[0063] In one embodiment of the present application, the electronic device 300 includes, but is not limited to, a processor 301, a memory 302, a current loop controller 110, an inverter module 111, a current sensor 113, a rotary transformer 114, a motor 112, and a computer program stored in the memory 302 and executable on the processor 301, such as a motor control program.
[0064] In one embodiment of the present application, the electronic device 300 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored computer-readable instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASIC), programmable gate arrays (FPGA), digital signal processors (DSP), embedded devices, etc.
[0065] The electronic device 300 may be an electronic product such as a vehicle, an aircraft, or a drone.
[0066] The electronic device 300 may include a network device and / or a user device. The network device includes, but is not limited to, a single network electronic device, an electronic device group consisting of multiple network electronic devices, or a cloud based on cloud computing consisting of a large number of hosts or network electronic devices. This application does not limit the electronic device.
[0067] The network where the electronic device 300 is located includes, but is not limited to: the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.
[0068] Those skilled in the art will appreciate that the schematic diagram is merely an example of the electronic device 300 and does not constitute a limitation on the electronic device 300. The electronic device 300 may include more or fewer components than shown in the diagram, or a combination of certain components, or different components. For example, the electronic device 300 may also include input and output devices, network access devices, buses, etc.
[0069] The processor 301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 301 is the computing core and control center of the electronic device 300, and uses various interfaces and lines to connect various parts of the entire electronic device 3, and obtain the operating system of the electronic device 300 and various installed applications, program codes, etc.
[0070] The processor 301 obtains the operating system of the electronic device 300 and various installed applications. The processor 301 obtains the application to implement the steps in the above motor control method embodiment, for example Figure 2 .
[0071] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 302 and acquired by the processor 301 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the acquisition process of the computer program in the electronic device 300.
[0072] The memory 302 can be used to store the computer program and / or module. The processor 301 implements various functions of the electronic device 300 by running or acquiring the computer program and / or module stored in the memory 302 and calling the data stored in the memory 302. The memory 302 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the electronic device 300, etc. In addition, the memory 302 can include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0073] The memory 302 may be an external memory and / or an internal memory of the electronic device 300. Furthermore, the memory 302 may be a memory in a physical form, such as a memory stick, a TF card (Trans-flash Card), and the like.
[0074] If the module / unit integrated in the electronic device 300 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is obtained by the processor, the steps of each of the above-mentioned method embodiments can be implemented.
[0075] The computer program includes computer program code, which may be in source code form, object code form, an accessible file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0076] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0077] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0078] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0079] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present application is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present application. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0080] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in this application can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.
Claims
1. A motor control method, applied to an electronic device, wherein the electronic device includes a motor, characterized in that: The method comprises: Get the real-time speed of the motor at every preset period; Determine a first difference between the real-time rotation speed obtained in the current preset period and the real-time rotation speed obtained in the previous preset period before the current preset period; If the first difference is greater than or equal to a first threshold, triggering a first feedforward control module to start, the first feedforward control module determines a first torque according to an input moment of inertia and an input acceleration; The motor is controlled according to the first torque.
2. The motor control method according to claim 1, characterized in that: The controlling the motor according to the first torque comprises: determining a first current according to the first torque; Determine a first target current according to the first current, the motor current, and the motor rotor angle, and convert the first target current into a first voltage; The first voltage is converted into a first control voltage, and the motor is controlled according to the first control voltage.
3. The motor control method according to claim 1, characterized in that: Determining the first torque according to the input rotational inertia and the input acceleration includes: According to the formula Determine the first torque, where J is the input moment of inertia, a is the input acceleration, is the first torque.
4. The motor control method according to claim 1, characterized in that: The method further comprises: Detecting the current of the motor by a current sensor to obtain the motor current; The rotor angle of the motor is obtained by detecting the rotor angle of the motor through a rotary transformer.
5. The motor control method according to any one of claims 1 to 4, characterized in that: The method further comprises: Determining a second difference between the real-time speed of the motor and the actual speed of the motor; If the second difference is less than a second threshold, triggering and starting a secondary feedforward control module and a proportional integral PI controller, wherein the secondary feedforward control module determines a second torque according to the real-time speed of the motor, and the PI controller determines a third torque according to the second difference; Determine the sum of the second torque and the third torque to obtain a torque sum; The motor is controlled according to the torque and value.
6. The motor control method according to claim 5, characterized in that: The controlling the motor according to the torque and the value comprises: determining a second current based on the torque and value; Determine a second target current according to the second current, the motor current, and the motor rotor angle, and convert the second target current into a second voltage; The second voltage is converted into a second control voltage, and the motor is controlled according to the second control voltage.
7. The motor control method according to claim 5, characterized in that: Determining the second torque according to the real-time rotation speed of the motor includes: A torque-speed relationship table is searched according to the real-time speed of the motor to determine the torque corresponding to the real-time speed of the motor as the second torque.
8. The motor control method according to claim 5, characterized in that: Determining the third torque according to the second difference comprises: According to the formula Determine the third torque, where is the proportionality coefficient, is the integration coefficient, is the difference between the real-time speed of the motor obtained in the current preset period and the actual speed of the motor corresponding to the current preset period, The difference between the real-time rotation speed of the motor obtained in the preset period before the current preset period and the actual rotation speed of the motor corresponding to the preset period before the current preset period.
9. An electronic device, characterized in that: The electronic device comprises a motor, a memory and a processor: The memory is used to store program instructions; The processor is used to read and execute the program instructions stored in the memory. When the program instructions are executed by the processor, the electronic device executes the motor control method as described in any one of claims 1 to 8.
10. A computer storage medium, characterized in that: The computer storage medium stores program instructions, and when the program instructions are executed on an electronic device, the electronic device executes the motor control method according to any one of claims 1 to 8.
Citation Information
Cited By
Vehicle control method and device based on permanent magnet motor
CN121084184A