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

Arlo1 said:
You should fluctuations on the 12v line can carry into the 5v circuit[/color]

Yes, i agree, 5V can be swamped in hash from 12V. However Volt inverter is quite good isolated and protected and with good decoupling... I am also surprised how good it runs without any brain isolation. Time will tell though as i will put it in a car this saturday :).

@kiwifiat:
I use 100A and 4Khz to measure inductance of the motor. If you use different settings you get a bit different results but yes that is what runs good on my bench. I am sure that gen 2 Leaf has a bit redesigned motor. I can go through setup again and post fresh settings here.
I use 35K in misc menu after i tried to run both 35K and 1K. With the latter one rotor seems to be sticking more when releasing throttle.

In sensorless i still get some bumping back and forth from the start, in sensored mode however i get full 10K RPM to the letter. I have to see what this means with 1.5t load on it.

in other newes i managed to run 500V Emrax motor to 4200 rpm on the bench. It was terribly noisy but sensorless commutation was flawless. I even heared when it entered weakening. It is 20pole motor so brain can be picky with backemf. https://www.youtube.com/watch?v=dRgfqRJDuTw


A
 
arber333 said:
in other newes i managed to run 500V Emrax motor to 4200 rpm on the bench. It was terribly noisy but sensorless commutation was flawless. I even heared when it entered weakening. It is 20pole motor so brain can be picky with backemf. https://www.youtube.com/watch?v=dRgfqRJDuTw


A

Regarding this 'noisy', it is probably due to menu g, option n.... this coefficient was added last and I;ve never been 100% sure it is actually necessary. Setting it to 0 will remove a lot of noise, but might cost you control loop stability... can you try setting it to 0 ?
 
I tried some more with Emrax and i am convinced that motor should be run at 12Khz or even 15Khz PWM. There is much less noise there. However 15Khz was somewhat more jumpy or so it seemed. Option n didnt change a lot. Higher PWM made it better.
With 75a field weakening i arrived to 5500rpm! Bear in mind motor was wound for 500Vdc! Not bad.

Bas what is option m in menu b current settings? I set it up to 10A and i think motor runs a little better.

How can i approach to option h in menu n misc? Arlo says 35000 works for him. Can i expect bucking if i vary it?
 
arber333 said:
I tried some more with Emrax and i am convinced that motor should be run at 12Khz or even 15Khz PWM. There is much less noise there. However 15Khz was somewhat more jumpy or so it seemed. Option n didnt change a lot. Higher PWM made it better.
With 75a field weakening i arrived to 5500rpm! Bear in mind motor was wound for 500Vdc! Not bad.

Bas what is option m in menu b current settings? I set it up to 10A and i think motor runs a little better.

How can i approach to option h in menu n misc? Arlo says 35000 works for him. Can i expect bucking if i vary it?

Interesting that Damien Maguire is using 17.6kHz PWM frequency on the Tesla small drive board so clearly those large IGBT's can be pushed to run at a higher frequency than 6kHz. What is the inductance of the Emrax motor? I had some instability during acceleration and deacceleration and found that using the accelleration limiter pretty much fixed the problem. When testing with no load the rate of accel/decelleration will be substantially higher that when the motor is installed in a car so once installed there may be no jumpyness, I guess time will tell.
 
Tesla small drive board uses large igbts???


I used 6 kHz because OEM leafs run at 5khz and 6 made sense with what I was doing. More power might be 9 or 12khz. But it depends on a few things. The simple rule is to run the lowest PWM frequency you can while still keeping control of the current.
 
arber333 said:
I tried some more with Emrax and i am convinced that motor should be run at 12Khz or even 15Khz PWM. There is much less noise there. However 15Khz was somewhat more jumpy or so it seemed. Option n didnt change a lot. Higher PWM made it better.
With 75a field weakening i arrived to 5500rpm! Bear in mind motor was wound for 500Vdc! Not bad.

Bas what is option m in menu b current settings? I set it up to 10A and i think motor runs a little better.

