Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread Jon Elson
John Thornton wrote:
> So you agree with Andys description? I have a hard time keeping them 
> straight...
>
>   
In a positioning application, like the X axis, then FF0 is an adjustment 
proportional
to position.  FF1 is proportional to velocity.  FF2 is proportional to 
acceleration.

But, at the most basic, FF0 is proportional to whatever command is being 
fed to the input
of the PID.  FF1 is proportional to the derivative of the command, FF2 
is proportional
to the 2nd derivative of the command.  So, it depends on the type of 
signal that
the PID is being commanded with.

Jon

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread Przemek Klosowski
> > FF0 = Velocity Feed Forward Gain.
> > > FF1 = Position Feed Forward Gain.
> > > FF2 = Acceleration Feed Forward Gain  or Friction Feed Forward Gain.
>

As Jon and others wrote, FF0,1,2 are related to consecutive time
derivatives of the controlled parameter: if the controlled parameter is the
position (which is the most common case), FF0/1/2 are derived from
commanded position, velocity, and acceleration. In a velocity-controlled
loop, it's velocity, acceleration and 'jerk', or rate of change of
acceleration.

> >
> > > I would like to update the docs with some descriptive text in addition
> > > to "0th order feed forward gain" as that and the other descriptions
> > > only seem to make sense to a mathematics professor.
>

The reason why it's useful to get into the math part is that one doesn't
have to remember them by rote. There's a symmetry and organization that
appears in the mathematical description of those systems; once understood,
it helps to keep a picture in one's head how those things interact.

The three PID controller parameters (P, I and D) are similar and analogous
to the three feed-forward parameters (FF0, FF1 and FF2). In each sequence,
the parameters act on increasing time derivatives of some system parameter.
The difference is that the PID parameters act upon the error term
(difference between the commanded position and the actual position) whereas
the feed-forward terms act directly on the input parameters, regardless of
the actual output position.

Knowing that, it's possible to get a glimpse of which parameters are
related to each other---for instance, the FF0 term is related to the I term
in an interesting way, which helped me to understand better the principle
of operation of those systems. I have only a basic understanding of control
theory, but I hope the following explanation is accurate and might help
others to get a better intuitive grasp of how those things work.

The P term is of course the most important: it reflects the direct error or
difference between the commanded and actual output, so if we had a servo
fairy that automatically and perfectly runs the system that we're trying
our PID controller on, P would be always zero (and of course I, D also
would be zero). If the fairy got tired and started making mistakes, the P
term would kick in and push the system towards zeroing that error again.

As everyone here knows, the D term represents drag or braking forces, and
helps to dampen the system, thus preventing the oscillations.

The 'I' term is interesting---by integrating the error over time, it
gradually kicks in when the P term alone is unable to keep the system at
the commanded position. It is common, however, that such extra force is
known ahead of time, and instead of acquiring it gradually over time, like
the I term does, we could just immediately add it---as provided by the FF0
term.

If you can see it this way, the usual tuning procedure (P, then D, then I,
then FF) starts making sense.
--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread dave
On Sun, 29 Jan 2012 19:08:23 -0600
John Thornton  wrote:

> So you agree with Andys description? I have a hard time keeping them 
> straight...
> 
> John
> 
> On 1/29/2012 3:46 PM, Jon Elson wrote:
> > John Thornton wrote:
> >> So, looking at one of the links for servo tuning is our
> >>
> >> FF0 = Velocity Feed Forward Gain.
> >> FF1 = Position Feed Forward Gain.
> >>
> > You have these reversed.
I think I have this right. ;-)

0 is a constant  offset
1 is first derivative and therefore velocity
2 is 2nd   derivative and  "accel
3 is 3rd   "   "   "jerk

Dave

> >
> > Jon
> >
> > --
> > 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
> 
> --
> 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


--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread dave
On Sun, 29 Jan 2012 19:08:23 -0600
John Thornton  wrote:

> So you agree with Andys description? I have a hard time keeping them 
> straight...
> 
> John
> 
> On 1/29/2012 3:46 PM, Jon Elson wrote:
> > John Thornton wrote:
> >> So, looking at one of the links for servo tuning is our
> >>
> >> FF0 = Velocity Feed Forward Gain.
> >> FF1 = Position Feed Forward Gain.
> >>
> > You have these reversed.
I think I have this right. ;-)

0 is a constant
1 is first derivative and therefore velocity
2 is 2nd   derivative and  "accel
3 is 3rd   "   "   "jerk

Dave

> >
> > Jon
> >
> > --
> > 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
> 
> --
> 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


--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread John Thornton
So you agree with Andys description? I have a hard time keeping them 
straight...

John

On 1/29/2012 3:46 PM, Jon Elson wrote:
> John Thornton wrote:
>> So, looking at one of the links for servo tuning is our
>>
>> FF0 = Velocity Feed Forward Gain.
>> FF1 = Position Feed Forward Gain.
>>
> You have these reversed.
>
> Jon
>
> --
> 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

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread gene heskett
On Sunday, January 29, 2012 06:37:43 PM andy pugh did opine:

> On 29 January 2012 17:31, gene heskett  wrote:
> > What if the spring is either too much or too little, this seems to
> > invite the need for a non-symmetrical FF0 function.
> 
> You could account for the constant offset with the PID bias term.

I realized that Andy, at about the same time I was pulling on my coat to 
head for the shop.  With strong enough steppers its moot in any event.  But 
that doesn't negate the fact that with the load offset, you have more 
rapids available going one way than the other.  So you wind up tweaking for 
the slowest direction.  Often by reducing accel to what it can handle, then  
raising vel a bit.

Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: 
If we see the light at the end of the tunnel, it's the light of an
oncoming train.
-- Robert Lowell

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread Jon Elson
gene heskett wrote:
> On Sunday, January 29, 2012 12:00:01 PM andy pugh did opine:
>
>   
>> On 29 January 2012 13:23, John Thornton  wrote:
>> 
>>> So, looking at one of the links for servo tuning is our
>>>
>>> FF0 = Velocity Feed Forward Gain.
>>> FF1 = Position Feed Forward Gain.
>>> FF2 = Acceleration Feed Forward Gain  or Friction Feed Forward Gain.
>>>
>>> I would like to update the docs with some descriptive text in addition
>>> to "0th order feed forward gain" as that and the other descriptions
>>> only seem to make sense to a mathematics professor.
>>>   
>  
> Bingo John.
>
>   
To get more specific, FF0 is an adjustment based on the commanded 
parameter of the PID.
FF1 is based on the first derivative of the commanded parameter, FF2 is 
based
on the second derivative.  In a positioning servo, then FF0 is 
proportional to the position, FF1 is
proportional to velocity and FF2 is proportional to acceleration.


In a velocity servo, perhaps a closed-loop spindle speed control, FF0 
would be proportional
to velocity, FF1 would be proportional to acceleration, and FF2 would be 
proportional to
change in acceleration, sometimes referred to as "jerk".

Jon

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread Jon Elson
John Thornton wrote:
> So, looking at one of the links for servo tuning is our
>
> FF0 = Velocity Feed Forward Gain.
> FF1 = Position Feed Forward Gain.
>   
You have these reversed.

Jon

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread andy pugh
On 29 January 2012 17:31, gene heskett  wrote:

> What if the spring is either too much or too little, this seems to invite
> the need for a non-symmetrical FF0 function.

You could account for the constant offset with the PID bias term.

-- 
atp
The idea that there is no such thing as objective truth is, quite simply, wrong.

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread John Thornton


On 1/29/2012 8:10 AM, andy pugh wrote:
> On 29 January 2012 13:23, John Thornton  wrote:
>> So, looking at one of the links for servo tuning is our
>>
>> FF0 = Velocity Feed Forward Gain.
>> FF1 = Position Feed Forward Gain.
>> FF2 = Acceleration Feed Forward Gain  or Friction Feed Forward Gain.
>>
>> I would like to update the docs with some descriptive text in addition
>> to "0th order feed forward gain" as that and the other descriptions only
>> seem to make sense to a mathematics professor.
> There is a reason that mathematicians talk the way they do, it is to
> be unambiguous in the general case.
> I think the best solution would be for all LinuxCNC users to take a
> maths degree, but that might be impractical.
>
> The problem with your explanation is that it assumes a
> position-command / position-feedback system and there are other
> possibilities that are not that unusual. (closed-loop spindle control
> is one)
The problem explaining it is I don't know enough about it to even 
pretend to know...
>
> FF0: This term adds a value to the PID output directly proportional to
> the input. It is useful for any system where a steady-state output
> requires a non-zero input. The most likely case is a closed-loop
> spindle speed control, where 10V might give 1000rpm, and a FF0 gain of
> 0.01 would mean that the PID terms were only required as correction,
> not the basic output value. This term would not normally be used with
> a position-feedback system, except possibly to compensate for the
> effects of a spring counterbalance.
>
> FF1: This term adds a value to the PID output proportional to the rate
> of change of the input. So, if the input is position, FF1 is
> proportional to velocity demand. If the input is rpm then FF1 is
> proportional to angular acceleration/torque demand. This term can
> often be very useful to increase the responsiveness of a
> position-feedback system with velocity-control servos.
>
> FF2: This adds a value to the PID output which is proportional to the
> rate of change of the rate of change of the input (mathematically, the
> second order differential with respect to time). In a typical
> position-control loop this would correspond to the acceleration. (in a
> velocity-control system it would correspond to the "jerk"). In the
> position-control case this would be useful to compensate for the mass
> of a heavy table, for example.
Thanks for the explanations for the above... If I add FF3 to the manual 
then someone has to make it work right?
> FF3: This value does not exist and has been inserted to see who is
> still paying attention. A negative FF3 term could be used to add a
> degree of jerk control to a position-feedback system.
>
John

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread gene heskett
On Sunday, January 29, 2012 12:00:01 PM andy pugh did opine:

> On 29 January 2012 13:23, John Thornton  wrote:
> > So, looking at one of the links for servo tuning is our
> > 
> > FF0 = Velocity Feed Forward Gain.
> > FF1 = Position Feed Forward Gain.
> > FF2 = Acceleration Feed Forward Gain  or Friction Feed Forward Gain.
> > 
> > I would like to update the docs with some descriptive text in addition
> > to "0th order feed forward gain" as that and the other descriptions
> > only seem to make sense to a mathematics professor.
 
Bingo John.

> There is a reason that mathematicians talk the way they do, it is to
> be unambiguous in the general case.
> I think the best solution would be for all LinuxCNC users to take a
> maths degree, but that might be impractical.

