Hello Guest it is October 18, 2019, 08:22:10 PM

Author Topic: Following Error  (Read 3150 times)

0 Members and 1 Guest are viewing this topic.

Re: Following Error
« Reply #10 on: June 22, 2018, 10:37:47 PM »
If my reply seems confusing, I was writing while you were replying. Yes. absolutely the encoders are connected to the drives. Nothing would work if that wasn't true.
Re: Following Error
« Reply #11 on: June 22, 2018, 10:52:57 PM »
Craig,
I would just like to add that you are a pit bull (and I mean that in the best possible way) in getting to the bottom of things. I mean I can see you've got the books out and really dug into this thing, spending more time than anyone would hope to expect.

Kudo's

Lou
Re: Following Error
« Reply #12 on: June 22, 2018, 11:06:28 PM »
Hi,
kool, That was my concern that if you did not have the encoders hooked to the stepper drives everything else tips over.

The next question is why bother? You have two ways to close the loop, namely the drive and stepper  AND the 7766. Why have both? My question is that one
loop could be counteracting the other.

May I make a suggestion...just have the drive/stepper close the loop and have the 7766 as open loop command generator and use the scope facility built into the drive
software to watch the error. In order to do this you would have to increase the accel in Mach4 to an effective infinite and widen the following error window in the drive
to as wide as possible or even turn it off. Note that all of that can be done by programming, shouldn't have to rewire or buy extra bits.

Then you could issue a G0 Z100 say, an effective Step move. Initially the error would be 100 units and as the axis accelerated it would diminish and end when the stepper assumed position 100.
You could display this with the scope. Now try reducing the acceleration in Machs tuning and try again. Eventually you will reduce the acceleration so that the maximum error is some small
value, say 0.05mm say. You will then have found the maximum acceleration that your Z axis can attain AND remain within a given tolerance. The scope will allow you to view the results of changing
the PID parameters also. What the scope would not show you is if the 7766 changes the input command in response to its own feedback dynamics. Thus if the 7766 were not just an open loop
command generator then you tuning effort would be masked by the 7766 dynamics.

As far as the following window is concerned my only experience is my servo. It has a 2000 line encoder or 8000 count per revolution. The default following error is 20 counts or 0.9 degree and its zero window,
that is when its so close that it doesn't bother trying to reduce the error any more is 4 counts or 0.18 degree.

If your drive follows the same idea then your 1000 line, 4000 count encoder with a 500 wide following error would be 1/8 a revolution or 45 degrees, which seems awfully high to me. With a 5mm pitch ball screw
that would equate to 0.625mm, quite substantial.

Craig

My wife left with my best friend...
     and I miss him!
Re: Following Error
« Reply #13 on: June 22, 2018, 11:55:25 PM »
Craig,
I'm looking at your questions and suggestions one at a time and trying to answer so I might sound disjointed, but here goes.

  The reason have closed loop drives and the 7766 at the same time is an economic one. My motors are ~1800 oz. nema 34's and I could get them in a closed loop set cheaper than I could get just the motors and encoders, and cables alone. The drives were just a bonus if you could call it that. I didn't really need them, or want them. I already had drives for my old motors, but the motors where single shaft, problematic for mounting encoders, hence the new.

As far as implementing your suggestions, it will take me a while to digest all you have put in front me but at first glance makes sense. I'm gonna try.


As far as my following error settings being at 500 with my new acceleration settings the actual error during finishing of the project I was working on only reached 40 one time which was quickly compensated for and usually only 1-2 I just didn't want the machine to stop again. Super simple cutout of a cabinet where a mistake would be hard to find.


You've helped me immensly in undersatanding what I'm dealing with in this following error thing. Things can only get better but like all things, its a journey.


Thanks
Lou
Re: Following Error
« Reply #14 on: June 23, 2018, 01:02:58 AM »
Hi,
OK that explains the origin of the different styles of loop closure.

I bought a big servo a while back for a spindle motor, 2.8kW and 14Nm. Its fitted with a resolver rather than an encoder so drives are a rare as rocking horse s*********t.
I decided to make one of my own, electronics is my thing and studied control engineering at University. I have had to learn and in many cases relearn stuff to do it.
I always maintain that the value of a hobby is best measured by the things you learn in pursuit of it. In which case my decision to make my own drive has been very valuable.

Amogst the things that you need to know about Field Oriented Control is control loops. There are some very good YouTube clips by Texas Instruments of Field Oriented Control, really well
done and a fascinating insight as to how AC servos work.....highly recommended.

