[DRIVING] VW Touran powered by Nissan Leaf  [FINISHED]

Tell us about the project you do with the open inverter
nailgg
Posts: 119
Joined: Sat Dec 22, 2018 8:40 pm

Re: VW Touran powered by Nissan Leaf

Post by nailgg »

johu wrote: Sun May 19, 2019 11:40 am The issue is that stator current is not in phase with stator voltage, as far as I know. There is also mention of injecting a low DC current to determine
No they aren't in phase as you mentioned because of the inductances, but is this an issue at all? I meant we could scope the time difference between phase voltage and resolver, not the currents. A low-pass filter is all we need, something like 10k Ohm + 22 nF (~723 Hz cut-off) would be enough to eliminate the PWM while running the motor through the inverter. Also toggling a pin at the resolver zero-point sounds very practical.

I actually made a crude simulation for this method on Matlab and it looks promising. But to test it in practice I need a whole new inverter power stage hooked up to my Leaf motor, which has been laying around for years. Someone who already has all the setup might give it a try :P
User avatar
johu
Site Admin
Posts: 5778
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1018 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

So I did a few more experiments.
At first I tested the over current limit. I had it set to 800A but when plotting il1 and il2 and pulling against the handbrake I got shutdowns near 180A. Si I revisited the "break interrupt" i.e. the routine that is called when the inhibit signal is triggered. It tuns out I did all sorts of things and then checked the pins for the shutdown reason.

I have now turned this around and bingo, what I thought were over current shutdown were actually desat events! Or more precisely desat OR some other fault signal, probably temperature. So since the shutdown occurs beyond some delay it could be that the flow rate of my pump/radiator is too low and I get local overheating. Also 180A (provided my current sensors are calibrated ok) seems a bit low for desat. Anyway, I set iacmax to 200A and ocurlim to 400 and I'm getting less desat/overtemp shutdowns.

I also tested behaviour ad speed. I tested with the idle speed controller 1000, 2000, 3000, 4000 rpm with 50% throttle limit. It turns out a setting of syncofs that works well at 1000rpm (56000) gives high currents at 2000rpm, likewise at 3000 and 4000rpm. So about for every 1000rpm I had to increase syncofs by about 500 dig (about 3°) to run with low current. Whether that is down to the motor or to some lag in position sensing I don't yet know.

When keeping the speed fixed at 1000rpm it was quite irritating to see that changing the offset from 56000 to 56500 (3° !) would cause the current to rise from 4A to 40A! Not very forgiving this beast.

So my hopes are that dethrottling my cooling system might help the shutdowns and that I can find a "syncadvance" value that compensates the apparent lag of the position sensing.

Just for repetition, here is the cooling system: auxiliary water pump from some Mercedes and passenger room heating radiator.
Question: could there be air in the inverter? I have no idea how to de-air a cooling system?

Image
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by Jack Bauer »

I can't really see from the picture but do you have a coolant resevoir? Typically you would want one teed into the pump input to put a little static pressure on the feed.

Do you think the resolver tracking is lagging the rotor position?
I'm going to need a hacksaw
User avatar
johu
Site Admin
Posts: 5778
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1018 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

Jack Bauer wrote: Sun May 19, 2019 5:40 pm I can't really see from the picture but do you have a coolant resevoir? Typically you would want one teed into the pump input to put a little static pressure on the feed.
Yes the original one. It sits on the tube that exits the picture. So you're saying I should instead connect it to the pump input?
Jack Bauer wrote: Sun May 19, 2019 5:40 pmDo you think the resolver tracking is lagging the rotor position?
Inherently, yes. By the time you read the resolver and command the new dutycycle the motor has already moved on. The faster it spins, the more. At 17.6 kHz the position update rate is 4.4kHz or 228µs. So at 2000rpm that creates a lag of 2000rpm/60/1,000,000*228*360=2.7°. As mentioned that amount of angular shift can decide between 4A or 40A.

EDIT: wrong.Position update rate would be 8.8kHz/114µs. So everything halved. 1.4° then... could still make a difference.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 4 times

Re: VW Touran powered by Nissan Leaf

Post by Kevin Sharpe »

