Current sampling resistor calibration method of low-pressure hydrogen circulating pump motor controller
By injecting gradient voltage into the motor controller of the low-voltage hydrogen circulation pump and collecting AD value data, calculating gain and fitting, motor parameters are introduced, and combining the fault code to determine whether the calibration is successful, the problems of low calibration efficiency and poor reliability of the current sampling resistance are solved, and a high-precision and safe calibration process is achieved.
Patent Information
- Application Number
- CN202411992337.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-22
AI Technical Summary
The current sampling resistance calibration efficiency of existing low-voltage hydrogen circulation pump motor controllers is low and has poor reliability, which is prone to low calibration accuracy due to human operation errors.
By injecting the voltage of the gradient to change, AD value data of the microcontroller is collected, safety protection measures are implemented, gain is calculated and fitted, and motor parameters are then introduced, and the calibration process is combined with the fault code of the calibration process to determine whether the calibration is successful.
It improves the calibration accuracy and accuracy, ensures the safety and stability of calibration, reduces the impact of static errors, and improves the measurement accuracy and stable operation of the system.
Smart Images

Figure CN119861286A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of motor controllers, and in particular relates to a current sampling resistor calibration method for a low-pressure hydrogen circulation pump motor controller. Background Art
[0002] In the motor control of low-pressure hydrogen circulation pumps, it is necessary to have a large torque while maintaining a high speed, so a large drive current is required. The maximum sampling voltage of the motor controller is 5V. Since it needs to accommodate a large drive current, the sampling resistor needs to be designed to be smaller. In the production of motor controllers, the tin used to weld the sampling resistor patch will produce a tiny resistance. This tiny resistance will have a great impact on the sampling resistor, and it is difficult to ensure the numerical accuracy of the three-phase sampling resistor. In order to ensure the accuracy of the motor controller current sampling, the sampling resistor of each controller board needs to be calibrated.
[0003] At present, the current calibration method for the motor controller is usually to lead out the node in the hardware circuit, measure it through the instrument, manually read and record multiple data, and calculate the recorded data to complete the calibration of the sampling resistor. This method has low calibration efficiency, and the accuracy of calibration also depends on manual experience, which is easy to cause low calibration accuracy due to human operation errors; or, calibration is performed through software, but in the process of using software for calibration, it is often impossible to identify the failure of the sample without obvious symptoms, resulting in data errors after the calibration process is completed, poor reliability, and even safety hazards. Summary of the invention
[0004] The invention provides a current sampling resistor calibration method for a low-pressure hydrogen circulation pump motor controller, which solves the problems of low efficiency and poor reliability of current sampling resistor calibration.
[0005] The basic solution provided by the present invention is a current sampling resistor calibration method for a low-pressure hydrogen circulation pump motor controller, which specifically includes the following steps:
[0006] S1: inject a gradient voltage, collect AD value data of the microcontroller, and implement safety protection measures;
[0007] S2: Calculate the maximum number of sampling values currently allowed. If the number of collected data reaches the maximum number of sampling values currently allowed, end data collection and stop injecting voltage;
[0008] S3: Calculate the gains corresponding to different voltage values according to the AD value data of the single-chip computer, and fit multiple gain values. If the gain fit reaches the set fit threshold, proceed to the next step, otherwise exit the calibration and record the fault code;
[0009] S4: Calculate the motor parameters according to the gain, and calculate the ratio of the motor parameters to the reference value. If the ratio is less than the preset ratio, calculate the calibration data and exit the calibration. Otherwise, exit the calibration directly and record the fault code.
[0010] S5: Compare the recorded fault code with the preset fault code value, and determine whether the calibration is successful according to the calibration judgment requirements. If the calibration is determined to be successful, update the calibration data; if the calibration is determined to be unsuccessful, re-calibrate.
[0011] The principles and advantages of the present invention are: injecting gradient voltage to collect AD data corresponding to different voltages, calculating gain and fitting based on AD data, and then deriving motor parameters, comparing motor parameters with the baseline values of the circulating pump prototype and combining with the fault codes of the calibration process to determine whether the calibration is successful. Injecting gradient voltage, the gradient voltage can cover the entire expected working range of the current sampling resistor, forming a large amount of data under different working conditions, more comprehensively evaluating the performance of the sampling resistor in the entire operating range, and can simulate actual working conditions, capture dynamic characteristics and reduce the impact of static errors, especially for abnormal fluctuations in the transition section, oscilloscope zeroing problems, etc., thereby improving calibration precision and accuracy; during calibration, safety protection measures are implemented for the AD value data collection process, and corresponding fault codes are output when a fault occurs to ensure the safety of calibration, and also provide an important reference basis for subsequent troubleshooting, helping to quickly locate the problem, which can not only improve The measurement accuracy can also ensure the stable operation of the system and help with long-term maintenance and troubleshooting; by calculating the gain and the gain fit, the reliability of the collected data is guaranteed, the motor parameters are determined by the gain, and compared with the benchmark values of the circulating pump prototype, the evaluation results of the motor parameter accuracy are obtained, and the calibration method outputs multiple fault codes, and the calibration results are determined by the fault codes. If the calibration fails, the cause of the fault can be accurately found according to the fault code generated by the calibration, ensuring the accuracy of the calibration value and the reliability of the results. It is simple and easy to implement. Compared with the existing technology, it automatically collects AD data and calculates gain, parameters and other data through mathematical methods. There is no need to manually collect and record data, and the calibration efficiency is high.
[0012] Preferably, in step S1, the voltage value increases with the cycle, the voltage change gradient value is 0.05-0.2V, and the cycle is 5-20s. Further preferably, in step S1, the cycle is 10s, and the voltage change gradient value is 0.1V. By selecting a gradient voltage adapted to the circulating pump motor, comprehensive data collection is ensured, thereby improving the reliability of calibration.
[0013] Preferably, the motor controller safety protection measures include:
[0014] a. Monitor the working status of the MOS tube of the motor controller. If the MOS tube is in a fault state, exit the calibration and record the fault code;
[0015] b. Monitor the power supply voltage of the motor controller microcontroller. If the power supply voltage is not within the allowable voltage range, exit the calibration and record the fault code;
[0016] c. Monitor the temperature of the MOS tube of the motor controller. If the temperature of the MOS tube exceeds the temperature threshold, stop voltage injection and data collection and directly enter step S3.
[0017] Through safety protection measures, the motor and motor controller are protected to ensure the safety and stability of the calibration process. At the same time, the corresponding fault code is output to accurately identify the fault problem.
[0018] Preferably, the maximum number of sampling values currently allowed is calculated based on the current injection voltage value and the temperature protection value of the MOS tube. The specific calculation formula is as follows:
[0019]
[0020] Where Count res The maximum number of sampling values currently allowed, Temp coef is the protection temperature value of the MOS tube, Temp is the sampled MOS tube temperature value, V m_coef is the maximum allowable injection voltage value, and V is the current injection voltage value.
[0021] The maximum allowed sampling value is calculated based on the MOS tube temperature and the injection voltage to ensure that the sampling data is sufficient to support the subsequent calibration process. The extreme working conditions of the motor controller are considered to simulate the actual operating state of the circulation pump to the greatest extent to ensure the accuracy of the calibration. At the same time, the calculation is combined with the MOS tube temperature and the injection voltage to avoid damage to the motor controller due to temperature and injection voltage, ensuring the safety of the calibration process.
[0022] Preferably, in step S3, the gain is calculated by the average point mean square error method. The gain is accurately calculated by the average point mean square error method. The calculation process is relatively simple and easy to implement. It does not require a complex mathematical model and can automatically find the optimal gain parameters, which greatly improves efficiency and reduces human intervention, ensuring the accuracy of the calibration data.
[0023] Preferably, in step S3, the gain is calculated by a neural network, and the gain is accurately predicted by the neural network to ensure the accuracy of the calibration data.
[0024] Preferably, in step S4, the motor parameters are calculated by the least squares method, which is directly optimized for reducing the prediction error, thereby improving the accuracy of parameter estimation, thereby ensuring the accuracy of parameter precision, and can be easily extended to multivariable situations, allowing multiple parameters to be estimated simultaneously, with high prediction efficiency and improved calibration efficiency.
[0025] Preferably, in step S4, if the ratio of the motor parameter to the reference value is less than the preset ratio, the motor is first tested, and if the motor fails to start or runs unsteadily, the calibration is exited and a fault code is recorded, otherwise the motor parameter matching is judged, and if the number of motor parameter mismatch points is within a preset range, the calibration data is recalculated and the calibration is exited. After the parameter accuracy meets the requirements, the motor is tested, the performance of the motor and the motor controller is verified again, more fault conditions are considered, and the corresponding fault code is output to facilitate early maintenance and early warning, avoid major accidents, and improve the reliability of calibration. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0027] The following is further described in detail through specific implementation methods:
[0028] The specific implementation process is as follows: Figure 1 , a current sampling resistor calibration method for a low-pressure hydrogen circulation pump motor controller, specifically comprising the following steps:
[0029] S1: inject a gradient voltage into the motor controller, collect AD value data of the microcontroller, and implement safety protection measures;
[0030] In step S1, the voltage value increases with the cycle, the voltage change gradient value is 0.05-0.2V, and the cycle is 5-20s. In this embodiment, the cycle is 10s, and the voltage change gradient value is 0.1V, that is, the injection voltage is increased by 0.1V every 10s.
[0031] The motor controller safety protection measures include
[0032] a. Monitor the working status of the MOS tube of the motor controller. If the MOS tube is in a fault state, exit the calibration and record the fault code;
[0033] b. Monitor the power supply voltage of the motor controller microcontroller. If the power supply voltage is not within the allowable voltage range, exit the calibration and record the fault code. In this embodiment, the allowable voltage range is 4.8 to 5.2 V.
[0034] c. Monitor the temperature of the MOS tube of the motor controller. If the temperature of the MOS tube exceeds the temperature threshold, stop voltage injection and data collection and directly enter step S3.
[0035] In this embodiment, the single chip microcomputer model of the motor controller is MPC5644.
[0036] S2: Calculate the maximum number of sampling values currently allowed. If the number of collected data reaches the maximum number of sampling values currently allowed, end data collection and stop injecting voltage;
[0037] The maximum number of sampling values currently allowed is calculated based on the current injection voltage value and the temperature protection value of the MOS tube. The specific calculation formula is as follows:
[0038]
[0039] Where Count res The maximum number of sampling values currently allowed, Temp coef is the protection temperature value of the MOS tube, Temp is the sampled MOS tube temperature value, V m_coef is the maximum allowable injection voltage value, V is the current injection voltage value, and LPF(Temp) is the value of the MOS tube temperature after filtering algorithm.
[0040] S3: Calculate the gains corresponding to different voltage values according to the AD value data of the single-chip computer, and fit multiple gain values. If the gain fit reaches the set fit threshold, proceed to the next step, otherwise exit the calibration and record the fault code;
[0041] The predetermined fitting threshold is 0.98-1.02, and is preferably 1 in this embodiment.
[0042] In this embodiment, the gain is calculated by the mean point mean square error method, and the specific formula is:
[0043]
[0044] Where, ADC rel is the set of voltage values read by the oscilloscope when the same voltage is injected, ADC MCU Gain is the AD value set of the microcontroller when the same voltage is injected. V is the gain value.
[0045] The gain values corresponding to different injection voltages are calculated using the above formula.
[0046] Here we take V=0.1V as an example:
[0047]
[0048] Where, ADC rel is the voltage value set read by the oscilloscope when the injection voltage is 0.1V, ADC MCU is the AD value set of the microcontroller when the injection voltage is 0.1V, Gain V This is the gain value when V=0.1.
[0049] In another embodiment, the gain is calculated by a neural network, and the neural network model adopts a hybrid model of MLP, RNN, and CNN. Features are extracted by CNN, and then RNN is used to process the changes of these features over time, and finally the final gain prediction is performed by MLP.
[0050] S4: Calculate the motor parameters according to the gain, and calculate the ratio of the motor parameters to the reference value. If the ratio is less than the preset ratio, first test run the motor. If the motor fails to start or runs unsteadily, exit the calibration and record the fault code. Otherwise, determine the matching of the motor parameters. If the number of motor parameter mismatch points is within the preset range, calculate the calibration data and then exit the calibration. Otherwise, exit the calibration directly and record the fault code of the motor parameter mismatch. If the ratio of the motor parameter to the reference value is greater than or equal to the preset ratio, exit the calibration directly and record the fault code of the parameter accuracy not meeting the requirements.
[0051] The motor parameters include the resistance and inductance of the motor; the reference value is the parameter of the prototype used during calibration. In this embodiment, the resistance of the prototype is 0.018 ohms and the inductance is 18uH;
[0052] During the motor test run, the motor runs at a gradient of 100 rpm;
[0053] In step S4, the motor parameters are calculated by the least square method.
[0054] In step S4, the preset ratio of the motor parameter to the reference value is 1% to 2%. The preset ratio of the motor parameter to the reference value is combined to determine whether the accuracy of the motor parameter meets the requirements, thereby improving the reliability of calibration.
[0055] In this embodiment, the preset value of the number of motor parameter mismatch points is 10. If the number of motor parameter mismatch points is within 10, the motor parameter matching is deemed to meet the requirements; the preset ratio of the motor parameter to the reference value is preferably 1%. If the ratio of the motor parameter to the reference value is less than the preset ratio of 1%, it is determined whether the number of motor parameter mismatch points is greater than 10. If the number of mismatch points is less than 10, proceed to the next step, otherwise it is deemed that the calibration has failed, the calibration is exited and the corresponding fault code is recorded.
[0056] S5: Compare the recorded fault code with the preset fault code value, and determine whether the calibration is successful according to the calibration judgment requirements. If the calibration is determined to be successful, update the calibration data; if the calibration is determined to be unsuccessful, re-calibrate.
[0057] The calibration judgment requirements are: if no fault code is recorded, the calibration is successful; if the recorded fault code is less than the preset fault code value, the calibration result is judged based on experience; if the recorded fault code is greater than the preset fault code value, the calibration fails.
[0058] In this embodiment, the preset value of the fault code is 300.
[0059] During the calibration process, if the calibration is exited midway, it is considered as calibration failure. If the calibration fails, recalibrate according to the recorded fault code.
[0060] The above are only embodiments of the present invention. Common knowledge such as the known specific structures and characteristics in the scheme is not described in detail here. Ordinary technicians in the relevant field know all the common technical knowledge in the technical field to which the invention belongs before the application date or priority date, can obtain all the existing technologies in the field, and have the ability to apply conventional experimental means before that date. Ordinary technicians in the relevant field can improve and implement this scheme in combination with their own abilities under the enlightenment given by this application. Some typical known structures or known methods should not become obstacles for ordinary technicians in the relevant field to implement this application. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the scope of protection of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.
Claims
1. A method for calibrating the current sampling resistor of a low-pressure hydrogen circulation pump motor controller, characterized in that: The specific steps include: S1: inject a gradient voltage, collect AD value data of the microcontroller, and implement safety protection measures; S2: Calculate the maximum number of sampling values currently allowed. If the number of collected data reaches the maximum number of sampling values currently allowed, end data collection and stop injecting voltage. S3: Calculate the gains corresponding to different voltage values according to the AD value data of the single-chip computer, and fit multiple gain values. If the gain fit reaches the set fit threshold, proceed to the next step, otherwise exit the calibration and record the fault code; S4: Calculate the motor parameters according to the gain, and calculate the ratio of the motor parameters to the reference value. If the ratio is less than the preset ratio, calculate the calibration data and exit the calibration. Otherwise, exit the calibration directly and record the fault code. S5: Compare the recorded fault code with the preset fault code value, and determine whether the calibration is successful according to the calibration judgment requirements. If the calibration is determined to be successful, update the calibration data; if the calibration is determined to be unsuccessful, re-calibrate.
2. The current sampling resistor calibration method of the low-pressure hydrogen circulation pump motor controller according to claim 1 is characterized in that: In step S1, the voltage value increases with the cycle, the voltage change gradient value is 0.05 to 0.2 V, and the cycle is 5 to 20 seconds.
3. The current sampling resistor calibration method of the low-pressure hydrogen circulation pump motor controller according to claim 2 is characterized in that: In step S1, the cycle is 10s, and the voltage gradient value is 0.1V.
4. The current sampling resistor calibration method of the low-pressure hydrogen circulation pump motor controller according to claim 1 is characterized in that: The motor controller safety protection measures include a. Monitor the working status of the MOS tube of the motor controller. If the MOS tube is in a fault state, exit the calibration and record the fault code; b. Monitor the power supply voltage of the motor controller microcontroller. If the power supply voltage is not within the allowable voltage range, exit the calibration and record the fault code; c. Monitor the temperature of the MOS tube of the motor controller. If the temperature of the MOS tube exceeds the temperature threshold, stop voltage injection and data collection and directly enter step S3.
5. The current sampling resistor calibration method of the low-pressure hydrogen circulation pump motor controller according to claim 1 is characterized in that: The maximum number of sampling values currently allowed is calculated based on the current injection voltage value and the temperature protection value of the MOS tube. The specific calculation formula is as follows: Where Count res The maximum number of sampling values currently allowed, Temp coef is the protection temperature value of the MOS tube, Temp is the sampled MOS tube temperature value, V m_coef is the maximum allowable injection voltage value, and V is the current injection voltage value.
6. The current sampling resistor calibration method of the low-pressure hydrogen circulation pump motor controller according to claim 1 is characterized in that: In step S3, the gain is calculated by using the mean point mean square error method.
7. The current sampling resistor calibration method of the low-pressure hydrogen circulation pump motor controller according to claim 1 is characterized in that: In step S3, the gain is calculated by the neural network.
8. The current sampling resistor calibration method of the low-pressure hydrogen circulation pump motor controller according to claim 1, characterized in that: In step S4, the motor parameters are calculated by the least square method.
9. The current sampling resistor calibration method of the low-pressure hydrogen circulation pump motor controller according to claim 1, characterized in that: In step S4, the preset ratio is 1% to 2%.
10. The current sampling resistor calibration method of the low-pressure hydrogen circulation pump motor controller according to claim 1, characterized in that: In step S4, if the ratio of the motor parameters to the reference value is less than the preset ratio, the motor is first tested. If the motor fails to start or runs unstably, the calibration is exited and the fault code is recorded. Otherwise, the motor parameter matching is judged. If the number of motor parameter mismatch points is within the preset range, the calibration data is calculated again to exit the calibration.