Nissan Leaf Gen3 inverter

Nissan Leaf/e-NV200 drive stack topics
User avatar
celeron55
Posts: 774
Joined: Thu Jul 04, 2019 3:04 pm
Location: Finland
Has thanked: 27 times
Been thanked: 110 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by celeron55 »

Kelju wrote: Tue Nov 03, 2020 8:51 am By the way, has somebody reverse engineered the Leaf Gen2 inverter processor card to the extend, that the KL15 (ignition switch signal) and the resolver circuitry can be pinpointed from the PCB?
In case it's of any help, at some point in time I made a gen2 inverter gallery that includes good PCB photos: https://imgur.com/gallery/cQNVs

Combine with Johu's pin mapping here: https://github.com/jsphuebner/inverter- ... f-gen2.txt

It's easy to see where the signals initially go to, but where they continue from that would take some hands-on measuring.

I do have an original gen2 board somewhere in case some simple measurement has to be done.
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

I've continued to investigate the strange behavior of the inverter. The following figure hopefully sheds some light on the origin of the issue.
It is a measurement made right at the high side and low side gate of one of the half bridges. Has anyone measured the signals right at the gate of the IGBT from a working inverter to compare?
Signal at IGBT gate.JPG
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

I made another adapter board with the modification that excluded the inverting open collector buffer and bybassed the PWM signals directly to the IGBT drive board. Obviously this meant that I needed to change the PWM polarity to active low.

I measured the current draw through a 3,9 Ohm power resistor from the 44V battery to the DC-link with various different dead time settings with both adapter board variants.
Both variants exhibited exactly identical behavior with the following results:

Deadtime -> battery current
255 -> 32mA
180 -> 46mA
150 -> 67mA

In the testing instructions it is mentioned, that there should be absolute NO current draw from the DC-link at this point.
Can someone confirm this? Seems like this cannot be absolutely zero with this inverter and the value does not drastically jump, but rather increases linearly as the dead time is decreased.

I am still working with the inverter which now has one of the phases defective due to my experiment with the full battery voltage. I guess I'll gradually increase the voltage by adding more battery modules in series and see what happens to the DC-link current. I cannot spin a motor anymore with this one...
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by johu »

Your waveforms are indeed mysterious. Especially where the blue line just stays half way (or 2/3 way) active and there is no deadtime. I'm assuming the drive signal generated by the stm32 don't look like this.
I don't exactly remember how I found the 78 deadtime for the gen2 inverter. I think dimishing returns, at some point the current hardly decreased with increasing deadtime so I left it there.
What is the HV current draw with PWM off?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

Without PWM there is less than 1mA of current draw and that is actually drawn by the 68kOhm passive discharge resistor which connects to the DC-link capacitor.

I am trying to understand what happened while trying to spin the motor in manual mode with full battery voltage.
The instruction says that the motor should spin at its nominal nameplate torque. Does this mean that it spins to the set frequency very fast due to the torque and once the speed is reached, the torque drops and the current draw is very low?
In my case the motor reached a steady speed, but then in a few seconds I heard this very unpromishing snap from the inverter and the motor was halted. Later investigation revealed that the high side IGBT from phase 2 was brigged.
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

The reason for the strange waveform is quite well explained in this link:
https://electronics.stackexchange.com/q ... e-ic-issue

In short, judging by the waveform, the half bridge is working just fine.

In that same explanation, the writer speculates about the cause of ringing at the switching events.
In his view, during the dead time, the inductive energy stored into the stator coil creates a resonance tank with the parasitic capacitance within the half bridge output. Once the dead time has passed, the resonance energy is introduced with a discharge path and quickly levels of.

This got me thinking. What if the IGBT died due to an over voltage caused by excessive ringing during the dead time?
The fatal test run was performed with a small induction motor and the cables where separate, practically all over the place, 2.5mm2 and with around 1m of lenght.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by johu »

so if you load down your two remaining phases with a resistor, the 2/3 part should be gone?
So maybe too much deadtime is unhealthy as well?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

I did some reading on properly setting up the dead time:

