# Application note AN-589 - error in Equation 1

Discussion in 'General Electronics Chat' started by kdillinger, Jan 27, 2010.

1. ### kdillinger Thread Starter Active Member

Jul 26, 2009
141
3
All, I would like to have confirmation that there is a mistake in ADI's application note AN-589.
I have attached the first 2 pages showing equation 1 and 3. I show my equation for Equation 1 on ADI1.pdf as well what I calculate the equation to be in place of Equation 3 shown in the datasheet. I did not completely solve it, but I used superposition.
Can someone confirm? I have not heard from ADI themselves.

File size:
196 KB
Views:
30
File size:
66.8 KB
Views:
21
File size:
193.8 KB
Views:
29
2. ### StayatHomeElectronics AAC Fanatic!

Sep 25, 2008
1,020
71
I have not gone through the entire derivation but you seemed to have substituted R4 = R2(1 - error). That introduces the same error in both resistors R2 and R4, thus making them both the same. I think you are supposed to substitute R4 = R2, leaving the error in only one of the resistors.

Your final equation simplifies down to Vout = (V2 - V1)(R2(1-error)/R1)

Also, in figure 2 they define the V1 and V2 as V(ref/2) - V(d/2) and V(ref/2) + V(d/2). I believe you must substitute those into the equation as well to get the result in equation 3.

3. ### StayatHomeElectronics AAC Fanatic!

Sep 25, 2008
1,020
71
Sorry, I read the question wrong and was only considering equation 3. I look into equation 1 when I get a few minutes after lunch.

4. ### steveb Senior Member

Jul 3, 2008
2,431
469
You are correct about equation 1 for sure. I also believe that their equation 3 is not quite right.

When I plug the equations into a symbolic calculator I find that their equation 3 is close, but not correct. In the second term with Vref, Vref should be divided by 2.

You can double check using the correct version of equation 1 and then substituting the following.

R2=R2(1-error)
R1=R1
R4=R2
R3=R1
V1= Vref/2-Vd/2
V2=Vref/2+Vd/2

Last edited: Jan 27, 2010
5. ### steveb Senior Member

Jul 3, 2008
2,431
469
Sorry, I accidentally deleted my firsty post by editing over it. See above for my opinion on this matter.

6. ### kdillinger Thread Starter Active Member

Jul 26, 2009
141
3
I received a short response from ADI: "Equation 1 seems to be ok, to get the simplified form divide by R2/R1."

I don't think they checked. Regardless of the form, I plugged in values and my equation comes out differently than Eq. 1 in the datasheet. I am convinced I am correct unless I made a stupid assumption.

And thanks to both of you clarifying the R2(1-error), I had a hard time following what they meant.

7. ### kdillinger Thread Starter Active Member

Jul 26, 2009
141
3
What symbolic calculator are you using BTW?

8. ### steveb Senior Member

Jul 3, 2008
2,431
469
I'm using Maxima, which is a free package available. Mathematica and Maple are the usual standards, but I like free things and it works well. The only issues I've had with this package are related to symbolic evaluation of definite integrals, but I'm told that all packages have some issues like this. If you decide to try it, I recommend the wxMaxima package which has a nice interface that relieves the need to use text commands directly. This is especially useful when you first start to learn. Once you learn the commands you can opt to use the command-line version of the program directly.

9. ### steveb Senior Member

Jul 3, 2008
2,431
469
Yes, you are definitely correct. They have a typo in their version of equation 1. Inside the parentheses, they have a ratio R2/R1 in the numerator. This should be R1/R2.

10. ### The Electrician AAC Fanatic!

Oct 9, 2007
2,724
496
Yes, I noticed this because right after equation 1, they say "A special situation arises...", and this doesn't work unless either R2/R1 becomes R1/R2, or R3/R4 becomes R4/R3. I solved the transfer function independently, and my result matched equation only if the R2/R1 in equation is changed to R1/R2, so I knew that the R3/R4 was ok.

As for equation 3, I substituted R2*(1-error) for R2 in equation 1, changing R4 to R2 (but not to R2*(1-error)), R3 to R1, changing V2 to (Vcm+vd/2), and changing V1 to (Vcm-vd/2).

Then with the help of Mathematica, I expanded the substituted equation 1 and compared the result to the expansion of equation 3. They are identical, indicating that equation 3 is correct.

I've attached the Mathematica output showing the comparison.

File size:
6.5 KB
Views:
26
11. ### studiot AAC Fanatic!

Nov 9, 2007
5,003
523
Here's my version

Let m = R2/R1 and n= R4/R3

Then from the general transfer function for a differential amp

$${V_0} = {V_2}(1 + m)\left( {\frac{n}{{1 + n}}} \right) - {V_1}m$$

(This is the same equation kdillinger sketched in by hand.)

Divide through by m

$$\frac{{{V_0}}}{m} = \frac{{1 + m}}{m}\frac{n}{{1 + n}}{V_2} - {V_1}$$

Collect terms and rearrange

$${V_0} = m\left[ {\left( {\frac{n}{m}\frac{{(1 + m)}}{{(1 + n)}}} \right){V_2} - {V_1}} \right]$$

