cancel
Showing results for 
Search instead for 
Did you mean: 

Increasing sensored FOC encoder feedback loop

KStew.1
Associate III

Hi,

   I am trying to create an online angular velocity controller where my torque is dependent on the angular velocity of the motor (motor being driven by the plant). Basically, I want to resist the movement from the plant in a way that keeps the control loop passivity. My torque control loop is running at a 1 ms interval. The issue is that the encoder feedback loop from STM's motor control, generated mc_tasks is running at 1 ms as well. I am running into bandwidth issues here and need to increase the rate of the encoder feedback loop. Is there a way to reliably do this? I have doubled the rate by editing drive_parameters.h to set the SPEED_LOOP_FREQUENCY_HZ to 2000 instead of 1000. SYS_TICK_FREQUENCY is at 2000 so I am limited here to 2000.

  At the end of the day I guess I am wondering about how I can increase my frequency reliably, and learn about if there are drawbacks to doing so. For reference, I am using a quadrature encoder encoder.  

1 REPLY 1
KStew.1
Associate III

I did find that reducing my encoder FIFO depth to 1 helped stabilize things, improved my phase margin