john61ct said:From Amberwolf, elsewhere and closely paraphrased:
Per-phase current sensing is required for FOC
though it is not required for sinusoidal control
_____
but I thought true FOC was possible completely sensorless?
everythingisawave said:Sensorless control methods can vary, but in general all three phases are producing some level of pulsating power, but once again it's more useful to think of the sum effect of the three phases as producing one rotating magnetic field vector that pulls the rotor magnet along.
Hummina Shadeeba said:is that an fzr bike?
was wondering if with foc could possibly have a higher max torque output before saturating if more teeth are producing torque at once instead of 2/3rd the teeth.
Ianhill said:Vesc is the best way to view its code for a beginner and from there a basic understanding of electrical principles and formula to read whats going on.
mxlemming said:Ianhill said:Vesc is the best way to view its code for a beginner and from there a basic understanding of electrical principles and formula to read whats going on.
Just no.
If you want to understand FOC, stay away from VESC. Far far away. I've written FOC from scratch, using wikipedia as my only reference. I was not able to make sense of or use a single line from the VESC project.
By contrast, stancecoke lishui foc is easy to follow but less complete, the o-drive code is trickier since it's all c++ not c but way easier to follow than VESC.
You can also flip through the ST and Infineon libraries. They're enormous, but at some point you realise that actually the FOC part is truly tiny and the bits that sit between ADCs reading current and writing the pwm values is only a small handful of simple math functions, with a million different headers piling in to deal with edge cases.
The messiness of the VESC code seems to have lead lots of people to think FOC is impenetrable. It's not. It's 50 not very complicated lines of code.
Ianhill said:Im coming from an engineers point of view understanding the method as a whole enough to make use of the programs you help write,
Hummina Shadeeba said:Ianhill said:Im coming from an engineers point of view understanding the method as a whole enough to make use of the programs you help write,
you plug it in
Hm, it's fully working . But of course some features like field weakening or detection of motor inductance and resistance are not implemented. I don't need this features :lol:mxlemming said:By contrast, stancecoke lishui foc is easy to follow but less complete
stancecoke said:Hm, it's fully working . But of course some features like field weakening or detection of motor inductance and resistance are not implemented. I don't need this features :lol:mxlemming said:By contrast, stancecoke lishui foc is easy to follow but less complete
It has a user friendly GUI with an up to date wiki to set up your system. It should be usable even for people with no computer skills :wink:
And it works with cheap and widely available China hardware, that is used by many european Ebike OEMs like Prophete, Fischer, NCM...
regards
stancecoke
marka-ee said:I see the constant dribble of tech issue posts on that thread as an indication that it's not mature yet.
No, it uses exactly the same third harmonic injection waveform normally, that is implemented in the open Kunteng firmware also.marka-ee said:Does the ultimate FOC implementation modify the shape of the sine wave being generated?
mxlemming said:Ianhill said:Vesc is the best way to view its code for a beginner and from there a basic understanding of electrical principles and formula to read whats going on.
Just no.
If you want to understand FOC, stay away from VESC. Far far away. I've written FOC from scratch, using wikipedia as my only reference. I was not able to make sense of or use a single line from the VESC project.
By contrast, stancecoke lishui foc is easy to follow but less complete, the o-drive code is trickier since it's all c++ not c but way easier to follow than VESC.
You can also flip through the ST and Infineon libraries. They're enormous, but at some point you realise that actually the FOC part is truly tiny and the bits that sit between ADCs reading current and writing the pwm values is only a small handful of simple math functions, with a million different headers piling in to deal with edge cases.
The messiness of the VESC code seems to have lead lots of people to think FOC is impenetrable. It's not. It's 50 not very complicated lines of code.
marka-ee said:Yes, I guess. So is that really what the FOC is doing, just moving the hal timing a little to compensate for the current lag? Boiling it down to the simple here. Does the ultimate FOC implementation modify the shape of the sine wave being generated?
The 'field weakening' still eludes me. Maybe field weakening involves more than a timing change ( read: phase change ) and actually changes the shape of the output to the motor phase wire.
So in summary: FOC at first approximation is nothing more that optimized hal timing. That I can code and to hell with the vector theory. None of this interests me if it does not increase range or speed measurably.