Parameter calibration method, motor controller, system, device, equipment and medium

By controlling the inverter to send pulse signal set in the motor controller, collecting and calculating the current peak set, the problem of low current calibration efficiency is solved, efficient and accurate calibration of current sensor parameters is achieved, and equipment heat and cost are reduced.

CN120233291APending Publication Date: 2025-07-01SHANGHAI LIXIANG AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311842571.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-28
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

The current calibration scheme of existing motor controllers is inefficient, and requires continuous and stable output of rated current, resulting in large heat generation, and the water cooling and water blowing process take up a lot of time.

Method used

By controlling the inverter to send a pulse signal set to the load, the load generates winding current, collects the current peak set, and iteratively calculates it using the upper computer and the motor controller to obtain the gain parameters and bias parameters of the current sensor.

Benefits of technology

It reduces calibration time, improves current calibration efficiency, reduces equipment manufacturing difficulty and cost, and has high calibration accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120233291A_ABST
    Figure CN120233291A_ABST
Patent Text Reader

Abstract

The invention provides a parameter calibration method, a motor controller, a system, a device, equipment and a medium, and the method comprises the steps: receiving a calibration instruction sent by an upper computer; based on the calibration instruction, an inverter is controlled to send a pulse signal set to a load so that the load can generate winding current, the upper computer, a motor controller and the load are sequentially connected, and the inverter is arranged in the motor controller; collecting a first current peak value set of the winding current; receiving a second current peak value set sent by the upper computer, wherein the second current peak value set is obtained by collecting the winding current by the upper computer; and performing iterative calculation based on the first current peak value set and the second current peak value set to obtain a gain parameter and a bias parameter of a current sensor in the motor controller. Through the method, the current calibration efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of vehicles, and in particular, to a parameter calibration method, a motor controller, a system, a device, an equipment and a medium. Background Art

[0002] The testing of new energy vehicle powertrain products is related to the forward power of the whole vehicle, and its stability and execution efficiency have become urgent issues that need to be concerned in the product development and production processes. Among them, for the current calibration scheme of the motor controller in the powertrain products on the market at present, the corresponding environment is usually built to make the motor controller in a rated output current, and an external high-precision detection circuit is used to accurately read the current, and then compare it with the current detected by the motor controller itself, and finally complete the calibration.

[0003] However, in the above current calibration scheme, since the motor controller needs to continuously and stably operate under the rated output condition, during this process, it will cause a large amount of continuous heat generation, and it is necessary to pass cooling water to ensure that the motor controller can stably output the rated current and will not be burned out. Among them, the process of passing water plus blowing water after calibration will take a lot of time, resulting in low current calibration efficiency. Summary of the Invention

[0004] A parameter calibration method, a motor controller, a system, a device, an equipment and a medium provided by the present application can improve the current calibration efficiency.

[0005] In a first aspect, an embodiment of the present application provides a parameter calibration method, and the method includes:

[0006] Receiving a calibration instruction sent by a host computer;

[0007] Based on the calibration instruction, controlling an inverter to send a set of pulse signals to a load so that the load generates winding current, wherein the host computer, the motor controller and the load are connected in sequence, and the inverter is arranged in the motor controller;

[0008] Collecting a first current peak set of the winding current;

[0009] Receiving a second current peak set sent by the host computer, where the second current peak set is obtained by the host computer collecting the winding current;

[0010] Based on the first current peak set and the second current peak set, performing iterative calculation to obtain gain parameters and offset parameters of a current sensor in the motor controller.

[0011] In a second aspect, an embodiment of the present application provides a motor controller, and the motor controller includes:

[0012] A communication module, configured to receive a calibration instruction sent by a host computer, receive a second set of current peaks sent by the host computer, and perform iterative calculations based on the first set of current peaks and the second set of current peaks to obtain the gain parameter and bias parameter of the current sensor in the motor controller;

[0013] An inverter, configured to control the inverter to send a set of pulse signals to a load based on the calibration instruction;

[0014] A current sensor, connected to the inverter, configured to collect a first set of current peaks of the winding current.

[0015] In a third aspect, an embodiment of the present application provides a parameter calibration system, including the motor controller as described in the second aspect. The system includes:

[0016] A host computer and a power supply respectively connected to the motor controller, and a load connected to the host computer, where the host computer and the power supply are connected;

[0017] The load is configured to generate a winding current corresponding to the set of pulse signals sent by the motor controller;

[0018] The host computer is configured to collect the winding current of the load to obtain a second current peak;

[0019] The power supply is configured to supply power to the host computer and the motor controller.

[0020] In a fourth aspect, an embodiment of the present application provides a parameter calibration device. The device includes:

[0021] A first receiving module, configured to receive a calibration instruction sent by a host computer;

[0022] A sending module, configured to control the inverter to send a set of pulse signals to a load based on the calibration instruction, so that the load generates a winding current, where the host computer, the motor controller, and the load are connected in sequence, and the inverter is provided in the motor controller;

[0023] An acquisition module, configured to acquire a first set of current peaks of the winding current;

[0024] A second receiving module, configured to receive the second set of current peaks sent by the host computer, where the second set of current peaks is obtained by the host computer collecting the winding current;

