10kW BLDC motor controller up to 90V and 200A with sensorless FOC - build thread

Electric Motors and Controllers
mxlemming   10 kW

10 kW
Posts: 565
Joined: Jul 17 2020 7:56am

Re: 10kW BLDC motor controller up to 90V and 200A with sensorless FOC - build thread

Post by mxlemming » Mar 29 2021 1:55am

They are similar, just current rating. Still can't see the Zener you talk about.

I have no hard evidence that lm5017 is more robust, just I've had 2 lm5163s die with no explanation and really struggled to get accuracy and low ripple from them whereas I've only killed one lm5017 and that was definitely my fault. Accuracy and ripple was also better.

Honestly I'm not impressed with either, but there aren't many 100V dcdcs available. I'm crossing my fingers for the day on semi release a pin compatible device.
Why can't everything be easy...

peters   1 kW

1 kW
Posts: 372
Joined: Oct 20 2012 11:46pm
Location: Hungary

Re: 10kW BLDC motor controller up to 90V and 200A with sensorless FOC - build thread

Post by peters » Mar 29 2021 3:03am

marcos wrote:
Mar 28 2021 6:08pm
That series zener in series with the lm5164 input is something original, havent seen it before so I had to try it. It didnt work very well for me, but I experienced failures in that supply so it was interesting to see extra care protecting it.
It just reduces the input voltage instead of a resistor, but not a solution to the stability problems with LM516x.
marcos wrote:
Mar 28 2021 6:58pm
Yeah voltage ripple was higher than advertised and even made audible noises so it took me extra time to get it right. Had to use the fancy feedback network and even the output voltage wasn't spot on.
I had the same, but works well with the type2 feedback circuit and the frequency set to be always in continuous mode. Type3 is probably better for output regulation without serial output resistor, but I wanted the resistor in any case to check the current.
mxlemming wrote:
Mar 28 2021 6:33pm
Where's this Zener?
D21 on B1 field on page 2. In fact a suppressor in zener mode, not a zener.

I think the main difference between LM5017 and 5163/64 is only the continuous/discontinuos mode management and so the behavior is different at light load when the inductor current becomes 0. Then the output of LM5163 switches in bursts and then there is a longer off state that makes the ripple voltage higher. Not very well explained in the datasheet. But the advantage of LM5163 is the lower quiescent current.

mxlemming   10 kW

10 kW
Posts: 565
Joined: Jul 17 2020 7:56am

Re: 10kW BLDC motor controller up to 90V and 200A with sensorless FOC - build thread

Post by mxlemming » Mar 29 2021 5:50am

peters wrote:
Mar 29 2021 3:03am
D21 on B1 field on page 2. In fact a suppressor in zener mode, not a zener.

I think the main difference between LM5017 and 5163/64 is only the continuous/discontinuos mode management and so the behavior is different at light load when the inductor current becomes 0. Then the output of LM5163 switches in bursts and then there is a longer off state that makes the ripple voltage higher. Not very well explained in the datasheet. But the advantage of LM5163 is the lower quiescent current.
Ok, I missed it because it doesn't make sense to me. That only gives you 5V headroom on Vbat and has a constant power loss in normal operation.

Why not use the higher voltage ~85V one and run it to ground? That would actually clamp any spikes.

Maybe you have and i just can't find it... Your pdf is rendered without searchable text...
Why can't everything be easy...

peters   1 kW

1 kW
Posts: 372
Joined: Oct 20 2012 11:46pm
Location: Hungary

Re: 10kW BLDC motor controller up to 90V and 200A with sensorless FOC - build thread

Post by peters » Mar 29 2021 10:43am

mxlemming wrote:
Mar 29 2021 5:50am
That only gives you 5V headroom on Vbat
It's exactly intended for that (~6.8V on this diode), because Vbat rises at regen and I want the battery voltage as close as possible to 100V with some headroom at the converter input.
There are no spikes on this node (unless intentional with an EM surge generator :)), but I agree I could have added also a high voltage TVS, that is usual.

mxlemming   10 kW

10 kW
Posts: 565
Joined: Jul 17 2020 7:56am

Re: 10kW BLDC motor controller up to 90V and 200A with sensorless FOC - build thread

Post by mxlemming » Apr 18 2021 3:15pm

How is this going? Has it propelled your bike around yet? Got any videos?

Summer's coming. I'm feeling a bit behind with my MESC. Been commuting to work with it still (now up to 20km each way) but it needs more poweeerrr and a bigger battery to propel me through the forests...
Why can't everything be easy...