The upshot is that for an AC servo to work you need three control loops. The innermost one is the acceleration (an expression of torque which is proportional to current) loop, then the next outer loop is the velocity control loop
and then the outer most one is the position loop. The advice is that if you are going to combine loops you have one loop per differential time. Thus the torque (or acceleration)loop is 'integrated'
(mathematically) to the velocity loop, which is in turn integrated (again in the mathematical sense) to the position loop.

Your drives AND the 7766 have three levels as well but you now have two acceleration loops, two velocity loops and two position loops. I suspect that the multiplicity of loops of the same
time 'dimension' will interact in a way that may be very hard to sort out.

I would certainly in the first instance reduce the complexity of your Z axis by having the one feedback control. Two different ways:
1) As I've already suggested use the 7766 as an open loop command generator and have the drive/stepper as the one feedback control element OR
2)Replace your drives with non-smart drives, ie just plain step/direction stepper drives like the AM882 from Leadshine and then have the 7766 close the loop.

If you already have plain ordinary drives 2) is perfectly doable but having to buy new drives just to avoid the complication of your current ones seems a real pain.
I am not aware that there is any advantage of one or the other. Having said that I would be tempted to guess that the manufacturer of your stepper and drive has made a combination
that works well together and would be easiest to achieve a good result. I do not mean any disparagement to the 7766 but it does lack the software driven scope and also its by
necessity more generalized in nature resulting in a more difficult tuning task.

I think this is the least confusing way forward. No matter how you work it out a good result is determined by the overall PID dynamics. Lets say you choose one of the above strategies
and find that the best performance of your machine is had with a P(roportional) gain of 1400, an I(ntegral) gain of 200 and a D(ifferential) gain of 175. If you now decide that you want
both the drive AND the 7766 to participate in the PID dynamics you at leat know the approximate distribution of gains required....so if you had the P gain of the 7766 at 14 then the
P gain of the driver would have to be about 100. (14 X 100 = 1400, our previously discovered sweet spot for Proportional gain) Alternatley you may decide the differential component
of the driver is numerically very noisy, a common problem with differentiators so you might set the drive D gain to 1 but have the 7766 D gain set to 175 and take advantage of the less noisy
differentiator Vital Systems built in.

Is your head spinning yet?.....mine sure as hell is!!!!

Craig
My wife left with my best friend...
     and I miss him!
Re: Following Error
« Reply #15 on: June 23, 2018, 01:41:08 AM »
Like a top ~~~~~~~~~~~~~~~
I do have four MA882's lay'n around doing nothing, might be worth a shot to give them a try. Much more complicated than I thought. I just figured those "smart" drives was just living the life, with the 7766 doing all the thinking.

You've got me thiking again, never a good thing, hope i don't see any smoke this time.

Lou



Re: Following Error
« Reply #16 on: June 23, 2018, 01:56:39 AM »
Hi,
kool.

From the point of view of simplicity you could try the current drives but the 7766 open loop, after all that's only keystrokes.
If you have plain drives you could try those for the sake of wiring them in.

Two reasonably straight forward experiments you can try.

I suspect that if you take the time to learn to use the software scope you will learn a lot about your system and what an 'optimum' solution looks like
rather than 'by guess and by God' approach.

Craig
My wife left with my best friend...
     and I miss him!
Re: Following Error
« Reply #17 on: June 29, 2018, 06:27:44 PM »
why not just use clearpath servo the feedback is built in no need to add a option board to the hilcon 
Re: Following Error
« Reply #18 on: June 29, 2018, 07:14:24 PM »
Hi,

Quote
why not just use clearpath servo the feedback is built in no need to add a option board to the hilcon 

Clearpath  servos are expensive, very good certainly but represent anywhere between an extra 50% to 200% increase over DMM and/or Delta servos for the same power
AND DMM and Delta have way better encoders and electronic gearing.

The extra cost of servos is still considerably more than the activation fee of the HiCon. OP howver alredy has closed loop steppers and matching drivers so the HiCon activation is not
strictly required.

Having said that given that OP has both Hicon activation and some plain non-feedback stepper drivers there is the possibility for OP to experiment with the two ways of closing
the loop. That experimentation will markedly improve the prospect of arriving at an optimum solution.

Craig
My wife left with my best friend...
     and I miss him!
Re: Following Error
« Reply #19 on: June 29, 2018, 07:59:18 PM »
Craig,
I haven’t yet gotten around to swapping out the closed loop drives yet, but that is the way I intend to go. That seems to me to be really good advice.

Lou