Prius Gen 3 Inverter Logic Board Support Thread

Topics concerning the Toyota and Lexus inverter drop in boards
Locked
User avatar
TheSilverBuick
Posts: 187
Joined: Mon Jun 08, 2020 5:01 pm
Location: Nevada, United States
Has thanked: 3 times
Been thanked: 1 time

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by TheSilverBuick »

Beautiful.
Need to learn. Starting from the basics.
User avatar
konstantin8818
Posts: 287
Joined: Sun Jan 19, 2020 2:33 pm
Location: Minsk, Belarus
Been thanked: 5 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by konstantin8818 »

So, it runs smooth but only in reverse.Only in MGR reverse. If only schaft starts spin forward, and accelerator is released, motor starts to jump uncontrolled. It happens only if I release accelerator. What could it be?
Dylan Witt
Posts: 116
Joined: Sat Apr 18, 2020 4:23 am
Location: Kentucky, USA
Been thanked: 1 time

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by Dylan Witt »

having the same problems im having, i still dont know what is causing the problem. goes good reverse but shakes the entire car going forward
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: Prius Gen 3 Inverter Logic Board Support Thread

Post by Jack Bauer »

I don't know how else to say this and it is the reason Johannes and I are making a video but a YOU CANNOT JUST PICK AND CHOOSE WHICH BITS OF THE TUNING PROCEDURE WORK! It is a procedure that must be followed. Step by step. Once it is done then forward and reverse work just fine. I have proven this myself. If you mess about with settings on the fly you are just wasting your time. Its an unforgiving process that wants to trick you into believing you are done. You're not unless what is described below has been followed to the letter! I demonstrated this to a class of ten people last weekend. Exactly the same crap as you are all seeing. Then go and follow the procedure in a slow and methodical manner and guess what? It works.

https://openinverter.org/wiki/Using_FOC_Software

https://openinverter.org/wiki/Using_FOC_Software

https://openinverter.org/wiki/Using_FOC_Software
I'm going to need a hacksaw
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 4 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by Kevin Sharpe »

konstantin8818 wrote: Fri Aug 14, 2020 5:06 pm So, it runs smooth but only in reverse.Only in MGR reverse. If only schaft starts spin forward, and accelerator is released, motor starts to jump uncontrolled. It happens only if I release accelerator. What could it be?
Dylan Witt wrote: Sat Aug 15, 2020 11:13 am having the same problems im having, i still dont know what is causing the problem. goes good reverse but shakes the entire car going forward
Following on from Damiens post can I suggest you video the tuning process you are following? It was clear from last weekends workshop that you must be thorough and maybe something in the procedure is open to misinterpretation :?
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
konstantin8818
Posts: 287
Joined: Sun Jan 19, 2020 2:33 pm
Location: Minsk, Belarus
Been thanked: 5 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by konstantin8818 »

I'm following procedure carefully, but:

I don't know what is max_motor_current, and what will happen if I exceed max_motor_current/2

Also, how incorrect value of polepairs and respolepairs will affect tuning process.
That is all, actually.
Dylan Witt
Posts: 116
Joined: Sat Apr 18, 2020 4:23 am
Location: Kentucky, USA
Been thanked: 1 time

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by Dylan Witt »

Kevin Sharpe wrote: Sat Aug 15, 2020 2:01 pm
konstantin8818 wrote: Fri Aug 14, 2020 5:06 pm So, it runs smooth but only in reverse.Only in MGR reverse. If only schaft starts spin forward, and accelerator is released, motor starts to jump uncontrolled. It happens only if I release accelerator. What could it be?
Dylan Witt wrote: Sat Aug 15, 2020 11:13 am having the same problems im having, i still dont know what is causing the problem. goes good reverse but shakes the entire car going forward
Following on from Damiens post can I suggest you video the tuning process you are following? It was clear from last weekends workshop that you must be thorough and maybe something in the procedure is open to misinterpretation :?
so i have removed the transmission from the mazda, powering the inverter with only 80 volts, and i will be resetting all parameters, then going though the tuning process slowly. i also have wired my throttle pedal wrong again, signal and ground wires are switched. going to be tuning it today and recording the entire process, might be a long video so it will take some time to upload
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: Prius Gen 3 Inverter Logic Board Support Thread

Post by Jack Bauer »