Well, not too practical, and certainly at my age.  My math extends into the 
trig realm because it has had to in the electronics field, but the actual 
operation (sin,tan,hyp) are things that to me are not at all obvious, but I 
have an idea what the answer should look like so I grab my TI-35 or 
whatever, and see which gives me the good answer I need, usually without 
paying attention to which of those function families it was that gave me 
the correct answer.
 
> The problem with your explanation is that it assumes a
> position-command / position-feedback system and there are other
> possibilities that are not that unusual. (closed-loop spindle control
> is one)
> 
> FF0: This term adds a value to the PID output directly proportional to
> the input. It is useful for any system where a steady-state output
> requires a non-zero input. The most likely case is a closed-loop
> spindle speed control, where 10V might give 1000rpm, and a FF0 gain of
> 0.01 would mean that the PID terms were only required as correction,
> not the basic output value. This term would not normally be used with
> a position-feedback system, except possibly to compensate for the
> effects of a spring counterbalance.

What if the spring is either too much or too little, this seems to invite 
the need for a non-symmetrical FF0 function.
 
> FF1: This term adds a value to the PID output proportional to the rate
> of change of the input. So, if the input is position, FF1 is
> proportional to velocity demand. If the input is rpm then FF1 is
> proportional to angular acceleration/torque demand. This term can
> often be very useful to increase the responsiveness of a
> position-feedback system with velocity-control servos.

I don't know enough about this to comment since all my teeny stuff is 
stepper driven.

> FF2: This adds a value to the PID output which is proportional to the
> rate of change of the rate of change of the input (mathematically, the
> second order differential with respect to time). In a typical
> position-control loop this would correspond to the acceleration. (in a
> velocity-control system it would correspond to the "jerk"). In the
> position-control case this would be useful to compensate for the mass
> of a heavy table, for example.

Now, here is something that could even be useful to me.  What is needed as 
I see it, is some way to convert the tables weight (mass actually) into 
something reasonably approximating the correct FF2 setting.  Having example 
maths included in the description would ISTM, be a huge amount of help, 
lots more than the general recommendation of starting at .01 and working 
up.  IOW, it the table weighs 30 pounds, or the table weighs 3000 pounds, 
it should be able to make an 'optimum' starting value a calculate-able 
item.  I think it would have to be peak controlled by the individual 
stepgens MAX_ACCEL limits of course.
 
> FF3: This value does not exist and has been inserted to see who is
> still paying attention. A negative FF3 term could be used to add a
> degree of jerk control to a position-feedback system.

See, I'm still reading...  And on the face of it, reads like it could be a 
useful to have function.

But I didn't see the word 'stiction' in the above, and this is largely 
independent of mass in my mind.  Its also quite real in my Z axis in 
particular.  Probably somewhat reducible by more precise counterweight 
spring tensioning, but with the limited length of the bearing surface 
available, not likely a totally eliminate-able item.  It IS going to rock 
and tilt with only a 3.5" bearing length on the posts ways.  Not much, but 
I can measure it with a dial indicator.

A users $0.02.

Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: 
Do not handicap your children by making their lives easy.
-- Robert Heinlein

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, Share

Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread andy pugh
On 29 January 2012 15:47, Viesturs Lācis  wrote:

> I took one of them off, I see 4 DIP switches, but do not see a jumper.
> Their manual also does not show, where on that pcb jumper would be located.

http://www.amtencoder.com/Resources/Frequently-Asked-Questions#3

-- 
atp
The idea that there is no such thing as objective truth is, quite simply, wrong.

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread Peter C. Wallace
On Sun, 29 Jan 2012, Viesturs L?cis wrote:

> Date: Sun, 29 Jan 2012 14:04:43 +0200
> From: "[UTF-8] Viesturs L?cis" 
> Reply-To: "Enhanced Machine Controller (EMC)"
> 
> To: "Enhanced Machine Controller (EMC)" 
> Subject: Re: [Emc-users] Servo tuning - wtf?
> 
> Peter, just as the name of threads says, I am trying to tune servo
> motors, not steppers :)
> I just checked - the supply voltage is 27,9 VDC, because 7i39 drives
> have 28 VDC limit.
>
> Ohh, and there is update:
> The motor that yesterday worked fine at 4000 mm/min, today is not
> working fine at that speed - it also stalls and starts oscillating at
> relatively high frequency... Just as the name of thread says - I have
> no idea wtf is wrong with this machine.

As I metioned earlier, please check if you are losing/gaining encoder counts, 
this will cause symptoms like you are seeing.

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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread Viesturs Lācis
2012/1/29 andy pugh :
> On 29 January 2012 15:10, Viesturs Lācis  wrote:
>
>> I am now reading a thread, started by Jon Elson in June 2011 on
>> developers' list about these encoders. It turns out that they have
>> acceleration lag, so overall conclusion - do not use them in CNC
>> machine!
>> I have yet to read it all through - maybe there is a clue for some 
>> workaround.
>
> There is a jumper, I believe. Only accessible if you haven't glued the
> encoder to the shaft :-)
>

I took one of them off, I see 4 DIP switches, but do not see a jumper.
Their manual also does not show, where on that pcb jumper would be located.

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread Peter Blodow
Sorry, Viesturs, that was a language glitch of mine. "Servo" is used in 
German as a general classification for anything moving with power 
assistance, above all in the motor vehicle sector, e. g. Servolenkung 
(power steering) or Servobremse (power brake) as well as in "Ruderservo" 
(RC model actuator) etc. Only as a specific technical term it is used in 
the field of control technology as a name for a feedback controlled 
continous motor drive. At this moment, regarding my own (stepper) gear I 
didn't even think of someone else using servomotors for moving machine 
elements.

Peter

Viesturs La-cis schrieb:
> Peter, just as the name of threads says, I am trying to tune servo
> motors, not steppers :)
> I just checked - the supply voltage is 27,9 VDC, because 7i39 drives
> have 28 VDC limit.
>
> Ohh, and there is update:
> The motor that yesterday worked fine at 4000 mm/min, today is not
> working fine at that speed - it also stalls and starts oscillating at
> relatively high frequency... Just as the name of thread says - I have
> no idea wtf is wrong with this machine.
>
> I just remembered one thing that I had not mentioned, but which
> probably might make a difference - Keling servos are equipped with CUI
> AMT102 encoders. I recall that Jon Elson wrote some time ago that
> these encoders have a lag during change of acceleration, so I looked
> at that thread again.
>
> Is there anything I can do to confirm, if the encoders are the real
> problem of the instability of the feedback loop.
>
> Viesturs
>
> 2012/1/29 Peter Blodow :
>   
>> Viesturs,
>> regardless of possible tuning questions, if I recall right, you are
>> using a 24 volts supply for the stepper amplifiers. This seems a little
>> low to me as I was using 90 volts on my dual Parker Hannifing
>> amplifier/driver. I had stepper motors attached to the two slides of my
>> lathe and never experienced any oscillations. The amps came to a maximum
>> of about 30 kHz, but as the steppers were coupled directly to the
>> spindles (no gears) they reached the spindle ends before frequency could
>> grow any higher anyway. The motors have about 85 mm diameter and are
>> labelled for 3 volts so there is a lot of momentum in this drive. When a
>> slide accidentally hit the physical end of a way (no limit switches
>> there), it usually turned off the 3 mm steel dowel I am using in the
>> couplings.
>>
>> I think at your 24 volt level and the resulting maximum motor forces or
>> angular momenta, you are working near the physical resonance limit where
>> anything can happen. Try a higher power supply voltage in any case.
>>
>> Peter
>>
>> Viesturs La-cis schrieb:
>> 
>>> 2012/1/28 Peter C. Wallace :
>>>
>>>   
 OK so commutation is ok, but somthing is funny here. You said it oscillated
 even with a P of 1 and all else 0. Did it not oscillate with a P of 3?
 what is the difference between the setup now and when it oscillates?


 
>>> I will try to explain:
>>> I am trying to tune 2 motors simultaneously, because it is a gantry machine.
>>> So what I did few minutes ago:
>>> For both motors: all PID parameters set to 0
>>> P = 3
>>> I tried to jog the gantry at slow speed.
>>> At 240 mm/min it is smooth, at 480 mm/min still smooth, but at 676
>>> mm/min there are spots, when one of motors stalls and oscillates in
>>> small amount at high frequency. I suspect that the stalling is due to
>>> some uneven load to motor, when moving forward.
>>> Anyway, I d not know, how to overcome such stalls and subsequent 
>>> oscillation.
>>> Hitting F2 to disable and re-enable motion stops oscillation and I can
>>> jog forward. Until one of motors stalls and starts vibrating again.
>>>
>>> I do understand that final settings for both gantry motors might
>>> differ, I just think that in the beginning they could be tuned
>>> together as both of them are stalling now.
>>>
>>> Viesturs
>>>
>>> --
>>> 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
>>>
>>>
>>>   
>> --
>> 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-

Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread andy pugh
On 29 January 2012 15:10, Viesturs Lācis  wrote:

> I am now reading a thread, started by Jon Elson in June 2011 on
> developers' list about these encoders. It turns out that they have
> acceleration lag, so overall conclusion - do not use them in CNC
> machine!
> I have yet to read it all through - maybe there is a clue for some workaround.

There is a jumper, I believe. Only accessible if you haven't glued the
encoder to the shaft :-)

-- 
atp
The idea that there is no such thing as objective truth is, quite simply, wrong.

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread Viesturs Lācis
2012/1/29 Spiderdab <77...@tiscali.it>:
>
> Hallo Viesturs, i don't remember who suggested, but i've read, with
> those encoders, it's better to glue them to the rotating axle, because
> they can slip at high speeds and during fast accelerations.

Thanks! I already did that this morning. Did not help...

> Or i would try something with the encoders connection. maybe a not
> perfect conctact.

