Motor control method, motor control device, electronic equipment and storage medium

By acquiring the target and historical duty cycles of the motor, the output duty cycle of the motor is determined and adjusted, thus solving the problem of motor output error and achieving higher output accuracy.

CN121643582APending Publication Date: 2026-03-10NINGBO FOTILE KITCHEN WARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In existing technologies, the motor output duty cycle may shift due to component aging or other reasons, resulting in errors in the motor output.

Method used

By acquiring the target duty cycle and historical duty cycle of the motor, the actual duty cycle is determined, and the output duty cycle of the motor is adjusted when matching fails, so that it outputs based on the target duty cycle. This includes adjusting the working time and three-phase current under phase conditions to achieve precise duty cycle control.

Benefits of technology

It improves the accuracy of motor output and avoids duty cycle deviation caused by factors such as component aging or noise interference, thus ensuring output accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121643582A_ABST
    Figure CN121643582A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a motor control method, a motor control device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a target duty ratio of a motor and a historical duty ratio of the motor in at least one pulse wideband modulation (PWM) period, the actual duty ratio of the motor is determined based on the historical duty ratio of the motor in at least one PWM period, the target duty ratio and the actual duty ratio are matched to obtain a matching result, and if the matching result indicates that matching fails, the output duty ratio of the motor is adjusted to enable the motor to carry out duty ratio output based on the target duty ratio. In the embodiment of the invention, the target duty ratio of the motor is matched with the actual duty ratio, and the output duty ratio of the motor is adjusted when the matching of the target duty ratio and the actual duty ratio fails, so that the output duty ratio of the motor is prevented from generating offset, and the output precision of the motor is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of motor control technology, specifically to a motor control method, a motor control device, an electronic device, and a storage medium. Background Technology

[0002] Motor control refers to the control of a motor's starting, acceleration, operation, deceleration, and stopping functions. When using motors, different requirements are often placed on motor control depending on the type of motor and the application. In the field of motor control, pulse-wideband modulation (PWM) is a technique that modulates the bias of the base of a transistor or the gate of a MOSFET according to changes in the load, thereby changing the conduction time of the transistor or MOSFET and thus altering the output of a switching power supply. PWM technology can be used to control motors, enabling rapid start-up, fast response, and high torque output.

[0003] One common motor control method primarily controls the motor's output duty cycle by issuing an adjustment signal to regulate it. However, when using this method, the motor's output duty cycle may shift due to factors such as component aging, leading to errors in the motor's output. Summary of the Invention

[0004] To address the aforementioned technical problems, this application discloses a motor control method, a motor control device, an electronic device, and a storage medium, which can solve the technical problem in the prior art where the output duty cycle of the motor may shift due to component aging or other reasons when controlling the motor, resulting in errors in the motor output.

[0005] To achieve the aforementioned objectives, in a first aspect, this application discloses a motor control method, which includes the following steps:

[0006] Obtain the target duty cycle of the motor and the historical duty cycle of the motor under at least one pulse wideband modulation (PWM) cycle;

[0007] The actual duty cycle of the motor is determined based on the historical duty cycle of the motor during at least one PWM cycle;

[0008] Match the target duty cycle with the actual duty cycle to obtain the matching result;

[0009] If the matching result indicates a matching failure, adjust the motor's output duty cycle so that the motor outputs a duty cycle based on the target duty cycle.

[0010] In one possible embodiment, obtaining the target duty cycle of the motor and the historical duty cycle of the motor under at least one pulse broadband modulation (PWM) cycle includes:

[0011] Obtain the target duty cycle of the motor;

[0012] For each PWM cycle, the following steps are performed: obtain the operating time of the motor in at least one phase state; at least one phase state together constitutes each PWM cycle;

[0013] The historical duty cycle of the motor in each PWM cycle is determined based on the operating time of the motor in at least one phase state in each PWM cycle.

[0014] In one possible embodiment, the target duty cycle and the actual duty cycle are matched to obtain a matching result, including:

[0015] The target range of the motor's output duty cycle is determined based on the target duty cycle;

[0016] Match the target range with the actual duty cycle to obtain the matching result;

[0017] Among them, if the actual duty cycle is within the target range, it indicates that the target duty cycle and the actual duty cycle are successfully matched;

[0018] If the actual duty cycle is outside the target range, it indicates that the target duty cycle and the actual duty cycle have failed to match.

[0019] In one possible embodiment, if the matching result indicates a matching failure, the motor's output duty cycle is adjusted so that the motor outputs a duty cycle based on a target duty cycle, including:

[0020] If the matching result indicates a matching failure, the first preset strategy is executed to adjust the output duty cycle of the motor so that the motor outputs a duty cycle based on the target duty cycle; the first preset strategy includes adjusting the operating time of the motor in at least one phase state in each PWM cycle.

[0021] In one possible embodiment, if the matching result indicates a matching failure, after adjusting the motor's output duty cycle to make the motor output a duty cycle based on the target duty cycle, the method further includes:

[0022] Obtain the target input voltage of the three-phase bridge and the three-phase current of the motor;

[0023] The three-phase current is processed to obtain the actual input voltage of the motor.

[0024] Match the target input voltage with the actual input voltage; if the target input voltage and the actual input voltage fail to match, execute the second preset strategy to adjust the actual input voltage of the motor; the second preset strategy includes increasing or decreasing the three-phase current.

