Hello Everyone,
I’m new to this and I’ve tried to search the community forums for an answer but I I didn’t come across any threads that were helpful to my issue.
My issue:
I am trying to control the speed of my PM-SMPM motor (24V, 10 pole pairs, 96Kv, Rs 1.7, Ls 1.15, 2300 max speed, 15A max A) using the B-G431B-ESC1 inverter board and the simpleFOC library. I have an MT6701 (1024PPR) used for speed feedback as a quadrature encoder.
There are 2 nested loops. The outer speed loop and the inner torque/current loop. Initially, I assumed I would just run with default values for the torque loop and focus on fine-tuning the speed loop. Zero’ed the gains for the speed PID, starting only with the P and progressed from there. Very difficult to control. Had to stop.
I suspected that perhaps the inner loop was the cause. So I decided to focus on that. At first, i thought the default values for current loops that came with the simpleFOC library may be wrong, so I decided to use MC Workbench (input all parameters) and have it auto-calculate the PID gains for current loops Q & D and applied those instead.
Neither worked.
Now without going into the details of all my trials, I thought perhaps I can get some guidance on this from the community. How does one tune the PID gains of the current D & Q loops of this inverter board ? Do you even do that or just run with default values. I saw a few posts on how to tune PID of speed or position loops but nothing about the current loops.
I am using simpleFOC Webcontroller as an interface to change the relevant PID values and set the correct control loop configuration to test.
Before fine-tuning, I need to test the torque/current loop alone, I would select as Motion Control: Torque, and Torque Mode: FOC Current.
Then what are the proper steps to take? Set currentQ Target to 1A ? 0.2 A? What am I monitoring ? Phase voltage Q ? I see it oscillate … but how much is too much ? from looking at the actual motor, it is not spinning smoothly at all … so that’s a dead giveaway ? What should I expect ?
Furthermore, the FOC Current has two PIDs current Q and current D … is it better to run DC Current mode first and fine time currentQ alone … and then switch to FOC Current, keeping the same PID values for currentQ and then start adjusting currentD ? Use the same current PID values for both?
Any and all help is appreciated. The more detailed the better, please keep in mind I’m a novice.