In-wheel motor mtpa control method, device, equipment and storage medium
By constructing an MTPA calculation model based on the optimization of the current partial derivative by inductance, monitoring the torque reference value in real time and iteratively correcting the shaft current reference value, the control accuracy and efficiency problems of the hub motor under high torque output conditions are solved, and the power performance of new energy vehicles is improved.
Patent Information
- Application Number
- CN202511038457.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-07-28
AI Technical Summary
Traditional MTPA control technology ignores the partial derivative error of inductance on current in the hub motor of new energy vehicles, resulting in reduced control accuracy and efficiency under high torque output conditions, affecting the vehicle's dynamic performance.
An MTPA calculation model based on the optimization of the current partial derivative due to inductance is constructed. By monitoring the changes in the torque reference value, the shaft current reference value is calculated and iteratively corrected in real time. The error coefficient and preset limit control iterative processing are combined to improve the model accuracy and dynamic performance.
The control accuracy and dynamic performance of the hub motor under large torque change conditions are improved, adapting to the complex road conditions of new energy vehicles and improving the vehicle's endurance and power performance.
Smart Images

Figure CN120546501B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of motor control, and particularly relates to a wheel hub motor MTPA control method, device, equipment and storage medium. BACKGROUND
[0002] The wheel hub motor is a core component for driving a new energy vehicle. Among common motors, the built-in permanent magnet synchronous motor gradually becomes a mainstream technical solution for the wheel hub motor due to its high power density and dynamic response characteristics. When the built-in permanent magnet synchronous motor is used as the wheel hub motor to drive the new energy vehicle, both higher torque output capability and faster torque response speed need to be achieved to meet accurate tracking of a torque instruction of a vehicle controller, and the motor efficiency needs to be optimized to improve the vehicle mileage, so the maximum torque current ratio (MTPA) technology is usually used to control the wheel hub motor by the person skilled in the art.
[0003] In actual application, the new energy vehicle needs large torque output under typical working conditions such as climbing, sudden acceleration or emergency avoidance, and complex road conditions cause the driving system to face dynamic and variable torque demand. However, the traditional MTPA control technology ignores the inductance-induced error of the current, which will cause tracking error of the MTPA control, thereby causing the MTPA control performance to be poor under the working condition of sudden large torque output, and further affecting the vehicle power performance.
[0004] To solve this problem, the person skilled in the art selects a scheme of injecting a current angle increment to obtain two working points in the system adjustment process, and then calculating the torque-induced error of the current angle, and then compensating the calculation result to the MTPA calculation model. However, the scheme still needs to wait for the current to be stable before injecting the current angle increment, so as to cause the induced error calculation to lag behind the actual working condition change, and affect the MTPA point tracking speed. In addition, when the compensation amount is introduced into the system, the secondary offset of the current angle will also cause the induced error accumulation effect, causing the MTPA control accuracy to be reduced, and directly affecting the motor efficiency and the vehicle power performance. SUMMARY
[0005] Therefore, the application aims to provide a wheel hub motor MTPA control method, device, equipment and storage medium to solve the above technical problems.
[0006] To achieve the above purpose, the technical scheme of the application is as follows:
[0007] In a first aspect, the embodiment of the application provides a wheel hub motor MTPA control method, comprising the following steps:
[0008] S1, constructing an MTPA calculation model based on inductance-induced error optimization of the current;
[0009] S2, monitoring the torque reference value of the motor;
[0010] S3. When a change in the torque reference value is detected, the control period in which the torque reference value changes is taken as the current control period; the shaft current reference value of the current control period and the partial derivative error of the previous control period are obtained; the motor is controlled according to the shaft current reference value of the current control period; the partial derivative error of the previous control period is set as the partial derivative error of the current control period, and the shaft current reference value of the next control period is calculated using the MTPA calculation model in step S1;
[0011] S4. Take the next control cycle in step S3 as the current control cycle and execute steps S401-S404;
[0012] S401, controlling the motor according to the shaft current reference value of the current control cycle;
[0013] S402, calculating the partial derivative error of the current control period based on the shaft current reference value of the control period in which the torque reference value changes and the shaft current reference value of the current control period;
[0014] S403, calculating the error coefficient of the current control cycle based on the partial derivative error of the current control cycle and the partial derivative error of the previous control cycle;
[0015] S404: Compare the error coefficient of the current control cycle with the preset limit. If the error coefficient of the current control cycle is greater than the preset limit, execute step S5; if the error coefficient of the current control cycle is less than or equal to the preset limit, execute step S6.
[0016] S5. Iteratively correct the MTPA calculation model in step S1 according to the partial derivative error of the current control cycle in step S404, calculate the shaft current reference value of the next control cycle in step S404 using the iteratively corrected MTPA calculation model, and use the next control cycle in step S404 as the current control cycle, and return to step S401 for execution;
[0017] S6. Perform a final correction on the MTPA calculation model in step S1 according to the partial derivative error of the current control cycle in step S404, and calculate the shaft current reference value of all subsequent control cycles through the final corrected MTPA calculation model. When each subsequent control cycle is used as the current control cycle, the motor is controlled according to the shaft current reference value of the current control cycle.
[0018] In a second aspect, an embodiment of the present invention further provides a hub motor MTPA control device, comprising:
[0019] Model building module, used to build an MTPA calculation model based on the optimization of the inductance-current partial derivative;
[0020] A monitoring module is used to monitor the torque reference value of the motor;
[0021] An initial setting module is used to, when a change in the torque reference value is detected, set the control period in which the torque reference value changes as the current control period; obtain the shaft current reference value of the current control period and the partial derivative error of the previous control period; control the motor according to the shaft current reference value of the current control period; set the partial derivative error of the previous control period as the partial derivative error of the current control period, and calculate the shaft current reference value of the next control period using the MTPA calculation model in step S1;
[0022] An iterative execution module, configured to use the next control cycle in step S3 as the current control cycle and execute steps S401 to S404;
[0023] The iterative execution module includes:
[0024] A motor control unit, configured to control the motor according to a shaft current reference value of a current control cycle;
[0025] a first calculation unit, configured to calculate a partial derivative error of a current control period based on a shaft current reference value of a control period in which a torque reference value changes and a shaft current reference value of a current control period;
[0026] A second calculation unit is used to calculate the error coefficient of the current control cycle based on the partial derivative error of the current control cycle and the partial derivative error of the previous control cycle;
[0027] a comparing unit, configured to compare the error coefficient of the current control cycle with a preset limit value, and execute step S5 when the error coefficient of the current control cycle is greater than the preset limit value, and execute step S6 when the error coefficient of the current control cycle is less than or equal to the preset limit value;
[0028] an iterative correction module, configured to iteratively correct the MTPA calculation model in step S1 according to the partial derivative error of the current control cycle in step S404, calculate the shaft current reference value of the next control cycle in step S404 using the iteratively corrected MTPA calculation model, and use the next control cycle in step S404 as the current control cycle, and return to step S401 for execution;
[0029] The subsequent control module is used to make a final correction to the MTPA calculation model in step S1 according to the partial derivative error of the current control cycle in step S404, and calculate the shaft current reference value of all subsequent control cycles through the final corrected MTPA calculation model, and control the motor according to the shaft current reference value of the current control cycle when each subsequent control cycle is used as the current control cycle.
[0030] In a third aspect, an embodiment of the present invention further provides a device, including:
[0031] one or more processors;
[0032] a storage device for storing one or more programs;
[0033] When the one or more programs are executed by the one or more processors, the one or more processors implement the in-wheel motor MTPA control method provided in the above embodiment.
[0034] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a computer processor, are used to execute the in-wheel motor MTPA control method provided in the above embodiment.
[0035] Compared with the prior art, the in-wheel motor MTPA control method, device, equipment and storage medium created by the present invention have the following advantages:
[0036] The present invention creates a hub motor MTPA control method, device, equipment and storage medium. The method can calculate the shaft current reference value of the next control cycle through the MTPA calculation model based on the optimization of the partial derivative of the current by the inductance. Therefore, the partial derivative error of the inductance on the current can be considered in the control process, thereby improving the model accuracy under large torque change conditions. Secondly, the method can directly trigger the calculation process in the control cycle where the torque reference value changes, avoiding the partial derivative calculation delay caused by the existing method of waiting for the current to stabilize before starting the calculation, increasing the calculation speed of the partial derivative error, and improving the dynamic performance of the MTPA. In addition, the method can also iteratively correct the MTPA calculation model, and can control the cyclic process of the iterative processing by comparing the error coefficient with the preset limit value, thereby improving the balance between the MTPA control accuracy and tracking speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings, which constitute part of the present invention, are intended to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are intended to explain the present invention and do not constitute an undue limitation of the present invention. In the accompanying drawings:
[0038] Figure 1A flowchart of the in-wheel motor MTPA control method according to the first embodiment of the present invention is created;
[0039] Figure 2 This is a schematic diagram of the structure of the in-wheel motor MTPA control device according to the second embodiment of the present invention;
[0040] Figure 3 This is a structural diagram of the device described in Example 3 of the present invention. DETAILED DESCRIPTION
[0041] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.
[0042] Example 1
[0043] Figure 1 This is a flow chart of the MTPA control method for the hub motor provided in the first embodiment of the present invention, as shown in FIG. Figure 1 As shown, the hub motor MTPA control method specifically includes the following steps:
[0044] S1. Construct an MTPA calculation model based on the optimization of the inductance-current partial derivative.
[0045] In the prior art, the mathematical expression of the torque of the interior permanent magnet synchronous motor with respect to the shaft current is:
[0046] ,
[0047] In the above formula, is the torque, is the permanent magnet flux, is the number of motor pole pairs, and is the inductance value, and is the shaft current.
[0048] Taking the minimum current amplitude as the objective function and the above formula as the constraint condition, the Lagrangian method is used to find the extreme value of the objective function, and the following Lagrangian equation can be established:
[0049] ,
[0050] In the above formula, is the current amplitude, is the Lagrange multiplier.
[0051] make The first-order partial derivative of is 0, ignoring the partial derivative of inductance to current, then:
[0052]
[0053] Traditional MTPA calculation models are usually built based on the above equation. However, in actual applications, the inductance value will change with the changes in the shaft current. Therefore, the partial derivative of the inductance with respect to the current is not zero. Ignoring the partial derivative of the inductance with respect to the current will introduce model errors in the MTPA calculation model, especially under high-torque conditions, which will significantly reduce the control accuracy of the motor MTPA.
[0054] To solve this problem, this embodiment optimizes the existing MTPA calculation model based on the partial derivative error of the inductance on the current, thereby improving the control accuracy of the motor MTPA.
[0055] Specifically, when considering the partial conduction error of the inductor to the current, the following formula is available:
[0056] ,
[0057] Where, and is the partial derivative error.
[0058] By solving the above formula, the MTPA calculation model based on the optimization of the inductance to the current partial derivative described in step S1 of this embodiment can be obtained, and its calculation formula is as follows:
[0059] ,
[0060] Where A, F, and G are all calculation coefficients, and:
[0061] , , , , , , , , ,
[0062] In the above formula, B, C, D, H, I, and J are all intermediate calculation quantities. and is the partial derivative error of the current control cycle, and is the shaft current reference value for the next control cycle, is the torque, is the permanent magnet flux, is the number of motor pole pairs, and is the inductance value.
[0063] The MTPA calculation model can be used to calculate the shaft current reference value for the next control cycle in the subsequent motor control process, combining the partial derivative error of the current control cycle. The motor can then be controlled based on the shaft current reference value to achieve higher control accuracy and adapt to the large torque output requirements of new energy vehicles under typical operating conditions such as climbing, rapid acceleration, or emergency avoidance.
[0064] S2. Monitor the torque reference value of the motor.
[0065] In actual use, when a new energy vehicle faces hill climbing, sudden acceleration, or emergency avoidance, the vehicle controller outputs a torque change command based on the operating conditions. Accordingly, upon receiving the torque change command, the in-wheel motor drive control system adjusts the torque reference value accordingly. In subsequent control cycles, the motor tracks the torque reference value, gradually ensuring that the actual motor output torque meets the torque reference value, thereby ensuring that the new energy vehicle meets the actual operating conditions.
[0066] Therefore, this embodiment monitors the motor's torque reference value in step S2. If the motor's torque reference value remains unchanged, the new energy vehicle is currently operating in a stable, normal operating state, and no additional control of the in-wheel motor is required. If the motor's torque reference value changes, it indicates that the new energy vehicle's operating requirements have changed, potentially necessitating special operating conditions such as hill climbing, rapid acceleration, or emergency maneuvering. In these cases, the in-wheel motor can be controlled using this method to improve motor control accuracy.
[0067] S3. When a change in the torque reference value is detected, the control period in which the torque reference value changes is taken as the current control period; the shaft current reference value of the current control period and the partial derivative error of the previous control period are obtained; the motor is controlled according to the shaft current reference value of the current control period; the partial derivative error of the previous control period is set as the partial derivative error of the current control period, and the shaft current reference value of the next control period is calculated by the MTPA calculation model in step S1.
[0068] When the torque reference value changes, it proves that the new energy vehicle has a special working condition requirement in the current control cycle of the motor. Since the digital control system has inherent delays and timing requirements in the actual motor control process, the shaft current reference value of the current control cycle needs to be calculated by the previous control cycle. To ensure the continuity and effectiveness of the motor control, this embodiment will obtain the shaft current reference value of the current control cycle calculated in the previous control cycle, so as to control the motor in the current control cycle. At the same time, this embodiment should also obtain the partial derivative error of the previous control cycle in the current control cycle in which the torque reference value changes, and set the partial derivative error of the previous control cycle as the partial derivative error of the current control cycle, so that the MTPA calculation model in step S1 can accurately calculate the shaft current reference value of the next control cycle in which the torque reference value changes while considering the influence of the partial derivative error, thereby achieving higher accuracy in the actual control effect of the motor in the next control cycle.
[0069] S4. Take the next control cycle in step S3 as the current control cycle and execute steps S401-S404.
[0070] As the motor control process progresses, the control cycle will change. Therefore, the next control cycle in step S3 should be used as the current control cycle, and then steps S401-S404 should be executed, so that the MTPA calculation model in step S1 is iteratively updated in each subsequent control cycle of the motor control process to improve the dynamic performance of the motor MTPA control.
[0071] S401 : Control the motor according to the shaft current reference value of the current control cycle.
[0072] In the current control cycle of each motor, the shaft current reference value of the current control cycle calculated from the previous control cycle is used to control the motor. As an optional implementation of this embodiment, controlling the motor according to the shaft current reference value of the current control cycle may specifically include the following steps:
[0073] The shaft current reference value and the actual shaft current of the motor are input into the PI controller, and the output result of the PI controller is subjected to feedforward decoupling compensation and controller delay compensation. Then, coordinate transformation is performed to obtain the voltage under the α-β axis as the input of the space vector pulse width modulation strategy. Six pulse signals are obtained to control the operation of the two-level three-phase voltage source inverter and drive the motor.
[0074] S402 : Calculate the partial derivative error of the current control period according to the shaft current reference value of the control period in which the torque reference value changes and the shaft current reference value of the current control period.
[0075] In this embodiment, the partial derivative error of the current control period is calculated based on the shaft current reference value of the control period in which the torque reference value changes and the shaft current reference value of the current control period. The following formula can be used:
[0076] ,
[0077] in:
[0078] ,
[0079] ,
[0080] In the above formula, and is the partial derivative error of the current control cycle, and is the shaft current reference value of the current control cycle, and is the shaft current reference value during the control period in which the torque reference value changes, and is and The inductance value under the combination, and is and The inductance value under the combination, and is and The inductance value of the combination.
[0081] It should be noted that, in the prior art, the calculation of the partial derivative error is usually completed based on the actual shaft current. However, since the calculation process requires obtaining the inductance value under different actual shaft current combinations, and the inductance value generated by the actual shaft current combination under different control cycles is difficult to obtain simultaneously through the online parameter identification algorithm. Therefore, in order to avoid the harmonic content and current sampling error in the actual shaft current from having an undue impact on the calculation accuracy, this embodiment will perform calculations based on the shaft current reference value, and obtain the inductance value under different shaft current reference value combinations through the inductance lookup table method, so as to accurately calculate the partial derivative error of the current control cycle. Accordingly, the partial derivative error of the current control cycle obtained by calculation can be used to iteratively correct the MTPA calculation model in step S1 in subsequent steps, so that the shaft current reference value of the next control cycle is more accurate.
[0082] S403: Calculate the error coefficient of the current control cycle based on the partial derivative error of the current control cycle and the partial derivative error of the previous control cycle.
[0083] Since each iterative correction of the MTPA calculation model in step S1 through the partial derivative error will cause the shaft current reference value of the next control cycle to change, in order to reasonably control the number of iterative corrections of the MTPA calculation model in step S1 so that the shaft current reference value of the motor can gradually stabilize while ensuring control accuracy during the control process, this embodiment will calculate the error coefficient of the current control cycle based on the partial derivative error of the current control cycle and the partial derivative error of the previous control cycle.
[0084] Specifically, the error coefficient of the current control cycle can be calculated using the following formula:
[0085] ,
[0086] In the above formula, is the error coefficient of the current control cycle, and is the partial derivative error of the current control cycle, and is the partial derivative error of the previous control cycle.
[0087] S404. Compare the error coefficient of the current control cycle with the preset limit. When the error coefficient of the current control cycle is greater than the preset limit, execute step S5. When the error coefficient of the current control cycle is less than or equal to the preset limit, execute step S6.
[0088] After the error coefficient calculation of the current control cycle is completed, the error coefficient of the current control cycle can be compared with the preset limit, and based on the comparison result, it is determined whether the MTPA calculation model in step S1 needs to be iteratively corrected in subsequent control cycles.
[0089] When the error coefficient of the current control cycle is greater than the preset limit, it is proved that the iterative correction of the MTPA calculation model in step S1 by the partial derivative error of the current control cycle is insufficient to produce sufficient control accuracy, and step S5 should be executed at this time.
[0090] When the error coefficient of the current control cycle is less than or equal to the preset limit, it is proved that iteratively correcting the MTPA calculation model in step S1 through the partial derivative error of the current control cycle can produce sufficient control accuracy, and step S6 should be executed at this time.
[0091] As an example and not a limitation, the preset limit in this embodiment can be set to 0.05. The staff can also adjust the preset limit according to actual needs so that the size of the preset limit matches the actual hardware conditions of the hub motor and the new energy vehicle.
[0092] S5. Iteratively correct the MTPA calculation model in step S1 according to the partial derivative error of the current control cycle in step S404, calculate the shaft current reference value of the next control cycle in step S404 using the iteratively corrected MTPA calculation model, and use the next control cycle in step S404 as the current control cycle, and return to execute step S401.
[0093] For example, assuming that the torque reference value changes in the Xth control cycle, and after the motor is controlled by the hub motor MTPA control method provided by this embodiment, the error coefficient of the X+1th control cycle is greater than the preset limit, then the torque reference value should be changed according to and Replace the MTPA calculation model and , thereby completing the iterative correction of the MTPA calculation model, so that the shaft current reference value of the X+2 control cycle can be calculated through the iteratively corrected MTPA calculation model and Then the X+2th control cycle is taken as the new current control cycle, and the process returns to step S401 until the process is completed in step S404. Compare with the preset limit to determine whether it is necessary to and The MTPA calculation model is iteratively revised again.
[0094] S6. Perform a final correction on the MTPA calculation model in step S1 according to the partial derivative error of the current control cycle in step S404, and calculate the shaft current reference value of all subsequent control cycles through the final corrected MTPA calculation model. When each subsequent control cycle is used as the current control cycle, the motor is controlled according to the shaft current reference value of the current control cycle.
[0095] For example, assuming that the torque reference value changes in the Xth control cycle, and after the motor is controlled by the hub motor MTPA control method provided by this embodiment, the error coefficient of the X+5th control cycle is less than or equal to the preset limit, then the torque reference value should be changed according to and Replace the MTPA calculation model and , thus completing the final correction of the MTPA calculation model. In each subsequent control cycle, the corresponding shaft current reference value is calculated using the final corrected MTPA calculation model, and the motor is subsequently controlled using the stable and accurate shaft current reference value.
[0096] It should be noted that when the hub motor MTPA control method provided in this embodiment is used to control the motor, if the torque reference value is detected to have changed again in a certain control cycle, the process should directly return to step S3 so that the subsequent control of the motor meets the new torque reference value change requirements.
[0097] This embodiment provides a method for controlling in-wheel hub motors (MTPA). This method uses an MTPA calculation model optimized based on the inductance-induced partial derivative of current to calculate the shaft current reference value for the next control cycle. This allows for the control process to account for the partial derivative error of the inductance-induced current. The method also directly triggers the calculation process during control cycles where the torque reference value changes, avoiding partial derivative calculation delays. Furthermore, the iterative processing loop is controlled by comparing the error coefficient with a preset limit. This improves the control accuracy and dynamic performance of the MTPA, adapting to the high-torque-variation operating conditions required by in-wheel hub motor control for new energy vehicles.
[0098] Because this embodiment controls the iterative correction loop of the MTPA calculation model by comparing a preset limit with the error coefficient, the preset limit is inversely proportional to the MTPA control accuracy and directly proportional to the MTPA point tracking speed. In actual applications, the preset limit can be flexibly adjusted to meet the specific operating conditions of new energy vehicles, thereby regulating the relationship between control accuracy and tracking speed, improving the adaptability of the in-wheel motor control effect to actual application scenarios.
[0099] To achieve the above purpose, this embodiment may further include the following steps before executing step S404:
[0100] The change in the torque reference value is obtained, and when the change in the torque reference value is greater than a preset change threshold, the preset limit value is increased, and the increase in the preset limit value is proportional to the change in the torque reference value.
[0101] Accordingly, step S404 can be specifically optimized as follows:
[0102] The error coefficient of the current control cycle is compared with the increased preset limit. When the error coefficient of the current control cycle is greater than the increased preset limit, step S5 is executed. When the error coefficient of the current control cycle is less than or equal to the increased preset limit, step S6 is executed.
[0103] When the change amount of the torque reference value is greater than the preset change amount threshold, it proves that the new energy vehicle encounters a special working condition of torque demand mutation (for example, when obstacles suddenly appear in the disengaged dangerous area or the direction of travel, the vehicle needs to be accelerated or braked). In this special working condition, the importance of control accuracy is far lower than the importance of tracking speed, so the preset limit value can be increased to reduce the number of iterative corrections of the MTPA calculation model, so as to ensure that the motor quickly tracks the change result of the torque reference value in the control process and timely meets the special working condition demand encountered by the new energy vehicle. Correspondingly, since the greater the change amount of the torque reference value, the higher the requirement for tracking speed in the current special working condition, the preset limit value can be increased when the preset limit value is increased in the special working condition, so that the increase amount of the preset limit value is proportional to the change amount of the torque reference value, thereby further improving the matching degree between the increased preset limit value and the special working condition.
[0104] In addition, after increasing the preset limit value based on the special working condition, the embodiment can further include the following steps:
[0105] During the execution of steps S401-S404, the real-time torque of the motor is continuously monitored, and when the difference between the real-time torque and the change result of the torque reference value in step S3 is less than the preset difference threshold, the preset limit value in step S404 is restored to the initial value.
[0106] When the difference between the real-time torque and the change result of the torque reference value is less than the preset difference threshold, it proves that the torque output by the current new energy vehicle hub motor can basically meet the application demand of the special working condition, and at this time the preset limit value can be restored to the initial value, thereby improving the control accuracy of the motor in the subsequent control period.
[0107] Embodiment Two
[0108] Figure 2 is a structural schematic diagram of the hub motor MTPA control device provided by the embodiment two of the application, as Figure 2 shown, the hub motor MTPA control device comprises:
[0109] The model construction module 210 is configured to construct an MTPA calculation model based on inductance optimization of the current partial derivative term.
[0110] The monitoring module 220 is configured to monitor the torque reference value of the motor.
[0111] The initial setting module 230 is configured to, when it is monitored that the torque reference value changes, take the control period in which the torque reference value changes as a current control period; acquire an axis current reference value of the current control period and a partial derivative error of a previous control period; control the motor according to the axis current reference value of the current control period; set the partial derivative error of the previous control period as a partial derivative error of the current control period, and calculate an axis current reference value of a next control period through the MTPA calculation model in step S1;
[0112] The iterative execution module 240 is configured to take the next control period in step S3 as the current control period, and execute steps S401-S404.
[0113] The iterative execution module 240 comprises:
[0114] The motor control unit 241 is configured to control the motor according to the axis current reference value of the current control period.
[0115] The first calculation unit 242 is configured to calculate the partial derivative error of the current control period according to the axis current reference value of the control period in which the torque reference value changes and the axis current reference value of the current control period.
[0116] The second calculation unit 243 is configured to calculate an error coefficient of the current control period according to the partial derivative error of the current control period and the partial derivative error of the previous control period.
[0117] The comparison unit 244 is configured to compare the error coefficient of the current control period with a preset limit value, execute step S5 when the error coefficient of the current control period is greater than the preset limit value, and execute step S6 when the error coefficient of the current control period is less than or equal to the preset limit value.
[0118] The iterative correction unit 250 is configured to iteratively correct the MTPA calculation model in step S1 according to the partial derivative error of the current control period in step S404, calculate the axis current reference value of the next control period in step S404 through the iteratively corrected MTPA calculation model, and take the next control period in step S404 as the current control period, and return to execute step S401.
[0119] The subsequent control module 260 is configured to finally correct the MTPA calculation model in step S1 according to the partial derivative error of the current control period in step S404, and calculate the axis current reference value of all subsequent control periods through the finally corrected MTPA calculation model, and control the motor according to the axis current reference value of the current control period when each of the subsequent control periods is taken as the current control period.
[0120] The in-wheel motor MTPA control device provided in this embodiment can take into account the partial derivative error of the inductance on the current during the control process, avoid the resulting partial derivative calculation delay, and reasonably control the iterative cycle process of the MTPA calculation model. Therefore, it can improve the control accuracy and dynamic performance of the MTPA and adapt to the large torque change working conditions required by the in-wheel motor control of new energy vehicles.
[0121] Based on the technology of the above embodiment, the iterative execution module further includes:
[0122] a preset limit value increasing unit, configured to obtain a change in the torque reference value, and increase the preset limit value when the change in the torque reference value is greater than a preset change value threshold, wherein the increase in the preset limit value is proportional to the change in the torque reference value;
[0123] The preset limit value recovery unit is used to continuously monitor the real-time torque of the motor during the execution of steps S401-S404, and when the difference between the real-time torque and the change result of the torque reference value in step S3 is less than the preset difference threshold, restore the preset limit value in step S404 to the initial value.
[0124] The in-wheel motor MTPA control device provided in the embodiment of the present invention can execute the in-wheel motor MTPA control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0125] Example 3
[0126] Figure 3 A schematic diagram of the structure of a device provided in Example 3 of the present invention. Figure 3 A block diagram of an exemplary device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 3 The device 12 shown is only an example and should not bring any limitation to the functionality and scope of use of the embodiments of the present invention.
[0127] like Figure 3 As shown, device 12 is implemented as a general-purpose computing device. Components of device 12 may include, but are not limited to, one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including system memory 28 and processing unit 16).
[0128] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0129] Device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by device 12, including volatile and non-volatile media, removable and non-removable media.
[0130] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be configured to read and write non-removable, non-volatile magnetic media ( Figure 3 Not shown, usually called a "hard drive"). Although Figure 3 Although not shown, a magnetic disk drive for reading and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), as well as an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present invention.
[0131] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 42 generally implement the functions and / or methodologies of the embodiments described herein.
[0132] Device 12 may also communicate with one or more external devices 14 (e.g., a keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with device 12, and / or any device that enables device 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). This communication may occur via input / output (I / O) interface 22. Furthermore, device 12 may communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of device 12 via bus 18. It should be understood that, although not shown, other hardware and / or software modules may be used in conjunction with device 12, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0133] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28 , such as implementing the in-wheel motor MTPA control method provided in an embodiment of the present invention.
[0134] Example 4
[0135] The fourth embodiment of the present invention further provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to execute the in-wheel motor MTPA control method as described in any of the above embodiments.
[0136] The computer storage medium of the embodiments of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0137] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0138] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0139] Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0140] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.
Claims
1. A hub motor MTPA control method, characterized in that The steps include: S1. Construct an MTPA calculation model based on the optimization of the inductance-current partial derivative; S2, monitoring the torque reference value of the motor; S3. When a change in the torque reference value is detected, the control period in which the torque reference value changes is taken as the current control period; the shaft current reference value of the current control period and the partial derivative error of the previous control period are obtained; the motor is controlled according to the shaft current reference value of the current control period; the partial derivative error of the previous control period is set as the partial derivative error of the current control period, and the shaft current reference value of the next control period is calculated using the MTPA calculation model in step S1; S4. Take the next control cycle in step S3 as the current control cycle and execute steps S401-S404; S401, controlling the motor according to the shaft current reference value of the current control cycle; S402, calculating the partial derivative error of the current control period based on the shaft current reference value of the control period in which the torque reference value changes and the shaft current reference value of the current control period; S403, calculating the error coefficient of the current control cycle based on the partial derivative error of the current control cycle and the partial derivative error of the previous control cycle; Obtaining a change in the torque reference value, and when the change in the torque reference value is greater than a preset change threshold, increasing a preset limit value, wherein the increase in the preset limit value is proportional to the change in the torque reference value; S404: Compare the error coefficient of the current control cycle with the increased preset limit value. If the error coefficient of the current control cycle is greater than the increased preset limit value, execute step S5; if the error coefficient of the current control cycle is less than or equal to the increased preset limit value, execute step S6. S5. Iteratively correct the MTPA calculation model in step S1 according to the partial derivative error of the current control cycle in step S404, calculate the shaft current reference value of the next control cycle in step S404 using the iteratively corrected MTPA calculation model, and use the next control cycle in step S404 as the current control cycle, and return to step S401 for execution; S6. Perform a final correction on the MTPA calculation model in step S1 according to the partial derivative error of the current control cycle in step S404, and calculate the shaft current reference value of all subsequent control cycles through the final corrected MTPA calculation model. When each subsequent control cycle is used as the current control cycle, the motor is controlled according to the shaft current reference value of the current control cycle.
2. The in-wheel motor MTPA control method according to claim 1, characterized in that: The calculation formula of the MTPA calculation model based on the optimization of the inductance to the current partial derivative is as follows: , Where A, F, and G are all calculation coefficients, and: , , , , , , , , , In the above formula, B, C, D, H, I, and J are all intermediate calculation quantities. and is the partial derivative error of the current control cycle, and is the shaft current reference value for the next control cycle, is the torque, is the permanent magnet flux, is the number of motor pole pairs, and is the inductance value.
3. The in-wheel motor MTPA control method according to claim 1, characterized in that: The motor is controlled based on the shaft current reference value of the current control cycle, including: The shaft current reference value and the actual shaft current of the motor are input into the PI controller, and the output result of the PI controller is subjected to feedforward decoupling compensation and controller delay compensation. Then, coordinate transformation is performed to obtain the voltage under the α-β axis as the input of the space vector pulse width modulation strategy. Six pulse signals are obtained to control the operation of the two-level three-phase voltage source inverter and drive the motor.
4. The in-wheel motor MTPA control method according to claim 1, characterized in that: The partial derivative error of the current control period is calculated based on the shaft current reference value of the control period in which the torque reference value changes and the shaft current reference value of the current control period, using the following formula: , in: , , In the above formula, and is the partial derivative error of the current control cycle, and is the shaft current reference value of the current control cycle, and is the shaft current reference value during the control period in which the torque reference value changes, and is and The inductance value under the combination, and is and The inductance value under the combination, and is and The inductance value of the combination.
5. The in-wheel motor MTPA control method according to claim 1, characterized in that: The error coefficient of the current control cycle is calculated based on the partial derivative error of the current control cycle and the partial derivative error of the previous control cycle, using the following formula: , In the above formula, is the error coefficient of the current control cycle, and is the partial derivative error of the current control cycle, and is the partial derivative error of the previous control cycle.
6. The in-wheel motor MTPA control method according to claim 1, characterized in that: After increasing the preset limit value, the in-wheel motor MTPA control method further includes: During the execution of steps S401-S404, the real-time torque of the motor is continuously monitored. When the difference between the real-time torque and the change result of the torque reference value in step S3 is less than the preset difference threshold, the preset limit value in step S404 is restored to the initial value.
7. A hub motor MTPA control device, characterized in that: include: Model building module, used to build an MTPA calculation model based on the optimization of the inductance-current partial derivative; A monitoring module is used to monitor the torque reference value of the motor; An initial setting module is used to, when a change in the torque reference value is detected, set the control period in which the torque reference value changes as the current control period; obtain the shaft current reference value of the current control period and the partial derivative error of the previous control period; control the motor according to the shaft current reference value of the current control period; set the partial derivative error of the previous control period as the partial derivative error of the current control period, and calculate the shaft current reference value of the next control period using the MTPA calculation model in step S1; An iterative execution module, configured to use the next control cycle in step S3 as the current control cycle and execute steps S401 to S404; The iterative execution module includes: A motor control unit, configured to control the motor according to a shaft current reference value of a current control cycle; a first calculation unit, configured to calculate a partial derivative error of a current control period based on a shaft current reference value of a control period in which a torque reference value changes and a shaft current reference value of a current control period; A second calculation unit is used to calculate the error coefficient of the current control cycle based on the partial derivative error of the current control cycle and the partial derivative error of the previous control cycle; a preset limit value increasing unit, configured to obtain a change in the torque reference value, and to increase the preset limit value when the change in the torque reference value is greater than a preset change value threshold, wherein the increase in the preset limit value is proportional to the change in the torque reference value; a comparing unit, configured to compare the error coefficient of the current control cycle with the increased preset limit value, and execute step S5 when the error coefficient of the current control cycle is greater than the increased preset limit value, and execute step S6 when the error coefficient of the current control cycle is less than or equal to the increased preset limit value; an iterative correction module, configured to iteratively correct the MTPA calculation model in step S1 according to the partial derivative error of the current control cycle in step S404, calculate the shaft current reference value of the next control cycle in step S404 using the iteratively corrected MTPA calculation model, and use the next control cycle in step S404 as the current control cycle, and return to step S401 for execution; The subsequent control module is used to make a final correction to the MTPA calculation model in step S1 according to the partial derivative error of the current control cycle in step S404, and calculate the shaft current reference value of all subsequent control cycles through the final corrected MTPA calculation model, and control the motor according to the shaft current reference value of the current control cycle when each subsequent control cycle is used as the current control cycle.
8. A device, characterized in that The device comprises: one or more processors; a storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the in-wheel motor MTPA control method according to any one of claims 1 to 6.
9. A storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the in-wheel motor MTPA control method according to any one of claims 1 to 6.