On Thu, 3 Feb 2011, Matt Shaver wrote:

> Date: Thu, 3 Feb 2011 13:18:03 -0500
> From: Matt Shaver <m...@mattshaver.com>
> Reply-To: EMC developers <emc-developers@lists.sourceforge.net>
> To: emc-developers@lists.sourceforge.net
> Cc: d...@smithy.com
> Subject: Re: [Emc-developers] pid bug
> 
> On Wed, 2 Feb 2011 21:08:09 -0800 (PST)
> "Peter C. Wallace" <p...@mesanet.com> wrote:
>
>> It was pretty surprising. I was using Matt Shavers velocity mode test
>> hal file with halrun, so the effect was not masked by a FE as it
>> would be under EMC. If we had any integral gain and put enough load
>> on the motor that it could not match the requested velocity, and
>> therefore saturated the PID output, as soon as we removed the load,
>> instead of a velocty overshoot and recovery, the PID loop locked up
>> with a saturated output resulting in a runaway.
>
> We had some motor runaway during a test this morning. I wasn't
> physically present when it happened, but the fellow doing the testing
> said that as soon as the "8i20.enable" box was checked in the Pyvcp
> GUI, the PID output would latch at 1.0. Interestingly, I believe
> pid.0.enable was set to false (which should reset the integrator), but
> upon re-enabling, the output once again latched at 1.0. I don't know
> what the pid output was when pid.0.enable was false. A restart of halrun
> allowed the testing to continue with no changes in the config files.


OK the first thing thats needed is to connect pid.n.enable to bldc.0.init-done 
so the integrator does not wind up during motor initialization. You can work 
around the PID runaway problem by setting pid.n.maxerrorI to 
pid.n.maxoutput/Igain. To fix the PID loop you need to remove these lines: 
(untested)

299         /* if output is in limit, don't let integrator wind up */
300         if ( ( tmp1 * pid->limit_state ) <= 0.0 )

>
> I looked at pid.c, but I don't know enough to mess around in there :)
>
> Test files are at:
> http://www.mattshaver.com/8i20/
>
> Thanks,
> Matt
>
> ------------------------------------------------------------------------------
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even better price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> _______________________________________________
> 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.


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to