I am now reading a thread, started by Jon Elson in June 2011 on
developers' list about these encoders. It turns out that they have
acceleration lag, so overall conclusion - do not use them in CNC
machine!
I have yet to read it all through - maybe there is a clue for some workaround.

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread Spiderdab
On dom, 2012-01-29 at 14:04 +0200, Viesturs Lācis wrote:
> Peter, just as the name of threads says, I am trying to tune servo
> motors, not steppers :)
> I just checked - the supply voltage is 27,9 VDC, because 7i39 drives
> have 28 VDC limit.
> 
> Ohh, and there is update:
> The motor that yesterday worked fine at 4000 mm/min, today is not
> working fine at that speed - it also stalls and starts oscillating at
> relatively high frequency... Just as the name of thread says - I have
> no idea wtf is wrong with this machine.
> 
> I just remembered one thing that I had not mentioned, but which
> probably might make a difference - Keling servos are equipped with CUI
> AMT102 encoders. I recall that Jon Elson wrote some time ago that
> these encoders have a lag during change of acceleration, so I looked
> at that thread again.
> 
> Is there anything I can do to confirm, if the encoders are the real
> problem of the instability of the feedback loop.
> 
> Viesturs
Hallo Viesturs, i don't remember who suggested, but i've read, with
those encoders, it's better to glue them to the rotating axle, because
they can slip at high speeds and during fast accelerations.
If it was like that, i think it's possible the resulting issue that you
have.
Or i would try something with the encoders connection. maybe a not
perfect conctact.

Davide.


--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread andy pugh
On 29 January 2012 13:23, John Thornton  wrote:
> So, looking at one of the links for servo tuning is our
>
> FF0 = Velocity Feed Forward Gain.
> FF1 = Position Feed Forward Gain.
> FF2 = Acceleration Feed Forward Gain  or Friction Feed Forward Gain.
>
> I would like to update the docs with some descriptive text in addition
> to "0th order feed forward gain" as that and the other descriptions only
> seem to make sense to a mathematics professor.

There is a reason that mathematicians talk the way they do, it is to
be unambiguous in the general case.
I think the best solution would be for all LinuxCNC users to take a
maths degree, but that might be impractical.

The problem with your explanation is that it assumes a
position-command / position-feedback system and there are other
possibilities that are not that unusual. (closed-loop spindle control
is one)

FF0: This term adds a value to the PID output directly proportional to
the input. It is useful for any system where a steady-state output
requires a non-zero input. The most likely case is a closed-loop
spindle speed control, where 10V might give 1000rpm, and a FF0 gain of
0.01 would mean that the PID terms were only required as correction,
not the basic output value. This term would not normally be used with
a position-feedback system, except possibly to compensate for the
effects of a spring counterbalance.

FF1: This term adds a value to the PID output proportional to the rate
of change of the input. So, if the input is position, FF1 is
proportional to velocity demand. If the input is rpm then FF1 is
proportional to angular acceleration/torque demand. This term can
often be very useful to increase the responsiveness of a
position-feedback system with velocity-control servos.

FF2: This adds a value to the PID output which is proportional to the
rate of change of the rate of change of the input (mathematically, the
second order differential with respect to time). In a typical
position-control loop this would correspond to the acceleration. (in a
velocity-control system it would correspond to the "jerk"). In the
position-control case this would be useful to compensate for the mass
of a heavy table, for example.

FF3: This value does not exist and has been inserted to see who is
still paying attention. A negative FF3 term could be used to add a
degree of jerk control to a position-feedback system.

-- 
atp
The idea that there is no such thing as objective truth is, quite simply, wrong.

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread John Thornton
So, looking at one of the links for servo tuning is our

FF0 = Velocity Feed Forward Gain.
FF1 = Position Feed Forward Gain.
FF2 = Acceleration Feed Forward Gain  or Friction Feed Forward Gain.

I would like to update the docs with some descriptive text in addition 
to "0th order feed forward gain" as that and the other descriptions only 
seem to make sense to a mathematics professor.

"
Position Feed Forward Gain.
Compensates for position-based effects in a system. Its effect is 
similar to having a spring attached to the stage.
(DAC counts / position counts)

Velocity Feed Forward Gain.
Compensates for velocity-based friction or similar effects in a system.
(DAC counts * (commanded position counts / sample period))

Acceleration Feed Forward Gain.
Compensates for mass in a system.
(DAC counts / (commanded position counts / sample period^2 ))

Friction Feed Forward Gain.
Compensates for Friction in a stage.
(DAC counts)
"

Thanks
John

On 1/28/2012 10:28 AM, Jon Elson wrote:
> John Thornton wrote:
>> Jon,
>>
>> What is FF0 used for if it should be set to 0 for a motion axis?
>>
> I used to think it was useless, but if you use the PID for a spindle
> speed control,
> for instance, then it is quite useful for a velocity servo.  It serves
> about the same
> purpose as FF1 in a positioning servo.  In a positioning servo, it would
> add an
> offset proportional to position.  In a velocity servo, it would add an
> offset
> proportional to speed, thereby correcting for finite gain in the loop.
>
> Jon
>
> --
> 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
--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread Viesturs Lācis
Peter, just as the name of threads says, I am trying to tune servo
motors, not steppers :)
I just checked - the supply voltage is 27,9 VDC, because 7i39 drives
have 28 VDC limit.

Ohh, and there is update:
The motor that yesterday worked fine at 4000 mm/min, today is not
working fine at that speed - it also stalls and starts oscillating at
relatively high frequency... Just as the name of thread says - I have
no idea wtf is wrong with this machine.

I just remembered one thing that I had not mentioned, but which
probably might make a difference - Keling servos are equipped with CUI
AMT102 encoders. I recall that Jon Elson wrote some time ago that
these encoders have a lag during change of acceleration, so I looked
at that thread again.

Is there anything I can do to confirm, if the encoders are the real
problem of the instability of the feedback loop.

Viesturs

2012/1/29 Peter Blodow :
> Viesturs,
> regardless of possible tuning questions, if I recall right, you are
> using a 24 volts supply for the stepper amplifiers. This seems a little
> low to me as I was using 90 volts on my dual Parker Hannifing
> amplifier/driver. I had stepper motors attached to the two slides of my
> lathe and never experienced any oscillations. The amps came to a maximum
> of about 30 kHz, but as the steppers were coupled directly to the
> spindles (no gears) they reached the spindle ends before frequency could
> grow any higher anyway. The motors have about 85 mm diameter and are
> labelled for 3 volts so there is a lot of momentum in this drive. When a
> slide accidentally hit the physical end of a way (no limit switches
> there), it usually turned off the 3 mm steel dowel I am using in the
> couplings.
>
> I think at your 24 volt level and the resulting maximum motor forces or
> angular momenta, you are working near the physical resonance limit where
> anything can happen. Try a higher power supply voltage in any case.
>
> Peter
>
> Viesturs La-cis schrieb:
>> 2012/1/28 Peter C. Wallace :
>>
>>> OK so commutation is ok, but somthing is funny here. You said it oscillated
>>> even with a P of 1 and all else 0. Did it not oscillate with a P of 3?
>>> what is the difference between the setup now and when it oscillates?
>>>
>>>
>>
>> I will try to explain:
>> I am trying to tune 2 motors simultaneously, because it is a gantry machine.
>> So what I did few minutes ago:
>> For both motors: all PID parameters set to 0
>> P = 3
>> I tried to jog the gantry at slow speed.
>> At 240 mm/min it is smooth, at 480 mm/min still smooth, but at 676
>> mm/min there are spots, when one of motors stalls and oscillates in
>> small amount at high frequency. I suspect that the stalling is due to
>> some uneven load to motor, when moving forward.
>> Anyway, I d not know, how to overcome such stalls and subsequent oscillation.
>> Hitting F2 to disable and re-enable motion stops oscillation and I can
>> jog forward. Until one of motors stalls and starts vibrating again.
>>
>> I do understand that final settings for both gantry motors might
>> differ, I just think that in the beginning they could be tuned
>> together as both of them are stalling now.
>>
>> Viesturs
>>
>> --
>> 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
>>
>>
>
>
> --
> 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

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-29 Thread Peter Blodow
Viesturs,
regardless of possible tuning questions, if I recall right, you are 
using a 24 volts supply for the stepper amplifiers. This seems a little 
low to me as I was using 90 volts on my dual Parker Hannifing 
amplifier/driver. I had stepper motors attached to the two slides of my 
lathe and never experienced any oscillations. The amps came to a maximum 
of about 30 kHz, but as the steppers were coupled directly to the 
spindles (no gears) they reached the spindle ends before frequency could 
grow any higher anyway. The motors have about 85 mm diameter and are 
labelled for 3 volts so there is a lot of momentum in this drive. When a 
slide accidentally hit the physical end of a way (no limit switches 
there), it usually turned off the 3 mm steel dowel I am using in the 
couplings.

I think at your 24 volt level and the resulting maximum motor forces or 
angular momenta, you are working near the physical resonance limit where 
anything can happen. Try a higher power supply voltage in any case.

Peter

Viesturs La-cis schrieb:
> 2012/1/28 Peter C. Wallace :
>   
>> OK so commutation is ok, but somthing is funny here. You said it oscillated
>> even with a P of 1 and all else 0. Did it not oscillate with a P of 3?
>> what is the difference between the setup now and when it oscillates?
>>
>> 
>
> I will try to explain:
> I am trying to tune 2 motors simultaneously, because it is a gantry machine.
> So what I did few minutes ago:
> For both motors: all PID parameters set to 0
> P = 3
> I tried to jog the gantry at slow speed.
> At 240 mm/min it is smooth, at 480 mm/min still smooth, but at 676
> mm/min there are spots, when one of motors stalls and oscillates in
> small amount at high frequency. I suspect that the stalling is due to
> some uneven load to motor, when moving forward.
> Anyway, I d not know, how to overcome such stalls and subsequent oscillation.
> Hitting F2 to disable and re-enable motion stops oscillation and I can
> jog forward. Until one of motors stalls and starts vibrating again.
>
> I do understand that final settings for both gantry motors might
> differ, I just think that in the beginning they could be tuned
> together as both of them are stalling now.
>
> Viesturs
>
> --
> 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
>
>   


--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Peter C. Wallace
On Sat, 28 Jan 2012, Viesturs L?cis wrote:

> Date: Sat, 28 Jan 2012 22:12:12 +0200
> From: "[UTF-8] Viesturs L?cis" 
> Reply-To: "Enhanced Machine Controller (EMC)"
> 
> To: "Enhanced Machine Controller (EMC)" 
> Subject: Re: [Emc-users] Servo tuning - wtf?
> 
> 2012/1/28 Peter C. Wallace :
>>
>> OK so commutation is ok, but somthing is funny here. You said it oscillated
>> even with a P of 1 and all else 0. Did it not oscillate with a P of 3?
>> what is the difference between the setup now and when it oscillates?
>>
>
> I will try to explain:
> I am trying to tune 2 motors simultaneously, because it is a gantry machine.
> So what I did few minutes ago:
> For both motors: all PID parameters set to 0
> P = 3
> I tried to jog the gantry at slow speed.
> At 240 mm/min it is smooth, at 480 mm/min still smooth, but at 676
> mm/min there are spots, when one of motors stalls and oscillates in
> small amount at high frequency. I suspect that the stalling is due to
> some uneven load to motor, when moving forward.
> Anyway, I d not know, how to overcome such stalls and subsequent oscillation.
> Hitting F2 to disable and re-enable motion stops oscillation and I can
> jog forward. Until one of motors stalls and starts vibrating again.
>
> I do understand that final settings for both gantry motors might
> differ, I just think that in the beginning they could be tuned
> together as both of them are stalling now.
>
> Viesturs


