Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by Pete9008 »

Another thought, if it is capacitive coupling from the bus bar through the current sensor then a common mode choke on the cable bundle from the current sensor may help too (essentially increase the impedance and so reduce the current).

Edit - Ignore that, just tried some numbers and assuming 10pF coupling, 350V slewing in 1us only gives a few mA induced current - can't see that being the problem.
nathaniel
Posts: 92
Joined: Thu Jun 09, 2022 10:17 am
Been thanked: 42 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by nathaniel »

new day new testing, but I'm still chasing my tail. shielded cable added, didn't make that much of a difference. filtering added. works but the problem is still there. the strange thing is that the current sensors are on phase 1 and 3, so I use pinswap 2 and 3. when manually switched on you hear the motor buzz for a moment and then with a tap it goes into overcurrent after a few seconds. when i increase the ocurlim the tick gets louder but it keeps happening. so I do think there really is an overcurrent event. but now the question is why?
which is so crazy if I do pinswap 1 and 3 then I can just run the motor when I play with syncofs. I have tried all possible combinations but this is the only option that works. so i thought maybe the pinswap function is not quite right so i swapped pwm 2 and 3 in hardware. but now the same thing actually happens as in the old situation with pinswap 2 and 3. and now i can only run it with pinswap 2 and 3 and current sensor swap. I'm really lost right now. I had this before with this inverter, but I am now really sure that the pwm channels are connected correctly and also the sensor channels. I have not yet tested whether the motor has power and responds to the throttle, I am still working with the daimian current limiter in between.
Do you have any idea what else I could do?

edit - also played with negative current sensor scaling, but then when i enable the inverter it stops directly from overcurrent.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by Pete9008 »

Afraid I'm not too surprised by the shielded cable result, it must be some kind of coupling within the sensor itself. This is the reason why I'm quite keen to move the current sampling point to the PWM timer reload point (there is a couple of us window where no switching should be occurring there). Based on other peoples experience though I would expect your install to cope OK with the remaining noise spike, especially with the added filtering.

I think the original pinswap you had setup made sense (would need to check the source code to be sure), swapping 2 and 3 in the firmware puts phase 2 onto PWM 3, so matching your sensors on phase 1 and 3. If you swap PWM 2 and 3 in hardware you should then be able to run with no firmware pin swap set.

I'd still be interested to know how you are setting syncoffs up?
nathaniel
Posts: 92
Joined: Thu Jun 09, 2022 10:17 am
Been thanked: 42 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by nathaniel »

i'm going to test the opel current sensor, that inverter was working fine for me(apart from the current oscillation)
i set the syncoffs as daimian showed in his video. set a low Id current en start at syncoffs 0 and work my way up until to motor is not spinning anymore. and then increase the Id en repeat. but for now i'm already happy if the motor is spinning in manual mode when i set the syncoffs wrong.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by Pete9008 »

One question - is the spike on the current sensor coincident with the drive to the opto or is it delayed by a few hundred ns?

(guessing the later bust just want to make sure)
nathaniel
Posts: 92
Joined: Thu Jun 09, 2022 10:17 am
Been thanked: 42 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by nathaniel »

yes it is, it's a few hundred ns after the PWM is switching. so if it's possible to measure the current after that moment and also ignore the overcurrent for the moment then you might already be there.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by Pete9008 »

Another thought, your mention of a few seconds delay then the overcurrent got me thinking - is it possible that it's oscillating at idle now (the control loops are still running)? Have you graphed Id and Iq between it starting and tripping?
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by Pete9008 »

nathaniel wrote: Tue Mar 21, 2023 12:34 pm yes it is, it's a few hundred ns after the PWM is switching. so if it's possible to measure the current after that moment and also ignore the overcurrent for the moment then you might already be there.
The PWM reload is actually at the exact middle of each PWM pulse (both pos and neg, 2 reloads per cycle). The way the OpenInverter current and resolver sampling works is a little complicated but on average I think it is about 50-60us prior to that point so the sampling point may or may not coincide with the spike position dependant on the exact PWM value being output!
nathaniel
Posts: 92
Joined: Thu Jun 09, 2022 10:17 am
Been thanked: 42 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by nathaniel »

