Sensorless From Standstill (SFS) explained

Lebowski

10 MW
Joined
Jun 27, 2011
Messages
3,412
Location
beautiful Zurich, Switzerland
The pdf attached to this first post describes the technology necessary to build a sensorless FOC controller that can run a motor from standstill or a cold start / reset with full torque. The algorithm it uses to find the rotor phase delivers a continuous rotor angle, not just 6 steps like you get from hall sensors. It can be used to replace a sin/cos sensor.

The pdf contains quite some math, but the method is very 'graphics' based and is hopefully also understandable without the math. The math is necessary though if you want to play around and try to code your own version.

Page 5 to 10 is the TL;DR...

The development of this tech was covered in https://endless-sphere.com/forums/viewtopic.php?f=30&t=94865&p=1389515#p1389515

A video of a BLDC drill running at full torque (pulling through the highest ratched clutch setting), fully sensorless and using the algorithm: (The screw is 14 cm long and if I remember correctly 8 mm thick, drill runs at 50 A amplitude phase current)
[youtube]8Xz3RIYyQIQ[/youtube]
 

Attachments

  • SFS_algorithm.pdf
    963.7 KB · Views: 510
Hi Bas,

Thanks for releasing this, very interesting read.
I thought you wanted to sell this IP, What made you change your mind?
 
nieles said:
Hi Bas,

Thanks for releasing this, very interesting read.
I thought you wanted to sell this IP, What made you change your mind?

I've never really been sure about the legal situation of selling this technology. Because I don't know the motor control literature I cannot be sure the basic idea is not patented already. And then selling it would put me in a legal mess. This can be figured out of course by a patent attorney but that would be too expensive for me.

Also, to me the whole idea is very obvious, and I was afraid it would get reverse engineered if I would show it to a company. The PWM signals not being center aligned is very easy to spot on an oscilloscope... I would be able to reverse engineer it from just that.

I thought about building a controller IC around it but that to me is just a lot of work, it would be a repeat excersize and not be interesting for me. Now if you have a controller business going on that's a different matter, but for just selling controller IC's for me it was not worth the effort. Plus again it would show the PWM signals, get reverse engineered etc etc.

My idea now is that by spreading this pdf around I hope the technology, if not patented already, becomes unpatentable and will remain in the public domain. Meaning we (EV hobbyists) can keep playing around with it. This is also the reason the pdf mentions many untested alternatives, to make those unpatentable as well.
 
This is magic.
I always thought the straightforward method would be to modulate the voltage amplitude (i.e. duty cycle) from PWM cycle to cycle and obtain the position from the changing currents, but your algorithm is very different.
 
Nice lebowsky!

kind of reminds me of https://ieeexplore.ieee.org/document/7499401

But without reading all the papers comming up with this :bigthumb:


full respect!!
 
Lebowski said:
My idea now is that by spreading this pdf around I hope the technology, if not patented already, becomes unpatentable and will remain in the public domain. Meaning we (EV hobbyists) can keep playing around with it. This is also the reason the pdf mentions many untested alternatives, to make those unpatentable as well.

:bigthumb:
 
Lebowski said:
nieles said:
Hi Bas,

Thanks for releasing this, very interesting read.
I thought you wanted to sell this IP, What made you change your mind?

I've never really been sure about the legal situation of selling this technology. Because I don't know the motor control literature I cannot be sure the basic idea is not patented already. And then selling it would put me in a legal mess. This can be figured out of course by a patent attorney but that would be too expensive for me.

Also, to me the whole idea is very obvious, and I was afraid it would get reverse engineered if I would show it to a company. The PWM signals not being center aligned is very easy to spot on an oscilloscope... I would be able to reverse engineer it from just that.

I thought about building a controller IC around it but that to me is just a lot of work, it would be a repeat excersize and not be interesting for me. Now if you have a controller business going on that's a different matter, but for just selling controller IC's for me it was not worth the effort. Plus again it would show the PWM signals, get reverse engineered etc etc.

My idea now is that by spreading this pdf around I hope the technology, if not patented already, becomes unpatentable and will remain in the public domain. Meaning we (EV hobbyists) can keep playing around with it. This is also the reason the pdf mentions many untested alternatives, to make those unpatentable as well.

Thank you for sharing this with the world.
Some times when people see your talent from the free work you release you make even more money. So don't fear it will come im sure.
 
VasiliSk said:
Interesting. First what i thought - some sort of HFI
However need for schematic changes and extra adc channel will increase BOM cost quite.. Also i'm using PWM techniques to lower power stage losses tat is not applicable to this SFS

The 33EV I used has a lot of ADC input, 9 or 11, am not really sure. So I use 3 for the current sensors, 3 for the LNA amplified/filtered currents and 1 for throttle. I just use the ADC in the 33EV, there is no separate ADC.

Yes, while running the algorithm will take some power but the nice thing is that you can switch off the PWM outputs completely when standing still. When you're at a traffic light for instance you can power down the output stage completely. Then when you give gas to accellerate the algorithm starts up (takes about 70 msec with the settings I used) and you're ready to go. The algorithm will take some power but this at a time when you have the initial accelleration away from the lights. And at a few kmh you can switch over to standard BEMF based sensorless FOC.
 
Is this tech something likely to see production units available within say a year?
 
Brilliant as usual and a very generous move on your behalf.

Let us hope that someone can port this sensorless method to a cheap STM32 Arm chip so we mortals can benefit.
 
