acceleration control

Aug 9, 2010 at 7:37am

acceleration control

hi,
I’m controlling a motor by trying to avoid inertia when it has reached its target value.
In order to do that, I used the line object en the bline one but none of them allowed me to really smooth the movement. I can’t realy get rid of steps in the motor trajectory.
I would like to create a smooth acceleration at the beginning and a smooth decelaration a the end.
Ideally the trajectory would be a sigmoid curve.
is there better solutions than line or bline to do such a thing?
thanks a lot for your help

#51721
Aug 9, 2010 at 10:10am

A number of ‘smoothing’ solutions were suggested here

http://cycling74.com/forums/topic.php?id=15180

Brendan

#185564
Aug 9, 2010 at 5:33pm

Marc, You can calculate the desired acceleration/deceleration curve using expr. Someone who knows physics better than I do might disagree with me, but I believe that the “smoothest” acceleration/deceleration is exhibited by simple harmonic motion (like the swinging of a pendulum), which would be a sinusoidal curve rather than a sigmoid curve (and a sigmoid is theoretically asymptotic, i.e. never truly reaches its goal). But you can calculate either with expr. Here’s an example comparing the two. –Chris

– Pasted Max Patch, click to expand. –
#185565
Aug 9, 2010 at 9:36pm

thanks brendan for your link and chrisopher for your patch. Actually expr is the perfect solution for me.
I will play with functions to find the best for my application.
time to revise my maths….

#185566
Aug 11, 2010 at 11:12pm

here's an addendum which puts those curves into a table and lets you invert the values:

– Pasted Max Patch, click to expand. –

[attachment=138696,959]

Attachments:
  1. screenshot_expr_curves.PNG
#185567
Aug 12, 2010 at 12:04am

thanks seejayjames for this inverting tip….

#185568

You must be logged in to reply to this topic.