IPM Motors - MTPV

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

Re: IPM Motors - MTPV

Post by Pete9008 »

Thanks, the FCH box has a final drive of 4.235 rather than the 3.38 I used above so looks like you are spinning up to 12krpm, that's interesting (and quite impressive too)!
It suggests that the simulation result is less stable than real life (probably better that way round). Need to have a think about it and see if I can work out why that might be the case.
User avatar
rstevens81
Posts: 352
Joined: Sun Dec 22, 2019 10:36 am
Location: Bristol, UK
Has thanked: 23 times
Been thanked: 92 times

Re: IPM Motors - MTPV

Post by rstevens81 »

what makes things stranger is i have taken a fresh clone (today) of oi and your simulator using exactly the same parameters as you have in the screenshot
mine blows up even earlier
Screenshot_2023-03-02_15-53-33.png
Rule 1 of EV Club is don't buy a rust bucket....
Which rule does everyone forget 🤪
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: IPM Motors - MTPV

Post by Pete9008 »

rstevens81 wrote: Thu Mar 02, 2023 3:55 pm what makes things stranger is i have taken a fresh clone (today) of oi and your simulator using exactly the same parameters as you have in the screenshot
mine blows up even earlier
Screenshot_2023-03-02_15-53-33.png
Not sure what's happened with the edit fields in the gui there, it makes it difficult to comment when the settings aren't all visible? Is that a MAC it's running on?

To fix open up the mainwindow.ui (under Forms in the left hand Projects window of Qt Creator). You will then be able to increase the size of the edit boxes so that all the values are visible. Sorry about that, not sure how to fix properly, not keen on increasing the default sizes as it will make them larger than needed on other OSs.

If you can post again with the fields visible I'll try to reproduce the results here.

I did have a good look through the simulator code last night and couldn't find anything that might explain the difference between the stability in the sim and real life, it looks like its reproducing the hardware angle and current sampling points accurately. There is a filter on the resolver input which I didn't notice before which adds another 10-20us delay to the resolver measurement but I simulated it with that included and it didn't make a big enough difference to explain things (a SyncDel value of 30us would probably be more representative than the current default of 16us). I also found one copy/paste error which means one phase current isn't being updated properly but fortunately it's on the C phase which isn't actually used in the Park/Clarke transforms and so doesn't affect anything (probably why I hadn't spotted it before!).

I think I'm coming to the conclusion that the stability in real life is probably better than in the sim. In some ways that's a good thing as it provides a safety margin but would like to understand and fix it. The only idea I have is that it could be to do with the way the sim works out the phase voltages. Instead of running the model multiple times for each stage of the pwm waveform (slow to simulate) it works out the average equivalent voltage and uses that. What this means is that it doesn't reproduce the 2xPWM frequency ripple that will be present in the phase currents. In real life the current value measured will depend on exactly where in the PWM period the sample is actually taken, in the sim it doesn't and the average value is always used. On low inductance motors (like the one simulated above) these ripple currents will be large/significant and this will mean the model and real life will diverge somewhat. It's been at the back of my mind for a while to change the way the simulator does this to see how much difference it takes. The trouble is it's not a simple or small job to do and at the moment it's not something I can look at.
User avatar
rstevens81
Posts: 352
Joined: Sun Dec 22, 2019 10:36 am
Location: Bristol, UK
Has thanked: 23 times
Been thanked: 92 times

Re: IPM Motors - MTPV

Post by rstevens81 »

thats swear words (mac) ... no debian xfce, thaks for tip how to change windows just set all fonts in the boxes to 6, seems to be working now prob daft tired me.
Rule 1 of EV Club is don't buy a rust bucket....
Which rule does everyone forget 🤪
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: IPM Motors - MTPV

Post by Pete9008 »

No problem, glad it's working.

Good idea, hadn't thought of changing the font size. You can actually change that as a global by selecting the overall window and then changing it there (effectively sets the default for all text in the window). Now wondering whether I can make it so the app detects the OS and then if it's MAC switch to 6pt?
User avatar
rstevens81
Posts: 352
Joined: Sun Dec 22, 2019 10:36 am
Location: Bristol, UK
Has thanked: 23 times
Been thanked: 92 times

Re: IPM Motors - MTPV

Post by rstevens81 »

Not Mac, Linux ...prob some quirk of xfce, so no need to look for that, now that I know how to change it not worried.
Rule 1 of EV Club is don't buy a rust bucket....
Which rule does everyone forget 🤪
Post Reply