You are here

FOC Motor Detection Values Incorrect, PID Tuning Advice?

1 post / 0 new
Last seen: 12 months 2 days ago
Joined: 2020-07-01 08:23
Posts: 2
FOC Motor Detection Values Incorrect, PID Tuning Advice?

Hello! Apologies if this belongs in the 3rd party area, I am not sure if the issue is hardware, software or some combination. I am running a Maker-X FOC Mini (HW Version "60" in VESC Tool). It is communicating properly and successfully updated to FW 5.1. I can get my motor running, just not very well or consistently.

The motor I am driving is a 48V brushless inrunner with Hall sensors, rated for 1800W and 4400RPM, intended for an e-bike. That's about all the info it has available sadly. The thing weighs around 10lbs, and I rebuilt it with better SKF bearings since I had to take the rotor out to machine the shaft to take a v-belt pulley. My application is actually a variable-speed conversion on an older Delta drill press, so my aim for how to tune things is a bit different than bikes and skateboards. I am not using batteries here; power is from a 48V 31A PSU.

Anyway, I did a 4-wire resistance measurement on the windings at the connectors, with all three pair combinations showing ~42 mOhms, so individual windings are on the order of 21 mOhms. When I run detection I get a variety of results. When using the wizard, I typically get ~16 mOhms, 0 uH, ~20 mWb. If I use the slightly more manual detection tools under Motor Settings >> FOC, I sometimes get those values, but I mostly get 120-280 mOhm, 17-50 uH, 4-20 mWb. When it detects the ~16 mOm value and 0 inductance, it won't run flux linkage detection. When it detects the higher values, flux linkage detection seems to operate smoothly. Also of note, I cannot get BLDC mode to detect successfully or run at all.

When I go with the 16 mOhm / 0 uH / 20 mWb values, I can usually get the motor to run (with Kp = 0.075, Ki = 0). However, changing to even 21 mOhms (which I think is the "real" value) results in a motor that will not start at all, and obviously the 100+ mOhm values are a no-go as well. So before I worry too much more about PID speed tuning and whatnot, I think I have some more baseline issues to work out first, and I need some help for sure since a few hours of messing around has not yielded any real improvement. I am having the most luck in Sensorless mode, as using the Hall Sensors seem to make the motor run "rough" and not always start.

The wires between the Mini FOC and PSU are ~2.5" long, and the wires between the Mini FOC and motor are ~36" long. The motor wires are all sort of bundled together, but there are no shorts between the connectors.

I am aiming to run the motor in PID Speed mode with ADC1 as the main input (3.3V fed to a 3 terminal potentiometer, wiper connected to ADC1). It's a drill press, so I want to set speed with the potentiometer (and a 3D printed faceplate with delimiters and RPM markers) and control on/off with a switch which simply opens the 3.3V connection to the potentiometer (so ADC1 gets pulled to ground, which is mapped to 0% input). I have set all braking currents to 0A since the PSU can't sink current, and set the various voltage and current limits to avoid issues from those.

My issues so far are that the motor does not always start when I increase ADC1 voltage (via potentiometer), making cogging noises and then doing nothing, sometimes not returning to a stop when I turn the potentiometer all the way down to 0. These issues also occur sometimes when I disable ADC input and just run it from VESC Tool via the buttons in the bottom-left.


Thanks, any help is appreciated!