[0025] A calculation module, configured to perform iterative calculations based on the first set of current peaks and the second set of current peaks to obtain the gain parameter and bias parameter of the current sensor in the motor controller.

[0026] Fifth aspect, an embodiment of the present application provides an electronic device, which includes: a processor and a memory storing computer program instructions;

[0027] When the processor executes the computer program instructions, it implements the parameter calibration method in any one of the embodiments in the first aspect.

[0028] Sixth aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, they implement the parameter calibration method in any one of the embodiments in the first aspect.

[0029] Seventh aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device is caused to execute and implement the parameter calibration method in any one of the above-mentioned first aspects.

[0030] In the parameter calibration method, motor controller, system, device, equipment and medium provided by the embodiments of the present application, by controlling the inverter to send a set of pulse signals to the load, the load can generate the transient current required for calibration without the need for an external continuous and stable large current, thereby reducing the calibration time, and the calibration time is short, greatly improving the calibration efficiency. By performing iterative calculations on the first peak set collected by the upper computer and the second peak set collected by the motor controller, the calculated gain parameter and bias parameter can be effectively approximated to the true parameter values of the current sensor, improving the calibration accuracy of the current sensor. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required to be used in the embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.

[0032] Figure 1 is a schematic structural diagram of a parameter calibration system provided by an embodiment of the present application;

[0033] Figure 2 is a schematic flowchart of a parameter calibration method provided by an embodiment of the present application;

[0034] Figure 3 is a schematic diagram of the relationship between a pulse signal and a winding current provided by an embodiment of the present application;

[0035] Figure 4 is another schematic diagram of the relationship between a pulse signal and a winding current provided by an embodiment of the present application;

[0036] Figure 5It is a schematic structural diagram of a parameter calibration device provided by an embodiment of the present application;

[0037] Figure 6 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0038] In order to more clearly understand the above-mentioned objects, features, and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments may be combined with each other.

[0039] In the following description, many specific details are set forth to facilitate a thorough understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of the present disclosure, rather than all the embodiments.

[0040] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the existence of additional identical elements in the process, method, article, or device comprising the element.

[0041] The testing of new energy vehicle powertrain products is related to the forward power of the whole vehicle, and its stability and execution efficiency have become urgent issues that need to be concerned about in the product development and production process. Among them, currently on the market, for the current calibration scheme of the motor controller in the powertrain product, usually a corresponding environment is built, the motor controller is made to be at a rated output current, an external high-precision detection circuit is used to accurately read the current, and then the current is compared with the current detected by the motor controller itself, and finally the calibration is completed. The above calibration method has the following disadvantages:

[0042] Low current calibration efficiency: Since the controller needs to be stably in the rated output working condition, the continuous heat generation is large, and cooling water needs to be passed through to ensure that the controller can stably output the rated current and will not be burned out; the process of passing water and blowing water after calibration will take a lot of time, resulting in low current calibration efficiency;

[0043] To solve the problems of the prior art, an embodiment of the present application provides a parameter calibration method, a motor controller, a system, a device, an equipment and a medium.

[0044] The following introduces the parameter calibration system provided by the embodiment of the present application.

[0045] Figure 1 The structural schematic diagram of a parameter calibration system provided by an embodiment of the present application is shown. As Figure 1 shown, the system specifically includes:

[0046] An upper computer 12 and a power supply respectively connected to the motor controller 11, and a load 13 connected to the upper computer 12, and the upper computer 12 is connected to the power supply 14;

[0047] Wherein, the motor controller 11 includes: a communication module 114, configured to receive a calibration instruction sent by the upper computer 12, receive a second set of current peaks sent by the upper computer 12, and perform iterative calculation based on the first set of current peaks and the second set of current peaks to obtain the gain parameter and offset parameter of the current sensor 113 in the motor controller 11; an inverter 111, configured to send a set of pulse signals to the load 13 based on the calibration instruction; a current sensor 113, connected to the inverter 111, configured to collect a first set of current peaks of the winding current. In addition, the motor controller 11 further includes a filter B 112 and a non-volatile memory 115. One end of the filter B 112 is connected to the inverter 111, and the other end is connected to the current sensor 113. The filter B 112 is configured to filter high-frequency noise of the current signal output by the current sensor 113; the non-volatile memory 115 is configured to store the above-mentioned gain parameter and offset parameter.

[0048] The load 13 is configured to generate a winding current corresponding to the set of pulse signals sent by the motor controller 11;

[0049] The upper computer 12 is configured to collect the winding current of the load 13 to obtain a second current peak; specifically, the upper computer 12 further includes a current acquisition unit 121, a filter A 122, and a bus capacitor 123. The current acquisition unit 121 is configured to collect the winding current generated by the load 13, and the filter A 122 is configured to filter high-frequency noise of the current signal output by the current acquisition unit 121; the bus capacitor 123 is connected to the motor controller 11 and is configured to provide stable electric energy for the motor controller 11.

