Sure - the guide I used is this: https://granitedevices.com/wiki/Configuring_cogging_torque_compensation
It’s the same guide that shows up on the tuning page when using granity.
Pole count depends on motor - which hopefully you have already configured correctly in granity. You can find that under the MPC setting of the Machine tab in granity (under Motor Paramaters). It should also be listed in your servo motors specifications. It is possible to determine it manually using this method: https://granitedevices.com/wiki/Determining_motor_pole_count
Small and large Mige have a pole count of 8.
Once you know the pole count follow this procedure;
- Press in the emergency stop (to disable all power to the motor)
- Align your steering wheel to resting position (basically straight - it doesn’t really matter where you start, as long as you know when you get back to that position)
- Slowly rotate the wheel, you’ll feel a notch (or step) every slight turn
- Count the number of notches as you continue to turn the wheel until you end up where you started (360 degrees)
- Divide the step count above by your pole count, and then multiply that by two
- For example lets say a small mige had 24 steps; 24/8(pole Count) = 3, Multiply 3 by 2 = 6. 6 is our N value for the TRF1 function
- Set TRF1 to Sin(Nx), (In our example above, Sin(6x))
- Release the emergency stop (motor now has power)
- Set TRA1 to 0.1 and rotate the wheel slowly, still feel cogging? Increase by 0.1
- Keep increasing until you feel cogging reduce, then increase again, when that happens reduce by 0.05, fine tune from there
- If cogging does not reduce, repeat procedure with negative values, start at -0.1, then -0.2, once you find the setting with least cogging, fine tune in 0.05 increments
- Once you find the value that has the least cogging (is as smooth as possible), switch TRA1 to Cos(6x) - (remember 6 is just an example value)
- Try with a positive and negative Cos using the value that was smoothest on Sin (or repeat entire procedure)
- Pick either Sin or Cos based on whichever is smoothest
Once complete you should be able to rotate the wheel when it is powered on and feel little to no notching in the wheel, it should be very smooth.
You can repeat this procedure for Ripple Compensation - just set a target setpoint (TSP1) and hit SetAbs, this will put the motor under torque (don’t set it too high!). Hold the wheel still under this torque and slowly turn - if you feel any notching (ripple), tune it out using the same procedure as for cogging. On my kollmorgen I was unable to feel any ripple, so ended up not using ripple compensation. I ended up with Sin(12x) and -0.13A as my cogging compensation function (iirc). It will be different for different motors (even of the same brand/model).
Hopefully that’s helpful to some - honestly I’ve just paraphrased the documentation that’s already there, but maybe with specific concrete examples it’s a little more accessible!