johu wrote: Sun May 19, 2019 5:21 pmI have no idea how to de-air a cooling system?
I've used a vacuum filling system in the past and plan to use it again on my Tesla P100 battery modules :D

This is a personal post and I disclaim all responsibility for any loss or damage which any person may suffer from reliance on the information and material in this post or any opinion, conclusion or recommendation in the information and material.
User avatar
johu
Site Admin
Posts: 5778
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1018 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

Nice, never knew this existed.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 233 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by arber333 »

The cooling system is very simple to deair(eiluft you guys say in Germany) if you dont have some elaborate valves and heating elements included.
1. You have your reservoir with one supply line and one output line in case liquid would boil.
2. supply line leads to 3way port on water hose from motor to radiator
3. cooler fluid from radiator to suction pump and back to motor

I use another 3way port element in section between radiator and pump. 2 points just pasthrough liquid, but i connect third one to a toilet hose with a screw plug in the end. When i have to deair my system i just supply liquid to reservoir and run the pump. When it starts to suck air i open the end valve and wait for the air to evacuate and liquid to flow from there. That is it. You can use even larger hoses. What is important is that your plug is higher than the system so air can evacuate to the highest point - the plug.
Attachments
IMG_20190519_211625.jpg
IMG_20190519_211613.jpg
User avatar
johu
Site Admin
Posts: 5778
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1018 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

Like that basically?
What do you guys think about the radiator?
Attachments
kühlung.png
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 233 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by arber333 »

It is a bit small and without active cooling. Starts will heat up inverter a lot. Is that a car heater core? This would do for the motor, but for both inverter and motor i dont think it will be enough.
I think i will use original radiator for the motor and i will first let the water from radiator to inverter and charger and then to the motor. From here dT would have to be dropped fast. I will write more about it when i have motor in a car.
rikohm
Posts: 29
Joined: Tue Feb 26, 2019 8:08 pm
Location: Piteå, Sweden

Re: VW Touran powered by Nissan Leaf

Post by rikohm »

Might be a good idea to put the pump after the cooler if you are expecting higher temperatures, less risk for cavitation.
(and pump runs cooler, lasts longer)
pm_dawn
Posts: 36
Joined: Mon Jan 07, 2019 7:19 am
Location: Östersund/Sweden
Contact:

Re: VW Touran powered by Nissan Leaf

Post by pm_dawn »

johu wrote: Sun May 19, 2019 10:14 pm Like that basically?
What do you guys think about the radiator?
Hi Johannes!

I think that you have to change the flow of the coolant a bit.
You should try to pump push cold fluid from the bottom of the radiator through first the inverter, then the motor and out into the top of the radiator.
Having the radiator the way you have it now with both inlet and outlet on the top gives the least of cooling.
If you look at the ICE radiator you normally have the hot inlet in the top on one side and the the cold outlet on the other side on the bottom.
That is to force the fluid to move through the whole radiator, if you have both inlet and outlet on the top there is a big risk of creating a layer of cold fluid in the bottom and then the hot fluid in the upper parts of the radiator. Atleast if you have low flow.

A fan for pushing air through the radiator will also help when stationary.

Regards
/Per
User avatar
johu
Site Admin
Posts: 5778
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1018 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

Ok thanks guys, will re-arrange that :)

I was thinking about heating in winter. Instead of a resistive heater I could just deliberately run the motor with low efficiency to create extra heat. I would use a valve to run all fluid through the heater core in passenger room.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
langoo
Posts: 65
Joined: Thu May 09, 2019 6:27 pm
Location: Varberg, Sweden

Re: VW Touran powered by Nissan Leaf

Post by langoo »

johu wrote: Mon May 20, 2019 4:22 pm Ok thanks guys, will re-arrange that :)

I was thinking about heating in winter. Instead of a resistive heater I could just deliberately run the motor with low efficiency to create extra heat. I would use a valve to run all fluid through the heater core in passenger room.
See attachment for how I've done in my car. Works like a charm and I've never seen any temperature rises above 25 degrees celcius.
Attachments
Cooling system
Cooling system
Robin Hellström
MR Electronics AB
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 233 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by arber333 »