[0050] The power supply 14 is used to supply power to the host computer 12 and the motor controller 11. Specifically, the power supply 14 includes a low-voltage power supply 141 and a high-voltage power supply 142. The low-voltage power supply 141 is connected to the motor controller 11 and is used to provide the energy required for the operation of the motor controller 11. The high-voltage power supply 142 is connected to the bus capacitor 123 and is used to provide energy for the bus capacitor 123 so that the bus capacitor 123 can provide the energy for the inverter 111 to send pulses. During the calibration process, the energy of the pulse signal set comes from the bus capacitor 123 that has been charged in advance, without the need to use an external high-power power supply, greatly reducing the manufacturing difficulty and cost of the equipment.

[0051] The above-mentioned load 13 is electrically connected to the inverter 111 and is used to simulate the motor under operating conditions.

[0052] In one embodiment, the current acquisition unit 121 includes a coil and an operational amplifier circuit. The coil is wound around the motor winding phase current circuit. According to Faraday's law of electromagnetic induction, when there is a phase current, a voltage will be generated at both ends of the coil. The operational amplifier is used to amplify the weak voltage signal generated by the coil.

[0053] In one embodiment, there are multiple bus capacitors 123, and the bus capacitors 123 are connected in parallel.

[0054] In one embodiment, filter A 122 and filter B 112 are low-pass filters, and the low-pass filter can be constructed in software or hardware.

[0055] In one embodiment, the communication system includes a CAN bus, which can effectively prevent electromagnetic radiation from interfering with the communication between the PC host computer 12 and the automotive motor controller 11 during the parameter calibration process of the current sensor 113.

[0056] In one embodiment, the load 13 includes an inductor.

[0057] In this embodiment, by controlling the inverter 111 to send a pulse signal set to the load 13, the load 13 can generate the transient current required for calibration, without the need for an external continuously stable large current, thereby reducing the calibration time, and the calibration time is short, greatly improving the calibration efficiency.

[0058] Next, the information calibration method provided by the embodiments of the present application will be introduced.

[0059] Figure 1 The flowchart of the information calibration method provided by an embodiment of the present application is shown. As Figure 2 shown, the method may specifically include the following steps:

[0060] Step 201, receiving a calibration instruction sent by the host computer;

[0061] In this embodiment, a calibration instruction sent by a host computer can be received through a communication module, and the communication system includes a CAN bus. Before the host computer sends a calibration command, it is necessary to control a high-voltage power supply to charge the bus capacitor through the host computer. After the charging is completed, the host computer sends a calibration command.

[0062] The above calibration command (CurrSnsrCalEnbl) may include CurrSnsrCalEnbl = 0x1 / 0x2 / 0x3 signals. Among them, 0x1 means that the upper bridge of the U phase and the lower bridge of the V phase of the inverter form a path through a dummy load; 0x2 means that the upper bridge of the V phase and the lower bridge of the W phase of the inverter form a path through a dummy load; 0x3 means that the upper bridge of the W phase and the lower bridge of the U phase form a path through a dummy load. After the motor controller receives and analyzes this signal, the host computer uses a current acquisition unit to continuously monitor the current signal. At the same time, the motor controller uses a current sensor to continuously monitor the current signal.

[0063] Step 202: Based on the calibration instruction, control the inverter to send a set of pulse signals to the load so that the load generates winding current, where the host computer, the motor controller, and the load are connected in sequence, and the inverter is arranged in the motor controller;

[0064] In this embodiment, after receiving the calibration instruction, the motor controller sends a set of pulse signals to the load through the inverter. Among them, the energy of the inverter is provided by the bus capacitor in the host computer. The pulse signals are transmitted to the load through filter B, the current sensor, and the current acquisition unit in sequence, so that the load generates winding current. The set of pulse signals includes at least one pulse signal.

[0065] In addition, before sending the set of pulse signals, it is also necessary to determine whether the motor controller meets the first calibration condition. The first calibration condition may be that the system power-on self-check of the motor controller is normal, and the motor drive chip and the power management chip complete the initialization configuration. Among them, it is mainly necessary to ensure that the motor drive chip does not report a fault, because it is mainly the motor drive chip that outputs control signals to the power stage to control the on and off of the inverter bridge arm. If the first calibration condition is met, control the inverter to send a set of pulse signals to the load; if the first calibration condition is not met, the calibration fails.

[0066] In addition, after the inverter sends a set of pulse signals to the load, the inverter will transmit the pulse generation status stCurrSnsrCalPulsGen = 0x1 / 0x2 to the host computer, where 0x1 represents successful pulse generation and 0x2 represents failed pulse generation.

[0067] Step 203: Collect the first set of current peak values of the winding current;

[0068] Step 204: Receive the second set of current peaks sent by the host computer, where the second set of current peaks is obtained by the host computer collecting the winding current.

[0069] In this embodiment, since the host computer uses a current acquisition unit to continuously monitor the current signal and the motor controller uses a current sensor to continuously monitor the current signal, after the load generates the winding current, the first set of current peaks of the winding current can be collected through the current sensor and the second set of current peaks of the winding current can be collected through the current acquisition unit.

[0070] Among them, since the pulse signal set includes at least one pulse signal, and each pulse signal will generate a first current extreme value and a second current extreme value, the first set of current peaks includes at least one first current extreme value, the second set of current peaks includes at least one second current extreme value, and the number of the first current extreme values and the second current extreme values corresponds to the number of pulse signals in the pulse signal set.

