08-13-2014 01:58 AM
Hello everyone! I'm doing on our project on labview. We are using a battery and need to measure the percentage of power that the battery left. As the power used, the voltage will also decrease. Here is a table of the relationship between voltage and percentage. Can anyone help me to get the vary value of percentage? Thanks!
08-13-2014 02:00 AM
Are you having a problem with LabVIEW problem or a problem with math? What have you tried so far?
08-13-2014 02:05 AM
Both the problems...How to get the formula of the table? Then how to program on labview?
08-13-2014 02:05 AM
So what you mean here is, you want to display the exact percentage of battery depending on the voltage (Suppost 11.23 V mean 54% like that)? You can do a Linear fit (LinearFit.vi) with the Voltage as Y values and Percentage as X values (Or may be the other way) and find the Slope and Intercept. Then with the voltage reading Mulitply the slope and Add the intercept, you are done.
08-13-2014 02:12 AM
Create an array of points (cluster of xy pairs, x=voltage, y=%), then use interpolate array with the given voltage.
08-13-2014 03:37 AM
Actually it is not a linear one...
08-13-2014 03:38 AM
Maybe a curve.
08-13-2014 04:14 AM
Hi xuan,
either use Altenbach's suggestion (with linear interpolation between your data points) or calculate a polynomial regression of your choice. Then use PolynomialEvaluation function to calc battery state from voltage…
08-13-2014 06:09 AM
Using a lookup table as Altenbach suggested is the easiest way to go.
08-13-2014 08:57 PM
I'm sorry...Can u give me a more detailed solution?