PWM phase voltage and current measurement for power consumption calculation for a BLDC MOTOR
If you have a scope available you can look at the input and determine if you have noise or if the problem is with your sense circuit. You could also try to add some capacitors on the input this might fix your problem if noise is the issue. You can also use an multimeter to determine if your current measurements are correct or you can invest in an VESC which can log power at both the input and output.