Can you manually run the gantry to a carefully marked home position after
it stalls to verify that you are not losing counts?

losing counts might cause this behaviour

>
> --
> 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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Kenneth Lerman
On 1/28/2012 5:05 PM, Jon Elson wrote:
> Viesturs Lācis wrote:
>> 2012. gada 28. janvāris 18:14 noel  rakstīja:
>>
>>> All interested in Servo Tuning.
>>>
>>> Have a look at:
>>> http://support.motioneng.com/Downloads-Notes/Tuning/default.htm
>>>
>>>
>> In the link from Noel I find that all three  (well, the last maybe not
>> that much) PID tuning methods:
>> http://support.motioneng.com/Downloads-Notes/Tuning/3_pid_tune.htm
>>
>> Suggest starting with finding correct D parameter, as opposed to
>> previously expressed opinions that P parameter is the one to start
>> with.
>>
>> Can anyone with experience in servo tuning comment on this?
>>
>>
>> Can anyone comment on this?
>>
> If your P is too high, no amount of D will stop the violent oscllation.
> If your P is too low, there will be no movement at all, and D will
> do nothing.
>
> I think you need to have P within a reasonable band for the particular
> servo drive so that movement happens when it is commanded.
>
> Note that a lot of treatises on PID tuning use an oven and a
> thermometer as the model.  This is a one-quadrant system,
> and not as relevant to a servo motion axis.
>
> Jon

Also, most of the descriptions of PID that I've seen involve what 
happens as process variables change due to outside influences (such as 
room temperature, or feedstock variations). We are concerned with the 
response to a setpoint change.

Ken

>
> --
> 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

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread andy pugh
2012/1/28 Viesturs Lācis :

> Can anyone with experience in servo tuning comment on this?

I don't actually have much experience with servos, but in my day-job
very simple controllers only have P, then we add precontrol, then I,
then transient precontrol. D is the very last thing that gets added.

I am not talking about adjusting gains here, I am discussing what gets
included in the software.

-- 
atp
The idea that there is no such thing as objective truth is, quite simply, wrong.

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Jon Elson
Viesturs Lācis wrote:
> 2012. gada 28. janvāris 18:14 noel  rakstīja:
>   
>> All interested in Servo Tuning.
>>
>> Have a look at:
>> http://support.motioneng.com/Downloads-Notes/Tuning/default.htm
>>
>> 
>
> In the link from Noel I find that all three  (well, the last maybe not
> that much) PID tuning methods:
> http://support.motioneng.com/Downloads-Notes/Tuning/3_pid_tune.htm
>
> Suggest starting with finding correct D parameter, as opposed to
> previously expressed opinions that P parameter is the one to start
> with.
>
> Can anyone with experience in servo tuning comment on this?
>
>
> Can anyone comment on this?
>   
If your P is too high, no amount of D will stop the violent oscllation.
If your P is too low, there will be no movement at all, and D will
do nothing.

I think you need to have P within a reasonable band for the particular
servo drive so that movement happens when it is commanded.

Note that a lot of treatises on PID tuning use an oven and a
thermometer as the model.  This is a one-quadrant system,
and not as relevant to a servo motion axis.

Jon

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Viesturs Lācis
2012/1/28 Peter C. Wallace :
>
> OK so commutation is ok, but somthing is funny here. You said it oscillated
> even with a P of 1 and all else 0. Did it not oscillate with a P of 3?
> what is the difference between the setup now and when it oscillates?
>

I will try to explain:
I am trying to tune 2 motors simultaneously, because it is a gantry machine.
So what I did few minutes ago:
For both motors: all PID parameters set to 0
P = 3
I tried to jog the gantry at slow speed.
At 240 mm/min it is smooth, at 480 mm/min still smooth, but at 676
mm/min there are spots, when one of motors stalls and oscillates in
small amount at high frequency. I suspect that the stalling is due to
some uneven load to motor, when moving forward.
Anyway, I d not know, how to overcome such stalls and subsequent oscillation.
Hitting F2 to disable and re-enable motion stops oscillation and I can
jog forward. Until one of motors stalls and starts vibrating again.

I do understand that final settings for both gantry motors might
differ, I just think that in the beginning they could be tuned
together as both of them are stalling now.

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Peter C. Wallace
On Sat, 28 Jan 2012, Viesturs L?cis wrote:

> Date: Sat, 28 Jan 2012 21:29:07 +0200
> From: "[UTF-8] Viesturs L?cis" 
> Reply-To: "Enhanced Machine Controller (EMC)"
> 
> To: "Enhanced Machine Controller (EMC)" 
> Subject: Re: [Emc-users] Servo tuning - wtf?
> 
> 2012/1/28 Peter C. Wallace :
>>
>> Can you verify that in addition your raw encoder count the same way?
>>
>
> How do You mean - count the same way?
>
> If I understand correctly, then I tested this:
> If both motors turned clockwise
> Then rawcounts increase in positive direction for _both_ motors.
>
> The thing is:
> For working motor - turning clockwise is movement in positive direction.
> For nonworking motors - turning clockwise is moving in negative direction.
>
> I have:
> INI file scale values (input, output scale) with "+" signs for working motor;
> INI file scale values with "-" signs for nonworking motor.
>
> Bldc scale value for all motors is -8192
>
> Should I also have Hall pattern changed so that it is exactly opposite
> to working motor?

No
>
> What is _recomended_ approach for reversing the direction?
>

Changing input and output scales as you have

>
> I also tried Your suggestion: setting all PID parameters to 0 and
> choose small P.
> I set P to 3 and turned motor by hand.
> The resisting torque increased. It felt like gradual increase. I
> turned it both directions, it felt the same strength of resistance. I
> was able to turn it approximately full turn in each direction, it did
> not cog or jump anywhere, but returned approximately to starting
> point.


OK so commutation is ok, but somthing is funny here. You said it oscillated 
even with a P of 1 and all else 0. Did it not oscillate with a P of 3?
what is the difference between the setup now and when it oscillates?


>
> Viesturs
>
> --
> 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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Viesturs Lācis
2012/1/28 Peter C. Wallace :
>
> Can you verify that in addition your raw encoder count the same way?
>

How do You mean - count the same way?

If I understand correctly, then I tested this:
If both motors turned clockwise
Then rawcounts increase in positive direction for _both_ motors.

The thing is:
For working motor - turning clockwise is movement in positive direction.
For nonworking motors - turning clockwise is moving in negative direction.

I have:
INI file scale values (input, output scale) with "+" signs for working motor;
INI file scale values with "-" signs for nonworking motor.

Bldc scale value for all motors is -8192

Should I also have Hall pattern changed so that it is exactly opposite
to working motor?

What is _recomended_ approach for reversing the direction?


I also tried Your suggestion: setting all PID parameters to 0 and
choose small P.
I set P to 3 and turned motor by hand.
The resisting torque increased. It felt like gradual increase. I
turned it both directions, it felt the same strength of resistance. I
was able to turn it approximately full turn in each direction, it did
not cog or jump anywhere, but returned approximately to starting
point.

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Peter C. Wallace

On Sat, 28 Jan 2012, Viesturs L?cis wrote:


Date: Sat, 28 Jan 2012 21:03:57 +0200
From: "[UTF-8] Viesturs L?cis" 
Reply-To: "Enhanced Machine Controller (EMC)"

To: "Enhanced Machine Controller (EMC)" 
Subject: Re: [Emc-users] Servo tuning - wtf?

2012/1/28 Viesturs L??cis :
2012/1/28 Peter C. Wallace :


You could also verify that the Hall signals connected to
the BLDC component are identical for the working and non working
axis (with HALMeter) as you slowly rotate the motor shaft (with 0 P)



I will just switch off motor power, Hall and encoder power is supplied
from PC PSU, so it will remain.

I will report back in a minute.



I watched all 3 hall signals for both bldc components - the one that
works and the one of nonworking. The signal changing order is the
same.
At first I turned each motor so that hall1 is true, remaining 2 are
false. Then I very slowly turned the working motor until any signal
changed (hall3 went true), so then I very slowly turned nonworking
motor until any signal changed status. And all the time they matched
(X is true, blank is false):
hall1  hall2  hall 3
  X
  X X
 X
X   X
X
  XX
  X


Can you verify that in addition your raw encoder count the same way?



--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Viesturs Lācis
2012/1/28 Viesturs Lācis :
> 2012/1/28 Peter C. Wallace :
>>
>> You could also verify that the Hall signals connected to
>> the BLDC component are identical for the working and non working
>> axis (with HALMeter) as you slowly rotate the motor shaft (with 0 P)
>>
>
> I will just switch off motor power, Hall and encoder power is supplied
> from PC PSU, so it will remain.
>
> I will report back in a minute.
>

I watched all 3 hall signals for both bldc components - the one that
works and the one of nonworking. The signal changing order is the
same.
At first I turned each motor so that hall1 is true, remaining 2 are
false. Then I very slowly turned the working motor until any signal
changed (hall3 went true), so then I very slowly turned nonworking
motor until any signal changed status. And all the time they matched
(X is true, blank is false):
hall1  hall2  hall 3
  X
  X X
 X
X   X
X
  XX
  X

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Viesturs Lācis
2012/1/28 Peter C. Wallace :
>
> You could also verify that the Hall signals connected to
> the BLDC component are identical for the working and non working
> axis (with HALMeter) as you slowly rotate the motor shaft (with 0 P)
>

I will just switch off motor power, Hall and encoder power is supplied
from PC PSU, so it will remain.

I will report back in a minute.

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Peter C. Wallace
On Sat, 28 Jan 2012, Viesturs L?cis wrote:

