Log in

View Full Version : Exponential Motor Acceleration


The_Waffleing
22-01-2015, 11:23
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?

Alan Anderson
22-01-2015, 12:57
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.

Greg McKaskle
22-01-2015, 13:18
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.

Greg McKaskle

Ether
22-01-2015, 13:33
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:

Joystick_adjusted = (1-bJoystick)/(1-b);

For range -1 to 0, use this:

Joystick_adjusted = -(1-b-Joystick)/(1-b);

b≠1 is a tuning parameter.

Example graph below with b=10

The_Waffleing
22-01-2015, 14:06
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?
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.

Ether
22-01-2015, 14:16
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

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?)

http://www.chiefdelphi.com/forums/showpost.php?p=1127623&postcount=2

Alan Anderson
22-01-2015, 14:36
What you want is called "rate limiting". Searching with that keyword phrase will give you lots of useful information. Here (http://thinktank.wpi.edu/article/140) is one document that ought to help.

The_Waffleing
22-01-2015, 15:25
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?)

http://www.chiefdelphi.com/forums/showpost.php?p=1127623&postcount=2





What you want is called "rate limiting". Searching with that keyword phrase will give you lots of useful information. Here (http://thinktank.wpi.edu/article/140) is one document that ought to help.
Okay got it figured out now. Thanks a bunch for the input.