Motor control method, device, vehicle, storage medium and product
By filtering and compensating the original speed of the new energy vehicle motor, the reference speed and proportional compensation torque are generated, the vehicle jitter problem caused by fluctuations in the speed of the low-speed motor is solved, and a better low-speed vibration suppression effect is achieved.
Patent Information
- Application Number
- CN202411765373.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-12-04
AI Technical Summary
When the speed of the low-speed motor fluctuates, the output torque of the drive motor will undergo a step-by-step change, causing the torque transmitted by each shaft of the vehicle transmission system to oscillate violently, causing low-frequency jitters in the vehicle speed and affecting the smoothness of the vehicle. Due to delay problems, existing anti-shake solutions are difficult to achieve better anti-shake effect and may even have negative effects.
By obtaining the original speed of the corresponding motor of the vehicle, filtering the original speed based on the filter to obtain the speed compensation value, ensuring that the phase delay of the filter is less than the preset value. Then the original speed is compensated by the speed compensation value to obtain the reference speed, and the proportional compensation torque is determined based on the proportional control coefficient and reference speed of the motor, and finally the motor is controlled based on the target torque.
The speed compensation value is generated by the filter and proportional compensation torque is generated, so that the torque used for correction is as consistent as possible with the phase of the real-time motor speed, significantly improving the low-speed vibration suppression effect and better than the existing anti-shake solution.
Smart Images