"One method of judging whether or not the dead time setting is sufficient or not, is to check the
current of a no-load DC supply line.
In the case of a 3-phase inverter (as shown in Fig.7-4), set the inverter’s outputs to open, then apply
a normal input signal, and finally measures the DC line current. A very small pulse current (dv/dt
current leaving out the module’s Miller Capacitance: about 5% of the normal rated current) will be
observed, even if the dead time is long enough.
However, if the date time is insufficient, then there will be a short circuit current flow much larger than
this. In this case, keep increasing the dead time until the short circuit current disappears. Also, for the
same reasons stated above, we recommend testing at high temperatures."


The rated current of the IGBT is 700A and 5% of this would be 35A.
My overly ringing current measurement signal indicates a peak around 40A, so from this respect also, the inverter seems to be working as it is supposed to.

I have not found anything solid yet about the failure mechanism. Excessive ringing during the dead time seems like a probable cause, but on the other hand there are freewheeling diodes integrated into the IGBT module which should have firmly dampened any oscillation to the low impedance battery.
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

Made some measurements with the single battery module supply.
This time I attached a random toroidal 1.4mH power inductor and a 1000uF 160V capacitor to one of the phase outputs to create a buck converter circuit. Then I loaded the system with my active load with several different current levels.
The setup can be seen in the picture.
The multimeter at the back measures the DC-link voltage. The one in the front measures the DC-link current (10mV/A).
The active load is drawing 10A in CC-mode. Efficiency is 85% and the thin cables are probably inducing a considerable voltage drop.
With 3A loading, the efficiency was 93,6%.
The oscilloscope measures the IGBT gates and as expected, with load on the output, the dead time can be seen at the falling edge of the high side IGBT gate signal.
Attachments
20201112_223935085.jpeg
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by johu »

Much better! How much deadtime now?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

Deadtime is 180 and with this setting the unloaded DC-link current is 50mA.
I'll start increasing the voltage next, but this time gradually by adding more modules one by one.
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

I tested with the deadtime set at 180 all the way upto full pack voltage of 355VDC and the idle current was 120mA without load so everything seemed normal and I went ahead and switched to FOC FW.

At first I wanted to test the position angle sensing without any HV applied on the DC-link.
But I ran into a problem. Right as I start the inverter in manual mode, I get an over current fault.
The current reading from both il1 and il2 steps to -1000.
My gain settings are correctly at -1.81 as I have experimentally found out.
The actual voltage reading at the V3 mainboard ADC input is 1,4V at both channels and I checked with oscilloscope set at single trigger that there is no glitch in the reading.

I also tried reverting back to SIN FW, but now I get the same result with SIN also.
All of this happened without any voltage applied on the DC-link.
Any idea what's causing this?
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

As mentioned, upon starting manual mode, I immediately hit over current and il1 and il2 reading around -1000.
This evening I tested once again without any voltage in on the DC-link with an ocurlim setting out of the range of my strange reading.
It actually worked and manual mode started with the current readings hovering around 0A as supposed to. After this I gradually dropped the ocurlim all the way back to -100 without any problems to start in manual mode. I do not have an explanation for this, but the behavior normalized.

Now it was possible to check my resolver wiring by turning the motor by hand. Position angle sensing seems to work correctly.

I then applied roughly 40VDC on the DC-link and started gradually increasing the id current. First the motor was for the most part just vibrating and then at around 70A it started spinning, but then stopped with due to reaching over current limit. Ocurlim was -100 at this point. I raised the limit to gradually to -300, but always the motor stopped after a short spin as current limit was reached.
After this I raised the DC-link voltage to 80VDC, but the behavior was pretty much the same with.

Each time the motor actually starts, it does so very rigorously. Is this normal?
Should the inverter regulate the phase current to the id setting?
What kind of ocurlim should I use here? In other words, how high is still normal?
Seems a little strange that the phase currents are rising so high.
I assume it is normal that while one phase current swings to positive, the other one swings negative, since the same current flows through the Y-connected stator windings.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by johu »

