A motor control method, control device, control system and vehicle

By using direct memory access to obtain real-time motor data and calculating control data after half a cycle in the permanent magnet synchronous motor control system, the problem of long control delay is solved, which reduces CPU processing speed and development costs, while improving the electromagnetic compatibility performance of the motor.

CN114553100BActive Publication Date: 2026-01-02CHINA FAW CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210236616.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-11
Publication Date
2026-01-02
Estimated Expiration
2042-03-11

AI Technical Summary

Technical Problem

In existing permanent magnet synchronous motor control systems, the long control delay time leads to high CPU processing speed requirements, increases development costs, and affects the electromagnetic compatibility performance of the motor.

Method used

Real-time motor data is obtained through direct memory access. Motor control data is calculated after half a motor control cycle, and the motor is driven after half a cycle, which reduces the CPU's computational load and the frequency requirement for control signal output.

Benefits of technology

It reduces CPU processing speed requirements, lowers development costs, improves motor electromagnetic compatibility performance, and reduces requirements for motor drive systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114553100B_ABST
    Figure CN114553100B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a motor control method, a control device, a control system and a vehicle. The motor control method comprises the following steps: obtaining real-time motor data in a direct memory access mode; determining motor control data according to the real-time motor data and target motor data after half of a motor control period; and driving the motor according to the motor control data after half of the motor control period. The embodiment of the application uses the direct memory access mode to replace the CPU to obtain the real-time motor data, saves the CPU computing resources, reduces the CPU processing speed requirement, and further reduces the cost. Moreover, one data update can be completed within half of the motor control period, the output frequency requirement of the control signal is reduced, the requirement of the motor driving system is reduced, the development cost is reduced, and the motor electromagnetic compatibility performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to motor control technology, and particularly relate to a motor control method, a control device, a control system and a vehicle. BACKGROUND

[0002] Permanent magnet synchronous motor (PMSM) has the advantages of simple structure, high power density and strong reliability, and is widely used in electric vehicles, aerospace and other fields. In the control system of the permanent magnet synchronous motor, the control characteristics of high speed, high precision and high control frequency can ensure the normal output of the motor torque performance.

[0003] For the control system of the permanent magnet synchronous motor, due to the influence of cost and driving module switching loss factors, the control frequency of most motor control systems of host manufacturers is mostly limited to about 10KHz, that is, the PWM control signal is updated only once in one motor control period, and the control delay time is long. To solve the problem of long control delay time, the PWM control signal output frequency can be further improved, but this method has high requirements for the motor driving module, increases the development cost, and affects the electromagnetic compatibility performance of the motor. Moreover, the control period needs to be synchronized with the CPU for current and position sampling, which occupies the carrier frequency control time, and requires a high processing speed of the chip. SUMMARY

[0004] The present application provides a motor control method, a control device, a control system and a vehicle to reduce the output frequency of the control signal, reduce the CPU processing speed requirement and reduce the cost.

[0005] In a first aspect, the embodiments of the present application provide a motor control method, comprising:

[0006] obtaining real-time motor data by direct memory access;

[0007] After half of the motor control period, the motor control data is determined according to the motor target data and the real-time motor data;

[0008] After half of the motor control period, the motor is driven according to the motor control data.

[0009] Optionally, after the motor control data is determined according to the motor target data and the real-time motor data, the method further comprises:

[0010] determining the system load rate of the system according to the time required to obtain the motor control data, and updating the motor control period.

[0011] Optionally, the updating the motor control period according to the system load rate determined based on the time required for obtaining the motor control data comprises:

[0012] When the system load rate is higher than a preset load rate, the motor control period is extended.

[0013] Optionally, the motor control data is output through a PWM signal, and the driving the motor according to the motor control data comprises:

[0014] determining a duty cycle of the PWM signal according to the motor control data, and controlling the motor to output power according to the duty cycle.

[0015] Optionally, the driving the motor according to the motor control data further comprises:

[0016] when the duty cycle is less than a dead time or a small pulse time, regarding the duty cycle as 0%;

[0017] when the duty cycle is greater than a period of the PWM signal minus the dead time and the small pulse time, regarding the duty cycle as 100%.

[0018] Optionally, the motor real-time data comprises a motor real-time current and a motor rotor position.