Yeah so here's the thing : If you mess up on the motor poles or resolver poles then it won't work. I'll cover this in the video.
I'm going to need a hacksaw
User avatar
konstantin8818
Posts: 287
Joined: Sun Jan 19, 2020 2:33 pm
Location: Minsk, Belarus
Been thanked: 5 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by konstantin8818 »

Ok, lets pretend ,I believed Martin1775 blindly and set polepais to 2 and respolepairs to 1, and connected U,V,W of inverter straight to U,V,W of MGR.
I've used Damien's custom Prius GEN3 FOC software, and pwmswap was already set to "PWMoutput13"
When I reached syncofs from 0 to 22000 even manualid of 300 Amps couldn't move rotor, all it did only jitter a little, at 21850 it only did whining noise, and didn't move at all, from gas pedal however in forward it run away....
Here are parameters I read:
id and iq while running smooth from accelerator pedal in reverse:
pot_reverse.png
il1 and il2 while running smooth from accelerator pedal in reverse:
pot_reverse_curr.png
il1 and il2 when running smooth in reverse, when running smooth forward at high speed and in run away when accelerator is released:
pot_forward_curr.png
No matter the direction, position caprure seems good in both directions:
angle_forward.png
angle_reverse.png
and video of process. Sorry for my English :mrgreen: hard to think at two languages at once


So problem #1 is to find out correct value of respolepairs and polepairs... and max_motor_current
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: Prius Gen 3 Inverter Logic Board Support Thread

Post by bexander »

I managed to spin it smoothly with this set of parameteres. FW: 4.87R FOC.
Yaris_MGR_FW4_87FOC_2020_08_16.json
(1.3 KiB) Downloaded 130 times
I have checked/measured the resolver pole pairs for the MGR and to my understanding, 2 is the correct value.
Also motor pole pair is 4.
User avatar
konstantin8818
Posts: 287
Joined: Sun Jan 19, 2020 2:33 pm
Location: Minsk, Belarus
Been thanked: 5 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by konstantin8818 »

