Trajectory tracking problem while using Pololu G2 18v15 to drive a maxon motor

Hello,
I am using Pololu G2 18v15 to drive a maxon motor. The motor is supposed to drive a load in a sinusoidal trajectory against gravity with maximum torque of 0.0634 NM with max speed of 5 rpm.
I am using arduino to do trajectory control (using PID controller) and pwm commands are sent to pololu controller through i2c communication.
When I use lower pwm frequency (1.13/2.50/3.21kHz) on pololu motor controller, the motor is smoothly able to track the desired sinusoidal trajectory. But there is high pitch sound generated by the motor.
When I use higher pwm frequency (22.5kHz) on pololu controller, there is no sound produced by the motor but, the motor is not able to track the desired trajectory smoothly even after multiple attempts of tuning the PID gains on arduino. There are always some jitters when motor is lifting the load against gravity.
One thing I have noticed is that the motor pulls around 0.11 amps of current when pwm frequency is 22.5 kHz where as it pulls around 0.23 amps of current when pwm frequency is 1.13kHz to achieve the same maximum speed while following the same trajectory.
This makes me suspect that, the motor is not getting enough torque at high pwm frequency to smoothly lift the load.

Is there any setting in Pololu motor controller where i can increase the current pulled by the motor at higher pwm frequency to get same performance as I get at lower pwm frequency?

Thanks in advance!

Hello.

The different current measurements you observed are probably a result of your motor’s inductance and how you are measuring the current, so I am not sure how meaningful that is. However, the change in PWM frequency might also be affecting the relationship between the duty cycle and the actual motor speed.

The way to increase the current draw of the motor is to increase the duty cycle of the output, which is controlled by your PID algorithm, so this just makes it seem like a PID tuning issue. Can you tell me more about how you are setting your PID constants?

-Patrick