View previous topic :: View next topic 
Author 
Message 
lba_821103
Joined: 18 Oct 2007 Posts: 10

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


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 


ginge Site Admin
Joined: 14 Jan 2006 Posts: 1031 Location: Manchester, UK

Posted: Sat Nov 24, 2007 5:25 pm Post subject: 


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 


kali000
Joined: 20 Jan 2015 Posts: 2

Posted: Tue Jan 20, 2015 6:34 am Post subject: 


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 