Couldn't the LNAs be removed and the filter implemented in the firmware? At the expense of more noise I suppose, but is it a too strong restriction? Then the existing circuits would be compatible.
In my case 10-15 ADC pins are quickly used up, because I measure all power supplies, 2 temperature sensors, 2 throttles, 3 phase currents and the 3 phase output voltages.
 
I think without LNA the bit where you determine the MSB (or: the 0-180 decision) will not work as the signal wil be too small. Plus the LNA limits the amount of harmonics sampled by the ADC and makes digital filtering easier. I would not go without LNA.
 
If u have a true 16bit signal u could eliminate the LNAs because the gain of 30dB of those LNAs is about 32x so that's 5 bits u need. And most current systems do not have the resolution for this.

Even though the Rx part of this approach is novel compared to recent sensorless motor control literature it faces the same physical problems and that's SNR. So I like lebowskys analogue approach to raise his snr by a few opamps.

The mcp6022 is fairly standard and no low noise beast for 10buks a piece.
 
Or, Peters, if you have one extra ADC channel and dont use the 3 from the current sensors you can
- do Clarke transform in the analog domain with no filtering and no gain, use those for you FOC control. Takes 2 ADC channels
- build a 2 channel LNA using the Clarke transformed signals, the LNA output signals then also need 2 adc channels.

The circuit on page 67 implements the Clarke transform of page 55

The mcp6022 is roughly $1.20 at digikey, the 33EV128GM006 processor I used is $3.50 and has 36 ADC inputs
 
tecnologic said:
If u have a true 16bit signal u could eliminate the LNAs because the gain of 30dB of those LNAs is about 32x so that's 5 bits u need. And most current systems do not have the resolution for this.

Even though the Rx part of this approach is novel compared to recent sensorless motor control literature it faces the same physical problems and that's SNR. So I like lebowskys analogue approach to raise his snr by a few opamps.

The mcp6022 is fairly standard and no low noise beast for 10buks a piece.

The LNA also filters away the higher harmonic of the tx-ed square wave signals. So for instance the 5th of your 20kHz pwm at -100 kHz is suppressed, while with a 16b ADC it will be unsuppressed in your spectrum somewhere, and you'll need heavier digital filtering to get rid of it. Also getting rid of the very strong motor powering signal close to DC prevents intermodulation caused by ADC non linearities.

With the LNA the typical 1 MHz 9.5 Enob ADC of your average microcontroller is more than enough...
 
Lebowskys, I'm totally with u in that point. But I wanted to point out what will be needed to just get away with digital filtering. And just to be clear I mean an enob of 16bit not a 16bit adc!
 
tecnologic said:
Lebowskys, I'm totally with u in that point. But I wanted to point out what will be needed to just get away with digital filtering. And just to be clear I mean an enob of 16bit not a 16bit adc!

some people may remember the v2 controller IC having an HF sensorless mode... that was the first time me playing around with this. Instead of at the PWM frequency it outputted a 1kHz sine wave signal rotating in only one direction and did not use a LNA. It worked but not very good. I didn't know yet about sending two the same frequencies but with different polarity would get rid of the (motor) phase delay impact. I did know it would be interesting to try it at PWM frequencies but the 30F chip cannot do non-center alligned PWM. Only when I got the ZIF socket for the tqfp64 pin 33EV could I try all this out... but by then I was sitting on this for like 3 years already.
 
now that's a nice post! i was there when the aerospace engineers developed and patented realistic methods of doing zero start full torque sensorless (before electric vehicles were a "thing"). i've read pretty much all the patents and was involved in some of the development. using negative sequence component and higher frequency injection to get up to a certain speed (and then let bEMF method take over) is the typical way but HOW you do that is what makes it practicacl or not. the way you describe in this paper i think its unique, the pwm shift method you describe, so coo-dos for that! i think your paper is an original contribution to the body of knowledge, very enjoyable read. thanks again for the post :)
 
That's a very awesome and valuable contribution Lebowski, thanks!!

I'm not sure the STM32F4 can handle this non-center-alignement phase shift, I think it requires the coordination of many many timers. In any case, I sent the tip to benjamin vedder, we was considering this kind of signal injection so I'm hopeful that your method could reach many many riders!
 
marcos said:
That's a very awesome and valuable contribution Lebowski, thanks!!

I'm not sure the STM32F4 can handle this non-center-alignement phase shift, I think it requires the coordination of many many timers. In any case, I sent the tip to benjamin vedder, we was considering this kind of signal injection so I'm hopeful that your method could reach many many riders!

Seems way over the top, a 32F4... but they are cheap too so I get it. I like the 33EV I use, mainly because it is a 5V chip and can sample 4 analog inputs at once. Because you also need to sample all LNA outputs at the same time (at 20 kHz 1 usec sampling delay corresponds to 7 degrees). Plus the 33EV has more than enough processing power. And finally Microchip documentation for their processors is really elaborate and extensive.
 
Rad work.
I wish I had the attention span right now to enjoy it. I will mark it for while I am in Washington on Vacation.

-methods
 
Arlo1 said:
Thank you for sharing this with the world.
Some times when people see your talent from the free work you release you make even more money. So don't fear it will come im sure.


This is truth.
Sadly the efficiency is about 0.1%, but it is there.

I have tested this theory

...

When all your teeth have fallen out
When you have no more friends
When you live in a van by the river

... one person will show up who remembers your hard work and they will give you a shot :wink:

(As a hiring manager I actually credit folks heavily for DIY contributions to the community. I encourage others to do so as well)

-methods
 
Back
Top