I'm trying to measure my motor and input power on my DRV8301-69M-KIT. I have referred to this thread for the recommended equations to calculate the 2 wanted variables.
The problem presents itself when trying to test these equations while debugging the controller with a motor running. Used lab project is 10a, which is modified to run in current control instead of speed control. The values swing around a lot and sometimes seem to hit a correct value, but then change around again quite erratically. For example calculated motor power should have been around ~22 Watts as measured through an external power analyzer and sometimes the correct amount would be shown in the expressions window while debugging, but would then swing anywhere between 9-22 Watts.
Now is this problem caused by the debugging and auto-retrieving the variables on the expressions list or is this a hardware related problem? This swing values can also be seen with measured iq_A and motor torque numbers.