# Circuit Optimization

Discussion in 'Math' started by ErnieM, Feb 16, 2012.

1. ### ErnieM Thread Starter AAC Fanatic!

Apr 24, 2011
7,942
1,803
Circuit Optimization

I am working out a circuit for a micro controller device. I am reading two voltages thru an analog to digital converter, performing a conversion calculation on the results and using the result to adjust some other parameter.

The conversion is of the form:

$T = K (\frac {X}{Y}-1)$

where:
K is a constant
X is a measured voltage dependent upon an external resistor
Y is a measured voltage reference

We can also say the following about X and Y:

$Y \leq X\leq 5$

$0 \leq Y\leq 5$

I chose this scheme for a number of reasons, not the least of which is the exact value of the driving 5 volt supply voltage cancels out of the equation.

Now my goal is to select a Y to minimize errors when computing T. To predict that I am equating the magnitude of the change due to X to the magnitude of the change due to Y:

Compute derivatives:

$\frac {dT}{dX} = \frac {K}{Y}$

$\frac {dT}{dY} = -K \frac {X}{Y^2}$

Equate the magnitudes:

$\frac {K}{Y}=K \frac {X}{Y^2}$

$Y=X$

At this point I start waving my hands trying to explain why setting the constant term Y to 2.5 will result in the least errors in the system, but all I can say is it "feels" right.

Does someone catch my drift here and can offer a firm mathematical basis for selecting Y?