peters   1 kW

1 kW
Posts: 372
Joined: Oct 20 2012 11:46pm
Location: Hungary

Re: 10kW BLDC motor controller up to 90V and 200A with sensorless FOC - build thread

Post by peters » Apr 23 2021 4:05am

mxlemming wrote:
Apr 18 2021 3:15pm
How is this going? Has it propelled your bike around yet? Got any videos?

Summer's coming. I'm feeling a bit behind with my MESC. Been commuting to work with it still (now up to 20km each way) but it needs more poweeerrr and a bigger battery to propel me through the forests...
Not much progress yet, the project is paused for a while.
I've set up the ADC to measure the phase currents and Vbat twice in a pwm cycle (center-aligned pwms): the sample taken in the middle is used for the FOC loop, and the sample at the start will be used for inductance measurement with HFI at fpwm/2.
For the low speed sensorless drive I'm going to create model of a real motor that includes the inductance vs. position and phase currents and do the most of the development in simulator.
I have 2 options in mind:
1. in the alpha-beta frame: Lalpha and Lbeta are functions of the position and Ialpha and Ibeta, and assuming these are two nonlinear functions with 2 variables, the vector for the position could be obtained with inverse functions or an observer.
2. in the d-q frame: in theory Ld is independent of the position and Iq (there may be some (or more) variation for a real motor) and Id is 0 by default, so apply HFI for only the d-axis and track the lowest inductance point, that would be Ld. But I think this would require to know the real Ld and measure more accurately because it is just a number instead of a vector.

mxlemming   10 kW

10 kW
Posts: 565
Joined: Jul 17 2020 7:56am

Re: 10kW BLDC motor controller up to 90V and 200A with sensorless FOC - build thread

Post by mxlemming » Apr 23 2021 5:56am

Good stuff, sounding sensible.

I've been considering pretty much the two above options... My main avenue has been to inject per phase, after inverse clark (/svpwm) and like you watch the current decay between samples, starting at centre and continuing to sample for a few more us.

I'll then have data to calculate inductance per phase, as L=iR/(di/dt)... Roughly. A park transform and an arctan should get me position data...

So far I have some screeching noises, PSU tripping and over current events. I'm calling that progress...

My enthusiasm to do HFI has slightly dropped off since i sorted out the hall observer, hall sensors just seem remarkably effective.
Why can't everything be easy...

thorlancaster328   100 W

100 W
Posts: 179
Joined: May 25 2018 3:20pm
Contact:

Re: 10kW BLDC motor controller up to 90V and 200A with sensorless FOC - build thread

Post by thorlancaster328 » Apr 26 2021 3:27am

On my old controller build I had good results with the technique mxlemming is describing, apply HF to each phase and take the arctan. Even though my hardware wasn't up to spec (too much noise / no high-pass amplifier) I managed to make it work with lower (audible, whiny) frequency injection.

It didn't work that well with higher phase currents though, The increased phase currents affected the inductance the same way the magnets did, and resulted in an inaccurate angle measurement and sometimes loss of position tracking.

I think the following would work pretty well:
- Inject HF into each phase, 120 degrees apart. Use this to measure inductance.
- Compare the measured inductance of each phase with the "baseline" inductance obtained from a table of inductance vs phase current
- Use the difference of (actual inductance - measured inductance) to estimate the external flux
- Take Park and Arctan and get position (at least to the nearest 180 degrees)

Hopefully at least one of us gets this sensorless from standstill feature working well. It would be a great feature to have, especially since no existing controllers on the market can do it yet.
Unfortunately I doubt that SFS will be possible if you are driving the motor into full saturation to get max torque for a few seconds - something a lot of hot-rodders (myself included) like to do. Once the inductance vs field strength stops changing due to saturation I think halls will be the only option.
Find weakest component, upgrade it, repeat until satisfied. Rome was not built in a day.
When in doubt, get bigger MOSFETs / Batteries / Motors / Etc.

peters   1 kW

1 kW
Posts: 372
Joined: Oct 20 2012 11:46pm
Location: Hungary

Re: 10kW BLDC motor controller up to 90V and 200A with sensorless FOC - build thread

Post by peters » Apr 28 2021 10:07am

Yes, saturation can be a problem. I just want to do wheelies and climb any hill, that should work without the halls.

