Lebowski's motor controller IC, schematic & setup, new v2.A1

Lebowski. I knoticed the dead time only applies to the transition from Hi side turning off to low side turning on. And not on the other trasition. Is there any way to add dead time to the other transition??
 
Arlo1 said:
Lebowski. I knoticed the dead time only applies to the transition from Hi side turning off to low side turning on. And not on the other trasition. Is there any way to add dead time to the other transition??
It applies to both transitions.... try scoping at the pwm outputs of the controller IC
 
Thinking about doing an upgrade for my controller IC. At the moment it measures the back-emf during calibration
with hall sensors. I've started to think maybe matching the exact back-emf is not so important, I want to go to pure
sinewave out. This also enables me to add a menu item in the main setup menu which measures the motor inductances,
using this info will make for more accurate control. I already figured out how to measure the inductance but it works
best with only sine waves....
Instead of matching the back-emf waveforms, maybe it's more important to try and eliminate the 3rd order components
from the motor currents, such that the phase currents more resemble pure sines.
Think I'll add the inductive measurement and algorithm upgrade first, then concentrate on removing the 3rd order components...
 
Lebowski said:
Arlo1 said:
Lebowski. I knoticed the dead time only applies to the transition from Hi side turning off to low side turning on. And not on the other trasition. Is there any way to add dead time to the other transition??
It applies to both transitions.... try scoping at the pwm outputs of the controller IC
Ill try that later. But look at this. Its at the 1 min mark. [youtube]rwo2tyCwFCo[/youtube]
 
Lebowski said:
what are the two signals you're scoping ? The blue is the gate drive for the low side ? The yellow is the
output motor terminal ?
Negative is the phase wire blue is the Hi side gate Yellow is the low side gate.
 
Arlo1 said:
Lebowski said:
what are the two signals you're scoping ? The blue is the gate drive for the low side ? The yellow is the
output motor terminal ?
Negative is the phase wire blue is the Hi side gate Yellow is the low side gate.

OK that doesn't make sense. The ground of the scope should be the ground (negative battery).
Use one channel to scope the low side gate and to trigger the scope. The other channel,
measure the phase wire and store in memory. Then swap to the high side gate and substract
the store trace from memory. Now you have both gate/source signals...
 
Lebowski said:
Arlo1 said:
Lebowski said:
what are the two signals you're scoping ? The blue is the gate drive for the low side ? The yellow is the
output motor terminal ?
Negative is the phase wire blue is the Hi side gate Yellow is the low side gate.

OK that doesn't make sense. The ground of the scope should be the ground (negative battery).
Use one channel to scope the low side gate and to trigger the scope. The other channel,
measure the phase wire and store in memory. Then swap to the high side gate and substract
the store trace from memory. Now you have both gate/source signals...
I have been testing this way to see if there is a false turn on on the hi side. I was testing this way on porous. I wanted to see the tests on the probe 1x scale to be as acurate as possible. The low side mesurement is not critical it just needs to refernce time (exactly referenced to the hi side) to show when the low side was turning on it was causing a false turn on on the hi side.
I will just simply test the signals from the brain later and confirm the transition from low to hi has no dead time.
 
Nice to see that you've catched on to the phase lag you see in motors at high speed. Why don't you use a estimator like most FOC algorithms use? The torque is proportional to (voltage applied - bemf), so startup could be much faster. It looks like your controller doubles the BEMF, why? Am I wrong to assume this will give exponential acceleration (like a surge)? Normal FOC gives constant torque, and then the applied voltage is (bemf + constant).
 
Oh I've compensated for phase lag, just differently :D I don't need an estimator. What do you
need an estimator for anyway ? For FOC you need to know component values (winding
inductance, resistance) and to make the controller IC easy to use I've always had in mind that
it should be able to measure all the necessary parameters by itself, most people don't know
their motor impedance and have no way to measure it.

Torque is proportional to current, no ? In the shown plots I've set it to go to 10a phase current, in the
startup it's still increasing towards this value. Because the motor backemf is still increasing the controller
needs some time to get to the 10 A (but this all depends on the entered loop parameters). It's not
a question of doubling back-emf, it just looks that way 'cause the impedances are chosen rediculously
high.

This is the motor model, not really a model it just generates 3 in amplitude increasing phase voltages.
The whole idea of controller modelling is to see whether the controller is able to 'catch on' with the motor
and correctly compensates for the winding impedance to reach the desired phase amps.
motor.jpg
 
