OpenServo.com Forum Index OpenServo.com
Discussion of the OpenServo project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

why choose the cubic spline Interpolation method to control

 
Post new topic   Reply to topic    OpenServo.com Forum Index -> Theory and Algorithms
View previous topic :: View next topic  
Author Message
lba_821103



Joined: 18 Oct 2007
Posts: 10

PostPosted: Sat Nov 24, 2007 8:08 am    Post subject: why choose the cubic spline Interpolation method to control Reply with quote

why choose the cubic spline Interpolation method to creat plenty of the sub goal point?
Please see the process as follow:

v0 *= curve_duration_float;
v1 *= curve_duration_float;

// Set the curve parameters.
curve_p0 = p0;
curve_p1 = p1;
curve_v0 = v0;
curve_v1 = v1;

// Set the cubic coefficients by multiplying the matrix form of
// the Hermite curve by the curve parameters p0, p1, v0 and v1.
//
// | a | | 2 -2 1 1 | | p0 |
// | b | | -3 3 -2 -1 | | p1 |
/ | c | = | 0 0 1 0 | . | (t1 - t0) * v0 |
// | d | | 1 0 0 0 | | (t1 - t0) * v1 |
//
// a = 2p0 - 2p1 + v0 + v1
// b = -3p0 + 3p1 -2v0 - v1
// c = v0
// d = p0
//
curve_a = (2.0 * p0) - (2.0 * p1) + v0 + v1;
curve_b = -(3.0 * p0) + (3.0 * p1) - (2.0 * v0) - v1;
curve_c = v0;
curve_d = p0;
s = (curve_a * t3) + (curve_b * t2) + (curve_c * t1) + curve_d
v=(3.0 * curve_a * t2) + (2.0 * curve_b * t1) + curve_c
why we set the cubic coefficients by multiplying the matrix form of
the Hermite curve ?
Do it create the curve need four point ,but it only have two point?
what advantage we use the method to control our servo motor?
Back to top
View user's profile Send private message
ginge
Site Admin


Joined: 14 Jan 2006
Posts: 1031
Location: Manchester, UK

PostPosted: Sat Nov 24, 2007 5:25 pm    Post subject: Reply with quote

Hi,

A hermite curve requires four points of reference to calculate the parameters. If we used a curve with only 2 points of reference, it would always calculate the same shaped curve.

Each curve segment has 2 control points, the beginning and the end control point. Each control point has 2 tangent values, the in and the out. Each tangent value controls the shape of the curve.

Please see the documentation for a clearer answer to your question.
http://openservo.org/MotionProfile

Quote:
what advantage we use the method to control our servo motor?


The advantage comes from the fact that you might not want to go from point a to point b at a constant velocity. Curves allow you to move from point a to point b with a varying velocity. If your consider a robot arm made from servos... The end of the arm may want to move in a straight line between the points a and b. As the arm moves through its motion, you need to vary the speed between the points in a curve similar to a sine wave. Motion profiles allows you to do such a controlled motion.

I hope this gives you an idea of why we need all of those control parameters.

Barry
_________________
http://www.headfuzz.co.uk/
http://www.robotfuzz.co.uk/
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
kali000



Joined: 20 Jan 2015
Posts: 2

PostPosted: Tue Jan 20, 2015 6:34 am    Post subject: Reply with quote

As a result, the voltage source gets charged. This is the same principle that was used to recharge the battery in a car in times past, before the alternator was adopted. The engine would turn a generator, which would produce a voltage, which was applied to the battery to recharge it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenServo.com Forum Index -> Theory and Algorithms All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group