PMSM Vector Control using Hall sensors in TORQUE CONTROL

Dear Community,

In Reference to the RA6T2, we would like to develop a e-bike PMSM motor controller using RA6T2 platform and i found example code for Hall sensor based FOC which is good for my application. But the entire control loop is designed for speed control loop. My application need a Torque control loop and speed varies with torque in e-bike's. Can you help with what modifications has to be done to this example code to modify it to Torque control loop ?


Naga Penmetsa