How can i approach to option h in menu n misc? Arlo says 35000 works for him. Can i expect bucking if i vary it?

The PWM frequency is a trade-off between two unwanted power dissipations.
PWM frequency low means less switching losses but more PWM ripple current losses.
PWM frequency high means more swithing losses but less PWM ripple current losses.

I once had my small RC motor (11uH) at 20 kHz PWM take 120 W of PWM current ripple losses.
Running it at 40 or even 60kHz PWM reduced this to around 40 W. With FETs this did not really increase switching losses, can imagine though with IGBT's you will notice. Especially as switching losses go up with phase current.


Option m, menu b is the automatic current sensor calibration that runs while the motor is in use. When motor phase current is below this value it will be used for the calibration, when above it will not. This because at higher currents the current sensors are not linear, and this will affect the perceived offset. The 10A you set is realistic, and will indeed make the motor run better (as it reduces current sensor offset). What you can do is, after using this option and getting a better running motor, save the parameters (by pressing setup in motor mode). This will make that from startup the motor runs better, plus you can have a look in the setup menu to see what the current sensor offset voltages are.

The # of cycles for transistion, I think 1000 is enough. What you can expect if not good, it will conk out during transition.
 
Bas I think your answer to my mail about wiggle function will be of benefit to others. Sorry for my impatience with mail...

What wiggle does is it wiggles the rotor back and forth a little bit, (once you give a bit of gas). This induced motion will make the sensorless catch on. It will wiggle back and forth at the specified rate and over the specified phase angle.
Reasonable values are from 4 to 20 Hz, and from 10 to around 45 degrees. The strength (so amount of current used for this) depends on how much gas you give. Especially for a large vehicle I would just use the hall sensors.


So another question about wiggle... is this connected with arc between magnets? I suspect it is. I.e. if Emrax motor is 20 pole i can get magnet geometry 360 by 20 = 18° arc between magnet centerlines. From experience would you recommend using a little more than halfh of this arc for wiggle travel or more? So 10°?
If the travel is short then we can increase the rate to get controler to figure the position faster. Or am i reaching here?

A
 
arber333 said:
Bas I think your answer to my mail about wiggle function will be of benefit to others. Sorry for my impatience with mail...

What wiggle does is it wiggles the rotor back and forth a little bit, (once you give a bit of gas). This induced motion will make the sensorless catch on. It will wiggle back and forth at the specified rate and over the specified phase angle.
Reasonable values are from 4 to 20 Hz, and from 10 to around 45 degrees. The strength (so amount of current used for this) depends on how much gas you give. Especially for a large vehicle I would just use the hall sensors.


So another question about wiggle... is this connected with arc between magnets? I suspect it is. I.e. if Emrax motor is 20 pole i can get magnet geometry 360 by 20 = 18° arc between magnet centerlines. From experience would you recommend using a little more than halfh of this arc for wiggle travel or more? So 10°?
If the travel is short then we can increase the rate to get controler to figure the position faster. Or am i reaching here?

A

When lebowski says 45 degrees he means electrical degrees. So if you have 20 poles or 10 pole pairs its 4.5 mechanical degrees to get 45 electrical degrees
 
