Motor control method, device, equipment, storage medium and product
By calculating the speed difference and cumulative time of the two-side motor, adjusting the motor speed to solve the problem of vehicle yaw, the vehicle is accurately returned to the set route, and the problem of vehicle yaw after motor synchronization in the prior art is solved.
Patent Information
- Application Number
- CN202111050402.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-08
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2041-09-08
AI Technical Summary
The existing motor synchronization control method only considers the synchronization problem when the vehicle cannot travel directly, which fails to effectively solve the vehicle's yaw problem, resulting in the vehicle being unable to return to the original route.
By obtaining the speed difference of the two-sided motor, calculate the compensation value and adjust the motor speed to return the vehicle to the set route. The specific steps include obtaining the speed of the two-sided motor, calculating the speed difference value to judge the yaw, determining the compensation value based on the accumulated time, and adjusting the speed according to these values to correct the yaw.
It effectively solves the problem of vehicle yaw, enables the vehicle to return to the original route, and improves the accuracy and stability of motor synchronization control.
Smart Images

Figure CN113726227B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of motor control technology, and in particular to a motor control method, device, equipment, storage medium and product. Background Art
[0002] Electric vehicle technology has developed rapidly in recent years. Compared with traditional fuel vehicles, it has the advantages of high energy efficiency, low pollutant emissions, and fast power response. It is one of the important directions for the development of future automotive technology. Wheel-side motor drive vehicles are one type of electric vehicles. Its unique differential drive mode enables it to complete in-situ steering and other actions, and has higher control flexibility than track steering vehicles.
[0003] The dual-motor independent drive system achieves straight driving of the vehicle by synchronizing the speed of the left and right motors. However, due to many uncertainties, such as actual road conditions, differences in the motors on both sides, the vehicle's own structure, and sudden changes in the load on the left and right sides, the motors are easily out of sync, causing the vehicle to be unable to go straight and deviate from the original route. The commonly used method is to synchronize the motors based on speed adjustment so that the vehicle can go straight. When the speeds of the two motors are different, the two motors are used as compensation objects. The error and duty ratio of the synchronous speed compensation of the two motors are used to further obtain the final compensation duty ratio, and the speed of the compensation object is adjusted according to the final compensation duty ratio. The speeds of the two motors are adjusted in turn so that the vehicle can go straight.
[0004] However, the existing adjustment method only considers motor synchronization. After the vehicle's motor is synchronized, the vehicle will go straight along the new route. At this time, the vehicle has deviated and cannot travel on the original route. Summary of the invention
[0005] The present invention provides a motor control method, device, equipment, storage medium and product, which are used to solve the vehicle yaw problem caused by only considering motor synchronization but not considering motor synchronization when the vehicle cannot go straight.
[0006] In a first aspect, the present invention provides a motor control method, comprising:
[0007] Acquire a first rotation speed corresponding to the first motor and a second rotation speed corresponding to the second motor;
[0008] Obtaining a current speed difference according to the first speed and the second speed, and determining whether the vehicle deviates from a set route according to the current speed difference;
[0009] If yes, determining a first compensation value according to the current speed difference and the current accumulated time corresponding to the current speed difference, and determining a second compensation value according to the current accumulated speed difference corresponding to the current accumulated time;
[0010] A corresponding rotation speed correction value is determined according to the first compensation value and the second compensation value, and the rotation speed of the corresponding motor is adjusted according to the corresponding rotation speed correction value so that the vehicle returns to the set route.
[0011] In a second aspect, the present invention provides a motor control device, comprising:
[0012] An acquisition module, used to acquire a first rotation speed corresponding to the first motor and a second rotation speed corresponding to the second motor;
[0013] a determination module, configured to obtain a current speed difference value according to the first speed and the second speed, and determine whether the vehicle deviates from a set route according to the current speed difference value;
[0014] a compensation value calculation module, for determining a first compensation value according to a current rotation speed difference and a current accumulated time corresponding to the current rotation speed difference, and determining a second compensation value according to a current accumulated rotation speed difference corresponding to the current accumulated time;
[0015] A control unit is used to determine a corresponding speed correction value according to the first compensation value and the second compensation value, and adjust the speed of the corresponding motor according to the corresponding speed correction value so that the vehicle returns to a set route.
[0016] In a third aspect, the present invention provides an electronic device, comprising: at least one processor and a memory;
[0017] The memory stores computer-executable instructions;
[0018] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to the first aspect.
[0019] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.
[0020] In a fifth aspect, the present invention provides a computer program product, comprising a computer program, which implements the method described in the first aspect when executed by a processor.
[0021] The present invention provides a motor control method, device, equipment, storage medium and product, which obtains a first speed corresponding to a first motor and a second speed corresponding to a second motor, further obtains a current speed difference value based on the first speed and the second speed, and determines whether the vehicle deviates from the set route based on the current speed difference value. If the vehicle deviates from the set route, a first compensation value is determined based on the current speed difference value and the current accumulated time corresponding to the current speed difference, thereby determining a second compensation value based on the current accumulated speed difference value corresponding to the current accumulated time, further determining a corresponding speed correction value based on the first compensation value and the second compensation value, and adjusting the speed of the corresponding motor based on the corresponding speed correction value, so that the vehicle returns to the set route. By adjusting the speed of the motor to make the adjusted vehicle return to the set route, the problem of vehicle deviation is effectively solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0023] Figure 1 is a schematic diagram of the network architecture of the motor control method provided by the present invention;
[0024] Figure 2 is a flow chart of a motor control method provided in Embodiment 1 of the present invention;
[0025] Figure 3 is a flow chart of a motor control method provided in Embodiment 2 of the present invention;
[0026] Figure 4 is a flow chart of a motor control method provided by Embodiment 4 of the present invention;
[0027] Figure 5 is a flow chart of a motor control method provided in Embodiment 5 of the present invention;
[0028] Figure 6 is a flow chart of a motor control method provided in Embodiment 6 of the present invention;
[0029] Figure 7 is a schematic diagram of a double-sided motor drive system provided by an embodiment of the present invention;
[0030] Figure 8 is a flow chart of a motor control method provided in Embodiment 8 of the present invention;
[0031] Fig. 9 is a flowchart of a motor control method provided by Embodiment 9 of the present invention;
[0032] Fig.10is a schematic structural diagram of a motor control device provided by an embodiment of the present invention;
[0033] Fig.11 It is a block diagram of an electronic device for implementing the motor control method according to an embodiment of the present invention.
[0034] The above drawings show clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0035] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0036] In order to clearly understand the technical solution of the present application, the solution of the prior art is first introduced in detail.
[0037] In the prior art, the dual-side motor independent drive system achieves the straight-moving of the vehicle by synchronizing the speed of the left and right motors. However, due to many uncertainties, such as the actual road conditions, the difference between the motors on both sides, the vehicle's own structure, and the sudden change of the load on the left and right sides, it is easy to cause the motors to run asynchronously, resulting in the vehicle being unable to go straight and deviating from the original route. In order to make the vehicle go straight and reduce the difference between the motor speeds, there are currently two commonly used differential control strategies, based on speed regulation and based on torque regulation. Among them, the differential strategy based on torque control can adjust the torque output in real time according to the load changes during vehicle operation, and has good dynamic performance, but the essence of differential control is speed, and the torque and speed are nonlinear. Therefore, the control torque has a delay effect on the change of speed. The differential strategy based on speed control can accurately control the wheel speed and maintain the speed stable, so it has good stability and high precision. The existing differential control strategy mainly uses the duty cycle to adjust the motor speed to make the vehicle go straight. Specifically, the two motors are used as compensation objects, and the duty cycle corresponding to the speed of the compensation object is obtained, and the current synchronous speed compensation value of the compensation object is obtained as the synchronous speed compensation error. If the synchronous speed compensation error is greater than the preset error, a new duty cycle is further output according to the synchronous speed compensation error, and the duty cycle compensation amount at the current moment is obtained according to the synchronous speed compensation error and the duty cycle compensation amount at the previous moment. The speed of the compensation object is adjusted according to the corresponding duty cycle, the new duty cycle and the duty cycle compensation amount at the current moment, and the two motors are synchronized to make the vehicle go straight.
[0038] However, the existing adjustment method only considers motor synchronization to make the vehicle go straight when it is found that the vehicle is not going straight. After the vehicle's motor is synchronized, the vehicle will go straight along a new route. At this time, the vehicle has deviated from the original route. Although the vehicle goes straight, it is not traveling on the original route.
[0039] Therefore, in order to solve the problem of vehicle yaw caused by motor synchronization when the vehicle cannot go straight in the prior art, the inventors found in the research that by obtaining the current speed difference, further calculating the first compensation value according to the current speed difference and the current accumulated time, and determining the second compensation value according to the current accumulated speed difference corresponding to the current accumulated time, the speed correction value is calculated according to the first compensation value and the second compensation value, and the speed of the motor is adjusted according to the speed correction value. By adjusting the speed of the motor, the adjusted vehicle returns to the set route, thereby effectively solving the problem of vehicle yaw.
[0040] Therefore, based on the above creative findings, the inventors have proposed a technical solution of the embodiment of the present invention. The application scenario of the motor control method provided by the embodiment of the present invention is introduced below.
[0041] like Figure 1 As shown, the application scenario corresponding to the motor control method provided by the embodiment of the present invention includes: a vehicle 1, a motor control device 2 and a controller 3. The motor control device 2 and the controller 3 are arranged inside the vehicle 1, and the motor control device 2 and the controller 3 are connected in communication. The motor control device 2 is respectively connected to the first motor and the second motor ( Figure 1 The motor control device 2 is used to control the first motor and the second motor. After the controller 3 receives the vehicle start command, the controller 3 sends a monitoring command to the motor control device 2. The motor control device 2 obtains the first speed corresponding to the first motor and the second speed corresponding to the second motor according to the monitoring command, and further obtains the current speed difference according to the first speed and the second speed, and determines whether the vehicle deviates from the set route according to the current speed difference. If so, the first compensation value is determined according to the current speed difference and the current accumulated time corresponding to the current speed difference, and the second compensation value is determined according to the current accumulated speed difference corresponding to the current accumulated time, and the corresponding speed correction value is determined according to the first compensation value and the second compensation value, and the speed of the corresponding motor is adjusted according to the corresponding speed correction value, so that the vehicle returns to the set route. By adjusting the speed of the motor, the adjusted vehicle returns to the set route, which effectively solves the problem of vehicle deviation.
[0042] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0043] Embodiment 1
[0044] Figure 2 is a flow chart of a motor control method provided in the first embodiment of the present invention, such as Figure 2 As shown, the motor control method provided in this embodiment is performed by a motor control device, and the motor control device is located in an electronic device. The motor control method provided in this embodiment includes the following steps:
[0045] Step 101, obtaining a first rotation speed corresponding to a first motor and a second rotation speed corresponding to a second motor.
[0046] In this embodiment, while the vehicle is traveling, a first rotational speed corresponding to the first motor and a second rotational speed corresponding to the second motor are obtained, and by comparing the first rotational speed and the second rotational speed, it can be determined whether the vehicle deviates from the set route.
[0047] It should be noted that deviation from the set route means that the vehicle was originally in a straight line, but due to actual road conditions, differences in the motors on both sides, the vehicle's own structure, sudden changes in load on the left and right sides, etc., the motors may run out of sync, causing the vehicle to be unable to follow the original route. It is not a deviation from the set route caused by the driver turning.
[0048] Step 102, obtaining a current speed difference according to the first speed and the second speed, and determining whether the vehicle deviates from a set route according to the current speed difference.
[0049] In this embodiment, the difference between the first speed and the second speed is calculated, and the difference is used as the current speed difference. Whether the vehicle deviates from the set route is determined based on the current speed difference. If the current speed difference is relatively large, it means that the difference between the first speed and the second speed is relatively large, and it is determined that the vehicle deviates from the set route; if the current speed difference is relatively small, it means that the difference between the first speed and the second speed is within an acceptable range and does not cause deviation, and it is determined that the vehicle has not deviated from the set route.
[0050] Step 103: If yes, determine a first compensation value according to the current rotation speed difference and the current accumulated time corresponding to the current rotation speed difference, and determine a second compensation value according to the current accumulated rotation speed difference corresponding to the current accumulated time.
[0051] In this embodiment, if it is determined that the vehicle has deviated from the set route, the vehicle needs to be returned to the set route, and the speed corresponding to the motor is further adjusted according to the compensation value, wherein the compensation value includes a first compensation value and a second compensation value. Specifically, the first compensation value is determined according to the current speed difference and the current accumulated time corresponding to the current speed difference, and the second compensation value is determined according to the current accumulated speed difference corresponding to the current accumulated time.
[0052] Step 104 , determining a corresponding rotation speed correction value according to the first compensation value and the second compensation value, and adjusting the rotation speed of the corresponding motor according to the corresponding rotation speed correction value, so as to return the vehicle to the set route.
[0053] In this embodiment, the speed correction value corresponding to the first motor is calculated based on the first compensation value, the second compensation value and the first speed, and the speed correction value corresponding to the second motor is calculated based on the first compensation value, the second compensation value and the second speed. The speed of the first motor is adjusted according to the speed correction value corresponding to the first motor, and the speed of the second motor is adjusted according to the speed correction value corresponding to the second motor. By adjusting the speed of the motor, the adjusted vehicle returns to the set route, effectively solving the problem of vehicle yaw.
[0054] Embodiment 2
[0055] Figure 3 is a flow chart of a motor control method provided by Embodiment 2 of the present invention, such as Figure 3 As shown, based on the motor control method provided in the first embodiment of the present invention, the first compensation value is determined according to the current speed difference and the current accumulated time corresponding to the current speed difference in step 103, and the following steps are further refined:
[0056] Step 1031, obtaining a current accumulated time corresponding to the current rotation speed difference and a first mapping table corresponding to a preset rotation speed difference and a preset accumulated time.
[0057] In this embodiment, if it is determined that the vehicle has deviated from the set route, the current accumulated time corresponding to the current speed difference and the first mapping table corresponding to the preset speed difference and the preset accumulated time are obtained, wherein the current accumulated time corresponding to the current speed difference is the time corresponding to the deviation from the set route. When the speed difference is large, it means that the vehicle has deviated from the route, so the accumulated time is also the time corresponding to the deviation from the set route. The first mapping table is shown in Table 1, and the first mapping table includes the preset speed difference, the preset accumulated time and the calibration coefficient.
[0058] Step 1032, determining a calibration coefficient according to the first mapping table, the current accumulated time and the current rotational speed difference, and determining a first compensation value according to the current rotational speed difference and the calibration coefficient.
[0059] In this embodiment, the current accumulated time and the current speed difference are matched with the preset accumulated time and the preset speed difference in the first mapping table, respectively. For example, the current accumulated time is first matched with the preset time in the first mapping table to obtain a set of calibration coefficients, and then the current speed difference is matched with the preset speed difference in the first mapping table to obtain a set of calibration coefficients. The value at the intersection of the two sets of calibration coefficients is determined as the calibration coefficient. See Table 1, a is the speed difference, b is the accumulated time, if the current accumulated time is 4s, the current speed difference is 30 revolutions, 4s is matched with the preset time in the first mapping table to obtain a set of calibration coefficients, including 0, 0.5, 0.4, 0.5, 0.6, 1, 1, 1. 30 revolutions are matched with the preset speed difference in the first mapping table to obtain a set of calibration coefficients, including 0, 0.4, 0.5, 0.6, 1, 1.1, 1.1, 1.1. 0.5 is the value at the intersection of the two sets of calibration coefficients, and 0.5 is determined as the calibration coefficient. A first compensation value is further calculated based on the current rotation speed difference and the calibration coefficient.
[0060] Table 1 First mapping table
[0061]
[0062] It should be noted that the data in Table 1 is a part of the data in the first mapping table and does not represent all the data. The values and the units corresponding to the values are not limited to the above values and units, but can also be other suitable values and units.
[0063] Embodiment 3
[0064] Based on the motor control method provided in the second embodiment of the present invention, step A1032 is further refined to include the following steps:
[0065] 1032a, a first compensation value is calculated according to the current speed difference and the calibration coefficient. The first compensation value is expressed as:
[0066] S1=E×f Formula (1)
[0067] Wherein, S1 is the first compensation value, E is the speed difference, and f is the calibration coefficient.
[0068] In this embodiment, the current rotation speed difference and the calibration coefficient are substituted into formula (1) to calculate the first compensation value.
[0069] Embodiment 4
[0070] Figure 4 is a flow chart of a motor control method provided by Embodiment 4 of the present invention, such as Figure 4As shown, based on the motor control method provided in the first embodiment of the present invention, the second compensation value is determined according to the current accumulated speed difference corresponding to the current accumulated time in step 103, and the following steps are further refined:
[0071] A1031, obtains the current accumulated speed difference corresponding to the current accumulated time.
[0072] In this embodiment, the current accumulated time is the total deviation time corresponding to the deviation from the set route, and the current accumulated speed difference is the sum of the speed differences between the first motor and the second motor after the deviation from the set route is determined. The current accumulated speed difference corresponding to the current accumulated time is obtained.
[0073] A1032, obtaining a second mapping table corresponding to a preset compensation value, and determining a second compensation value according to the second mapping table and a current accumulated rotation speed difference.
[0074] In this embodiment, a second mapping table corresponding to the preset compensation value is obtained, as shown in Table 2. The second compensation value is determined according to the second mapping table and the current cumulative speed difference value. For example, if the current cumulative speed difference value is 1000m, the current cumulative speed difference value is matched with the preset cumulative speed difference value in the second mapping table, and the compensation speed 10 corresponding to the matched preset cumulative speed difference value is the second compensation value.
[0075] Table 2 Second mapping table
[0076] Accumulated speed difference 0 1000 3000 10000 20000 Compensation speed 0 <![CDATA[ 10 ]]> 30 100 100
[0077] It should be noted that the data in Table 2 is a part of the data in the second mapping table and does not represent all the data. The values and the units corresponding to the values are not limited to the above values and units, but can also be other suitable values and units.
[0078] Embodiment 5
[0079] Figure 5 is a flow chart of a motor control method provided in Embodiment 5 of the present invention, such as Figure 5 As shown, based on the motor control method provided in the first embodiment of the present invention, step 104 is further refined to include the following steps:
[0080] Step 1041: Determine a first speed coefficient corresponding to the first speed and a second speed coefficient corresponding to the second speed according to the first speed and the second speed.
[0081] In this embodiment, the first rotational speed is compared with the second rotational speed, and a first rotational speed coefficient corresponding to the first rotational speed and a second rotational speed coefficient corresponding to the second rotational speed are determined according to the comparison result.
[0082] Step 1042, determining a first speed correction value according to the first speed, the first speed coefficient, the first compensation value and the second compensation value, and determining a second speed correction value according to the second speed, the second speed coefficient, the first compensation value and the second compensation value.
[0083] In this embodiment, a first speed correction value is obtained based on the first speed, the first speed coefficient, the first compensation value and the second compensation calculation, and a second speed correction value is obtained based on the second speed, the second speed coefficient, the first compensation value and the second compensation calculation, wherein the first speed coefficient and the second speed coefficient are reciprocal numbers of each other.
[0084] Step 1043, adjusting the current speed of the first motor to the first speed correction value, and adjusting the current speed of the second motor to the second speed correction value.
[0085] In this embodiment, the speed of the first motor is corrected according to the first speed correction value, specifically, the current speed of the first motor is adjusted to the first speed correction value, and the speed of the second motor is corrected according to the second speed correction value, specifically, the current speed of the second motor is adjusted to the second speed correction value.
[0086] In this embodiment, the speed of the first motor is adjusted according to the speed correction value corresponding to the first motor, and the speed of the second motor is adjusted according to the speed correction value corresponding to the second motor. By adjusting the speed of the motor, the adjusted vehicle returns to the set route, effectively solving the problem of vehicle yaw.
[0087] Embodiment 6
[0088] Figure 6 is a flow chart of a motor control method provided in Embodiment 5 of the present invention, such as Figure 6 As shown, based on the motor control method provided in the first embodiment of the present invention, step 1041 is further refined to include the following steps:
[0089] Step 1041a, determining whether the first rotation speed is greater than the second rotation speed.
[0090] In this embodiment, the magnitude relationship between the first speed and the second speed is compared, and a first speed coefficient corresponding to the first speed and a second speed coefficient corresponding to the second speed are determined according to the magnitude relationship.
[0091] Step 1041b, if yes, then the preset first coefficient is determined as the first rotational speed coefficient, and the preset second coefficient is determined as the second rotational speed coefficient, and the preset first coefficient and the preset second coefficient are opposite numbers of each other.
[0092] In this embodiment, if the first speed is greater than the second speed, the preset first coefficient is determined as the first speed coefficient, wherein the preset first coefficient is a negative number, and the preset first coefficient can be set to -1, for example, the first speed is n1, and the second speed is n2, if n1>n2, then -1 is the first speed coefficient. At this time, the preset second coefficient is determined as the second speed coefficient, wherein the preset second coefficient is a positive number, and the preset second coefficient can be set to 1, and the preset second coefficient and the preset first coefficient are opposite numbers.
[0093] Step 1041c, if not, the preset second coefficient is determined as the first speed coefficient, and the preset first coefficient is determined as the second speed coefficient.
[0094] In this embodiment, if the first speed is less than the second speed, the preset second coefficient is determined as the first conversion coefficient. For example, if the first speed is n1 and the second speed is n2, if n1<n2, the preset second coefficient 1 is determined as the first speed coefficient. At this time, the preset first coefficient -1 is determined as the second speed coefficient.
[0095] like Figure 7 As shown, the double-sided motor drive system of the vehicle includes a first motor, a second motor, a first motor controller, a second motor controller and a vehicle controller, wherein the first motor controller is used to control the first motor, the second motor controller is used to control the second motor, and the vehicle controller is used to control the first motor controller and the second motor controller. The motor may be a wheel-side motor. The first motor controller, the second motor controller and the vehicle controller are connected in communication and may be connected via a CAN bus. Taking the first motor side as an example, the first motor controller or the vehicle controller determines whether the first speed n1 corresponding to the first motor is greater than the second speed n2 corresponding to the second motor. If n1>n2, the preset first coefficient is determined as the first speed coefficient, and the preset first coefficient is a negative number. Taking the second motor side as an example, the second motor controller or the vehicle controller determines whether the second speed n2 corresponding to the second motor is greater than the first speed n1 corresponding to the first motor. If n2<n1, the preset second coefficient is determined as the second speed coefficient. The preset second coefficient is a positive number. It is precisely because the speed of the first motor is greater than the speed of the second motor. In order to return to the original route, the first speed correction value corresponding to the first motor must be less than the second speed correction value corresponding to the second motor. The setting value of the first speed coefficient is smaller than the setting value of the second speed coefficient to satisfy the first speed correction value being less than the second speed correction value.
[0096] Embodiment 7
[0097] Based on the motor control method provided in the fifth embodiment of the present invention, the first speed correction value is determined according to the first speed, the first speed coefficient, the first compensation value and the second compensation value in step 1042, and the following steps are further refined:
[0098] Step 10421, calculating a first speed correction value according to the first speed, the first speed coefficient, the first compensation value and the second compensation value. The first speed correction value is expressed as:
[0099] N′1=N1-S1+S2×A1 Formula (2)
[0100] Among them, N1' is the first speed correction value, N1 is the first speed, S1 is the first compensation value, S2 is the second compensation value, and A1 is the first speed coefficient.
[0101] In this embodiment, the first speed, the first speed coefficient, the first compensation value, and the second compensation value are substituted into formula (2) to calculate the first speed correction value.
[0102] Optionally, the second speed correction value is determined according to the second speed, the second speed coefficient, the first compensation value, and the second compensation value in step 1042, and further refined, including the following steps:
[0103] Step 10422, calculating a first speed correction value according to the first speed, the first speed coefficient, the first compensation value, and the second compensation value. The first speed correction value is expressed as:
[0104] N′2=N2-S1+S2×A2 Formula (3)
[0105] Among them, N2' is the second speed correction value, N2 is the second speed, S1 is the first compensation value, S2 is the second compensation value, and A2 is the second speed coefficient.
[0106] In this embodiment, the second speed, the second speed coefficient, the first compensation value, and the second compensation value are substituted into formula (3) to calculate the second speed correction value.
[0107] Embodiment 8
[0108] Figure 8 is a flow chart of a motor control method provided in Embodiment 5 of the present invention, such as Figure 8 As shown, based on the motor control method provided in the first embodiment of the present invention, the step 102 of determining whether the vehicle deviates from the set route according to the current speed difference is further refined, including the following steps:
[0109] Step 1021, determine whether the current speed difference is greater than the preset speed difference; if so, execute step 1022; if not, execute step 1023.
[0110] In this embodiment, it is determined whether the current speed difference is greater than a preset speed difference, and whether the vehicle deviates from the set route is determined based on the determination result.
[0111] Step 1022, determining that the vehicle has deviated from the set route.
[0112] In this embodiment, if the current speed difference is greater than the preset speed difference, it means that the difference between the first speed and the second speed is large, the speeds are not synchronized, and it is determined that the vehicle has deviated from the set route.
[0113] Step 1023, determine that the vehicle has not deviated from the set route.
[0114] In this embodiment, if the current speed difference is less than or equal to the preset speed difference, it means that the difference between the first speed and the second speed is small, the speeds are basically synchronized, and it is determined that the vehicle has not deviated from the set route.
[0115] Embodiment 9
[0116] Fig. 9 is a flow chart of a motor control method provided in Embodiment 5 of the present invention, such as Fig. 9 As shown, based on the motor control method provided in the first embodiment of the present invention, after step 101, the following steps are also included:
[0117] Step 105, calculating the accumulated speed difference between the first speed and the second speed within a preset time.
[0118] In this embodiment, the accumulated speed difference between the first speed and the second speed within a preset time is calculated, wherein the preset time can be set according to actual working conditions, for example, the accumulated speed difference between the first speed and the second speed within 2 seconds is calculated.
[0119] Step 106, comparing the accumulated speed difference with the preset speed difference, generating corresponding prompt information according to the comparison result and outputting the corresponding prompt information.
[0120] In this embodiment, a preset speed difference is obtained, and the cumulative speed difference is compared with the preset speed difference. If the cumulative speed difference is greater than the preset speed difference, it means that the straight-ahead control has failed, and the driver needs to intervene. A prompt message corresponding to the straight-ahead control failure is generated and output. The prompt message can be input in the form of voice broadcast and / or display, so that the driver can control the vehicle according to the prompt message.
[0121] If the accumulated speed difference is less than or equal to the preset speed difference, it is determined whether the current speed corresponding to the first motor is greater than the preset target speed, and whether the current speed corresponding to the second motor is greater than the preset target speed, and further generates corresponding prompt information according to the judgment result and outputs the corresponding prompt information. If the current speed corresponding to the first motor and the current speed corresponding to the second motor are greater than the preset target speed, it means that the vehicle is speeding, and then the prompt information corresponding to speeding is generated and output, so that the user can control the vehicle speed. If the current speed corresponding to the motor and the current speed corresponding to the second motor are equal to the preset target speed, it means that the vehicle is traveling at a normal speed, and then the prompt information corresponding to not speeding is generated, and the prompt information is output, so that the user can understand the current vehicle speed. If the current speed corresponding to the motor and the current speed corresponding to the second motor are less than the preset target speed, it means that the vehicle is currently traveling at a low speed, and then the prompt information corresponding to the low speed is generated, and the prompt information is output, so that the user can adjust the current vehicle speed according to the prompt information. It should be noted that displaying the prompt information can be displaying the prompt information on the display screen and / or displaying the prompt information on the instrument panel.
[0122] In this embodiment, corresponding prompt information is further generated based on the speed difference between the first speed corresponding to the first motor and the second speed corresponding to the second motor, so as to enable the user to understand the current vehicle condition and reduce the possibility of danger.
[0123] Fig.10 FIG. 1 is a schematic diagram of the structure of a motor control device provided by an embodiment of the present invention. Fig.10 As shown, the motor control device 200 provided in this embodiment includes an acquisition module 201 , a determination module 202 , a compensation value calculation module 203 , and a control unit 204 .
[0124] Among them, the acquisition module 201 is used to obtain the first speed corresponding to the first motor and the second speed corresponding to the second motor. The determination module 202 is used to obtain the current speed difference according to the first speed and the second speed, and determine whether the vehicle deviates from the set route according to the current speed difference. The compensation value calculation module 203 is used to determine the first compensation value according to the current speed difference and the current accumulated time corresponding to the current speed difference, and determine the second compensation value according to the current accumulated speed difference corresponding to the current accumulated time. The control unit 204 is used to determine the corresponding speed correction value according to the first compensation value and the second compensation value, and adjust the speed of the corresponding motor according to the corresponding speed correction value to return the vehicle to the set route.
[0125] Optionally, the compensation value calculation module is also used to obtain the corresponding current accumulated time and a first mapping table corresponding to the preset speed difference and the preset accumulated time; determine the calibration coefficient according to the first mapping table, the current accumulated time and the current speed difference, and determine the first compensation value according to the current speed difference and the calibration coefficient.
[0126] Optionally, the compensation value calculation module is further used to calculate a first compensation value according to the current speed difference and the calibration coefficient, and the first compensation value is expressed as:
[0127] S1=E×f,
[0128] Wherein, S1 is the first compensation value, E is the speed difference, and f is the calibration coefficient.
[0129] Optionally, the compensation value calculation module is further used to obtain a current accumulated speed difference corresponding to the current accumulated time; obtain a second mapping table corresponding to a preset compensation value, and determine a second compensation value according to the second mapping table and the current accumulated speed difference.
[0130] Optionally, the control unit is also used to determine a first speed coefficient corresponding to the first speed and a second speed coefficient corresponding to the second speed based on the first speed and the second speed; determine a first speed correction value based on the first speed, the first speed coefficient, the first compensation value and the second compensation value, and determine a second speed correction value based on the second speed, the second speed coefficient, the first compensation value and the second compensation value; adjust the current speed of the first motor to the first speed correction value, and adjust the current speed of the second motor to the second speed correction value.
[0131] Optionally, the control unit is also used to determine whether the first speed is greater than the second speed; if so, the preset first coefficient is determined as the first speed coefficient, and the preset second coefficient is determined as the second speed coefficient, and the preset first coefficient and the preset second coefficient are opposite to each other; if not, the preset second coefficient is determined as the first speed coefficient, and the preset first coefficient is determined as the second speed coefficient.
[0132] Optionally, the control unit is further configured to calculate a first speed correction value according to the first speed, the first speed coefficient, the first compensation value, and the second compensation value, wherein the first speed correction value is expressed as:
[0133] N′1=N1-S1+S2×A1,
[0134] Among them, N1' is the first speed correction value, N1 is the first speed, S1 is the first compensation value, S2 is the second compensation value, and A1 is the first speed coefficient.
[0135] Optionally, the determination module is further used to determine whether the current speed difference is greater than a preset speed difference; if so, it is determined that the vehicle has deviated from the set route; if not, it is determined that the vehicle has not deviated from the set route.
[0136] Optionally, the motor control device further includes: an early warning unit.
[0137] The early warning unit is used to calculate the cumulative speed difference between the first speed and the second speed within a preset time; compare the cumulative speed difference with the preset speed difference, and generate corresponding prompt information according to the comparison result and output the corresponding prompt information.
[0138] Fig.11 is a block diagram of an electronic device for implementing the motor control method according to an embodiment of the present invention, such as Fig.11 As shown, the electronic device 300 includes: a memory 301 and a processor 302 .
[0139] The memory 301 stores computer executable instructions;
[0140] The processor executes 302 the computer-executable instructions stored in the memory, so that the processor executes the method provided by any one of the above embodiments.
[0141] In an exemplary embodiment, a computer-readable storage medium is further provided, in which computer-executable instructions are stored. The computer-executable instructions are executed by a processor to execute the method in any one of the above embodiments.
[0142] In an exemplary embodiment, a computer program product is also provided, including a computer program, and the computer program is executed by a processor to execute the method in any one of the above embodiments.
[0143] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention is indicated by the following claims.
[0144] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A motor control method, characterized in that: The method comprises: Acquire a first rotation speed corresponding to the first motor and a second rotation speed corresponding to the second motor; Obtaining a current speed difference according to the first speed and the second speed, and determining whether the vehicle deviates from a set route according to the current speed difference; If yes, determining a first compensation value according to the current speed difference and the current accumulated time corresponding to the current speed difference, and determining a second compensation value according to the current accumulated speed difference corresponding to the current accumulated time; Determining a corresponding speed correction value according to the first compensation value and the second compensation value, and adjusting the speed of the corresponding motor according to the corresponding speed correction value so as to return the vehicle to a set route; The determining of the first compensation value according to the current rotation speed difference and the current accumulated time corresponding to the current rotation speed difference includes: Obtaining the corresponding current accumulated time and a first mapping table corresponding to the preset speed difference and the preset accumulated time; determining a calibration coefficient according to the first mapping table, the current accumulated time and the current speed difference, and determining the first compensation value according to the current speed difference and the calibration coefficient; The determining the first compensation value according to the current rotation speed difference and the calibration coefficient includes: The first compensation value is calculated according to the current speed difference and the calibration coefficient, and the first compensation value is expressed as: S1=E×f, Wherein, S1 is the first compensation value, E is the speed difference, and f is the calibration coefficient.
2. The method according to claim 1, characterized in that The determining of the second compensation value according to the current accumulated rotation speed difference corresponding to the current accumulated time includes: Get the current accumulated speed difference corresponding to the current accumulated time; A second mapping table corresponding to a preset compensation value is obtained, and a second compensation value is determined according to the second mapping table and the current accumulated rotation speed difference.
3. The method according to claim 1, characterized in that Determining a corresponding speed correction value according to the first compensation value and the second compensation value, and adjusting the speed of the corresponding motor according to the corresponding speed correction value, includes: Determine a first speed coefficient corresponding to the first speed and a second speed coefficient corresponding to the second speed according to the first speed and the second speed; Determine a first speed correction value according to the first speed, the first speed coefficient, the first compensation value and the second compensation value, and determine a second speed correction value according to the second speed, the second speed coefficient, the first compensation value and the second compensation value; The current rotation speed of the first motor is adjusted to a first rotation speed correction value, and the current rotation speed of the second motor is adjusted to a second rotation speed correction value.
4. The method according to claim 3, characterized in that The determining, according to the first speed and the second speed, a first speed coefficient corresponding to the first speed and a second speed coefficient corresponding to the second speed includes: determining whether the first speed is greater than the second speed; If yes, the preset first coefficient is determined as the first rotational speed coefficient, and the preset second coefficient is determined as the second rotational speed coefficient, wherein the preset first coefficient and the preset second coefficient are opposite numbers of each other; If not, the preset second coefficient is determined as the first rotational speed coefficient, and the preset first coefficient is determined as the second rotational speed coefficient.
5. The method according to claim 3, characterized in that: The determining of the first speed correction value according to the first speed, the first speed coefficient, the first compensation value and the second compensation value comprises: The first speed correction value is calculated according to the first speed, the first speed coefficient, the first compensation value and the second compensation value, and the first speed correction value is expressed as: N1'=N1-S1+S2×A1, Among them, N1' is the first speed correction value, N1 is the first speed, S1 is the first compensation value, S2 is the second compensation value, and A1 is the first speed coefficient.
6. The method according to claim 1, characterized in that The determining whether the vehicle deviates from the set route according to the current speed difference includes: Determine whether the current speed difference is greater than the preset speed difference; If so, it is determined that the vehicle has deviated from the set route; If not, it is determined that the vehicle has not deviated from the set route.
7. The method according to claim 1, characterized in that After obtaining the first speed corresponding to the first motor and the second speed corresponding to the second motor, the method further includes: Calculate the cumulative speed difference between the first speed and the second speed within a preset time; The accumulated speed difference is compared with the preset speed difference, and corresponding prompt information is generated and output according to the comparison result.
8. A motor control device, characterized in that: include: An acquisition module, used to acquire a first rotation speed corresponding to the first motor and a second rotation speed corresponding to the second motor; a determination module, configured to obtain a current speed difference value according to the first speed and the second speed, and determine whether the vehicle deviates from a set route according to the current speed difference value; a compensation value calculation module, for determining a first compensation value according to a current rotation speed difference and a current accumulated time corresponding to the current rotation speed difference, and determining a second compensation value according to a current accumulated rotation speed difference corresponding to the current accumulated time; a control unit, configured to determine a corresponding rotation speed correction value according to the first compensation value and the second compensation value, and adjust the rotation speed of the corresponding motor according to the corresponding rotation speed correction value so as to return the vehicle to a set route; When the compensation value calculation module is used to determine the first compensation value according to the current rotation speed difference and the current accumulated time corresponding to the current rotation speed difference, it is specifically used to: Obtaining the corresponding current accumulated time and a first mapping table corresponding to the preset speed difference and the preset accumulated time; determining a calibration coefficient according to the first mapping table, the current accumulated time and the current speed difference, and determining the first compensation value according to the current speed difference and the calibration coefficient; When the compensation value calculation module is used to determine the first compensation value according to the current rotation speed difference and the calibration coefficient, it is specifically used to: The first compensation value is calculated according to the current speed difference and the calibration coefficient, and the first compensation value is expressed as: S1=E×f, Wherein, S1 is the first compensation value, E is the speed difference, and f is the calibration coefficient.
9. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Control device of electric vehicle
CN111516504A
Driving wheel rotating speed control method and system
CN112109557A
Four-wheel drive force control system and method and storage medium
CN112498125A
Vehicle wheel speed control method and equipment and electric vehicle
CN112519592A
Vehicle and control method for vehicle
US20180257651A1
