True FOC: definition and examples

Yes bldc are frequency controlled, the voltage caps the peak of the sinusoidal wave and there has to be enough capacitance in the circuit so the current does not lag the voltage by too much as thats where bad efficency starts to happen such as the fets case will be passing alot of current as heat.

Its the current in the circuit that will lock the rotor to the voltage sinusoidal wave as theres increased load on the motor the current must rise to keep the lock or a bad power factor can occur which is alot of heat created some where with poor efficency and worse case a stall can occur.

A motors stall current is always low at that point theres no rpm as the motor turns it builds up a back emf that opposes the current your trying to push.

So a stalling motor will want to pull alot of current but its limited in its ablity to oppose it or cool itself but a high spinning rpm motor we will want to push more current at it but the back emf will be too strong and limited the current.

Thats how dc motors worked off a battery with no controllers in the early days just a variable resistor to limit the rpm exactly like the analog scalextric systems but over time mosfets have taken over then we had pwm signals and full h bridge motor drives

Induction motors are frequency driven too so the controller advancments led to bldc been implemented i think but all that happened before i was born so jits obsolete and a cars inverter setup is where its at all the setup in that is whats needed to be understood.

Alio and his build threads offer loads of interesting stuff on mosfet ringing and lots of hidden gems to show that in reality a cintroller is best tuned to its motor like a speaker and its crossover without over spec redundancy built into it.

Theres been many a vesc thread thats ended with problamitc results even for circuit based engineers.
 
John in CT

You could just probably just go to the university/college and buy books from their book store on motors, they are expensive and over-priced as its a money maker for the schools.

You can 100% trust that info, then piggy backing on someone elses skimming methods to earn a buck on youtube, unless you find a yt channel with an actual engineer. The only channel I really liked, that covered a few things here and there from an arm chair guy with dyslexia but who seems to travel the world in his job, YT channel - AvE. Then there is one called EE or something, lemme see what comes up, yeah well I was close - Engineering Explained. Not sure if he is a wanna-be arm chair enthuisist or an actual, working, engineer. I got off track inserting that prev bit.

Better yet, to save a few bucks those same univ/college have used book stores, you save a bit of money but not the savings you would score if you found the same book in a retail used book store on the streets.

Obviously, do not forget about Amazon. Surely theres lots of books on there, remember that was Jeff's original business plan, the first thing he was selling. Now with his influence in movie making and shit, I'm sure theres even more books on there though I have no clue, I bought a book or two from non space traveller, low earth orbitor where a thousand have been before..... Jeffy B.

Getting into the specifics of why, isn't what I am into. Better time spent elsewhere. But like you, I like to learn, the only thing I've been thinking about is taking a welding course but I have no facilities or 240V outlet, just an unused welder that I did one bead on. Another, car mechanics. Paint, autobody no way jose. Damn off track again.

But if I were to do what you wanted, maybe thats a route to take, univ/college books is a good way.

BTW before covid, some school did online learning. With covid, there are a lot more, but its not in any way cheaper thats for sure.

Do you want a certificate, diploma or something out of your learning?
Do you want to spend money and take a course or just get the course outline, main titles and sections and go from there? Thats what I'd do, but hey I am cheap.

Electrical motors would def be a course somewhere.

Also, the other good news is, there are satellite univ/colleges. For example, Seattle has a Univ in Calgary, Alberta, Canada, and the local Univ here, U of C has the same elsewhere, along with the Tech college.

Whats your interest in making your own controller?
 
No I'm not looking for credentials just practical knowledge and establishing my own understanding.

It is not convenient to go physically browse in uni bookshops, sounds more archaic than recommending Napster for music :cool:

Full online courses as you say even MIT level lectures, everything of course is available online, even if boycotting Amazon as I in fact try to do.


At this point just asking for the right keyword / phrasing to identify the right programs / courses

then I'll reverse engineer (hehe) the prerequisites to study prior e.g. undergrad maths

Using **Power Electronics** I found these:

MIT Open
https://ocw.mit.edu/courses/find-by-topic/#cat=engineering&subcat=electricalengineering&spec=electricpower

https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-334-power-electronics-spring-2007

NPTEL
https://onlinecourses.nptel.ac.in/noc19_ee37/preview

Udemy
https://www.udemy.com/topic/power-electronics

Coursera
https://www.coursera.org/specializations/power-electronics

and lots more of course (hehe)
https://www.google.com/search?q=%22power+electronics%22+Course+OR+textbook

However, although I'm sure these topics are excellent intermediate / foundations, they do not have much focus on electric motors and controllers specifically
 
Analysis of Electrical Machinery, Paul C Krause, McGraw-Hill
Sensorless Vector and Direct Torque Control, Peter Vaas, Oxford University Press
Vector Control of AC Drives, Ion Boldea & Syed A Nasar, CRC Press
Control of Electric Drives, Werner Leonard, Springer

To the best of my knowledge, they were among the most authoritative text in the relevant field (referred in IEEE transactions etc.) while I was doing masters in Electrical Engineering (that time is around 2004 though, :wink: )
Caveat: Most of my work so far has been on the software side, mainly Linux Kernel.
 
