How to find maximum (derivative)

Thread Starter

Jony130

Joined Feb 17, 2009
5,167
Can you help me finding the value of an R2 resistor to get the maximum "voltage range" the output?

We have the voltage divider and the upper resistor changes his resistance value from Rmin to Rmax.
And I want to find the lower resistor value (R2) that gives me the larges output voltage "swing".

\[ V_{DIFF} = V_{CC} * \frac{R_2}{R_2 + R_{min}} - V_{CC} * \frac{R_2}{R_2 + R_{max}} \]

\[ V_{DIFF} = V_{CC} *\left( \frac{R_2}{R_2 + R_{min}} - \frac{R_2}{R_2 + R_{max}}\right) \]

\[ \frac{V_{DIFF}}{V_{CC}} = \frac{R_2}{R_2 + R_{min}} - \frac{R_2}{R_2 + R_{max}} \]

And I think the question is how to find the derivative of this function?
 

Thread Starter

Jony130

Joined Feb 17, 2009
5,167
Yes, it is a DC voltage. I want to choose R2 resistor so I can get the largest possible change in the output voltage (voltage divider output voltage) for a given change in resistance in the upper resistor ( Rmin and Rmax).
 

Papabravo

Joined Feb 24, 2006
13,743
Yes, it is a DC voltage. I want to choose R2 resistor so I can get the largest possible change in the output voltage (voltage divider output voltage) for a given change in resistance in the upper resistor ( Rmin and Rmax).
So in this problem, what are the variables and what are the constants. What are we taking the derivative with respect to?
 

Thread Starter

Jony130

Joined Feb 17, 2009
5,167
R2 and Vcc are the constants

\[ V_{O_{MAX}} = \frac{R_2}{R_2 + R_{min}}\]

\[ V_{O_{MIN}} = \frac{R_2}{R_2 + R_{max}} \]

\[ V_{DIFF} = V_{O_{MAX}} - V_{O_{MIN}} = V_{CC} *\left( \frac{R_2}{R_2 + R_{min}} - \frac{R_2}{R_2 + R_{max}}\right) \]

And I want to find the R2 resistor value so I can get the largest possible change in the output voltage for a given change in resistance in the upper resistor ( Rmin and Rmax).

untitled.PNG
 
Last edited:

Papabravo

Joined Feb 24, 2006
13,743
I think the problem is indeterminate because you have two variables and only one condition. That usually means there are an infinite number of solutions and no unique one.
 

Thread Starter

Jony130

Joined Feb 17, 2009
5,167
I think that I got it wrong. And I wrongly explain it to you.

The R2 value is what I want to know so it must be a variable and Rmin and max are the constants.

Because I know the Rmin and Rmax values and Vcc and I want to find R2 value so I can get the latest voltage change at the output.
For example:
Rmax = 100kΩ and Rmin = 10kΩ and Vcc = 10V
I can use a WolframAlpha to plot the function for me:

https://www.wolframalpha.com/input/?i=plot+10*(X/(X+++10)+-+X/(X++100)+)+for+X+=+0+to+X+==100

So there must be a way (I may be wrong) to solve for R2 in symbolic form.
 

MrAl

Joined Jun 17, 2014
7,598
R2 and Vcc are the constants

\[ V_{O_{MAX}} = \frac{R_2}{R_2 + R_{min}}\]

\[ V_{O_{MIN}} = \frac{R_2}{R_2 + R_{max}} \]

\[ V_{DIFF} = V_{O_{MAX}} - V_{O_{MIN}} = V_{CC} *\left( \frac{R_2}{R_2 + R_{min}} - \frac{R_2}{R_2 + R_{max}}\right) \]

And I want to find the R2 resistor value so I can get the largest possible change in the output voltage for a given change in resistance in the upper resistor ( Rmin and Rmax).

View attachment 207880
Hi,

I get two solutions:
R2=-sqrt(Rmax*Rmin)
R2=sqrt(Rmax*Rmin)

You may only want the positive one.
 

MrAl

Joined Jun 17, 2014
7,598
A time old engineers hack,

try a spread sheet, put some values in, see what happens if you increase or decrease,

Iterate to the answer.
Hi,

Well, once you find the symbolic solution:
R2=sqrt(Rmax*Rmin)

you dont have to do any experiments to find the result you just plug in the two values say Rmax=100 and Rmin=10 and get:
R2=sqrt(100*10)=31.623 approximate

In fact, if we substitute that symbolic solution of R2 into the original equation we get:
VmaxDiff=((sqrt(Rmax)-sqrt(Rmin))*Vcc)/(sqrt(Rmin)+sqrt(Rmax))

and with values Rmax=100 and Rmin=10 again and Vcc=10 we get:
VmaxDiff=((10-sqrt(10))*10)/(sqrt(10)+10)
or:
VmaxDiff=0.51949385329592*10=5.1295 approximate.

That's the beauty of a symbolic solution it leads to a very straightforward calculation. We cant always find that nice of a solution, but when we can it makes things simpler in many cases.
 

ci139

Joined Jul 11, 2016
1,464
. . .
so basically your \(\downarrow\ \downarrow \) becomes
\[ V_{DIFF} = V_{O_{MAX}} - V_{O_{MIN}} = V_{CC} *\left( \frac{R_2}{R_2 + R_{min}} - \frac{R_2}{R_2 + R_{max}}\right)\\{\ }\\
_\text{Renaming the variables : } \Delta V=V_{DIFF}\ ,\ V_S=V_{CC}\ ,\ R_0=R_{MIN}\ ,\ R_1=R_{MAX}\\{\ }\\
\Delta V=V_S·\left({\frac1{1+\frac{R_0}{R_2}}-\frac1{1+\frac{R_1}{R_2}}}\right)\\{\ }\\
d\Delta V=V_S·\left({\frac{\frac{R_0}{R_2^2}}{\left({1+\frac{R_0}{R_2}}\right)^2}-\frac{\frac{R_1}{R_2^2}}{\left({1+\frac{R_1}{R_2}}\right)^2}}\right)\\{\ }\\
d\Delta V=0 \leftarrow _\text{ gives you the values to check for . . . so basically ::}\\{\ }\\
\frac{\frac{R_0}{R_2^2}}{\left({1+\frac{R_0}{R_2}}\right)^2}=\frac{\frac{R_1}{R_2^2}}{\left({1+\frac{R_1}{R_2}}\right)^2}\\{\ }\\
R_2=\sqrt{R_0·R_1}
\]
about R2 at 10V 1k to 10kΩ Google Plot
 
Last edited:
Top