Kelju wrote: Thu Nov 19, 2020 10:35 pm Each time the motor actually starts, it does so very rigorously. Is this normal?
No, it should be silk smooth.
Kelju wrote: Thu Nov 19, 2020 10:35 pm Should the inverter regulate the phase current to the id setting?
Yes
Kelju wrote: Thu Nov 19, 2020 10:35 pm What kind of ocurlim should I use here? In other words, how high is still normal?
Even 100A must be plenty to just carefully spin the motor up and down
Kelju wrote: Thu Nov 19, 2020 10:35 pm Seems a little strange that the phase currents are rising so high.
Any pin swapping needed?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

I previously checked that I have the phases and current sensors matched, but the behavior definitely indicates a need for pin swapping.
I need to double check everything once more.
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

I double checked everything today. with the following steps:
1. il1 current sensor is measuring phase one and the reading is positive when current is flowing from the IGBT to the motor.
2. il2 current sensor is measuring phase two and the reading is positive when current is flowing from the IGBT to the motor.
3. Took out the V3 mainboard and disconnected the motor and drove each of the IGBTs on one at a time to check correct channel configuration.
High side outputs tested with a 39k resistor connected between phase output and DC-link(-).
Low side outputs tested with a 39k resistor connected between phase output and DC-link(+).
4. PWM1_TOP correctly drives the phase 1 high side and DC-link voltage is seen at output.
5. PWM2_TOP correctly drives the phase 2 high side and DC-link voltage is seen at output.
6. PWM3_TOP correctly drives the phase 3 high side and DC-link voltage is seen at output.
7. PWM1_BOT correctly drives the phase 1 low side and 0V is seen at output.
8. PWM2_BOT correctly drives the phase 2 low side and 0V is seen at output.
9. PWM3_BOT correctly drives the phase 3 low side and 0V is seen at output.
10. The encoder reads correctly. While turning the motor, the angle varies between 0...360 and without turning the jitter is less than +-1.

Everything seems to be correct, but still the reaction of the motor to Id is anything but smooth and current limit is asserted.
Is there a possibility that sin and cos are mixed? I do not know if the system would give any reasonable angle reading in this situation.
My pinswap setting is 0. Even though the connection are correct according to my tests, should I still try different pinswap values?
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by arber333 »

Kelju wrote: Sat Nov 21, 2020 9:39 pm Everything seems to be correct, but still the reaction of the motor to Id is anything but smooth and current limit is asserted.
Is there a possibility that sin and cos are mixed? I do not know if the system would give any reasonable angle reading in this situation.
My pinswap setting is 0. Even though the connection are correct according to my tests, should I still try different pinswap values?
Remember you are in torque mode. Check how much torque you command with minimal throttle offset. Maybe one setting is too much.
How much pole pairs are you showing?
How much resolver pole pairs are you showing?
Maybe gen 3 resolver is halfh pole from the motor, I have seen some motors that use 8poles and have 4 pole resolver.

What happens when you rotate motor by hand slowly? Is resolver report following?
Can you load the motor somehow? Like mount a wheel on it or a pulley? Maybe it doesnt like beeing freewheeled.

I have the same problem with a small ACIM motor with resolver control. Motor would jump and run roughly, but it would follow throttle.
Quriously i ran it in manual mode on V/Hz and it ran smoothly. I also swapped my dual board outputs and the first board runs motor smoothly DOH!
My scope shows me strange signal within resolver module. 2nd Resolver circuit is no different than the first one. I also changed various Olimex chips with no change in result. I am still resolving this. 8-)
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by johu »

Kelju wrote: Sat Nov 21, 2020 9:39 pm 1. il1 current sensor is measuring phase one and the reading is positive when current is flowing from the IGBT to the motor.
2. il2 current sensor is measuring phase two and the reading is positive when current is flowing from the IGBT to the motor.
Kelju wrote: Thu Nov 19, 2020 10:35 pm As mentioned, upon starting manual mode, I immediately hit over current and il1 and il2 reading around -1000.
This evening I tested once again without any voltage in on the DC-link with an ocurlim setting out of the range of my strange reading.
It actually worked and manual mode started with the current readings hovering around 0A as supposed to. After this I gradually dropped the ocurlim all the way back to -100 without any problems to start in manual mode. I do not have an explanation for this, but the behavior normalized.
So if you have positive current from IGBT to motor you shouldn't have negative current gains. Try deleting the "-" on ilXgain and ocurlim.

