Motor control method, motor controller and readable storage medium
By determining the target torque and current according to the throttle opening and speed in a permanent magnet synchronous motor, and controlling the motor speed in real time, the problem of zero deviation adjustment in speed ring technology is solved, the problem of speed is avoided, and the stability of the motor is improved. Security.
Patent Information
- Application Number
- CN202311296368.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-08
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2043-10-08
AI Technical Summary
When the permanent magnet synchronous motor has a speed problem, the existing speed ring technology causes the motor speed to rise faster than the adjustment speed, resulting in the zero deviation adjustment being out of control, and thus causing equipment damage.
By monitoring the motor speed, when it is greater than or equal to the speed threshold, the target output torque is determined based on the current throttle opening and speed, and the intersection current and direct axis current are determined through the target output torque, so as to accurately control the motor speed and torque in real time and adjust The motor is zero, avoiding speed.
Real-time precise adjustment of the motor zero position is achieved, avoiding the problem of speed, and improving the stability and safety of motor control.
Smart Images

Figure CN117318565B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of motor technology, and in particular to a motor control method, a motor controller and a readable storage medium. Background Art
[0002] When the permanent magnet synchronous motor is incorrectly set at the factory or the motor is aged and has zero position deviation, the motor will run out of control. When the permanent magnet synchronous motor has a runaway problem, the motor speed far exceeds the design requirements, which leads to damage to the equipment structure, equipment components, and motor controller.
[0003] In the related art, the speed loop technology is used to reduce the impact caused by the runaway problem. That is, by monitoring the motor speed, and after the motor speed is greater than the preset threshold, the torque of the motor is dynamically adjusted to stabilize the motor speed at the default value. However, due to the response time of the PI (Proportion Integral) regulation, the speed loop control method will cause the motor speed to rise faster than the regulation speed after the zero-position deviation occurs, thereby causing the zero-position deviation to be out of control. Therefore, the existing method of using the speed loop technology to reduce the runaway problem has the defect of out-of-control zero-position deviation regulation.
[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present invention is to provide a motor control method, aiming to solve the problem of motor control.
[0006] To achieve the above object, the present invention provides a motor control method, which comprises the following steps:
[0007] If the current speed of the motor is greater than or equal to the speed threshold, determining the target output torque according to the current throttle opening and the current speed of the motor;
[0008] Determining a target output quadrature-axis current and a target output direct-axis current according to the target output torque;
[0009] The motor is controlled based on the target output quadrature-axis current and the target output direct-axis current.
[0010] Optionally, when the speed interval corresponding to the current speed is a zero-position inaccurate zone, if the current speed of the motor is greater than or equal to the flying speed threshold, the step of determining the target output torque according to the current throttle opening of the motor and the current speed includes:
[0011] Get the speed torque relationship table;
[0012] Based on the current speed, querying the speed-torque relationship table for a maximum throttle torque corresponding to the current speed;
[0013] The target output torque is determined according to a product of the throttle opening and the maximum throttle torque.
[0014] Optionally, the step of determining a target output quadrature-axis current and a target output direct-axis current according to the target output torque comprises:
[0015] Get the torque-current relationship table;
[0016] Based on the target output torque, querying the reference quadrature-axis current and the reference direct-axis current corresponding to the target output torque in the torque-current relationship table;
[0017] Based on the quadrature-axis trigonometric function relationship and the direct-axis trigonometric function relationship, the target output quadrature-axis current and the target output direct-axis current are determined according to the reference quadrature-axis current and the reference direct-axis current.
[0018] Optionally, the step of determining the target output quadrature-axis current and the target output direct-axis current based on the quadrature-axis trigonometric function relationship and the direct-axis trigonometric function relationship according to the reference quadrature-axis current and the reference direct-axis current comprises:
[0019] Determine that a sum of a mapping value of the target output direct-axis current on the direct axis and a mapping value of the target output quadrature-axis current on the direct axis is equal to the reference direct-axis current;
[0020] It is determined that a difference between a mapping value of the target output quadrature-axis current on the quadrature axis and a mapping value of the target output direct-axis current on the quadrature axis is equal to the reference quadrature-axis current.
[0021] Optionally, the calling of the speed-torque relationship table based on the current speed, before the step of obtaining the speed-torque relationship table, further includes:
[0022] Under the condition of maximum throttle opening, when the no-load speed is less than the performance speed threshold, the maximum throttle torque corresponding to the no-load speed is processed nonlinearly; and when the no-load speed is greater than or equal to the performance speed threshold, the maximum throttle torque corresponding to the no-load speed is processed linearly interpolated to generate the speed-torque relationship table corresponding to the maximum throttle opening.
[0023] Optionally, after the step of controlling the motor based on the target output quadrature-axis current and the target output direct-axis current, the step further includes:
[0024] Obtaining the number of pole pairs, flux linkage, direct-axis inductance, and quadrature-axis inductance of the motor;
[0025] Calling a torque-current function relationship, and updating the target output torque based on the target output quadrature-axis current, the target output direct-axis current, the number of pole pairs, the flux linkage, the direct-axis inductance value, and the quadrature-axis inductance value;
[0026] The target output quadrature-axis current and the target output direct-axis current are updated according to the updated target output torque until the speed interval corresponding to the current speed is a speed stable region.
[0027] Optionally, before the step of determining the target output torque according to the current throttle opening and the current speed of the motor if the current speed of the motor is greater than or equal to the speed threshold, the step further includes:
[0028] Acquire the current speed, and perform filtering on the current speed;
[0029] According to the numerical relationship between the filtered current speed and the preset speed threshold, a speed range corresponding to the current speed is determined.
[0030] Optionally, the step of determining the speed range corresponding to the current speed according to the numerical relationship between the filtered current speed and the preset speed threshold comprises:
[0031] When the current speed is less than the performance speed threshold, the corresponding speed interval is a performance release zone;
[0032] When the current speed is greater than or equal to the performance speed threshold and less than the speed threshold, the corresponding speed interval is a speed stability zone;
[0033] When the current speed is greater than or equal to the flying speed threshold, the corresponding speed interval is a zero position inaccurate zone.
[0034] In addition, to achieve the above-mentioned purpose, the present invention also provides a motor controller, which includes a memory, a processor, and a motor control program stored in the memory and executable on the processor, and the motor control program implements the steps of the motor control method described above when executed by the processor.
[0035] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a motor control program is stored, and when the motor control program is executed by a processor, the steps of the motor control method as described above are implemented.
[0036] An embodiment of the present invention provides a motor control method, a motor controller and a readable storage medium. After determining that the current speed is greater than or equal to a flying speed threshold, the target output torque is determined according to the current throttle opening and the current speed; then, the target output quadrature-axis current and the target output direct-axis current are determined and output according to the target output torque, so as to achieve real-time and precise control of the speed and torque of the motor, adjust the motor zero position, and thus avoid flying. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present invention, and together with the specification are used to explain the principles of the present invention. In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor.
[0038] Figure 1 A schematic diagram of the architecture of the hardware operating environment of the motor control device involved in the embodiment of the present invention;
[0039] Figure 2 is a flow chart of a first embodiment of a motor control method of the present invention;
[0040] Figure 3 is a flow chart of a second embodiment of a motor control method of the present invention;
[0041] Figure 4 It is a schematic diagram of a speed-torque relationship table of the motor control method of the present invention.
[0042] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0043] The motor control method of the present application determines the target output torque according to the current throttle opening and the current speed after determining that the current speed is greater than or equal to the flying speed threshold; then, the target output quadrature-axis current and the target output direct-axis current are determined and output according to the target output torque, so as to achieve real-time and precise control of the speed and torque of the motor, adjust the motor zero position, and thus avoid flying.
[0044] In order to better understand the above technical solution, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0045] As an implementation plan, Figure 1 It is a schematic diagram of the architecture of the hardware operating environment of the motor controller involved in the embodiment of the present invention.
[0046] like Figure 1 As shown, the motor controller may include: a processor 101, such as a central processing unit (CPU), a memory 102, and a communication bus 103. The memory 102 may be a high-speed random access memory (RAM) memory, or a stable non-volatile memory (NVM), such as a disk memory. The memory 102 may optionally be a storage device independent of the aforementioned processor 101. The communication bus 103 is used to realize the connection and communication between these components.
[0047] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the motor controller, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0048] like Figure 1 As shown, the memory 102 as a computer-readable storage medium may include an operating system, a data storage module, a network communication module, a user interface module, and a motor control program.
[0049] exist Figure 1 In the motor controller shown, the processor 101 and the memory 102 may be arranged in the motor controller, and the motor controller calls the motor control program stored in the memory 102 through the processor 101 and performs the following operations:
[0050] If the current speed of the motor is greater than or equal to the speed threshold, determining the target output torque according to the current throttle opening and the current speed of the motor;
[0051] Determining a target output quadrature-axis current and a target output direct-axis current according to the target output torque;
[0052] The motor is controlled based on the target output quadrature-axis current and the target output direct-axis current.
[0053] In one embodiment, the processor 101 may be used to call the motor control program stored in the memory 102 and perform the following operations:
[0054] Get the speed torque relationship table;
[0055] Based on the current speed, querying the speed-torque relationship table for a maximum throttle torque corresponding to the current speed;
[0056] The target output torque is determined according to a product of the throttle opening and the maximum throttle torque.
[0057] In one embodiment, the processor 101 may be used to call the motor control program stored in the memory 102 and perform the following operations:
[0058] Get the torque-current relationship table;
[0059] Based on the target output torque, querying the reference quadrature-axis current and the reference direct-axis current corresponding to the target output torque in the torque-current relationship table;
[0060] Based on the quadrature-axis trigonometric function relationship and the direct-axis trigonometric function relationship, the target output quadrature-axis current and the target output direct-axis current are determined according to the reference quadrature-axis current and the reference direct-axis current.
[0061] In one embodiment, the processor 101 may be used to call the motor control program stored in the memory 102 and perform the following operations:
[0062] Determine that a sum of a mapping value of the target output direct-axis current on the direct axis and a mapping value of the target output quadrature-axis current on the direct axis is equal to the reference direct-axis current;
[0063] It is determined that a difference between a mapping value of the target output quadrature-axis current on the quadrature axis and a mapping value of the target output direct-axis current on the quadrature axis is equal to the reference quadrature-axis current.
[0064] In one embodiment, the processor 101 may be used to call the motor control program stored in the memory 102 and perform the following operations:
[0065] Under the condition of maximum throttle opening, when the no-load speed is less than the performance speed threshold, the maximum throttle torque corresponding to the no-load speed is processed nonlinearly; and when the no-load speed is greater than or equal to the performance speed threshold, the maximum throttle torque corresponding to the no-load speed is processed linearly interpolated to generate the speed-torque relationship table corresponding to the maximum throttle opening.
[0066] In one embodiment, the processor 101 may be used to call the motor control program stored in the memory 102 and perform the following operations:
[0067] Obtaining the number of pole pairs, flux linkage, direct-axis inductance, and quadrature-axis inductance of the motor;
[0068] Calling a torque-current function relationship, and updating the target output torque based on the target output quadrature-axis current, the target output direct-axis current, the number of pole pairs, the flux linkage, the direct-axis inductance value, and the quadrature-axis inductance value;
[0069] The target output quadrature-axis current and the target output direct-axis current are updated according to the updated target output torque until the speed interval corresponding to the current speed is a speed stable region.
[0070] In one embodiment, the processor 101 may be used to call the motor control program stored in the memory 102 and perform the following operations:
[0071] Acquire the current speed, and perform filtering on the current speed;
[0072] According to the numerical relationship between the filtered current speed and the preset speed threshold, a speed range corresponding to the current speed is determined.
[0073] In one embodiment, the processor 101 may be used to call the motor control program stored in the memory 102 and perform the following operations:
[0074] When the current speed is less than the performance speed threshold, the corresponding speed interval is a performance release zone;
[0075] When the current speed is greater than or equal to the performance speed threshold and less than the speed threshold, the corresponding speed interval is a speed stability zone;
[0076] When the current speed is greater than or equal to the flying speed threshold, the corresponding speed interval is a zero position inaccurate zone.
[0077] Based on the hardware architecture of the motor controller described above, an embodiment of the motor control method of the present invention is proposed.
[0078] Reference Figure 2 In a first embodiment, the motor control method comprises the following steps:
[0079] Step S100: If the current speed of the motor is greater than or equal to the speed threshold, the target output torque is determined according to the current throttle opening of the motor and the current speed.
[0080] In this embodiment, when the permanent magnet synchronous motor is running, the current speed of the motor is obtained through the encoder; then, the obtained current speed is compared with the flying speed threshold to determine the numerical relationship between the current speed of the motor and the flying speed threshold. If the current speed of the motor is greater than or equal to the flying speed threshold, the target output torque is determined based on the current throttle opening and the current speed of the motor.
[0081] It should be noted that when the speed of the permanent magnet synchronous motor is greater than or equal to the flying speed threshold, the motor will have a zero position deviation, and the speed of the motor will continue to increase, resulting in flying and damage to the motor.
[0082] Optionally, after obtaining the current speed, the obtained current speed is filtered; then, based on the numerical relationship between the filtered current speed and the preset speed threshold, the speed interval corresponding to the current speed is determined. The preset speed threshold includes a performance speed threshold and a flying speed threshold; the speed interval includes a performance release area, a speed stability area, and a zero-position inaccurate area. If the current speed is less than the performance speed threshold, the corresponding speed interval is the performance release area; if the current speed is greater than or equal to the performance speed threshold and less than the flying speed threshold, the corresponding speed interval is the speed stability area; if the current speed is greater than or equal to the flying speed threshold, the corresponding speed interval is the zero-position inaccurate area. Among them, filtering the current speed can eliminate speed fluctuations or interference caused by measurement errors or sensor errors.
[0083] In this embodiment, when the current speed of the permanent magnet synchronous motor is greater than or equal to the speed threshold, it indicates that the permanent magnet synchronous motor has an inaccurate zero position problem, and the permanent magnet synchronous motor needs to be controlled to adjust its zero position. Optionally, the zero position of the permanent magnet synchronous motor is adjusted by adjusting the output torque of the permanent magnet synchronous motor.
[0084] Optionally, after determining that the current speed of the permanent magnet synchronous motor is greater than or equal to the flying speed threshold, a pre-stored speed-torque relationship table is called; then, based on the acquired current speed, a table lookup operation is performed in the speed-torque relationship table to determine the maximum throttle torque corresponding to the current speed; then, the target output torque is determined based on the throttle opening and the maximum throttle torque.
[0085] In this embodiment, the throttle opening refers to the throttle opening of the electric vehicle, which is expressed as a percentage. For example, 100% means the throttle is fully open, 0% means the throttle is closed, and the intermediate value represents different degrees of throttle opening. In electric vehicles, the throttle opening is used to control the current or voltage of the motor controller, thereby controlling the output torque and speed of the motor. The maximum throttle torque refers to the torque value corresponding to a specific speed when the throttle opening of the permanent magnet synchronous motor is 100%, that is, the maximum torque value that the permanent magnet synchronous motor can output at a specific speed. The target output torque refers to the torque value that the motor should output at the current throttle opening and the current speed.
[0086] Step S200: Determine a target output quadrature-axis current and a target output direct-axis current according to the target output torque.
[0087] In this embodiment, after the target output torque is obtained, the torque-current relationship table corresponding to the permanent magnet synchronous motor when the permanent magnet synchronous motor leaves the factory is called. Based on the torque-current relationship table, the reference quadrature-axis current and the reference direct-axis current can be determined by the obtained target output torque.
[0088] Then, based on the quadrature axis trigonometric function relationship and the direct axis trigonometric function relationship, the target output quadrature axis current and the target output direct axis current are determined according to the reference quadrature axis current and the reference direct axis current. Specifically, the quadrature axis trigonometric function relationship is that the difference between the mapping value of the output quadrature axis current on the quadrature axis and the mapping value of the output direct axis current on the quadrature axis is equal to the actual quadrature axis current, that is:
[0089] Iq_act=Iq_o*cosθ-Id_o*sinθ;
[0090] Among them, Iq_act is the actual quadrature-axis current, Iq_o*cosθ is the mapping value of the output quadrature-axis current on the quadrature axis, and Id_o*sinθ is the mapping value of the output direct-axis current on the quadrature axis.
[0091] The relationship between the direct axis trigonometric functions is that the sum of the mapping value of the output direct axis current on the direct axis and the mapping value of the output quadrature axis current on the direct axis is equal to the actual direct axis current, that is:
[0092] Id_act=Id_o*cosθ+Iq_o*sinθ;
[0093] Wherein, Id_act is the actual direct-axis current, Id_o*cosθ is the mapping value of the output direct-axis current on the direct axis, and Iq_o*sinθ is the mapping value of the output quadrature-axis current on the direct axis.
[0094] It should be noted that the sum of the square value of the actual direct-axis current and the square value of the actual quadrature-axis current is equal to the square value of the output current, which is equal to the sum of the square value of the output direct-axis current and the square value of the output quadrature-axis current, that is:
[0095] Iq_act^2+Id_act^2=I^2=Iq_o^2+Id_o^2;
[0096] Where I is the output current.
[0097] In this embodiment, after obtaining the reference quadrature-axis current and the reference direct-axis current, the reference quadrature-axis current is used as the actual quadrature-axis current, and the reference direct-axis current is used as the actual direct-axis current; then, the output quadrature-axis current calculated by the direct-axis trigonometric function relationship and the quadrature-axis trigonometric function relationship is the target output quadrature-axis current, and the output direct-axis current obtained is the target output direct-axis current. That is, the sum of the mapping value of the target output quadrature-axis current on the direct axis and the mapping value of the target output quadrature-axis current on the direct axis is equal to the reference direct-axis current; the difference between the mapping value of the target output quadrature-axis current on the quadrature axis and the mapping value of the target output quadrature-axis current on the quadrature axis is equal to the reference quadrature-axis current.
[0098] Step S300: Controlling the motor based on the target output quadrature-axis current and the target output direct-axis current.
[0099] In this embodiment, the torque and speed of the permanent magnet synchronous motor are controlled according to the obtained target output quadrature-axis current and target output direct-axis current to adjust the zero position of the motor, thereby preventing runaway.
[0100] Exemplarily, assuming that the current speed of the permanent magnet synchronous motor is equal to the flying speed threshold, the period corresponding to the current speed is determined to be the zero-position inaccurate zone; then, based on the current speed, a table lookup operation is performed in the speed-torque relationship table to determine that the maximum throttle torque is zero. Then, based on the product of the throttle opening and the maximum throttle torque, the target output torque is determined to be zero. Then, based on the target output torque, a table lookup operation is performed in the torque-current relationship table to determine that the reference quadrature-axis current corresponding to the target output torque is -1A, and the reference direct-axis current is 0A; then, based on the quadrature-axis trigonometric function relationship and the direct-axis trigonometric function relationship, the target output quadrature-axis current is obtained to be And the target output direct axis current is Then, by outputting the target output quadrature-axis current and the target output direct-axis current to the permanent magnet synchronous motor, the torque and speed of the permanent magnet synchronous motor are controlled to adjust the zero position of the motor, thereby preventing runaway.
[0101] In the technical solution provided in this embodiment, after determining that the current speed is greater than or equal to the flying speed threshold, the target output torque is determined by looking up a table according to the current throttle opening and the current speed; then, the target output quadrature-axis current and the target output direct-axis current are determined and output according to the target output torque, so as to achieve real-time and accurate control of the speed and torque of the motor, adjust the motor zero position, and thus avoid flying. Compared with the traditional method of using speed loop technology to reduce the flying problem, the torque and speed of the motor can be adjusted in time, thereby avoiding the situation where the zero deviation adjustment is out of control due to the motor speed rising speed being greater than the adjustment speed after the zero deviation occurs.
[0102] Reference Figure 3 Based on the above embodiment, in a second embodiment, after the step of controlling the motor based on the target output quadrature-axis current and the target output direct-axis current, the step further includes:
[0103] Step S400: obtaining the number of pole pairs, flux linkage, direct-axis inductance, and quadrature-axis inductance of the motor;
[0104] Step S500: calling a torque-current function relationship, and updating the target output torque based on the target output quadrature-axis current, the target output direct-axis current, the number of pole pairs, the flux linkage, the direct-axis inductance value, and the quadrature-axis inductance value;
[0105] Step S600: updating the target output quadrature-axis current and the target output direct-axis current according to the updated target output torque, until the speed interval corresponding to the current speed is a speed stable zone.
[0106] In this embodiment, after the motor is controlled by the target output quadrature axis current and the target output direct axis current, if the current speed of the motor does not drop to less than the flying speed threshold, the target output torque is updated through the torque current function relationship and the target output quadrature axis current and the target output direct axis current; then, according to the updated target output torque, step S200 is executed to update the target output direct axis current and the target output quadrature axis current, and then step S300 is executed. After executing step S300, steps S400 to S600 are executed until the current speed of the motor drops to less than the flying speed threshold.
[0107] It should be noted that the torque current function relationship is:
[0108] Te=3 / 2*P[ψf+(Ld-Lq)*id_o]*iq_o;
[0109] Where Te is the target output torque, P is the number of pole pairs, ψf is the flux linkage, Ld is the direct-axis inductance, and Lq is the quadrature-axis inductance.
[0110] Optionally, after the motor is controlled by the target output quadrature-axis current and the target output direct-axis current, if the current speed of the motor has not dropped to less than the flying speed threshold, steps S100 to S300 are repeated until the current speed of the motor drops to less than the flying speed threshold.
[0111] In the technical solution provided in this embodiment, after the motor has been controlled by the target output quadrature-axis current and the target output direct-axis current, if the current speed of the motor has not dropped to a level less than the flying speed threshold, the target output torque is updated; then, based on the updated target output torque, the target output quadrature-axis current and the target output direct-axis current are updated and output, thereby further achieving real-time and precise control of the speed and torque of the motor, and timely adjusting the zero position of the motor to avoid flying.
[0112] Reference Figure 4 , Figure 4 It is a schematic diagram of a speed-torque relationship table of the motor control method of the present invention.
[0113] Based on the above embodiment, in one embodiment, before the step of calling the speed-torque relationship table, the step further includes: acquiring and saving the speed-torque relationship table.
[0114] Specifically, under the condition of maximum throttle opening, when the no-load speed is less than the performance speed threshold, the maximum throttle torque corresponding to the no-load speed is processed nonlinearly to more accurately determine the maximum throttle torque corresponding to the current speed; and when the no-load speed is greater than or equal to the performance speed threshold, the maximum throttle torque corresponding to the no-load speed is processed linearly interpolated to make the speed and torque linearly related, thereby generating the speed-torque relationship table corresponding to the maximum throttle opening.
[0115] Furthermore, under the condition that the throttle opening is zero, when the no-load speed is less than the performance speed threshold, the zero throttle torque corresponding to the no-load speed is processed nonlinearly to more accurately determine the maximum throttle torque corresponding to the current speed; and, when the no-load speed is greater than or equal to the performance speed threshold, the zero throttle torque corresponding to the no-load speed is processed linearly interpolated to make the speed and torque linearly related, thereby generating the speed-torque relationship table corresponding to the zero throttle opening.
[0116] Optionally, when generating the speed-torque relationship table, factors that affect the corresponding relationship between the speed and torque, such as the friction between the electric motorcycle chain and gears, need to be considered.
[0117] Furthermore, according to the motor speed, the speed torque relationship table is divided into speed intervals. Specifically, the speed interval corresponding to the motor speed being less than the performance speed threshold is the performance release zone; the speed interval corresponding to the motor speed being greater than or equal to the performance speed threshold and less than the speed threshold is the speed stability zone; the speed interval corresponding to the motor speed being greater than or equal to the speed threshold is the zero position inaccurate zone.
[0118] Depend on Figure 4It can be seen from the speed-torque relationship table that when the motor speed is in the zero-position inaccurate zone, the corresponding target output torque is a negative value, that is, the motor is controlled by outputting negative torque to adjust the zero position of the permanent magnet synchronous motor, thereby preventing runaway.
[0119] In addition, it can be understood by a person skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the motor controller to implement the process steps of the embodiment of the above method.
[0120] Therefore, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a motor control program, and when the motor control program is executed by a processor, the various steps of the motor control method described in the above embodiment are implemented.
[0121] The computer-readable storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which may store program codes.
[0122] It should be noted that since the storage medium provided in the embodiment of the present application is the storage medium used to implement the method of the embodiment of the present application, based on the method introduced in the embodiment of the present application, the person skilled in the art can understand the specific structure and deformation of the storage medium, so it is not repeated here. All storage media used in the method of the embodiment of the present application belong to the scope of protection of this application.
[0123] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0124] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0125] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0126] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0127] It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claim. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second and third etc. does not indicate any order. These words may be interpreted as names.
[0128] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0129] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A motor control method, characterized in that: The motor control method comprises: If the current speed of the motor is greater than or equal to the speed threshold, determining the target output torque according to the current throttle opening and the current speed of the motor; Determining a target output quadrature-axis current and a target output direct-axis current according to the target output torque; controlling the motor based on the target output quadrature-axis current and the target output direct-axis current; Obtaining the number of pole pairs, flux linkage, direct-axis inductance, and quadrature-axis inductance of the motor; Calling a torque-current function relationship, and updating the target output torque based on the target output quadrature-axis current, the target output direct-axis current, the number of pole pairs, the flux linkage, the direct-axis inductance value, and the quadrature-axis inductance value; The target output quadrature-axis current and the target output direct-axis current are updated according to the updated target output torque until the speed interval corresponding to the current speed is a speed stable region.
2. The motor control method according to claim 1, characterized in that: If the current speed of the motor is greater than or equal to the speed threshold, the step of determining the target output torque according to the current throttle opening and the current speed of the motor comprises: Get the speed torque relationship table; Based on the current speed, querying the speed-torque relationship table for a maximum throttle torque corresponding to the current speed; The target output torque is determined according to the throttle opening and the maximum throttle torque.
3. The motor control method according to claim 1, characterized in that: The step of determining the target output quadrature-axis current and the target output direct-axis current according to the target output torque comprises: Get the torque-current relationship table; Based on the target output torque, querying the reference quadrature-axis current and the reference direct-axis current corresponding to the target output torque in the torque-current relationship table; Based on the quadrature-axis trigonometric function relationship and the direct-axis trigonometric function relationship, the target output quadrature-axis current and the target output direct-axis current are determined according to the reference quadrature-axis current and the reference direct-axis current.
4. The motor control method according to claim 3, characterized in that: The step of determining the target output quadrature-axis current and the target output direct-axis current based on the quadrature-axis trigonometric function relationship and the direct-axis trigonometric function relationship according to the reference quadrature-axis current and the reference direct-axis current comprises: Determine that a sum of a mapping value of the target output direct-axis current on the direct axis and a mapping value of the target output quadrature-axis current on the direct axis is equal to the reference direct-axis current; It is determined that a difference between a mapping value of the target output quadrature-axis current on the quadrature axis and a mapping value of the target output direct-axis current on the quadrature axis is equal to the reference quadrature-axis current.
5. The motor control method according to claim 2, characterized in that: Before the step of obtaining the speed-torque relationship table, the method further includes: Under the condition of maximum throttle opening, when the no-load speed is less than the performance speed threshold, the maximum throttle torque corresponding to the no-load speed is processed nonlinearly; and when the no-load speed is greater than or equal to the performance speed threshold, the maximum throttle torque corresponding to the no-load speed is processed linearly interpolated to generate the speed-torque relationship table corresponding to the maximum throttle opening.
6. The motor control method according to claim 1, characterized in that: Before the step of determining the target output torque according to the current throttle opening and the current speed of the motor if the current speed of the motor is greater than or equal to the speed threshold, the method further includes: Acquire the current speed, and perform filtering on the current speed; According to the numerical relationship between the filtered current speed and the preset speed threshold, a speed range corresponding to the current speed is determined.
7. The motor control method according to claim 6, characterized in that: The step of determining the speed range corresponding to the current speed according to the numerical relationship between the filtered current speed and the preset speed threshold comprises: When the current speed is less than the performance speed threshold, the corresponding speed interval is a performance release zone; When the current speed is greater than or equal to the performance speed threshold and less than the speed threshold, the corresponding speed interval is a speed stability zone; When the current speed is greater than or equal to the flying speed threshold, the corresponding speed interval is a zero position inaccurate zone.
8. A motor controller, characterized in that: The motor controller comprises: a memory, a processor, and a motor control program stored in the memory and executable on the processor, wherein the motor control program is configured to implement the steps of the motor control method according to any one of claims 1 to 7.
9. A readable storage medium, characterized in that: The readable storage medium stores a motor control program, and when the motor control program is executed by a processor, the steps of the motor control method according to any one of claims 1 to 7 are implemented.
