Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cascaded Force loop saturation problem....

We are using a cascaded loop in a Turbo PMAC2 setup pretty much exactly as outlined here ->Force Loop

The loop works fine and we can tune it and set it up etc however the output of the force loop saturates at a 16bit DAC limit. We read the ADC value from ACC28E into ECT and output the value to our motor 5 I503,i504. The output of motor 5 (I502) goes to memory address $10FF. We then setup motor 1 as the position axis and set I105=$10FF. We run with offset mode following. This all works fine.

What happens is that when it takes a while to build up force (ie off the part for a while before coming into contact) the error builds up and the output which normally goes to a DAC (in our case goes to $10FF) saturates at the max DAC output (?+/-32767 ie I569=32767) and the force axes stops.

We have made a change to I107 to get more travel before saturation by changing the ratio from -96/96 to -192/96. This works and provides 2x more displacement before it saturates.

How can we handle this where we wont be limited to a 16bit output allowing more force error before the axes saturates.
When there is the possibility that the outer-loop command output will saturate, you want to integrate this value in the conversion table (method 5 instead of method 1) before injecting it into the inner loop. When you use this you can go indefinitely, as in web tensioning on a system that is moving all day in the same direction.

This integration does change the dynamics of the system. Start with an extremely low Ix30 gain in your outer loop (below 10 -- seriously), then ramp it up to see how much it can take.

Below is a copy of my ECT table. I believe we are integrating the force feedback before using it in motor 5.

Encoder Table Definitions.
Executed - Tue Sep 27 14:01:09 2011

Entry Address Y-Word Conversion Method
1 Y:$ 3501 $078200 1/T extension of location $78200 <----position axis
2 Y:$ 3502 $1F8D00 A/D conversion of location $78D00 <--force axis feedback from 28E
3 Y:$ 3503 $D83502 Tracking filter from conv. location $3502
Y:$ 3504 $007D00 Maximum change in cts/cycle
Y:$ 3505 $028283 Proportional gain
Y:$ 3506 $000000 Reserved setup word
Y:$ 3507 $000046 Integral gain
4 Y:$ 3508 $5010FF Integrated A/D conversion of location $10FF
Y:$ 3509 $1FD801 Bias term
5 Y:$ 350C $C78208 Inc without extension of location $78208
6 Y:$ 350D $E50006 Summing Of Conversion Table Entry 3 with Entry 1 <----force axis feedback

Motor #1 Position Axis (Z)
I105=$10FF ;Input from Phantom Axis (Axis #5)

Motor 5 Force Axis (W)
I502=$10FF ; Output to Axis #1
I503=$350D ; FeedBack from Load Cell $3505 from 3507
I504=$350D ; FeedBack From Load Cell $3505 from 3507
Yes, you do appear to be integrating the outer loop command before injecting it into the inner loop. In this case, even though the outer loop command saturates, its integral should continue to increase and move the inner loop motor.

A couple of things I note.

You have I106=0. This would disable the coupling to the inner loop. I presume this is 1 or 3 when the loops are actively cascaded. Correct?

Your feedback for the force virtual motor looks to be the sum of a position count and a filtered analog feedback. I don't understand this at all? Why are you including position here?
Thanks for your replies.

We are actually not integrating the outer loop although there is an ECT entry to do it. It was not used as the output $3509 isnt being used anywhere that I can tell.

We do come in and out of offset mode with I106=1(3) as needed.

The last entry in the table simply multiplies entry 3 (output of tracking filter) by -1 (second entry not used). It just negates the output.

How would I properly setup to take the output from the tracking filter and THEN the negating entry through another entry to integrate the $10FF DAC Command from motor 5? I hope that made sense....basically what would be the approach to setting up the ECT.....
I think you're getting confused as to what does what.

You are processing your analog force feedback for your outer loop motor first as and ADC in Entry 2, then filtering the Entry 2 result in Entry 3, then changing the sign of this value in Entry 5 by subtracting it from 0. The Entry 5 result is your feedback from virtual Motor 5, compared to your commanded force value.

Presently you are writing your Motor 5 servo loop command to holding register X:$10FF. It's an X-register instead of the usual Y-register because I501=2. This was done so Motor 1 could pick up this value directly as a "master position" by setting I105 to $10FF (this always specifies an X-register). However, when you saturate the servo command output of Motor 5, it cannot force movement of Motor 1 any more, which is your problem that brings you here.

I would set I501 to 0, so you are writing to Y:$10FF. This value can be picked up by Entry 4 in the conversion table (which reads the Y-register at the address and integrates it. I would set the bias term in Entry 4 to 0, at least to start -- I see no reason for the huge bias that you have there.

Motor 1 can then pick up the integrated result from Entry 4 by setting I105 to $3509. As I said before, when the inner loop is picking up an integrated result from the outer loop, the outer loop gain Ix30 should be set extremely small, at least to start.

I imagine I should reorder the ECT so that entry 4 comes after entry 5 or else there will be a servo cycle delay penalty?

I will give this a try and report back.


I tried what you suggested and have a few questions.
What exactly should the entry in the ECT be for the integration of address $10FF with no offset?
4 Y:$ 3508 $5010FF Integrated A/D conversion of location $10FF
Y:$ 3509 $0 Bias term

Is the above correct?

Also where can I look to see that the values are getting integrated and look right? M567? M561? or RHY:$3509?
Will these values only change when I106 doesnt equal 0?

Yes, your ECT entry for the integrated "analog" value is correct.

The result of the ECT entry in X:$3509 is the 24-bit integrated value, which can roll over.

If I106 bit 0 is 1, enabling following on Motor 1, then each cycle, the M167 48-bit master position register will take the difference in X:$3509 from the previous cycle, multiply it by I107, and add this to its own value from the previous cycle. This is where you can see the integration go continuously.

I verified that behavior on the machine. My I530 is on the order of 200 and it takes I533 gain as well to reach setpoint.


Forum Jump:

Users browsing this thread: 1 Guest(s)