maruta / Compact-SimpleFOC-Board

Design file of Compact SimpleFOC Controller Board
MIT License
11 stars 0 forks source link

[question] Torque control in foc_current/torque. #1

Closed freemanzwin closed 2 weeks ago

freemanzwin commented 1 month ago

( sorry for poor English) Thank you for the resource. I have a question while studying.

You used foc_current/torque... If I use your PID settings below, I can't control the torque like in the video, is it the right PID setting?

// current q loop PID motor.PID_current_q.P = 5.0; motor.PID_current_q.I = 5000.0; motor.PID_current_q.D = 0.0; motor.PID_current_q.output_ramp = 0.0; motor.PID_current_q.limit = 5.0; // Low pass filtering time constant motor.LPF_current_q.Tf = 0.005; // current d loop PID motor.PID_current_d.P = 5.0; motor.PID_current_d.I = 5000.0; motor.PID_current_d.D = 0.0; motor.PID_current_d.output_ramp = 0.0; motor.PID_current_d.limit = 5.0; motor.LPF_current_d.Tf = 0.005;

maruta commented 1 month ago

Without knowing the specific circumstances of the failure, it is difficult to say anything about the gain adjustment, but the video uses a velocity control loop.