The motor is running correctly in position and velocity mode, but I’m facing some problems to tune correctly the foc_current PID (q/d PID).
I’ve also some doubt about the unit of measure of some parameters:
Are the q and d currents measured in Ampere or milliampere? and the desired current (Id) is Ampere o milliampere? (I assume are all in Ampere)
What is the correct way to tune q/d PID? What I have to control during the tuning? I have to check the q/d current, the q/d voltages (PID outputs) or something else?
To (try) tune the PID I usually do this:
I set the Id to 4 (I assume is Ampere) and then I start to increase the P and when the P is stable and I don’t hear strange noises from the motor I start with the I. Is correct that the speed of the motor is increasing while I increase the Id current? (trivial question but I wanna be sure that is “normal”)
Some specification about the board and the motor I’m using:
I made custom board based on stm32G4 (150 MHz) and the DRV8302 driver, to measure the current of two phases I’m not using the DRV8302 amplifiers.
I prefer to use the STM32CubeIDE so I adapted the simplefoc library to be used with the stm32 IDE.
The motor is a eaglepower 8308 160Kv.