On 8/27/21 9:04 AM, Doug Stewart wrote:
>
>
> On Fri, Aug 27, 2021 at 11:13 AM Thomas D. Dean <tomdean@wavecable.com
> <mailto:tomdean@wavecable.com>> wrote:
>
> On 8/27/21 8:09 AM, Thomas D. Dean wrote:
> > I have a voltage divider I want to calibrate. I tried this by
> exchanging
> > the resistors and measuring the resultant rfesistance.
> >
> > 1.6516 = 3.3 * R1 / (R1 + R2)
> > 1.6484 = 3.3 * R2 / (R1 + R2)
> >
> > R1 is around 1005 ohms
> > R2 is around 1003 ohms
> >
> > I think this is simple. But evidently, it is beyond me.
> >
> > Tom Dean
>
> And, worse, I can not clearly state the problem: rfesistance = voltage.
>
>
>
> I think that you are making it too hard.
>
> Choose r1 say 1000
> now calculate r2 from your first eq.
> I get 998.06
>
I want to calibrate the voltage divider. Two equations, two unknowns.
Should have a solution.
The idea is to have a known value for R1 and R2 so I can measure Vs,
(= 3.3?) in the future.
Maybe, iterate R1, calculate R2 with the first and see if it satisfies
the 2nd equation.
I wrote a function
function [y] = eq_r(x)
y(1) = 1.6516 - 3.3 * x(1) / (x(1) + x(2))
y(2) = 1.6484 - 3.3 * x(2) / (x(1) + x(2))
endfunction
fsolve returns values that do not satisfy the equations. Very dependent
on X0 supplied.
Tom Dean
----------
We are transitioning to a web based forum
for community help discussions at
https://octave.discourse.group/c/help
I think the problem is ill-defined (or at least there are infinite solutions). If you put the solution into linear form by multipling by x1+x2 on both sides and collecting like terms, you'd get
1.6484x1 -1.6516x2 = 0
-
1.6484x1
+1.6516x2=0
So, you get equivalent equations, so you really only have one equation, which you can solve:
x2 = 0.9981x1
Hope this helps,
James Sherman