Another option is a neural network-based observer. It may seem to be overkill at first, but since the phase inductance is a nonlinear function of only a few variables and every motor is different, modelling of that in a static ANN would be ideal and easy for someone experienced with them (not me).
In the most simple case the inputs of the NN can be the position (~rotor flux) and the phase current, the output is the inductance, and adjust the position until the diff of the measured inductance and the NN output is 0.
Or the NN inputs can be the position, the phase current, the phase voltage (or pwm, including HFI), actual velocity (~bEMF) and the phase resistance (~temperature), and the outputs are the next phase current and the phase resistance that is fed back to the input. The error of the next phase current is used for adjusting, and the inductance itself is not needed.
It's just contemplation, I don't know how it would work.

thorlancaster328   100 W

100 W
Posts: 179
Joined: May 25 2018 3:20pm
Contact:

Re: 10kW BLDC motor controller up to 90V and 200A with sensorless FOC - build thread

Post by thorlancaster328 » May 05 2021 3:45pm

peters wrote:
Mar 14 2021 11:56am
If another FETs on the same board wouldn't oscillate, that would be because of different reverse recovery transients, I think, but I haven't tried these new IRF100Pxx and IRF150Pxx series yet. Older TO-247 and TO-220 FETs I tried all oscillated.
Next time you replace your FETs you should maybe give the IRF100P218 FETs a shot. The 30% lower Qrr might help with the ringing, and the ~4x lower Cgd / Cgs will minimize any of that ringing coupling back onto the gate. RdsON is also 2x lower, which will make the FETs run a lot cooler.
Only downside is the higher output capacitance but a snubber on each phase will help compensate for that.
Find weakest component, upgrade it, repeat until satisfied. Rome was not built in a day.
When in doubt, get bigger MOSFETs / Batteries / Motors / Etc.

thorlancaster328   100 W

100 W
Posts: 179
Joined: May 25 2018 3:20pm
Contact:

Re: 10kW BLDC motor controller up to 90V and 200A with sensorless FOC - build thread

Post by thorlancaster328 » May 05 2021 3:55pm

peters wrote:
Apr 28 2021 10:07am
Another option is a neural network-based observer.
I've covered a bit of neural networks in my CS classes and I think it's worth giving it a shot. The hardest part would be getting the motor to initially spin, as untrained NNs are useless for everything. Perhaps you could guesstimate the parameters on startup, use that (with low phase current) to give a rough rotor estimate until the NNs were giving accurate results, and then switch over to the NN for full-power running.

I've always considered SFS without calibration to a specific motor to be a pipe dream, if you could get this to work it would be pretty amazing.
Find weakest component, upgrade it, repeat until satisfied. Rome was not built in a day.
When in doubt, get bigger MOSFETs / Batteries / Motors / Etc.

peters   1 kW

1 kW
Posts: 372
Joined: Oct 20 2012 11:46pm
Location: Hungary

Re: 10kW BLDC motor controller up to 90V and 200A with sensorless FOC - build thread

Post by peters » May 07 2021 7:36am

thorlancaster328 wrote:
May 05 2021 3:55pm
peters wrote:
Apr 28 2021 10:07am
Another option is a neural network-based observer.
I've covered a bit of neural networks in my CS classes and I think it's worth giving it a shot. The hardest part would be getting the motor to initially spin, as untrained NNs are useless for everything. Perhaps you could guesstimate the parameters on startup, use that (with low phase current) to give a rough rotor estimate until the NNs were giving accurate results, and then switch over to the NN for full-power running.

I've always considered SFS without calibration to a specific motor to be a pipe dream, if you could get this to work it would be pretty amazing.
I though of training the NN for the actual motor like calibration, save the config in the flash, and use it afterwards normally as a trained NN.

fatty   10 kW

10 kW
Posts: 672
Joined: Nov 14 2020 9:15pm
Location: USA

Re: 10kW BLDC motor controller up to 90V and 200A with sensorless FOC - build thread

Post by fatty » May 21 2021 2:34pm

thorlancaster328 wrote:
Apr 26 2021 3:27am
Hopefully at least one of us gets this sensorless from standstill feature working well. It would be a great feature to have, especially since no existing controllers on the market can do it yet.
VESC appears to have working HFI

Vbruun   100 W

100 W
Posts: 204
Joined: Sep 26 2019 8:42am

Re: 10kW BLDC motor controller up to 90V and 200A with sensorless FOC - build thread

Post by Vbruun » May 23 2021 3:25am

I run it and it works well at my power level (10s 25a). It has to be tuned for the specific motor manually though.

Post Reply