[0025] In one possible embodiment, data processing is performed on the three-phase currents to obtain the actual input voltage of the motor, including:

[0026] The duty cycle of the motor's output voltage is determined based on the three-phase current;

[0027] The actual input voltage of the motor is obtained by processing the duty cycle of the SVPWM output voltage using the inverse transformation module.

[0028] In one possible embodiment, determining the duty cycle of the motor's space vector pulse width modulation (SVPWM) output voltage based on the three-phase current includes:

[0029] Data processing of the three-phase currents yields the two-phase currents of the motor in the motion coordinate system.

[0030] The actual input voltage of the motor is obtained by processing the data of the two-phase current of the motor in the moving coordinate system to obtain the input voltage of the motor in the stationary coordinate system.

[0031] The input voltage of the motor in the stationary coordinate system is processed to obtain the duty cycle of the SVPWM output voltage of the motor.

[0032] In one possible embodiment, at least one PWM cycle constitutes the field-oriented control (FOC) cycle of the motor.

[0033] On the other hand, embodiments of this application provide a motor control device, which includes:

[0034] The information sampling module is used to acquire the target duty cycle of the motor and the historical duty cycle of the motor under at least one pulse broadband modulation (PWM) cycle;

[0035] The first data processing module is used to determine the actual duty cycle of the motor based on the historical duty cycle of the motor in at least one PWM cycle.

[0036] The second data processing module is used to match the target duty cycle with the actual duty cycle to obtain the matching result.

[0037] The execution module is used to adjust the motor's output duty cycle if the matching result indicates a matching failure, so that the motor outputs a duty cycle based on the target duty cycle.

[0038] In one possible embodiment, the information sampling module is used to obtain the target duty cycle of the motor;

[0039] For each PWM cycle, the following steps are performed: obtain the operating time of the motor in at least one phase state; at least one phase state together constitutes each PWM cycle;

[0040] The historical duty cycle of the motor in each PWM cycle is determined based on the operating time of the motor in at least one phase state in each PWM cycle.

[0041] In one possible embodiment, the second information processing module is used to determine the target range of the motor's output duty cycle based on the target duty cycle;

[0042] Match the target range with the actual duty cycle to obtain the matching result;

[0043] Among them, if the actual duty cycle is within the target range, it indicates that the target duty cycle and the actual duty cycle are successfully matched;

[0044] If the actual duty cycle is outside the target range, it indicates that the target duty cycle and the actual duty cycle have failed to match.

[0045] In one possible embodiment, the second information processing module is configured to execute a first preset strategy to adjust the output duty cycle of the motor if the matching result indicates a matching failure, so that the motor outputs a duty cycle based on a target duty cycle; the first preset strategy includes adjusting the operating time of the motor in at least one phase state in each PWM cycle.

[0046] In one possible embodiment, the execution module is further configured to acquire the target input voltage of the three-phase bridge of the motor and the three-phase current of the motor;

[0047] The three-phase current is processed to obtain the actual input voltage of the motor.

[0048] Match the target input voltage with the actual input voltage; if the target input voltage and the actual input voltage fail to match, execute the second preset strategy to adjust the actual input voltage of the motor; the second preset strategy includes increasing or decreasing the three-phase current.

[0049] In one possible embodiment, the execution module is used to process the three-phase current to obtain the two-phase current of the motor in the moving coordinate system and the stationary coordinate system.

[0050] Data processing is performed on the two-phase currents of the motor in the moving coordinate system and the stationary coordinate system to obtain the input voltage of the motor in the stationary coordinate system;

[0051] The input voltage of the motor in the stationary coordinate system is processed to obtain the duty cycle of the SVPWM output voltage of the motor.

[0052] In one possible embodiment, at least one PWM cycle constitutes the field-oriented control (FOC) cycle of the motor.

[0053] On the other hand, this application provides an electronic device, characterized in that the device includes a processor and a memory, and the storage medium stores at least one instruction, at least one program, code set or instruction set, wherein at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement any of the above motor control methods.

[0054] On the other hand, this application provides a computer-readable storage medium, characterized in that the electronic device includes a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, wherein at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement any of the above motor control methods.

[0055] The motor control method, motor control device, electronic device, and storage medium provided in this application have the following beneficial effects:

[0056] This application provides a motor control method, a motor control device, an electronic device, and a storage medium. The motor control method includes acquiring a target duty cycle of the motor and a historical duty cycle of the motor under at least one pulse broadband modulation (PWM) cycle; determining the actual duty cycle of the motor based on the historical duty cycle of the motor under at least one PWM cycle; matching the target duty cycle and the actual duty cycle to obtain a matching result; if the matching result indicates a matching failure, adjusting the output duty cycle of the motor so that the motor outputs a duty cycle based on the target duty cycle. In the embodiments of this application, by matching the target duty cycle of the motor with the actual duty cycle and adjusting the output duty cycle of the motor when the matching fails, the output duty cycle of the motor is prevented from shifting, thereby improving the output accuracy of the motor. Attached Figure Description

[0057] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0058] Figure 1 This is a schematic diagram of an application environment provided in an embodiment of this application;

[0059] Figure 2 This is a schematic flowchart of a motor control method provided in an embodiment of this application;

[0060] Figure 3This is a schematic diagram of a process for obtaining the target duty cycle of a motor and the historical duty cycle of the motor in at least one PWM cycle, provided by an embodiment of this application.

[0061] Figure 4 This is a schematic diagram of a process for obtaining a matching result between a target duty cycle and an actual duty cycle, provided in an embodiment of this application.

[0062] Figure 5 This is a schematic diagram of a process for adjusting the output duty cycle of a motor, provided in an embodiment of this application.

[0063] Figure 6 This is a schematic diagram of voltage compensation provided in an embodiment of this application;

[0064] Figure 7 This is a schematic diagram illustrating how to obtain the actual input voltage of a motor, as provided in an embodiment of this application.

[0065] Figure 8 This is a schematic diagram illustrating how to determine the duty cycle of the SVPWM output voltage of a motor, as provided in an embodiment of this application.

[0066] Figure 9 This is a schematic diagram of an application circuit for a motor control method provided in an embodiment of this application;

[0067] Figure 10 This is a schematic diagram of a motor control device provided in an embodiment of this application. Detailed Implementation

[0068] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0069] It should be noted that the terms "comprising" and "having" and any variations thereof in the specification, claims and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such processes, methods, products or devices.

[0070] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating an application environment provided in an embodiment of this application. For example... Figure 1 As shown in the diagram, the schematic diagram may include a motor 101 and a motor control device 102.

[0071] In one possible embodiment, motor 101 can be any type of motor capable of operating based on the motor control method described herein. Optionally, motor 101 can be a motor operating based on pulse wideband modulation (PWM) technology. Specifically, motor 101 can be a motor operating based on space vector pulse width modulation (SVPWM) technology.

[0072] Optionally, the motor control device 102 can be a control device including various electronic components such as circuit boards, controllers, and sensors. The motor control device 102 can control the motor based on the motor control method described herein, causing the motor to operate according to the motor control method described herein. Optionally, the motor control device 102 may include a sampling module capable of sampling the level or signal output by the motor 101.

[0073] Optionally, the motor 101 can be electrically connected to the motor control device 102, or the motor 101 and the motor control device 102 can be separate units. Optionally, the motor control device 102 can also be housed as a control unit inside the structure of the motor 101. The motor 101 and the motor control device 102 can communicate via wired means such as wires or optical fibers, or wirelessly via electromagnetic waves, Bluetooth, or Wi-Fi (wireless network communication technology).

[0074] Optionally, the schematic diagram may also include a terminal device 103. The terminal device 103 may include electronic devices for sending control commands and receiving feedback signals, specifically mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers.

[0075] Similarly, the terminal device 103 can communicate with the motor 101 and the motor control device 102 via wires, optical fibers, etc., or via electromagnetic waves, Bluetooth, and Wi-Fi (wireless network communication technology).

[0076] The following describes a specific embodiment of a motor control method according to this application. Please refer to [link / reference]. Figure 2 , Figure 2This is a flowchart illustrating a motor control method provided in an embodiment of this application. This specification provides the operational steps of the method as described in the embodiments or flowcharts, but based on conventional or non-inventive labor, more or fewer operational steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only possible execution order. In actual system or server product execution, the methods shown in the embodiments or drawings can be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Specifically, as shown... Figure 2 As shown, the method may include the following steps:

[0077] S1: Obtain the target duty cycle of the motor and the historical duty cycle of the motor under at least one pulse broadband modulation (PWM) cycle.

[0078] In one possible embodiment, the motor control device 102 can acquire the target duty cycle of the motor 101 and the historical duty cycle of the motor 101 during at least one PWM cycle. Optionally, the target duty cycle of the motor 101 can be a specific value detected by the motor control device 102. The motor control device 102 can acquire the target duty cycle of the motor 101 during operation based on the current environment, received control commands, preset operation commands, or preset specific values. The target duty cycle can be a fixed value or a variable value.

[0079] Optionally, the motor control device 102 can sample the signal or level output by the motor 101 during at least one PWM cycle to obtain the historical duty cycle of the motor 101.

[0080] Optionally, the number of cycles in at least one PWM cycle can be a fixed value. The number of cycles in at least one PWM cycle can be an empirical value determined by operator observation.

[0081] Optionally, at least one PWM cycle may together constitute the field-oriented control (FOC) cycle of motor 101.

[0082] S2: Determine the actual duty cycle of the motor based on the historical duty cycle of the motor in at least one PWM cycle.

[0083] Optionally, the motor control device 102 can determine the actual duty cycle of the motor 101 based on the historical duty cycle of the motor 101 in at least one PWM cycle. The motor control device 102 can determine the actual duty cycle of the motor 101 by acquiring the operating time of each phase state of the motor 101 in each PWM cycle.

[0084] S3: Match the target duty cycle with the actual duty cycle to obtain the matching result.

[0085] Optionally, the motor control device 102 can match the target duty cycle with the actual duty cycle and obtain the matching result. The matching result can include successful matching and failed matching. When the target duty cycle and the actual duty cycle are successfully matched, it indicates that the motor 101 is operating based on the target duty cycle, and there is no need to adjust the output duty cycle of the motor 101.

[0086] S4: If the matching result indicates a matching failure, adjust the motor's output duty cycle so that the motor outputs a duty cycle based on the target duty cycle.

[0087] Optionally, the motor control device 102 can adjust the output duty cycle of the motor 101 when the matching result indicates a matching failure, so that the motor 101 outputs a duty cycle based on the target duty cycle, thereby keeping the output duty cycle of the motor 101 within a predetermined range.

[0088] In this embodiment, the target duty cycle of the motor can be matched with the actual duty cycle, and the output duty cycle of the motor can be adjusted when the target duty cycle fails to match the actual duty cycle. This ensures that the output duty cycle of the motor is always maintained within a preset range, which avoids the output duty cycle of the motor from being deviated due to factors such as component aging or noise interference, and improves the output accuracy of the motor.

[0089] The motor control device 102 can be a digital control system. Since the preset analog quantities such as current or voltage undergo analog-to-digital conversion during processing by the motor control device 102, and the duty cycle output of the motor control device 102 is a digital quantity, there is a quantization error due to the analog-to-digital conversion when the motor 101 outputs. The motor control method in this application samples at least one PWM cycle. The number of PWM cycles can be hundreds, thousands, or even more. The more cycles the motor control device 102 samples, the less error value caused by interference factors such as analog-to-digital conversion will be in each PWM cycle.

[0090] Please see Figure 3 , Figure 3 This is a schematic diagram illustrating a process for obtaining the target duty cycle of a motor and the historical duty cycle of the motor during at least one PWM cycle, provided in an embodiment of this application. Figure 3 As shown, when executing S1: obtaining the target duty cycle of the motor and the historical duty cycle of the motor under at least one pulse broadband modulation (PWM) cycle, the following steps can be specifically performed:

[0091] S101: Obtain the target duty cycle of the motor.

[0092] In one possible embodiment, the motor control device 102 can obtain the target duty cycle of the motor 101. Optionally, the motor control device 102 can obtain the target duty cycle of the motor 101 during operation based on the current environment, received control commands, preset operation commands, or preset specific values.

[0093] S102: For each PWM cycle, execute: obtain the operating time of the motor in at least one phase state, where at least one phase state together constitutes each PWM cycle.

[0094] Optionally, for each PWM cycle in at least one PWM cycle, the motor control device 102 may perform the following: acquire the operating time of the motor 101 in at least one phase state.

[0095] The motor 101 may include a three-phase bridge. For each PWM cycle in at least one PWM cycle, the motor control device 102 can acquire the operating time of the motor 101 in four phase states. The four phase states include: the three-phase bridge has all three lower bridges open; the three-phase motor 101 has two lower bridges open and one upper bridge open; the three-phase motor 101 has two upper bridges open and one lower bridge open; and the three-phase motor 101 has all three upper bridges open. These four phase states can collectively constitute each PWM cycle.

[0096] S103: Determine the historical duty cycle of the motor in each PWM cycle based on the operating time of the motor in at least one phase state in each PWM cycle.

[0097] Optionally, the motor control device 102 can determine the historical duty cycle of the motor 101 in each PWM cycle based on the operating time of the motor 101 in at least one phase state in each PWM cycle. Optionally, when calculating the actual duty cycle of the motor 101 subsequently, the actual duty cycle of the motor 101 can be a specific value of the historical duty cycle of the motor 101 in each PWM cycle, or the actual duty cycle of the motor 101 can be the average value of the historical duty cycle of the motor 101 in each PWM cycle.

[0098] In this embodiment, the historical duty cycle of motor 101 can be obtained by measuring the operating time of motor 101 in at least one phase state during each PWM cycle. This allows the actual duty cycle of motor 101 to be obtained subsequently based on the historical duty cycle. Furthermore, the more cycles the motor control device 102 collects, the less error value caused by interference factors such as analog-to-digital conversion in each PWM cycle will be, thereby further improving the accuracy of motor 101.

[0099] Please see Figure 4 , Figure 4This is a schematic diagram illustrating a process for obtaining a matching result between a target duty cycle and an actual duty cycle, provided in an embodiment of this application. For example... Figure 4 As shown, when executing S3: matching the target duty cycle with the actual duty cycle to obtain the matching result, the following steps can be specifically performed:

[0100] S301: Determine the target range of the motor's output duty cycle based on the target duty cycle.

[0101] In one possible embodiment, the motor control device 102 can determine the target range of the output duty cycle of the motor 101 based on the target duty cycle. Optionally, the target range of the output duty cycle of the motor 101 can be the target duty cycle itself, that is, when the target duty cycle is a specific value, the target range of the output duty cycle of the motor 101 is the duty cycle itself.

[0102] Optionally, the target range of the output duty cycle of motor 101 can be a specific range obtained based on the target duty cycle. That is, when the target duty cycle is a specific value, the target range of the output duty cycle of motor 101 is the specific range obtained based on the target duty cycle. The smaller the range of this specific range, the higher the accuracy of the output duty cycle of motor 101 after being controlled by the motor control method.

[0103] S302: Match the target range with the actual duty cycle to obtain the matching result. If the actual duty cycle is within the target range, it indicates a successful match. If the actual duty cycle is outside the target range, it indicates a failed match.

[0104] Optionally, the motor control device 102 can match the target range with the actual duty cycle to obtain a matching result. If the actual duty cycle is within the target range, it indicates a successful match between the target and actual duty cycles, and subsequent adjustments to the output duty cycle of the motor 101 are not required. If the actual duty cycle is outside the target range, it indicates a mismatch between the target and actual duty cycles, and subsequent adjustments to the output duty cycle of the motor 101 are necessary.