[0071] In addition, after the host computer receives the pulse generation success status signal stCurrSnsrCalPulsGen = 0x1, the host computer will send the second set of current peaks to the motor controller. When the motor controller receives the first set of current peaks and the second set of current peaks, it is also necessary to perform a rationality judgment on the first set of current peaks and the second set of current peaks, that is, to judge whether the first set of current peaks and the second set of current peaks meet the second calibration condition. If not, the calibration fails. Specifically, the second calibration condition may be that each first current extreme value in the first set of current peaks and each second current extreme value in the second set of current peaks are within a preset interval.

[0072] Among them, the preset interval can be determined according to the differential equation of the inductive load U = Ri + Ldi / dt when the pulse time is certain. Since the peak current that can be reached can be determined through the above differential equation, a range interval where the peak current is located can be determined. If both the first current extreme value and the second current extreme value are within this interval, it is considered reasonable. Otherwise, it is considered that one of the host computer and the automotive motor controller is unreasonable, that is, it does not meet the second calibration condition.

[0073] Step 205: Perform iterative calculation based on the first set of current peaks and the second set of current peaks to obtain the gain parameter and bias parameter of the current sensor in the motor controller.

[0074] In this embodiment, after obtaining the gain parameter and bias parameter of the current sensor, write the gain parameter and bias parameter into the non-volatile memory of the motor controller; the automotive motor controller returns a calibration status, including stCurrSnsrCal = 0x1 / 0x2 / 0x3 / 0x4 / 0x5 to the host computer, where 0x1 indicates successful calibration, 0x2 indicates a sensor parameter rationality fault, 0x3 indicates a failure to write sensor parameters to the EEPROM, 0x4 indicates a failure to generate pulses, and 0x5 indicates a host computer failure fault.

[0075] In this embodiment, the Kalman filter algorithm can be used for iterative calculation. Specifically, in one embodiment, step 205 further includes:

[0076] Based on the first current peak set and the second current peak set, calculate to obtain the gain set and bias set of the current sensor;

[0077] Use the Kalman filter algorithm to perform iterative calculation on the gain set and the bias set to obtain the gain parameter and bias parameter of the current sensor.

[0078] Specifically, in one embodiment, the calculating based on the first current peak set and the second current peak set to obtain the gain set and bias set of the current sensor further includes:

[0079] Determine the quotient of the first difference and the second difference as the gain value, where the first difference is the difference between the first maximum value and the first minimum value, and the second difference is the difference between the second maximum value and the second minimum value;

[0080] Determine the set of each gain value of each first current extreme value as the gain set;

[0081] Determine the difference between the first maximum value and the first product as the bias value, where the first product is the product of the first maximum value and the gain value;

[0082] Determine the set of each bias value of each second current extreme value as the bias set.

[0083] In this embodiment, the first current peak set includes at least one first current extreme value, and each first current extreme value includes a first maximum value and a first minimum value; the second current peak set includes at least one second current extreme value, and each second current extreme value includes a second maximum value and a second minimum value;

[0084] Among them, the gain value gain can be calculated through the following expression,

[0085] gain = (adIPHmax - adIPHmin) / (IPHmax - IPHmin);

[0086] adIPHmax is the first maximum value, adIPHmin is the first minimum value, IPHmax is the second maximum value, and IPHmin is the second minimum value.

[0087] Since the first current peak value centrally includes at least one first current extreme value, and there is a gain value for each current extreme value, the gain set centrally includes at least one gain value, which is the same as the number of the first current extreme values.

[0088] The offset value offset can be calculated by the following expression:

[0089] offset = adIPHmax - IPHmax * gain;

[0090] adIPHmax is the first maximum value, and gain is the gain value.

[0091] In this embodiment, through the above steps, the current required for calibration is generated by the way of sending pulses through the inverter. Among them, the magnitude of the phase current peak value is determined by the length of the pulse time. There is no need for an external supply of a continuous and stable large current, and the calibration time is short, resulting in less heat generated by the dummy load during the calibration process. Therefore, no heat dissipation device is required, greatly reducing the manufacturing difficulty and cost of the production line equipment.

[0092] In one embodiment, the Kalman filter algorithm is used to perform iterative calculations on the gain set to obtain the gain parameter of the current sensor, including:

[0093] Based on the first estimation deviation and the first measurement deviation of the preset gain value, perform Kalman gain calculation on the gain set to obtain the first Kalman gain of the gain set;

[0094] Perform data fusion on each gain value in the gain set and the preset first estimated value corresponding to each gain value to obtain the gain parameter corresponding to each gain value;

[0095] Update the first estimation deviation based on the first Kalman gain, and perform the Kalman gain calculation on the gain set to obtain the first Kalman gain of the gain set.

[0096] In one embodiment, the Kalman filter algorithm is used to perform iterative calculations on the offset set to obtain the offset parameter of the current sensor, including:

[0097] Based on the second estimated deviation and the second measurement deviation of the preset bias value, perform Kalman gain calculation on the bias set to obtain the second Kalman gain of the bias set;

[0098] Perform data fusion on each bias value in the bias set and the preset second estimated value corresponding to each bias value to obtain a bias parameter corresponding to each bias value;