Pete9008 wrote: Tue Mar 21, 2023 12:35 pm Another thought, your mention of a few seconds delay then the overcurrent got me thinking - is it possible that it's oscillating at idle now (the control loops are still running)? Have you graphed Id and Iq between it starting and tripping?
the strange thing is that I see nothing on that trace, also with an burst of 100. it just goes into overcurrent, and sometimes with a violent jerk from the motor.

edit - sorry, current is around 0 when I start the manual mode. and even then it triggers the overcurrent after a few seconds. nothing to see on the Il 1 and 2 line
nathaniel
Posts: 92
Joined: Thu Jun 09, 2022 10:17 am
Been thanked: 42 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by nathaniel »

Pete9008 wrote: Tue Mar 21, 2023 12:38 pm The PWM reload is actually at the exact middle of each PWM pulse (both pos and neg, 2 reloads per cycle). The way the OpenInverter current and resolver sampling works is a little complicated but on average I think it is about 50-60us prior to that point so the sampling point may or may not coincide with the spike position dependant on the exact PWM value being output!
so the pulse is captured by the hardware security, so the software will not be affected by the pulse?
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by Pete9008 »

nathaniel wrote: Tue Mar 21, 2023 12:47 pm the strange thing is that I see nothing on that trace, also with an burst of 100. it just goes into overcurrent, and sometimes with a violent jerk from the motor.
Could easily be wrong but I'm wondering whether the extra delay from your filter is reducing the phase margin on the control loops and now the stability is marginal even with the motor stationary. If that was the case then it might be OK for a while then a small change (noise, small change of rotor angle, etc) could trigger it to quickly go into oscillation (possibly even too fast for the graphing to notice).

Would it be worth bypassing the filter and seeing if the behaviour reverts to yesterdays?
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by Pete9008 »

nathaniel wrote: Tue Mar 21, 2023 12:48 pm so the pulse is captured by the hardware security, so the software will not be affected by the pulse?
The software will be less susceptible to the pulse because:
a) it might not coincide with the sampling point
b) even if it does the software takes three measurements and takes the median (at least I think that's what the latest code does)

The hardware over current comparator will always see the pulse though. That's why I wondered whether heavier filtering just on the comparator input might be a good way to do it.
nathaniel
Posts: 92
Joined: Thu Jun 09, 2022 10:17 am
Been thanked: 42 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by nathaniel »

this was also exactly happening before the filter. I made a filter with around 65khz so I guess it doesn't matter that much. but i will try to remove it soon. I am now working on installing the opel current sensor. I also think it triggers when the motor turns a little bit, for example. the time it takes before it goes into overcurrent is also always different.
nathaniel
Posts: 92
Joined: Thu Jun 09, 2022 10:17 am
Been thanked: 42 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by nathaniel »

exactly the same with the opel current sensor. the strange thing is that the opel inverter just worked, why should everything be so different now? and how can you explain if I use wrong pinswap that the motor can run? I think there is a part of the problem there.
apart from the fact that I do agree to give the hardware security some extra filtering. would the mitsubishi output stages have sharper switching edges causing these problems?
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by Pete9008 »

nathaniel wrote: Tue Mar 21, 2023 1:16 pm and how can you explain if I use wrong pinswap that the motor can run? I think there is a part of the problem there.
Maybe I misunderstood the description of what worked and what didn't, could you explain again?

In case it helps my understanding is that as long as increasing values on 'software' PWM 1 cause positive currents on Il1 and increasing values on PWM 2 cause positive currents on Il2 then the setup is right and the control loops should be happy. It doesn't matter whether the swaps are done in software or hardware.

Note - the preceding is using the internal 'software' PWM 1, 2 and 3 channels, this only agrees with the external physical output lines if the software pin swaps are off. If pin swaps are used then the internal 'software' channels will no longer match the external drive lines.

Edit - I suppose there is a very small chance that there is code or schematic error somewhere, the default setup process seems to be trial and error so it's just about possible it could have gone unnoticed??
nathaniel wrote: Tue Mar 21, 2023 1:16 pm would the mitsubishi output stages have sharper switching edges causing these problems?
I'm struggling to see what difference there might be that could explain this. The only thing I could think of is a slower driver (longer delay between PWM change and IGBT switch) but it would have to be a lot slower which doesn't tie up with the few hundred ns delay measured.

At the moment I don't think the pulse is the cause, it doesn't fit the variable delay till the trip occurs. The variable delay, and the trip on possible motor movement, suggest to me either control loop instability or mismatch between PWM channels and current measurement channels (either channel or polarity mismatch).

Edit - or a resolver issue, even in manual mode the resolver is still needed to convert from Iq and Id to PWM values. If the direction is wrong or there are discontinuities in the output you could well get the results you see. Worth plotting the angle while manually turning the motor to check if you haven't already.
nathaniel
Posts: 92
Joined: Thu Jun 09, 2022 10:17 am
Been thanked: 42 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by nathaniel »

i think i have success! reading the wiki again I found out if you use negative gains for the current sensor you also have to set negative ocurlim. so now with the hardware swap Pwm 2 and 3 and pinswap on 0 I can run the motor! redo a syncofs calibration and the motor is responding like i shut! no overcurrent events anymore. so now I'm going to put the inverter back in the car and take it for a test drive, I'm very curious!

i really hope this was the problem, It's quite a learning curve but I find it very educational. thank you very much so far and I will let you know if the car runs well

edit - regarding the direction of the current sensor, I saw an arrow on the sensor pointing towards the inverter, and it should have been pointing towards the motor, that was my clue
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by Pete9008 »

Great news, hope it's all sorted :)
nathaniel
Posts: 92
Joined: Thu Jun 09, 2022 10:17 am
Been thanked: 42 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by nathaniel »

I'm happy to report that the car is running perfectly! I'm super happy. The gremlin is always in the details. But I've learnt a lot and that is nice.
The current oscillation is still a little bit present but not as much, tomorrow I will make some graphs and I'm going to tweek some settings.

So for the people who want to use the Mitsubishi inverter, invert the il gains AND the current limit. And also pinswap23
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by Pete9008 »

Glad to hear it's working well :)

Look forward to seeing your data (and more details on the car!)

Edit - just looking at the firmware for something else and had a look at this while there. I take back what I said before, the code for the hardware over current circuit does take account of the 0A offset when setting the limits. The firmware uses the ilxgains as part of the calculation so if they are negative the current limit signals end up being inverted and so the over current detect circuit is always active. As you found using a negative current limit value corrects for this and restores correct operation.
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: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by johu »

Great it works now :) Damien has just been through the same permutations for getting the M3 to spin.
Wanted to fix ocurlim handling a long time ago, requiring the same sign as the gains is a bit silly. Somehow never took the time to think it though
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Romale
Posts: 441
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 204 times
Been thanked: 45 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by Romale »

