Motor control method and device, medium and motor controller

By using the Cordic algorithm to calculate the sine value and cosine value in the motor control system, the problem of excessive calculation resources occupied in the traditional method is solved, the real-time and stability of motor control is improved, and more accurate motor speed control is achieved.

CN119210239APending Publication Date: 2024-12-27UNITED AUTOMOTIVE ELECTRONICS SYST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411248072.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In motor control systems, a large amount of sine and cosine values ​​are required in the calculation process of traditional Clack transform and Park transform, resulting in a large amount of computing resources occupied, affecting the performance of real-time motor control and system reliability.

Method used

The Cordic algorithm is used to calculate the sine value and cosine value corresponding to the rotation angle, and the iterative approximation method is used to reduce resource consumption, and the motor driving voltage is adjusted in combination with the FOC algorithm and the PID algorithm to achieve accurate control of the motor speed.

Benefits of technology

It significantly reduces the use of computing resources, improves the real-time control performance of the motor, enhances the stability and control accuracy of the system, and reduces the storage space requirement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119210239A_ABST
    Figure CN119210239A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of motor control, in particular to a motor control method and device, a medium and a motor controller. Comprising the steps of adjusting motor driving voltage through an FOC algorithm, and accurately controlling motor rotating speed; and a sine value and a cosine value required by calculation are provided for the FOC algorithm by using a Cordic algorithm. According to the method, the Cordic algorithm is called to output the sine value and the cosine value, so that resources occupied by calculation are remarkably reduced, and the real-time control performance of the motor is improved. The original advantages of low noise and high precision of the FOC algorithm are reserved, the overall performance of the BLDC motor driving system is further improved, and powerful support is provided for technical progress in related fields. According to the Cordic algorithm, accurate calculation of sine values and cosine values is achieved in an iterative calculation mode, and meanwhile occupation of logic resources is greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of motor control, and in particular to a motor control method, device, medium and motor controller. Background Art

[0002] At present, with the rapid progress of new energy vehicle technology, intelligence has become an important trend in the development of the industry. In this context, vehicle energy management, as a key link in improving vehicle performance and optimizing energy utilization, has become increasingly important. Especially in the field of thermal management, by efficiently distributing the heat generated by the vehicle to the appropriate location, it can not only effectively improve energy utilization, but also significantly enhance the vehicle's cruising range, thereby better adapting to the development trend of automotive intelligence.

[0003] Given the importance of thermal management in vehicle energy management, precise control of the brushless DC (BLDC) water pump has become the core task for achieving efficient thermal management. As a key component of the thermal management system, precise control of the BLDC water pump's operating state is essential to ensure the reasonable distribution of heat in the vehicle. Therefore, the control strategy and implementation method of the BLDC water pump by the electronic control unit (ECU) have become the focus of research on vehicle thermal management technology.

[0004] The FOC (Field-Oriented Control) algorithm stands out in the field of BLDC (Brushless Direct Current) motor drive with its low noise characteristics and high precision performance, becoming the preferred control strategy. The algorithm achieves efficient and stable motor operation by accurately controlling the motor magnetic field. In the implementation of the FOC algorithm, Clack transform and Park transform play a key role. They simplify the complex magnetic field control problem into a vector control problem by means of coordinate transformation, thereby achieving accurate drive of the BLDC motor. However, in the process of implementing Clack transform and Park transform, a large number of sine and cosine value calculations are involved. In traditional methods, these calculations are usually performed in the C language environment. However, since C language usually needs to call more complex mathematical library functions when calculating these trigonometric function values, this leads to a large occupation of computing resources, which in turn affects the performance of real-time control of the motor. Or the lookup table method is used to write the calculated values ​​in Flash, which occupies more storage resources.

[0005] In motor control systems, the software load rate has a crucial impact on the reliability of the system. When a certain computing module occupies too many system resources, it may cause instability in the control process, which is extremely detrimental to the accuracy and stability of motor control. Especially in modern automotive control units (ECUs), with the continuous increase in integrated functions, the correlation between various loads is becoming increasingly close. Once a part of the function fails or is abnormal, its impact is likely to spread quickly to other modules, thereby having a negative impact on the entire system. Summary of the invention

[0006] The invention discloses a motor control method, a device, a medium and a motor controller, which can significantly reduce the calculation amount of Clark transformation and Park transformation in the motor control process.