[0099] Update the estimated deviation based on the second Kalman gain, and perform the Kalman gain calculation on the bias set to obtain the second Kalman gain of the bias set.

[0100] In this embodiment, the above-mentioned first measurement deviation and second measurement deviation can be obtained by a large number of experimental measurements in advance. For example, list 100 times to obtain the first measurement deviation of the gain value; and list 100 times to obtain the second measurement deviation of the bias value. The above-mentioned first estimated deviation and second estimated deviation can be arbitrarily given an initial value of the estimated error within a reasonable range, and through subsequent updates of the first estimated deviation and second estimated deviation, they will automatically converge. The above-mentioned first estimated value includes the first estimated value at the current moment and the first estimated value at the previous moment, and the second estimated value includes the second estimated value at the current moment and the second estimated value at the previous moment, which can also be given within a reasonable range. It should be noted that there are multiple bias values in the bias set and multiple gain values in the gain set. The bias values and gain values need to be calculated through the above steps in sequence. Therefore, the value at the previous moment is the value calculated last time for the value calculated at the current moment.

[0101] Specifically, the above-mentioned first Kalman gain K k1 can be calculated by the following expression:

[0102]

[0103] where, is the first estimated deviation, the first measurement deviation;

[0104] The above-mentioned gain parameter X k1 can be calculated by the following expression:

[0105] X k1 = X k1-1 + K k1 (Z k1 - X k1-1 )

[0106] where, X k1-1 is the first estimated value at the previous moment, and Z k1 is the gain value in the gain set;

[0107] The above update of the first estimated deviation can be expressed by the following expression:

[0108]

[0109] where, represents the first estimated deviation at the previous moment.

[0110] Similarly, the above second Kalman gain K k2 can be calculated by the following expression:

[0111]

[0112] where, is the second estimated deviation, the second measurement deviation;

[0113] The above bias parameter X k2 can be calculated by the following expression:

[0114] X k2 = X k2-1 + X k2 (Z k2 - X k1-1 )

[0115] where, X k2-1 is the second estimated value at the previous moment, Z k2 is the bias value in the bias set;

[0116] The above update of the second estimated deviation can be expressed by the following expression:

[0117]

[0118] where, represents the second estimated deviation at the previous moment.

[0119] In this embodiment, since there will be measurement errors in the current acquisition unit of the host computer and the current sensor of the motor controller during the measurement process, this measurement error is basically Gaussian distributed, and the current signal is a continuous analog signal, which is vulnerable to electromagnetic interference, resulting in inevitable errors in the calculated current sensor gain and bias. By using the pulse signal set to obtain the gain parameter set and the bias parameter set, and using the Kalman filter algorithm to process the gain parameter set and the bias parameter set, the calculated gain parameters and bias parameters can be effectively approximated to the true parameter values of the current sensor.

[0120] In an embodiment of the present application, the controlling the inverter to send a pulse signal set to the load based on the calibration instruction includes:

[0121] Based on the calibration instruction, control the inverter to send a pulse signal to the load for a first duration, so as to cause a first winding current to be generated in the load;

[0122] Detect the first change state of the first winding current in real time;

[0123] When the change state of the first winding current is to increase to a first preset threshold and then drop from the first preset threshold to a second preset threshold, control the inverter to send a pulse signal to the load for a second duration, and return to the first change state until the number of the sent pulse signals reaches the first number. The first duration is greater than the second duration, and the first preset threshold is greater than the second preset threshold.

[0124] In this embodiment, the above-mentioned first number can be 2 or more than 2, that is, at least 2. Since the above-mentioned load is composed of a resistor and an inductor, the pulse time length is directly proportional to the peak value of the phase current of the motor winding. When the pulse is sent, the phase current will rise linearly. After the pulse sending is completed, the phase current will gradually drop to 0. Therefore, the change state of the winding current is always in a state of increasing first and then dropping.

[0125] In this embodiment, as Figure 3 shown, when the pulse signal set includes at least 2 pulse signals, in order to generate less heat and energy consumption during the calibration process of the load, a pulse with a time length of the first duration (that is, Figure 3 W in Figure 3 ) can be applied first to increase the winding current to the first preset threshold. When the winding current drops to near the second preset threshold, a pulse with a time length (that is,

[0126] m in

[0127] ) of the second duration is applied. At this time, the winding current rises again to near threshold A. Among them, the second duration is less than the first duration. Repeat this step until the total number of the sent pulses is the first number n. Then, the generated winding current has a total of 2n - 1 wave peaks and wave valleys, and thus has 2n - 1 peak current points. Since the PC host computer and the automotive motor controller continuously sample, a first current peak set and a second current peak set with 2n - 1 current peak members will be obtained.

[0128] Based on the calibration instruction, control the inverter to send a pulse signal to the load for a third duration, so as to cause a second winding current to be generated in the load;

[0129] Real-time detect the second change state of the current of the second winding;

[0130] When the change state of the current of the second winding is increased and then drops to a preset third threshold, control the inverter to send a pulse signal with a third duration to the load, return the second change state, until the sent pulse signal reaches the second quantity.

