# Equation required to calculate exponential rate

1. Aug 24, 2011

### Ari33

Hi, I have a problem which I believe could be solved using a fairly simple Trig equation, if someone can provide a solution to this I would be very greatfull..

I have an RC plane and a computer radio which allows servo travel to be adjusted exponentially
by percentage. If you imagine the output on an X-Y axis on a line graph, linear is a straight diagonal line rising from zero while expo percentages, either + or - curve it either way.

A servos output is linear in itself but due to the arc of the servo arm the output to the rudder for example falls away towards the end of the arc.

I need to find an equation (Sin?) that will allow me to determine the rate of exponential rate required for any given servo arm length to achieve an output directly proportional to control stick input.

I hope this makes sense..

Thanks,

Paul

2. Aug 24, 2011

### HallsofIvy

If it is an exponential then it certainly will NOT be a trig function! An exponential equation, x as a function of t, is of the form $x= Ce^{at}$ or, equivalently, $x= Ca^t$ (not the same a).

3. Aug 24, 2011

### rcgldr

Although called exponential, most transmitters use a cubic equation to provide that functionality as well as most racing games for "steering sensitivity". For input and output ranges that go from -1 to +1, the equation is:

output = ( (1 - factor) x input3 ) + ( factor x input )

factor = 1 is linear. 0 < factor < 1 is less sensitive in the center, more sensitive at the ends of throw. 1 < factor <= 1.5 is more sensitive in the center, less sensitive at the outside. (factor > 1.5 results in peak output exceeding 1 at near peak inputs). Some racing games adjust factor so that 50% is linear, < 50% is less sensitive in the middle (over 50% would not normally be used).

Link to zip of spreadsheet with graph:

http://rcgldr.net/misc/cubic_exponential.zip

Last edited: Aug 24, 2011
4. Aug 26, 2011

### Ari33

Thanks Rcgldr and HallsofIvy, yes its not really an accurate term when you look at it that way.

I looked at it more closely.. and through lots of searching I found a mathematical evaluation which proves that the 'expo' can dial out the natural non-linear output of a servo but only for the servo control link output?

Im a bit thick, hope you dont mind. The horn that links the connector rod to the rudder for example also rotates on its hinge. Does this curve effectively cancel out the servos non-linear output and make the rudder move linearly or is there even more to it than that ?

"To demonstrate the 1st part..

Above is an example of a typical non-linear servo installation. Let’s study the case of a servo where as usual you hopefully made the pushrod 90 degrees with the servo arm at the center of the travel.

What we are interested is to find a relationship between servo angular travel and effective linear travel. To do that lets name the following quantities:

Ed = Effective distance
Edi = Effective distance after servo moved i degrees
T = Total effective travel = Ed - Edi

In this example we have four known quantities:

Rs = Servo arm Radius = Known quantity
Lp = Length of pushrod = Known quantity
s = angle of movement at servo arm = Known quantity
b = 90 degrees in this example

Lets now calculate the rest:

Looking at the figure to the left:
From Pythagoras we know that:
Ed^2 = Lp^2 + Rs^2
so
Ed = sqrt( Lp^2 + Rs^2 )
By the way "^2" is used here to mean "squared" or “raised to the power of two”.

Therefore "Ed" is now a known quantity. (Known so far: RS, Lp, s, Ed, b )

b = 90 degrees
Being the "b" angle 90 degrees we can assume that the tangent of "c" is Rs/Lp Tan(c) = Rs/Lp
then
c = arcTan ( Rs / Lp )
now "c" is also a know quantity (Known so far: RS, Lp, s, Ed, b, c )

From trigonometry we know that the sum of all angles of any triangle totals 180 degrees.(1)
a + b + c = 180
a = 180 - b - c = 180 - 90 - c = 90 - c
Since we know "c" then a = 90 - c
So "a" is now a know quantity.(Known so far: RS, Lp, s, Ed, b, c, a )

Going to the figure on the right:

s = servo arm travel angle
The new angle "ai" is the sum of the old angle "a" plus the servo arm angle "s"
ai = a + s
Since a is known and s is also know then a1 is now known too.(Known so far: RS, Lp, s, Ed, b, c, a, ai )

From trigonometry using the “Law of the Sines” we know that the ratio of the side divided by the opposing angle is the same for every side/opposing angle pair so;
Edi / Sin(bi) = Lp / Sin(ai) = Rs / Sin(ci)

Using the bi angle and the ai angle pairs and since we are looking for "Edi" we have;
Edi = ( Lp / Sin(ai) ) * Sin(bi)

Lp = Known
ai = Known
bi = ?

To get the bi angle we need the ci angle so lets find the ci angle;
Lp / Sin(ai) = Rs / Sin(ci)

ci = arcSin( (Rs * Sin(ai) ) / Lp)
Since Rs, ai and Lp ar know then ci is also known now.(Known so far: RS, Lp, s, Ed, b, c, a, ai, ci)

From (1) again;
ai + bi + ci = 180
bi = 180 - ai - ci
Since we know a1 and c1 now bi is also known. (Known so far: RS, Lp, s, Ed, b, c, a, ai, ci, bi)

Now that we have ai and bi determined and since Lp is also known we can now calculate Edi using the previous formula:
Edi = ( Lp / Sin(ai) ) * Sin(bi)
(Known: RS, Lp, s, Ed, b, c, a, ai, ci, bi, Edi)

Now to calculate the actual effective travel "T" we only need to subtract Ed minus Edi to get "T"
T = Ed – Edi

Following is a list of the results and a chart:

Above is a list of the calculated values using a servo radius of 1 inch and a pushrod length of 10 inches.

The blue one is the actual travel without any compensation. Notice that the actual linear travel per degree close to the center of travel is higher than at the ends. The ideal travel (in green) is the one that gives a linear travel across the whole travel. If we take the difference between the actual and the ideal and subtract if from the ideal we can see what a correcting curve should look like in Red. Guess what it looks like? Yes, it looks like an expo travel compensation so there you have your linear traveling servo. Actually you always had it in your radio. If you want to get picky you can use the formulas above and using your actual measured lengths calculate the exact expo required for your application."

Last edited: Aug 26, 2011
5. Aug 26, 2011

### rcgldr

If the radius and orientation of the servo arm and the control surface arm are the same, then both rotate the same amount, and the throw is linear. If the radius is the same, but the orientation is different, then the rod is either shorter or longer than the equal orientation case. This will result in differential (more throw in one direction than the other) and non-linear throw. If the radius isn't the same, then throw will be decreased or increased and also a bit non-linear.

Sometime the throw is reversed by having the rod go through a suface and mounted to a horn on the opposite side, so that the rod crosses the center line between servo and control surface arms. I'm not sure if it's possible to get linear throw in this case. You'd probably want the "centered" position so that both arms are oriented 45 degrees inwards of "vertical", to eliminate differential throw for +/- 45 degrees of throw.

6. Aug 26, 2011

### Ari33

Thanks Rcgldr, that explains it up very well for me. I tend to evaluate things visualy.. if that makes sense, dont have the required mental capacity for calculating things like this. It's pretty much what I had pictured in my mind but sometimes you need the math and/or 2nd opinion to confirm it.

Thanks again..

Ari

Last edited: Aug 26, 2011
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook