FOC settings configuration

Discussions regarding the Field Oriented Control (FOC) implementation on the VESC.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
anttok
Posts: 5
Joined: 28 Jun 2018, 21:36
Location: United States
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

FOC settings configuration

Postby anttok » 14 Aug 2018, 17:09

Hello everyone,
First of thank you Benjamin for your great work on the vesc, I've been running my board on it in BLDC mode for a few months then decided to try FOC and I don't want to go back!
The R and L detection went without any issue and produces consistent results on repeat tests. To get lamda it was necessary to lower the current from 5A down to 1A (I get different values depending on current used, is this supposed to happen?).
After writing those values to the vesc the motor can start and spin with on the test bench using keyboard controll.

However under normal riding conditions the motor stalls under certain conditions, with about half second of groaning from the motor, followed by chugging (another half second), and lock up that throws me of the board (I presume its observer getting out of synch) . This is seemingly caused by exceding certain load (or current?) as I can cruise on relatively flat ground with no issues(silent and feels great!). I can ascend a slight incline that was not a problem in BLDC, but (strangely) only if I engage it at low speed, if I start the ascent with more then 10 mph of speed, the motor stalls. Additionally pump carving (which accelerates the board) while at constant throttle also causes a stall.

SO FAR:
I tried adjusting the observer gain by half, and then half again, as well as doubling it. Halving helped a bit (I was able to climb slight inclines), but could not eliminate the problem. I also tried decreasing the time constant to 500 µS. I tried connecting the sensor wires, no luck.

I'm runnig a 75 kv single hub on a 6s3p battery (I'm not expecting high top speed).
BLDC works fine.
Can anyone suggest a course of action?

Will post screenshots of VESC tool settings when I get home.

pf26
Posts: 310
Joined: 28 Mar 2016, 14:37
Location: FR Valence
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: FOC settings configuration

Postby pf26 » 16 Aug 2018, 12:09

With a 1amp current, I fear you have too much noise in the measurements, so the results are unreliable.
You probably should try with the higher current that still gives a result for lambda.
What are the values found for R and L ? Do they seem to correspond to your motor specs ?

anttok
Posts: 5
Joined: 28 Jun 2018, 21:36
Location: United States
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: FOC settings configuration

Postby anttok » 04 Sep 2018, 13:22

Still struggling wit this. I'm getting significantly lower torque in foc then BLDC. I fly up hills in BLDC i can't even touch in foc at any speed. Is this normal? I've read contradictory posts regarding relative torque in the two modes.
I tried increasing the amps during auto detection to 2 and was able to get a result using higher amperage as suggested, but i get consistently similar values. These are my settings at the moment.

Vesc_fox_Settings_01.jpg
Vesc_fox_Settings_01.jpg (177.24 KiB) Viewed 3556 times

pf26
Posts: 310
Joined: 28 Mar 2016, 14:37
Location: FR Valence
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: FOC settings configuration

Postby pf26 » 04 Sep 2018, 17:58

Your measured inductance seems surprinsingly low to me.
Do you have more info on the motor ? When run in BLDC in full load, how many Volt/Amps do you use ?
Possibly your Vesc has a faulty current measurement (which does not affect the BLDC mode too much). You could check the Current samples. Or try with another Vesc if you have.

anttok
Posts: 5
Joined: 28 Jun 2018, 21:36
Location: United States
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: FOC settings configuration

Postby anttok » 04 Sep 2018, 18:12

This is the motor, 70mm:

http://www.diyeboard.com/hub-motor-7051 ... p-521.html

I'm not sure about the amps/volts at load, as I don't know how to get that info while riding.
I have another vesc I could try...

pf26
Posts: 310
Joined: 28 Mar 2016, 14:37
Location: FR Valence
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: FOC settings configuration

Postby pf26 » 06 Sep 2018, 09:00

I think this motor is wound with many turns, so it requires relatively high voltage/low amp (someting like 30V-10Amps for 300W output near top speed).
The original VESC works better in FOC mode for higher amps. I fear it is necessary to increase the Shunts (quadruple ?) and the firmware accordingly, so you get better current measurements.

anttok
Posts: 5
Joined: 28 Jun 2018, 21:36
Location: United States
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: FOC settings configuration

Postby anttok » 06 Sep 2018, 17:05

I think doing that is quite beyond my abilities. This being a pretty standard Hub motor, are there any possible alternative ways of getting the calibration measurement? or are you talking about the ongoing measurements required during operation?

Is it possible FOC requires a higher volt battery? mine is maxed at 25V (6s3p) which is the minimum rated voltage for the motor.

Guillaume227
Posts: 3
Joined: 03 Jun 2017, 16:11
Location: France
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: FOC settings configuration

Postby Guillaume227 » 13 Oct 2018, 09:05


pf26
Posts: 310
Joined: 28 Mar 2016, 14:37
Location: FR Valence
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: FOC settings configuration

Postby pf26 » 14 Oct 2018, 14:31

I think it is something like +/-165Amps (current is sinusoidal, so can be negative or positive, and measured relative to Vreg/2).
You probably need this to drive motors up in the 100+ Amps peak current to get torque at startup..

Guillaume227
Posts: 3
Joined: 03 Jun 2017, 16:11
Location: France
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: FOC settings configuration

Postby Guillaume227 » 15 Oct 2018, 18:02

Thank you pf26, my bad: I omitted the fact that following do_dc_cal() we do adjust the current for it's mean value giving us this +- 165 range.

I also found that thread on the other forum, which correctly distinguishes betweem peak and RMS.
https://www.vesc-project.com/node/88

What the ADC sees is peak current.
So it makes sense to have 100 A as the max RMS current given that the peak current can exceed that and that we need an accurate ADC read up to +-165A for the observer update.

(having two forums is so confusing)


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Return to “FOC”

Who is online

Users browsing this forum: No registered users and 9 guests