[DRIVING] Renault Clio Electrique -97

Tell us about the project you do with the open inverter
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Renault Clio Electrique -97

Post by Pete9008 »

That could work well :)

Not sure I'd vary the voltage with speed though. Instead I'd add another controller very much like the FW one but with a higher target margin, say 4000, and limits of say 350V (ideally a little below the actual battery voltage) and 550V. The output from this would then be the target voltage for the boost converter controller. The idea would be that normally no boosting occurs, so minimal boost losses, but if the voltage margin drops below 4000 then the boost comes in and restores the margin. Once the boost converter runs out of volts the margin would continue to drop and once it hits 2000 the FW controller would come in as usual.

I think this may actually be more efficient overall as it would be operating in pure MTPA, rather than FW, for more of the time.
User avatar
bexander
Posts: 834
Joined: Tue Jun 16, 2020 6:00 pm
Location: Gothenburg, Sweden
Has thanked: 63 times
Been thanked: 89 times

Re: Renault Clio Electrique -97

Post by bexander »

I appreciate the effort but I'm currently running with my Yaris inverter, feeding DC into the motor bus, hence no possibility to boost.
I do have a plan to source another Prius inverter but would prefer to run without booster for reliability and simplicity reasons.

Did a very quick compare in the sim with 360V vs 550V and there is a gain to be made but max power will be limited to the boost power which i think is around 27kW but you would likely get 27kW all the way up to 400Hz.

I'd rather use the user PWM to control the DC/DC in the Toyota inverters. Would it be possible to add a forth pwmfunc mode, constant? I guess then pwmgain would set frequency and pwmofs would set duty cycle? I would love if I could get a constant frequency in the range of 20-200Hz and a duty cycle of 53%.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Renault Clio Electrique -97

Post by Pete9008 »

bexander wrote: Tue Jan 10, 2023 5:07 am Did a very quick compare in the sim with 360V vs 550V and there is a gain to be made but max power will be limited to the boost power which i think is around 27kW but you would likely get 27kW all the way up to 400Hz.

I'd rather use the user PWM to control the DC/DC in the Toyota inverters. Would it be possible to add a forth pwmfunc mode, constant? I guess then pwmgain would set frequency and pwmofs would set duty cycle? I would love if I could get a constant frequency in the range of 20-200Hz and a duty cycle of 53%.
Fair enough but that's exactly what i was thinking, only run the boost when it is needed to maintain power as motor speed increases. I think the 27kW may be for the lower Prius battery pack voltage so you may get a bit more with your voltage (I seem to remember a 100A limit although not sure whether that is peak or continuous?).

Sorry, I'm not familiar enough with the code to comment on the possibility of a 4th pwm.

One other thing. For a while I've been wondering about adding a feature to the simulator to allow it to calculate motor parameters from logs by running the log through the motor model and tuning the parameters till they match. I'd previously been thinking that only a high speed/quality binary log would be good enough but if you could take a web page csv log I could give it a try? The log needs to include motor speed, Ud, Uq, Id and Iq. It ideally needs to be a relatively short log (say 30sec), have high time resolution, be taken on level ground (no hills) and include acceleration, deceleration and coasting. Let me know if this is something you would be interested in trying?
User avatar
bexander
Posts: 834
Joined: Tue Jun 16, 2020 6:00 pm
Location: Gothenburg, Sweden
Has thanked: 63 times
Been thanked: 89 times

Re: Renault Clio Electrique -97

Post by bexander »

Did a new coast up and tried to do a better step but now relizing I don't know what to do to make it better.
I get odd Ld and Lq from that plot, like 3,3mH and 0,4mH or 10,9mH and 0,3mH.
Screenshot_2023-01-10_09-11-35.png
Screenshot_2023-01-10_09-14-44.png
User avatar
bexander
Posts: 834
Joined: Tue Jun 16, 2020 6:00 pm
Location: Gothenburg, Sweden
Has thanked: 63 times
Been thanked: 89 times

Re: Renault Clio Electrique -97

Post by bexander »

