# Exponential Motor Acceleration

I’m trying to create a motor control that will accelerate and decelerate exponentially and of course I can solve that mathematically but am having troubles in taking that idea and inputting it into Labview. I can do it in just about any other text based language but I can’t seem to figure it out in Labview. Any thoughts?

What does “accelerate and decelerate exponentially” mean? I know what the individual words mean, but putting them together like that makes me imagine a wheel turning faster at an ever-increasing rate, quickly reaching the point of rapid catastrophic disassembly.

If you can write what you want in a C-like language, I can show you how to translate that to LabVIEW. It could even be as easy as writing it verbatim in a formula node.

If what you are looking for are functions for log and exp, they are in Mathematics >> Elementary Functions, right next to trig and hyperbolic. As Alan said, many of these are supported in the formula node too, using a C subset syntax.

*Perhaps you are referring to contouring the joystick output exponentially?

Here is a joystick exponential mapping function which maps a Joystick value between 0 and +1, inclusive, to an adjusted value in the same range:

For range -1 to 0, use this:

b≠1 is a tuning parameter.

Example graph below with b=10

I chuckled with your ending bit there. What I’m trying to get at is if you fully throttle the joysticks forward instead of a sudden increase from 0 to 1 in a fraction of a second have it gradually increase over the course of 2 seconds or something of that nature. Ether I believe has answered my question however I haven’t tried it yet so I will report back later if it’s right.

What I posted is a joystick mapping; it won’t do what you just described above.

What you want is some sort of rate limiter.

http://thinktank.wpi.edu/article/140 (look for the section titled Slew Rate – How do I limit the rate of change?)

What you want is called “rate limiting”. Searching with that keyword phrase will give you lots of useful information. Here is one document that ought to help.

Okay got it figured out now. Thanks a bunch for the input.