[0105] In this embodiment, the motor control device 102 can determine whether it is necessary to perform subsequent operations to adjust the output duty cycle of the motor 101 based on the matching result between the actual duty cycle and the target duty cycle, thereby realizing the adjustment of the output duty cycle of the motor 101 when necessary.

[0106] Please see Figure 5 , Figure 5 This is a schematic flowchart illustrating an embodiment of this application for adjusting the output duty cycle of a motor. Figure 5As shown, when executing S4: If the matching result indicates a matching failure, adjust the motor's output duty cycle so that the motor outputs a duty cycle based on the target duty cycle, the following steps can be specifically executed:

[0107] S401: If the matching result indicates that the matching has failed, execute the first preset strategy to adjust the output duty cycle of the motor so that the motor outputs the duty cycle based on the target duty cycle. The first preset strategy includes adjusting the working time of the motor in at least one phase state in each PWM cycle.

[0108] In one possible embodiment, if the matching result between the target duty cycle and the actual duty cycle indicates a matching failure, the motor control device 102 can execute a first preset strategy to adjust the output duty cycle of the motor 101 so that the motor 101 outputs a duty cycle based on the target duty cycle. The motor control device 102 can adjust the operating time of the motor 101 in at least one phase state in each PWM cycle to adjust the output duty cycle of the motor 101 so that the motor 101 outputs a duty cycle based on the target duty cycle.

[0109] In this embodiment, the motor control device 102 can adjust the working time of the motor in at least one phase state in each PWM cycle when the target duty cycle and the actual duty cycle fail to match, so that the motor outputs the duty cycle based on the target duty cycle, thereby improving the output accuracy of the duty cycle of the motor 101.

[0110] Please see Figure 6 , Figure 6 This is a schematic diagram illustrating voltage compensation according to an embodiment of this application. Figure 6 As shown, after executing S4: If the matching result indicates a matching failure, adjust the motor's output duty cycle so that the motor outputs a duty cycle based on the target duty cycle, the following steps can be specifically executed:

[0111] S5: Obtain the target input voltage of the three-phase bridge for the motor and the three-phase current of the motor.

[0112] In one possible embodiment, the motor 101 includes a three-phase bridge, and the motor control device 102 can acquire the target input voltage of the three-phase bridge and the three-phase current of the motor 101 through a sampling device. Optionally, the three-phase current of the motor 101 can be i a i b and i c .

[0113] S6: Process the three-phase current data to obtain the actual input voltage of the motor.

[0114] Optionally, the motor control device 102 can control the three-phase current i of the motor 101. a ib and i c Data processing is performed to obtain the actual input voltage of motor 101. and

[0115] S7: Match the target input voltage with the actual input voltage. If the target input voltage and the actual input voltage fail to match, execute the second preset strategy to adjust the actual input voltage of the motor. The second preset strategy includes increasing or decreasing the three-phase current.

[0116] Optionally, the motor control device 102 can determine the target range of the actual input voltage of the motor 101 based on the target input voltage. Optionally, the target range of the actual input voltage of the motor 101 can be the target input voltage itself, that is, when the target input voltage is a specific value, the target range of the actual input voltage of the motor 101 is the specific value of the target input voltage itself.

[0117] Optionally, the target range of the actual input voltage of the motor 101 can also be a specific range obtained based on the target input voltage. That is, when the target input voltage is a specific value, the target range of the actual input voltage of the motor 101 is the specific range obtained based on the target input voltage. The smaller the range of this specific range, the higher the accuracy of the actual input voltage of the motor 101 after being controlled by the motor control method.

[0118] Optionally, the motor control device 102 can match the target range with the actual input voltage to obtain a matching result. If the actual input voltage is within the target range, it indicates a successful match between the target and actual input voltages, and subsequent adjustments to the input voltage of the motor 101 are not required. If the actual input voltage is outside the target range, it indicates a mismatch between the target and actual input voltages, and subsequent adjustments to the input voltage of the motor 101 are necessary.

[0119] If the target input voltage and the actual input voltage fail to match, a second preset strategy can be executed to adjust the actual input voltage of the motor 101. The second preset strategy includes increasing or decreasing the three-phase current. When the three-phase current is adjusted, the input voltage of the motor 101 also changes accordingly. The second preset strategy may also include increasing or decreasing the corresponding compensation voltage at the voltage input terminal of the motor 101, thereby directly realizing the adjustment of the input voltage of the motor 101.

[0120] In this embodiment, the motor control device 102 can determine whether the input voltage of the motor 101 needs to be adjusted based on the matching result of the target input voltage and the actual input voltage, and execute a second preset strategy to adjust the input voltage of the motor 101 when adjustment is required.

[0121] In the use of some motors 101, the motor 101 needs to perform Park inverse transformation and Clark inverse transformation to output the SVPWM duty cycle. In this process, since the motor control device 102 mostly adopts a digital system, the result needs to be truncated when performing calculations in the digital system, that is, only a certain number of significant digits are retained. This results in a certain truncation error in the output duty cycle of SVPWM after digital processing. The motor control device 102 in this application can adjust the input voltage of the motor 101 by executing a second preset strategy, thereby achieving the final adjustment of the output duty cycle of SVPWM.