Pete9008 wrote: Tue Jan 10, 2023 8:32 am Sorry, I'm not familiar enough with the code to comment on the possibility of a 4th pwm.
Yes, that one was ment for Johu.
Pete9008 wrote: Tue Jan 10, 2023 8:32 am One other thing. For a while I've been wondering about adding a feature to the simulator to allow it to calculate motor parameters from logs by running the log through the motor model and tuning the parameters till they match. I'd previously been thinking that only a high speed/quality binary log would be good enough but if you could take a web page csv log I could give it a try? The log needs to include motor speed, Ud, Uq, Id and Iq. It ideally needs to be a relatively short log (say 30sec), have high time resolution, be taken on level ground (no hills) and include acceleration, deceleration and coasting. Let me know if this is something you would be interested in trying?
I'll give it a go, if I can figure out how to to it properly.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Renault Clio Electrique -97

Post by Pete9008 »

There is not really any kind of suitable transient on Uq on the second plot. Not sure what to suggest to do differently though, maybe smaller throttle changes at more constant speed?. Correlating against the model should give better results which is why I'd like to try it. A csv version of something like the second plot could work well.

The first plot looks like it should give a good result for flux linkage though.
User avatar
bexander
Posts: 834
Joined: Tue Jun 16, 2020 6:00 pm
Location: Gothenburg, Sweden
Has thanked: 63 times
Been thanked: 89 times

Re: Renault Clio Electrique -97

Post by bexander »

Pete9008 wrote: Tue Jan 10, 2023 9:52 am The first plot looks like it should give a good result for flux linkage though.
Indeed, I get 101 resp 103mW at 60 resp 100Hz so might decrease my selected parameter setting of 108 slightly to 102. Not bad.
User avatar
bexander
Posts: 834
Joined: Tue Jun 16, 2020 6:00 pm
Location: Gothenburg, Sweden
Has thanked: 63 times
Been thanked: 89 times

Re: Renault Clio Electrique -97

Post by bexander »

Made these logs, see if you can use any of it?
log 1.csv
(21.2 KiB) Downloaded 49 times
log 2.csv
(14.77 KiB) Downloaded 53 times
log 3.csv
(7.35 KiB) Downloaded 47 times
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Renault Clio Electrique -97

Post by Pete9008 »

bexander wrote: Tue Jan 10, 2023 12:05 pm Made these logs, see if you can use any of it?
log 1.csv
log 2.csv
log 3.csv
Thanks, I'll have a look at them.
User avatar
bexander
Posts: 834
Joined: Tue Jun 16, 2020 6:00 pm
Location: Gothenburg, Sweden
Has thanked: 63 times
Been thanked: 89 times

Re: Renault Clio Electrique -97

Post by bexander »

Made a trip of 33km normal driving to see where I'm at efficiency wise. I got 0,82kWh/10km which is great when you consider the road was damp and the temperature was 5-10 degC with 12 degC in the battery at start. My personal best with the Leaf motor is 0,74kWh/10km but that was during summer with dry roads. Both cases mostly driving at 70km/h. Hopefully the MGR setup can beat the Leaf in terms of consumtion, in this car.

It feels nice to drive, wouldn't hurt with a little bit more power in the high rev range.
It is quite smooth but the Leaf motor was smoother.

Another interesting thing I noticed is that the battery current while coasting with the MGR at 70km/h is 0,1A compared with the Leaf which drew 2,8A at the same speed with 0Nm torque requested. Is this an advantage of the high saliency motor design? Would make sens that this motor has low coast current when considering is use case in the Lexus, mostly coasting.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Renault Clio Electrique -97

Post by Pete9008 »

That's encouraging :) do you have any data from the Leaf motor in similar conditions?

2.8A is a LOT of current for cruise, that's almost a kW :o Can't imagine it's down to saliency, something doesn't sound right there with the Leaf setup?

In what way isn't it as smooth?
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: Renault Clio Electrique -97

Post by celeron55 »