bexander wrote: Sun Aug 16, 2020 12:15 pm I have checked/measured the resolver pole pairs for the MGR and to my understanding, 2 is the correct value.
Also motor pole pair is 4.
Did not helped unfortunately :( It was a moment at syncofs = 21950 manualid was 300A, and it did not moved but oil iside MGR started to evaporate :o ... still runs away in forward direction... OK, waiting for video manual...
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: Prius Gen 3 Inverter Logic Board Support Thread

Post by bexander »

konstantin8818 wrote: Sun Aug 16, 2020 2:53 pm
bexander wrote: Sun Aug 16, 2020 12:15 pm I have checked/measured the resolver pole pairs for the MGR and to my understanding, 2 is the correct value.
Also motor pole pair is 4.
Did not helped unfortunately :( It was a moment at syncofs = 21950 manualid was 300A, and it did not moved but oil iside MGR started to evaporate :o ... still runs away in forward direction... OK, waiting for video manual...
Maybe try the 4.87 firmware?
How have you connected the resolver and phase order?
User avatar
konstantin8818
Posts: 287
Joined: Sun Jan 19, 2020 2:33 pm
Location: Minsk, Belarus
Been thanked: 5 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by konstantin8818 »

bexander wrote: Sun Aug 16, 2020 2:56 pm Maybe try the 4.87 firmware?
How have you connected the resolver and phase order?
I've checked with 4.87R already, nothing changed.
resolver connection MRFG-GND, MSNG-SIN A, MCNG-COS A, MRF-EXC A, MSN-ENC A, MCS-ENC B
Phases are connected straight 1,2,3 to 1,2,3.
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: Prius Gen 3 Inverter Logic Board Support Thread

Post by bexander »

Ok, that sounds right. You might try to set pinswap for sin/cos (set pinswap 10 in 4.87) as I had to do. Else it was just jittering and no rotation. Should equal shifting them physicaly but have not tested that yet.
When I did the syncofs test my motor started spinning at manualid = 20, if it was offset (0 or 32768 was the ones for me). Using a 36V 44A power supply to power the inverter HV side.
In manual mode when I spin the driveshaft flanges in forward direction the angle plot rises, if that makes any sens?

Have you selected a direction when doing syncofs test?

Pictures of my phase order.
IMG_1357_scale.JPG
IMG_1358_scale.JPG
User avatar
konstantin8818
Posts: 287
Joined: Sun Jan 19, 2020 2:33 pm
Location: Minsk, Belarus
Been thanked: 5 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by konstantin8818 »

bexander wrote: Sun Aug 16, 2020 3:44 pm Ok, that sounds right. You might try to set pinswap for sin/cos
Your inverter looks different from mine. At which phases are your current sensors?
In mine they are 1 and 3, and if I chose any pwmswap except pf PWMoutput23, as soon as I enter any manualid, MGR starts to jump SO HARD, inverter shuts down by itself.
And srangely on 4.87 with phase connection as you showed and PWMoutput23 it doesn't rotate at all, no matter the inputs :?
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: Prius Gen 3 Inverter Logic Board Support Thread

Post by bexander »

I use a Yaris inverter. The current sensors are on 1 and 3.
To be clear, I use pinswap 10 which is 2+8 where 2 = Swap Resolver sin/cos and 8 = Swap PWM output 2/3.
Pinswap 8 is, as to my understanding, a must if not using Damiens special software for inverters with current sensor on 1&3.
To use both 2 and 8 you need to send command (set pinswap 10). It can not be set using the selection menu.

Strange however that you get no motion with 4.87? No errors present? Direction selection confirmed?
User avatar
konstantin8818
Posts: 287
Joined: Sun Jan 19, 2020 2:33 pm
Location: Minsk, Belarus
Been thanked: 5 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by konstantin8818 »

bexander wrote: Sun Aug 16, 2020 6:01 pm To use both 2 and 8 you need to send command (set pinswap 10). It can not be set using the selection menu.
Now that sounds like good idea. Thank you! Will try to check it tomorrow.
Dylan Witt
Posts: 116
Joined: Sat Apr 18, 2020 4:23 am
Location: Kentucky, USA
Been thanked: 1 time

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by Dylan Witt »

im sure his is a yaris inverter, here is a gen three prius inverter, sorry this is all i could find on my inverter, but this is a 2013 gen three inverter time 0.15 in video..
Martin1775
Posts: 43
Joined: Fri Nov 01, 2019 9:39 pm
Location: Ochtrup Germany

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by Martin1775 »

Sorry to hear that you get confused by the syncofs 22000, Konstantin.
At the beginning from my tests I although have the 22000 for syncofs.
If you check the motor connection you will find that the original kabel is not straight 1,2,3 to 1,2,3 so there is a phaseshift. I changed the kabel by pullig out the contacs and reconfigure them. For this reason I have referred to U, V, W for the designations, as 1,2,3 were not always assigned to a specific or the same phase.
Up to now I've only tested with the spezial software version Damian made for the pinswap.
User avatar
konstantin8818
Posts: 287
Joined: Sun Jan 19, 2020 2:33 pm
Location: Minsk, Belarus
Been thanked: 5 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by konstantin8818 »

Martin1775 wrote: Sun Aug 16, 2020 8:51 pm Sorry to hear that you get confused by the syncofs 22000, Konstantin.
At the beginning from my tests I although have the 22000 for syncofs.
Up to now I've only tested with the spezial software version Damian made for the pinswap.
No confusion with syncofs. In the process of tuning I came from 0 to 22000 naturally. At this syncofs mgr stopped and didn't spin no matter the value of manualid. I've checked this with all physical pin swap and with all software pwmswap. Now I've installed 4.87r firmware and going to check pwmswap 10.
User avatar
konstantin8818
Posts: 287
Joined: Sun Jan 19, 2020 2:33 pm
Location: Minsk, Belarus
Been thanked: 5 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by konstantin8818 »

Ok. Firmware 4.87R-FOC. Set pinswap 10.
Started tuning and from the very begining syncofs = 0 it doesnt spin no matter the manualid. With manualid =0.1 manualiq=5 it spins CW, but it is reverse for MGR. So I've set syncofs = 32768.
Now from gas pedal it spins forward no problem. I've spun it up to 8000rpm smooth and easy.
Screenshot_20200817-103922_Chrome.jpg
In reverse it now runs away, BUT only if speed exceeds 600rpm :? and jittering itself goes from 1500rpm to 600rpm and not going lower then 600rpm
Screenshot_20200817-103819_Chrome.jpg
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: Prius Gen 3 Inverter Logic Board Support Thread

Post by Jack Bauer »

Excellent work. Now, let's put our thinking hats on. We can rule out any problems with the inverter , motor ,firmware connections etc. So what does that leave? Why would Johannes be happy in one direction but upset in the other? What changes in terms of signals when we reverse motor direction?

Hint : it helps to RESOLVE problems ....
I'm going to need a hacksaw
User avatar
konstantin8818
Posts: 287
Joined: Sun Jan 19, 2020 2:33 pm
Location: Minsk, Belarus
Been thanked: 5 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by konstantin8818 »

Jack Bauer wrote: Mon Aug 17, 2020 12:39 pmWhat changes in terms of signals when we reverse motor direction?
Hint : it helps to RESOLVE problems ....
I love charades :)
I think about resolver and motor pole pairs. One revolution of output shaft in mgr must cause 6.8 revolutions of motor rotor. I've started invertor, started revolutions plot and rotate output shaft. With respolepairs =2 it showed up to 21 revolutions. With respolepairs =6 it showed 7 revolutions per one output shaft revolution. So I believe 6 is the correct count of resolver pole pairs. And rotor started to spin only when I've set polepairs=12. With the same effect as before unfortunately... :) Let's agree that I'm too stupid for this to understand..