The motor inductance and resistance is only needed for the PI current regulator. You can set this to a high time constant, this gives sluggish regulation - but will work for 'all' motors. Setting these parameters to your actual motor data just gives tigther regulation.

Torque is proportional to current, no ?
Phase current yes. I think that's what you meant.

What is nice with FOC is the easy way you can implement field weakening. 'q' axis current is proportional to throttle regulation, and 'd' axis current you simply increase once you can't hit the current limit. It's lossy, but a nice way to cram in some extra speed.

I'm working on a algorithm that balances between MOSFET losses and capacitor losses (as a function of current ripple). I've 'shunted' my caps to be able to read this, quite a lot of work just for a few extra percent efficiency. (Yes, I tried a hysteresis based pwm algorithm - but that wont work for low inductance motors (my current ic's aren't fast enough)).

Are you using labview to simulate your system?
 
I apologize Lebowski. For some reason this did not show up or I was looking at it wrong. But the dead time is on both transitions.
And its uber close to the programed amount. I set it for 400ns!
 
I have a question. At the beggining there were thoughts about combining your FOC brain with a powerstage of some common "dumb" controller. Did anyone actually tried that? The big Greentime controllers look as a great candidate for that.
 
ctirad said:
I have a question. At the beggining there were thoughts about combining your FOC brain with a powerstage of some common "dumb" controller. Did anyone actually tried that? The big Greentime controllers look as a great candidate for that.
Gordo was going to try this but as I handed him a 40 pin dip and said good luck he saw its more work then starting from scratch espicialy because the "dumb" controllers have a different number of brain pins and no current sensors and no phase voltage measurment!
 
Arlo1 said:
Gordo was going to try this but as I handed him a 40 pin dip and said good luck he saw its more work then starting from scratch espicialy because the "dumb" controllers have a different number of brain pins and no current sensors and no phase voltage measurment!

Of course no one can expect it could work as a drop-in replacement for the original chip. My idea is to have a brain board with phase sensors and direct connection of all the control signals, which would output just the signals for the FET drivers. Such board could be easily used in almost any BLDC controller.
 
ctirad said:
Arlo1 said:
Gordo was going to try this but as I handed him a 40 pin dip and said good luck he saw its more work then starting from scratch espicialy because the "dumb" controllers have a different number of brain pins and no current sensors and no phase voltage measurment!

Of course no one can expect it could work as a drop-in replacement for the original chip. My idea is to have a brain board with phase sensors and direct connection of all the control signals, which would output just the signals for the FET drivers. Such board could be easily used in almost any BLDC controller.
The problem is the "dumb" controllers are basicly a pour way of everything. Bad design Bad parts etc. And the amount of work is more then building a controller from scratch. So you will end up with a sub par controller with chineese elcheepo parts and a bad design etc. that takes more time to build then something that works better. :roll:
 
ctirad said:
I have a question. At the beggining there were thoughts about combining your FOC brain with a powerstage of some common "dumb" controller. Did anyone actually tried that? The big Greentime controllers look as a great candidate for that.

The gate drivers of the typical 'dumb' controller are very very slow and are basically what prevent the FOC brain from being used as a drop-in replacement...
 
Lebowski said:
The gate drivers of the typical 'dumb' controller are very very slow and are basically what prevent the FOC brain from being used as a drop-in replacement...

Aha, that's finally a relevant answer. Thanks. I assume you don't think that to make a version with slower PWM to fit worth the efforts. Am I right? ;)

I'm asking, because I'd like to upgrade the stock controler in my bigger scooter to something like 6 or 8kW and want something better than the basic chinese one. However, strong enough Kelly is not cheap and it is not FOC either, Sevcon is expensive and hard to setup nad other possibilities are even more expensive.
And while I am experienced in electronics, I'd don't think I'm able to design my own power stage.
 
ctirad said:
Lebowski said:
The gate drivers of the typical 'dumb' controller are very very slow and are basically what prevent the FOC brain from being used as a drop-in replacement...

Aha, that's finally a relevant answer. Thanks. I assume you don't think that to make a version with slower PWM to fit worth the efforts. Am I right? ;)