> Date: Sat, 28 Jan 2012 20:37:17 +0200
> From: "[UTF-8] Viesturs L?cis" 
> Reply-To: "Enhanced Machine Controller (EMC)"
> 
> To: "Enhanced Machine Controller (EMC)" 
> Subject: Re: [Emc-users] Servo tuning - wtf?
> 
> 2012/1/28 Peter C. Wallace :
>>
>> If it feels coggy or snaps to other null (no force) positions, commutation is
>> not working (in h mode this likely means the Halls are not
>> connected/notconnected right or the hall mode is wrong
>>
>
> Is bldc.n.pattern meant with hall mode?
>
> Viesturs

You could also verify that the Hall signals connected to
the BLDC component are identical for the working and non working
axis (with HALMeter) as you slowly rotate the motor shaft (with 0 P)


>
> --
> 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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Peter C. Wallace
On Sat, 28 Jan 2012, Viesturs L?cis wrote:

> Date: Sat, 28 Jan 2012 20:37:17 +0200
> From: "[UTF-8] Viesturs L?cis" 
> Reply-To: "Enhanced Machine Controller (EMC)"
> 
> To: "Enhanced Machine Controller (EMC)" 
> Subject: Re: [Emc-users] Servo tuning - wtf?
> 
> 2012/1/28 Peter C. Wallace :
>>
>> If it feels coggy or snaps to other null (no force) positions, commutation is
>> not working (in h mode this likely means the Halls are not
>> connected/notconnected right or the hall mode is wrong
>>
>
> Is bldc.n.pattern meant with hall mode?


yes
>
> Viesturs
>
> --
> 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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Viesturs Lācis
2012/1/28 Peter C. Wallace :
>
> If it feels coggy or snaps to other null (no force) positions, commutation is
> not working (in h mode this likely means the Halls are not
> connected/notconnected right or the hall mode is wrong
>

Is bldc.n.pattern meant with hall mode?

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Peter C. Wallace
On Sat, 28 Jan 2012, Viesturs L?cis wrote:

> Date: Sat, 28 Jan 2012 19:56:50 +0200
> From: "[UTF-8] Viesturs L?cis" 
> Reply-To: "Enhanced Machine Controller (EMC)"
> 
> To: "Enhanced Machine Controller (EMC)" 
> Subject: Re: [Emc-users] Servo tuning - wtf?
> 
> 2012/1/28 Peter C. Wallace :
>>
>> Sounds like your commutation is wrong, no amount of tuning will help this
>> (wrong Hall order if you are using Halls wron paratmeyets if you are using q
>> mode etc etc)
>>
>
> Any tips on troubleshooting?
>
> Viesturs


Yes do what you are doing: PID with small P (perhaps even less than 1)
and nothing else.


Note that since this uses a 7I39 I know the motors are small enough to be safe 
to turn by hand, Don't do this with a large motor or with any attached 
hardware that can cut or pinch you!

Start the axis and turn the motor shaft by hand from the
holding position. The torque resisting the shaft rotation should increase as 
you move from the starting position and if the P number is small enough 
should feel like winding a spring. This force should be symmetrical in both 
directions of motion.

If it feels coggy or snaps to other null (no force) positions, commutation is 
not working (in h mode this likely means the Halls are not 
connected/notconnected right or the hall mode is wrong


>
> --
> 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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Viesturs Lācis
2012/1/28 Peter C. Wallace :
>
> Sounds like your commutation is wrong, no amount of tuning will help this
> (wrong Hall order if you are using Halls wron paratmeyets if you are using q
> mode etc etc)
>

Any tips on troubleshooting?

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Peter C. Wallace

On Sat, 28 Jan 2012, Viesturs L?cis wrote:


Date: Sat, 28 Jan 2012 18:42:03 +0200
From: "[UTF-8] Viesturs L?cis" 
Reply-To: "Enhanced Machine Controller (EMC)"

To: "Enhanced Machine Controller (EMC)" 
Subject: Re: [Emc-users] Servo tuning - wtf?

2012/1/28 Peter C. Wallace :



I tried 3 times switching back and forth - with PID disconected and
BLDC value set to 0,95 motor does not move.


Thats very strange, the motor should run at full speed with a fixed bldc drive
value. Can you post your hal file somewhere (like pastebin.com)



Done:
http://pastebin.com/0M1ASyhB

I tried one more, this time with joint1 (Y1 section in HAL file).
What I did:
Changed to trivkins
Added setp bldc.1.value 0.95
Commented out pid.1.out => bldc.1.value

Still the same - no movement.
If I reattach pid.1, I can jog the motor.




It would not provide any improvement, just prevent pathological behaviour if
the PID sets the PWM to 100% (which should be prevented)





So this far only reducing servo period did help. Unfortunately that is
coming with RTAI error warning messages. I ran latency test for a
while and got 12000 ns max jitter on servo thread.



Is this on a 5I23?



Yes, 5i23 with 2x 7i39s.



2 KHz should be easy (I am running a 8I20 test at 6 KHz currently with a 5I23)

Do you have a base thread? (you shouldn't need one)



No base thead.
The PC is:
Intel D525MW
2GB RAM
4GB CompactFlash in SATA adapter


I have been trying to get the tuning right.
So far I have managed to get one motor move smoothly up to 4000
mm/min. In HALScope it seems that f-error stays within 0,1 mm during
movement, which I find to be accetable, static f-error is less than
0,003 mm.

Here are PID parameters for that motor:
# PID tuning params
DEADBAND =  0.002
P = 380
I = 10
D = 1.9
FF0 =   0
FF1 =   0.1
FF2 =   0
BIAS =  0

I hav a problem with remaining 2 motors.
Firstly I thought that I might copy these settings, since drives and
motors are equal and then try to adjust for the different load.
That failed.
Then I started from scratch and I cannot find any settings to turn the
motors smoothly. I set everything to 0, P to 1 and it is already
oscillating. Then I set P and got "joint exceeded following error".
The f-error is set to 100 mm, so obviously P should be higher.
I have tried numerous values between 1 and 300, but nowehere I get
smooth motion.


What should I do?




Sounds like your commutation is wrong, no amount of tuning will help this
(wrong Hall order if you are using Halls wron paratmeyets if you are using q 
mode etc etc)




2012. gada 28. janv??ris 18:14 noel  rakst??ja:

All interested in Servo Tuning.

Have a look at:
http://support.motioneng.com/Downloads-Notes/Tuning/default.htm



Thank You! I will do some reading.

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Spiderdab
Il giorno sab, 28/01/2012 alle 08.14 -0800, noel ha scritto:
> All interested in Servo Tuning.
> 
> Have a look at:
> http://support.motioneng.com/Downloads-Notes/Tuning/default.htm
> 
> Regards,
> 
> Noel.
Really much interesting!
Thanks!

Davide.


--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Viesturs Lācis
2012. gada 28. janvāris 18:14 noel  rakstīja:
> All interested in Servo Tuning.
>
> Have a look at:
> http://support.motioneng.com/Downloads-Notes/Tuning/default.htm
>

In the link from Noel I find that all three  (well, the last maybe not
that much) PID tuning methods:
http://support.motioneng.com/Downloads-Notes/Tuning/3_pid_tune.htm

Suggest starting with finding correct D parameter, as opposed to
previously expressed opinions that P parameter is the one to start
with.

Can anyone with experience in servo tuning comment on this?


Can anyone comment on this?

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread James Louis
Thank you Noel.
Also for those interested in determining which one of six servo control system 
models their particular hardware falls into (so you know which parameters to 
change BEFORE tuning) buy this book:
"Control System Design Guide" by George Ellis
It helped me a great deal.
Jim

- Original Message -
From: noel 
To: 'Enhanced Machine Controller (EMC)' 
Sent: Sat Jan 28 10:14:09 2012
Subject: Re: [Emc-users] Servo tuning - wtf?

All interested in Servo Tuning.

Have a look at:
http://support.motioneng.com/Downloads-Notes/Tuning/default.htm

Regards,

Noel.

-Original Message-
From: Viesturs Lācis [mailto:viesturs.la...@gmail.com]
Sent: Saturday, January 28, 2012 1:25 AM
To: Enhanced Machine Controller (EMC)
Subject: Re: [Emc-users] Servo tuning - wtf?

Hello!

I have spent some time with the machine and have tried some of the
suggestions.

2012/1/27 andy pugh :
>
> At that speed with a 2-pole motor a 1ms servo period ought to be OK,
> but you should try 500uS to see if that helps.
>

This was the only thing that helped - I reduced servo period to 500 us and
the motor oscillation borderline shifted from 3660 mm/min to 5114 mm/min.
Reducing servo period down to 250 us did not provide any additional
improvement.

>
> What happens if you disconnect the PID (and the motors from the
> machine!) and setp bldc.0.value 0.95 ?
>

I did the following:
# net motor.00.command  pid.0.output  =>  bldc.0.value setp bldc.0.value
0.95

Result: nothing. Motor does not move.

If I change back:
net motor.00.command  pid.0.output  =>  bldc.0.value # setp bldc.0.value
0.95

Then I can jog motor.

I tried 3 times switching back and forth - with PID disconected and BLDC
value set to 0,95 motor does not move.

2012/1/27 Peter C. Wallace :
>
> So if you set the PID comps MAX_OUTPUT to 158 (and PWM scale is
> 166.67) that will limit maximum PWM to the desired 95%
>

I reduced those values and also set max output to be less than 95% of output
scale:
OUTPUT_SCALE =  125
OUTPUT_OFFSET = 0.0
MAX_OUTPUT =118

It did not provide any additional improvement.

So this far only reducing servo period did help. Unfortunately that is
coming with RTAI error warning messages. I ran latency test for a while and
got 12000 ns max jitter on servo thread.

Viesturs


--
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


--
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

This communication is for the use of the intended recipient only. It may 
contain information that is privileged and confidential. If you are not the 
intended recipient of this communication, the disclosure, copying, distribution 
or use hereof is prohibited. If you have received this communication in error, 
please advise me by return e-mail or by telephone and then delete it 
immediately.
<>--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Viesturs Lācis
2012/1/28 Peter C. Wallace :
>
>>
>> I tried 3 times switching back and forth - with PID disconected and
>> BLDC value set to 0,95 motor does not move.
>
> Thats very strange, the motor should run at full speed with a fixed bldc drive
> value. Can you post your hal file somewhere (like pastebin.com)
>

Done:
http://pastebin.com/0M1ASyhB

I tried one more, this time with joint1 (Y1 section in HAL file).
What I did:
Changed to trivkins
Added setp bldc.1.value 0.95
Commented out pid.1.out => bldc.1.value

Still the same - no movement.
If I reattach pid.1, I can jog the motor.


>
> It would not provide any improvement, just prevent pathological behaviour if
> the PID sets the PWM to 100% (which should be prevented)
>
>
>
>>
>> So this far only reducing servo period did help. Unfortunately that is
>> coming with RTAI error warning messages. I ran latency test for a
>> while and got 12000 ns max jitter on servo thread.
>>
>
> Is this on a 5I23?
>

Yes, 5i23 with 2x 7i39s.

>
> 2 KHz should be easy (I am running a 8I20 test at 6 KHz currently with a 5I23)
>
> Do you have a base thread? (you shouldn't need one)
>

No base thead.
The PC is:
Intel D525MW
2GB RAM
4GB CompactFlash in SATA adapter


I have been trying to get the tuning right.
So far I have managed to get one motor move smoothly up to 4000
mm/min. In HALScope it seems that f-error stays within 0,1 mm during
movement, which I find to be accetable, static f-error is less than
0,003 mm.

Here are PID parameters for that motor:
# PID tuning params
DEADBAND =  0.002
P = 380
I = 10
D = 1.9
FF0 =   0
FF1 =   0.1
FF2 =   0
BIAS =  0

I hav a problem with remaining 2 motors.
Firstly I thought that I might copy these settings, since drives and
motors are equal and then try to adjust for the different load.
That failed.
Then I started from scratch and I cannot find any settings to turn the
motors smoothly. I set everything to 0, P to 1 and it is already
oscillating. Then I set P and got "joint exceeded following error".
The f-error is set to 100 mm, so obviously P should be higher.
I have tried numerous values between 1 and 300, but nowehere I get
smooth motion.

What should I do?

2012. gada 28. janvāris 18:14 noel  rakstīja:
> All interested in Servo Tuning.
>
> Have a look at:
> http://support.motioneng.com/Downloads-Notes/Tuning/default.htm
>

Thank You! I will do some reading.

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Jon Elson
John Thornton wrote:
> Jon,
>
> What is FF0 used for if it should be set to 0 for a motion axis?
>   
I used to think it was useless, but if you use the PID for a spindle 
speed control,
for instance, then it is quite useful for a velocity servo.  It serves 
about the same
purpose as FF1 in a positioning servo.  In a positioning servo, it would 
add an
offset proportional to position.  In a velocity servo, it would add an 
offset
proportional to speed, thereby correcting for finite gain in the loop.

Jon

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Jon Elson
Kent A. Reed wrote:
>
> I don't interpret this simple method to mean "add I to increase 
> stability" but perhaps that just shows I don't know PID theory and practice.
>
>   
>> and I was wondering about this.  I agree with you that it is D that
>> increases stability
>> (up to a point).  If this is truly a typo, we need to get it corrected.
>> 
>
> If you could identify the problem sections I'd be happy to help 
> reconcile them.
>   
It may be in the Wiki section that John Kasunich (I think) wrote about 
PID.  If it is
from him, then either it is something I still don't understand, or is a 
simple typo.
I had been reluctant to report it as an error, as it seemed wrong to me, 
but I
was still thinking it might be due to my lack of deeper understanding, 
and might
actually be correct.  I will look this weekend for the place(s) it 
appears and
document that, at least.

Jon

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread noel
All interested in Servo Tuning.

Have a look at:
http://support.motioneng.com/Downloads-Notes/Tuning/default.htm

Regards,

Noel.

-Original Message-
From: Viesturs Lācis [mailto:viesturs.la...@gmail.com] 
Sent: Saturday, January 28, 2012 1:25 AM
To: Enhanced Machine Controller (EMC)
Subject: Re: [Emc-users] Servo tuning - wtf?

Hello!

I have spent some time with the machine and have tried some of the
suggestions.

2012/1/27 andy pugh :
>
> At that speed with a 2-pole motor a 1ms servo period ought to be OK, 
> but you should try 500uS to see if that helps.
>

This was the only thing that helped - I reduced servo period to 500 us and
the motor oscillation borderline shifted from 3660 mm/min to 5114 mm/min.
Reducing servo period down to 250 us did not provide any additional
improvement.

>
> What happens if you disconnect the PID (and the motors from the
> machine!) and setp bldc.0.value 0.95 ?
>

I did the following:
# net motor.00.command  pid.0.output  =>  bldc.0.value setp bldc.0.value
0.95

Result: nothing. Motor does not move.

If I change back:
net motor.00.command  pid.0.output  =>  bldc.0.value # setp bldc.0.value
0.95

Then I can jog motor.

I tried 3 times switching back and forth - with PID disconected and BLDC
value set to 0,95 motor does not move.

2012/1/27 Peter C. Wallace :
>
> So if you set the PID comps MAX_OUTPUT to 158 (and PWM scale is 
> 166.67) that will limit maximum PWM to the desired 95%
>

I reduced those values and also set max output to be less than 95% of output
scale:
OUTPUT_SCALE =  125
OUTPUT_OFFSET = 0.0
MAX_OUTPUT =118

It did not provide any additional improvement.

So this far only reducing servo period did help. Unfortunately that is
coming with RTAI error warning messages. I ran latency test for a while and
got 12000 ns max jitter on servo thread.

Viesturs


--
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


--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Peter C. Wallace
On Sat, 28 Jan 2012, Viesturs L?cis wrote:

> Date: Sat, 28 Jan 2012 11:25:00 +0200
> From: "[UTF-8] Viesturs L?cis" 
> Reply-To: "Enhanced Machine Controller (EMC)"
> 
> To: "Enhanced Machine Controller (EMC)" 
> Subject: Re: [Emc-users] Servo tuning - wtf?
> 
> Hello!
>
> I have spent some time with the machine and have tried some of the 
> suggestions.
>
> 2012/1/27 andy pugh :
>>
>> At that speed with a 2-pole motor a 1ms servo period ought to be OK,
>> but you should try 500uS to see if that helps.
>>
>
> This was the only thing that helped - I reduced servo period to 500 us
> and the motor oscillation borderline shifted from 3660 mm/min to 5114
> mm/min.
> Reducing servo period down to 250 us did not provide any additional 
> improvement.
>
>>
>> What happens if you disconnect the PID (and the motors from the
>> machine!) and setp bldc.0.value 0.95 ?
>>
>
> I did the following:
> # net motor.00.command  pid.0.output  =>  bldc.0.value
> setp bldc.0.value 0.95
>
> Result: nothing. Motor does not move.
>
> If I change back:
> net motor.00.command  pid.0.output  =>  bldc.0.value
> # setp bldc.0.value 0.95
>
> Then I can jog motor.
>
> I tried 3 times switching back and forth - with PID disconected and
> BLDC value set to 0,95 motor does not move.

Thats very strange, the motor should run at full speed with a fixed bldc drive 
value. Can you post your hal file somewhere (like pastebin.com)


>
> 2012/1/27 Peter C. Wallace :
>>
>> So if you set the PID comps MAX_OUTPUT to 158 (and PWM scale is 166.67) that
>> will limit maximum PWM to the desired 95%
>>
>
> I reduced those values and also set max output to be less than 95% of
> output scale:
> OUTPUT_SCALE =  125
> OUTPUT_OFFSET = 0.0
> MAX_OUTPUT =118
>
> It did not provide any additional improvement.

It would not provide any improvement, just prevent pathological behaviour if 
the PID sets the PWM to 100% (which should be prevented)



>
> So this far only reducing servo period did help. Unfortunately that is
> coming with RTAI error warning messages. I ran latency test for a
> while and got 12000 ns max jitter on servo thread.
>
> Viesturs

Is this on a 5I23?

2 KHz should be easy (I am running a 8I20 test at 6 KHz currently with a 5I23)

Do you have a base thread? (you shouldn't need one)

>
> --
> 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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread John Thornton
Jon,

What is FF0 used for if it should be set to 0 for a motion axis?

Thanks
John

On 1/27/2012 8:16 PM, Jon Elson wrote:
> Viesturs Lācis wrote:
>> 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
>>
>>
> FF0 should always be zero on a motion axis. It creates an offset that
> varies with position.
> FF1 should always be much less than P. FF2 seems like it should always
> be much
> less than FF1. Too much D may cause instability.
>
> Jon
>
> --
> 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

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Viesturs Lācis
Hello!

I have spent some time with the machine and have tried some of the suggestions.

2012/1/27 andy pugh :
>
> At that speed with a 2-pole motor a 1ms servo period ought to be OK,
> but you should try 500uS to see if that helps.
>

This was the only thing that helped - I reduced servo period to 500 us
and the motor oscillation borderline shifted from 3660 mm/min to 5114
mm/min.
Reducing servo period down to 250 us did not provide any additional improvement.

>
> What happens if you disconnect the PID (and the motors from the
> machine!) and setp bldc.0.value 0.95 ?
>

I did the following:
# net motor.00.command  pid.0.output  =>  bldc.0.value
setp bldc.0.value 0.95

Result: nothing. Motor does not move.

If I change back:
net motor.00.command  pid.0.output  =>  bldc.0.value
# setp bldc.0.value 0.95

Then I can jog motor.

I tried 3 times switching back and forth - with PID disconected and
BLDC value set to 0,95 motor does not move.

2012/1/27 Peter C. Wallace :
>
> So if you set the PID comps MAX_OUTPUT to 158 (and PWM scale is 166.67) that
> will limit maximum PWM to the desired 95%
>

I reduced those values and also set max output to be less than 95% of
output scale:
OUTPUT_SCALE =  125
OUTPUT_OFFSET = 0.0
MAX_OUTPUT =118

It did not provide any additional improvement.

So this far only reducing servo period did help. Unfortunately that is
coming with RTAI error warning messages. I ran latency test for a
while and got 12000 ns max jitter on servo thread.

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Kent A. Reed
On 1/27/2012 9:18 PM, Jon Elson wrote:
> Peter C. Wallace wrote:
>>
>> This is wrong, you add D to  make it more stable not I
>>
> This thing about add I to increase stability is in several places in the
> docs and Wiki,

Jon:

I don't remember reading this when I was reviewing the V2.5 docs.

As a counterexample, looking at the HTML files under 
http://www.linuxcnc.org/docs, in section 1.2.4 "Derivative Term" of 
"Important Integrator Concepts" in the V2.4 docs (which becomes section 
2.4 of "Integrator Concepts" in V2.5 docs), it says

"The derivative term slows the rate of change of the controller output 
and this effect is most noticeable close to the controller set point. 
Hence, derivative control is used to reduce the magnitude of the 
overshoot produced by the integral component and improve the combined 
controller-process stability."

In section 1.1.3 "[Loop Tuning] Simple method" of "PID Theory" in V2.4 
(mutatis mutandi for V2.5) it says

"If the system must remain on line, one tuning method is to first set 
the I and D values to zero. Increase the P until the output of the loop 
oscillates. Then increase I until oscillation stops. Finally, increase D 
until the loop is acceptably quick to reach its reference."

I don't interpret this simple method to mean "add I to increase 
stability" but perhaps that just shows I don't know PID theory and practice.

> and I was wondering about this.  I agree with you that it is D that
> increases stability
> (up to a point).  If this is truly a typo, we need to get it corrected.

If you could identify the problem sections I'd be happy to help 
reconcile them.


> Jon
>

Regards,
Kent


--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Jon Elson
Peter C. Wallace wrote:
>
>
> This is wrong, you add D to  make it more stable not I
>   
This thing about add I to increase stability is in several places in the 
docs and Wiki,
and I was wondering about this.  I agree with you that it is D that 
increases stability
(up to a point).  If this is truly a typo, we need to get it corrected.

Jon

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Jon Elson
Viesturs Lācis wrote:
> 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
>
>   
FF0 should always be zero on a motion axis. It creates an offset that 
varies with position.
FF1 should always be much less than P. FF2 seems like it should always 
be much
less than FF1. Too much D may cause instability.

Jon

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Viesturs Lācis
2012/1/27 Peter C. Wallace :
> On Fri, 27 Jan 2012, Viesturs L?cis wrote:
>
>> Date: Fri, 27 Jan 2012 22:49:38 +0200
>>
>> From: "[UTF-8] Viesturs L?cis" 
>> Reply-To: "Enhanced Machine Controller (EMC)"
>>    
>> To: "Enhanced Machine Controller (EMC)" 
>> Subject: Re: [Emc-users] Servo tuning - wtf?
>>
>> 2012/1/27 andy pugh :
>>
>> On 27 January 2012 20:37, Viesturs Lяяcis 
>> wrote:
>>
>>>> What's the PID output maxing out at?
>>>
>>>
>>> OUTPUT_SCALE =          166.667
>>> OUTPUT_OFFSET =         0.0
>>> MAX_OUTPUT =            166.667
>
>
> So if you set the PID comps MAX_OUTPUT to 158 (and PWM scale is 166.67) that
> will limit maximum PWM to the desired 95%

Ok, I will try that.

BTW, can anyone explain, how to derive proper values for those 2 parameters?
What I have there is max desired velocity in machine units per second.
I do not remember, where did I get the information to do it that way,
so I would like to find out, if that is correct?

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Peter C. Wallace

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


Date: Fri, 27 Jan 2012 22:49:38 +0200
From: "[UTF-8] Viesturs L?cis" 
Reply-To: "Enhanced Machine Controller (EMC)"

To: "Enhanced Machine Controller (EMC)" 
Subject: Re: [Emc-users] Servo tuning - wtf?

2012/1/27 andy pugh :
On 27 January 2012 20:37, Viesturs L??cis  wrote:


What's the PID output maxing out at?


OUTPUT_SCALE =  166.667
OUTPUT_OFFSET = 0.0
MAX_OUTPUT =166.667


So if you set the PID comps MAX_OUTPUT to 158 (and PWM scale is 166.67) that 
will limit maximum PWM to the desired 95%




I don't know what these numbers mean. But if the PWM is hitting 95%
and the motor isn't going any faster then it might be a voltage or
current problem.


Any place for reading to find that out? Manual has a little
information only about output_scale.



If you go over 95%


How can I check that?

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Viesturs Lācis
2012/1/27 andy pugh :
> On 27 January 2012 20:45, Viesturs Lācis  wrote:
>
>> Ok, is there a place I can read more about the max_output? I do not
>> fully understand, what should I do with output_ scale and max_output
>> parameters in INI file.
>
> What happens if you disconnect the PID (and the motors from the
> machine!) and setp bldc.0.value 0.95 ?
>

I will be able to check that after ~10 hours, in the morning.

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread andy pugh
On 27 January 2012 20:45, Viesturs Lācis  wrote:

> Ok, is there a place I can read more about the max_output? I do not
> fully understand, what should I do with output_ scale and max_output
> parameters in INI file.

What happens if you disconnect the PID (and the motors from the
machine!) and setp bldc.0.value 0.95 ?

-- 
atp
The idea that there is no such thing as objective truth is, quite simply, wrong.

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Viesturs Lācis
2012/1/27 andy pugh :
> On 27 January 2012 20:37, Viesturs Lācis  wrote:
>
>>> What's the PID output maxing out at?
>>
>> OUTPUT_SCALE =          166.667
>> OUTPUT_OFFSET =         0.0
>> MAX_OUTPUT =            166.667
>
> I don't know what these numbers mean. But if the PWM is hitting 95%
> and the motor isn't going any faster then it might be a voltage or
> current problem.

Any place for reading to find that out? Manual has a little
information only about output_scale.


> If you go over 95%

How can I check that?

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Viesturs Lācis
2012/1/27 Peter C. Wallace :
>
> This is not likely a tuning problem...

Sounds encouraging :)

> More likely that you have either run out of headroom (what is the motor
> voltage vs supply voltage?) or you have a commutation problem. Commutation
> problems will happen if you have encoder count errors in q, qi, or  qh mode
> Of course if you have encoder count problems these need to be fixed  whatever
> commutation mode you use, but using h mode will eliminate encoder count
> problems as a suspect in you oscillation troubles.
>
> Another detail that can cause strange behavior if you are close to the maximum
> RPM because of voltage limits, is the maximum PWM duty cycle. This should be
> limited via the PID components max_output parameter to about 95% of the PWM
> components full scale value.

Damn, thanks for reminding about the voltages!
I have ~28 VDC supplied to 7i39s - that would account for supply voltage.
Motors are rated for 36 VDC. Since motors are rated at 4000 RPM, I
cannot reach them by default.
But I still should hit 75% of that, which is 3000 RPM, because I have
supplied 75% of the rated voltage, right? But now I have reached only
half of that.

Ok, is there a place I can read more about the max_output? I do not
fully understand, what should I do with output_ scale and max_output
parameters in INI file.

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread andy pugh
On 27 January 2012 20:37, Viesturs Lācis  wrote:

>> What's the PID output maxing out at?
>
> OUTPUT_SCALE =          166.667
> OUTPUT_OFFSET =         0.0
> MAX_OUTPUT =            166.667

I don't know what these numbers mean. But if the PWM is hitting 95%
and the motor isn't going any faster then it might be a voltage or
current problem.

If you go over 95% then the drive will start to not work properly. It
uses the PWM oscillation to create a gate voltage, and 100% isn't a
PWM, it's a steady voltage.

-- 
atp
The idea that there is no such thing as objective truth is, quite simply, wrong.

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Viesturs Lācis
2012/1/27 andy pugh :
> On 27 January 2012 20:18, Viesturs Lācis  wrote:
>
>> Yes, I hit F2 to stop it (sometimes it stops for itself within a
>> second or two) after I release jogging button and then after enabling
>> motion with F2 motor stands still and I can jog again
>
> That's a good sign then.
>
> At that speed with a 2-pole motor a 1ms servo period ought to be OK,
> but you should try 500uS to see if that helps.
>

Ok, I will try that first thing in the morning, I am in the dormitory
already to spend the night.
So are you telling that Emc is reaching the limit of motor's velocity,
affected by number of poles and length of servo period? What else
affects that?

2012/1/27 andy pugh :
> On 27 January 2012 20:22, Viesturs Lācis  wrote:
>
>> Hmm, I used "h" mode, when I tried to set up bldc component to move
>> motors properly. How is that going to help me?
>
> Don't worry about it. If you can still jog when it settles down then
> it's not losing synch.

Ok, good to hear (read).

> Is FF0 set to zero now?

Last settings I tried:
Deadband = 0,002
P = 6
I = 0
D = 2,2
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0

> What's the PID output maxing out at?

OUTPUT_SCALE =  166.667
OUTPUT_OFFSET = 0.0
MAX_OUTPUT =166.667

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Peter C. Wallace
On Fri, 27 Jan 2012, Viesturs L?cis wrote:

> Date: Fri, 27 Jan 2012 22:22:33 +0200
> From: "[UTF-8] Viesturs L?cis" 
> Reply-To: "Enhanced Machine Controller (EMC)"
> 
> To: "Enhanced Machine Controller (EMC)" 
> Subject: Re: [Emc-users] Servo tuning - wtf?
> 
> 2012/1/27 andy pugh :
>> On 27 January 2012 19:54, Peter C. Wallace  wrote:
>>
>>> What BLDC mode are you using?
>> ...
>>> If not you may somehow have lost encoder counts, this should be checked
>>
>> Try mode "h" and comment-out the rawcounts lines, that ought to make
>> it stick in Hal-sensor mode, and then it can't lose synch.
>>
>
> Hmm, I used "h" mode, when I tried to set up bldc component to move
> motors properly. How is that going to help me?
> Motors move smoothly up to ~1500RPM, but my ideal target is 4000RPM.
> minimum target is 3000RPM, so I would like to find out, if there is a
> place to read about the strategy, how to tune servos from this point.
> I tried increasing/decreasing P and D parameters, but do not see
> improvement.
>
> Viesturs

This is not likely a tuning problem...

More likely that you have either run out of headroom (what is the motor 
voltage vs supply voltage?) or you have a commutation problem. Commutation 
problems will happen if you have encoder count errors in q, qi, or  qh mode
Of course if you have encoder count problems these need to be fixed  whatever 
commutation mode you use, but using h mode will eliminate encoder count 
problems as a suspect in you oscillation troubles.

Another detail that can cause strange behavior if you are close to the maximum 
RPM because of voltage limits, is the maximum PWM duty cycle. This should be 
limited via the PID components max_output parameter to about 95% of the PWM 
components full scale value.



>
> --
> 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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread andy pugh
On 27 January 2012 20:22, Viesturs Lācis  wrote:

> Hmm, I used "h" mode, when I tried to set up bldc component to move
> motors properly. How is that going to help me?

Don't worry about it. If you can still jog when it settles down then
it's not losing synch.

Is FF0 set to zero now?

What's the PID output maxing out at?

-- 
atp
The idea that there is no such thing as objective truth is, quite simply, wrong.

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread andy pugh
On 27 January 2012 20:18, Viesturs Lācis  wrote:

> Yes, I hit F2 to stop it (sometimes it stops for itself within a
> second or two) after I release jogging button and then after enabling
> motion with F2 motor stands still and I can jog again

That's a good sign then.

At that speed with a 2-pole motor a 1ms servo period ought to be OK,
but you should try 500uS to see if that helps.

-- 
atp
The idea that there is no such thing as objective truth is, quite simply, wrong.

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Viesturs Lācis
2012/1/27 andy pugh :
> On 27 January 2012 19:54, Peter C. Wallace  wrote:
>
>> What BLDC mode are you using?
> ...
>> If not you may somehow have lost encoder counts, this should be checked
>
> Try mode "h" and comment-out the rawcounts lines, that ought to make
> it stick in Hal-sensor mode, and then it can't lose synch.
>

Hmm, I used "h" mode, when I tried to set up bldc component to move
motors properly. How is that going to help me?
Motors move smoothly up to ~1500RPM, but my ideal target is 4000RPM.
minimum target is 3000RPM, so I would like to find out, if there is a
place to read about the strategy, how to tune servos from this point.
I tried increasing/decreasing P and D parameters, but do not see
improvement.

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Viesturs Lācis
2012/1/27 Peter C. Wallace :
> On Fri, 27 Jan 2012, Viesturs L?cis wrote:
>
>> Date: Fri, 27 Jan 2012 21:58:27 +0200
>>
>> From: "[UTF-8] Viesturs L?cis" 
>> Reply-To: "Enhanced Machine Controller (EMC)"
>>    
>> To: "Enhanced Machine Controller (EMC)" 
>> Subject: Re: [Emc-users] Servo tuning - wtf?
>>
>> 2012/1/27 Peter C. Wallace :
>>>
>>> On Fri, 27 Jan 2012, Viesturs L?cis wrote:
>>>
>>>> Date: Fri, 27 Jan 2012 21:49:18 +0200
>>>> From: "[UTF-8] Viesturs L?cis" 
>>>> Reply-To: "Enhanced Machine Controller (EMC)"
>>>>     
>>>> To: "Enhanced Machine Controller (EMC)"
>>>> 
>>>> Subject: Re: [Emc-users] Servo tuning - wtf?
>>>>
>>>> Hello again!
>>>>
>>>> I tried searching my mailbox with more than 2 years of this mailing
>>>> list in it for some "servo tuning for noobs" (actual keywords used
>>>> were "servo tuning"), but found only 1 viable thread, which contained
>>>> this link;
>>>> http://www.newport.com/servicesupport/Tutorials/default.aspx?id=152
>>>>
>>>> My problem is:
>>>> I can tune servo motor to move smoothly up to ~3600 mm/min, which is
>>>> ~1500 RPM for motor.
>>>> In higher speeds at one moment motor stalls and oscillates.
>>>> Where can I read, how to proceed to reach higher velocities?
>>>> I have been playing with P and D parameters, but do not see any
>>>> improvement.
>>>>
>>>> Viesturs
>>>
>>>
>>>
>>> Whats is your servo thread period, and how many poles does the motor
>>> have?
>>>
>>
>> Servo period is default 1ms.
>> Motors have 4 poles, motors have 2048 CPR (8192
>> PPR) encoders.
>>
>> Viesturs
>
>
> What BLDC mode are you using?

What do You mean - what mode?
Config for bldc component is qh

> When it fails and oscillates does the motor behave normally when stopped
> (equal torque both directions)?

Yes, I hit F2 to stop it (sometimes it stops for itself within a
second or two) after I release jogging button and then after enabling
motion with F2 motor stands still and I can jog again

> Do you have the encoder filter on?

I guess that no, I do not have encoder filter, since I do not know,
what is that.

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread andy pugh
On 27 January 2012 19:54, Peter C. Wallace  wrote:

> What BLDC mode are you using?
...
> If not you may somehow have lost encoder counts, this should be checked

Try mode "h" and comment-out the rawcounts lines, that ought to make
it stick in Hal-sensor mode, and then it can't lose synch.

-- 
atp
The idea that there is no such thing as objective truth is, quite simply, wrong.

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Peter C. Wallace

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


Date: Fri, 27 Jan 2012 21:58:27 +0200
From: "[UTF-8] Viesturs L?cis" 
Reply-To: "Enhanced Machine Controller (EMC)"

To: "Enhanced Machine Controller (EMC)" 
Subject: Re: [Emc-users] Servo tuning - wtf?

2012/1/27 Peter C. Wallace :

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


Date: Fri, 27 Jan 2012 21:49:18 +0200
From: "[UTF-8] Viesturs L?cis" 
Reply-To: "Enhanced Machine Controller (EMC)"
    
To: "Enhanced Machine Controller (EMC)" 
Subject: Re: [Emc-users] Servo tuning - wtf?

Hello again!

I tried searching my mailbox with more than 2 years of this mailing
list in it for some "servo tuning for noobs" (actual keywords used
were "servo tuning"), but found only 1 viable thread, which contained
this link;
http://www.newport.com/servicesupport/Tutorials/default.aspx?id=152

My problem is:
I can tune servo motor to move smoothly up to ~3600 mm/min, which is
~1500 RPM for motor.
In higher speeds at one moment motor stalls and oscillates.
Where can I read, how to proceed to reach higher velocities?
I have been playing with P and D parameters, but do not see any improvement.

Viesturs



Whats is your servo thread period, and how many poles does the motor have?



Servo period is default 1ms.
Motors have 4 poles, motors have 2048 CPR (8192
PPR) encoders.

Viesturs


What BLDC mode are you using?

When it fails and oscillates does the motor behave normally when stopped 
(equal torque both directions)?


If not you may somehow have lost encoder counts, this should be checked

Do you have the encoder filter on?




--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Viesturs Lācis
2012/1/27 Peter C. Wallace :
> On Fri, 27 Jan 2012, Viesturs L?cis wrote:
>
>> Date: Fri, 27 Jan 2012 21:49:18 +0200
>> From: "[UTF-8] Viesturs L?cis" 
>> Reply-To: "Enhanced Machine Controller (EMC)"
>>     
>> To: "Enhanced Machine Controller (EMC)" 
>> Subject: Re: [Emc-users] Servo tuning - wtf?
>>
>> Hello again!
>>
>> I tried searching my mailbox with more than 2 years of this mailing
>> list in it for some "servo tuning for noobs" (actual keywords used
>> were "servo tuning"), but found only 1 viable thread, which contained
>> this link;
>> http://www.newport.com/servicesupport/Tutorials/default.aspx?id=152
>>
>> My problem is:
>> I can tune servo motor to move smoothly up to ~3600 mm/min, which is
>> ~1500 RPM for motor.
>> In higher speeds at one moment motor stalls and oscillates.
>> Where can I read, how to proceed to reach higher velocities?
>> I have been playing with P and D parameters, but do not see any improvement.
>>
>> Viesturs
>
>
> Whats is your servo thread period, and how many poles does the motor have?
>

Servo period is default 1ms.
Motors have 4 poles, motors have 2048 CPR (8192
PPR) encoders.

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Peter C. Wallace
On Fri, 27 Jan 2012, Viesturs L?cis wrote:

> Date: Fri, 27 Jan 2012 21:49:18 +0200
> From: "[UTF-8] Viesturs L?cis" 
> Reply-To: "Enhanced Machine Controller (EMC)"
> 
> To: "Enhanced Machine Controller (EMC)" 
> Subject: Re: [Emc-users] Servo tuning - wtf?
> 
> Hello again!
>
> I tried searching my mailbox with more than 2 years of this mailing
> list in it for some "servo tuning for noobs" (actual keywords used
> were "servo tuning"), but found only 1 viable thread, which contained
> this link;
> http://www.newport.com/servicesupport/Tutorials/default.aspx?id=152
>
> My problem is:
> I can tune servo motor to move smoothly up to ~3600 mm/min, which is
> ~1500 RPM for motor.
> In higher speeds at one moment motor stalls and oscillates.
> Where can I read, how to proceed to reach higher velocities?
> I have been playing with P and D parameters, but do not see any improvement.
>
> Viesturs


Whats is your servo thread period, and how many poles does the motor have?


>
> --
> 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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Viesturs Lācis
Hello again!

I tried searching my mailbox with more than 2 years of this mailing
list in it for some "servo tuning for noobs" (actual keywords used
were "servo tuning"), but found only 1 viable thread, which contained
this link;
http://www.newport.com/servicesupport/Tutorials/default.aspx?id=152

My problem is:
I can tune servo motor to move smoothly up to ~3600 mm/min, which is
~1500 RPM for motor.
In higher speeds at one moment motor stalls and oscillates.
Where can I read, how to proceed to reach higher velocities?
I have been playing with P and D parameters, but do not see any improvement.

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Viesturs Lācis
2012/1/27 Peter C. Wallace :
>
>>
>> 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
>

Peter, according to You, there is a mistake in manual.

Integrator's manual, page 158, section of PID tuning with simple method:

If the system must remain on line, one tuning method is to first set
the I and D values to zero. Increase the P until the output
of the loop oscillates. Then increase I until oscillation stops.
Finally, increase D until the loop is acceptably quick to reach its
reference.

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Viesturs Lācis
2012/1/27 Peter C. Wallace :
> On Fri, 27 Jan 2012, Viesturs L?cis wrote:
>
>> Date: Fri, 27 Jan 2012 11:45:30 +0200
>> From: "[UTF-8] Viesturs L?cis" 
>> Reply-To: "Enhanced Machine Controller (EMC)"
>>     
>> To: "Enhanced Machine Controller (EMC)" 
>> 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
>
> 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
>

Ok, thank You, I will try that out in a minute.

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

In INI fie I have:

INPUT_SCALE =   3276.8
OUTPUT_SCALE =  166.667
OUTPUT_OFFSET = 0.0
MAX_OUTPUT =166.667

Input scale is encoder pulses per machine unit - pulses per 1 mm in my case.

But even Integrator's manual does not help me understand, what to do
with the scale value and maxoutput value.

>
> 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)

Servo period is default 1ms.
Motors have 4 poles, target is 4000 RPM, motors have 2048 CPR (8192
PPR) encoders.

Viesturs

--
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


Re: [Emc-users] Servo tuning - wtf?

2012-01-27 Thread Peter C. Wallace
On Fri, 27 Jan 2012, Viesturs L?cis wrote:

> Date: Fri, 27 Jan 2012 11:45:30 +0200
> From: "[UTF-8] Viesturs L?cis" 
> Reply-To: "Enhanced Machine Controller (EMC)"
> 
> To: "Enhanced Machine Controller (EMC)" 
> 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