Use BLDC in galvo mode

Hi everyone! I’m new to this area. I’m trying to drive a BLDC (HT2205) and use it as a galvo. I have a reference signal for position which is a triangular wave, it starts from 0 degree and rise linearly to 80 degree and then go back to zero, and repeat the same pattern periodically. The frequency is about 5 Hz. I tried to control and drive it with tmc4671+tmc6100-bob, but the tracking error is very big. Please see the plot for target and actual position as below. I’m not sure I’m using the correct controller and driver. Could you please provide some recommendation about the suitable controller and driver for my application. Thank you!


PID tracking on constantly moving setpoints can be tricky. You might be able to get a better performance with adding another term which is the double integral. You can also remove the D term since there is not any real use for ‘look ahead’.