High-voltage acquisition method and system based on machine learning and automobile
Through the high-voltage acquisition method based on machine learning, the trained machine learning model is used to correct the high-voltage acquisition value, which solves the problem of insufficient high-voltage acquisition accuracy in the existing technology, and achieves more efficient and accurate acquisition value acquisition.
Patent Information
- Application Number
- CN202411616806.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-02-25
AI Technical Summary
The existing high-voltage acquisition technology has shortcomings in improving acquisition accuracy, especially the accuracy and stability of the calibration equipment have a great impact on the accuracy of calibration, and the error compensation algorithm may lead to processing delays and affect real-time performance.
The high-voltage acquisition method based on machine learning is adopted to obtain the low voltage value of the high-voltage circuit to be measured through the high-voltage acquisition circuit, and the high-voltage acquisition value is corrected using the trained machine learning model to output the corrected target high-voltage acquisition value.
Compared with manual calibration and correction, this method can save a lot of manpower and time, improve development efficiency, reduce manual investment costs, improve collection efficiency, and obtain more accurate collection values, solving the problem of large errors in high-voltage sampling values.
Smart Images

Figure CN119510856A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of high voltage signal acquisition, and in particular to a high voltage acquisition method, system and automobile based on machine learning. Background Art
[0002] There are many voltage acquisition applications in automobiles. Whether it is temperature acquisition or resistance acquisition, the core is achieved through voltage conversion. High-voltage acquisition is a form of voltage acquisition. In order to reduce the acquisition error, high-precision hardware components such as microcontrollers, operational amplifiers, resistors and isolation chips are usually selected. These measures can reduce the error to a certain extent, but cannot completely eliminate it. In addition, there are also software methods to improve accuracy. For example, a calibration correction method can be used to calibrate the acquisition circuit and correct the deviation using a standard reference voltage source. Alternatively, an error compensation algorithm can be used to introduce an error compensation algorithm into the acquisition software to correct the acquisition value according to the known error characteristics. However, these methods also have some shortcomings. Among them, the accuracy and stability of the calibration equipment itself used in the calibration correction method have a great influence on the accuracy of calibration. If the calibration equipment cannot withstand high voltage or its accuracy is insufficient, the effect of software calibration will be limited; in addition, voltage acquisition may require real-time processing and calibration, and complex error compensation algorithms may cause processing delays, thereby affecting real-time performance. For this reason, how to correct the high-voltage acquisition value and improve the acquisition accuracy is a problem that needs to be overcome in the current field of high-voltage acquisition technology in practical applications. Summary of the invention
[0003] In view of this, the embodiments of the present application provide a high-voltage acquisition method, system and automobile based on machine learning to solve the problem of how to correct the high-voltage acquisition value and improve the acquisition accuracy.
[0004] In a first aspect of an embodiment of the present application, a high-voltage acquisition method based on machine learning is provided, comprising: obtaining, through a high-voltage acquisition circuit, a first low voltage value and a second low voltage value collected on the positive and negative lines of a high-voltage circuit to be tested, wherein the first low voltage value is a voltage value outputted after an operational amplifier and analog-to-digital conversion process of a voltage divider resistor on a voltage acquisition channel of a positive pole of a power supply of the high-voltage circuit to be tested relative to an isolated ground terminal, and the second low voltage value is a voltage value outputted after an operational amplifier and analog-to-digital conversion process of a voltage divider resistor on a voltage acquisition channel of a negative pole of a power supply of the high-voltage circuit to be tested relative to an isolated ground terminal; based on the first low voltage value and the second low voltage value, determining a high-voltage acquisition value of the high-voltage circuit to be tested; inputting the high-voltage acquisition value into a trained machine learning model for correction, and having the machine learning model output a corrected target high-voltage acquisition value; and sending the target high-voltage acquisition value to a target acquisition device.
[0005] According to a second aspect of an embodiment of the present application, a system is provided for implementing the above-mentioned high-voltage acquisition method based on machine learning, comprising: a high-voltage acquisition circuit module, which is used to sequentially acquire a first low voltage value and a second low voltage value on the high-voltage positive electrode and the high-voltage negative electrode of the high-voltage circuit to be tested, wherein the first low voltage value is the voltage value outputted after the voltage of the voltage divider resistor on the voltage acquisition channel of the positive electrode of the power supply of the high-voltage circuit to be tested relative to the isolated ground terminal is processed by an operational amplifier and analog-to-digital conversion, and the second low voltage value is the voltage value outputted after the voltage of the voltage divider resistor on the voltage acquisition channel of the negative electrode of the power supply of the high-voltage circuit to be tested relative to the isolated ground terminal is processed by an operational amplifier and analog-to-digital conversion; a digital isolator, which is used to transmit the first low voltage value and the second low voltage value to a task processing device; the task processing device, which is used to determine the high-voltage acquisition value of the high-voltage circuit to be tested based on the first low voltage value and the second low voltage value, and then input the high-voltage acquisition value into a trained machine learning model for correction, and the trained machine learning model outputs the corrected target high-voltage acquisition value.
[0006] According to a third aspect of an embodiment of the present application, a car is provided, which includes the above-mentioned system.
[0007] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the above-mentioned high-voltage acquisition method based on machine learning acquires the first low voltage value and the second low voltage value of the high-voltage circuit to be tested on the positive and negative lines through a high-voltage acquisition circuit, and then calculates the high-voltage acquisition value of the high-voltage circuit to be tested based on the first low voltage value and the second low voltage value, and finally inputs the high-voltage acquisition value into the trained machine learning model for correction to obtain the target high-voltage acquisition value to be collected. Compared with manual calibration and correction, this method of correcting the high-voltage acquisition value through a machine learning model can save a lot of manpower and time, improve development efficiency, and reduce labor input costs. In addition, it can also improve acquisition efficiency and obtain more accurate acquisition values, thereby solving the problem of large sampling value errors in high-voltage acquisition. In terms of application, it can also reduce the impact of errors on algorithms and control decisions. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0009] Figure 1 It is a flow chart of a high voltage acquisition method based on machine learning provided in an embodiment of the present application;
[0010] Figure 2It is a structural schematic diagram of a simplified high-voltage acquisition circuit provided in an embodiment of the present application;
[0011] Figure 3 It is a schematic diagram of a training process of a machine learning model provided in an embodiment of the present application;
[0012] Figure 4 It is a schematic diagram of a weight and bias training process of a linear regression model method provided in an embodiment of the present application;
[0013] Figure 5 It is a structural schematic diagram of a high-voltage acquisition system based on machine learning provided in an embodiment of the present application;
[0014] Figure 6 is a structural schematic diagram of another high-voltage acquisition system based on machine learning provided in an embodiment of the present application;
[0015] Figure 7 It is a schematic diagram of a partial structure of a car provided in an embodiment of the present application;
[0016] Figure 8 It is a structural diagram of a task processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0018] See also Figure 1 In a first embodiment of the present application, a high voltage acquisition method based on machine learning is provided, comprising the steps of:
[0019] S101, obtaining a first low voltage value and a second low voltage value collected on the positive and negative lines of the high-voltage circuit to be tested through a high-voltage acquisition circuit, wherein the first low voltage value is a voltage value outputted after the voltage of a voltage divider resistor on a voltage acquisition channel of a positive pole of a power supply of the high-voltage circuit to be tested relative to an isolated ground terminal is processed by an operational amplifier and analog-to-digital conversion, and the second low voltage value is a voltage value outputted after the voltage of a voltage divider resistor on a voltage acquisition channel of a negative pole of a power supply of the high-voltage circuit to be tested relative to an isolated ground terminal is processed by an operational amplifier and analog-to-digital conversion;
[0020] S102, determining a high voltage acquisition value of the high voltage circuit to be tested based on the first low voltage value and the second low voltage value;
[0021] S103, inputting the high-voltage acquisition value into the trained machine learning model for correction, and the machine learning model outputs the corrected target high-voltage acquisition value;
[0022] S104, sending the target high voltage acquisition value to the main control device.
[0023] The high-voltage acquisition method based on machine learning can be applied to various scenarios where high-voltage signals of high-voltage circuits need to be collected, including but not limited to automobiles and battery energy storage, and the main control device will also be different depending on the application scenario. For example, in the scenario where the above-mentioned high-voltage acquisition method based on machine learning is applied to new energy vehicles to collect high-voltage signals from high-voltage circuits in battery packs, the main control device can implement the computing chip and / or the main control chip in the battery management system.
[0024] According to the high-voltage acquisition method based on machine learning provided in the embodiment of the present application, the first low voltage value and the second low voltage value of the high-voltage circuit to be tested on the positive and negative lines are acquired through a high-voltage acquisition circuit, and then the high-voltage acquisition value of the high-voltage circuit to be tested is calculated based on the first low voltage value and the second low voltage value, and finally the high-voltage acquisition value is input into the trained machine learning model for correction to obtain the target high-voltage acquisition value to be collected. Compared with manual calibration and correction, this method of correcting the high-voltage acquisition value through a machine learning model can save a lot of manpower and time, improve acquisition efficiency, and obtain more accurate acquisition values, thereby solving the problem of large sampling value errors in high-voltage acquisition, and in terms of application, it can also reduce the impact of errors on algorithms and control decisions.
[0025] See also Figure 2 , is an example diagram of a high voltage acquisition circuit, Figure 2The power supply circuit where the medium load is located is the high-voltage circuit to be tested. The first voltage-dividing resistor R1 and the second voltage-dividing resistor R2, an operational amplifier circuit unit and an analog-to-digital conversion unit are provided on the two voltage acquisition channels where the positive and negative electrodes of the power supply of the high-voltage circuit to be tested are relatively isolated from the ground. The first voltage-dividing resistor R1 and the second voltage-dividing resistor R2 on the voltage acquisition channel where the positive electrode of the power supply of the high-voltage circuit to be tested is located are sequentially connected in series on the line between the positive electrode of the power supply of the high-voltage circuit to be tested and the isolated ground terminal (the line indicated by the high-voltage positive electrode in the figure), and the first voltage-dividing resistor R1 and the second voltage-dividing resistor R2 on the voltage acquisition channel where the negative electrode of the power supply of the high-voltage circuit to be tested is located are sequentially connected in series on the line between the positive electrode of the power supply of the high-voltage circuit to be tested and the isolated ground terminal. The voltage-dividing resistors R2 are connected in series in sequence on the line between the negative pole of the power supply of the high-voltage circuit to be tested and the isolated grounding terminal (the line indicated by the negative pole of the high-voltage in the figure), the resistance value of the first voltage-dividing resistor R1 is much greater than the resistance value of the second voltage-dividing resistor R2, the operational amplifier circuit unit is connected between the first voltage-dividing resistor and the second voltage-dividing resistor, the analog-to-digital conversion unit is connected to the operational amplifier circuit unit, the analog-to-digital conversion unit corresponding to the voltage acquisition channel on the high-voltage positive pole of the high-voltage circuit to be tested is used to output a first low voltage value, and the analog-to-digital conversion unit corresponding to the voltage acquisition channel on the high-voltage negative pole of the high-voltage circuit to be tested is used to output a second low voltage value.
[0026] The high-voltage acquisition circuit includes all the first voltage-dividing resistors R1, the second voltage-dividing resistors R2, the operational amplifier circuit unit and the analog-to-digital conversion unit on the two voltage acquisition channels of the positive and negative poles of the power supply of the high-voltage circuit to be tested relative to the isolated grounding end. Since the resistance value of the first voltage-dividing resistor R1 is much greater than the resistance value of the second voltage-dividing resistor R2, when the high-voltage circuit to be tested is a high-voltage line, the voltage collected by the second voltage-dividing resistor R2 is a low voltage. Specifically, the analog-to-digital conversion unit on the voltage acquisition channel of the positive pole of the power supply of the high-voltage circuit to be tested relative to the isolated grounding end outputs a first low voltage value, and the analog-to-digital conversion unit on the voltage acquisition channel of the negative pole of the power supply of the high-voltage circuit to be tested relative to the isolated grounding end outputs a second low voltage value. In other words, the first low voltage value is the voltage value outputted after the voltage of the voltage-dividing resistor on the voltage acquisition channel of the positive pole of the power supply of the high-voltage circuit to be tested relative to the isolated grounding end is processed by the operational amplifier and the analog-to-digital conversion, and the second low voltage value is the voltage value outputted after the voltage of the voltage-dividing resistor on the voltage acquisition channel of the negative pole of the power supply of the high-voltage circuit to be tested relative to the isolated grounding end is processed by the operational amplifier and the analog-to-digital conversion.
[0027] Specifically, the first low voltage value and the second low voltage value output by the high voltage acquisition circuit are not the real power supply voltage value of the high voltage circuit to be tested. However, the first low voltage value and the second low voltage value can be used to calculate the real value of the power supply voltage of the high voltage circuit to be tested.
[0028] The use of the first low voltage value and the second low voltage value to calculate the high voltage acquisition value of the high voltage circuit to be tested is related to the circuit structure of the high voltage acquisition circuit.
[0029] For example, see Figure 2In some optional embodiments, based on the first low voltage value and the second low voltage value, the high voltage acquisition value of the high voltage circuit to be tested is determined, including: based on the resistance values of the first voltage-dividing resistor R1 and the second voltage-dividing resistor R2, and the operational amplifier gain of the voltage acquisition channel where the first low voltage value is located, determining the high voltage positive electrode voltage value of the positive electrode of the power supply of the high voltage circuit to be tested relative to the isolated ground terminal; based on the resistance values of the first voltage-dividing resistor R1 and the second voltage-dividing resistor R2, and the operational amplifier gain of the voltage acquisition channel where the second low voltage value is located, determining the high voltage negative electrode voltage value of the negative electrode of the power supply of the high voltage circuit to be tested relative to the isolated ground terminal; based on the high voltage positive electrode voltage value and the high voltage negative electrode voltage value, determining the high voltage acquisition value of the power supply where the high voltage circuit to be tested is located.
[0030] Among them, when the resistance values of the first voltage-dividing resistor R1 and the second voltage-dividing resistor R2 and the low voltage value collected by the second voltage-dividing resistor R2 are known, the voltage on the circuit where the first voltage-dividing resistor R1 and the second voltage-dividing resistor R2 are located can be calculated, and then divided by the operational amplifier amplification factor of the corresponding voltage collection channel to obtain the single-sided voltage collection value of the positive / negative pole of the high-voltage circuit power supply to be tested relative to the isolated ground terminal.
[0031] For example, assuming that the first voltage-dividing resistor is R1, the second voltage-dividing resistor is R2, the first low voltage value is V1, the second low voltage value is V2, the voltage acquisition channel op amp amplification factor corresponding to the positive electrode of the high-voltage circuit to be tested is ratio1, and the voltage acquisition channel op amp amplification factor corresponding to the negative electrode of the high-voltage circuit to be tested is ratio2, then, the high-voltage acquisition value between the high-voltage positive electrode and the high-voltage negative electrode of the high-voltage circuit to be tested is calculated as follows:
[0032] Vh=(V1 / ratio1)*(R1+R2) / R2+(V2 / ratio2)*(R1+R2) / R2;
[0033] Among them, Vh represents the high-voltage acquisition value of the high-voltage circuit to be tested. The analog-to-digital conversion modules on the two voltage acquisition channels of the high-voltage acquisition circuit output V1 and V2 respectively. Since V1 and V2 are positive numbers, the high-voltage positive voltage value and the high-voltage negative voltage value are calculated and added to obtain the high-voltage acquisition value of the high-voltage circuit to be tested.
[0034] The high-voltage acquisition value obtained by calculation may deviate from the actual power supply voltage value of the high-voltage circuit to be tested due to factors such as the high-voltage acquisition circuit. Therefore, the high-voltage acquisition value obtained by calculation is input into the trained machine learning model, and the high-voltage acquisition value is automatically corrected by the machine learning model, and the corrected high-voltage acquisition value is output, i.e., the target high-voltage acquisition value. Among them, the specific implementation method of the machine learning model for correcting the high-voltage acquisition value is not unique.
[0035] For example, in some optional embodiments, the trained machine learning model includes a linear regression model, which is obtained by using the collected values of the high-voltage circuit as input features and the corresponding true values as target outputs for training.
[0036] Specifically, training a linear regression model requires collected values and true values. The collected values can be collected through the above-mentioned high-voltage collection circuit, and the true values can be output through the test bench. The high-voltage value output by the test bench is a true high-voltage value without error. Then, a large number of collected values and true values are used as samples to train the linear regression model. After the training is completed, a machine learning model (i.e., a target model) is obtained, which is used to correct the calculated high-voltage collected values of the high-voltage circuit to be tested to reduce errors and obtain more accurate target high-voltage collected values.
[0037] Among them, the training method of the linear regression model is never unique. For example, the training process of the linear regression model usually includes but is not limited to steps such as data preparation, data set division, model definition, model training, model evaluation, model tuning and model deployment.
[0038] Preferably, combined Figure 3 For example, in some optional embodiments, the collected values of the high voltage circuit are used as input features, and the corresponding real values are used as target outputs for training, including:
[0039] The voltage acquisition value of the high-voltage circuit with periodic voltage changes is acquired by using a high-voltage circuit acquisition chip, and the real voltage value of the corresponding high-voltage circuit is output through the test bench, wherein the acquisition period of the high-voltage circuit acquisition chip is the same as the voltage change period output by the test bench;
[0040] Collect voltage acquisition values and corresponding voltage true values as samples, and divide the samples into training set and test set;
[0041] Use the LinearRegression function in the sklearn (sklearn is a widely used machine learning library in Python) library (LinearRegression is a function in the sklearn.linear_model module, which is used to create a linear regression model) to create a linear regression model object. The linear regression model object includes the parameters learned by the linear regression model during the training process. The parameters are used to define the relationship between the voltage acquisition value and the true voltage value;
[0042] Use model.fit (i.e. model training, after the model is created, use the model.fit method to pass in the training data) to pass in the training set to train the created linear regression model, fit the linear regression model with the best parameters, and output the parameter values, which include the weight and bias of the linear relationship between the voltage acquisition value and the true voltage value;
[0043] The prediction performance of the linear regression model with the best parameters is evaluated using the test set, and when the prediction performance meets the preset requirements, the linear regression model with the best parameters is used as the machine learning model for correcting the voltage acquisition value.
[0044] In summary, the above training process includes several stages: data collection, data set division, model definition, model training, model evaluation and model tuning.
[0045] In the data collection stage, first of all, the training model needs the collected value and the true value. The true value can be output through the test bench. This high voltage value is a true high voltage value without error. At the same time, the collected value is obtained by using the high voltage collection circuit. The collected value and the true value are sent through CAN communication to generate the corresponding data table. The collected value corresponds to the true value one by one. The chip collection cycle is 10ms, so the voltage change cycle of the test bench output is 10ms, which automatically increases from 0, with a change step of 0.1V, up to 1600V, and 160S can collect a set of data. In order to avoid contingency and ensure the stability of the data, 6 sets of data will be collected, of which 5 sets of data need to be averaged, and the maximum and minimum values of the 5 sets of data are removed respectively. The remaining 3 sets of data are used for averaging, and the last set of data is used as a test set. Next, use Pycharm (PyCharm is an integrated development environment (IDE) developed by JetBrains specifically for Python programming. It provides a series of functions such as code editing, debugging, testing, project management, etc. to help developers write and maintain more efficiently) programming software, use Python language programming, import pandas library (Pandas is a powerful data analysis and data processing library in Python), numpy library (NumPy is a basic scientific computing library in Python), matplotlib (Matplotlib is one of the most popular data visualization libraries in Python, allowing users to generate various types of charts, such as line charts, bar charts, scatter plots, histograms, etc.) library files, and use the dataset function (Dataset function usually refers to functions used to load, manage, and manipulate datasets. In Python data analysis, dataset can generally refer to an instance of a dataset for data analysis and modeling) to read the collected values and true values respectively, and display all data in the form of arrays.
[0046] In the data set division stage, the training set and the test set are split, covering the range of 0-1600V.
[0047] In the model definition and model training stages, the model training uses linear regression, and some parameters need to be adjusted, such as the learning rate and the number of learning times. Usually, the learning rate is set to 0.01, so that the model effect is relatively stable. At the same time, the number of training times is more appropriate to choose 2000-5000. If the number of learning times is too small, the curve cannot be effectively fitted. If the number of learning times is too large, overfitting may occur.
[0048] The form of the linear regression model is: y = wx + b, w represents the weight, b represents the bias, α represents the learning rate, m represents the number of samples, i represents the training element number, h represents the training element number, θ (x i ) represents the predicted value, y i represents the true value, and the loss function represents the fit between the predicted value and the true value. The formula is as follows:
[0049] Weight:
[0050] Loss function:
[0051] Among them, see Figure 4 , the weight solution includes the following steps:
[0052] S1, import library file package;
[0053] S2, import data as a matrix;
[0054] S3, call the weight solution function;
[0055] S4, judging whether the expected number of training times has been reached;
[0056] S41, if yes, go to step S5;
[0057] S42, if not, calculate the predicted value;
[0058] S43, calculation error;
[0059] S44, solve for the gradient;
[0060] S45, update weight;
[0061] S46, calculate the loss value;
[0062] S5, return the weight value;
[0063] S6, obtain the model and output the predicted value and weight.
[0064] For example, suppose there is a data set including 4 pairs (actually much more than 4 pairs) of one-to-one corresponding collected values and true values. The specific data is as follows:
[0065] Collected value (x) True value 1 2 2 2.8 3 3.6 4 4.4
[0066] The form of the linear regression model is y=wx+b, where w represents the weight and b represents the bias.
[0067] 1. Initialization parameters.
[0068] Initial weight w=0;
[0069] Initial bias b = 0;
[0070] Learning rate α = 0.01;
[0071] The number of samples m=4.
[0072] 2. Calculate the loss function.
[0073] The formula of the loss function is:
[0074]
[0075] Among them, h θ (x i )=wx i +b.
[0076] 3. Calculate gradients and update weights and biases.
[0077] According to the formula:
[0078]
[0079] 4. Example calculations.
[0080] First iteration:
[0081] Compute the predicted value for each sample:
[0082] h θ (x i )=0×1=0;
[0083] h θ (x i )=0×2=0;
[0084] h θ (x i )=0×3=0;
[0085] h θ (x i )=0×4=0;
[0086] Calculate the loss:
[0087]
[0088] Compute gradients and update weights and biases:
[0089]
[0090] Subsequent iterations:
[0091] According to the above process, each iteration repeatedly calculates the loss, gradient and updates the weights and biases until the model converges, that is, the loss function reaches the minimum value.
[0092] Final result: After multiple iterations, the weight w and bias b will gradually tend to the value that minimizes the loss function. At this time, w and b are the desired weights and biases. In this way, the model parameters are gradually optimized through the gradient descent method, and the optimal weights and biases are finally obtained, so that the linear regression model can accurately fit the data.
[0093] In addition, the sklearn library is also used to establish a regression model. The LineraRegression function is used to create a least squares linear regression function, which can help train a suitable model. The model.fit function is used to pass in the training set, that is, the actual value and the collected value, to fit a linear model, and finally output a weight and bias. This library function can automatically fit the curve, without the need to manually define the function again to obtain the weight and loss function, which can improve the training efficiency of the model.
[0094] During the model evaluation and model tuning phase, you can pass the test set data through the model.predict function to get the value after the model prediction operation. This can verify the accuracy of the data. If the value obtained is not accurate enough, you can change the input test data again and train again.
[0095] The linear regression model is trained through the above training steps to obtain weight values and bias values. The weight values and bias values are the core parameters of the linear regression model, which directly determine the output of the model, that is, the prediction result of the high-voltage acquisition value calculated by the model for the input, that is, the corrected target high-voltage acquisition value, so as to reduce the error of the high-voltage acquisition value and obtain a more accurate high-voltage acquisition value.
[0096] In practical applications, the trained machine learning model can be deployed on the equipment that needs to correct the high-voltage collected value. For example, in the battery management system of a new energy vehicle, it is necessary to collect the voltage value of the high-voltage circuit part of the battery pack. Then, the trained machine learning model can be deployed on the computing power chip in the vehicle battery management system, and then the high-voltage collected value of the high-voltage circuit to be tested is input into the trained machine learning model deployed on the computing power chip, and the trained machine learning model is used to modify the high-voltage collected value i to obtain the target high-voltage collected value. Among them, the trained machine learning model is preferably the linear regression model obtained by training the collected value and the true value as samples.
[0097] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0098] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0099] See also Figure 5 In the second embodiment of the present application, a high-voltage acquisition system based on machine learning is also provided, which is used to implement the above-mentioned high-voltage acquisition method based on machine learning. The high-voltage acquisition system based on machine learning includes: a high-voltage acquisition circuit module, a digital isolator and a task processing device. The high-voltage acquisition circuit module is used to sequentially collect a first low voltage value and a second low voltage value on the high-voltage positive electrode and the high-voltage negative electrode of the high-voltage circuit to be tested, wherein the first low voltage value is the voltage of the voltage divider resistor on the voltage acquisition channel of the positive electrode of the power supply of the high-voltage circuit to be tested relative to the isolated ground terminal after being processed by an operational amplifier and analog-to-digital conversion, and the second low voltage value is the voltage of the voltage divider resistor on the voltage acquisition channel of the negative electrode of the power supply of the high-voltage circuit to be tested relative to the isolated ground terminal after being processed by an operational amplifier and analog-to-digital conversion. The digital isolator is used to transmit the first low voltage value and the second low voltage value to the task processing device, and the task processing device is used to determine the high-voltage acquisition value of the high-voltage circuit based on the first low voltage value and the second low voltage value, and then input the high-voltage acquisition value into the trained machine learning model for correction, and the trained machine learning model outputs the corrected target high-voltage acquisition value.
[0100] The working principle of the high-voltage acquisition system based on machine learning is that the task processing device has the function of neural network model operation. For example, the pre-trained machine learning model is deployed in the task processing device, and the acquisition value in the high-voltage acquisition circuit module (combined with Figure 2As shown, the collected values (including V1 and V2) will be passed to the digital isolator, which separates the high and low voltage circuits in the high voltage circuit, and the digital isolator passes the voltage AD value collected by the high voltage collection circuit module to the task processing device, which will obtain the high voltage collection value after calculation by the task processing device; since this high voltage collection value has a certain error, it will be corrected and supplemented by the machine learning model deployed in the task processing device, and finally the desired target high voltage collection value will be obtained.
[0101] Figure 2 An embodiment of a high voltage acquisition circuit module is combined with Figure 2 For example, the high-voltage acquisition circuit module includes two voltage acquisition channels, each of which is provided with a first voltage-dividing resistor R1, a second voltage-dividing resistor R2, an operational amplifier circuit unit, and an analog-to-digital conversion unit. One voltage acquisition channel corresponding to the high-voltage positive electrode of the high-voltage circuit to be tested is used to output a first low voltage value, namely V1; the other voltage acquisition channel corresponding to the high-voltage negative electrode of the high-voltage circuit to be tested is used to output a second low voltage value, namely V2.
[0102] Preferably, in some optional embodiments, combined with Figure 2 As shown, the high-voltage acquisition circuit module includes two voltage acquisition channels which are sequentially arranged on the high-voltage positive electrode and the high-voltage negative electrode of the high-voltage circuit to be tested, each voltage acquisition channel includes a first voltage-dividing resistor R1, a second voltage-dividing resistor R2, an operational amplifier circuit unit and an analog-to-digital conversion unit, the first voltage-dividing resistor R1 and the second voltage-dividing resistor R2 on the voltage acquisition channel where the positive electrode of the power supply of the high-voltage circuit to be tested is located are sequentially connected in series on the line between the positive electrode of the power supply of the high-voltage circuit to be tested and the isolated grounding terminal (the line indicated by the high-voltage positive electrode in the figure), the first voltage-dividing resistor R1 and the second voltage-dividing resistor R2 on the voltage acquisition channel where the negative electrode of the power supply of the high-voltage circuit to be tested is located are sequentially connected in series on the line between the positive electrode of the power supply of the high-voltage circuit to be tested and the isolated grounding terminal (the line indicated by the high-voltage positive electrode in the figure), and the first voltage-dividing resistor R1 and the second voltage-dividing resistor R2 on the voltage acquisition channel where the negative electrode of the power supply of the high-voltage circuit to be tested is located are sequentially connected in series on the line between the positive electrode of the power supply of the high-voltage circuit to be tested and the isolated grounding terminal. The voltage resistor R2 is sequentially connected in series on the line between the negative pole of the power supply of the high-voltage circuit to be tested and the isolated grounding terminal (the line indicated by the negative pole of the high voltage in the figure), the resistance value of the first voltage-dividing resistor R1 is much greater than the resistance value of the second voltage-dividing resistor R2, the operational amplifier circuit unit is connected between the first voltage-dividing resistor R1 and the second voltage-dividing resistor R2, and the analog-to-digital conversion unit is connected to the operational amplifier circuit unit, and the analog-to-digital conversion unit corresponding to the voltage acquisition channel on the high-voltage positive pole of the high-voltage circuit to be tested is used to output the first low voltage value, and the analog-to-digital conversion unit corresponding to the voltage acquisition channel on the high-voltage negative pole of the high-voltage circuit to be tested is used to output the second low voltage value. . In this embodiment, the first low voltage value on the high-voltage positive pole of the high-voltage circuit to be tested and the second low voltage value on the high-voltage negative pole are respectively acquired through the two voltage acquisition channels of the high-voltage acquisition circuit module, and the corresponding AD value is obtained through operational amplifier and analog-to-digital conversion, which is used for subsequent task processing devices to perform calculations and corrections.
[0103] Digital isolators separate high-voltage circuits from low-voltage circuits by means of electrical isolation, ensuring system safety and signal transmission reliability. Electrical isolation refers to physically separating the high-voltage and low-voltage parts of a circuit through methods such as optocouplers, transformers, or digital isolators, so that the electrical signal of the high-voltage circuit will not be directly transmitted to the low-voltage circuit. In this way, although signal communication can be carried out between the two circuits, electrical energy will not be directly transmitted from the high-voltage side to the low-voltage side. This not only protects the low-voltage circuit from the influence of high voltage, but also effectively suppresses the transmission of interference signals and prevents fault propagation.
[0104] Among them, the digital isolator includes various components used to isolate circuits, including but not limited to optocoupler chips, capacitive coupling chips, etc.
[0105] The task processing device is used to process the first low voltage value and the second low voltage value collected by the high voltage acquisition circuit module to obtain the high voltage acquisition value of the high voltage circuit to be tested, and automatically modify the high voltage acquisition value based on the trained machine learning model deployed on the task processing device to obtain the target high voltage acquisition value.
[0106] Among them, according to the application scenario, the task processing device can achieve different results. Figure 6 In the case where a high-voltage acquisition system based on machine learning is used in a system-on-energy vehicle to collect the high-voltage acquisition value of the power battery, the task processing device is arranged in the battery management system and includes a computing chip and a main control chip. A trained machine learning model is pre-deployed on the computing chip. The digital isolator transmits the first low voltage value and the second low voltage value to the computing chip through SPI communication. The computing chip determines the high-voltage acquisition value of the high-voltage circuit based on the first low voltage value and the second low voltage value, and then inputs the high-voltage acquisition value into the trained machine learning model for correction, and the trained machine learning model outputs the corrected target high-voltage acquisition value; the computing chip sends the target high-voltage acquisition value to the main control chip through serial port communication.
[0107] Among them, the communication connection method between the digital isolator, the computing chip and the main control chip is not unique. Figure 6 As shown, the digital isolator and the computing chip preferably communicate through SPI (Serial Peripheral Interface), while the computing chip and the main control chip preferably communicate through UART (Universal Asynchronous Receiver / Transmitter).
[0108] The above-mentioned high-voltage acquisition system based on machine learning collects the first low voltage value and the second low voltage value on the positive and negative lines of the high-voltage circuit to be tested through the high-voltage acquisition circuit module, and then transmits the first low voltage value and the second low voltage value to the task processing device through the digital isolator. The task transmission device calculates the high-voltage acquisition value of the high-voltage circuit to be tested, and finally inputs the high-voltage acquisition value into the trained machine learning model for correction to obtain the target high-voltage acquisition value to be collected. Compared with manual calibration and correction, this method of correcting the high-voltage acquisition value through a machine learning model can save a lot of manpower and time, improve acquisition efficiency, and obtain more accurate acquisition values, which solves the problem of large sampling value errors in high-voltage acquisition, and can also reduce the decision-making impact caused by errors in application.
[0109] See also Figure 7 and Figure 8 In the third embodiment of the present application, a car 7 is provided, comprising a high-voltage acquisition system 71 based on machine learning in any of the above embodiments, and the task processing device in the high-voltage acquisition system 71 based on machine learning comprises at least a processor 801, a memory 802, and a computer program 803 stored in the memory 802 and executable on the processor 801. When the processor 801 executes the computer program 803, the steps in the above-mentioned various method embodiments are implemented. Alternatively, when the processor 801 executes the computer program 803, the functions of each module / unit in the above-mentioned various device embodiments are implemented.
[0110] The embodiment of the present application obtains a trained target model for correcting the high-voltage acquisition value by learning the correction and complement value of the high-voltage acquisition value through a machine model. It is only necessary to arrange the target model in a task processing device, and then input the high-voltage acquisition value to be collected into the target model. The trained target model automatically corrects the high-voltage acquisition value to obtain the target high-voltage acquisition value. The entire modification process does not require manual parameter adjustment, which can save a lot of manpower and time, bring great convenience, and can solve the problem of large sampling value errors in high-voltage collection, thereby obtaining more accurate values. In terms of application, it can reduce the impact of decisions caused by errors.
[0111] The task processing device may include one or more processing chips, each of which may include the processor 801 and the memory 802. In addition, the task processing device may include but is not limited to the processor 801 and the memory 802. Those skilled in the art will appreciate that Figure 8 The electronic device 8 is merely an example and does not limit the task processing device 8 , which may include more or less components than those shown in the figure, or different components.
[0112] The processor 801 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0113] The memory 802 may be an internal storage unit of the task processing device, for example, a hard disk or memory of the task processing device. The memory 802 may also be an external storage device of the task processing device, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the task processing device. The memory 802 may also include both an internal storage unit of the task processing device and an external storage device. The memory 802 is used to store computer programs and other programs and data required by the task processing device.
[0114] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, 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 software functional units.
[0115] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium (e.g., a computer-readable storage medium). Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable storage media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0116] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A high voltage acquisition method based on machine learning, characterized in that: include: Acquire a first low voltage value and a second low voltage value on the positive and negative lines of the high-voltage circuit to be tested by a high-voltage acquisition circuit, wherein the first low voltage value is a voltage value outputted after the voltage of the voltage-dividing resistor on the voltage acquisition channel of the positive pole of the power supply of the high-voltage circuit to be tested relative to the isolated ground terminal is processed by an operational amplifier and analog-to-digital conversion, and the second low voltage value is a voltage value outputted after the voltage of the voltage-dividing resistor on the voltage acquisition channel of the negative pole of the power supply of the high-voltage circuit to be tested relative to the isolated ground terminal is processed by an operational amplifier and analog-to-digital conversion; Determining a high voltage acquisition value of the high voltage circuit to be tested based on the first low voltage value and the second low voltage value; The high-voltage acquisition value is input into the trained machine learning model for correction, and the machine learning model outputs the corrected target high-voltage acquisition value; The target high voltage acquisition value is sent to the main control device.
2. The method according to claim 1, characterized in that The step of determining the high voltage acquisition value of the high voltage circuit to be tested based on the first low voltage value and the second low voltage value comprises: Determine the voltage value of the high-voltage positive electrode of the power supply of the high-voltage circuit to be tested relative to the isolated ground terminal based on the resistance values of each voltage-dividing resistor on the circuit of the positive electrode of the power supply of the high-voltage circuit to be tested relative to the isolated ground terminal and the operational amplifier gain of the voltage acquisition channel where the first low voltage value is located; Based on the resistance values of each voltage-dividing resistor on the circuit of the negative electrode of the power supply of the high-voltage circuit to be tested relative to the isolated ground terminal, and the operational amplifier amplification factor of the voltage acquisition channel where the second low voltage value is located, determine the high-voltage negative electrode voltage value of the negative electrode of the power supply of the high-voltage circuit to be tested relative to the isolated ground terminal, wherein the voltage-dividing resistors on the lines of the positive and negative electrodes of the power supply of the high-voltage circuit to be tested relative to the isolated ground terminal both include a first voltage-dividing resistor and a second voltage-dividing resistor, the target voltage-dividing resistor is the second voltage-dividing resistor, and the resistance value of the first voltage-dividing resistor is greater than that of the second voltage-dividing resistor; Based on the high-voltage positive voltage value and the high-voltage negative voltage value, the high-voltage acquisition value of the power supply where the high-voltage circuit to be tested is located is determined.
3. The method according to claim 1, characterized in that The trained machine learning model includes a linear regression model, which is obtained by training using the collected values of the high-voltage circuit as input features and the corresponding true values as target outputs.
4. The method according to claim 3, characterized in that The method uses the collected values of the high voltage circuit as input features and uses the corresponding real values as target outputs for training, including: The voltage acquisition value of the high-voltage circuit with periodic voltage changes is acquired by using a high-voltage circuit acquisition chip, and the real voltage value of the corresponding high-voltage circuit is output through the test bench, wherein the acquisition period of the high-voltage circuit acquisition chip is the same as the voltage change period output by the test bench; Collect voltage acquisition values and corresponding voltage true values as samples, and divide the samples into training set and test set; Create a linear regression model object. The linear regression model object includes the parameters learned by the linear regression model during the training process. The parameters are used to define the relationship between the voltage acquisition value and the actual voltage value. The created linear regression model is trained using the training set, a linear regression model with optimal parameters is obtained by fitting, and parameter values are output, wherein the parameter values include weights and biases of the linear relationship between the voltage acquisition value and the voltage true value; The prediction performance of the linear regression model with the best parameters is evaluated using the test set, and when the prediction performance meets the preset requirements, the linear regression model with the best parameters is used as the machine learning model for correcting the voltage acquisition value.
5. The method according to any one of claims 1 to 4, characterized in that The trained machine learning model is deployed on a computing chip in the vehicle battery management system.
6. A system for implementing the high voltage acquisition method based on machine learning as described in any one of claims 1 to 5, characterized in that: include: A high-voltage acquisition circuit module, used to sequentially acquire a first low voltage value and a second low voltage value on a high-voltage positive electrode and a high-voltage negative electrode of a high-voltage circuit to be tested, wherein the first low voltage value is a voltage value outputted after an operational amplifier and analog-to-digital conversion process is performed on a voltage acquisition channel of a voltage divider resistor on a power supply positive electrode of the high-voltage circuit to be tested relative to an isolated ground terminal, and the second low voltage value is a voltage value outputted after an operational amplifier and analog-to-digital conversion process is performed on a voltage divider resistor on a voltage acquisition channel of a power supply negative electrode of the high-voltage circuit to be tested relative to an isolated ground terminal; A digital isolator for transmitting the first low voltage value and the second low voltage value to the task processing device; The task processing device is used to determine the high-voltage sampling value of the high-voltage circuit to be tested based on the first low voltage value and the second low voltage value, and then input the high-voltage sampling value into the trained machine learning model for correction, and the trained machine learning model outputs the corrected target high-voltage sampling value.
7. The system according to claim 6, characterized in that The high-voltage acquisition circuit module includes two voltage acquisition channels which are sequentially arranged on the high-voltage positive electrode and the high-voltage negative electrode of the high-voltage circuit to be tested, each voltage acquisition channel includes a first voltage-dividing resistor, a second voltage-dividing resistor, an operational amplifier circuit unit and an analog-to-digital conversion unit, the first voltage-dividing resistor and the second voltage-dividing resistor corresponding to the voltage acquisition channel where the high-voltage positive electrode is located are connected in series on the line between the high-voltage positive electrode and the isolated grounding terminal, the first voltage-dividing resistor and the second voltage-dividing resistor corresponding to the voltage acquisition channel where the high-voltage negative electrode is located are connected in series on the line between the high-voltage negative electrode and the isolated grounding terminal, the resistance value of the first voltage-dividing resistor is greater than the resistance value of the second voltage-dividing resistor, the operational amplifier circuit unit is connected between the first voltage-dividing resistor and the second voltage-dividing resistor, the analog-to-digital conversion unit is connected to the operational amplifier circuit unit, and the analog-to-digital conversion unit corresponding to the voltage acquisition channel on the high-voltage positive electrode of the high-voltage circuit to be tested is used to output a first low voltage value, and the analog-to-digital conversion unit corresponding to the voltage acquisition channel on the high-voltage negative electrode of the high-voltage circuit to be tested is used to output a second low voltage value.
8. The system according to claim 7, characterized in that The task processing device includes a computing power chip and a main control chip. A trained machine learning model is pre-deployed on the computing power chip. The digital isolator transmits the first low voltage value and the second low voltage value to the computing power chip. The computing power chip determines the high voltage collection value of the high voltage circuit to be tested based on the first low voltage value and the second low voltage value, inputs the high voltage collection value into the trained machine learning model for correction, and the trained machine learning model outputs the corrected target high voltage collection value; the computing power chip sends the target high voltage collection value to the main control chip through serial port communication.
9. The system according to claim 8, characterized in that The digital isolator communicates with the computing power chip via a serial peripheral interface, and the computing power chip communicates with the main control chip via a universal asynchronous receiver and transmitter.
10. An automobile, characterized in that: A system comprising any one of claims 6-9.