Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

nathaniel
Posts: 92
Joined: Thu Jun 09, 2022 10:17 am
Been thanked: 42 times

Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by nathaniel »

hi all,
i'm working on a conversion on my triumph spitfire (if i have some more time i will post my project) i have a Mitsubishi generator as motor and i use the stock front inverter and i want to see what the performance ware. long story short, it has it limitations. here some of my findings:
viewtopic.php?p=54222#p54222
so then i had a opel volt inverter converted with a openinverter mini board. calibrated the current sensors and the syncofs. motor was running good, after some parameter tweeking withe the help of Bigpie and pete9008 it ran a lot smoother but had still a current ossilating issue at higher rpm's, i started my questions in the Inverter Firmware 5.24.R thread but the issue was not related to that topic so that is why i make this thread. if you want to read from the start:
viewtopic.php?p=54084#p54084
so i'm picking up ware i left on that topic. because I already had the Mitsubishi inverter neatly installed in the car, I wanted to convert it with an open inverter board. what i did is leave the original controller in the inverter because it provides the power supplies for the gate drivers. no canbus commands are needed to make the power supply work, so that's a bonus. 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. i tested the output stages with low voltage and measured it with a scope and all 3 outputs pull and push so that's good. next i calibrated the current sensors and got a nice responsive trace in the graph. the i calibrated the resolver and i got a spinning motor with working regen again. but the strange thing is that it is really overcurrent happy, and the strange thing is that in forward the overcurrent triggers a lot faster then in reverse. for example i set the overcurrent to 500 amp and i gave a little throttle the car starts to roll but if i want a bit more power then it cuts out in overcurrent fault. but if a trace the il1 and il2 then the phase current is far from the 500 amp, also if i push the throttle very gentle. and in reverse this is not happening or at least a whole lot later. as fas as i understand is the current limit a hardware limit on the inverter board and if the current got higher then the reference voltage the opamp triggers and shuts the PWM stage of the microcontroller off. do i need the set the max current higher or is there something wrong in my setup? could this problem be resolver related? in manual mode i can push the id current to 100 amp without a turning motor so i think this is good.
resolver angle graph looks super smooth when i rotate the motor by hand, I could take a look at how this line in the graph looks during rotation.
the current sensors are 2,5 volt at 0 amp and the il1 and il2 are on 0 +- 1 amp or so in rest. gains are 2,31 so almost the same as the opel gains. so the big problem now is that i get really fast a OVERCURRENT fault, but faster in forward then in reverse. the oscillating behavior in id still seems to be there and maybe that is the cause of the current peaks and those peaks are so fast that they are not visible in the graph.
I can do more testing this week, what would be the values I should log so we can see where there might be a problem?

Thanks for contributing ideas!
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 »

I think the 2.5V may be the problem. The OI code works out, and uses, a DC offset when measuring and reporting the current and if the offset is too big raises the error mentioned in the other thread (you should see it if you request errors on the web interface). It means that firstly you are running on a reduced current range (the adc can only go from 2.5 to 3.3 rather than 1.65 to 3.3v so half the range). Secondly I'm not sure the offset is allowed for on the drive to the overcurrent comparator so it could be tripping far too soon due to the offset (not positive on this as my board doesn't have the comparator so I'm not too familiar with that section of code - will try to check tomorrow).

Is there any way you can divide the current signal down to get 1.65v at the micro pin for 0A?

Like your way of hooking the board in btw, any chance of a picture or two?

Edit - I think the oscillating may be due to the very low inductance of the Mitsubishi generator. I'd be interested to know whether it's motor speed dependant and if so at what motor speed it starts to happen?
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 »

thanks for the replay,
on the openinverter mini from johanes the il1 and il2 have voltage dividers on them to scale the input from 5 to 3.3 volt, so 2,5 volt is 1,68 volt on the uc. so that is nice in the middle i think. It's a pity I don't have any pictures of the conversion of the inverter. it's in the car now and not easy to get out So if it's not necessary I'd rather not take it out. but under the stock controller board there is space so i put the openinverter controller there.
the oscillation is definitely speed related, from 4000 to 5000 rpm it started to get out of hand.
if I put the car on the handbrake and then gave throttle, I can easily push it to 150 phase amps without the current limit tripping, then the current is also stable. but if the motor is spinning then the current is tripping.
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 gate drivers in the outlander inverter are optocoupler drivers with 5 volt on the anode and the pwm on the cathode, so i have used an inverter is to invert the pwm signals from the uc. and to act as a buffer that the uc is not driver in optocouplers directly. so in this setup low is active. but like I said I checked with the scope that all 3 phases push and pull, so I think that's ok. also checked the switching time, high side on is about 580ns and high off 1,8 us, low side is the same. so that would also fall within the default death time that is set. there is also no excessive heat in the inverter so again i think this is good. is there a possibility that I do not have the current sensors on the correct phases that the motor is running but may not be working properly? Or if something is not right that it just doesn't run at all? I think I'm right and when I swap pwm channels or current channels you only hear a tick when activating the inverter and it is immediately in 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 »

It sounds like you have it all set up right.

I'm wondering whether you are seeing this https://openinverter.org/forum/view ... #p53769 ??

Could you post the parameters that you are using with the Outlander inverter?
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 do think it looks like that, but need to do some more testing en making some graphs. when converting the mitsubishi inverter I also got a bit (how we cal it in the netherlands) "from the rain in the drip" had made a wiring error at the resolver and then wifi problems, so that caused some delay. I have the idea that my setup is now correct, but it is tuning the parameters. i still use the parameters from bigpie basically, tried lowering the curkp and curki a bit to try. but at this point I don't really know anymore whether the resolver was connected correctly at that moment, for example. so I actually have to start fresh and go over everything again. and maybe dive into how to calculate some of the parameters.
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 »

The only other thing I can think of that could cause the difference between forward and reverse is a slight resolver (syncoffs) offset (I did wonder whether there was a bug with the syncadv code when running in reverse but have had a look and can't see anything that looks wrong).

What process did you use to calibrate the resolver angle?
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by johu »

Asymmetries between forward and reverse operation point to some misalignment of PWM channels to current sensors. Can you tell us, which sensor senses current on the phase driven by PWM1 and likewise for PWM2 and 3. One phase won't have a sensor.

If il1 senses PWM1 and il2 senses PWM2 then you can run with pinswap=0. Otherwise pinswap needs to be setup so current sensors and PWM channels are lined up
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 »

thank you for the tip, I have double checked and PWM 1, 2 and 3 are connected correctly and I have double checked the operation of each stage with a function generator and the high and low side respond as they should. the current sensor is on phase 1 and 3, so i have pwm swap 2 and 3 enabled. but the only setting i got the motor running was current sens swap, so that was very strange of course. so the next thing was to check with a scope on the current sensors and i think i found something! there is quite a spike on the output of the current sensors when the pwm signal goes on and off, that pulse is just a few volts! even behind the small low-pass filter on the pcb, it passes.
the first picture is from the signal direct from the sensor and the second is behind the low pass filter and resistor divider.
IMG_20230320_162742.jpg
IMG_20230320_163135.jpg
So I think I'm going to replace the sensor wiring with shielded wire first. and otherwise possibly an extra low pass filter, but of course I can't filter too much. what would be a good suggestion for the cutoff frequency? 44khz or so?

edit: these scope images were made with the inverter in manual mode, Iq and Id at 0
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 »

You can find my thoughts on this starting here https://openinverter.org/forum/viewt ... #p51927
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 »

And because I still have the inverter open, I was able to take some pictures of course.
as said it is an open inverter mini, esp8266 wemos and 2x a 5 volt buck, one for the esp and one for the gates
IMG_20230320_165533.jpg
IMG_20230320_165539.jpg
IMG_20230320_165651.jpg
IMG_20230320_165659.jpg
IMG_20230320_165432.jpg
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 »

Very neat, I like the external antenna to get the WiFi signal out the box!

Any pictures of the rest of the conversion?

Edit - once you've got it all working are you going to put some hot glue/silicon around those soldered joints on the Mitsubishi pcb to give the wire a bit of support?
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 at my workshop now and I don't have access to the pictures now from the rest of the build, I will make a project topic of my car tonight when I'm home. i will link it here.
as I understand I can make a low pass filter, the spikes I'm dealing with now are in the Mhz range, and as I remember correct the filter on the board is 55khz or so. strangely enough, it still comes through a bit. so if i am going to make a pre filter at 20 to 40 khz i think the signal that is left is good enough for the controller to respond to. because that spike is of course the pulse that triggers the hardware overcurrent. what would be your opinion on that? I did not have this problem with the Opel inverter, but it naturally has other current sensors. I have not known the signal from the Opel sensors, I could test to see how they respond.
with the opel inverter I did have the problem of oscillating the current, wouldn't this also have been the basis of that problem?
and bigpie uses the prius inverter with other current sensors and he does not describe these problems, would those sensors already have some output filtering perhaps?
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 glue is a good point! thanks I hadn't thought of that before, but I'm definitely going to do it now!
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 »

At MHz frequencies it might be due to RF pickup or ground noise on the scope probe, you need to be pretty careful to get accurate measurements at high frequencies (difficult to comment without seeing the measurement setup). A low pass filter at 20-40kHz should be ok but it does all increase measurement delay which could make control loop stability worse.

If those pulses are real then they are very likely to be triggering the over current. I suppose the ideal would be to have heavier filtering on the feed to the over current comparator, not sure how easy that would be to arrange on that board though.

Bigpie does still get occasional trips although with the Prius inverter it's handled differently (no over current comparator on the OI board, all done by the Toyota driver board). We have a few ideas what may be causing them but nothing conclusive. Also when we tried high speed logging the current waveforms were a little odd at times, never really got to the bottom of that either.

Edit - if you use silicon on the wires make sure its the proper electronic grade stuff (the acid produced by the normal stuff while curing can corrode circuit boards). I usually use hot glue as it's quicker to set and a lot easier to remove if you need to rework it!
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 »

Just is case you are not aware of it the below is the best way to reduce the noise pickup when using a scope probe to measure a signal on a PCB:
ScopeProbe.JPG
Just remove the probe hook adaptor and the normal flying ground lead (which acts as an antenna or mag field loop at high frequencies) and replace with a small coil of solid core wire wrapped round the exposed scope tip earth connection. To measure find a PCB ground point near to the signal point, adjust the end of the wire to suit and press the wire to the ground point and the scope tip to the signal. With care you can measure pretty tiny signals in the presence of large amounts of noise.

High quality HF scope probes usually come with better versions of this (usually with insulation to reduce risk of shorting to the exposed ground).

Always use the x10 probe setting too!
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 am well aware of how to measure higher frequencies. with this measurement I had a short ground loop and after the filter on the open inverter mini the signal really looks different. but I also don't think that the sensor is causing these pulses but that the problem is in the wiring. it always surprises me that shielded cables are not used when switching high currents so close together. but since everyone seems to do it that way and not really being warned about it, I thought it wouldn't be too bad then. perhaps I should also use an impedance resistor, since the input on the openinverter mini has a very high impedance. I'll check the datasheet to see if it says anything about that. and maybe I can measure the impedance at the original controller. if the spike is caught in the wire, that will also make a difference of course.
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: Mitsubishi Outlander Front Inverter running openinverter, overcurrent issues

Post by johu »

As a last resort you could do more low pass filtering. Be aware you likely need to retune syncadv so the motor doesn't run away at speed. And like Pete says, phase margin suffers but may not be an issue.

Nissan also don't use shielded cables for the current sensors, they are about 10cm long. No issues there, but shielding is certainly worth a try.
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 »

Thanks for the probe tip, I was already familiar with it. good thing you brought it up. it also seems strong to me that such high frequencies are transported by such wiring installed in this way, so it must be absorbed in the wire itself. I'm going to try shielded cable tomorrow with correct impedance at the input. if we have tackled this problem, we can move on to the other problem if it is still tare.
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: Mon Mar 20, 2023 5:09 pm I am well aware of how to measure higher frequencies
That makes a pleasant change, I've lost count of the number of professional electronics engineers who didn't know it :)

Agree that shielding will do no harm and is always sensible. Was the current input on the original board single ended or differential?

Edit - wondering whether it's a ground loop issue rather than radiated??
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 original current sensor is single ended, the ground is connected about 1 cm from the ground pin of the openinverter mini. unfortunately it only has 1 ground pin that is quite far away from the analog inputs. I could possibly solder the ground of the current sensor directly to the openinverter mini as a last solution. I'll let you know how it goes tomorrow

edit - there is no ground loop in the current sensor part
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 »

I'm assuming that the supply/ground to the current sensor is coming from the Mitsubishi logic board?

Wondering whether the switching transient generated during the PWM transition is causing the logic board ground to move which is coupling onto the current sensor via its power supply and then coupling onto the signal to the OI board.

What is the ground connection between the Mitsubishi logic board and the OI board like? Would it be possible to reduce it's inductance/impedance at all?

Edit - just seen your edit, please ignore if not relevant!
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 »

No the current sensor is completely disconnected from the original controller. Sensor has one ground and that is connected about 1cm from the openinverter mini ground pin. 5 volt is coming from one of the 5 volt buck converters in my board, couple centimeters away. I use a split copper wire as a ground in my board. The power from the Mitsubishi controller to my board is directly from the 12 volt input. And only one thick ground between them. The pwm signals are opto couplers inputs and all the supply for that is coming from my controller.
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 »

That all sounds good, as you say ground loops shouldn't be an issue there.

Guessing it must just be capacitive coupling from the bus bar, it will be slewing by a few hundred volts so not that surprising. I think most OEM inverters rely on sampling at a quiet point on the PWM waveform. Unfortunately OI doesn't do that due to complications with the way the resolver is driven. I did have a look at changing it but there were too many issues associated with backward and hardware compatibility so gave up on it (details somewhere in the simulator thread). Still plan to implement it on my install though. That being said I'm not aware of it causing any issues on other installs.

Will be interesting to see if the oscillation persists once you have this inverter set up and working. I see something very similar in the simulator and am keen to know whether it occurs in reality too.
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 I'm also very curious to see if the oscillation is there or not as soon as I solve this issue. Keep you posted.
Thanks for the help for now, very appreciated
Post Reply