[0019] Optionally, the determining the motor control data according to the motor target data and the motor real-time data comprises:

[0020] the driving the motor according to the motor control data occurs at a starting position and a middle position of the motor control period.

[0021] In a second aspect, an embodiment of the present application further provides a motor control device, comprising:

[0022] a motor real-time data acquisition module, configured to acquire motor real-time data through a direct memory access mode;

[0023] a motor control data determination module, configured to determine motor control data according to motor target data and the motor real-time data after half of a motor control period;

[0024] a motor driving module, configured to drive the motor according to the motor control data after half of the motor control period.

[0025] In a third aspect, an embodiment of the present application further provides a motor control system, comprising the motor control device, and the motor control device is configured to implement any one of the motor control methods.

[0026] In a fourth aspect, the embodiment of the present application further provides a vehicle comprising the motor control system.

[0027] The embodiment of the present application obtains the real-time motor data through the direct memory access, calculates the motor control data according to the motor target data and the real-time motor data after half of the motor control period, and drives the motor according to the motor control data after half of the motor control period. The real-time motor data is obtained through the direct memory access instead of the CPU, thereby saving the CPU computing resources, reducing the CPU processing speed requirement, and further reducing the cost. The data update is completed within half of the motor control period, thereby reducing the output frequency requirement of the control signal, further reducing the requirement for the motor driving system, reducing the development cost, and improving the motor electromagnetic compatibility performance. BRIEF DESCRIPTION OF DRAWINGS

[0028] Figure 1 A flowchart of a motor control method provided by the embodiment of the present application is shown in FIG. 1.

[0029] Figure 2 A structure diagram of a permanent magnet synchronous motor control system provided by the embodiment of the present application is shown in FIG. 2.

[0030] Figure 3 A signal period diagram of a motor control method provided by the embodiment of the present application is shown in FIG. 3.

[0031] Figure 4 A processing flow diagram of a motor vector control module provided by the embodiment of the present application is shown in FIG. 4.

[0032] Figure 5 A structure diagram of a motor control device provided by the embodiment of the present application is shown in FIG. 5. DETAILED DESCRIPTION

[0033] The present application will be further described below in conjunction with the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, only the parts related to the present application are shown in the drawings, but not all the structures.

[0034] Figure 1 A flowchart of a motor control method provided by the embodiment of the present application is shown in FIG. 1, which is shown in FIG. Figure 1 The embodiment of the present application provides a motor control method, which comprises:

[0035] S1: obtaining real-time motor data through the direct memory access.

[0036] Compared with the mode of directly obtaining by the CPU, the motor real-time data is obtained by the direct memory access (DMA) mode in the embodiment of the application, so that the CPU can be prevented from consuming computing power when obtaining the motor real-time data, and the CPU running pressure is reduced. The motor real-time data can include information related to the real-time state of the motor. The motor real-time data is obtained by the direct memory access mode, so that the CPU does not need to depend on a large number of interrupt loads, and the data to be obtained is directly saved to the memory. In the prior art, the CPU needs to copy the data of each segment from the source to the temporary register, and then write them to a new place again. During this time, the CPU cannot be used for other work. Therefore, the motor real-time data is obtained by the direct memory access mode, so that the computing power resources can be saved, and the CPU load is reduced. Optionally, the motor real-time data can include the motor real-time current and the motor rotor position.

[0037] S2: After half of the motor control period, the motor control data is determined according to the calculation of the motor target data and the motor real-time data.

[0038] In the embodiment of the application, the calculation of the motor target data and the motor real-time data is transferred to the second half of the period in which the motor real-time data is obtained, so that the calculation can be started without waiting for the completion of the motor real-time data acquisition, and the length of the motor control period is reduced. The motor target data can be data obtained according to the motor control instruction. The motor control data can be related data for controlling the motor, and the motor control data can be output in the form of a PWM signal.

[0039] S3: After half of the motor control period, the motor is driven according to the motor control data.

[0040] In the embodiment of the application, the motor driving step is arranged in the second half of the motor control period after the calculation of the motor control data, so that the length of the motor control period caused by the time-consuming calculation of the motor control data can be avoided, the motor can be controlled without waiting for the calculation of the motor control data in the period, and the length of the motor control period is further reduced.

