On Sunday 29 August 2021 14:54:12 Rob C wrote:

> any interest / help
>
> https://www.pmdcorp.com/resources/type/articles/get/mathematics-of-mot
>ion-control-profiles-article
>
Figure 4 of that link largely describes linuxcnc current reversal profile 
if a second inverted waveform is assumed at a direction reversal. This 
is near ideal for steppers because they have max accel available at zero 
speed.

But this, applied to a spindle motor where there may be instant power for 
accel thats several times the equivalent of its steady state 
capabilities, can very easily exceed the ability of a stepper moveing a 
30+ pound sled for Z motion, at well beyond its ability to keep up. I 
reasoned that a limit3 placed in front of the pid command pin would if 
grounded at its input, ramp the spindle motor down to a much more gentle 
stop, So when motion issues the reversal, and a mux2 as a sample-hold 
compares the old direction with the new, finds it miss-matched, blocks 
the reversal and grounds the limit3's input, the pid then ramps the 
spindle to near zero speed, with zero speed being detected by a oneshot 
watching an encoder leg. When zero, as defined by the oneshot 
recovering, occurs, the new direction signal is allowed thru to the 
pwm-servo, the ground on the limit3 is released, and the pid then ramps 
the spindle back to the set speed. So the turnaround is slowed enough 
there is no z following error, yet its back to the set speed in under 
400 milliseconds turning the opposite direction. Having a tail on both 
ends of the curve would be even nicer as the waveform would better 
resemble a test signal we used heavily back in NTSC days and which 
litterally tests the absolute bandwidth and sharpness that an NTSC 
transmitter could manage, yet remain within its assigned channel.

Unforch, the limit3 can only shape the tail, but its enough to help 
considerably. The relatively quick ramp up after the reversal puts 
that "jerk" at a speed where the stepper has maximum torque and can keep 
up.

I would have experimented with both maxa and maxv to optimize it even 
better, but halscope, without a base thread, simply isn't fast enough to 
show it well enough to define "best". I'd have to setup a 100 u-sec base 
thread and put all that stuff in it to begin to see it in real time.

This is not ideal, and its only one signal, but it does the job.

> On Sun, 29 Aug 2021, 18:40 Chris Albertson,
> <albertson.ch...@gmail.com>
>
> wrote:
> > In the general case there may be no closed form solution so numeric
> > integration is the only possible solution.    I don't think there is
> > any other way to do it other than numeric integration except to
> > require the user to supply a function for closed form integrals.    
> >  But for a 3-axis mill that uses trivial kinematics there is an easy
> > closed form integral. So the problem is very different depending on
> > what kind of machine you want to control.    For people here, almost
> > all are using trivial kinematics.
> >
> > The problem is also VERY different based on another decision.  Do
> > you want only simple jerk limiting or do you want an optimal path?  
> > In other words, do you simply take your foot off the gas to avoid
> > going over the speed limit or do you want to drive to work in the
> > absolute minimum time but without speeding.  Those are different
> > problems.  The first one is easy to do, the second takes quite a lot
> > of effort.
> >
> > Jerk limited, optimal paths for non trivial kinematics is a very
> > hard problem.  Putting a simple jerk limit on a simple machine is
> > easy, Marlin does this on my 3D printer and it runs on an Aruino.
> >
> > On Sun, Aug 29, 2021 at 10:07 AM Curtis Dutton <curtd...@gmail.com> 
wrote:
> > > I'm not sure about all this yet, brainstorming here...
> > >
> > > After looking at TinyG code for handling jerk limitation in the
> > > joint control it appears that they are using the forward physics
> > > equations and numerically integrating to avoid violations.
> > >
> > > Since numerical integration needs to be used for jerk equations
> > > (as well
> >
> > as
> >
> > > snap crackle and pop...)  The forward kinematic equations will
> > > need to be fed into the integrator for non trivial kinematics.
> > >
> > > The integrator should be pluggable as well. We should find an open
> > > source library for this as numerical integration methods are
> > > always advancing
> >
> > and
> >
> > > high performance integration is not easy to implement.
> > >
> > > On Sun, Aug 29, 2021 at 11:55 AM Andy Pugh <bodge...@gmail.com> 
wrote:
> > > > > On 29 Aug 2021, at 11:40, Alexander Brock
> > > > > <a.br...@hhv-rheinklang.de
> > > >
> > > > wrote:
> > > > > The idea can be implemented in C and for simple cases like 1D
> >
> > funktions
> >
> > > > > it should be fairly straight-forward.
> > > >
> > > > My point is that the kinematics modules already exist, and  not
> > > > all of them are under our control. Various users’ machines are
> > > > out there with their own custom kinematics.
> > > > Also, AFAIK if they are kernel modules then they have to be
> > > > written in
> >
> > C.
> >
> > > > Hence my suggestion of calling the kinematics function
> > > > repeatedly to perform simple numerical differentiation.
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > Emc-users mailing list
> > > > Emc-users@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/emc-users
> > >
> > > _______________________________________________
> > > Emc-users mailing list
> > > Emc-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> > --
> >
> > Chris Albertson
> > Redondo Beach, California
> >
> > _______________________________________________
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
>
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>


_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to