[0122] Please see Figure 7 , Figure 7 This is a schematic diagram illustrating how the actual input voltage of a motor is obtained, as provided in an embodiment of this application. Figure 7 As shown, when executing S6: processing the three-phase current data to obtain the actual input voltage of the motor, the following steps can be specifically performed:

[0123] S601: Determines the duty cycle of the output voltage of the motor's space vector pulse width modulation (SVPWM) based on the three-phase current.

[0124] In one possible embodiment, the motor control device 102 is able to determine the duty cycles d1 and d2 of the SVPWM output voltage of the motor 101 based on the three-phase current through a sampling module.

[0125] S602: Based on the inverse transformation module, the duty cycle of the SVPWM output voltage is processed to obtain the actual input voltage of the motor.

[0126] Optionally, the motor control device 102 may include an inverse converter module. The motor control device 102 can perform data processing on the duty cycle of the SVPWM output voltage based on the inverse converter module to obtain the actual input voltage of the motor 101. and

[0127] Therefore, the motor control device 102 can obtain the actual input voltage of the motor 101 by processing the duty cycle of the SVPWM output voltage through the inverse conversion module, thereby achieving the matching of the subsequent target input voltage with the actual input voltage.

[0128] Please see Figure 8 , Figure 8 This is a schematic diagram illustrating how to determine the duty cycle of the SVPWM output voltage of a motor, as provided in an embodiment of this application. Figure 8 As shown, when executing S601: Determining the duty cycle of the motor space vector pulse width modulation (SVPWM) output voltage based on the three-phase current, the following steps can be specifically performed:

[0129] S603: Processes the three-phase current data to obtain the two-phase current of the motor in the moving coordinate system and the stationary coordinate system.

[0130] In this embodiment, the motor control device 102 can perform Park transformation on the three-phase current to obtain the two-phase current i of the motor 101 in the motion coordinate system. d and i q Optionally, the motor control device 102 can also perform Clark transformation on the three-phase current to obtain the two-phase current i of the motor 101 in the stationary coordinate system. α and i β .

[0131] S604: Processes the two-phase current of the motor in the moving coordinate system and the stationary coordinate system to obtain the input voltage of the motor in the stationary coordinate system.

[0132] Optionally, the motor control device 102 can be based on the two-phase current i of the motor 101 in the motion coordinate system. d i q The two-phase current i of motor 101 in the stationary coordinate system α and i β The actual input voltage of motor 101 is processed by PI control algorithm and Park inverse transform to obtain the input voltage V of motor 101 in stationary coordinate system. α and V β .

[0133] S605: Processes the input voltage of the motor in the stationary coordinate system to obtain the duty cycle of the SVPWM output voltage of the motor.

[0134] Optionally, the motor control device 102 can control the input voltage V of the motor 101 in the stationary coordinate system. α and V β Data processing is performed to obtain the duty cycles d1 and d2 of the SVPWM output voltage of motor 101.

[0135] Therefore, the motor control device 102 can process the three-phase current data to obtain the duty cycle of the input voltage of the motor 101 in the stationary coordinate system and the duty cycle of the output voltage of the SVPWM of the motor 101, and then determine the duty cycle d1 and d2 of the output voltage of the SVPWM of the motor 101, thereby realizing the subsequent process of matching the target input voltage with the actual input voltage.

[0136] In one possible embodiment, at least one PWM cycle constitutes a field-oriented control (FOC) cycle for the motor 101. Optionally, within the FOC control cycle consisting of at least one PWM cycle, the target duty cycle of the motor 101 may remain constant while the historical duty cycle of the motor 101 under at least one pulse broadband modulation (PWM) cycle is measured, thereby enabling the actual duty cycle of the motor 101 to be determined subsequently based on the historical duty cycle of the motor 101 under at least one PWM cycle.

[0137] Meanwhile, the motor 101 chip has a limited main frequency, with an output frequency typically in the tens of megahertz range, while the FOC frequency is in the thousands of hertz, much higher than the output frequency of the motor 101 chip. By making at least one PWM cycle the same as the FOC cycle of the motor 101, the number of cycles acquired by the motor control device 102 is increased, thereby reducing the error value caused by interference factors such as analog-to-digital conversion in each PWM cycle, and further improving the accuracy of the motor 101.

[0138] Please see Figure 9 , Figure 9 This is a schematic diagram of an application circuit for a motor control method provided in an embodiment of this application. For example... Figure 9 As shown, the motor control method controls the motor based on this application circuit. Specifically, when implementing one of the motor control methods in this application, the actual duty cycle of the motor and the motor compensation voltage can be calculated by referring to the following operations.

[0139] The following is a detailed calculation process for the actual duty cycle of a motor:

[0140] Let the FOC control cycle length be n PWM control cycles. Within the FOC control cycle, the target duty cycle of motor 101 remains constant. Within these n PWM control cycles, the down-bridge operation of phases A / B / C in the three-phase bridge is taken as 3 times. The time required for two vehicles to exit the bridge and one vehicle to enter the bridge at phases A / B / C is as follows: The time required for one exit bridge and two entrance bridges at phases A / B / C to proceed is... The time required for the bridge to open in phases A, B, and C is as follows:

[0141] in, Where a = 1, 2, ..., n.

