Current sampling method for new energy automobile

文档序号:613560 发布日期:2021-05-07 浏览:11次 中文

阅读说明:本技术 一种新能源汽车电流采样方法 (Current sampling method for new energy automobile ) 是由 王凯 于 2020-12-17 设计创作,主要内容包括:本发明涉及一种新能源汽车电流采样方法,所述方法包括以下步骤:步骤1:将霍尔放在电池正极端,供电电源由5744P提供,步骤2:分流器串联在电池负极端,步骤3:考虑到霍尔和分流器都有误差,故霍尔采集到的电流和分流器采集到的电流进行比较时需要将各自的误差包含在内,步骤4:得到初始卡尔曼系数K;步骤5:更新方差P和系数K。(The invention relates to a new energy automobile current sampling method, which comprises the following steps: step 1: placing the Hall at the positive end of the battery, and providing power supply by 5744P, and step 2: the shunt is connected in series at the negative end of the battery, and the step 3: considering that both the hall and the shunt have errors, when comparing the current collected by the hall and the current collected by the shunt, the respective errors need to be included, and step 4: obtaining an initial Kalman coefficient K; and 5: the variance P and the coefficient K are updated.)

1. The new energy automobile current sampling method is characterized by comprising the following steps:

step 1: acquiring a sampling error u1 of the Hall;

step 2: acquiring the sampling error of the flow divider as u 2;

and step 3: considering that both the Hall and the shunt have errors, the respective errors need to be included when the current collected by the Hall and the current collected by the shunt are compared, and when the error values of the two currents have intersection, the current values collected by the Hall and the shunt are considered to be effective values;

and 4, step 4: obtaining an initial Kalman coefficient K, specifically:

the variance of the Hall sampling error is P ═ u1^2, the variance of the shunt sampling error is R ═ u2^2, the initial Kalman coefficient is obtained and is K ═ P/(P + R) ═ u2^2/(u1^2+ u2^2), and the non-0 current value collected for the first time is assumed to be: detecting a current value Ia by the Hall and detecting a current value Ib by the shunt; thus, the current value I after the primary processing is obtained as Ib + K (u1-u 2); storing K1 ═ R/(P + R) ═ u1^2/(u1^2+ u2^2), and performing step 5 by using a Hall after the shunt fails;

and 5: p1 at the next time point obtains updated P1 ═ P (1-K) ×, and K1 at the next time point also obtains updated K1 ═ P1/(P1+ R), and assuming that the diverter detection current value I2b at this time point obtains a processed current value I2 ═ I2b + K1 ═ u1-u 2;

step 6: recursion is achieved by the above.

2. The new energy automobile current sampling method according to claim 1, wherein the step 1: acquiring a sampling error u1 of the Hall; specifically, the Hall is placed at the positive electrode end of the battery, a power supply is provided by 5744P, when current passes through the Hall, the Hall can generate a voltage value, the voltage value is collected by an AD port of 5744P, a calculation formula of a current value is obtained by inquiring a product manual of the Hall, so that a passing current value is obtained, and the sampling error of the Hall is u 1.

3. The new energy automobile current sampling method according to claim 1, wherein the step 2: acquiring the sampling error of the flow divider as u 2; specifically, the shunt is connected in series at the negative electrode end of the battery, when current passes through the shunt, the front end and the rear end of the shunt respectively generate a voltage value, the two voltage values are acquired by the AD port of 5744P, a calculation formula of a current value is obtained by inquiring a product manual of the shunt, and therefore the passing current value is obtained, and the sampling error of the shunt is u 2.

Technical Field

The invention relates to a sampling method, in particular to a new energy automobile current sampling method, and belongs to the technical field of function safety detection of new energy automobiles.

Background

Current new energy automobile all has the function of current sampling. Current is typically collected using a hall current sensor or shunt. The Hall current sensor scheme is as follows: a high-voltage wire of the battery penetrates through the middle of a hole of the Hall current sensor, a voltage value is output through the Hall principle, a formula of the voltage value and a passing current value is obtained by inquiring a Hall sensor manual, and the passing current value is obtained through calculation. The scheme of the flow divider is as follows: and connecting the shunt in series to a high-voltage loop of the battery, collecting voltage values passing through two ends of the shunt, and removing the resistance value of the shunt by using the obtained voltage difference value to obtain a passing current value. In any way, the precision of the collected current is limited; in addition, due to the popularization of functional safety, clear requirements are provided for overcurrent faults in the charging and discharging processes of the new energy automobile at the present stage, and the traditional current sampling function cannot meet the functional safety requirements; in order to solve the problems, a novel current sampling method is provided, and the method not only meets the international safety standard: ISO 26262, and obtaining the optimal current through data processing.

Disclosure of Invention

The invention provides a new energy automobile current sampling method aiming at the problems in the prior art, and the technical scheme meets the requirement of functional safety on current sampling and provides the optimal current for calculating the SOC and the SOP.