I've noticed with a torque command of 0 the Leaf inverter switches modes at around 500rpm or so, when going up in revs, from what seems like an actual coast where the motor will decelerate, into a powered coast where the motor freewheels indefinitely, as if it had no losses at all.

So the inverter compensates for the motor's losses taking power from the battery, instead of letting the mass of the car do its job.

This could explain the high current draw when commanding zero torque.

Thinking of reasons for this, maybe it's for helping traction control gain traction in slippery situations? It will make sure the motor produces no drag at all.
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Renault Clio Electrique -97

Post by johu »

Interesting, openinverter actually tries to run 0 current into the motor (implicitly) by matching the bemf voltage. I reckon the regulation jitter are the remaining 0.1A.
I think to get rid of cogging you'd need to inject quite some d-current, maybe that's what Nissan do to obtain true 0 Nm.

Yes would be interesting to know more about the "smoothness". Low or high speed etc.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
bexander
Posts: 834
Joined: Tue Jun 16, 2020 6:00 pm
Location: Gothenburg, Sweden
Has thanked: 63 times
Been thanked: 89 times

Re: Renault Clio Electrique -97

Post by bexander »

My impression is that the Leaf setup has less drag when coasting so makes sens that they put power into the motor for true 0Nm. I do prefer the openinverter way with very little current draw instead.

Regarding the smoothness there are two things:
1) Just at standstill to maybe 10Hz there is some jerkyness, feels like the motor resists turning and there is pronounced cogging. Much in the same way as if I was pushing the car with unpowered motor. Minor thing, but not perfect like Leaf.
2) At high speed (250-300Hz) when at cruise (low torque demanded) or just above coast (very low torque demand) I can feel a slight pulsation in the torque, at maybe 0,5-1Hz.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Renault Clio Electrique -97

Post by Pete9008 »

Interesting, it does sound like adding some Id could help with the cogging. Wouldn't expect it to take much real power though as the current and voltage should be out of phase so battery current should still be low. It might be possible to try using the revised manualid in Johannes latest code?

Edit - I did notice what could be a little control loop oscillation in the voltage plots in your logs at higher speed, wondering if that is what is causing the 0.5-1Hz ripple?
User avatar
bexander
Posts: 834
Joined: Tue Jun 16, 2020 6:00 pm
Location: Gothenburg, Sweden
Has thanked: 63 times
Been thanked: 89 times

Re: Renault Clio Electrique -97

Post by bexander »

Pete9008 wrote: Wed Jan 11, 2023 6:29 am Interesting, it does sound like adding some Id could help with the cogging. Wouldn't expect it to take much real power though as the current and voltage should be out of phase so battery current should still be low. It might be possible to try using the revised manualid in Johannes latest code?
You mean adding a small amount of Id at very low speed? Can that be done with the latest code?
Pete9008 wrote: Wed Jan 11, 2023 6:29 am Edit - I did notice what could be a little control loop oscillation in the voltage plots in your logs at higher speed, wondering if that is what is causing the 0.5-1Hz ripple?
Sounds resonable. Would that indicate to much kp/ki or should I reduce fwcurmax? Or any other guess to what I could do to mitigate this?
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Renault Clio Electrique -97

Post by Pete9008 »

I think the latest code adds whatever manualiq/d is set in at all speeds. It would be better for this if it just did it below a certain speed but it should be OK for testing the idea at low speed. A bit of -Id should help.

Reducing frcurmax might help, with the values from the other thread 50-60A would seem more appropriate. I think there was a bit of it visible in the simulator plot I posted above, just coming in at the higher speeds, so it should be possible to test possible fixes in there.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Renault Clio Electrique -97

Post by Pete9008 »

One other thought, if you do more logs please could you include a static test (holding it on the brakes while giving it a bit of throttle a few times)? The data from that should allow the Rs bit of the tuning to work too.
User avatar
bexander
Posts: 834
Joined: Tue Jun 16, 2020 6:00 pm
Location: Gothenburg, Sweden
Has thanked: 63 times
Been thanked: 89 times

Re: Renault Clio Electrique -97

Post by bexander »