[0142] Where a = 1, 2, ..., n. Where a = 1, 2, ..., n. Where a = 1, 2, ..., n, and satisfies... And it satisfies that the average duty cycle equals the simulated duty cycle, that is Therefore, the actual duty cycles d0, d1, d2, d7 of the motor can be obtained.

[0143] The following is a detailed calculation process for a type of compensation voltage for a motor:

[0144] Current sampling, sampling the three-phase current i of phases a / b / c a i b i c Based on formula (1), the three-phase currents are subjected to CLARK transformation to obtain the αβ axis current i. α and i β .

[0145]

[0146] Then, based on formula (2), the αβ axis current i α and i β Perform the PARK transformation to obtain the DQ-axis current i d and i q , where θ is the rotor angle.

[0147]

[0148] Then, based on formulas (3) and (4), the DQ axis current i d i q and target DQ axis current The DQ axis voltage V is calculated using the PI algorithm. d V q Among them, the target DQ axis current Input current to the target.

[0149]

[0150] Then, based on formula (5), the DQ axis voltage V d V q Performing the PARK inverse transform, we obtain the αβ axis voltage V. α and V β .

[0151]

[0152] Then, please refer to Table 1, which shows the calculation formulas for duty cycles d1 and d2 under different sectors. Based on Table 1, the αβ axis voltage V is obtained. α and V β Data processing is performed to obtain the duty cycle of each of the six sectors in the rotor's rotation.

[0153] Table 1: Formulas for calculating duty cycles d1 and d2 in different sectors

[0154]

[0155] Then, please refer to Table 2, which contains the calculation formulas for the actual input voltage in different sectors. Based on Table 2, the αβ axis voltage V is obtained. α and V β Data processing is performed to obtain the actual input voltage of each of the six sectors in the rotor rotation.

[0156] Table 2: Calculation formulas for actual input voltage in different sectors

[0157]

[0158] Then, calculate the compensation voltage V. d ′ and V q ′ The compensation voltage can be calculated using formulas (6) and (7), or formulas (8) and (9). Formulas (6) and (7) represent the compensation voltage V calculated through linear superposition. d ′ and V q ′ The calculation, formulas (8) and (9) characterize the compensation voltage V calculated by the PI algorithm. d ′ and V q ′ The calculation.

[0159]

[0160] On the other hand, embodiments of this application provide a motor control device 102, which includes an information sampling module 1001, a first data processing module 1002, a second data processing module 1003, and an execution module 1004.

[0161] In one possible embodiment, the information sampling module 1001 is used to acquire the target duty cycle of the motor 101 and the historical duty cycle of the motor 101 under at least one pulse broadband modulation (PWM) cycle. The first data processing module 1002 is used to determine the actual duty cycle of the motor 101 based on the historical duty cycle of the motor 101 under at least one PWM cycle. The second data processing module 1003 is used to match the target duty cycle and the actual duty cycle to obtain a matching result. The execution module 1004 is used to adjust the output duty cycle of the motor 101 if the matching result indicates a matching failure, so that the motor 101 outputs a duty cycle based on the target duty cycle.

[0162] In one possible embodiment, the information sampling module 1001 is used to obtain the target duty cycle of the motor 101, and for each PWM cycle, performs the following: obtaining the working time of the motor 101 in at least one phase state, wherein the at least one phase state together constitutes each PWM cycle, and determining the historical duty cycle of the motor 101 in each PWM cycle based on the working time of the motor 101 in at least one phase state in each PWM cycle.

[0163] In one possible embodiment, the second information processing module 1003 is used to determine the target range of the output duty cycle of the motor 101 based on the target duty cycle, match the target range with the actual duty cycle, and obtain a matching result. If the actual duty cycle is within the target range, it indicates that the target duty cycle and the actual duty cycle are successfully matched. If the actual duty cycle is outside the target range, it indicates that the target duty cycle and the actual duty cycle are not matched.

[0164] In one possible embodiment, the second information processing module 1003 is used to execute a first preset strategy to adjust the output duty cycle of the motor 101 if the matching result indicates that the matching has failed, so that the motor 101 outputs a duty cycle based on a target duty cycle. The first preset strategy includes adjusting the working time of the motor 101 in at least one phase state in each PWM cycle.

[0165] In one possible embodiment, the execution module 1004 is further configured to acquire the target input voltage of the three-phase bridge of the motor 101 and the three-phase current of the motor 101, perform data processing on the three-phase current to obtain the actual input voltage of the motor 101, match the target input voltage with the actual input voltage, and if the target input voltage and the actual input voltage fail to match, execute a second preset strategy to adjust the actual input voltage of the motor 101. The second preset strategy includes increasing or decreasing the three-phase current.

[0166] In one possible embodiment, the execution module 1004 is used to process the three-phase current to obtain the two-phase current of the motor 101 in the moving coordinate system and the stationary coordinate system, process the two-phase current of the motor 101 in the moving coordinate system and the stationary coordinate system to obtain the input voltage of the motor 101 in the stationary coordinate system, and process the input voltage of the motor 101 in the stationary coordinate system to obtain the duty cycle of the output voltage of the SVPWM of the motor 101.

[0167] In one possible embodiment, at least one PWM cycle in the motor control device 102 constitutes a field-oriented control (FOC) cycle of the motor 101 controller.

[0168] It should be noted that the apparatus and method embodiments in this device embodiment are based on the same application concept.