It is now easy to see that if m = n (the 'special' condition they introduce which is actually nothing more than the normal configuaration so that common mode signals are rejected) then the equation does indeed reduce to their equation (2)

Since my working is in the same arrangement as their equation (1) it is also easy to see from my third expression that they have missed a term out of their equation (1) and have n inverted to boot.

A good way to test if the arithmetic is worth going through to see if your expression is the same as someone else's is to substitute values for n, m V1 and V2

Last edited: Jan 28, 2010
12. ### steveb Senior Member

Jul 3, 2008
2,431
469
When I checked this in Maxima, I used Vcm=Vref/2. For this reason I conculuded that they should have Vref/2 in place of Vref. I'd have to look at it more carefully to see if this is correct, but my first instinct is that this was correct because with Vd=0, the bridge will divide Vref by two and place this on each input (V1 and V2).

13. ### kdillinger Thread Starter Active Member

Jul 26, 2009
141
3
I will need to get a copy of Mathematica. For the longest time I have been looking for a good program that can verify symbolic math.

Does anyone know if MathCAD can do the same?

14. ### steveb Senior Member

Jul 3, 2008
2,431
469
Unless, MathCAD has made some recent upgrades, it's not the right tool for this job. Perhaps there are addins that will give access to Maple tools within MathCAD. Mathematica, Maple and Maxima are probably the best choices. If you don't mind spending the money, Mathematica or Maple would seem to be good choices. If money is an issue, then Maxima will do anything you would ever need. (honestly, money is not an issue for me, but if Maxima works, I figure why not use it)

Recently, DAVE mentioned that Matlab has toolboxes that you can purchase for symbolic math. I use Matlab all the time, but I have not tried this toolbox.

15. ### The Electrician AAC Fanatic!

Oct 9, 2007
2,724
496
I would have been more precise to say that I was verifying equation(s) 4. I noticed the Vref versus Vref/2 problem, and I thought the more general Vcm was better to use. If one substitutes Vcm for Vref in equation 3, that would be what I verified. For the sensor bridge shown, Vcm is Vref/2.

You're right. In equation 3, Vref should be replaced by Vref/2. Otherwise, I think it's correct.

16. ### The Electrician AAC Fanatic!

Oct 9, 2007
2,724
496
Let's consider whether they missed a term. Examine a subexpression within your final expression:

$${V_0} = m\left[ {\left( {\frac{N}{M}\frac{{(1 + m)}}{{(1 + n)}}} \right){V_2} - {V_1}} \right]$$

The N/M term I changed to caps is there because your m=R2/R1 rather than R1/R2, and n=R4/R3 rather than R3/R4. If you carry out the multiplication in:

$\frac{n}{m}\frac{{(1 + m)}}{{(1 + n)}}$

it will become:

$\frac{{(1 + \frac{1}{m})}}{{(1 + \frac{1}{n})}}$

and then your full expression becomes:

$${V_0} = m\left[ {\left( {\frac{{(1 + \frac{1}{m})}}{{(1 + \frac{1}{n})}}} \right){V_2} - {V_1}} \right]$$

which shows that there is no missing term in equation 1; the only error is the R2/R1 term rather than the correct R1/R2 inside the parentheses.

17. ### studiot AAC Fanatic!

Nov 9, 2007
5,003
523
Hello Electrician

Your algebra is correct, the minimum change to correct equation 1 in the pdf would be to invert
m = R2/R1 inside the bracket.

This would make equation 1 equivalent to my formula, at the expense of including some reciprocals as you suggest.

You could then even go further and choose m and n the other way up so dispensing with reciprocals inside the brackets, but have a 1/m' term outside.

The only thing is about this is that m (and m+1) are the gains of the amplifier.

18. ### kdillinger Thread Starter Active Member

Jul 26, 2009
141
3
If I plug in values for your expression assuming M=R1/R2 and N=R3/R4 then I do not arrive at the same results as my expression in the PDF or if I use the equation provided by Studiot.

I like the general form BTW.

19. ### The Electrician AAC Fanatic!

Oct 9, 2007
2,724
496
Do you mean to say that you get different results for this expression:

$${V_0} = m\left[ {\left( {\frac{n}{m}\frac{{(1 + m)}}{{(1 + n)}}} \right){V_2} - {V_1}} \right]$$

and this one:

$${V_0} = m\left[ {\left( {\frac{{(1 + \frac{1}{m})}}{{(1 + \frac{1}{n})}}} \right){V_2} - {V_1}} \right]$$

If so, I can only suggest that you double check your arithmetic, because I think they are algebraically identical.

Be aware that I intended the the upper case variable M should be the same as m, and N the same as n. I only used capital M for m, and N for n to make it obvious what "extra" term I was referring to.

20. ### kdillinger Thread Starter Active Member

Jul 26, 2009
141
3
I agree they are algebraically identical, but I read that you are defining m = R1/R2 and n = R3/R4. If so, I did not arrive at the same answer because I am using m = R2/R1 and n = R4/R3 like Studiot. I may have punched in the wrong numbers.