In order to achieve the purpose, the technical scheme of the invention is that the current sampling method of the new energy automobile comprises the following steps:

step 1: placing a Hall at the positive electrode end of a battery, supplying power by 5744P, when current passes through the Hall, the Hall can generate a voltage value which is acquired by an AD port of 5744P, and obtaining a calculation formula of a current value by inquiring a product manual of the Hall, so that a passing current value is obtained, wherein the sampling error of the Hall is u 1;

step 2: the shunt is connected in series at the negative electrode end of the battery, when current passes through the shunt, a voltage value is generated at the front end and the rear end of the shunt respectively, the two voltage values are acquired by the AD port of 5744P, a calculation formula of the current value is obtained by inquiring a product manual of the shunt, and therefore the passing current value is obtained, and the sampling error of the shunt is u 2;

and step 3: considering that both the Hall and the shunt have errors, the respective errors need to be included when the current collected by the Hall and the current collected by the shunt are compared, and when the error values of the two currents have intersection, the current values collected by the Hall and the shunt are considered to be effective values;

and 4, step 4: obtaining an initial Kalman coefficient K;

the variance of the Hall sampling error is P ═ u1^2, the variance of the shunt sampling error is R ═ u2^2, the initial Kalman coefficient is obtained and is K ═ P/(P + R) ═ u2^2/(u1^2+ u2^2), and the non-0 current value collected for the first time is assumed to be: detecting a current value Ia by the Hall and detecting a current value Ib by the shunt; thus, the current value I after the primary processing is obtained as Ib + K (u1-u 2); storing K1 ═ R/(P + R) ═ u1^2/(u1^2+ u2^2), and performing step 5 by using a Hall after the shunt fails;

and 5: p1 at the next time point obtains updated P1 ═ P (1-K) ×, and K1 at the next time point also obtains updated K1 ═ P1/(P1+ R), and assuming that the diverter detection current value I2b at this time point obtains a processed current value I2 ═ I2b + K1 ═ u1-u 2;

step 6: recursion is achieved by the above.

Compared with the prior art, the invention has the following advantages: 1) due to the existence of the Hall and the shunt, the combined sampling scheme can meet the functional safety requirement; 2) in the scheme, a Kalman filtering algorithm is used, and the obtained current is also an optimal value; 3) the algorithm only needs to acquire data currently, the requirement on storage is not large, the algorithm can recur, and the implementation is simple; 4) the circuit and the tool which need to be built in the implementation scheme are very simple and easy to operate.

Drawings

FIG. 1 is a block diagram of the system of the present invention;

FIG. 2 is a flow chart of the present invention.

The specific implementation mode is as follows:

for the purpose of enhancing an understanding of the present invention, the present embodiment will be described in detail below with reference to the accompanying drawings.

Example 1: referring to fig. 1, a new energy automobile current sampling method includes the following steps:

step 1: placing a Hall at the positive electrode end of a battery, supplying power by 5744P, when current passes through the Hall, the Hall can generate a voltage value which is acquired by an AD port of 5744P, and obtaining a calculation formula of a current value by inquiring a product manual of the Hall, so that a passing current value is obtained, wherein the sampling error of the Hall is u 1;

step 2: the shunt is connected in series at the negative electrode end of the battery, when current passes through the shunt, a voltage value is generated at the front end and the rear end of the shunt respectively, the two voltage values are acquired by the AD port of 5744P, a calculation formula of the current value is obtained by inquiring a product manual of the shunt, and therefore the passing current value is obtained, and the sampling error of the shunt is u 2;

and step 3: considering that both the Hall and the shunt have errors, the respective errors need to be included when the current collected by the Hall and the current collected by the shunt are compared, and when the error values of the two currents have intersection, the current values collected by the Hall and the shunt are considered to be effective values;

and 4, step 4: obtaining an initial Kalman coefficient K;

the variance of the Hall sampling error is P ═ u1^2, the variance of the shunt sampling error is R ═ u2^2, the initial Kalman coefficient is obtained and is K ═ P/(P + R) ═ u2^2/(u1^2+ u2^2), and the non-0 current value collected for the first time is assumed to be: detecting a current value Ia by the Hall and detecting a current value Ib by the shunt; thus, the current value I after the primary processing is obtained as Ib + K (u1-u 2); storing K1 ═ R/(P + R) ═ u1^2/(u1^2+ u2^2), and performing step 5 by using a Hall after the shunt fails;

and 5: p1 at the next time point obtains updated P1 ═ P (1-K) ×, and K1 at the next time point also obtains updated K1 ═ P1/(P1+ R), and assuming that the diverter detection current value I2b at this time point obtains a processed current value I2 ═ I2b + K1 ═ u1-u 2;

step 6: recursion is achieved by the above.

It should be noted that the above-mentioned embodiments are not intended to limit the scope of the present invention, and all equivalent modifications and substitutions based on the above-mentioned technical solutions are within the scope of the present invention as defined in the claims.

6页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:全光纤电流互感器传感环

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!