[0041] Figure 2 A structure diagram of a permanent magnet synchronous motor control system provided by the embodiment of the application is shown in FIG. 1. Figure 2The motor control method can be used to control the following system. The permanent magnet synchronous motor control system can include a current detection module 1, a position detection module 2, a motor vector control module 3, and an output module 4. The current detection module 1 is used to detect the three-phase current of the driving permanent magnet synchronous motor 5, the position detection module 2 is used to detect the position of the rotor of the permanent magnet synchronous motor 5, the motor vector control module 3 is used to calculate the required driving current of the motor, for example, it can be a vector control operation (FOC operation), and the output module 4 can output the current according to the operation result to drive the permanent magnet synchronous motor 5. The output module 4 can be a drive board. According to the received torque request instruction, combined with the three-phase current Ia, Ib, Ic collected by the current detection module in real time, the motor position signal θ collected by the position detection module 2 in real time, and the motor target data TrqCmd, as the input of the vector control system, the PWM signal required to be output is calculated in real time. The signal is used as the input signal of the drive board, so that the drive board outputs the current according to the output signal, and the motor outputs the corresponding torque according to the instruction.

[0042] Figure 3 A signal cycle diagram of a motor control method provided for an embodiment of the application is shown in Figure 3The frequency and control frequency of the current detection module and the position detection module are crucial to the accuracy and dynamic response performance of the motor torque control of the control system. Therefore, in an embodiment of the application, current signal sampling, position signal sampling and motor vector control operation are performed twice in one carrier frequency cycle. To ensure the synchronization of motor current signal sampling and position signal sampling, in an embodiment of the application, the update of motor control data can be controlled to be carried by two PWM signals in one carrier frequency cycle. That is, the first update can be recorded on the first PWM signal and the second update can be recorded on the second PWM signal in one carrier frequency cycle. Optionally, in an embodiment of the application, the motor real-time data sampling result latch time point can also be selected according to actual needs. For example, it can be the starting point or the middle point (i.e. t1, t2, t3, t4 and t5) of the PWM signal cycle, and the motor real-time data sampling result latch is triggered synchronously to make the motor real-time data not follow the time change. The motor real-time data sampling result is read in the background through direct memory access sending result reading instructions and is stored in the cache space. After the data reading is completed, the cache content latch release is triggered to facilitate the next signal collection. The whole collection process does not involve CPU operation, but is realized through DMA. In one motor control cycle, the collection and operation of motor real-time data are realized twice, so the motor control cycle is twice as long as the data collection and operation cycle. Since the calculation required for obtaining motor control data is not in the same data collection and operation cycle as the direct memory access for obtaining motor real-time data, the current and position signals collected through DMA in the background are not used in the current cycle, but are used in the next data collection and operation cycle. Therefore, the data collected in the next cycle can be directly used, and there is no need for additional carrier frequency task time and CPU load for motor real-time data sampling, which greatly reduces the occupation of CPU calculation motor control data processing time by the carrier frequency task execution time required for transmitting motor real-time data, and reduces the system load. Similarly, the calculated motor control data is not used in the current cycle, but is used in the next data collection and operation cycle. Therefore, the motor control data calculated in the next data collection and operation cycle can be directly used for PWM signal update for controlling the drive board, which reduces the requirements for the motor drive system and reduces the development cost. The first PWM signal and the second PWM signal generated in one PWM signal cycle are converted into drive current signals by the drive board to drive the motor. The drive current signals in one PWM signal cycle will output current with an upward trend and current with a downward trend according to the different motor control data carried by the first PWM signal and the second PWM signal, so as to double the control and regulation frequency of the drive current without changing the PWM signal output frequency. This reduces the requirements for the motor drive module and reduces the development cost, without affecting the electromagnetic compatibility performance of the motor.

[0043] Optionally, after the motor control data is determined according to the motor target data and the motor real-time data, the method further comprises:

[0044] According to the time required to obtain the motor control data, the system load rate of the system is determined, and the motor control period is updated.