EDIT: I'd be surprised if Nissan changed the pole pairs. It is 4-4 on the gen2.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

I have positive current readings on the web interface when I have negative gain for the sensors. As the current flows from the IGBT to the motor, the voltage goes under the artificial ground of 2,5V of the sensor. I assume the (-) sign is in order.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by johu »

Ok, I see
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

About checking the number of motor poles and the correct configuration of the resolver.

Is it so that the angle on the web interface will change 360 degrees as the motor axle is turned one full revolution?

Is it possible that the angle feedback seems to be correct even though sin and cos are mixed?

I need to check how the angle changes in respect to the actual angle of the motor chaft in my case.
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

I checked the number of poles on the motor by running some current into phase 1 and sinking it through phase 2 with my programmable electronic load. With 8A current, 4 stable "home" positions can be sensed so from that respect the spec of this motor is the same as for the previous models: 4 pole pairs.

Then I continued my testing of the resolver.
With respoelpairs set at 4, I get the angle change from 0deg to 360deg already with 1/4 rotation of the motor shaft. This indicates that the respolepairs should be 16. However, this value does not work. I get a solid 0deg, whenever I have respolepairs set higher than (motor) polepairs.

Is it normal that I get 360deg from resolver when motor shaft only turned 90deg?

I popped the resolver cover open and this is what it looks like:
20201122_181204681.jpeg
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by arber333 »

Kelju wrote: Sun Nov 22, 2020 3:49 pm Is it normal that I get 360deg from resolver when motor shaft only turned 90deg?
You may set resolver to 8 pole pairs and try the motor at 4 pole pairs. Remember resolver works in quadrature mode.
So you may also try using 2 pole pairs on the resolver.

Some motors also have 5 pole pairs resolvers!!! :shock:
Also i noticed that there are some resolvers out there which amplify voltage from 1,6V exciter into 5V on sin/cos outputs. Those do not work with openinverter since signal voltage quickly saturates the input which accepts only 3V3. Try scoping the resolver sin/cos wires so you can see what is the max voltage return.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by johu »

Kelju wrote: Sun Nov 22, 2020 3:49 pm Is it normal that I get 360deg from resolver when motor shaft only turned 90deg?
Yes that is what 4 resolver pole pairs means. It is matched to the motor pole pairs. You can see 4 lobes on the core and it looks exactly like the Gen2 resolver. So theres not your problem, respolepairs=polepairs=4

Even with sin/cos swapped you will get angle feedback, just in the wrong direction.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

I thought maybe there is something wrong with the motor, so today I tested with a Motenergy ME1304 axial flux PMSM which I had available "off-the-shelf". This motor has a sincos position feedback and the V3 mainboard read the position feedback just fine.
To my big dissapointment the behavior is completely the same! The motor just make a rough click and over current fault is asserted.

I am also still experiencing a strange behavior every time I apply power to the V3 mainboard. After applying power, the stored occurlim value is -100.
If I try to start the inverter at this point even without any voltage applied on the DC-link, occurlim fault is asserted.
If I first set occurlim to over -1000, say -1100, the inverter start normally into manual mode. After this one successful entering into manual mode, I can set the occurlim back to -100 and it starts in manual mode just fine. The same happens with sin FW.
What could explain this behavior? Is it possible that something on the V3 mainboard is damaged? Remember, all the PWM channels, current inputs and position feedback is tested to work...

With the ME1304 connected to the inverter, I measured the phase outputs. The first oscilloscope capture shows the phase1 in blue and phase2 in yellow. The second picture shows phase1 in blue with phase3 in yellow.
According to the captures, Phase1 and 3 are in phase and both connected to DC-link(+) while phase2 is in 180 degree phase shift and driven to DC-link(-).
I had a light bulb in series, so this is why the voltage is only at 10V level after the starting pulses.
PH1_PH2.JPG
PH1_PH3.JPG
Post Reply