[0131] In this embodiment, as Figure 4 shown, in order to achieve less heat generation and energy consumption, another pulse sending method is proposed. Apply a pulse with a time length of the third duration (i.e., Figure 4 m in it) to make the winding current gradually increase. When the winding current drops to a certain range, apply a pulse with a time length of the third duration again. At this time, the winding current increases again. Wherein, the pulse period is T. Repeat this step until the total number of sent pulses is the second quantity n. There are 2n - 1 wave peaks and wave valleys in total, so there are also 2n - 1 peak current points. Since the PC host computer and the automotive motor controller continuously sample, a current peak set A and a current peak set B with 2n - 1 current peak members will be obtained. Compared with the first scheme of this embodiment, the current peaks increase in sequence, generating less heat and energy consumption during the calibration process.

[0132] In another embodiment of the present application, after obtaining the gain parameter and bias parameter of the current sensor in the motor controller by performing iterative calculation based on the first current peak set and the second current peak set, the method further includes:

[0133] Obtain the current value of the current flowing through the current sensor;

[0134] Based on a pre-obtained peak ammeter for numerical analysis, obtain a target gain parameter and a target bias parameter corresponding to the current value;

[0135] In this embodiment, since the current sensor inevitably has a certain degree of non-linear characteristic within the range of measurement, that is, when calculating the gain and bias coefficients using the self-calibration algorithm, measure small current and large current respectively. The measured value of the large current often has a small error from the true large current, while the measured value of the small current has a large error from the true small current.

[0136] For the above problems, this embodiment stores the obtained gain set, bias set, and the corresponding peak current into the peak ammeter. During the use of the current sensor, first sample and calculate the current magnitude, and then obtain the target gain parameter and target bias parameter corresponding to the current by querying the table and combining the interpolation method of numerical analysis, dynamically adjusting the gain parameter and bias parameter.

[0137] In one example, the non-linear problem is solved by looking up a table. In the table, a set of gain parameters and bias parameters can be set every 5 A, and the interpolation method of numerical analysis is used to fit the target gain parameters and target bias parameters corresponding to the current in this interval.

[0138] The above method can solve the non-linear problem of the current sensor within the range.

[0139] Figure 5 The structural schematic diagram of the parameter calibration device provided by an embodiment of the present application is shown. For the sake of convenience of description, only the parts related to the embodiment of the present application are shown.

[0140] Refer to Figure 5 , the parameter calibration device 500 may include:

[0141] The first receiving module 501 is configured to receive a calibration instruction sent by the host computer;

[0142] The sending module 502 is configured to control the inverter to send a set of pulse signals to the load based on the calibration instruction, so as to make the load generate winding current. Wherein, the host computer, the motor controller and the load are connected in sequence, and the inverter is arranged in the motor controller;

[0143] The acquisition module 503 is configured to acquire the first current peak set of the winding current;

[0144] The second receiving module 504 is configured to receive the second current peak set sent by the host computer, and the second current peak set is obtained by the host computer acquiring the winding current;

[0145] The calculation module 505 is configured to perform iterative calculation based on the first current peak set and the second current peak set to obtain the gain parameter and bias parameter of the current sensor in the motor controller.

[0146] The sending module 502 further includes:

[0147] The first control sub-module is configured to control the inverter to send a pulse signal with a first duration to the load based on the calibration instruction, so as to make the load generate a first winding current;

[0148] The first detection module is configured to detect the first change state of the first winding current in real time;

[0149] A second control sub-module, configured to control the inverter to send a pulse signal with a second duration to the load when the change state of the first winding current grows to a first preset threshold and drops from the first preset threshold to a second preset threshold, return to the first change state until the number of the sent pulse signals reaches the first number, where the first duration is greater than the second duration, and the first preset threshold is greater than the second preset threshold.

[0150] The sending module 502 further includes:

[0151] A third control sub-module, configured to control the inverter to send a pulse signal with a third duration to the load based on the calibration instruction, so as to generate a second winding current in the load;

[0152] A second detection module, configured to detect the second change state of the second winding current in real time;

[0153] A fourth control sub-module, configured to control the inverter to send a pulse signal with a third duration to the load when the change state of the second winding current drops to a preset third threshold after growing, return to the second change state until the number of the sent pulse signals reaches the second number.

[0154] The calculation module 505 includes:

[0155] A first calculation sub-module, configured to calculate based on the first current peak set and the second current peak set to obtain a gain set and a bias set of the current sensor;

[0156] A second calculation sub-module, configured to perform iterative calculation on the gain set and the bias set by using the Kalman filtering algorithm to obtain a gain parameter and a bias parameter of the current sensor.

[0157] The first calculation sub-module further includes:

[0158] A first determination unit, configured to determine a quotient of a first difference and a second difference as a gain value, where the first difference is a difference between the first maximum value and the first minimum value, and the second difference is a difference between the second maximum value and the second minimum value;

[0159] A second determination unit, configured to determine a set of each gain value of each first current extreme value as the gain set;

[0160] A third determination unit, configured to determine a difference between the first maximum value and a first product as a bias value, where the first product is a product of the first maximum value and the gain value;

[0161] A fourth determination unit, configured to determine a set of each bias value of each of the second current extremes as the bias set.

[0162] The second calculation sub-module further includes:

[0163] A first calculation unit, configured to perform a Kalman gain calculation on the gain set based on a first estimation deviation and a first measurement deviation of the preset gain value, to obtain a first Kalman gain of the gain set;

[0164] A first fusion unit, configured to perform data fusion on each gain value in the gain set and a preset first estimated value corresponding to each gain value, to obtain a gain parameter corresponding to each gain value;

[0165] A second fusion unit, configured to update the first estimation deviation based on the first Kalman gain, and perform the Kalman gain calculation on the gain set to obtain a first Kalman gain of the gain set.

[0166] The second calculation sub-module further includes:

[0167] A second calculation unit, configured to perform a Kalman gain calculation on the bias set based on a second estimation deviation and a second measurement deviation of the preset bias value, to obtain a second Kalman gain of the bias set;

[0168] A third fusion unit, configured to perform data fusion on each bias value in the bias set and a preset second estimated value corresponding to each bias value, to obtain a bias parameter corresponding to each bias value;

[0169] A fourth fusion unit, configured to update the estimation deviation based on the second Kalman gain, and perform the Kalman gain calculation on the bias set to obtain a second Kalman gain of the bias set.

[0170] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is used as an example. In practical applications, the above-mentioned functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working process of the units and modules in the above system can refer to the corresponding process in the foregoing method embodiment and will not be elaborated here.

[0171] Figure 6 The schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present application is shown.

[0172] The device may include a processor 601 and a memory 602 storing program instructions.

[0173] When the processor 601 executes the program, it implements the steps in any of the foregoing method embodiments.

[0174] Exemplarily, the program can be divided into one or more modules / units. One or more modules / units are stored in the memory 602 and executed by the processor 601 to complete this application. One or more modules / units can be a series of program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the program in the device.

[0175] Specifically, the above-mentioned processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0176] The memory 602 may include a mass storage for data or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 602 may include removable or non-removable (or fixed) media. Where appropriate, the memory 602 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, the memory 602 is a non-volatile solid-state memory.

[0177] The memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage media device, an optical storage media device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present disclosure.

[0178] The processor 601 reads and executes the program instructions stored in the memory 602 to implement any of the methods in the above embodiments.

[0179] In one example, the electronic device may further include a communication interface 603 and a bus 610. Among them, the processor 601, the memory 602, and the communication interface 603 are connected through the bus 610 to complete communication with each other.

[0180] The communication interface 603 is mainly used to implement communication between the various modules, devices, units, and / or devices in the embodiments of the present application.

[0181] The bus 610 includes hardware, software, or both, and couples the components of the online data flow metering device to each other. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, the bus 610 may include one or more buses. Although the embodiments of the present application describe and illustrate specific buses, the present application contemplates any suitable bus or interconnect.

[0182] In addition, in combination with the method in the above embodiments, the embodiments of the present application may be implemented by providing a storage medium. Program instructions are stored on the storage medium; when the program instructions are executed by a processor, any one of the methods in the above embodiments is implemented.

[0183] The embodiments of the present application further provide a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to run programs or instructions to implement each process of the above method embodiments, and can achieve the same technical effects. To avoid repetition, it will not be described in detail here.

[0184] It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, system chip, chip system, or system-on-a-chip, etc.

[0185] The embodiments of the present application provide a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement each process of the above method embodiments, and can achieve the same technical effects. To avoid repetition, it will not be described in detail here.

[0186] It should be clear that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present application.

[0187] The functional modules shown in the above structural block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, and so on. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium or transmitted via a data signal carried in a carrier wave over a transmission medium or a communication link. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical discs, hard disks, fiber optic media, radio frequency (RF) links, and so on. The code segment can be downloaded via a computer network such as the Internet, an intranet, and so on.

[0188] It should also be noted that the exemplary embodiments mentioned in the present application describe some methods or systems according to a series of steps or devices. However, the present application is not limited to the order of the above steps, that is, the steps can be executed in the order mentioned in the embodiments, can be different from the order in the embodiments, or several steps can be executed simultaneously.

[0189] As described above with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and program products according to embodiments of the present disclosure. It should be understood that each block in the flowchart and / or block diagram, and the combination of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the functions / actions specified in one or more blocks of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can also be implemented by dedicated hardware that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0190] The above is only the specific implementation manner of the present application. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein. It should be understood that the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present application can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present application.

Claims

1. A parameter calibration method, characterized in that The method includes: Receiving a calibration instruction sent by a host computer; Based on the calibration instruction, controlling an inverter to send a set of pulse signals to a load so that the load generates winding current, wherein the host computer, a motor controller, and the load are connected in sequence, and the inverter is disposed in the motor controller; Collecting a first set of current peak values of the winding current; Receiving a second set of current peak values sent by the host computer, where the second set of current peak values is obtained by the host computer collecting the winding current; Performing iterative calculation based on the first set of current peak values and the second set of current peak values to obtain a gain parameter and a bias parameter of a current sensor in the motor controller.

