Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RESOLVED - How do I Scale Motor Units to Engineering Units
#1
Hi, we are using an encoder with a 50nm count resolution. That makes the configuration of the motor-setup a little tricky. To make it easier for people, not that heavily involved in the Pmac, I would like to scale the encoder units into 1mm. I thought I could solve this by setting:
EncTable[1].ScaleFactor = 1 / 20000 ;
since there are 20000cts per mm. Furthermore I would multiply
Motor[1].PhasePosSf by that factor to keep the commutation cycle correct. For my Motor it then becomes:
Motor[1].PhasePosSf = 20000*( 2048 / ( 330000 * 256 ) ) ;
However when I apply these changes, I am not able to tune the Position Loop gains. I am not sure if I am on the right path here either. In the teaching materials, there is a figure depicting the Motor Scale Factors. In that figure the EncTable[1].ScaleFactor is multiplied by Motor[1].PhasePosSf. That would effectively eliminate the Scale Factor I applied before. But If I do not adjust the Parameter for Motor[1].PhasePosSf, it would give the wrong counts for the commutation cycle. Is there a comprehensive explanation or example available on this topic. Is this even feasible?

Best regards,
Filip
Reply
#2
Update
I mistook Motor[1].PhasePosSf for Motor[1].PhasePosSf. However if I change Motor[1].PosSf to 1/20000 and try to tune the gain terms I do not get any movement at all. 1/20000 should make the gain terms quite big and approaching the old gain terms multiplied by 20000 should show some action. But I do not see anything.
Reply
#3
I think you rescaled twice when you only needed to do so once.

Most people leave the output of the encoder table in counts. I would return the EncTable[n].ScaleFactor to its default value. For digital quadrature, this value is 1/256, which makes the result of the table entry in units of quadrature counts, with 8 bits of estimated sub-count fraction.

(If you just converted this value from 1/256 to 1/20000, you did NOT rescale from counts to mm, because you did not change the scaling by a factor of 20,000.)

I would start with a Motor[x].PosSf and Pos2Sf = 1.0 so that the motor units are also in counts. With the motor disabled, move it by hand and see if you get the expected numerical change with distance.

Then change these scale factors to 1/20000 and repeat the hand movement to see if the reported units look like mm.

Now you can try to tune the system.
Reply
#4
Hi - thank you for your advice. I tried with a small change in Motor[1].PosSf and set it to 1/2 to begin with. I managed to tune the motor, but it took a while. I will now try tro go on with 1/20 and see how it works out.
Reply
#5
I got it to work on 1/20 - scale. It seems as if the current loop is not affected by this scaling.
Reply
#6
You are correct that the current loop is not affected by rescaling of the position loop.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)