![]() |
how do I ramp up the wheels slowly
I am trying to create some code in Labview so i can ramp up and ramp down the speed of the wheels but i don't know where to start. like to slowly go from the value of 0 to the max speed of -1. i tried to do this with a while loop but failed because i could not find a variable such as x. any suggestions?
|
Re: how do I ramp up the wheels slowly
|
Re: how do I ramp up the wheels slowly
this is for the drive of a motor without the use of a joystick, i am using a button to drive the whole robot forward but i need it to ramp up. but thanks for the information on making the joysticks smoother.
|
Re: how do I ramp up the wheels slowly
I haven't read Eric's article but the use of filters isn't limited to floating point joystick position readings. You can also take a boolean value, convert it to a floating point 1 or 0 ("boolean to 1:0") and then pass the value through a point-by-point or similar lowpass filter (this is probably one of Eric's suggestions). The filter cut-off frequency would dictate the response time.
You could also pass the 1:0 value through a leaky integrator (if 1 then add a little bit (clamp to max value), else decrement a little bit (clamp to a min value)). Russ |
Re: how do I ramp up the wheels slowly
1 Attachment(s)
I've attached a picture of a leaky integrator.
I used the boolean select to convert a boolean to one of two floating point values - in this case, how much to add or subtract each time the code is executed. I used a feedback node (the arrow) to remember the last value. I used the coerce and in range to limit the max forward or reverse speed. |
Re: how do I ramp up the wheels slowly
1 Attachment(s)
Eric, i tried what you stated in your paper and it looks like it could work, can you or someone else check and see if it is right. i put a constant of 1 instead of the "input from joystick". theoretically this should allow the robot to slowly back up.
P.S. the code is attached to this post. |
Re: how do I ramp up the wheels slowly
Use a PID Controller:
http://en.wikipedia.org/wiki/PID_controller There provided as a VI in Labview. |
Re: how do I ramp up the wheels slowly
Quote:
|
Re: how do I ramp up the wheels slowly
Quote:
I would recommend using one here in place of a leaky integrator only for the learning experience - you will find it very helpful in the future. That being said, leaky integrator is probably the way to go here if you are aiming for simple. |
Re: how do I ramp up the wheels slowly
1 Attachment(s)
Quote:
For basics, just set you [EDIT] output range to -1 and 1. Set you gain to 1. Set your lag time to whatever you find is best (ours is .2); this changes how fast it ramps. Set lead time to zero. Set dt to -1(sets it to milliseconds). [/EDIT] You may want to tell it to reinitialize at values of zero because it will also ramp down. The code attached was made for ramp code on a tank drive robot. |
| All times are GMT -5. The time now is 02:22. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi