Summary of the invention
In order to improve the precision of voltage sample, the embodiment of the invention provides a kind of acquisition methods and device of voltage sample.Said technical scheme is following:
On the one hand, a kind of acquisition methods of voltage sample is provided, said method comprises:
Voltage-reference is sampled, and compare to obtain one group of calibration value, specifically comprise:, the voltage range value is carried out segmentation according to the voltage range of voltage sampling circuit acquisition target with the reference voltage value of preset voltage-reference; Obtain the collection magnitude of voltage of each segmentation that voltage-reference is collected; Obtain the reference voltage value of each segmentation of voltage-reference; According to the collection magnitude of voltage of each segmentation of obtaining and the reference voltage value of each segmentation, utilize method of least square to obtain one group of calibration value;
Obtain the sample voltage value that voltage sampling circuit is gathered;
Based on this group calibration value said sample voltage value is revised, obtained correction voltage value.
Further, the collection magnitude of voltage of each segmentation that said basis is obtained and the reference voltage value of each segmentation utilize method of least square to obtain one group of calibration value, specifically comprise:
According to
Obtain one group of calibration value a and b, wherein, i is the number of the voltage sampling circuit voltage cell of gathering, X
iBe the collection magnitude of voltage of i voltage cell, Y
iBe the reference voltage value of i voltage cell, n is the voltage cell number of voltage-reference.
Wherein, saidly said sample voltage value is revised, is obtained correction voltage value, specifically comprise according to this group calibration value:
According to y=bx+a said sample voltage value x is revised, obtain correction voltage value y, wherein a and b are this group calibration value.
In addition, said method also comprises:
Collect the collection magnitude of voltage through the voltage sample passage;
According to the collection magnitude of voltage of reference voltage value and said voltage sample passage, obtain one group of calibration value of corresponding voltage sampling channel.
On the other hand, a kind of deriving means of voltage sample is provided, said device comprises:
First sample circuit; Be used for voltage-reference is sampled, and compare to obtain one group of calibration value, specifically comprise: segmenting unit with the reference voltage value of preset voltage-reference; Be used for voltage range, the voltage range value is carried out segmentation according to the voltage sampling circuit acquisition target; First acquiring unit is used to obtain the collection magnitude of voltage of each segmentation that voltage-reference is collected; Second acquisition unit is used to obtain the reference voltage value of each segmentation of voltage-reference; Demarcate the unit, be used for utilizing method of least square to obtain one group of calibration value according to the collection magnitude of voltage of each segmentation of obtaining and the reference voltage value of each segmentation;
Second sample circuit is used to obtain the sample voltage value that voltage sampling circuit is gathered;
Correcting module is used for according to this group calibration value said sample voltage value being revised, and obtains correction voltage value.
Wherein, first sample circuit specifically comprises:
Segmenting unit is used for the voltage range according to the voltage sampling circuit acquisition target, and the voltage range value is carried out segmentation;
First acquiring unit is used to obtain the collection magnitude of voltage of each segmentation that voltage-reference is collected;
Second acquisition unit is used to obtain the reference voltage value of each segmentation of voltage-reference;
Demarcate the unit, be used for utilizing method of least square to obtain one group of calibration value according to the collection magnitude of voltage of each segmentation of obtaining and the reference voltage value of each segmentation.
Further, said demarcation unit specifically comprises:
According to
Obtain one group of calibration value a and b, wherein, i is the number of the voltage sampling circuit voltage cell of gathering, X
iBe the collection magnitude of voltage of i voltage cell, Y
iBe the reference voltage value of i voltage cell, n is the voltage cell number of voltage-reference.
Wherein, said correcting module specifically comprises:
According to y=bx+a said sample voltage value x is revised, obtain correction voltage value y, wherein a and b are this group calibration value.
In addition, said device also comprises:
The 3rd acquiring unit is used for collecting the collection magnitude of voltage through the voltage sample passage;
The second demarcation unit is used for the collection magnitude of voltage according to reference voltage value and said voltage sample passage, obtains one group of calibration value of corresponding voltage sampling channel.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is: through obtaining calibration value, and according to calibration value the magnitude of voltage of voltage sampling circuit collection is revised, obtained correction voltage value, improved the precision of voltage sample.
The specific embodiment
For making the object of the invention, technical scheme and advantage clearer, embodiment of the present invention is done to describe in detail further below in conjunction with accompanying drawing.
Embodiment 1
Referring to Fig. 1, the embodiment of the invention provides a kind of acquisition methods of voltage sample, and this method flow is specific as follows:
Step 101: voltage-reference is sampled, and compare to obtain calibration value with the reference voltage value of preset voltage-reference;
Step 102: voltage sampling circuit is gathered voltage, obtains sample voltage value;
Step 103: according to calibration value sample voltage value is revised, obtained correction voltage value.
The method that the embodiment of the invention provides through obtaining calibration value, and is revised the sample voltage value of voltage sampling circuit collection according to calibration value, obtains correction voltage value, has improved the precision of voltage sample.The method that the embodiment of the invention provides; Can the precision of voltage sample be controlled in 5 ‰; Real-time control to voltage has significant meaning; Especially to the efficiently sampling of hybrid vehicle and pure electric vehicle vehicle mounted dynamic battery voltage, can protect the high voltage power battery better, battery is being discharged and recharged in the scope efficiently.
Embodiment 2
Referring to Fig. 2, the embodiment of the invention provides a kind of acquisition methods of voltage sample, and this method flow is specific as follows:
Step 201: the span of the reference voltage value of the voltage-reference of gathering according to voltage sampling circuit, reference voltage value is carried out segmentation;
To this step, the embodiment of the invention is divided into plurality of sections by the span of master system according to the reference voltage value of voltage-reference with reference voltage value, and by the voltage sampling circuit in the battery management system this voltage-reference is gathered voltage.In the practical application; The voltage range of voltage-reference maybe be very big, and like 0-220V, a certain voltage sampling circuit there is no fear of so big scope and gathers; When being merely 0-5V like the voltage range of this voltage sampling circuit acquisition target; The voltage range 0-5V that then gathers according to this voltage sampling circuit, the span 0-5V of the reference voltage of the voltage-reference of also promptly gathering according to this voltage sampling circuit carries out segmentation to the voltage range 0-5V of reference voltage value.The embodiment of the invention does not limit the type of voltage-reference, only is that lithium ion battery is that example describes with the voltage-reference.
For example; Span 0-5V according to the reference voltage value of lithium ion battery; The embodiment of the invention does not limit the concrete number of segmentation; In one embodiment of the invention, this reference voltage value is divided into 7 sections is example, if 7 are segmented into 0-1.2V, 1.2-2.09V, 2.09-2.5V, 2.5-3.02V, 3.02-3.5V, 3.5-4V and 4-7V.
Step 202: obtain the collection magnitude of voltage that voltage sampling circuit is gathered each segmentation of voltage-reference, and obtain the reference voltage value of corresponding each segmentation;
To this step; Voltage sampling circuit is gathered each segmentation of voltage-reference through the voltage sample passage, and the collection magnitude of voltage of each segmentation is sent to master system, in the practical application; Voltage sampling circuit is made up of one or more passages; Specifically decided by part characteristic, voltage sampling circuit can be gathered a segmentation through one or more voltage sample passages, also can gather one or more segmentations through a voltage sample passage.
Further; When master system obtains the collection magnitude of voltage of each segmentation of voltage-reference; Also obtain the channel number of the cooresponding voltage sample passage of collection magnitude of voltage of each segmentation simultaneously; The embodiment of the invention does not limit the mode of the channel number of the collection magnitude of voltage that obtains each segmentation and cooresponding voltage sample passage, is example with 7 segmentation collections to lithium ion battery in the step 201 still, through CAN (Controller Area NetWork; Controller local area network) the collection magnitude of voltage of these 7 segmentations is obtained in communication, and obtains the channel number C of the cooresponding voltage sample passage of collection magnitude of voltage of these 7 segmentations
1
The embodiment of the invention does not limit the collection magnitude of voltage of each segmentation of obtaining voltage-reference and the sequential of the reference voltage value of corresponding each segmentation.
Master system is provided with order through sending reference voltage to voltage-reference; Obtain the reference voltage value of each segmentation of voltage-reference; Be generally the intermediate value of each segmentation, the embodiment of the invention is not sent the mode that reference voltage is provided with order to master system and is limited with the mode of obtaining reference voltage value, in one embodiment of the invention; Master system sends reference voltage through CAN communication order is set, and obtains reference voltage value.Particularly; Master system can be provided with order through sending a reference voltage; Obtain the reference voltage value of all segmentations of voltage-reference; Also can order be set through sending a plurality of reference voltages, obtain the reference voltage value of each segmentation of voltage-reference respectively, this reference voltage is provided with the number of the number of order corresponding to segmentation.The embodiment of the invention does not limit the mode of the reference voltage value that obtains each segmentation, only order to be set to obtain the reference voltage value of each segmentation respectively be that example describes through sending a plurality of reference voltages.
For example; Master system sends a reference voltage at set intervals order is set; Still being example to 7 segmentation collections of lithium ion battery in the step 201, master system is every to be sent a reference voltage through CAN communication to voltage-reference at a distance from 10S order is set, and in each 10S; Obtain the reference voltage of a segmentation of voltage-reference through CAN communication; Send altogether 7 times, in the embodiment of the invention, the reference voltage of 7 segmentations that master system receives is respectively 500mV, 1500mV, 2250mV, 2750mV, 3250mV, 3750mV and 4500mV.
Step 203: collection magnitude of voltage and reference voltage value according to each segmentation obtain calibration value;
Particularly, master system obtains calibration value according to the collection magnitude of voltage and the reference voltage value of each segmentation that receives.
For example, the embodiment of the invention is passed through method of least square
Obtain calibration value a and b, wherein, i is the number of the voltage sampling circuit voltage cell of gathering, i=1 ... n, X
iBe the collection magnitude of voltage of i voltage cell, Y
iBe the reference voltage value of i voltage cell, n is the number of the voltage cell of this voltage-reference, and for selected voltage-reference, n is a given value.In the embodiment of the invention, correspond to each segmentation, obtain the collection magnitude of voltage of each segmentation through collection magnitude of voltage with each voltage cell of the reference voltage source of gathering; Collection magnitude of voltage like certain voltage cell of reference voltage source is 2.05V; Then to gather magnitude of voltage be 2.05V because 2.05V, then obtains one of the 2nd segmentation corresponding to the 2nd segmentation 1.2-2.09V, in like manner; Can obtain the collection magnitude of voltage of each segmentation, repeat no more here.In addition, all be through the voltage sample channel C owing to respectively gathering magnitude of voltage in the embodiment of the invention
1Gather, the calibration value that therefore obtains is the voltage sample channel C
1Cooresponding calibration value.
Further, for each voltage sample passage of voltage sampling circuit, can obtain the cooresponding calibration value of each voltage sample passage.Because the collection magnitude of voltage that same voltage-reference is gathered through different voltage sampling channels is different; Thereby each voltage sample passage correspondence is organized a, b value more; For same voltage sample passage, every group of a, the corresponding segmentation of b value, the number of group equals the number of segmentation.The channel number of the voltage sample passage that master system obtains step 202 and the cooresponding many group a of each voltage sample passage, b value; Sending to battery management system preserves; The embodiment of the invention does not limit send mode; In one embodiment of the invention, send through CAN communication.
Step 204: obtain the sample voltage value that voltage sampling circuit is gathered;
Particularly, master system obtains the sample voltage value that voltage sampling circuit is gathered, and obtains the channel number of the cooresponding voltage sample passage of this sample voltage value.Identical in the mode that this step is obtained the sample voltage value and the channel number of cooresponding voltage sample passage and the step 202, repeat no more here.
Step 205: according to calibration value this sample voltage value is revised, obtained correction voltage value.
Particularly; Master system is according to the channel number of the cooresponding voltage sample passage of the sample voltage value of obtaining in the step 204; In battery management system, obtain the cooresponding calibration value of this channel number; And revise according to the sample voltage value that this calibration value obtains step 204, obtain correction voltage value, this correction voltage value is kept at master system.
Wherein, Can adopt linear method that the sample voltage value of obtaining in the step 204 is revised, this linear method is specially: y=bx+a, x are sample voltage value; Y is the correction voltage value to obtaining after this sample voltage value correction, and this a, b value are the cooresponding calibration values of segmentation at x place.
The method that the embodiment of the invention provides through obtaining calibration value, and is revised the sample voltage value of voltage sampling circuit collection according to calibration value; Obtain correction voltage value, improved the precision of voltage sample, can the precision of voltage sample be controlled in 5 ‰; Real-time control to voltage has significant meaning; Especially to the efficiently sampling of hybrid vehicle and pure electric vehicle vehicle mounted dynamic battery voltage, can protect the high voltage power battery better, battery is being discharged and recharged in the scope efficiently.
Embodiment 3
Referring to Fig. 3, the embodiment of the invention provides a kind of deriving means of voltage sample, and this device comprises:
First sample circuit 301 is used for voltage-reference is sampled, and compares to obtain calibration value with the reference voltage value of preset voltage-reference;
Second sample circuit 302 is used to obtain the sample voltage value that voltage sampling circuit is gathered;
Correcting module 303 is used for according to calibration value sample voltage value being revised, and obtains correction voltage value.
Wherein, first sample circuit 301 specifically comprises:
Segmenting unit is used for the voltage range according to the voltage sampling circuit acquisition target, and the voltage range value is carried out segmentation;
First acquiring unit is used to obtain the collection magnitude of voltage of each segmentation that voltage sampling circuit collects voltage-reference;
Second acquisition unit is used to obtain the reference voltage value of each segmentation of voltage-reference;
Demarcate the unit, be used for utilizing method of least square to obtain calibration value according to the collection magnitude of voltage of each segmentation of obtaining and the reference voltage value of each segmentation.
Further, demarcating the unit specifically comprises:
According to
Obtain calibration value a and b, wherein, i is the number of the voltage sampling circuit voltage cell of gathering, X
iBe the magnitude of voltage of i voltage cell, Y
iBe the reference voltage value of i voltage cell, n is the voltage cell number of voltage-reference.
Wherein, correcting module 303 specifically comprises:
According to y=bx+a sample voltage value x is revised, obtain correction voltage value y, wherein a and b are calibration value.
In addition, device also comprises:
The 3rd acquiring unit is used for collecting the collection magnitude of voltage through the voltage sample passage;
The second demarcation unit is used for the collection magnitude of voltage according to reference voltage value and voltage sample passage, obtains the calibration value of corresponding voltage sampling channel.
The device that the embodiment of the invention provides; Obtain calibration value through first acquisition module; And the sample voltage value that second acquisition module obtains is revised according to the calibration value that first acquisition module obtains by correcting module, obtain correction voltage value, improved the precision of voltage sample; Can the precision of voltage sample be controlled in 5 ‰; Real-time control to voltage has significant meaning, especially to the efficiently sampling of hybrid vehicle and pure electric vehicle vehicle mounted dynamic battery voltage, can protect the high voltage power battery better.
Need to prove: the deriving means of the voltage sample that the foregoing description provides is when obtaining magnitude of voltage; Only the division with above-mentioned each functional module is illustrated; In the practical application; Can as required above-mentioned functions be distributed by the different functional completion, the inner structure that is about to device is divided into different functional, to accomplish all or part of function of above description.In addition, the acquisition methods embodiment of the deriving means of the voltage sample that the foregoing description provides and voltage sample belongs to same design, and its concrete implementation procedure sees method embodiment for details, repeats no more here.
All or part of content in the technical scheme that above embodiment provides can realize that through software programming its software program is stored in the storage medium that can read, storage medium for example: the hard disk in the computing machine, CD or floppy disk.
The above is merely preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.