Close

Current Sensor Failure Detection​

A project log for Axiom: 100+kW Motor Controller

High Power, High Performance 400V 300A 100+kW Motor Controller fully compatible with VESC

Marcos ChaparroMarcos Chaparro 04/23/2019 at 21:260 Comments

Fresh merge from VESC repository:

https://github.com/vedderb/bldc/pull/88

Last week we provided the code to handle 2 dangerous failure modes:

If a current sensor is damaged, the FOC will run out of control, with dangerous consequences. Axiom boards are the only VESC's that come with a simple pullup in the sensors input to make sure that a loose wire will set the analog signal to a known value that is detectable by the firmware.

So if the sensor offset is higher than a certain threshold, we trip the fault, it gets logged and visible from the GUI, and the controller won't be allowed to move the motor until the problem has been fixed. It will even let you know which sensor has an offset problem.

The second method used to detect a problem is checking that the sum of all phase currents is zero:

As you can see, the current can only flow through L1, L2 and L3, it has no other way to go, so the sum of the 3 currents should be zero.

In practice, under hard acceleration you can get to see some current flowing to the chassis, that's why we allow for a bit of current unbalance, and coded a low pass filter to avoid false trips due to noise.

Our boards are configured to trip at 130Amps of unbalance, and take around 0.3 seconds to trip, which is configurable in /hwconf/hw_axiom.h

#define HW_MAX_CURRENT_OFFSET            620    // More than this offset (0.5 Vdc) trips the offset fault (likely a sensor disconnected)
#define MCCONF_MAX_CURRENT_UNBALANCE        130.0    // [Amp] More than this unbalance trips the fault (likely a sensor disconnected)
#define MCCONF_MAX_CURRENT_UNBALANCE_RATE    0.3    // Fault if more than 30% of the time the motor is unbalanced

Here's a quick video showing a fault:

VESC Tool GUI showing the FAULT:

Our commits came with this protection disabled to the rest of VESC hw versions, but it was soon added to all the hardware variants!

Discussions