Wow, excellent, thanks very much.

Can you suggest forums where those conversant with this academic niche hang out online, students and/or practicing pro's?

And which freelancing sites are used by guns for hire?
 
john61ct said:
Can you suggest forums where those conversant with this academic niche hang out online, students and/or practicing pro's?

There were no technical forums that I was aware at that time (> 15 years back), for us it was mostly direct conversations between professor's, students, visiting faculties etc. especially during seminar's & so on, so direct answer to your question is I don't know.

One option that comes to my mind is to read the relevant IEEE transactions to get a feel of the latest happenings in the field (but I don't even remember the relevant IEEE journals now, though I still have the copies taken during my studies, they are currently around 200km away from me, if required I will check & find out which are the journals when I go next time there) & then take the clues from there and continue.

john61ct said:
And which freelancing sites are used by guns for hire?

Here too I am unable to help you, after studies, have worked only very little in electrical engineering related (had been a software engineer for the most part) and have lost that kind of an atmosphere.

It is only recently that I started to work practically in motor control and many here in E-S know much better than me.
 
No worries, public forum request To All, lurkers may come by in coming months

Thanks again
 
Lishui project note

https://endless-sphere.com/forums/viewtopic.php?p=1685475#p1685475
 
https://endless-sphere.com/forums/viewtopic.php?p=1687334#p1687334

qwerkus said:
john61ct said:
and VESC is said to be the best FOC implementation
Not true. Check out mxlemming or other controller build. vesc foc imprlementation is ONE possibility optimized for e-sk8tes, there are many scenarios where you can actually get a more efficient system. In my opinion the code has becomes bloated a needs a rewamp with modularization in mind.

For an instance, I have ran a vesc controller and a cheap lishui controller - both with foc implementation - on a test bench plugged to a 500w geared hub. The lishui controller used less power to achieve the same speed. Could be many reasons, but worth noticing.
 
john61ct said:
https://endless-sphere.com/forums/viewtopic.php?p=1687334#p1687334

qwerkus said:
john61ct said:
and VESC is said to be the best FOC implementation
Not true. Check out mxlemming or other controller build. vesc foc imprlementation is ONE possibility optimized for e-sk8tes, there are many scenarios where you can actually get a more efficient system. In my opinion the code has becomes bloated a needs a rewamp with modularization in mind.

For an instance, I have ran a vesc controller and a cheap lishui controller - both with foc implementation - on a test bench plugged to a 500w geared hub. The lishui controller used less power to achieve the same speed. Could be many reasons, but worth noticing.

I'm flattered, but as of right now, I am making no claims my FOC implementation is better than VESC. The other obvious candidate to beat VESC is the Nucular, and of course the many commercially integratable examples (ST, TI, Infineon,) and ones embedded into controllers (ASI aka phaserunner and others, though I've no experience with the various Chinese ones like Sabvoton, Kelly etc).

I get as good efficiency, I've observed slightly better in very unscientific "how much battery is left after a commute to work" but really there isn't and shouldn't be much difference once the FOC is implemented correctly; the margins probably come from use case mainly, and VESC tends to have pretty aggressive throttle response.

I've had some experience similar to qwerkus' and speculation for a while that the VESC observer might lag slightly resulting in more Id and less torque per amp since the FOC loop is clearly working well and produces very sinusoidal response but there's no way I can be sure of this.

VESC has a whole host of features I haven't implemented. Hopefully this soon includes MTPA and Field weakening. Development is very active on it at the moment. My code meanwhile is a bit of a mess and entirely for my own learning.
 
mxlemming said:
and of course the many commercially integratable examples (ST, TI, Infineon,)

we are working on a firmware for the cheap and popular M365 and G30 scooter controllers. It implements the ST Motor Control Workbench FOC-code and uses the VESC-Tool for configuring, autotuning and realtime data plotting. It can be ported to other commercial controllers using the STM32 F103 processor like Lishui or Ananda quite easily, I think :)

https://github.com/Koxx3/SmartESC_STM32_v2

regards
stancecoke
 
stancecoke said:
mxlemming said:
and of course the many commercially integratable examples (ST, TI, Infineon,)

we are working on a firmware for the cheap and popular M365 and G30 scooter controllers. It implements the ST Motor Control Workbench FOC-code and uses the VESC-Tool for configuring, autotuning and realtime data plotting. It can be ported to other commercial controllers using the STM32 F103 processor like Lishui or Ananda quite easily, I think :)

https://github.com/Koxx3/SmartESC_STM32_v2

regards
stancecoke

How are you doing motor auto setup? My experience with st workbench was that you had to set up every motor through the tool with one of their dev kits, and it scrambled the parameters into things not really recreatable by you.

The repo seems to just contain the st tool.

I do however think it's possible, believe that's what Nucular did. (I base this on early videos vasili posted with the motor control workbench in the background).

The end result is fantastic efficiency, smoothness and it's very good at looking after itself... Was not able to get it to kill FETs where Infineon will quite happily let you cremate your board of you ask it to.

But I found the sensorless startup was complete shit on st, you'd say it to 10A and it wouldn't push any amps before declaring failure and could quite easily get itself into a state where it's sitting there vibrating thinking it's spinning...
 