[0007] In order to achieve the above object, on the one hand, a motor control method is provided, characterized in that the motor drive voltage is adjusted by using the FOC algorithm to control the motor speed, and the FOC algorithm adjustment method is as follows:

[0008] The three-phase current of the motor is sampled, and the rotation angle is subjected to Clark transformation and Park transformation in sequence to calculate the current speed of the motor;

[0009] Calculate the deviation between the current motor speed and the motor target speed;

[0010] To eliminate the deviation, the motor drive voltage is adjusted through the PID algorithm;

[0011] When performing Clark transform and Park transform on the rotation angle, the sine value and cosine value are calculated by the Cordic algorithm;

[0012] Furthermore, the sine and cosine values ​​are calculated using the Cordic algorithm. The specific method is as follows:

[0013] The required rotation angle is used as the input parameter of the Cordic algorithm;

[0014] Set the Cordic algorithm operating parameters;

[0015] Execute rotation control step by step according to the operating parameters to approach the desired rotation angle;

[0016] According to the operation result, the actual rotation angle is calculated;

[0017] According to the actual rotation angle, the final actual coordinate values ​​corresponding to the cosine value and the sine value are calculated respectively, which are used as the cosine value and the sine value of the rotation angle to be calculated.

[0018] Furthermore, the Cordic algorithm operation parameters include: the number of step-by-step approximation iterations, and the acceptable error range between the desired rotation angle and the real-time rotation angle.

[0019] Furthermore, the number of step-by-step approximation iterations is obtained through experimental adjustment.

[0020] Furthermore, the number of step-by-step approximation iterations is greater than or equal to 13 times and less than or equal to 18 times.

[0021] Furthermore, the number of step-by-step approximation iterations is 16.

[0022] To achieve the above object, on the other hand, a motor control device is provided, comprising: a FOC algorithm control module and a Cordic algorithm control module;

[0023] The FOC algorithm control module samples the three-phase current of the motor, performs Clark transformation and Park transformation on the rotation angle in sequence, calculates the current speed of the motor; calculates the deviation between the current speed of the motor and the target speed of the motor; and adjusts the motor drive voltage through the PID algorithm for the purpose of eliminating the deviation;

[0024] The Cordic algorithm control module calculates the cosine value and sine value corresponding to the rotation angle, and sends them to the FOC algorithm control module to implement Clark transformation and Park transformation.

[0025] To achieve the above object, on the other hand, a storage medium is provided which stores a plurality of instructions, and a processor heats the instructions to execute the motor control method described above.

[0026] In order to achieve the above object, on the other hand, a motor controller is provided, comprising the above motor control device, and / or the above storage medium.

[0027] In order to achieve the above-mentioned purpose, on the other hand, a brushless DC water pump is provided for heat distribution of new energy vehicles, using the above-mentioned motor controller.

[0028] Due to the adoption of the above technical solution, the present invention has the following beneficial effects:

[0029] 1. The present invention uses the Cordic algorithm to output sine and cosine values, which significantly reduces the resources occupied by the calculation, thereby improving the performance of the motor's real-time control. It not only retains the original low noise and high precision advantages of the FOC algorithm, but also further improves the overall performance of the BLDC motor drive system, providing strong support for technological progress in related fields.

[0030] 2. The Cordic algorithm achieves accurate calculation of sine and cosine values ​​through iterative calculation, while significantly reducing the occupation of logical resources. Compared with traditional calculation methods, the Cordic algorithm does not require complex mathematical library function calls, reduces resource consumption during the calculation process, does not require all values ​​to be built in advance, reduces storage space occupation, and makes the system more stable and reliable;

[0031] 3. In the FOC algorithm, accurate calculation of flux is crucial to achieve accurate control of the motor. By adopting the Cordic algorithm, we can obtain the calculation results of flux faster, thus ensuring control accuracy.

[0032] It should be noted that the terms "first", "second" and similar terms used in this article are only for describing the various components in the technical solution, and do not constitute a limitation of the technical solution, nor can they be understood as an indication or suggestion of the importance of the corresponding elements; elements with "first", "second" and similar terms indicate that the corresponding technical solution contains at least one of the element. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solution of the present invention and facilitate further understanding of the technical effects, technical features and purposes of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings. The accompanying drawings constitute an essential part of the specification and are used together with the embodiments of the present invention to illustrate the technical solution of the present invention, but do not constitute a limitation to the present invention.