[0045] The motor control period can be set as a variable period that can change in real time. In the steps of motor real-time data acquisition, motor control data calculation, and PWM signal updating, the time spent on motor control data calculation is usually the longest. Therefore, the minimum value of the motor control period can be calculated according to the time required to obtain the motor control data. Increasing the motor control frequency helps to improve the dynamic response speed of the motor. Therefore, the motor control period can be adjusted in time according to the time required to obtain the motor control data, and the motor control frequency can be increased.

[0046] Further, according to the time required to obtain the motor control data, the system load rate of the system is determined, and the motor control period is updated.

[0047] When the system load rate is higher than the preset load rate, the motor control period is extended.

[0048] When the motor control frequency is increased too high, it will cause the system load to increase, and even exceed the maximum load that the motor control data calculation chip can withstand. Therefore, when the system load rate is higher than the preset load rate, the motor control period can be extended. In this way, the motor control data calculation chip is protected, so that the load of the calculation chip does not exceed the safe range of the chip load. The system load rate can be the ratio of the time required for this motor control data calculation to the length of the motor control period. The preset load rate can be determined according to actual needs. Optionally, the preset load rate can be 60-90%, for example, 70%.

[0049] Optionally, the motor control data is output through a PWM signal, and the motor is driven according to the motor control data.

[0050] According to the duty cycle of the PWM signal determined according to the motor control data, the motor output power is controlled.

[0051] The PWM signal can be determined by the motor control data, and the driving board can be controlled to provide driving current to the motor by the PWM signal. The driving board can be set to determine the output current size according to the duty cycle of the PWM signal. For example, the driving board can be set to provide larger driving current when the duty cycle of the PWM signal is larger. In this way, the motor output power is controlled according to the duty cycle of the PWM signal.

[0052] Further, the motor is driven according to the motor control data, and the method further comprises:

[0053] When the duty cycle to be output is less than the dead time or the small pulse time, the duty cycle is output as 0%;

[0054] When the duty cycle to be output is greater than the period of the PWM signal minus the dead time and the small pulse time, the duty cycle is output as 100%.

[0055] When the PWM duty cycle is less than the dead time and the small pulse time, the duty cycle is output as 0%; when the PWM duty cycle is greater than the period of the PWM minus the dead time and the small pulse time, the duty cycle is output as 100%; when the duty cycle is between the two, the PWM duty cycle determined by the motor control data can be used. Thus, the invalid power output caused by the small pulse in the motor control process is effectively reduced, and the generation of heat and power loss is reduced. At the same time, the short circuit of the PWM signal generation module caused by the need for fast and frequent switching of the level state is reduced. The permanent magnet synchronous motor control system is protected.

[0056] Optionally, the motor control data is determined according to the motor target data and the motor real-time data, and the motor control data occurs at the starting position and the middle position of the motor control period; and / or,

[0057] The motor is driven according to the motor control data, and the motor control data occurs at the starting position and the middle position of the motor control period.

[0058] According to actual needs, the occurrence time of the two actions of calculating the motor control data according to the motor target data and the motor real-time data and driving the motor according to the motor control data relative to the motor control period can be selected. The starting position of the motor control period can be used as the occurrence time of the above actions, or the middle position of the motor control period can be used as the occurrence time of the above actions.

[0059] Figure 4 A processing flow diagram of a motor vector control module is provided for the embodiments of the present application, as shown in Figure 4In one data acquisition operation cycle, the processor of the motor vector control module calculates the motor control data to determine the motor control data. Then the output frequency and duty cycle of the PWM signal output by the motor vector control module are determined according to the motor control data. Then the execution time of the motor control data calculation is determined. Then it is judged whether the system load rate is higher than the preset load rate according to the execution time of the motor control data calculation. If not, the maximum allowable load of the system is calculated according to the time required to obtain the motor control data and other parameters, the output frequency of the PWM signal is calculated according to the maximum allowable load of the system and the execution time of the load frequency task, and the output frequency of the PWM signal is updated according to the output frequency of the PWM signal. If yes, it is judged whether the duty cycle of the PWM signal is less than the dead time or the small pulse time, and whether it is greater than the period of the PWM signal minus the dead time and the small pulse time. According to the duty cycle of the PWM signal, the duty cycle is updated to 0% or 100%, or the PWM duty cycle is kept unchanged. Then the frequency and duty cycle of the PWM signal are output, and the calculation of the next cycle is started.