[0169] This application provides an electronic device including a processor and a memory. The memory stores at least one instruction, at least one program, code set, or instruction set. The at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the unit testing method in the application provided in the above method embodiments.

[0170] Memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. Memory can primarily include a program storage area and a data storage area. The program storage area can store the operating system, application programs required for the functions, etc.; the data storage area can store data created based on the use of the device, etc. Furthermore, memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory can also include a memory controller to provide the processor with access to the memory.

[0171] Embodiments of this application also provide a storage medium, which can be disposed in a server to store at least one instruction, at least one program, code set, or instruction set related to implementing a page processing method in the method embodiments. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the unit test method in the application provided in the above method embodiments.

[0172] Optionally, in this embodiment, the storage medium may be located at at least one of the multiple network servers in a computer network. Alternatively, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0173] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0174] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system and server embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0175] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0176] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method of controlling an electric machine, characterized by, The method comprises: obtaining a target duty cycle of a motor and a historical duty cycle of the motor in at least one pulse width modulation (PWM) period; determining an actual duty cycle of the motor based on the historical duty cycle of the motor in the at least one PWM period; matching the target duty cycle and the actual duty cycle to obtain a matching result; if the matching result indicates a matching failure, adjusting an output duty cycle of the motor to enable the motor to output the duty cycle based on the target duty cycle.

2. The motor control method according to claim 1, characterized by, The method of obtaining the target duty cycle of the motor and the historical duty cycle of the motor in at least one pulse width modulation (PWM) period comprises: obtaining the target duty cycle of the motor; for each PWM period, performing: obtaining an operating time of the motor in at least one phase state; the at least one phase state collectively constitutes the each PWM period; determining the historical duty cycle of the motor in the each PWM period based on the operating time of the motor in the at least one phase state in the each PWM period.

3. The motor control method according to claim 2, characterized by, The method of matching the target duty cycle and the actual duty cycle to obtain a matching result comprises: determining a target range of the output duty cycle of the motor based on the target duty cycle; matching the target range and the actual duty cycle to obtain the matching result; wherein the actual duty cycle is within the target range, indicating that the target duty cycle and the actual duty cycle are matched successfully; the actual duty cycle is outside the target range, indicating that the target duty cycle and the actual duty cycle are matched unsuccessfully.

4. The motor control method according to claim 3, characterized by, The method of adjusting the output duty cycle of the motor to enable the motor to output the duty cycle based on the target duty cycle if the matching result indicates a matching failure comprises: if the matching result indicates a matching failure, performing a first preset strategy to adjust the output duty cycle of the motor to enable the motor to output the duty cycle based on the target duty cycle; the first preset strategy comprises adjusting the operating time of the motor in the at least one phase state in the each PWM period.

5. The motor control method of claim 1, wherein The method further comprises, after adjusting the output duty cycle of the motor to enable the motor to output the duty cycle based on the target duty cycle if the matching result indicates a matching failure: obtaining a target input voltage of a three-phase bridge of the motor and a three-phase current of the motor; performing data processing on the three-phase current to obtain an actual input voltage of the motor; matching the target input voltage and the actual input voltage; if the target input voltage and the actual input voltage are matched unsuccessfully, performing a second preset strategy to adjust the actual input voltage of the motor.

6. The motor control method according to claim 5, characterized by, The method of performing data processing on the three-phase current to obtain an actual input voltage of the motor comprises: determining a duty cycle of an output voltage of a space vector pulse width modulation (SVPWM) of the motor based on the three-phase current; performing data processing on the duty cycle of the output voltage of the SVPWM by an inverse transformation module to obtain the actual input voltage of the motor.

7. The motor control method according to claim 6, characterized by, The duty cycle of the output voltage of a space vector pulse width modulation (SVPWM) of the motor is determined based on the three-phase current, comprising: data processing of the three-phase current to obtain two-phase current of the motor in a moving coordinate system and a stationary coordinate system; data processing of the two-phase current of the motor in the moving coordinate system and the stationary coordinate system to obtain an input voltage of the motor in the stationary coordinate system; data processing of the input voltage of the motor in the stationary coordinate system to obtain the duty cycle of the output voltage of the SVPWM of the motor.

8. The motor control method of claim 1, wherein, The at least one PWM period constitutes a field oriented control (FOC) period of the motor.

9. An electric motor control device characterized by comprising: comprising: an information sampling module configured to obtain a target duty cycle of a motor and a historical duty cycle of the motor in at least one pulse width modulation (PWM) period; a first data processing module configured to determine an actual duty cycle of the motor based on the historical duty cycle of the motor in the at least one PWM period; a second data processing module configured to match the target duty cycle and the actual duty cycle to obtain a matching result; an execution module configured to adjust an output duty cycle of the motor to enable the motor to output the duty cycle based on the target duty cycle if the matching result indicates a failure of matching.

10. An electronic device, comprising: The device comprises a processor and a memory, and the storage medium stores at least one instruction, at least one program, a code set or an instruction set, which is loaded and executed by the processor to implement the motor control method according to any one of claims 1-8.

11. A computer readable storage medium, characterized in that, The electronic device comprises a processor and a memory, and the memory stores at least one instruction, at least one program, a code set or an instruction set, which is loaded and executed by the processor to implement the motor control method according to any one of claims 1-8.