mxlemming said:
How are you doing motor auto setup?

@netzpfuscher is the main developer on the v2 project.
He copied the routines from the VESC mainly. See his commits from Nov.11 and the days before:
https://github.com/Koxx3/SmartESC_STM32_v2/commits/vesc_comp

mxlemming said:
But I found the sensorless startup was complete shit on st
Sensorless is not supported yet.

regards
stancecoke
 
stancecoke said:
mxlemming said:
How are you doing motor auto setup?

@netzpfuscher is the main developer on the v2 project.
He copied the routines from the VESC mainly. See his commits from Nov.11 and the days before:
https://github.com/Koxx3/SmartESC_STM32_v2/commits/vesc_comp

mxlemming said:
But I found the sensorless startup was complete shit on st
Sensorless is not supported yet.

regards
stancecoke

This is a really good project. ST FOC with VESC interface is potentially some kind of panacea. All the setup and logging goodness with FOC code that (might) not savage hardware.

Hope it runs well on VESC based hardware...
 
Ok, I need to go back and revisit the st FOC library, looking through the code in that repo there are huge fundamental changes since I last looked in early 2020. Might be a whole lot easier to work with now.
 
yes, there are no precompiled libraries any more, so the code is better understandable and now even editable!
But to be honest, I've not tried to understand what happens where so far :shock: . I just compiled and tested @netzpfuschers code on my testbench...

regards
stancecoke
 
Wow, great stuff.

Above my paygrade Q but

rather than striving for one-size fits all types

what if a project started out targeting just one known-good value motor?

say QS 138 70H 3000W

(does that string even specify just one model? I hate QS does not do unique model#s)

Get a hardware prototype out quick on a break-even basis, user can update to release points if needed.

Take donations or even charge for consult/changes and programming assistance.

Once solid then see what motors can easily get added that will be popular.

Full new-start iteration on the hardware can come later, make them inclusive of the old, try to keep the software side from forking too much...

Am I off base, or would this break-quick/fix-fast model get functioning systems out in the world quicker?
 
Fixing to one type of motor doesn't really help overall.

Hardware that works well on one will usually work well on another of similar characteristic.

Software is more specific and finnickety.

Some motors are just hard. Low inductance ones especially.

There's only limited buttons a controller hardware has to push with a motor... Volts, amps and switching frequency. Beyond that, controllers compete on size, reliability and software.
 
I came across this,

https://endless-sphere.com/forums/viewtopic.php?p=1458520#p1458520

Vadim claims his latest model can run in FOC mode.

Feedback welcome
 
john61ct said:
I came across this,

https://endless-sphere.com/forums/viewtopic.php?p=1458520#p1458520

Vadim claims his latest model can run in FOC mode.

Feedback welcome

It's VESC by any other name as far as I can see, so it'll be true FOC and have all the greatness and pain that comes with VESC. Seems he made another app for it, hopefully simplifying things down to the reliable basics needed for ebike.

Looks like a nice enough implementation from what I've seen posted, 24x150V TOLL FETs on an IMS board is going to shift some serious power and the drivers and current sensors look decent. Never really know without probing and close inspection though.
 
Great, thanks.

Apparently his previous units were more Sabvoton based, that would not be VESC right?

Violating the FOSS licensing would be a big red flag for me.

mxlemming said:
Seems he made another app for it, hopefully simplifying things down to the reliable basics needed for ebike.

Apparently he just cloned and relabeled someone else's Android app.


 
@casainho started to make the EBiCS FOC code universally usable with any mikroprocessor:
https://github.com/OpenSourceEBike/Motor_FOC

regards
stancecoke
 
john61ct said:
Great, thanks.

Apparently his previous units were more Sabvoton based, that would not be VESC right?

Violating the FOSS licensing would be a big red flag for me.

mxlemming said:
Seems he made another app for it, hopefully simplifying things down to the reliable basics needed for ebike.

Apparently he just cloned and relabeled someone else's Android app.

There are plenty of lawyers chasing this ambulance, I wouldn't worry about it.

I looked more into what Vadim did, obviously without the device or code I can't say, but the extent of his mods and not backward compatibility are sufficient that one could reasonably anticipate that everything GPL COULD have been stripped out; that is:
Blackmagic removed
Chibios reimported with a commercial or apache licence
All the ST code that runs the hardware itself if BSD or ST Ultimate liberty...
And at what point is the VESC code no longer GPL able? to implement field weakening and battery charging through motor phases, there will have to be massive changes to the main VESC FOC loop. I have no idea the extend to which it's been modded, but Vedder has a lawyer on this stuff I am sure is busying himself investigating. Maybe he is ripping it off, maybe not.

Sabvoton is not VESC. Sabvoton I believe does run FOC on some of their controllers.
 
wrt PowerVelocity FOC

Apparently something happened to Vad

or he has gone into hiding

https://endless-sphere.com/forums/viewtopic.php?p=1699324#p1699324
 
Looking for feedback on "Far Driver"

are they true FOC?

https://endless-sphere.com/forums/viewtopic.php?p=1705858#p1705858
 
Back
Top