Greetings,
Im trying to verify my closed current loop system using the PID_grando_controller. Current regulation seems to work fine by choosing the right PID coefficients, though i have problems verifying the stability by measuring the current loop gain using HP4194A Gain/Phase Analyzer. Im working with the DRV8301-HC-C2-KIT and I'am measuring the I-total signal. That is after the U13 OPA365 ( TP23 ). My measurements show very little gain around -20dB and im not sure if I'am doing the measurements right. Has anyone tried measuring the current loop gain on the DRV8301-HC-C2-KIT or the DRV8312-C2-KIT?
PID coefficients used for my measurements:
pid1_idc.param.Kp = _IQ(10);
pid1_idc.param.Kr = _IQ(0.05); pid1_idc.param.Ki = _IQ(0.002); pid1_idc.param.Kd = _IQ(0.000006); pid1_idc.param.Km = _IQ(1.0); ISR frequency: 40kHz Screenshoot of the measurement:
To do this measurement with the Gain/Phase analyzer, R130 (0R) was removed. Test point was set at the output of the U13 opamp, and the reference point is on TP23. The signal sweep was injected on the place of the removed R130. As it can be seen the gain is only -22db at 40Hz, which would mean there would be no current regulation, but there is! So this must be some measurement error. I would appreciate any help if anyone has tried doing the closed loop gain measurements on one of these kits.
Yours Sincerly,
Pavel Ruban