I'm asking, because I'd like to upgrade the stock controler in my bigger scooter to something like 6 or 8kW and want something better than the basic chinese one. However, strong enough Kelly is not cheap and it is not FOC either, Sevcon is expensive and hard to setup nad other possibilities are even more expensive.
And while I am experienced in electronics, I'd don't think I'm able to design my own power stage.

Well the PWM is a parameter in one of the menu's.... I'd be afraid to blow the FET drivers though. A simple controller
probably only PWM's the high side, not the low side. I PWM both, I don't know if the standard china FET drivers
for the low side can take this as they;re not build for it. Also, at high signal levels (high speed) the on-time
becomes very short, if this gets shorter than the switch on/off time of the gate drivers, I don't know what
will happen then but it ain't going to be pretty I think.

I build a 6 FET that should be able to handle a few kW but haven't been able to test it yet (see thread about 'the big lebowski controller'
 
Lebowski said:
I build a 6 FET that should be able to handle a few kW but haven't been able to test it yet (see thread about 'the big lebowski controller'

It's getting to be time for some motor for controller bartering. We do need to double that few Kw for each of the 2 controllers running the motor. :mrgreen:
 
measuring my small RC motor
Code:
a) use Field Oriented Control: YES

 Before automatic measurement of the motor parameters
 the controller must be supplied with the same voltage
 as in the vehicle. PWM frequency and deadtime must be
 initialised. ADC's must be properly set up and calibrated
 or calibration must have been restored to default.
 The following parameters must be set at their final value:

 loop sample frequency: 41.03 kHz
 current sensor transimpedance: 100.00 mV/A

b) measurement amplitude: 3.9 A
c) impedance measurement frequency: 24.98 k-erpm
d) determine motor impedance

e) battery voltage (for inductance display only): 64 V
   measured inductance (star configuration): 9.5 uH

z) return to main menu

------> b 
new value -> 8 

a) use Field Oriented Control: YES

 Before automatic measurement of the motor parameters
 the controller must be supplied with the same voltage
 as in the vehicle. PWM frequency and deadtime must be
 initialised. ADC's must be properly set up and calibrated
 or calibration must have been restored to default.
 The following parameters must be set at their final value:

 loop sample frequency: 41.03 kHz
 current sensor transimpedance: 100.00 mV/A

b) measurement amplitude: 7.9 A
c) impedance measurement frequency: 24.98 k-erpm
d) determine motor impedance

e) battery voltage (for inductance display only): 64 V
   measured inductance (star configuration): 9.5 uH

z) return to main menu

------> d 

 Measuring... 


a) use Field Oriented Control: YES

 Before automatic measurement of the motor parameters
 the controller must be supplied with the same voltage
 as in the vehicle. PWM frequency and deadtime must be
 initialised. ADC's must be properly set up and calibrated
 or calibration must have been restored to default.
 The following parameters must be set at their final value:

 loop sample frequency: 41.03 kHz
 current sensor transimpedance: 100.00 mV/A

b) measurement amplitude: 7.9 A
c) impedance measurement frequency: 24.98 k-erpm
d) determine motor impedance

e) battery voltage (for inductance display only): 64 V
   measured inductance (star configuration): 8.8 uH

z) return to main menu

and then my 10kW enertrac ME602

Code:
a) use Field Oriented Control: YES

 Before automatic measurement of the motor parameters
 the controller must be supplied with the same voltage
 as in the vehicle. PWM frequency and deadtime must be
 initialised. ADC's must be properly set up and calibrated
 or calibration must have been restored to default.
 The following parameters must be set at their final value:

 loop sample frequency: 41.03 kHz
 current sensor transimpedance: 100.00 mV/A

b) measurement amplitude: 7.9 A
c) impedance measurement frequency: 24.98 k-erpm
d) determine motor impedance

e) battery voltage (for inductance display only): 64 V
   measured inductance (star configuration): 8.8 uH

z) return to main menu

------> d 

 Measuring... 


a) use Field Oriented Control: YES

 Before automatic measurement of the motor parameters
 the controller must be supplied with the same voltage
 as in the vehicle. PWM frequency and deadtime must be
 initialised. ADC's must be properly set up and calibrated
 or calibration must have been restored to default.
 The following parameters must be set at their final value:

 loop sample frequency: 41.03 kHz
 current sensor transimpedance: 100.00 mV/A

b) measurement amplitude: 7.9 A
c) impedance measurement frequency: 24.98 k-erpm
d) determine motor impedance

