Dual PID loops and appropriate pins for feedback to the Trajectory Planner et al

More
18 Sep 2019 21:26 #145538 by Todd Zuercher
I don't have any real experience with a dual feedback set up. I have only played with dual PIDs cascaded for controling a torque mode servo (pos-PID -> vel-PID -> servo torque command). Some other possible ideas to try might be using a single PID using the scale position feedback and the rotary encoder's velocity feedback, or calculating the following error from the linear encoder and plugging that into the bias input.

Please Log in or Create an account to join the conversation.

More
19 Nov 2019 09:14 #150621 by HalaszAttila
Hello,

in interesting in controlling axis with full closed loop too (Rotary encoder + Linear scale).
Have you got any results on this topic yet?

Best regards,
Attila.

Please Log in or Create an account to join the conversation.

More
12 Dec 2019 14:39 #152534 by akb1212
Hello,

As most of you already know, tuning a "normal" PID-loop is something like an art (even a black art...). So nesting loops isn't exactly simplifying things. Not as far as making things easier to understand and wrap your head around anyway!

But....
There are some clear advantages to be had by doing it! Which is also why most high end CNC-machines always have it.

So.....
I have already installed a second set of encoders on my mill (a 1990 MahoMH600E), a full WMC that came with original linear scales with high resolution (0,2 um with the present interpolators).
So I have installed quadrature encoders on the motors.

As far as I understand this there should be "clean" signal paths, and no mixing or sharing of feedback between the different PID's.
At least in my head it will be a problem when a PID is calculating its output based on a mix of feedback, which have a different time-domain. After all there is a delay between the mechanical arrival of the movements between the two encoders. In my case the inner loop is directly connected to the motor on its shaft. This is to have a fast response which enables high stiffness of the loop.

The outer loop on the other hand is connected to linear scales. And they have a much longer mechanical train before the movement arrives at them (in my case a safety clutch, a timing-belt, a ball-screw + nut, stick-slip from the ways and finally mechanical connection to the encoder)! As a result the loop is a lot slower, and as such one will have to back off on the control signals as the phase delay will become a problem. Oscillations will start at much lower gain levels (reducing speed and stiffness).

So..... since the main feature of the inner loop is it's high speed, and as a result high stiffness..... you wouldn't want to mix inn signals from the outer (slow!) feedback loop!

You would pollute your fast inner feedback loop with slow feedback signals from the outer loop, and as a result mess up the whole advantage.

When I read the wiki I don't interpret it as they mix the encoder signals.

BTW, one thing this implementation is capable of is to remove minor backlash and mechanical wear (an important thing for me). And it's doing it by taking feedback from before it's introduced. But to then use the (polluted with backlash) signal from the outer loop and introducing that in to the clean and fast inner loop will cause big problems.

Also take a look at my post discussing this with DaBit here:
PID tuning: one vs multiple loops, gain scheduling

I think he made his mill work with dual loop (plus an inner torque loop inside of that, but that is normaly done in the drive). But his newest links to the configs are dead..... his webpage where he had them are long dead. But there are early configs in the above mentioned thread.

I have taken up my work with my mill again now, after several years of no time to spend on it. And I hope to have this working soon. And will share my configs along the way. I'm soon ready to start testing out the new configs I'm working on now, and will most likely need some assistance to finish them.

Anders
The following user(s) said Thank You: HalaszAttila

Please Log in or Create an account to join the conversation.

More
13 Dec 2019 14:44 - 13 Dec 2019 14:46 #152604 by Nitram
Hi Anders.

Whilst the 1um magnetic scales have now arrived I have not had time to mount them into my mill which has 10mm pitch and 4096 ppr encoders on the ballscrew of each axis already.

As a starting point for you, and after much trialing on a different machine, I found the best way of zeroing both measuring devices together (rotary and linear) at the instant of homing on a given axis, was a physical wire joining both Z pulses when homing to index.
It worked consistently and well.

I am interested in your progress with this project.

Kind regards
Marty.
Last edit: 13 Dec 2019 14:46 by Nitram.

Please Log in or Create an account to join the conversation.

More
16 Feb 2021 18:51 - 16 Feb 2021 18:52 #199096 by Doug Crews
Hello Marty,
I know this is an old post but I’ve learned that time flies when working inside of this opensource machinery bubble!

It looks like you were planning to implement a dual loop. I’m wondering if you had shelved that project since you had such success with mapping your ball screws using the method you posted last year. By the way, Thanks for doing that. Its great example of sharing.

I’ve just finished up installing ball screws on my knee mill and am now faced with the decision of mapping or dual loop. I still have a small amount of backlash and also some lead error. My existing scales are 10 micron resolution, really coarse. I’m convincing myself that I should go ahead and get 1 micron scales even if I don’t go dual loop because it will help with the mapping process. I would value your opinion in this area and welcome any of your adventures you can share in the dual loop effort.

Thanks
Doug
Last edit: 16 Feb 2021 18:52 by Doug Crews.

Please Log in or Create an account to join the conversation.

More
20 Feb 2021 22:17 #199566 by Nitram
Hi Doug.
Been quite busy lately, sorry i haven't replied sooner.
Just wondering where you are located on the chance you're also in Australia?
Cheers Marty.

Please Log in or Create an account to join the conversation.

More
22 Feb 2021 04:49 #199675 by Doug Crews
Hi Marty, No worries glad to hear you are busy. Hopefully it’s all good stuff. I’m unfortunately not in Australia can’t wait to visit one day. I have neighbors who moved back there and would like to pay them a visit. I’m located in Seattle Washington USA. I’ve been working toward running a comp program following your post using my existing scales just to get the setup working. I should be able to get it going later this week. I keep telling myself to just go-ahead on the 1 micron scales, but maybe I can get better performance even with the 10 micron scales.
Cheers
Doug

Please Log in or Create an account to join the conversation.

More
22 Feb 2021 09:06 - 23 Feb 2021 20:23 #199688 by Nitram
Last edit: 23 Feb 2021 20:23 by Nitram.

Please Log in or Create an account to join the conversation.

Time to create page: 0.100 seconds
Powered by Kunena Forum