public class BatteryParamEstimator
extends java.lang.Object
Constructor and Description |
---|
BatteryParamEstimator(int length)
Initalizes all internal variables for using the class.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getConfidence()
Getter for Confidence condition met boolean.
|
double |
getEstESR()
Getter for ESR.
|
double |
getEstVoc()
Getter for Voc.
|
double |
getEstVsys(double Idraw_A)
Given a system current draw, estimate the resulting system voltage given the latest estimated
battery parameters.
|
double |
getMaxIdraw(double VsysMin_V)
Given a minimum system voltage allowable, estimate the maximum current which may be drawn
from the battery at the present time.
|
void |
setConfidenceThresh(double Thresh_A) |
void |
updateEstimate(double measSysVoltage_V,
double measSysCurrent_A)
Update the internal estimates with a new measured system voltage and current.
|
public BatteryParamEstimator(int length)
length
- Window size to consider for estimation. 100 is usually a good start. Smaller
windows make the estimator react faster to rapid changes in the electrical system, but
larger windows make it more immune to noise. Engineering tradeoff, you pick!public void setConfidenceThresh(double Thresh_A)
public void updateEstimate(double measSysVoltage_V, double measSysCurrent_A)
measSysVoltage_V
- Battery voltage as measured by PDBmeasSysCurrent_A
- Current draw as measured by PDBpublic double getEstESR()
public double getEstVoc()
public boolean getConfidence()
public double getEstVsys(double Idraw_A)
Idraw_A
- estimated system current draw in Ampspublic double getMaxIdraw(double VsysMin_V)
VsysMin_V
- minimum desirable system voltage