Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

We have an algorithm I'm trying to get my head around. The original author is gone and away and the whole thing seems to generally work, but I'd like to verify that it's working correctly. (And testing it at known points is uh, hard.)

Here it is:

$$ TargetValue = MeasuredValue * \frac{ln(1-TargetPercentage)}{ ln(1-MeasuredPercentage)} $$

We have a MeasuredValue we get when we put O2 gas across our sensor at 20%, MeasuredPercentage. But we actually want a reading at 10% O2 gas, TargetPercentage. Which, according to the algorithm when the target is 0.1 and the measured is 0.2, means we multiply all those readings by 0.47.

The algorithm is pasted all over the place, but the target and measured percentages are the same, and it all cancels out. Except for at 20%, which is "adjusted" to 10%. In which case the algorithm simplifies to $$ TargetValue = MeasuredValue*0.47 $$

The question becomes why 0.47?

O2 values follow a curve, and this looks like exponential interpolation to me. But it's not exactly the same as what I've been able to research, like:

$$ y = exp[ln(y_{i-1}) + [ln(y_i)-ln(y_{i-1})]\frac{x-x_{i-1}}{x_i-x_{i-1}} $$

Which I can't see how it would transform into what we have.

Is this an algorithm for exponential interpolation?
If not, what is it doing?

share|improve this question

1 Answer 1

It seems to me that what is going on is not interpolation, but an expression of a relationship of the form

$$v(p) = k \ln{(1-p)}$$

The measured values provide the value of $k$ ($0.47$ in your example), and you take it from there for $p=0.1$. I don't see a relation between this and any sort of interpolation. For small $p$, perhaps you can get away with linear interpolation, but that's about all.

share|improve this answer
    
The 0.47 value comes from a case when the percentage variables are at fix points. Then the relationship between the measured and target values is just f(x)=y*0.45. But, you know... why? –  Philip Jul 9 '13 at 15:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.