[0060] Figure 5 A structural schematic diagram of a motor control device provided by an embodiment of the present application is shown in Figure 5 The embodiment of the present application also discloses a motor control device, which comprises:

[0061] The motor real-time data acquisition module 01 is used for acquiring motor real-time data through a direct memory access mode.

[0062] The motor control data determination module 02 is used for determining motor control data according to motor target data and motor real-time data calculation after half a motor control period.

[0063] The motor driving module 03 is used for driving the motor according to the motor control data after half a motor control period.

[0064] The motor control device provided by the embodiment of the present application can execute the motor control method provided by any embodiment of the present application, has the function modules and beneficial effects corresponding to the execution method.

[0065] Optionally, the motor control device further comprises a motor control period updating module, which is used for determining the system load rate of the system according to the time required to obtain the motor control data, and updating the motor control period.

[0066] The embodiment of the present application also discloses a motor control system, which comprises the motor control device.

[0067] The motor control system provided by the embodiment of the present application comprises the motor control device provided by any embodiment of the present application, has the function modules and beneficial effects corresponding to the execution method.

[0068] The embodiment of the present application further discloses a vehicle comprising the motor control system.

[0069] Among them, the vehicle provided by the embodiment of the present application comprises the motor control system provided by any embodiment of the present application, has the function module corresponding to the execution method and the beneficial effect.

[0070] Note that the above are only preferred embodiments of the present application and the technical principles applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and those skilled in the art can make various obvious changes, re-adjustments, mutual combinations and substitutions without departing from the scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A motor control method, characterized in that, include: Real-time motor data is obtained through direct memory access. After half a motor control cycle, the motor control data is calculated and determined based on the target motor data and the real-time motor data; After half of the motor control cycle, the motor is driven according to the motor control data; The motor control data is output via a PWM signal, and driving the motor according to the motor control data includes: The duty cycle of the PWM signal is determined based on the motor control data, and the motor output power is controlled based on the duty cycle. The step of driving the motor according to the motor control data further includes: When the duty cycle is less than the dead time or the small pulse time, the duty cycle is considered to be 0%. When the duty cycle is greater than the period of the PWM signal minus the dead time and the small pulse time, the duty cycle is considered to be 100%.

2. The motor control method according to claim 1, characterized in that, After determining the motor control data based on the target motor data and the real-time motor data, the process further includes: The system load rate is determined based on the time required to acquire the motor control data, and the motor control cycle is updated accordingly.

3. The motor control method according to claim 2, characterized in that, The step of determining the system load rate based on the time required to acquire the motor control data and updating the motor control cycle includes: When the system load rate is higher than the preset load rate, the motor control cycle is extended.

4. The motor control method according to claim 1, characterized in that, The real-time motor data includes the motor's real-time current and the motor's rotor position.

5. The motor control method according to claim 1, characterized in that, The step involves calculating and determining the start and middle positions of the motor control data within the motor control cycle based on the target motor data and the real-time motor data; and / or, The motor is driven according to the motor control data at the beginning and middle positions of the motor control cycle.

6. A motor control device, characterized in that, include: The motor real-time data acquisition module is used to acquire motor real-time data through direct memory access. The motor control data determination module is used to calculate and determine the motor control data based on the target motor data and the real-time motor data after half a motor control cycle. A motor drive module is configured to drive a motor according to the motor control data after half of the motor control cycle; wherein the motor control data is output via a PWM signal, and driving the motor according to the motor control data includes: The duty cycle of the PWM signal is determined based on the motor control data, and the motor output power is controlled based on the duty cycle. The step of driving the motor according to the motor control data further includes: When the duty cycle is less than the dead time or the small pulse time, the duty cycle is considered to be 0%. When the duty cycle is greater than the period of the PWM signal minus the dead time and the small pulse time, the duty cycle is considered to be 100%.

7. A motor control system, characterized in that, The invention includes the motor control device as described in claim 6, wherein the motor control device is used to implement the motor control method as described in any one of claims 1-5.

8. A vehicle, characterized in that, Includes the motor control system described in claim 7.

Citation Information

Patent Citations

  • Alternating-current motor current loop parallelism digital control implementation method

    CN104796048A

  • Motor control device, control system, and motor control method

    CN109768738A

  • Power converter

    JP2002369504A