FOC is hell of a complicated control system. It rely on accurate data. Now when I sure about correct resolver pole pairs, I'm not sure about motor pole pairs. Is it mandatory that motor pole pairs must be twice as resolver pole pairs? Or it could be any amount of them?
Wiki wrote:If manualid is less than about max_motor_current/2 go back to 4. When approaching rated_motor_current/2 make your increments/decrements smaller, like down to 300 digits
Does that mean that +-300 digits is accurate enough to set correct syncofs?
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: Prius Gen 3 Inverter Logic Board Support Thread

Post by bexander »

Well, thats some good news. Strange in reverse though. I never tried to reverse fast, I'll try to check tomorrow.

I will describe in text how I concluded that resolver poleparis is 2 and motor polepairs is 4 for the MGR. If I screwed up, please let me know.

Slowly spinning the motor using sine firmware in manual mode. Check the time it takes for a complete revolution on the flanges. Say it took 5s. One revolution on the motor then takes 5s/6,86 = 0,73s.
Using a signal generator generating a sinewave at 4kHz and an opamp supplying it to the resolver excitation and then measure with the oscilloscope on one of the two resolver windings. For a time of 730ms I got 4 peaks, which I interpret as two "electrical revolutions" on the resolver, hence two pole pairs.
(Absolute value of sine will have two maxima for one revolution (0-360 degrees).)

To check motor pole pairs I now disconnect the motor phases and measure with the osilloscope between any two motor phases. Now spinning the motor by hand I got 4 full cycles of sinewave while having 4 resolver peaks. My conclusion is that for one motor revolution I got four "electrica revolutions" on the motor, hence 4 pole pairs.

Now I will, also tomorrow, try to check the actual flange/motor rpm agains the software reported rpm. If they match the resolver is at least correct.
User avatar
ZooKeeper
Posts: 507
Joined: Mon Mar 30, 2020 10:23 pm
Location: USA

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by ZooKeeper »

bexander wrote: Mon Aug 17, 2020 7:59 pm

I will describe in text how I concluded that resolver poleparis is 2 and motor polepairs is 4 for the MGR. If I screwed up, please let me know.

Slowly spinning the motor using sine firmware in manual mode. Check the time it takes for a complete revolution on the flanges. Say it took 5s. One revolution on the motor then takes 5s/6,86 = 0,73s.
Using a signal generator generating a sinewave at 4kHz and an opamp supplying it to the resolver excitation and then measure with the oscilloscope on one of the two resolver windings. For a time of 730ms I got 4 peaks, which I interpret as two "electrical revolutions" on the resolver, hence two pole pairs.
(Absolute value of sine will have two maxima for one revolution (0-360 degrees).)

To check motor pole pairs I now disconnect the motor phases and measure with the osilloscope between any two motor phases. Now spinning the motor by hand I got 4 full cycles of sinewave while having 4 resolver peaks. My conclusion is that for one motor revolution I got four "electrica revolutions" on the motor, hence 4 pole pairs.
Bex, that matches the documentation I found on line and my settings, will try 2 & 1 as Konstantine has and document any change I see.

<Edit: I cannot explain why, but I saw no difference in behavior between your and Konstantine's resolver settings>
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
Locked