Open flytrex-vadim opened 2 years ago
What esc are you using?
v4 hardware is a Maytech's MTVESC50, and v6 is our own board design based on VESC6 MK2 schematics. It appears that both those designs have a current sense RC constant around 0.5us. I've now tried increasing the time constant to around 15us, in line with latest v6 mk3-5 designs, and it seems to have improved the situation greatly. Reported currents are now positive with most motors.
The situation with Faulhaber BP4 is a bit more involved: its inductance is so low (electrical time constant ~100us) that a much higher switching frequency would be needed. Since the CPU only seems to support up to ~50KHz or so, I'm experimenting with adding series phase inductors to reduce ripple.
Edit: it might be worthwhile to add a popup notice to vesc_tool when a discrepancy between detected R, L and switching frequency is detected. Similar to how MTPA suggestion pops up when significant saliency is detected.
Any ideas on how to approach investigating this further would be greatly appreciated.
Setup
seeing this on both 4.10 and 6 hardware configs, FW versions as new as 5.03 and as old as 3.40. Motors: TMotor MN series outrunners (4010, 5012, 601) and Faulhaber BP4 inrunners Power: 6S Li battery Control mode: speed control Load: none
Expected behavior
match between reported current values and ampere-meter readings. positive current and power values for drive quadrants, negative for generating quadrants.
Observed result
reported current is very different from measured, the discrepancy varies with RPM. For some motors (especially inrunners) the reported current is negative for wide ranges of speed. This causes all current limiting functionality to be nearly useless.
What I tired so far
Plots
MN5012 motor - RPM sweep reported current drops at high RPM![sweep mn5012](https://user-images.githubusercontent.com/20318135/187233958-e7c23e9c-9e0a-4c9d-a5d0-8bbe35e1f37f.png)
BP4 motor - RPM sweep reported current is negative![sweep fhbp4](https://user-images.githubusercontent.com/20318135/187233998-5e802622-7ef5-4220-8169-39879ff3ef10.png)