johu wrote: Mon May 20, 2019 4:22 pm Ok thanks guys, will re-arrange that :)

I was thinking about heating in winter. Instead of a resistive heater I could just deliberately run the motor with low efficiency to create extra heat. I would use a valve to run all fluid through the heater core in passenger room.
Hm... i am not sure you would want motor at that low efficiency...
User avatar
johu
Site Admin
Posts: 5778
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1018 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

arber333 wrote: Wed May 22, 2019 10:50 am Hm... i am not sure you would want motor at that low efficiency...
Well when driving at 20kW you'd already generate like 1-2kW (5-10%) of waste heat. So why not ditch another hardware component by adding some reactive current.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
doobedoobedo
Posts: 260
Joined: Sat Jan 12, 2019 12:39 am
Location: UK

Re: VW Touran powered by Nissan Leaf

Post by doobedoobedo »

I think it might be quite inefficient. You've got the thermal mass of everything the coolant travels through and then the time for everything to warm up sufficiently to get enough heat into the cabin. You won't be de-misting your windscreen before you set off...
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 233 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by arber333 »

johu wrote: Wed May 22, 2019 9:05 pm
arber333 wrote: Wed May 22, 2019 10:50 am Hm... i am not sure you would want motor at that low efficiency...
Well when driving at 20kW you'd already generate like 1-2kW (5-10%) of waste heat. So why not ditch another hardware component by adding some reactive current.
It would be interesting to try. But some of the guys in Slovenia already tried this like 5 years back and finding was that in summer you can get dT difference, but in winter starting temperature is so low that it takes a long time to heatup the liquid. I need like 6kW to drive in town and some 21kW to drive on highway. 10% losses would ammount to some measly 2kW. Equivalent car heater uses 5kW either electric or burner. KWs are just not there...
Also liquid temperature would have to be at 60deg and that is not desirable with inverter cooling.

It is interesting for experiment, but keep a dedicated heater in a car in winter.
I belive seat heaters are better alternative for mild temperature differences. And i found them quite cheap on ebay etc... I use this in Mazda.
https://www.ebay.co.uk/itm/4x-Seats-Car ... 0005.m1851
User avatar
johu
Site Admin
Posts: 5778
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1018 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

Yes I was already angry at myself for not buying a Touran with heated seats in the first place.
I had the idea while I was testing. In the end the hole cooling system was getting barely touchable. Keep in mind the motor generates most heat so if you can remove most of it before cycling back to the inverter it should be alright. Agreed that it takes quite a while to heat up.

Of course in summer (or whenever the heater is turned off) I'd aim for max efficiency.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5778
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1018 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

Ok, re-tubed the cooling system. It started to rain, so photo next week.
Basically hot water exits the motor, into a splitter from reservoir and to pump. From pump another splitter into the front radiator or into the passenger heater core. From either radiator back to the inverter. The exit from the heater core has a de-airing spliter. I'm looping it back into a reservoir but quickly realized that this leads to hat water cycling back into the reservoir and directly to the pump. So once de-aired it has to be closed off.

More driving experiments. I can easily go up the hill in second gear now. I have made an experiment to find out the lowest current for turning the idle motor at a given speed. Turns out for every 1000rpm/66Hz added 800 digits (4.4°) must be added to syncofs. That is about 12 digits/Hz so I set syncadv to 12.
So while 55000 gives the best torque/amp when idling, it turns out adding another 7000 digits/38° actually gives the best torque/amp when actually pulling.

Remaining problem is unwanted regen. It accelerates nicely but as soon as I ease the throttle current goes up and inverter trips out.
I added a second syncofs parameter for regen but didn't find a good value for it.

Not sure if I'm ready to try FOC yet. Does the whole syncofs stuff become irrelevant when using FOC? Is it just Park/Clarke - (PID for iq, PID for iq) 1/(Park/Clarke)?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
nailgg
Posts: 119
Joined: Sat Dec 22, 2018 8:40 pm

Re: VW Touran powered by Nissan Leaf

Post by nailgg »

