You are here

FOC current oscillation at max. speed

11 posts / 0 new
Last post
ProgramThyself
Offline
Last seen: 4 months 2 days ago
Joined: 2020-07-24 01:10
Posts: 16
FOC current oscillation at max. speed

My VESC 6 produces 0.8 Hz current oscillation on level ground with FOC at max speed.  I've tweaked the Observer Gain from the default 17.8 to 9 and 35.  I think 35 was worse, but 9 didn't fix it and I feel like I'm tapping in the dark.  Maybe someone has seen this behavior and knows the cure?  Also, oscillation feels stronger when the battery is full (41 V) vs. 37 V.
Graph: https://drive.google.com/file/d/1aL6uHTLh7DKKssmymKluiNru4ylQOFF1/view?usp=sharing

Edit: 25 km/h = 28k eRPM

ProgramThyself
Offline
Last seen: 4 months 2 days ago
Joined: 2020-07-24 01:10
Posts: 16

Some more data on oscillations and low frequency Iq noise is on this graph:

https://drive.google.com/file/d/1cm17Hse7MOpzJU78ezy696mTAWaCm_Kv/view?usp=sharing

The 2020-08-09 curve is the G=35 oscillation from earlier, with noticeable peak at 0.8 Hz and large Iq variance.  All data was recorded on flat and mostly smooth surface with the last on a 400m track.  The best performance (lowest Iq variance on a level ride at max speed) so far is with "v0 v7 sampling" on and G=10 (observer gain).  To me. the ride still feels like there is a bit of excess forward-backward yo-yo acceleration, but maybe this is inevitable with FOC?  I'm not sure.  I should probably compare power spectra from the IMU for different control modes.

It's nice that so much log data is recorded.


Writes: Firefly blog

thewho
Offline
Last seen: 2 years 1 month ago
Joined: 2018-07-19 10:02
Posts: 37

I don't know what could be wrong, but my bike with 4.12hw (foc) is completely stable at full speed at least.

O.G at 1.5, but that's with a hub motor.

ProgramThyself
Offline
Last seen: 4 months 2 days ago
Joined: 2020-07-24 01:10
Posts: 16

How did you arrive at O.G=1.5 ?  Mine is also a hub motor (12" wheel diameter with 8.1x reduction gear).  Thanks.


Writes: Firefly blog

salinzki
Offline
Last seen: 3 years 1 month ago
Joined: 2020-08-18 21:15
Posts: 1

warum bekomme ich kein e-mail mit dem download link von vesc? Immer wenn ich auf auschecken gehewird es aus dem warenkorb gelöscht

thewho
Offline
Last seen: 2 years 1 month ago
Joined: 2018-07-19 10:02
Posts: 37

Mine is a direct drive motor in a 20" wheel. Vesc wanted 3.5ish for O.G, but after reading this https://vesc-project.com/comment/4238#comment-4238 thread I tried lowering the O.G and it seems smoother. But it's not night and day difference so I could be mistaken. It's not worse for sure.

district9prawn
Offline
Last seen: 1 year 6 months ago
Joined: 2018-04-26 12:18
Posts: 123

Have you tried playing around with the PI loops?

ProgramThyself
Offline
Last seen: 4 months 2 days ago
Joined: 2020-07-24 01:10
Posts: 16

thewho:  I will play with Observer Gain some more, but 10 might be ok for my setup.  I can't be sure that there is oscillation or noise peaking at this point.  At some point, I'll revert to the stock KT-S06 BLDC controller and look for a difference, perhaps recording accelerations with my phone.

Interesting that you linked to a thread where there was a mishap due to unexpectedly strong braking after coast.  The same thing happened to me today while logging data.  I was coasting downhill with a little more speed than the drive can normally produce, and started regen braking a bit.  The actual brake was a lot stronger than requested!  There was no crash, but the sudden braking pulse impressed a certain respect for what could go wrong.  My settings have max regen current of -11.6 A and max brake current of - 33A.  The graph shows actual regen current of -37 A, and phase current of -52 A.  Hardware is original VESC 6 MKIV.

https://drive.google.com/file/d/1D5ubzv8y31OpDeS496Ngf6iAxujVAgwt/view?usp=sharing

district9prawn:  No, I haven't tried the PI loops yet.  Do you have any suggestions?  As I wrote, I'd like to get a performance baseline before tweaking further.  I don't want to get lost in some high-dimensional parameter space.


Writes: Firefly blog

district9prawn
Offline
Last seen: 1 year 6 months ago
Joined: 2018-04-26 12:18
Posts: 123

Try halving or doubling the current Ki and Kp. You are using current mode control right?

Playing around with the observer gain is probably more useful if the controller is losing track of the motor, which doesn't seem to be the case.

ProgramThyself
Offline
Last seen: 4 months 2 days ago
Joined: 2020-07-24 01:10
Posts: 16

distric9prawn: Yes, it's current mode.  Since raising observer gain to 35 caused clear oscillation at the frequencies I'm trying to address, that seems like a good parameter to tweak.  But now with O.G. = 10 and v0 v7 sampling on, it's hard to distinguish controller-induced perturbations from what normal undulations in the pavement might produce.  Nevertheless, there is a small but distinct peak at 2.9 Hz with O.G. = 10 in the power spectrum that I linked to.  

Thanks for the suggestion on current control Ki and Kp.  I'll tweak more parameters when there's an opportunity.  The forwards/reverse ADC app you posted is working great.  Thanks again for that!


Writes: Firefly blog

SRFirefox
Offline
Last seen: 1 month 9 hours ago
VESC Free
Joined: 2018-12-13 20:27
Posts: 2

I had this issue with an exceptionally high inductance PMSM (>1mH). I found that the inductance reading was a little low, and that increasing the current proportional gain and decreasing the observer gain, the motor stabilized under no-load. Still working on load testing. I use the same LCR meter Benjamin uses in his 75/300 videos to check and set my inductance for the FOC parameters. During my tweaking, I needed to triple the proportional current gain and reduce the observer gain by an order of magnitude. I'm still working on my understanding of the system to know if this was the right thing to do, but so far it produces a system that tracks current well, hits RPM setpoints quickly, and doesn't oscillate at high duty cycles while in current control mode.