Hm... We failed miserably to drive with sensorless leaf motor iun a car :(. But that should be expected. I have the motor in my shop now and i am in the process of adding sensors the same as with my motor.
While trying different settings i am learning and adding new stuff to my boards next revision.
So i have some more space on PCB to fit phase signals directly from IGBTs. In Volt inverter there is just couple cm from PCB to phase bolts. So i can add some wires and connect signals for chip to read them. Also i will add voltage sensing and Arduino Nano chip that will process precharge and Fault instances...

Bas can you tell me, do you only need a digital signal to sense backEMF? Can I use your resistor network with one 5V isolated supply to send signal to optocoupler LED which will then signal to the IC. That way signal is kept isolated. Would that work with good timing at 6kHz and 10000rpm? Optos also have their turn on time... I can use SMD opto drivers such as we use to drive IGBTs. They have much faster turn on/off time than ordinary optos.

Or i can use 4x opto like TLP291-4? Space is not unlimited....

tnx
 
Yeah sensorless start does not work with something big and heavy.
 
Ok i built my wiring for backEMF sensing. I see a snag though. Does backEMF signal has to be positioned in on the phases?

I.E. Phase U signal from pin 5 corresponds to transistors actuated by pins 37 and 38? And V from pin 7 to pins 35 and 36? etc...
Is that important?



tnx

A
 
The voltage feedback signals do not need to correspond with the driver signals, they are only used at startup to see if the motor is running or there is a short somewhere in the power stage. You can make these signals digital, but remember that they have to be at 2.5V for motor standing still / no shorts. Pulling them to ground or 5V will be seen as a short.
 
Lebowski said:
The voltage feedback signals do not need to correspond with the driver signals, they are only used at startup to see if the motor is running or there is a short somewhere in the power stage. You can make these signals digital, but remember that they have to be at 2.5V for motor standing still / no shorts. Pulling them to ground or 5V will be seen as a short.

So you dont use backEMF to observe 0 crossing for closed loop control? Hm... what is the benefit there if i already use hall sensors then?

EDIT: If i used the same configuration and just added another 4K7 resistor from emitters towards GND, i would get 2.5V on backEMF pulses and 5V on 0Rpm and in between. Would that work with this software?

Does controler run the whole range 0rpm - 10krpm with hall sensors, or is sensorless used in the upper region "drive3"?
Then it would be better to direct my effort to get reliable voltage reporting from isolated opamp circuit.
 
Arlo1 said:
Tesla small drive board uses large igbts???

Symantecs, the 1MBI600U4B-120/1MBI800U4B-120 bricks you use have more than one IGBT in them despite the datasheet showing only one. Some 3 phase modules I have looked at have 36 IGBT elements within them. Tesla uses a massive array of descreet's that must have a large collective gate charge, but yes probably a bad description.

Arlo1 said:
I used 6 kHz because OEM leafs run at 5khz and 6 made sense with what I was doing. More power might be 9 or 12khz. But it depends on a few things. The simple rule is to run the lowest PWM frequency you can while still keeping control of the current.

The context of the comment was low inductance motors which the Leaf motor definetly is not, not a critique of your engineering choices. I think your world record says it all with regards to how well you have done and certainly some of your insights into the lebowski contoller have helped me. I will be ecstatic if I get 50% of the power you have achieved on my Leaf drive project. Talking about power, I will have my Stuska engine dyno setup for the Leaf motor later this year so if it helps you would be welcome to make use of it.
 
Arlo1 said:
Yeah sensorless start does not work with something big and heavy.

Arlo, why would you use backEMF signal if you have hall sensors available? Does it improve control anyhow?

tnx
 
Lebowski said:
The voltage feedback signals do not need to correspond with the driver signals, they are only used at startup to see if the motor is running or there is a short somewhere in the power stage. You can make these signals digital, but remember that they have to be at 2.5V for motor standing still / no shorts. Pulling them to ground or 5V will be seen as a short.

Hm... the way you are saying seems to me i can use whatever signal from 2.5 to 5v to detect motor is turning? That means if the motor is stationary there should be 2.5V and if it is turning controler should see 5V all the time.

I could solve this with three signals going into optos across isolation barrier and from there going to one NAND gate.
That should signal 5V every time motor would move, but 2.5V when stationary.

Is it worth the trouble at all? Is control anyhow improved by using this signal?
 
Animalector said:
I think Bas mentioned earlier, that it is a safety mechanism at startup so we don't blow stuff up.. it's also if there is a short, not just if the motor is moving.

Andy

Hm... If it is not used as a feedback for FOC code then i think it is not needed. I use Fault, desat, OC and overtemp detection which is wired directly to Reset input. I think i will omit this from PCB since it creates more problems for me vs the benefits it provides.

A
 
arber333 said:
Arlo1 said:
Yeah sensorless start does not work with something big and heavy.

Arlo, why would you use backEMF signal if you have hall sensors available? Does it improve control anyhow?

tnx

I didn't use the Back emf. Its not used for sensorless. Sensorless uses the current sensors only.
 
I have tried to run the car again. We failed again!!! Motor runs in idle but stalls when loaded with car.
First i set correct settings. I correctly installed 10nF caps to current sense lines. Then i calibrated FOC with 100A at 8Kerpm. 12Kerpm would overflow.

I managed to took some video of signals on my scope. Signal was set at 2V per division and 5us.
First i took video of signals with motor idling. There is some hash but signals run good.
Next i tried to run motor in 1st gear and car bucked but didnt drive. I have saved some data from those runs.

Do you think i could correct something if i used 1nF decoupling caps on each sensor signal towards gnd?

https://www.youtube.com/watch?v=bbEAiSpjdm0
https://www.youtube.com/watch?v=NKYsWscynxE&feature=youtu.be

Last but 2 entry into drive_1:

status bits:
drive LEDS: 0...
total on time: 0.051 sec
time in drive mode: 0.051 sec
throttle: 0 %
wanted_i_torque: 0.0 A
wanted_i_fieldweak: 0.0 A
measured_i_torque: 0.0 A
measured_i_fieldweak: 0.0 A
measured_i_error: 0.0 A
Vout_real: 0 %
Vout_imag: 0 %
speed: 0.00 k-erpm
L: 176.95 uH
R: 6.66 mOhm

Last but 1 entry into drive_1:
status bits:
drive LEDS: ...3
total on time: 16.651 sec
time in drive mode: 12.045 sec
throttle: 0 %
wanted_i_torque: 0.0 A
wanted_i_fieldweak: 0.0 A
measured_i_torque: 0.7 A
measured_i_fieldweak: -10.0 A
measured_i_error: -26.6 A
Vout_real: 25 %
Vout_imag: 0 %
speed: 4.81 k-erpm
L: 176.95 uH
R: 6.66 mOhm


Last entry into drive_1:
status bits:
drive LEDS: 0...
total on time: 0.051 sec
time in drive mode: 0.051 sec
throttle: 0 %
wanted_i_torque: 0.0 A
wanted_i_fieldweak: 0.0 A
measured_i_torque: 0.0 A
measured_i_fieldweak: 0.0 A
measured_i_error: 0.0 A
Vout_real: 0 %
Vout_imag: 0 %
speed: 0.00 k-erpm
L: 176.95 uH
R: 6.66 mOhm


Chip status at button press:
status bits:
drive LEDS: ..2.
total on time: 0.409 sec
time in drive mode: 0.265 sec
throttle: 0 %
wanted_i_torque: 0.0 A
wanted_i_fieldweak: 0.0 A
measured_i_torque: 1.3 A
measured_i_fieldweak: 0.7 A
measured_i_error: 0.0 A
Vout_real: 5 %
Vout_imag: 0 %
speed: 0.57 k-erpm
L: 176.95 uH
R: 6.66 mOhm


Last but 2 entry into drive_1:
status bits:
drive LEDS: 0...
total on time: 1.587 sec
time in drive mode: 1.587 sec
throttle: 0 %
wanted_i_torque: 0.0 A
wanted_i_fieldweak: 0.0 A
measured_i_torque: 0.0 A
measured_i_fieldweak: 0.0 A
measured_i_error: 0.0 A
Vout_real: 0 %
Vout_imag: 0 %
speed: 0.00 k-erpm
L: 176.95 uH
R: 6.66 mOhm


Last but 1 entry into drive_1:
status bits:
drive LEDS: ..2.
total on time: 2.805 sec
time in drive mode: 1.129 sec
throttle: 99 %
wanted_i_torque: 298.7 A
wanted_i_fieldweak: 0.0 A
measured_i_torque: 36.2 A
measured_i_fieldweak: -13.3 A
measured_i_error: -10.0 A
Vout_real: 1 %
Vout_imag: 0 %
speed: -0.23 k-erpm
L: 176.95 uH
R: 6.66 mOhm


Last entry into drive_1:
status bits:
drive LEDS: 0...
total on time: 0.051 sec
time in drive mode: 0.051 sec
throttle: 0 %
wanted_i_torque: 0.0 A
wanted_i_fieldweak: 0.0 A
measured_i_torque: 0.0 A
measured_i_fieldweak: 0.0 A
measured_i_error: 0.0 A
Vout_real: 0 %
Vout_imag: 0 %
speed: 0.00 k-erpm
L: 176.95 uH
R: 6.66 mOhm


Chip status at button press:
status bits:
drive LEDS: 0.2.
total on time: 2.785 sec
time in drive mode: 2.644 sec
throttle: 99 %
wanted_i_torque: 0.0 A
wanted_i_fieldweak: 0.0 A
measured_i_torque: 0.0 A
measured_i_fieldweak: 0.0 A
measured_i_error: 0.0 A
Vout_real: 0 %
Vout_imag: 0 %
speed: 0.00 k-erpm
L: 176.95 uH
R: 6.66 mOhm
 
I would not put more then 10nf on the current signals it changes the timing. From signal to gnd

Maybe scope the hall signals vs the phase signals.
 
I think that there is something fundamentally wrong with your setup if you are getting 6.66 mOhms for motor resistance. The resistance posted by Arlo for the Gen1 motor is over 20mOhms which agrees with the figure I get for the gen2 motor. Also I think you are asking for trouble setting 500ns for deadtime on those Chevy Volt inverter IGBT's if you haven't scoped the gate signals to see how fast they are switching. Better to err on the side of caution.
 
kiwifiat said:
I think that there is something fundamentally wrong with your setup if you are getting 6.66 mOhms for motor resistance. The resistance posted by Arlo for the Gen1 motor is over 20mOhms which agrees with the figure I get for the gen2 motor. Also I think you are asking for trouble setting 500ns for deadtime on those Chevy Volt inverter IGBT's if you haven't scoped the gate signals to see how fast they are switching. Better to err on the side of caution.

Uhm actually the measurement I got was all over the place but almost never that low.

Amber DID NOT CALCULATE THE DEAD TIME CORRECTLY. This will cause miss readings in the resistance and all kinds of other problems. The dead time is determined by math based on all the worst case scenarios this is for prevention of a shoot through due to one transistor turning on before the other is fully off. If you are switching them to close together it will cause weird measurements. Also if you switch them to fast. Amber maybe its wise for you to start your own thread and we can try to debug your system.
 
Arlo1 said:
I would not put more then 10nf on the current signals it changes the timing. From signal to gnd

Maybe scope the hall signals vs the phase signals.

I dont mean to decouple current signals. They already have their caps. I am talking about hall sensors. They have 4K7 pullups, but i am wondering if it wouldnt be good to use 1nF cap on each signal towards GND?

A
 
kiwifiat said:
I think that there is something fundamentally wrong with your setup if you are getting 6.66 mOhms for motor resistance. The resistance posted by Arlo for the Gen1 motor is over 20mOhms which agrees with the figure I get for the gen2 motor. Also I think you are asking for trouble setting 500ns for deadtime on those Chevy Volt inverter IGBT's if you haven't scoped the gate signals to see how fast they are switching. Better to err on the side of caution.

No! Deadtime is set at 1.65us. You have misinterpreted the data. It was calculated and tried with another brain. I succesfully drove my ACIM car with this inverter. So i am not worried about deadtime. Well as long as 1650ns really mean 1.65us.

I am worried about low resistance. This is a parameter that is good for Emrax motor not Leaf. But strange is i also get very consistend measurement with only a 2uH difference and almost no resistance difference...
 
Back
Top