johu wrote: Fri May 24, 2019 6:35 pm Not sure if I'm ready to try FOC yet. Does the whole syncofs stuff become irrelevant when using FOC? Is it just Park/Clarke - (PID for iq, PID for iq) 1/(Park/Clarke)?
How is the V/Hz ratio maintained while you're releasing the throttle? If the current goes up too much, would increasing ampmin (say 80%) help to fix this?

I don't think the syncofs becomes irrelevant when using FOC. You still have to provide the correct rotor position in order to transform to the correct d-q axis. Otherwise, the values you'll control won't be the true id and iq.
User avatar
johu
Site Admin
Posts: 5778
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1018 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

nailgg wrote: Fri May 24, 2019 7:43 pm How is the V/Hz ratio maintained while you're releasing the throttle? If the current goes up too much, would increasing ampmin (say 80%) help to fix this?

I don't think the syncofs becomes irrelevant when using FOC. You still have to provide the correct rotor position in order to transform to the correct d-q axis. Otherwise, the values you'll control won't be the true id and iq.
Yes basically it is done via ampmin. So say ampmin=50% and brkmax=-10% then ampnom would vary between 45%-50% in the regen region. 50% is supposed to be freewheeling voltage. But due to various non-linearities that is the hard part. So being able to replace V/Hz by a current mode loop could help. We already have ilmax but of course that is always positive. So if we could figure out when the motor is motoring and when it is regenning ilmax could become signed and we could to regulation on it.

I believe if you look at the sine peak that is generated by PWM and at the same time you check current polarity we could do just that. Current at sine peak positive = motoring, negative = regenning
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
nailgg
Posts: 119
Joined: Sat Dec 22, 2018 8:40 pm

Re: VW Touran powered by Nissan Leaf

Post by nailgg »

So, 50% ampnom is supposed to be the freewheeling voltage, but it's true as long as the fweak (and udcnom) is set correctly for the Leaf motor. Isn't it? We should know the exact V/Hz ratio of the back-emf of Leaf motor. Or do we already know it? I personally don't :)

For the current regulation idea, sounds nice and easily implementable without too much work. So I wondered and simulated it with a FOC model. The simulated motor is an ACIM, but a PMSM would behave the same. The result is that we can easily tell if we're motoring or regenerating by comparing the current vs. PWM generated sine voltage. Attached has two graphs, the upper one is (phase U) current (per-unit, scaled down to between 1 and -1) vs. (phase U) PWM voltage, lower one is battery (DC) voltage. Motor is in motor mode until around second 1.1, then it starts regenerating.

Edit: Edited graph due to a wrong plot
Attachments
regen_sim.png
User avatar
johu
Site Admin
Posts: 5778
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1018 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

Very nice. So when motoring current is almost in phase with U_L1. U_L1L2 would be -30° offset.
When generating current is about 90° offset from U_L1.
In other words if L1 PWM voltage is positive at - to + zero-crossing of L1 current we are generating, otherwise motoring. So this calculation could happen where currently RMS calculation happens.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
nailgg
Posts: 119
Joined: Sat Dec 22, 2018 8:40 pm

Re: VW Touran powered by Nissan Leaf

Post by nailgg »

johu wrote: Mon May 27, 2019 9:08 pm In other words if L1 PWM voltage is positive at - to + zero-crossing of L1 current we are generating, otherwise motoring. So this calculation could happen where currently RMS calculation happens.
Exactly!
User avatar
johu
Site Admin
Posts: 5778
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1018 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

Well, just tried it. Its not terrific. So at higher speeds and loads it can reliably detect energy flow but, as usual, at low speed it all becomes pretty random.
Here's the snippet:

Code: Select all

   EdgeType edge = CalcRms(il1, Param::Get(Param::il1), currentMax[0], rms, samples[0], il1PrevRms);

   if (edge != NoEdge)
   {
      Param::SetFlt(Param::il1rms, rms);

      if (((angle + 38228) & 0xFFFF)> 32767)
         sign = edge == PosEdge ? -1 : 1;
      else
         sign = edge == NegEdge ? -1 : 1;
Forgive the magic numbers. 38228 is 180°+30°. I had this as a parameter for testing and that was the best value.
So like said, for frequencies above, say, 20Hz I consistently get positive sign when accelerating and negative when braking. Below that it jumps between negative and positive not useful for current regulation.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Post Reply