Current sampling null drift verification and compensation method and system, motor controller and vehicle
By performing three-phase current sampling and zero-flood self-test in the motor controller, calculating and using appropriate zero-flood compensation values, the problem of inaccurate three-phase current sampling and compensation caused by differences in different motor assembly is solved, improving the torque control accuracy and reducing the risk of failure.
Patent Information
- Application Number
- CN202411961037.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-06
AI Technical Summary
Existing motor controllers ignore the differences between different motor assembly when sampling three-phase current, resulting in inaccurate compensation of three-phase current sampling, affecting the accuracy of torque control and may lead to failures such as overcurrent.
After the motor controller is initialized in power-on, the three-phase current sampling zero-drift self-test is performed for each power-on cycle. By determining whether the three-phase current sampling value falls into the set threshold range, the average value of the sample value falling into the range is calculated as the zero-drift compensation value, or the default experience value is used.
The accuracy of three-phase current sampling compensation is improved, ensuring that the motor torque control accuracy is not affected by motor manufacturing differences, and reducing the risk of failures such as overcurrent.
Smart Images

Figure CN119936459A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of motor controllers, and in particular to a zero drift calibration and compensation method and system for current sampling of a motor controller. Background Art
[0002] Three-phase current sampling in the motor controller is crucial to the motor control accuracy and torque response speed.
[0003] At present, the three-phase current sampling of the motor controller usually uses empirical values to compensate the three-phase current sampling values, ignoring the differences in the three-phase current sampling caused by the differences in different motor assemblies.
[0004] In actual control, the three-phase current sampling values are used to control the output torque through algorithms such as vector control. If different assemblies use the same three-phase current sampling compensation values, it will not be conducive to improving the torque control accuracy, and improper torque control may also cause overcurrent and other faults. Summary of the invention
[0005] In a first aspect of the present invention, in order to solve the above technical problems, a method for zero drift calibration and compensation during current sampling is provided, which is applied to a motor controller. The method comprises the following steps: S1. After the motor controller is powered on and initialized, it starts to perform a three-phase current sampling zero drift self-check to perform a range check on the sampling values of the three-phase current; S2. According to the proportion of the N three-phase current sampling values falling into the set current sampling threshold range, it is obtained whether the three-phase current sampling zero drift self-test succeeds or fails; S3. According to whether the three-phase current sampling zero drift self-test succeeds or fails, the average value of the three-phase current sampling values falling within the set current sampling threshold is taken as the three-phase current zero drift compensation value or the default empirical value is taken as the three-phase current zero drift compensation value.
[0006] Furthermore, after the motor controller is powered on and initialized, it starts to perform a three-phase current sampling zero drift self-check, including: The motor controller performs the three-phase current sampling zero-drift self-test once each time it is powered on; The activation condition of the three-phase current sampling zero-drift self-check is that the self-learning enable signal SelfClbEnable is 1.
[0007] Furthermore, the S2 further includes: If the three-phase current sampling values fall within the set current sampling threshold range by at least 30%, the system exits the three-phase current sampling zero-drift self-check and outputs OfsClbst_U, OfsClbst_V and OfsClbst_W are all 1, indicating that the current sampling zero-drift self-check is successful; If the proportion of the three-phase current sampling values falling within the set current sampling threshold range is less than 30%, the system exits the three-phase current sampling zero drift self-check and outputs OfsClbst_U, OfsClbst_V and OfsClbst_W are all 0, indicating that the current sampling zero drift self-check has failed.
[0008] Furthermore, the method further comprises: After completing a single current sampling zero-drift self-check, the self-learning enable signal SelfClbEnable is 0, and the current sampling zero-drift self-check function is turned off.
[0009] A second aspect of the present invention provides a zero drift calibration and compensation system for current sampling of a motor controller, comprising: A sampling module, used for sampling the three-phase current of the motor to obtain corresponding three-phase current sampling values; A judging module, used to judge whether the three-phase current sampling values fall within a set current sampling threshold range; A calculation module, used for calculating an average value of the three-phase current sampling values falling within a set current sampling threshold range as a three-phase current zero drift compensation value; a storage module, used for storing a default empirical value which can be used as the three-phase current zero drift compensation value; and The control module is used to control the opening and closing of the three-phase current sampling zero-drift self-check performed during the current motor power-on cycle.
[0010] Furthermore, in the judgment module: When the proportion of the three-phase current sampling values falling within the set current sampling threshold range reaches the set proportion, it indicates that the three-phase current sampling zero drift self-check is successful, and the calculation module calculates the average value of the three-phase current sampling values falling within the set current sampling threshold range as the three-phase current zero drift compensation value; When the proportion of the three-phase current sampling values falling within the set current sampling threshold range does not reach the set proportion, it means that the three-phase current sampling zero drift self-test fails, and the empirical value in the storage module is called as the three-phase current zero drift compensation value.
[0011] Furthermore, the set ratio is 30%.
[0012] A third aspect of the present invention provides a motor controller, including the zero drift calibration and compensation system for current sampling of the motor controller.
[0013] A fourth aspect of the present invention provides a vehicle, comprising a reducer, a motor and an electric drive assembly, wherein the electric drive assembly comprises the motor controller.
[0014] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: The present invention performs a zero drift check on the three-phase current sampling value for each power-on cycle of the motor. When the proportion of the three-phase current sampling value falling into the set current sampling threshold range reaches the set proportion, the average value of the three-phase current sampling value falling into the set current sampling threshold range is used as the three-phase current zero drift compensation value; when the proportion of the three-phase current sampling value falling into the set current sampling threshold range does not reach the set proportion, the default empirical value is used as the three-phase current zero drift compensation value. The accuracy of the three-phase current sampling compensation is improved, and the motor torque control accuracy is ensured not to be affected by the motor manufacturing differences. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 It is a flow chart of the three-phase current sampling zero-drift self-check disclosed in an embodiment of the present invention; Figure 2 A diagram of a three-phase current sampling value conversion architecture disclosed in an embodiment of the present invention; Figure 3 The present invention discloses a flow chart for converting three-phase current sampling values into physical values. DETAILED DESCRIPTION
[0017] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] See also Figure 1 The present invention aims to provide a zero drift calibration and compensation method for current sampling of a motor controller, which mainly includes the following steps: S1. After the motor controller is powered on and initialized, it starts to perform a three-phase current sampling zero drift self-check to perform a range check on the sampling values of the three-phase current.
[0019] In this embodiment, the motor controller performs a three-phase current sampling zero drift self-test every time it is powered on. Specifically, the three-phase current zero drift self-test for this driving cycle starts about 200ms after the motor control unit is initialized, and is only performed once in a single driving cycle.
[0020] After the three-phase current sampling zero-drift self-check meets the start-up condition that the 18V backup voltage converted by the high-voltage bus through the transformer is greater than or equal to 15.3V, the self-learning enable signal SelfClbEnable=1 is output.
[0021] It should be noted that SelfClbEnable is a self-learning enable signal. When the value is 1, it means that self-learning is enabled; when the value is 0, it means that self-learning is not enabled.
[0022] S2. According to the ratio of the N three-phase current sampling values falling into the set current sampling threshold range, it is obtained whether the three-phase current sampling zero drift self-test succeeds or fails.
[0023] In one embodiment of the present invention, if the proportion of the three-phase current sampling values falling into the set current sampling threshold range is at least 30%, the system jumps out of the three-phase current sampling zero drift self-check and outputs OfsClbst_U, OfsClbst_V and OfsClbst_W are all 1, indicating that the current sampling zero drift self-check is successful.
[0024] If the proportion of the three-phase current sampling values falling within the set current sampling threshold range is less than 30%, the system will exit the three-phase current sampling zero drift self-check and output OfsClbst_U, OfsClbst_V and OfsClbst_W are all 0, indicating that the current sampling zero drift self-check has failed.
[0025] S3. According to whether the three-phase current sampling zero drift self-test succeeds or fails, the average value of the three-phase current sampling values falling within the set current sampling threshold is taken as the three-phase current zero drift compensation value or the default experience value is taken as the three-phase current zero drift compensation value.
[0026] In a specific implementation, if there are more than or equal to 30 U, V, W three-phase current sampling values in 100 three-phase current sampling values that do not exceed the [CAL_TRSP_iSenlowSet_f32, CAL_TRSP_iSenHiSet_f32] threshold range, it means that the three-phase current sampling zero drift self-test is successful, and the system outputs OfsClbst_U=1, OfsClbst_V=1 and OfsClbst_W=1, and jumps out of the self-test, outputting that the self-test is completed. At the same time, the three-phase current zero drift compensation value is the average value of the three-phase current sampling values that fall within the set [CAL_TRSP_iSenlowSet_f32, CAL_TRSP_iSenHiSet_f32] threshold range.
[0027] Among them, CAL_TRSP_iSenlowSet_f32 is the sampling lower limit threshold of the three-phase current, and CAL_TRSP_iSenHiSet_f32 is the sampling upper limit threshold of the three-phase current.
[0028] If less than 30 out of 100 current sampling values meet the threshold condition, it means that the three-phase current sampling zero drift self-test fails, and the system outputs OfsClbst_U=0, OfsClbst_V=0 and OfsClbst_W=0, and jumps out of the self-test, outputting that the self-test is completed. At the same time, the three-phase current zero drift compensation value takes the default empirical value.
[0029] Among them, OfsClbst_U, OfsClbst_V, and OfsClbst_W are respectively the flags of whether the zero-drift self-test of the U, V, and W three-phase current sampling is successful. When the value is 1, it means that the self-test is successful; when the value is 0, it means that the self-test fails.
[0030] If the U, V, and W three-phase currents have completed self-tests and all have succeeded, it means that the three-phase current zero-drift self-learning is successful, and the output is TRSP_SelfSucess=1; otherwise, TRSP_SelfSucess=0.
[0031] Among them, TRSP_SelfSucess is a sign of successful self-learning of three-phase current sampling. When the value is 1, it means that the self-learning is successful; when the value is 0, it means that the self-learning is unsuccessful.
[0032] After completing a single current sampling zero drift self-check, the self-learning enable signal SelfClbEnable is 0, and the current sampling zero drift self-check function is turned off. That is, after completing a round of self-learning, regardless of whether the self-learning is successful, SelfClbEnable=0, and the self-learning function is turned off; that is, the three-phase current zero drift self-learning is no longer performed in this driving cycle.
[0033] See also Figure 2-3 , three-phase current physical value = (three-phase current sampling value - zero drift value) * current sensor conversion coefficient. Among them, Figure 3 The L2Sample_iUCof shown represents the U-phase current sampling coefficient; L2Sample_iVCof represents the V-phase current sampling coefficient; and L2Sample_iWCof represents the W-phase current sampling coefficient.
[0034] The present invention also provides a zero drift calibration and compensation system for current sampling of a motor controller, which mainly comprises a sampling module, a judgment module, a calculation module, a storage module and a control module.
[0035] The sampling module is used to sample the three-phase current of the motor to obtain corresponding three-phase current sampling values.
[0036] The judging module is used to judge whether the three-phase current sampling values fall within the set current sampling threshold range.
[0037] The calculation module is used to calculate the average value of the three-phase current sampling values falling within the set current sampling threshold range as the three-phase current zero drift compensation value.
[0038] The storage module is used to store default empirical values that can be used as three-phase current zero-drift compensation values.
[0039] The control module is used to control the opening and closing of the three-phase current sampling zero-drift self-check performed during the current motor power-on cycle.
[0040] In the judgment module: When the proportion of the three-phase current sampling values falling within the set current sampling threshold range reaches the set proportion, it means that the three-phase current sampling zero drift self-test is successful, and the calculation module calculates the average value of the three-phase current sampling values falling within the set current sampling threshold range as the three-phase current zero drift compensation value.
[0041] When the proportion of the three-phase current sampling values falling within the set current sampling threshold range does not reach the set proportion, it means that the three-phase current sampling zero drift self-test has failed, and the experience value in the storage module is called as the three-phase current zero drift compensation value.
[0042] In a specific embodiment of the present invention, the ratio is set to 30%.
[0043] The three-phase current sampling zero drift check and compensation strategy provided by the present invention performs a zero drift check on the three-phase current sampling value for each assembly each power-on cycle to ensure that the three-phase current values are within a reasonable range. This improves the accuracy of the three-phase current sampling compensation and ensures that the torque control accuracy is not affected by the manufacturing differences of the motor.
[0044] The present invention also protects a motor controller, which includes the above-mentioned zero drift calibration and compensation system during current sampling.
[0045] In addition, the present invention also protects a vehicle, including a reducer, a motor and a motor controller, wherein the motor controller includes the above-mentioned zero drift calibration and compensation system during current sampling of the motor controller.
[0046] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A zero drift calibration and compensation method for current sampling, applied to a motor controller, characterized in that: The method comprises the following steps: S1. After the motor controller is powered on and initialized, it starts to perform a three-phase current sampling zero drift self-check to perform a range check on the sampling values of the three-phase current; S2. According to the proportion of the N three-phase current sampling values falling into the set current sampling threshold range, it is obtained whether the three-phase current sampling zero drift self-test succeeds or fails; S3. According to whether the three-phase current sampling zero drift self-test succeeds or fails, the average value of the three-phase current sampling values falling within the set current sampling threshold is taken as the three-phase current zero drift compensation value or the default empirical value is taken as the three-phase current zero drift compensation value.
2. The zero drift calibration and compensation method for current sampling according to claim 1, characterized in that: After the motor controller is powered on and initialized, it starts to perform a three-phase current sampling zero drift self-test, including: The motor controller performs the three-phase current sampling zero-drift self-test once each time it is powered on; The activation condition of the three-phase current sampling zero-drift self-check is that the self-learning enable signal SelfClbEnable is 1.
3. The zero drift calibration and compensation method for current sampling according to claim 1, characterized in that: The S2 further includes: If the three-phase current sampling values fall within the set current sampling threshold range by at least 30%, the system exits the three-phase current sampling zero-drift self-check and outputs OfsClbst_U, OfsClbst_V and OfsClbst_W are all 1, indicating that the current sampling zero-drift self-check is successful; If the proportion of the three-phase current sampling values falling within the set current sampling threshold range is less than 30%, the system exits the three-phase current sampling zero drift self-check and outputs OfsClbst_U, OfsClbst_V and OfsClbst_W are all 0, indicating that the current sampling zero drift self-check has failed.
4. The zero drift calibration and compensation method for current sampling according to claim 2, characterized in that: The method further comprises: After completing a single current sampling zero-drift self-check, the self-learning enable signal SelfClbEnable is 0, and the current sampling zero-drift self-check function is turned off.
5. A zero drift calibration and compensation system for current sampling, characterized in that: include: A sampling module, used for sampling the three-phase current of the motor to obtain corresponding three-phase current sampling values; A judging module, used to judge whether the three-phase current sampling values fall within a set current sampling threshold range; A calculation module, used for calculating an average value of the three-phase current sampling values falling within a set current sampling threshold range as a three-phase current zero drift compensation value; A storage module, used for storing a default empirical value which can be used as the three-phase current zero drift compensation value; as well as The control module is used to control the opening and closing of the three-phase current sampling zero-drift self-check performed during the current motor power-on cycle.
6. The zero drift calibration and compensation system for current sampling according to claim 5, characterized in that: In the judgment module: When the proportion of the three-phase current sampling values falling within the set current sampling threshold range reaches the set proportion, it indicates that the three-phase current sampling zero drift self-check is successful, and the calculation module calculates the average value of the three-phase current sampling values falling within the set current sampling threshold range as the three-phase current zero drift compensation value; When the proportion of the three-phase current sampling values falling within the set current sampling threshold range does not reach the set proportion, it means that the three-phase current sampling zero drift self-test fails, and the empirical value in the storage module is called as the three-phase current zero drift compensation value.
7. The zero drift calibration and compensation system for current sampling according to claim 6, characterized in that: The set ratio is 30%.
8. A motor controller, characterized in that: The invention comprises the zero drift calibration and compensation system for current sampling as described in any one of claims 5 to 7.
9. A vehicle, comprising a reducer, a motor and an electric drive assembly, characterized in that: The electric drive assembly includes the motor controller according to claim 8.
Citation Information
Cited By
Method and system for dynamically correcting null drift of current sensor
CN121432300A