e) battery voltage (for inductance display only): 64 V
   measured inductance (star configuration): 86.0 uH

z) return to main menu

------> b 
new value -> 4 

a) use Field Oriented Control: YES

 Before automatic measurement of the motor parameters
 the controller must be supplied with the same voltage
 as in the vehicle. PWM frequency and deadtime must be
 initialised. ADC's must be properly set up and calibrated
 or calibration must have been restored to default.
 The following parameters must be set at their final value:

 loop sample frequency: 41.03 kHz
 current sensor transimpedance: 100.00 mV/A

b) measurement amplitude: 3.9 A
c) impedance measurement frequency: 24.98 k-erpm
d) determine motor impedance

e) battery voltage (for inductance display only): 64 V
   measured inductance (star configuration): 86.0 uH

z) return to main menu

------> d 

 Measuring... 


a) use Field Oriented Control: YES

 Before automatic measurement of the motor parameters
 the controller must be supplied with the same voltage
 as in the vehicle. PWM frequency and deadtime must be
 initialised. ADC's must be properly set up and calibrated
 or calibration must have been restored to default.
 The following parameters must be set at their final value:

 loop sample frequency: 41.03 kHz
 current sensor transimpedance: 100.00 mV/A

b) measurement amplitude: 3.9 A
c) impedance measurement frequency: 24.98 k-erpm
d) determine motor impedance

e) battery voltage (for inductance display only): 64 V
   measured inductance (star configuration): 88.2 uH

z) return to main menu

------> c 
new value -> 12 

a) use Field Oriented Control: YES

 Before automatic measurement of the motor parameters
 the controller must be supplied with the same voltage
 as in the vehicle. PWM frequency and deadtime must be
 initialised. ADC's must be properly set up and calibrated
 or calibration must have been restored to default.
 The following parameters must be set at their final value:

 loop sample frequency: 41.03 kHz
 current sensor transimpedance: 100.00 mV/A

b) measurement amplitude: 3.9 A
c) impedance measurement frequency: 11.98 k-erpm
d) determine motor impedance

e) battery voltage (for inductance display only): 64 V
   measured inductance (star configuration): 88.2 uH

z) return to main menu

------> d 

 Measuring... 


a) use Field Oriented Control: YES

 Before automatic measurement of the motor parameters
 the controller must be supplied with the same voltage
 as in the vehicle. PWM frequency and deadtime must be
 initialised. ADC's must be properly set up and calibrated
 or calibration must have been restored to default.
 The following parameters must be set at their final value:

 loop sample frequency: 41.03 kHz
 current sensor transimpedance: 100.00 mV/A

b) measurement amplitude: 3.9 A
c) impedance measurement frequency: 11.98 k-erpm
d) determine motor impedance

e) battery voltage (for inductance display only): 64 V
   measured inductance (star configuration): 93.8 uH

z) return to main menu

------> c 
new value -> 50 

a) use Field Oriented Control: YES

 Before automatic measurement of the motor parameters
 the controller must be supplied with the same voltage
 as in the vehicle. PWM frequency and deadtime must be
 initialised. ADC's must be properly set up and calibrated
 or calibration must have been restored to default.
 The following parameters must be set at their final value:

 loop sample frequency: 41.03 kHz
 current sensor transimpedance: 100.00 mV/A

b) measurement amplitude: 3.9 A
c) impedance measurement frequency: 49.96 k-erpm
d) determine motor impedance

e) battery voltage (for inductance display only): 64 V
   measured inductance (star configuration): 93.8 uH

z) return to main menu

------> d 

 Measuring... 


a) use Field Oriented Control: YES

 Before automatic measurement of the motor parameters
 the controller must be supplied with the same voltage
 as in the vehicle. PWM frequency and deadtime must be
 initialised. ADC's must be properly set up and calibrated
 or calibration must have been restored to default.
 The following parameters must be set at their final value:

 loop sample frequency: 41.03 kHz
 current sensor transimpedance: 100.00 mV/A

b) measurement amplitude: 3.9 A
c) impedance measurement frequency: 49.96 k-erpm
d) determine motor impedance

e) battery voltage (for inductance display only): 64 V
   measured inductance (star configuration): 83.9 uH

z) return to main menu
 
Yeah that looks very exciting. I have the chips sitting on the counter to ship to you tomorrow.
And im starting my v2 design for my brain and driver boards right now.
 
Back
Top