2. The parameter calibration method according to claim 1, wherein The set of pulse signals includes a first number of pulse signals; The controlling the inverter to send the set of pulse signals to the load based on the calibration instruction includes: Based on the calibration instruction, controlling the inverter to send pulse signals of a first duration to the load so that the load generates a first winding current; Real-time detecting a first change state of the first winding current; When the change state of the first winding current is increasing to a first preset threshold and dropping from the first preset threshold to a second preset threshold, controlling the inverter to send pulse signals of a second duration to the load, and returning to the first change state until the sent pulse signals reach the first number, the first duration is greater than the second duration, and the first preset threshold is greater than the second preset threshold.

3. The parameter calibration method according to claim 1, wherein The set of pulse signals includes a second number of pulse signals; The controlling the inverter to send the set of pulse signals to the load based on the calibration instruction includes: Based on the calibration instruction, controlling the inverter to send pulse signals of a third duration to the load so that the load generates a second winding current; Real-time detecting a second change state of the second winding current; When the change state of the second winding current is dropping after increasing to a preset third threshold, controlling the inverter to send pulse signals of the third duration to the load, and returning to the second change state until the sent pulse signals reach the second number.

4. The parameter calibration method according to claim 1, wherein The performing iterative calculation based on the first set of current peak values and the second set of current peak values to obtain the gain parameter and the bias parameter of the current sensor in the motor controller includes: Performing calculation based on the first set of current peak values and the second set of current peak values to obtain a gain set and a bias set of the current sensor; Using a Kalman filtering algorithm to perform iterative calculation on the gain set and the bias set to obtain the gain parameter and the bias parameter of the current sensor.

5. The parameter calibration method according to claim 4, wherein The first set of current peak values includes at least one first current extreme value, and each first current extreme value includes a first maximum value and a first minimum value; the second set of current peak values includes at least one second current extreme value, and each second current extreme value includes a second maximum value and a second minimum value; The performing calculation based on the first set of current peak values and the second set of current peak values to obtain the gain set and the bias set of the current sensor includes: Determine the quotient of the first difference and the second difference as the gain value, where the first difference is the difference between the first maximum value and the first minimum value, and the second difference is the difference between the second maximum value and the second minimum value; Determine the set of gain values of each first current extreme value as the gain set; Determine the difference between the first maximum value and the first product as the bias value, where the first product is the product of the first maximum value and the gain value; Determine the set of bias values of each second current extreme value as the bias set.

6. The parameter calibration method according to claim 5, characterized in that Perform iterative calculations on the gain set using the Kalman filtering algorithm to obtain the gain parameters of the current sensor, including: Based on the preset first estimation deviation and first measurement deviation of the gain value, perform Kalman gain calculation on the gain set to obtain the first Kalman gain of the gain set; Perform data fusion on each gain value in the gain set and the preset first estimated value corresponding to each gain value to obtain the gain parameter corresponding to each gain value; Update the first estimation deviation based on the first Kalman gain, and perform the Kalman gain calculation on the gain set to obtain the first Kalman gain of the gain set.

7. The parameter calibration method according to claim 5, characterized in that Perform iterative calculations on the bias set using the Kalman filtering algorithm to obtain the bias parameters of the current sensor, including: Based on the preset second estimation deviation and second measurement deviation of the bias value, perform Kalman gain calculation on the bias set to obtain the second Kalman gain of the bias set; Perform data fusion on each bias value in the bias set and the preset second estimated value corresponding to each bias value to obtain the bias parameter corresponding to each bias value; Update the estimation deviation based on the second Kalman gain, and perform the Kalman gain calculation on the bias set to obtain the second Kalman gain of the bias set.

8. A motor controller, characterized in that, The motor controller includes: A communication module, configured to receive a calibration instruction sent by a host computer, receive a second current peak set sent by the host computer, and perform iterative calculations based on the first current peak set and the second current peak set to obtain the gain parameters and bias parameters of the current sensor in the motor controller; An inverter, configured to control the inverter to send a pulse signal set to the load based on the calibration instruction; A current sensor, connected to the inverter, configured to collect a first current peak set of the winding current.

9. A parameter calibration system, characterized in that, Including the motor controller according to claim 7, the system includes: A host computer and a power supply respectively connected to the motor controller, and a load connected to the host computer, where the host computer and the power supply are connected; The load is configured to generate a winding current corresponding to the pulse signal set sent by the motor controller; The host computer is configured to collect the winding current of the load to obtain a second current peak; The power supply is configured to supply power to the host computer and the motor controller.

10. A parameter calibration device, characterized in that, The device includes: A first receiving module, configured to receive a calibration instruction sent by a host computer; A sending module, configured to control an inverter to send a set of pulse signals to a load based on the calibration instruction, so that the load generates winding current, where the host computer, the motor controller, and the load are connected in sequence, and the inverter is disposed in the motor controller; A collecting module, configured to collect a first set of current peak values of the winding current; A second receiving module, configured to receive a second set of current peak values sent by the host computer, where the second set of current peak values is obtained by the host computer collecting the winding current; A calculating module, configured to perform iterative calculation based on the first set of current peak values and the second set of current peak values to obtain a gain parameter and a bias parameter of a current sensor in the motor controller.

11. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the parameter calibration method according to any one of claims 1-7 is implemented.

12. A computer-readable storage medium, characterized in that, Computer program instructions are stored on the computer-readable storage medium, and when the computer program instructions are executed by the processor, the parameter calibration method according to any one of claims 1-7 is implemented.