On Mon, 1 Nov 2010, Jon Elson wrote:

> Date: Mon, 01 Nov 2010 00:13:36 -0500
> From: Jon Elson <el...@pico-systems.com>
> Reply-To: EMC developers <emc-developers@lists.sourceforge.net>
> To: EMC developers <emc-developers@lists.sourceforge.net>
> Subject: Re: [Emc-developers] pid with derivative inputs
> 
> Well, after an AMAZING amount of fooling around with barely one page of
> code, I finally
> have MOST of the velocity estimation working in the ppmc driver.  I'm
> still not sure it is right, though.
>
> One quirk, which I think is inherent in the way that HAL component
> encoder.c works,
> and which I copied,
> is that a dithering encoder gets the wrong velocity.  The first count of
> the dither gets
> the right velocity, as there was no movement for some time before.  The
> second count,
> if immediately following the first one, cancels out the movement, but it
> gets twice the
> velocity, as these are seen as two counts in a short period of time.  I
> suppose you could look
> back two servo periods, and if the position delta between now and n-2 is
> zero, then velocity
> should be zero in that case.
>
> Maybe I implemented the code wrong.  Under some conditions it seems like
> it might be an
> improvement, but it is not as smooth as I had hoped for.  Now, maybe the
> problem is the
> servo I am using for tuning is so jittery (as it does not yet use the
> velocity info) that it creates
> a lot of these dithery counts.
>
> Jon

One good sanity check on the velocity output is to setup your hardware step 
generator for quadrature mode and set a constant velocity but randomly 
changing directions(and ~infinite acceleration). Another good test is just a 
slow velocity ramp. The advantage is the the hardware doesnt have the quirks 
of a real encoder/motor. For example, quadrature phase error (signals not at 
exact 90 degrees) will limit the improvement that a simple, all edge time 
stamp can bring.


>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Emc-developers mailing list
> Emc-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-developers
>

Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to