[0034] The same reference numerals in the accompanying drawings represent the same components, specifically:

[0035] Figure 1 A schematic diagram of the assumed coordinate system.

[0036] Figure 2 This is a schematic diagram of the process of Example 1. DETAILED DESCRIPTION

[0037] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described below are only for explaining the technical solutions of the present invention, rather than for limiting the present invention. In addition, the parts described in the embodiments or the accompanying drawings are only examples of the relevant parts of the present invention, rather than the whole of the present invention.

[0038] Embodiment 1:

[0039] The principle formula of the Foc control method algorithm is as follows, which decomposes the current in three directions into the current in the d-axis and q-axis directions:

[0040]

[0041] In the BLDC motor control, the above matrix transformation completes the speed loop control of the motor.

[0042] A motor control method uses FOC algorithm to adjust the motor drive voltage. The specific steps are as follows: Figure 2 As shown:

[0043] S1. Sample the three-phase current of the motor, and perform Clark transformation and Park transformation on the rotation angle in turn to calculate the current speed of the motor.

[0044] In step S1, when performing Clark transformation and Park transformation on the rotation angle, the sine value and cosine value are calculated by the Cordic algorithm, and the specific method is as follows:

[0045] S11, taking the rotation angle to be determined as an input parameter of the Cordic algorithm;

[0046] S12, setting Cordic algorithm operating parameters, the Cordic algorithm operating parameters including: the number of step-by-step approximation iterations, and the acceptable error range between the rotation angle to be calculated and the real-time rotation angle;

[0047] In this embodiment, the number of step-by-step approximation iterations is set to 16 times.

[0048] S13, executing rotation control step by step according to the operating parameters to approach the desired rotation angle;

[0049] S14, calculating the actual rotation angle according to the operation result;

[0050] S15. According to the actual rotation angle, the final actual coordinate values ​​are calculated to correspond to the cosine value and the sine value respectively, which are used as the cosine value and the sine value of the rotation angle to be calculated.

[0051] In step S1, the Cordic algorithm is an efficient calculation method based on the iterative principle. Through clever mathematical transformation, the complex sine and cosine calculation process is simplified to simple operations involving only shift and addition. This feature makes it have broad application prospects in fields such as Foc control. On the one hand, it can significantly reduce the resource occupation of the control algorithm, reduce system complexity and power consumption, and on the other hand, it can increase the calculation speed and achieve faster and more accurate control response.

[0052] Assuming that in the coordinate system, Figure 1 As shown in the figure, a point A1(X1,Y1) is rotated counterclockwise by an angle θ to obtain a point A2(X2,Y2). The relationship between them is:

[0053] X2=X1cosθ-Y1sinθ; Y2=Y1cosθ+X1sinθ.

[0054] In addition to the calculation formulas obtained by the Clark and Park transform formulas other than those explicitly mentioned above, there are many variations or deformations of the Clark and Park transform formulas, all of which are suitable for the Cordic algorithm to obtain the rotation angle.

[0055] cosθ and sinθ are sine and cosine values. The calculation of a large number of sine and cosine values ​​requires calling more complex math library functions, which results in more computing resources being occupied, thus affecting the performance of real-time control of the motor.

[0056] The Cordic algorithm is a rotation angle calculation method based on iterative approximation for the calculation of sine and cosine values. This method converts the rotation angle θ into a series of continuous and gradually decreasing rotation angles θ. i , where each θ i Satisfies tanθi=2 -i By introducing the direction variable D i , according to the relationship between the current rotation angle and θ, determine the direction of the next rotation to gradually approach the target angle θ. In the specific implementation process, first set the initial angle residual value Z0 to θ. Then, according to D i The value and current θ i , calculate the angle D of each rotation i θ i and the remaining value from the angle Z i Subtract this value from the original value to get the remaining angle Z for the next iteration. i+1 As the number of iterations i increases, the angle residual value Z i+1 will gradually approach 0, thus achieving accurate approximation to the target angle θ.

[0057] In the iterative process, through specific mathematical transformations, the coordinate values ​​Xn and Yn after each iteration can be obtained. In particular, when the initial coordinate value x0 is set to Пcosθi and y0 is set to 0, after multiple iterations, the final Xn will approach cosθ and Yn will approach sinθ.

[0058] Implement the Cordic algorithm to calculate sine and cosine values. The callable function is as follows:

[0059]

[0060]

[0061] In each loop, the iterative calculation of x(i), y(i), and z(i) is mainly performed. Although the atan function appears in the above formula, it will occupy certain logic resources to a certain extent. However, considering tanθ i =2 -iThis specific condition can be solved by building a lookup table in advance. The lookup table method allows us to directly obtain the corresponding tanθ by index value. i Therefore, despite the existence of the atan function, the implementation of the lookup table does not significantly increase the burden of program execution, thereby ensuring the efficiency and stability of the entire loop process.

[0062] S2. Calculate the deviation between the current motor speed and the target motor speed.

[0063] S3, in order to eliminate the deviation, the motor drive voltage is adjusted by PID algorithm;

[0064] Embodiment 2:

[0065] A motor control device, comprising: a FOC algorithm control module and a Cordic algorithm control module;

[0066] The FOC algorithm control module samples the three-phase current of the motor, performs Clark transformation and Park transformation on the rotation angle in sequence, calculates the current speed of the motor; calculates the deviation between the current speed of the motor and the target speed of the motor; and adjusts the motor drive voltage through the PID algorithm for the purpose of eliminating the deviation;

[0067] The Cordic algorithm control module calculates the cosine value and sine value corresponding to the rotation angle, and sends them to the FOC algorithm control module to implement Clark transformation and Park transformation.

[0068] It should be noted that the above embodiments are only for more clearly illustrating the technical solutions of the present invention. Those skilled in the art will understand that the implementation methods of the present invention are not limited to the above contents, and obvious changes, replacements or substitutions based on the above contents do not exceed the scope of the technical solutions of the present invention; other implementation methods will also fall within the scope of the present invention without departing from the concept of the present invention.

Claims

1. A motor control method, characterized in that: The FOC algorithm is used to adjust the motor drive voltage and control the motor speed. The FOC algorithm adjustment method is as follows: The three-phase current of the motor is sampled, and the rotation angle is subjected to Clark transformation and Park transformation in sequence to calculate the current speed of the motor; Calculate the deviation between the current motor speed and the motor target speed; To eliminate the deviation, the motor drive voltage is adjusted through the PID algorithm; When performing Clark transform and Park transform on the rotation angle, the sine value and cosine value are calculated and obtained by using the Cordic algorithm.

2. The motor control method according to claim 1, characterized in that: The sine and cosine values ​​are calculated using the Cordic algorithm. The specific method is as follows: The required rotation angle is used as the input parameter of the Cordic algorithm; Set the Cordic algorithm operating parameters; Execute rotation control step by step according to the operating parameters to approach the desired rotation angle; According to the operation result, the actual rotation angle is calculated; According to the actual rotation angle, the final actual coordinate values ​​corresponding to the cosine value and the sine value are calculated respectively, which are used as the cosine value and the sine value of the rotation angle to be calculated.

3. The motor control method according to claim 2, characterized in that: The Cordic algorithm operating parameters include: the number of step-by-step approximation iterations, and the acceptable error range between the desired rotation angle and the real-time rotation angle.

4. The motor control method according to claim 3, characterized in that: The number of step-by-step approximation iterations is obtained through experimental adjustment.

5. The motor control method according to claim 4, characterized in that: The number of step-by-step approximation iterations is greater than or equal to 13 and less than or equal to 18.

6. The motor control method according to claim 5, characterized in that: The number of step-by-step approximation iterations is 16.

7. A motor control device, characterized in that: include: FOC algorithm control module and Cordic algorithm control module; The FOC algorithm control module samples the three-phase current of the motor, performs Clark transformation and Park transformation on the rotation angle in turn, and calculates the current speed of the motor; calculates the deviation between the current speed of the motor and the target speed of the motor; To eliminate the deviation, the motor drive voltage is adjusted through the PID algorithm; The Cordic algorithm control module calculates the cosine value and sine value corresponding to the rotation angle, and sends them to the FOC algorithm control module to implement Clark transformation and Park transformation.

8. A storage medium, characterized in that: A plurality of instructions are stored, and a processor heats the instructions to execute the motor control method according to any one of claims 1 to 6.

9. A motor controller, characterized in that: It includes the motor control device as claimed in claim 7 and / or the storage medium as claimed in claim 8.

10. A brushless DC water pump for heat distribution in new energy vehicles, characterized in that: The motor controller according to claim 9 is adopted.