Current limit error

Nissan Leaf/e-NV200 drive stack topics
Post Reply
PoloLbricolo
Posts: 78
Joined: Wed Apr 10, 2019 2:32 pm
Location: France
Been thanked: 1 time

Current limit error

Post by PoloLbricolo »

I've wired the leaf inverter/motor with a 80s battery for testing, the precharge and main contactor work flawlessly which is nice :)
But when i hit start, i instantly get a Current limit error, which prevents me from making the wheels turn :(
I use the stantard leaf parameters that johannes put in.
I've looked here https://openinverter.org/docs/index.htm ... rs,36.html to try to understand what the error is but no luck.
in my opinion if i try to raise the parameter "ocurlim" i should get roling, i gess their is a curent spike when the main contactor closes.

Any advices ?
jon volk
Posts: 572
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 2 times

Re: Current limit error

Post by jon volk »

Not on a leaf setup, but Ive had a blown IGBT cause an overcurrent on start issue.
Formerly 92 E30 BMW Cabrio with Tesla power
nailgg
Posts: 119
Joined: Sat Dec 22, 2018 8:40 pm

Re: Current limit error

Post by nailgg »

Are you getting the same error when there is no actual voltage at the DC bus, i.e. when batteries are not connected?

What is the current ocurlim, il1gain and il2gain values? Have you calibrated your sensors and set ocurlim properly?

There shouldn't be a current spike when the main contactor closes. Precharge is there to prevent that. Also, the current sensors are located at the motor phase leads not on the DC bus, so your sensors should read 0 amps even there is a current spike.
PoloLbricolo
Posts: 78
Joined: Wed Apr 10, 2019 2:32 pm
Location: France
Been thanked: 1 time

Re: Current limit error

Post by PoloLbricolo »

jon volk wrote: Thu Jun 06, 2019 6:04 pm Not on a leaf setup, but Ive had a blown IGBT cause an overcurrent on start issue.
I've check by measuring the resistance between inverter phases and they are about 2M ohms.
nailgg wrote: Thu Jun 06, 2019 7:45 pm Are you getting the same error when there is no actual voltage at the DC bus, i.e. when batteries are not connected?
Will try tomorrow !
nailgg wrote: Thu Jun 06, 2019 7:45 pm What is the current ocurlim, il1gain and il2gain values? Have you calibrated your sensors and set ocurlim properly?
oculim is set at 600, il1gain and il2gain are 1,7 from memory (i'll double check tomorrow).
I haven't calibrated the sensors as i asumed the setup was good from johannes.
Do you have a link where i can find the calibration procedure ?
nailgg
Posts: 119
Joined: Sat Dec 22, 2018 8:40 pm

Re: Current limit error

Post by nailgg »

If the ocurlim is set to 600, then the issue must be arising from something else than a real over current. Especially if you aren't enabling the forward/reverse switches. I'm not sure about the Leaf hardware as I haven't used it before, but the error inputs are OR'ed on the main board, so the software can sometimes fail to recognize the actual error. An UVLO fault from the gate drivers could result in a false positive "over current", for instance.

For calibrating the current sensors, Johannes' Wiki has the instructions here: https://openinverter.org/wiki/Schematic ... structions

In a few words; with the high voltage removed and system started, just set the il1gain and il2gain to 1 first. Then simply put a known current through one of the sensors, say sensor 1. Then type "get il1" and you'll see some value. Increase/decrease il1gain and type "get il1" again, until you have the correct current measurement. Then do the same for the 2nd sensor. Don't forget to save when you're finished calibrating your system.
PoloLbricolo
Posts: 78
Joined: Wed Apr 10, 2019 2:32 pm
Location: France
Been thanked: 1 time

Re: Current limit error

Post by PoloLbricolo »

So i did some testing.
When there the HV battery is disconnected from the inverter, it doesn't show me Current limit error, it shows me precharge error (which is normal).
I had to callibrate the UdcGain, so now it's ready within 2v of what i measure.

However, even with the current limit error, you can still make the wheels turn. the power is limited to about 3Kw on the DC side. I tried playing with the ocurLim setting combined whith different il1 and il2 gains, but it didn't improve anything. Even when ocurlim set to 4000 A and moving the il1 and il2 gains from 0,5 to 7 , still the same power.

I also found that the boost setting was not high enough for the car to move, it was set at 400, which barely made the car move on flat ground. i increased it to 800 with no issues, and the launch was better (not crazy, it is still limited to 3Kw :cry: ).
Also changed Fweak to 200Hz which improved the smoothness of the launch.

I still don't understand the error, if there was a problem with an igbt, shouldn't the motor spin erraticaly ?

If anyone has some tested and working parameters for the leaf inverter,i'm intrested in the share :D
PoloLbricolo
Posts: 78
Joined: Wed Apr 10, 2019 2:32 pm
Location: France
Been thanked: 1 time

Re: Current limit error

Post by PoloLbricolo »

Ok, did some more testing.
I'm having the current limit error again with iacmax set to 5000A... Speed is limited to about 1000rpm. Measuring the current on the dc side is aout 30A before it cut's off.
Any ideas ?
nailgg
Posts: 119
Joined: Sat Dec 22, 2018 8:40 pm

Re: Current limit error

Post by nailgg »

I would do some hardware debugging to find where the issue is. First see the main board schematic here: https://github.com/jsphuebner/inverter- ... rdv1.1.pdf

You have a LM2901 voltage comparator for over current protection on your main board. When the voltage on ADC5>PB7 or ADC5>PB8 or ADC8<PB7 or ADC8>PB8, you'll have an over current trip. The ADC5, ADC8 pins come from the current sensors, and the PB7, PB8 are simple PWM signals whose duty cycles are set by the ocurlim parameter. The RC filters (R37/C32 and R38/C33) are used to smooth out the PWM signals into DC values so that the smoothened DC voltages can be used as reference for comparing with the current sensor outputs. An over current is detected for both phase 1 and 2 currents, and for both positive and negative current values. That's why there are four comparators in there.

Just make sure you read 1.65V on both ADC pins when there's no current on the motor. Also make sure the voltages on LM2901 pins 4/6/9/11 changes properly as you change the ocurlim. If you have an oscilloscope, probing the current sensor output vs. comparator reference could help.
PoloLbricolo
Posts: 78
Joined: Wed Apr 10, 2019 2:32 pm
Location: France
Been thanked: 1 time

Re: Current limit error

Post by PoloLbricolo »

nailgg wrote: Mon Jun 17, 2019 7:19 pm Just make sure you read 1.65V on both ADC pins when there's no current on the motor.
I had to take the inverter out but it's not as bad as i expected. I measured 1.5 V on pin 5,7,8,10.
EDIT: With no current flowing through.
nailgg wrote: Mon Jun 17, 2019 7:19 pm Also make sure the voltages on LM2901 pins 4/6/9/11 changes properly as you change the ocurlim.
Looked at pins 6/4 and 11/9 and the voltage went up as i took ocurlim param down from 2000A to 400A

I also took the time to calibrate my curent sensors ( i was way out with my gains).

Looks ok to me...
nailgg
Posts: 119
Joined: Sat Dec 22, 2018 8:40 pm

Re: Current limit error

Post by nailgg »

PoloLbricolo wrote: Tue Jun 18, 2019 2:21 pm take the inverter out but it's not as bad as i expected. I measured 1.5 V on pin 5,7,8,10.
EDIT: With no current flowing through.
Yes, 3.3k/4.7k gives you 1.5V, my mistake.
PoloLbricolo wrote: Tue Jun 18, 2019 2:21 pm Looked at pins 6/4 and 11/9 and the voltage went up as i took ocurlim param down from 2000A to 400A
Actually as you lower the ocurlim, voltage at a pair of pins must go up while the other pair must go down, symmetrical around 1.5V. The positive current reference must increase while the negative reference decreases (i.e. increases with minus sign).

After calibrating the sensors and ocurlim, I would first disconnect one of the current sensor outputs and apply 1.5V at that node. Then increase the voltage until it hits the compared reference voltage and trips out. Then restart the system and set the voltage to 1.5V again but this time decrease it until you hit the negative reference. Remember that the voltage should be 1.5V when you start the inverter operation. Start increasing/decreasing it after the inverter operation is started.

If you can make sure the ocurlim and over current trip is functioning properly, I would check the NAND chip. You might be getting a false over current error which is actually a desat error, for example. You can scope the pins 1/3/6 on the NAND chip.

EDIT: Just re-read your initial problem and wanted to make sure. By current limit error do you mean your inverter trips out at some point or just the power is limited? If you set the ocurlim, iacmax and idcmax to a huge value say 5000, the power is not limited by the inverter.
PoloLbricolo
Posts: 78
Joined: Wed Apr 10, 2019 2:32 pm
Location: France
Been thanked: 1 time

Re: Current limit error

Post by PoloLbricolo »

nailgg wrote: Tue Jun 18, 2019 10:36 pm EDIT: Just re-read your initial problem and wanted to make sure. By current limit error do you mean your inverter trips out at some point or just the power is limited? If you set the ocurlim, iacmax and idcmax to a huge value say 5000, the power is not limited by the inverter.
Both. I have the Current limit error showing up even with ocurlim set at 2000A (i'll try later today with 5000A on ocurlim, iacmax and idcmax)
When i test stuff i have a clamp meter looking at the current going out of the battery and when i reach 10 or 15A DC the inverter trips (opening the main contactor) and doesn't display an other error.

I'll try runing the inverter without the motor connected to see if the error still occurs.
nailgg wrote: Tue Jun 18, 2019 10:36 pm Actually as you lower the ocurlim, voltage at a pair of pins must go up while the other pair must go down, symmetrical around 1.5V. The positive current reference must increase while the negative reference decreases (i.e. increases with minus sign).

After calibrating the sensors and ocurlim, I would first disconnect one of the current sensor outputs and apply 1.5V at that node. Then increase the voltage until it hits the compared reference voltage and trips out. Then restart the system and set the voltage to 1.5V again but this time decrease it until you hit the negative reference. Remember that the voltage should be 1.5V when you start the inverter operation. Start increasing/decreasing it after the inverter operation is started.

If you can make sure the ocurlim and over current trip is functioning properly, I would check the NAND chip. You might be getting a false over current error which is actually a desat error, for example. You can scope the pins 1/3/6 on the NAND chip.
Will try that today i hope.
PoloLbricolo
Posts: 78
Joined: Wed Apr 10, 2019 2:32 pm
Location: France
Been thanked: 1 time

Re: Current limit error

Post by PoloLbricolo »

PoloLbricolo wrote: Wed Jun 19, 2019 6:29 am Will try that today i hope.
well that didn't happened... But i managed to make the motor spin ( at like 5000rpm) with decent curent (foot on the brakes and still had torque to push through)
I want to road test it (on private road) to feel the acceleration and power.

I still have the over current limit error but it doesn't derate as far as i can see.

The way that did it for me was to use johaness parameters from here viewtopic.php?f=11&t=32&start=60#p1302
leaf-2019-05-18.json

With fweak to 450 and boost to 1500.

So i would rule out the hardware issue for now.
nailgg
Posts: 119
Joined: Sat Dec 22, 2018 8:40 pm

Re: Current limit error

Post by nailgg »

Oh that makes sense. Johannes is also encountering a similar "trip out" issue on his Leaf motor, so he was working on implementing FOC for faster current regulation, here (not finished yet): viewtopic.php?f=7&t=153&start=20
JamesMi
Posts: 1
Joined: Thu Jun 27, 2019 6:37 am

Current limit error

Post by JamesMi »

the manual clearly states that with global charge control, "The controller current will be limited as necessary". What else could that mean except that PV charge controller current will be limited to the global setting when theres no other current draws from the system?
Post Reply