Other Parts Discussed in Thread: MOTORWARE
Dear TI members,
I'd like to tune speed PID parameters of my custom code based on motorware.
I have changed Kp and Ki at CTRL_setParams() as follows
// set the default speed PID controller parameters // Kp = _IQ(0.02*pUserParams->maxCurrent*pUserParams->iqFullScaleFreq_Hz/pUserParams->iqFullScaleCurrent_A); // Ki = _IQ(2.0*pUserParams->maxCurrent*pUserParams->iqFullScaleFreq_Hz*pUserParams->ctrlPeriod_sec/pUserParams->iqFullScaleCurrent_A); Kp = _IQ(0.035*pUserParams->maxCurrent*pUserParams->iqFullScaleFreq_Hz/pUserParams->iqFullScaleCurrent_A); Ki = _IQ(2.5*pUserParams->maxCurrent*pUserParams->iqFullScaleFreq_Hz*pUserParams->ctrlPeriod_sec/pUserParams->iqFullScaleCurrent_A); Kd = _IQ(0.0); outMin = _IQ(-1.0); outMax = _IQ(1.0); PID_setGains(obj->pidHandle_spd,Kp,Ki,Kd); PID_setUi(obj->pidHandle_spd,_IQ(0.0)); PID_setMinMax(obj->pidHandle_spd,outMin,outMax); CTRL_setGains(handle,CTRL_Type_PID_spd,Kp,Ki,Kd);
I could see Kp and Ki was updarted as I intended at start as following capture.
After I ran the motor, it was restored as original value.
I could not find which code was update the Kp, Ki value.
so I could not test tunned parameter of speed PID.
Would you please let me know how to update Kp, Ki value of speed PID ?
Thanks in advance