On Fri, 27 Jan 2012, Viesturs L?cis wrote:

> Date: Fri, 27 Jan 2012 11:45:30 +0200
> From: "[UTF-8] Viesturs L?cis" <viesturs.la...@gmail.com>
> Reply-To: "Enhanced Machine Controller (EMC)"
>     <emc-users@lists.sourceforge.net>
> To: "Enhanced Machine Controller (EMC)" <emc-users@lists.sourceforge.net>
> Subject: [Emc-users] Servo tuning - wtf?
> 
> Hello, folks!
>
> I would appreciate some advice on servo tuning.
> I have Keling Nema23 BLDC servo motors attached to Mesa 7i39.
> And also zero experience with this :)
>
> The way I am doing the tuning is:
> 1) start Emc, hit F1 and F2;
> 2) open Machine -> Calibration;
> 3) change P value, for example, from 1 to 3, press "Test" and then try
> jogging the joint;
> 4) my target max velocity is 10m/min, which would require 4000 rpm on
> motor, so I start jogging at 1100 mm/min - seems fine, increase speed
> to ~3000 mm/min and motor starts oscillating;
>
> When motor starts oscillating, I hit F2 to disable any movement and motor 
> stops;
> So here I would like to change some PID values and then try again.
> The problem I have encountered is:
> Motor starts oscillating again as soon as I hit F2 regardless of what
> are the PID settings. If I restart Emc and start over, it is fine with
> the same PID settings until the moment it gets a chance to start
> oscillating again - then I cannot stop it from doing that. Setting PID
> values back to default also does not help - it will oscillate anyway.
>
> Why on earth would it oscillate as soon as motion is enabled? Is there
> a way to aviod it?
>
> Default PID values are:
>
> DEADBAND =              0.000
> P =                     1
> I =                     0
> D =                     0
> FF0 =                   1
> FF1 =                   1
> FF2 =                 0
> BIAS =                  0


Start with no FF0 and FF1

>
> I have been playing only with P parameter so far, following this guideline:
> 1) increase P up to the moment, when motor becomes unstable;
> 2) add I to make it stable;
> 3) add D to make the loop stiffer;
>



This is wrong, you add D to  make it more stable not I

I is added in small does only when all other tuning is close to remove the 
last bit of static error and slew errors

> In my previous attempts I had:
> DEADBAND =              0.0005
> P = 90
> I = 40
> D = 1,65
> FF0 = 0
> FF1 = 1,5
> FF2 = 0
> BIAS = 0,0005
>
>> From previous discussions I recall that FF1 should be very close to 1,
> like 1,001 or something like that. Since I have it larger, I decided
> to start over, because the motor still was oscillating at 2700 mm/min.
>
> Viesturs
>
> P.S. How hard would it be to create some kind of auto-tuning routine?


FF1 will only be close to 1 with the PID/PWM scale set correctly for the 
situation

BTW what is you sample period? depending on motor poles and RPM required you 
may need to decrease the sample period from the default 1 ma to maybe 250 uSec 
(4 KHz)


> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

Peter Wallace
Mesa Electronics

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


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to