Figure CN119218009B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle control technology, and in particular to a motor control method, device, vehicle, storage medium and product. Background Art
[0002] At present, new energy vehicle technology is becoming increasingly mature, and its functions or performance can basically meet the travel needs of users. However, it is worth noting that when the speed of the low-speed motor of a new energy vehicle fluctuates (such as sudden acceleration and deceleration and other transient conditions will cause speed fluctuations), the output torque of the vehicle drive motor will undergo a step mutation. Since the drive motor is coupled with the transmission system, the torque transmitted by each shaft of the vehicle transmission system will oscillate violently, resulting in low-frequency jitter of the vehicle speed, affecting the smoothness of the vehicle. In response to this situation, although there are related anti-shake solutions to solve the problem of vehicle jitter at low speeds, in actual applications, the related anti-shake solutions are difficult to achieve a good anti-shake effect due to the delay problem, and may even have a negative effect.
[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0004] The main purpose of the present application is to provide a motor control method, device, vehicle, storage medium and product, aiming to solve the technical problem that the anti-shake effect of related anti-shake solutions is poor.
[0005] To achieve the above object, the present application proposes a motor control method, which comprises the following steps:
[0006] Acquire an original speed of a motor corresponding to the vehicle, and filter the original speed based on a filter to obtain a speed compensation value, wherein a phase delay of the filter for the original speed is less than a preset value;
[0007] Compensating the original speed by the speed compensation value to obtain a reference speed, and determining a proportional compensation torque of the motor based on a proportional control coefficient of the motor and the reference speed;
[0008] The request torque of the motor is compensated based on the proportional compensation torque to obtain a target control torque of the motor, and the motor is controlled based on the target control torque.
[0009] Optionally, the step of compensating the requested torque of the motor based on the proportional compensation torque to obtain the target control torque of the motor includes:
[0010] Performing compensation constraints on the proportional compensation torque to obtain a new proportional compensation torque, wherein the new proportional compensation torque is within a preset compensation torque range;
[0011] The new proportional compensation torque is used to compensate the request torque of the motor to obtain the target control torque of the motor.
[0012] Optionally, before the step of determining the proportional compensation torque of the motor based on the proportional control coefficient of the motor and the reference speed, the method includes:
[0013] A preset proportional coefficient mapping table is queried, and a coefficient in the preset proportional coefficient mapping table corresponding to the requested torque of the motor and the reference speed is used as a proportional control coefficient of the motor.
[0014] Optionally, the step of controlling the motor based on the target control torque includes:
[0015] Determine the real-time current of the motor based on the preset voltage and current gain values in combination with the voltages obtained by the sensors in the motor;
[0016] The real-time current and the target control torque are input into a controller of the motor, and the motor is controlled to rotate by the controller.
[0017] Optionally, the step of determining the real-time current of the motor based on a preset voltage and current gain value in combination with the voltages obtained by each sensor in the motor includes:
[0018] For any one phase winding of the three-phase winding corresponding to the motor, a collection value of a target sensor located on the winding is obtained to obtain an output terminal voltage;
[0019] Calculating the phase current of the corresponding phase of the winding according to the difference between the output terminal voltage and the reference voltage of the target sensor, and the preset voltage-current conversion gain value of the target sensor;
[0020] After traversing the three-phase winding to obtain the three-phase current of the motor, the three-phase current is converted into the real-time current.
[0021] Optionally, for any one of the sensors to be calibrated, the sensor to be calibrated is correspondingly configured with a different DC correction current. Before the step of determining the real-time current of the motor based on a preset voltage and current gain value in combination with the voltages obtained by the sensors in the motor, the method includes:
[0022] For any one of the different DC correction currents configured for the sensor to be corrected, obtaining a correction voltage from the collected value of the sensor to be corrected when the DC correction current is applied to the winding where the sensor to be corrected is located;
[0023] Based on the correction current value of the DC correction current and the difference between the correction voltage and the reference voltage of the sensor to be corrected, a candidate voltage-to-current conversion gain value of the sensor to be corrected is calculated;
[0024] After traversing the different DC correction currents to obtain each candidate voltage-current conversion gain value, a preset voltage-current conversion gain value of the sensor to be calibrated is calculated based on each candidate voltage-current conversion gain value.
[0025] In addition, to achieve the above-mentioned purpose, the present application also proposes a motor control device, the motor control device comprising:
[0026] A filtering module, which obtains an original speed of a motor corresponding to the vehicle, and filters the original speed based on a filter to obtain a speed compensation value, wherein a phase delay of the filter for the original speed is less than a preset value;
[0027] a compensation module, configured to compensate the original speed by the speed compensation value to obtain a reference speed, and determine a proportional compensation torque of the motor based on a proportional control coefficient of the motor and the reference speed;
[0028] A control module is configured to compensate the request torque of the motor based on the proportional compensation torque to obtain a target control torque of the motor, and control the motor based on the target control torque.
[0029] In addition, to achieve the above objectives, the present application also proposes a vehicle, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the motor control method as described above.
[0030] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the motor control method described above are implemented.
[0031] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the motor control method described above are implemented.
[0032] One or more technical solutions proposed in this application have at least the following technical effects:
[0033] In the embodiment of the present application, the vehicle will obtain the original speed of the motor corresponding to the vehicle, and filter the original speed based on the filter to obtain the speed compensation value, wherein the phase delay of the filter for the original speed is less than the preset value; the original speed is compensated by the speed compensation value to obtain the reference speed, and the proportional compensation torque of the motor is determined based on the proportional control coefficient of the motor and the reference speed; the requested torque of the motor is compensated based on the proportional compensation torque to obtain the target control torque of the motor, and the motor is controlled based on the target control torque. That is, in the embodiment of the present application, the vehicle will filter the original speed of the motor through the filter to generate the speed compensation value, and generate the proportional compensation torque through the speed compensation value. Since the phase delay of the filter used for the original speed is less than the preset value, the proportional compensation torque used for correction can be made as consistent as possible with the phase of the real-time motor speed. Therefore, compared with the relevant anti-shake scheme, the present application can achieve a better low-speed vibration suppression effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0035] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0036] Figure 1 This is a flow chart of the first embodiment of the motor control method of the present application;
[0037] Figure 2 This is a flow chart of a second embodiment of the motor control method of the present application;
[0038] Figure 3 This is a schematic diagram of the local structure of three-phase current sampling in the motor control method of this application;
[0039] Figure 4 This is a schematic diagram of the overall framework involved in the motor control method of the present application;
[0040] Figure 5 This is a schematic diagram of the overall flow of the motor control method of the present application;
[0041] Figure 6 This is a schematic diagram of the structure of the control device of the motor of this application;
[0042] Figure 7Schematic diagram of the device structure of the hardware operating environment involved in the motor control method in the embodiment of the present application.
[0043] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0044] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0045] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0046] At present, new energy vehicle technology is becoming increasingly mature, and its functions or performance can basically meet the needs of users. However, it is worth noting that when the speed of the low-speed motor of a new energy vehicle fluctuates (such as sudden acceleration and deceleration and other transient conditions will cause speed fluctuations), the output torque of the vehicle drive motor will undergo a step mutation. Since the drive motor is coupled with the transmission system, the torque transmitted by each shaft of the vehicle transmission system will oscillate violently, resulting in low-frequency jitter of the vehicle speed, affecting the smoothness of the vehicle. In response to this situation, although there are related anti-shake solutions to solve the problem of vehicle jitter at low speeds, in actual applications, due to the delay problem of the related anti-shake solution, the calculated compensation torque for anti-shake cannot be compensated at the correct time, and it is difficult to achieve a good anti-shake effect, and in some cases it may even have a negative effect.
[0047] The main solution of the embodiment of the present application is: obtaining the original speed of the motor corresponding to the vehicle, and filtering the original speed based on a filter to obtain a speed compensation value, wherein the phase delay of the filter for the original speed is less than a preset value; compensating the original speed by the speed compensation value to obtain a reference speed; determining the proportional compensation torque of the motor based on the proportional control coefficient of the motor and the reference speed; compensating the requested torque of the motor based on the proportional compensation torque to obtain the target control torque of the motor, and controlling the motor based on the target control torque.
[0048] That is, in the embodiment of the present application, the vehicle will filter the original speed of the motor through a filter to generate a speed compensation value, and generate a proportional compensation torque through the speed compensation value. Since the phase delay of the filter used for the original speed is less than the preset value, the proportional compensation torque used for correction can be made as consistent as possible with the phase of the real-time motor speed. Therefore, compared with related anti-shake schemes, the present application can achieve better low-speed vibration suppression effect.
[0049] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a cloud platform, a vehicle, a main controller in a vehicle, a computer, a mobile phone, etc., or an electronic device that can realize the above functions.
[0050] Based on this, the present application embodiment provides a method for controlling a motor, referring to Figure 1 , which is a flow chart of the first embodiment of the motor control method of the present application.
[0051] In this embodiment, the motor control method includes steps S10 to S30:
[0052] Step S10, obtaining an original speed of a motor corresponding to the vehicle, and filtering the original speed based on a filter to obtain a speed compensation value, wherein a phase delay of the filter for the original speed is less than a preset value;
[0053] It should be noted that, in this embodiment, the execution subject of the above-mentioned motor control method can be the vehicle itself, or a main controller in the vehicle, etc., which is mainly used for controlling the motor in the vehicle to avoid vehicle shaking.
[0054] Exemplarily, the above motor control method can be implemented under low-speed vehicle conditions or under normal conditions (i.e., any vehicle speed). During the implementation process, the vehicle can first determine the original speed of its corresponding motor, which can be the power motor of the vehicle and is used to drive the vehicle. The original speed can be obtained directly based on the speed signal of the motor speed sensor, or it can be calculated by combining the speed signal and the moving average algorithm. For example, the original speed calculation formula of the motor is as follows:
[0055] =
[0056] =
[0057] In the formula, is the rotation angle of the motor in the time period corresponding to sampling point i, is the average value of the motor rotation angle at each sampling point in the nth sampling period, is the duration of the time period corresponding to the sampling point, is the original speed.
[0058] In addition, regarding the determination of the original rotational speed, traditional encoder-based speed measurement methods including M method, T method, M / T method speed measurement, etc. may also be used, which will not be described in detail here.
[0059] It should be noted that in the relevant anti-shake solutions, sliding average filtering or low-pass filtering is used for filtering, but there is a delay at low speeds, and the noise is also very serious. If the filtering is further increased, although the noise can be effectively suppressed, the feedback delay will increase further. Therefore, whether it is to enhance or weaken the filtering, the speed loop gain cannot be too strong, otherwise it will introduce noise and vibration at the least, and the control system will diverge and become unstable at the worst. Therefore, it is difficult for the relevant anti-shake solutions to achieve a good anti-shake effect and may even produce negative effects.
[0060] In view of the above situation, in this embodiment, a Butterworth bandpass filter is used to filter the original speed. Since the frequency amplitude response within the passband of the Butterworth bandpass filter is relatively flat and the phase delay is minimal, filtering through the Butterworth bandpass filter can make the proportional compensation torque used for correction consistent with the real-time motor speed phase. Therefore, compared with related anti-shake solutions, the embodiment of the present application can achieve better low-speed vibration suppression effect.
[0061] Exemplarily, after obtaining the original speed, a filter is used to filter the original speed to obtain a speed compensation value, wherein the phase delay of the filter for the original speed is less than a preset value, to ensure that the subsequent proportional compensation torque obtained based on the speed compensation value can accurately compensate for the motor request torque and ensure the compensation effect. Normally, the phase delay can be as small as possible. For example, the above-mentioned filter can be a Butterworth bandpass filter with a small phase delay.
[0062] Exemplarily, the gain G(s) of the Butterworth bandpass filter may be set as follows:
[0063]
[0064] In the formula, is the complex frequency of the Butterworth bandpass filter input signal. Perform Butterworth bandpass filtering on the original speed to obtain a signal that allows a frequency range of 4Hz to 60Hz. It is worth noting that the specific frequency range signal can be set by the technician according to actual needs, and no specific restrictions are made here. Further, set parameters B0=0.15, B1=0, B2=-0.15, A1=-1.69, A2=-0.69, and calculate the speed compensation value as follows:
[0065]
[0066] In the formula, is the t-th speed compensation value, is the original speed at the tth time.
[0067] In addition, the Butterworth digital filter has a maximum flatness characteristic. There is a maximum value at ω=0, and the derivative of the corresponding amplitude-frequency characteristic is zero, which is relatively flat near ω=0. The corresponding amplitude-frequency characteristic is monotonically decreasing, and the corresponding phase-frequency characteristic is also monotonically decreasing. Regardless of the order of the digital filter, it can ensure that the corresponding amplitude-frequency response meets the requirements of ideal working conditions. A bandpass filter is a filter that allows frequencies in the frequency range between f1 and f2 to pass, while digital signals with frequencies higher than f1 or lower than f2 will be significantly attenuated. Other frequency components within this range can hardly pass through the digital system. In an embodiment of the present application, the Butterworth digital filter can be set to: the upper limit frequency f2 of the passband is 60Hz, the lower limit frequency f1 of the passband is 4Hz, and the sampling frequency is 1000 Hz. In addition, the parameters of the specific filter can also be set according to actual needs.
[0068] Step S20, compensating the original speed by the speed compensation value to obtain a reference speed, and determining a proportional compensation torque of the motor based on a proportional control coefficient of the motor and the reference speed;
[0069] Exemplarily, the reference speed can be obtained by using the calculated speed compensation value to compensate the original speed. Specifically, the compensation calculation formula can be set by the technician according to the actual situation. For example, the difference between the original speed and the speed compensation value can be used as the reference speed, and the calculation formula is as follows:
[0070]
[0071] In the formula, is the reference speed, is the speed compensation value (the speed compensation value can be positive or negative), is the original speed.
[0072] It should be noted that the proportional control coefficient of the above-mentioned motor can be a preset parameter value, which can be set by technical personnel according to actual needs and will not be elaborated here.
[0073] For example, the proportional compensation torque of the motor is calculated by combining the proportional control coefficient of the motor and the reference speed. For example, the product of the deviation and the proportional control coefficient is used as the proportional compensation torque of the motor. The calculation formula is as follows:
[0074]
[0075] In the formula, is the proportional control coefficient, is the reference speed, Proportional compensation torque.
[0076] It can be understood that the obtained proportional compensation torque can be used to subsequently compensate for the requested torque of the motor, thereby avoiding a step-change in the output torque of the drive motor when the motor speed fluctuates at a low speed, that is, ensuring the stability of the vehicle motor output torque and preventing vehicle shaking.
[0077] Step S30 : compensating the request torque of the motor based on the proportional compensation torque to obtain a target control torque of the motor, and controlling the motor based on the target control torque.
[0078] Exemplarily, the proportional compensation torque is used to compensate the requested torque of the motor to obtain the target control torque of the motor. For example, the proportional compensation torque and the requested torque are added to obtain the target control torque. Among them, the requested torque of the motor is generated based on the vehicle throttle opening and the vehicle brake opening. After determining the target control torque, the motor can be controlled according to the target control torque, such as inputting the target control torque into a pre-set control algorithm, such as a PID control algorithm (Proportional Integral Derivative, proportional-integral-differential control algorithm), and controlling the output torque of the motor through the pre-set control algorithm, so that the output torque of the motor is equal to or close to the target control torque.
[0079] In this embodiment, the vehicle will obtain the original speed of the motor corresponding to the vehicle, and filter the original speed based on the filter to obtain the speed compensation value, wherein the phase delay of the filter for the original speed is less than the preset value; the original speed is compensated by the speed compensation value to obtain the reference speed, and the proportional compensation torque of the motor is determined based on the proportional control coefficient of the motor and the reference speed; the requested torque of the motor is compensated based on the proportional compensation torque to obtain the target control torque of the motor, and the motor is controlled based on the target control torque. That is, in the embodiment of the present application, the vehicle will filter the original speed of the motor through the filter to generate the speed compensation value, and generate the proportional compensation torque through the speed compensation value. Since the phase delay of the filter used for the original speed is less than the preset value, the proportional compensation torque used for correction can be made as consistent as possible with the phase of the real-time motor speed. Therefore, compared with the relevant anti-shake scheme, the present application can achieve a better low-speed vibration suppression effect.
[0080] In a feasible implementation manner, before the step of determining the proportional compensation torque of the motor based on the proportional control coefficient of the motor and the reference speed, the method includes step S301:
[0081] Step S301 , querying a preset proportional coefficient mapping table, and using a coefficient in the preset proportional coefficient mapping table corresponding to the requested torque of the motor and the reference speed as a proportional control coefficient of the motor.
[0082] Exemplarily, in practical applications, the vehicle can obtain the proportional control coefficient by real-time table lookup. For example, query the preset proportional coefficient mapping table, and there may be two query dimensions in the proportional coefficient mapping table, namely torque and speed dimensions. During the query process, the coefficient corresponding to the preset proportional coefficient mapping table and the requested torque and reference speed of the above-mentioned motor can be used as the proportional control coefficient of the motor. It can be understood that the proportional control coefficient will be used to determine the proportional compensation torque, and the proportional control coefficient is determined in real time based on the requested torque of the motor and the reference speed of the motor, so the proportional control coefficient obtained in real time can improve the accuracy of the obtained proportional compensation torque.
[0083] In a feasible implementation manner, after the step of determining the proportional compensation torque of the motor based on the proportional control coefficient of the motor and the reference speed, the method includes steps S310 to S320:
[0084] Step S310, performing compensation constraint on the proportional compensation torque to obtain a new proportional compensation torque, wherein the new proportional compensation torque is within a preset compensation torque range;
[0085] Step S320 : using the new proportional compensation torque to compensate the requested torque of the motor to obtain the target control torque of the motor.
[0086] It should be noted that the calculated proportional compensation torque can be directly used to compensate the requested torque, or can be used to compensate the requested torque after being constrained by the compensation.
[0087] Exemplarily, after obtaining the proportional compensation torque, the proportional compensation torque can be subjected to compensation constraints. The main function of the compensation constraint is to constrain the proportional compensation torque within a preset compensation torque range, such as a range of plus or minus 25 Nm. The compensation constraint can be processed in such a way that if the proportional compensation torque is within the preset compensation torque range, no processing is performed. If the proportional compensation torque is not within the preset compensation torque range, the boundary value of the preset compensation torque range closest to the proportional compensation torque is used as the proportional compensation torque (that is, the new proportional compensation torque, or the constrained proportional compensation torque). Then, based on the proportional compensation torque after the compensation constraint, the step of compensating the requested torque of the motor based on the proportional compensation torque to obtain the target control torque of the motor is performed. It can be understood that the proportional compensation torque can be placed within a reasonable small range of torque through the compensation constraint, so as to avoid the proportional compensation torque being larger than the actual requested torque, thereby interfering with the actual control result of the driver.
[0088] Reference Figure 2 , is a flow chart of a second embodiment proposed based on the first embodiment of the motor control method of the present application. The same or similar contents in this embodiment as those in the above embodiment can be referred to the above introduction and will not be described in detail later. The step of controlling the motor based on the target control torque includes steps S410 to S420:
[0089] Step S410, combining the voltages obtained by the sensors in the motor and based on a preset voltage and current gain value, determining the real-time current of the motor;
[0090] Step S420: input the real-time current and the target control torque into a controller of the motor, and control the rotation of the motor through the controller.
[0091] Exemplarily, the vehicle will also obtain the real-time current of the motor, wherein the real-time current of the motor can be a current related to the three-phase current of the motor, which is specifically determined by the control requirements of the controller corresponding to the motor, and the real-time current can be determined by the sensor set in the motor, such as obtaining the voltage on the motor winding through the sensor in the motor, and then converting the voltage on the winding into the current on the winding through the preset voltage and current gain value. The converted current can be used as the real-time current, or the result after a certain conversion of the current can be used as the real-time current, which will not be repeated here. Then the real-time current and the target control torque are input into the controller of the motor, and then the controller controls the motor to rotate and output the torque, wherein the controller can be a PID controller, such as in actual applications, the actual torque of the motor can be determined according to the real-time current of the motor, and the PID controller controls the output of the motor according to the torque difference between the actual torque and the target torque, so that the actual torque output by the motor approaches or is equal to the target torque. Since the control algorithm corresponding to the PID controller is relatively mature at present, the specific control process will not be repeated here.
[0092] In a feasible implementation manner, the step of determining the real-time current of the motor based on a preset voltage and current gain value in combination with the voltages obtained by each sensor in the motor includes steps S411 to S413:
[0093] Step S411, for any one phase winding of the three-phase winding corresponding to the motor, acquiring a collection value of a target sensor located on the winding to obtain an output terminal voltage;
[0094] Step S412, calculating the phase current of the corresponding phase of the winding according to the difference between the output terminal voltage and the reference voltage of the target sensor, and the preset voltage-current conversion gain value of the target sensor;
[0095] Step S413, after traversing the three-phase winding to obtain the three-phase current of the motor, convert the three-phase current into the real-time current.
[0096] It should be noted that, under normal circumstances, the two-phase current of the vehicle motor is obtained by sensor sampling, and the sum of the three-phase current of the motor is 0, so the other phase is calculated by taking the negative phase of the other two phases. For example, the U-phase current is sampled by the phase current sensor, the V-phase current is sampled by the phase current sensor, and the W-phase current is calculated by the current of the U-phase and V-phase. However, under low-speed conditions, in order to avoid jitter as much as possible, the accuracy requirements for the current will be relatively high. If one of the two phases of the current collected by the sensor has a deviation in the sampling of the current, it will cause the current obtained by the calculation of the other phase to also have a deviation. In response to this problem, in this application, each phase current is obtained by sensor sampling, so as to ensure the accuracy of the determined phase current and reduce vehicle jitter.
[0097] Exemplarily, since the process of determining the current for each phase is basically similar, in this embodiment, one of the phases will be used as an example for explanation. For any one phase of the three-phase winding corresponding to the motor, the collection value of the target sensor on the winding is obtained to obtain the output voltage. The difference between the output voltage and the reference voltage of the sensor is calculated, where the reference voltage is the voltage of the sensor when no current passes through the winding. The phase current of the corresponding phase of the winding is calculated by the difference and the preset voltage-current conversion gain value of the sensor, such as taking the product of the difference and the preset voltage-current conversion gain value as the phase current of the corresponding phase of the winding. The calculation formula is as follows:
[0098] )*
[0099] In the formula, is the phase current, is the output voltage of the sensor; is the reference voltage of the sensor; It is the gain value converted from the sensor voltage signal and current signal, that is, the above-mentioned preset voltage-current conversion gain value.
[0100] As reference Figure 3, is a schematic diagram of the local structure of three-phase current sampling in this application. As shown in the figure, each phase winding on the motor is provided with a current sensor (the sensor measures the voltage and then converts the voltage into current) for sampling. Correspondingly, each phase winding can be sampled in the above manner to obtain the phase current, and after traversing the three-phase winding to obtain the three-phase current of the motor, the three-phase current is converted into the real-time current. For example, the conversion can be Clark transformation and Park transformation, which are mainly used to convert the current and voltage of the stationary coordinate system (abc coordinate system) of the three-phase AC motor into equivalent values in the rotating coordinate system (usually called dq coordinate system or rotor coordinate system), so as to facilitate the control of the motor.
[0101] In a feasible implementation manner, for any one of the sensors to be calibrated, the sensor to be calibrated is correspondingly configured with a different DC correction current. Before the step of determining the real-time current of the motor based on a preset voltage and current gain value in combination with the voltage obtained by each sensor in the motor, the method includes steps S401 to S403:
[0102] Step S401, for any one of the different DC correction currents configured for the sensor to be corrected, obtaining a correction voltage from a collection value of the sensor to be corrected when the DC correction current is applied to a winding where the sensor to be corrected is located;
[0103] Step S402, calculating a candidate voltage-to-current conversion gain value of the sensor to be calibrated based on a correction current value of the DC correction current and a difference between the correction voltage and a reference voltage of the sensor to be calibrated;
[0104] Step S403, after traversing the different DC correction currents to obtain each candidate voltage-to-current conversion gain value, a preset voltage-to-current conversion gain value of the sensor to be calibrated is calculated based on each candidate voltage-to-current conversion gain value.
[0105] It should be noted that the gain value of the three-phase current sensor is calibrated with alternating current when it leaves the factory. However, since multiple conversions are required during the calibration process using alternating current, the sensor gain deviation will be large. Therefore, in order to address this problem, in this embodiment, different DC correction currents are used for correction. On the one hand, the use of DC correction current can reduce the number of conversions, thereby reducing the deviation of the sensor gain value. On the other hand, it can improve the accuracy of the full-range current measurement of the three-phase current sensor.
[0106] The above-mentioned sensor to be calibrated refers to a sensor that has not been calibrated (that is, a sensor for which the preset voltage-to-current conversion gain value has not been determined). In addition, since the calibration process of each sensor to be calibrated and the calibration process of each DC correction current of each sensor to be calibrated are basically the same, in this embodiment, a DC correction current of a sensor to be calibrated is taken as an example for explanation.
[0107] Exemplarily, before the step of determining the real-time current of the motor based on the preset voltage and current gain value in combination with the voltage obtained by each sensor in the motor (such as the vehicle in the initialization stage), for any one of the different DC correction currents in a sensor to be corrected, the acquisition value of the sensor to be corrected is obtained when the DC correction current is applied to the winding where the sensor to be corrected is located to obtain the correction voltage. Then, the correction current value of the DC correction current and the difference between the correction voltage and the reference voltage are used to calculate the candidate voltage-current conversion gain value of the sensor. For example, the correction current value is divided by the difference between the correction voltage and the reference voltage to obtain the candidate voltage-current conversion gain value of the sensor. After traversing different DC correction currents to obtain each candidate voltage-current conversion gain value, the preset voltage-current conversion gain value can be calculated based on each candidate voltage-current conversion gain value. For example, the average value of each candidate voltage-current conversion gain value can be used as the preset voltage-current conversion gain value, or the calculation can be performed after deleting a highest candidate voltage-current conversion gain value and a lowest candidate voltage-current conversion gain value. The specific calculation process can be set by the technician according to the needs, so it will not be repeated here. It can be understood that since the final preset voltage-current conversion gain value is obtained by integrating the measurement results of multiple different DC correction currents, the preset voltage-current conversion gain value is improved to adapt to the current range, that is, the accuracy of the full-range current measurement of the three-phase current sensor is improved.
[0108] Reference Figure 4, is a schematic diagram of the overall framework involved in this application, wherein the active damping control part is used to generate the target control torque through Butterworth bandpass filtering, and the three-phase currents of the motor in the figure (i.e., ia, ib, ic) are all the results collected by the current sensor, and are successively transformed by Clark and Park to obtain id and iq (i.e., d-axis current and q-axis current in the dq coordinate system or rotor coordinate system, respectively). The target control torque, id and iq, and the results collected by the speed sensor will be input into the PI controller (i.e., a form of PID control) to control the inverter and then control the motor. Among them, the PI controller (Proportional Integral Controller): performs proportional integral regulation on the current on the d-axis and q-axis respectively, and outputs voltages Ud and Ud; SV PWM (Space Vector Pulse Width Modulation): a space vector pulse width modulation module that generates a PWM signal to drive the inverter; Inverter: converts the DC power supply into an AC power supply to power the motor. In addition, other parts in the framework can also refer to relevant existing solutions, which will not be repeated here.
[0109] Reference Figure 5 , which is a schematic diagram of the overall process of this application. The speed difference and Butterworth bandpass filter speed in the figure are the speed compensation values in the above embodiment, the P-term control coefficient is the proportional control coefficient in the above embodiment, the correction torque is the proportional compensation torque in the above embodiment, the ECM (Engine Control Module) request torque is the request torque of the motor in the above embodiment, and the total request torque of the motor is the target control torque in the above embodiment. The process of arbitration of whether to allow the low-speed anti-shake function is the process of judging whether the reference speed is less than the preset speed threshold, and if it is less than the preset speed threshold, it is determined as Y (yes), that is, the low-speed anti-shake function is allowed, otherwise, the low-speed anti-shake function is not allowed. It can be understood that for Figure 5 For the specific contents of each step, reference can be made to the first embodiment and the second embodiment mentioned above, which will not be described in detail here.
[0110] Reference Figure 6 , is a schematic diagram of the structure of the motor control device provided in the present application, the motor control device includes:
[0111] A filtering module 10, which obtains an original speed of a motor corresponding to the vehicle, and filters the original speed based on a filter to obtain a speed compensation value, wherein a phase delay of the filter for the original speed is less than a preset value;
[0112] A compensation module 20, configured to compensate the original speed by the speed compensation value to obtain a reference speed, and determine a proportional compensation torque of the motor based on a proportional control coefficient of the motor and the reference speed;
[0113] The control module 30 is configured to compensate the request torque of the motor based on the proportional compensation torque to obtain a target control torque of the motor, and control the motor based on the target control torque.
[0114] Optionally, the compensation module 20 is further used for:
[0115] Performing compensation constraints on the proportional compensation torque to obtain a new proportional compensation torque, wherein the new proportional compensation torque is within a preset compensation torque range;
[0116] The new proportional compensation torque is used to compensate the request torque of the motor to obtain the target control torque of the motor.
[0117] Optionally, the compensation module 20 is further used for:
[0118] A preset proportional coefficient mapping table is queried, and a coefficient in the preset proportional coefficient mapping table corresponding to the requested torque of the motor and the reference speed is used as a proportional control coefficient of the motor.
[0119] Optionally, the control module 30 is further used for:
[0120] Determine the real-time current of the motor based on the preset voltage and current gain values in combination with the voltages obtained by the sensors in the motor;
[0121] The real-time current and the target control torque are input into a controller of the motor, and the motor is controlled to rotate by the controller.
[0122] Optionally, the control module 30 is further used for:
[0123] For any one phase winding of the three-phase winding corresponding to the motor, a collection value of a target sensor located on the winding is obtained to obtain an output terminal voltage;
[0124] Calculating the phase current of the corresponding phase of the winding according to the difference between the output terminal voltage and the reference voltage of the target sensor, and the preset voltage-current conversion gain value of the target sensor;
[0125] After traversing the three-phase winding to obtain the three-phase current of the motor, the three-phase current is converted into the real-time current.
[0126] Optionally, for any one of the sensors to be calibrated, the sensor to be calibrated is correspondingly configured with a different DC correction current, and the control module 30 is further used to:
[0127] For any one of the different DC correction currents configured for the sensor to be corrected, obtaining a correction voltage from the collected value of the sensor to be corrected when the DC correction current is applied to the winding where the sensor to be corrected is located;
[0128] Based on the correction current value of the DC correction current and the difference between the correction voltage and the reference voltage of the sensor to be corrected, a candidate voltage-to-current conversion gain value of the sensor to be corrected is calculated;
[0129] After traversing the different DC correction currents to obtain each candidate voltage-current conversion gain value, a preset voltage-current conversion gain value of the sensor to be calibrated is calculated based on each candidate voltage-current conversion gain value.
[0130] The motor control device provided in the present application adopts the motor control method in the above embodiment, aiming to solve the technical problem that the anti-shake effect of the related anti-shake solution is poor. Compared with the prior art, the beneficial effects of the motor control device provided in the embodiment of the present application are the same as the beneficial effects of the motor control method provided in the above embodiment 1, and the other technical features in the motor control device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0131] The present application provides a vehicle, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the motor control method in the above-mentioned embodiment one.
[0132] Reference below Figure 7 , which shows a schematic diagram of the structure of a vehicle suitable for implementing the embodiment of the present application. The vehicle in the embodiment of the present application may include but is not limited to mobile terminals such as computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as computers. Figure 7 The vehicle shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0133] like Figure 7 As shown, the vehicle may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for vehicle operation are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the vehicle to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a vehicle with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0134] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0135] The vehicle provided by the present application adopts the motor control method in the above embodiment, which can solve the technical problem that the traditional parking solution has a high safety risk. Compared with the prior art, the beneficial effects of the vehicle provided by the present application are the same as the beneficial effects of the motor control method provided by the above embodiment, and the other technical features of the vehicle are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0136] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0137] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0138] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the motor control method in the above-mentioned embodiment.
[0139] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0140] The computer-readable storage medium may be included in the vehicle, or may exist independently without being installed in the vehicle.
[0141] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a vehicle, the vehicle:
[0142] Acquire an original speed of a motor corresponding to the vehicle, and filter the original speed based on a filter to obtain a speed compensation value, wherein a phase delay of the filter for the original speed is less than a preset value;
[0143] Compensating the original speed by the speed compensation value to obtain a reference speed, and determining a proportional compensation torque of the motor based on a proportional control coefficient of the motor and the reference speed;
[0144] The request torque of the motor is compensated based on the proportional compensation torque to obtain a target control torque of the motor, and the motor is controlled based on the target control torque.
[0145] Computer program code for performing the operations of the present application 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 separate 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 through 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).
[0146] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0147] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0148] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned motor control method, and can solve the technical problem that the traditional parking solution has a high safety risk. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the motor control method provided in the above-mentioned embodiment, and will not be repeated here.
[0149] The present application also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the motor control method as described above are implemented.
[0150] The computer program product provided in this application can solve the technical problem of motor control. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the motor control method provided in the above embodiment, which will not be repeated here.
[0151] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for controlling a motor, characterized in that: The control method of the motor comprises the following steps: Acquire an original speed of a motor corresponding to the vehicle, and filter the original speed based on a filter to obtain a speed compensation value, wherein a phase delay of the filter for the original speed is less than a preset value; Compensating the original speed by the speed compensation value to obtain a reference speed, and determining a proportional compensation torque of the motor based on a proportional control coefficient of the motor and the reference speed; The requested torque of the motor is compensated based on the proportional compensation torque to obtain the target control torque of the motor, the real-time current of the motor is determined based on a preset voltage and current gain value in combination with the voltages obtained by each sensor in the motor, the real-time current and the target control torque are input into the controller of the motor, and the motor is controlled to rotate by the controller; Wherein, for any one of the sensors to be calibrated, the sensor to be calibrated is correspondingly configured with a different DC calibration current; For any one of the different DC correction currents configured for the sensor to be corrected, obtaining a correction voltage from the collected value of the sensor to be corrected when the DC correction current is applied to the winding where the sensor to be corrected is located; Based on the correction current value of the DC correction current and the difference between the correction voltage and the reference voltage of the sensor to be corrected, a candidate voltage-to-current conversion gain value of the sensor to be corrected is calculated; After traversing the different DC correction currents to obtain each candidate voltage-current conversion gain value, a preset voltage-current conversion gain value of the sensor to be calibrated is calculated based on each candidate voltage-current conversion gain value.
2. The motor control method according to claim 1, characterized in that: The step of compensating the requested torque of the motor based on the proportional compensation torque to obtain the target control torque of the motor comprises: Performing compensation constraints on the proportional compensation torque to obtain a new proportional compensation torque, wherein the new proportional compensation torque is within a preset compensation torque range; The new proportional compensation torque is used to compensate the request torque of the motor to obtain the target control torque of the motor.
3. The motor control method according to claim 1, characterized in that: Before the step of determining the proportional compensation torque of the motor based on the proportional control coefficient of the motor and the reference speed, the method includes: A preset proportional coefficient mapping table is queried, and a coefficient in the preset proportional coefficient mapping table corresponding to the requested torque of the motor and the reference speed is used as a proportional control coefficient of the motor.
4. The motor control method according to claim 1, characterized in that: The step of determining the real-time current of the motor based on a preset voltage and current gain value in combination with the voltages obtained by each sensor in the motor comprises: For any one phase winding of the three-phase winding corresponding to the motor, a collection value of a target sensor located on the winding is obtained to obtain an output terminal voltage; Calculating the phase current of the corresponding phase of the winding according to the difference between the output terminal voltage and the reference voltage of the target sensor, and the preset voltage-current conversion gain value of the target sensor; After traversing the three-phase winding to obtain the three-phase current of the motor, the three-phase current is converted into the real-time current.
5. A motor control device, characterized in that: The control device of the motor comprises: A filtering module, which obtains an original speed of a motor corresponding to the vehicle, and filters the original speed based on a filter to obtain a speed compensation value, wherein a phase delay of the filter for the original speed is less than a preset value; a compensation module, configured to compensate the original speed by the speed compensation value to obtain a reference speed, and determine a proportional compensation torque of the motor based on a proportional control coefficient of the motor and the reference speed; a control module, configured to compensate the requested torque of the motor based on the proportional compensation torque to obtain a target control torque of the motor, determine a real-time current of the motor based on a preset voltage and current gain value in combination with voltages obtained by sensors in the motor, input the real-time current and the target control torque to a controller of the motor, and control the rotation of the motor through the controller; Wherein, for any one of the sensors to be calibrated, the sensor to be calibrated is correspondingly configured with a different DC calibration current; For any one of the different DC correction currents configured for the sensor to be corrected, obtaining a correction voltage from the collected value of the sensor to be corrected when the DC correction current is applied to the winding where the sensor to be corrected is located; Based on the correction current value of the DC correction current and the difference between the correction voltage and the reference voltage of the sensor to be corrected, a candidate voltage-to-current conversion gain value of the sensor to be corrected is calculated; After traversing the different DC correction currents to obtain each candidate voltage-current conversion gain value, a preset voltage-current conversion gain value of the sensor to be calibrated is calculated based on each candidate voltage-current conversion gain value.
6. A vehicle, characterized in that: The vehicle comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for controlling the motor according to any one of claims 1 to 4.
7. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the motor control method according to any one of claims 1 to 4 are implemented.
8. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method for controlling the electric machine according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Detecting circuit and detecting method for measuring current of motor winding
CN102866290A
Motor torque adjusting method and device and electronic equipment
CN114435148A
Brushless direct current motor accurate direct torque control system and control method thereof
CN114649986A
Torque compensation method and system in motor shaking
CN116039403A