More testdriving today, main purpose to take logs and also tweaked some parameters for a smoother driving experience.
Changed fluxlinkage to 100 and fwcurmax to -60.
log 4.csv
(40.24 KiB) Downloaded 49 times
Then logging while tweaking.
log 5.csv
(45.9 KiB) Downloaded 43 times
log 6.csv
(44.62 KiB) Downloaded 44 times
log 7.csv
(53.23 KiB) Downloaded 40 times
log 8.csv
(47.83 KiB) Downloaded 45 times
log 9.csv
(79.58 KiB) Downloaded 43 times
Decreased fwcurmax reduced the oscillation effect. At 60 it is just barely noticeable but still retains ok performance. At 50 I loose to much performance but no oscillation.

So this is my current parameter setup.
Yaris_MGR_FW5_24_2023-01-11.json
(1.46 KiB) Downloaded 49 times
Also tested the manual id at very low speed. Negative id makes it slightly worse, positive id slightly better. It ocurs at 0-2Hz. Hard to tell as fstat is blanked below 5Hz. This is a minor thing but still a thing that is noticable.
Pete9008 wrote: Wed Jan 11, 2023 11:36 am One other thought, if you do more logs please could you include a static test (holding it on the brakes while giving it a bit of throttle a few times)? The data from that should allow the Rs bit of the tuning to work too.
Will give it a go.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Renault Clio Electrique -97

Post by Pete9008 »

Thanks, will have a look at the logs later.

Interesting on the Id. I was trying to decide whether pos or neg would help and concluded that you need to push the rotor away from the d position so it would need negative current, will have to have another think about it. Guessing it didn't need much - 5-10A?

Edit - makes sense on fw current. Being a high saliency motor it needs the Id to make good torque but if you give it enough you go past the critical current, the volts go up and the control loops start to run out of authority.
User avatar
bexander
Posts: 834
Joined: Tue Jun 16, 2020 6:00 pm
Location: Gothenburg, Sweden
Has thanked: 63 times
Been thanked: 89 times

Re: Renault Clio Electrique -97

Post by bexander »

Stationary log.
log 10.csv
(9.37 KiB) Downloaded 42 times
I tested up to 20A in both directions. Was hard to tell, the effect was still there only larger or smaller. Maybe not the solution to add id but rather something else which gets camoflaged by adding id?
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Renault Clio Electrique -97

Post by Pete9008 »

Thanks for the static log file.

Thinking about it a bit more it may take more current than that. My estimate was based on the ratio of guessed cogging torque to motor torque but that is q based torgue, d torque is much weaker if the rotor is aligned so 40A or even more Id may be needed. Also still not sure why it is positive rather than negative Id that improves it?
User avatar
bexander
Posts: 834
Joined: Tue Jun 16, 2020 6:00 pm
Location: Gothenburg, Sweden
Has thanked: 63 times
Been thanked: 89 times

Re: Renault Clio Electrique -97

Post by bexander »

Lets assume it would work with id 40A, that would heat up the inverter and also consume 500W of battery power. What would that indicate, that something is missaligned or how would the result of this be implemented? Just asking because I'm curious if there is another way to get rid of the coggyness?
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Renault Clio Electrique -97

Post by Pete9008 »

I think the coggyness is just due to the motor saliency, id is about the only thing I can think of that might help. Is the 500W a measured number? It's a little higher than I would expect. What was the battery current during the 20A test?

I suppose the code could be modified so that the current isnt there there when stationary or above a few Hz, that should limit the power loss to the minimum.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Renault Clio Electrique -97

Post by Pete9008 »

Re fwmaxcurrent just a look at the code, struggling to understand these lines in pwmgeneration-foc.cpp (starting at line 84)

Code: Select all

         limitedId = MAX(idMtpa, limitedId);
         limitedId = MIN(ifw, limitedId);
         dController.SetRef(limitedId + Param::Get(Param::manualid));  
Think I'm missing something, @johu, what's the idea here?

Edit - Ignore me, it's fine, min and max on negative numbers can be confusing!
Post Reply