johu wrote: Wed Mar 22, 2023 9:31 pm Great it works now :) Damien has just been through the same permutations for getting the M3 to spin.
Wanted to fix ocurlim handling a long time ago, requiring the same sign as the gains is a bit silly. Somehow never took the time to think it though
it seems right to me.
since the sensor signal is negative, then ocurlim negative is reasonable.
evil neodymium :twisted:
nathaniel
Posts: 92
Joined: Thu Jun 09, 2022 10:17 am
Been thanked: 42 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by nathaniel »

The video from Damian was for me the trigger to look at the current sensor direction. But then it took a couple of days to figure out that I need to set the limit also in negative. To be fair, it is documented in the wiki. And now I've learnt a lot of the firmware and what symptoms there are and what causes them. So it costs me a lot of time but it was not waisted time.
Die not make a graph of the current now. I will do it at a later point.
Is the informatie about this inverter valuable to put in the wiki? How to convert the Mitsubishi inverter to open inverter.
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: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by johu »

nathaniel wrote: Thu Mar 23, 2023 5:27 pm Is the informatie about this inverter valuable to put in the wiki? How to convert the Mitsubishi inverter to open inverter.
I very much vote for it
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
nathaniel
Posts: 92
Joined: Thu Jun 09, 2022 10:17 am
Been thanked: 42 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by nathaniel »

here some pictures of my project:
viewtopic.php?t=3450
User avatar
Romale
Posts: 441
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 204 times
Been thanked: 45 times

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by Romale »

nathaniel wrote: Sat Mar 18, 2023 10:05 pm ........then I cut off the 6 pwm signals, resolver and current sensor and udc measurement that come from the original controller and connected it to the openinverter mini. I left the rest on the original controller. an additional advantage is that the original controller measures a multiple temperature sensor in the motor and inverter, so I can still read this via canbus.
IMG_20231118_193544.jpg
could you please share the pinout of this white connector? thank you!
evil neodymium :twisted:
Post Reply