Author Topic: Reverse Engineering MIU G3 (based on V7 III and V9)  (Read 7496 times)

Offline Meinolf

  • Gosling
  • ***
  • Posts: 243
  • Location: Germany
Reverse Engineering MIU G3 (based on V7 III and V9)
« on: June 06, 2021, 12:28:08 AM »
Hi,

recently some question about the MIU G3 as used in the V7 III were asked in the German Guzzi forum. So, another deep dive into a BIN was taken, disassembling and reverse engineering the code as done previously for the 5AM BINs.

The result is this V7III XDF https://drive.google.com/file/d/1tt02RMq80C2hMfRFN2WDMZ8aAlMgoAup/view?usp=sharing

<Edit> Responding to questions further down the thread a XDF for the V9 was written. The addresses are based on the CM275401 / 46040VC29 BIN with HW311.
The result is this V9 XDF https://drive.google.com/file/d/1jKjloifm4S9aAEIvOKR2E6ZfgYg7u4Id/view?usp=sharing

The code of the V7III and V9 is very similar. Without having done a deep analysis of either BIN the differences are mainly sligthly shifted addresses.

Cheers
Meinolf
« Last Edit: June 09, 2021, 10:16:31 AM by Meinolf »

Offline Wayne Orwig

  • Gaggle Hero
  • *****
  • Posts: 13908
    • Hog Mountain weather
  • Location: Hog Mountain
Re: Reverse Engineering MIU G3 (based on V7 III BIN)
« Reply #1 on: June 06, 2021, 07:17:59 AM »
 :thumb:
Scientist have discovered that people will believe anything, if you first say "Scientists have discovered...."

Online Chuck in Indiana

  • Gaggle Hero
  • *****
  • *
  • *
  • *
  • Posts: 29445
Re: Reverse Engineering MIU G3 (based on V7 III BIN)
« Reply #2 on: June 06, 2021, 08:12:34 AM »
Awesome work.. :thumb:
Chuck in (Elwood) Indiana/sometimes SoCal
 
87 AeroLario
95 Skorpion tour
22 Royal Enfield Classic 3 fiddy
 "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe."
Albert Einstein

Offline Zenermaniac

  • Gosling
  • ***
  • Posts: 234
  • Location: Armpit of Ohio, USA
Re: Reverse Engineering MIU G3 (based on V7 III BIN)
« Reply #3 on: June 06, 2021, 09:13:09 PM »
Is there a newer one for the V9? Seems like there is more data there that hasn’t been figured out yet.

Wildguzzi.com

Re: Reverse Engineering MIU G3 (based on V7 III BIN)
« Reply #3 on: June 06, 2021, 09:13:09 PM »

Offline Meinolf

  • Gosling
  • ***
  • Posts: 243
  • Location: Germany
Re: Reverse Engineering MIU G3 (based on V7 III BIN)
« Reply #4 on: June 08, 2021, 02:48:30 AM »
Hi,

Is there a newer one for the V9? Seems like there is more data there that hasn’t been figured out yet.

which BIN are you refering to? The exact name or numbering, please.

Cheers
Meinolf

Offline Zenermaniac

  • Gosling
  • ***
  • Posts: 234
  • Location: Armpit of Ohio, USA
Re: Reverse Engineering MIU G3 (based on V7 III BIN)
« Reply #5 on: June 08, 2021, 11:33:21 AM »
I’m referring to the current xdf for the V9: MIUG3_V9_464DVCAO_V 1.09 and the stock bin. Using GuzziDiag returns several values as unknown. So I’m wondering if there is more to be discovered that may be of use to us. I’m just trying to understand it all relating to my own bike and maybe contribute to the group knowledge base. It seems asking fueling related questions on another forum is taboo. Using Tunerpro and your newer xdf for the V7III and comparing to  the V9 xdf and my bin, it looks like the V9 is less developed at this time. I’d also be curious to know if MG has issued newer V9 bins than my 2017 version and what improvements it addressed. Being that the V9 and V7III use the same ECU and are similar engines I wonder what can be extrapolated from one map to the other.
« Last Edit: June 27, 2021, 03:40:29 PM by Zenermaniac »

Offline Meinolf

  • Gosling
  • ***
  • Posts: 243
  • Location: Germany
Re: Reverse Engineering MIU G3 (based on V7 III BIN)
« Reply #6 on: June 08, 2021, 11:38:11 AM »
Hi,

And the stock BIN number is? I'll take a look and will update the xdf.

Cheers
Meinolf

Offline Zenermaniac

  • Gosling
  • ***
  • Posts: 234
  • Location: Armpit of Ohio, USA
Re: Reverse Engineering MIU G3 (based on V7 III BIN)
« Reply #7 on: June 08, 2021, 02:31:31 PM »
Hi,

And the stock BIN number is? I'll take a look and will update the xdf.

Cheers
Meinolf
Where is that found?
Here is what GuzziDiag reports:
GuzziDiag V0.50                                                 2020.12.09 13:40


V9 Roamer                IAW MIUG3
                                CM275401
                                38M3G3HW311
                                464DVCAO
                                F01
                                130950203
                                2020.04.28

Tunerpro says the software date is June 7, 2017.

I can send you the original bin if that helps. When I saved it originally I just named it “stock V9.bin” as I didn’t know it’s original name.




Offline Zenermaniac

  • Gosling
  • ***
  • Posts: 234
  • Location: Armpit of Ohio, USA
Re: Reverse Engineering MIU G3 (based on V7 III BIN)
« Reply #8 on: June 08, 2021, 05:59:34 PM »
Something I was thinking about (I’ve been told I think too much) is that on USA models the CO adjustment is blocked. I wonder if there is a data byte in the .bin that would toggle it on thus giving us another avenue of adjustment. I’d like to compare a European version to a US version. Anyone have a Euro V7III or V9 factory .bin they would send me?

Offline chrisfer

  • Hatchling
  • **
  • Posts: 115
  • Location: France
Re: Reverse Engineering MIU G3 (based on V7 III BIN)
« Reply #9 on: June 09, 2021, 12:16:36 AM »
Something I was thinking about (I’ve been told I think too much) is that on USA models the CO adjustment is blocked. I wonder if there is a data byte in the .bin that would toggle it on thus giving us another avenue of adjustment. I’d like to compare a European version to a US version. Anyone have a Euro V7III or V9 factory .bin they would send me?
Here is a bin of a V7III Euro Factory : https://1drv.ms/u/s!AuqxioVGI9b-hvg3tVpX8dBwkfS47A?e=Taipnq

« Last Edit: June 09, 2021, 12:24:41 AM by chrisfer »
2022 V7 850 Stone - 2019 V7 III Carbon - 2004 V11 RossoCorsa - 2002 V11 Le Mans - 1995 750 Nevada

Offline Zenermaniac

  • Gosling
  • ***
  • Posts: 234
  • Location: Armpit of Ohio, USA
Re: Reverse Engineering MIU G3 (based on V7 III BIN)
« Reply #10 on: June 09, 2021, 09:10:31 AM »
Here is a bin of a V7III Euro Factory : https://1drv.ms/u/s!AuqxioVGI9b-hvg3tVpX8dBwkfS47A?e=Taipnq


Thanks, Chrisfer.  It appears identical to the V7III bin I have.  Now I’m not sure the bin I have is a USA version as I expected to see differences. I downloaded it from somewhere last year for research purposes and can’t remember the source.  I do know the V9 version I have is a USA version as it’s from my bike so I still need to find a Euro version .bin of it.

Offline chrisfer

  • Hatchling
  • **
  • Posts: 115
  • Location: France
Re: Reverse Engineering MIU G3 (based on V7 III BIN)
« Reply #11 on: June 09, 2021, 09:13:54 AM »
Thanks, Chrisfer.  It appears identical to the V7III bin I have.  Now I’m not sure the bin I have is a USA version as I expected to see differences. I downloaded it from somewhere last year for research purposes and can’t remember the source.  I do know the V9 version I have is a USA version as it’s from my bike so I still need to find a Euro version .bin of it.
Here is a V9 Euro : https://1drv.ms/u/s!AuqxioVGI9b-iZBaQRJSqFXUoRhnMQ?e=lIuOga
« Last Edit: June 09, 2021, 09:15:31 AM by chrisfer »
2022 V7 850 Stone - 2019 V7 III Carbon - 2004 V11 RossoCorsa - 2002 V11 Le Mans - 1995 750 Nevada

Offline Meinolf

  • Gosling
  • ***
  • Posts: 243
  • Location: Germany
Re: Reverse Engineering MIU G3 (based on V7 III BIN)
« Reply #12 on: June 09, 2021, 10:20:16 AM »
Hi,

V9 Roamer                IAW MIUG3
                                CM275401
                                38M3G3HW311
                                464DVCAO
                                F01
                                130950203
                                2020.04.28

I've written a XDF for another version (see first post in this thread), the differences are slight and I will provide an updated XDF for this version later.

Cheers
Meinolf
« Last Edit: June 09, 2021, 10:28:22 AM by Meinolf »

Offline Meinolf

  • Gosling
  • ***
  • Posts: 243
  • Location: Germany
Re: Reverse Engineering MIU G3 (based on V7 III BIN)
« Reply #13 on: June 09, 2021, 10:26:50 AM »
Hi,

Something I was thinking about (I’ve been told I think too much) is that on USA models the CO adjustment is blocked. I wonder if there is a data byte in the .bin that would toggle it on thus giving us another avenue of adjustment. I’d like to compare a European version to a US version. Anyone have a Euro V7III or V9 factory .bin they would send me?

by now I've looked into several Guzzi, BMW (MBC1 ECU) and Aprilia BINs for the MIUG3. I haven't found any CO trim function in the code of any of the BINs. But, I haven't really researched if there are different BINs for different regions. If there were, the typical approach would be to skip/enable CO trim functions by setting flags and not by changing the program code proper.

This is part of the fuel calc routine. The CO trim code would be right after the warm-up section. But it isn't...




Cheers
Meinolf
« Last Edit: June 09, 2021, 10:27:28 AM by Meinolf »

Offline Zenermaniac

  • Gosling
  • ***
  • Posts: 234
  • Location: Armpit of Ohio, USA
Re: Reverse Engineering MIU G3 (based on V7 III BIN)
« Reply #14 on: June 09, 2021, 12:39:45 PM »
Here is a V9 Euro : https://1drv.ms/u/s!AuqxioVGI9b-iZBaQRJSqFXUoRhnMQ?e=lIuOga
Thanks,  Chrisfer.
Comparing mine and yours the conclusion is there are no regional differences in .bins, at least Euro and American. They are identical. I had expected differences. Interesting.

Offline Zenermaniac

  • Gosling
  • ***
  • Posts: 234
  • Location: Armpit of Ohio, USA
Re: Reverse Engineering MIU G3 (based on V7 III BIN)
« Reply #15 on: June 09, 2021, 12:41:08 PM »
Hi,

I've written a XDF for another version (see first post in this thread), the differences are slight and I will provide an updated XDF for this version later.

Cheers
Meinolf
Thanks, Meinolf.

Online GuzziOrDeath

  • Hatchling
  • **
  • Posts: 118
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #16 on: June 09, 2021, 05:59:37 PM »

The MIU G3 does not have a CO trim adjustment option.



Offline Zenermaniac

  • Gosling
  • ***
  • Posts: 234
  • Location: Armpit of Ohio, USA
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #17 on: June 09, 2021, 07:35:05 PM »
The MIU G3 does not have a CO trim adjustment option.
Thank you. Apparently I’ve been misinformed.

Offline Meinolf

  • Gosling
  • ***
  • Posts: 243
  • Location: Germany
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #18 on: June 26, 2021, 11:44:29 AM »
Hi,

some more time spent analyzing the code provided more insights. Let's take a closer look at the fuel calculation.

The routine calculating the fuel values is called in several other subprograms.





Let's look at the fuel calculation while in idle mode first. Right at the top there's a user-changeable flag to skip idle fuel calculation. The default is to do the calc. The next branch is TPS state. If closed then we proceed to IdleFuel_Table_C7D7 7A. Which is indexed by a RPM-legend derived from the current rpm and a Idle valve steps index.





After consulting the main idle fuel table (for the left cylinder) a branch leads to the delta idle fuel table for the right cylinder. In case the right cylinder is currently active the main and delta fuel table values are added. Or subtracted if the delta value is negative.

This concludes the idle fuel calc.





Cheers
Meinolf
« Last Edit: June 26, 2021, 11:55:05 AM by Meinolf »

Offline Meinolf

  • Gosling
  • ***
  • Posts: 243
  • Location: Germany
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #19 on: June 26, 2021, 12:41:49 PM »
Hi,

going back to the start, let's look at what happens if idle mode is enabled and the TPS is not closed. Which includes any TPS state above the threshold of being closed. Which is a learned value. Anyway, the branch leads to a user-changeable flag to disable delta (right cylinder) fuel calculation. The default is to calculate both left and right cylinder values.





The next branch depends on the current cylinder being looked at. The program proceeds to the MainFuel_LeftCyl_Ta ble, another branch depending on the current engine temp being above or below 60°C is not used. If it were used, the left and right fuel table would be used as the sole source for fuel values depending on the engine temperature.





At this point either the fuel value for idle or non-idle mode have been retrieved from the respective tables. No the water gets muddy. Several flags, both user-changeable and calculated in the code, determine if values from Fuel_Table_C7DFBA are added.  The rev_below_limit_fla g_9103, flag_9104 and flag_910C have escaped my understanding until now, so it's unclear if and when the adder is used.





Then the going get's easier again. Next the lambda flags and Skip_STFT_scaling_f lag_C7C7FD are taken under consideration. If either is clear (default is set), the entire closed loop scaling process is circumvented. Then a scaling process is set up, using the last current fuel values. And now the closed loop begins massaging the fuel calc. Here the short term fuel trim (STFT), which is calculated in a separate routine, is applied as a scaled factor to the fuel values.





At this point the air temperature and air pressure influences are looked at. Both change the air mass per volume, so they influence the AFR. Rather straightforward, factors are calculated and applied to the fuel values.





Then the warm up mode is considered. Which has several possible states:
values used
0: engine stopped
1: pre-crank (if engine run mode 1 or 2)
2: warm-up (if engine run mode 2)
4: warm-up, if curr rpm > 750 or rpm < 750 and delay revs passed
8: warm-up passed, normal run (if engine run mode 6, 7 or 9)

Basically the revs since engine start are counted down and act as index for a table in which factors applied to the fuel values a stored. Lastly the resulting values are compared a max. value of 62500.





And last but not least several more branching decisions are due, depending on the engine run modes, of which there are 11.

0:  engine stopped
1:  start requested / pre-crank, already turning
    if power_state = 4
2:  during warmup / if throttle closed
    or throttle closed and curr rpm > target_idle_rpm + RPM_Word + RPM_Word
    or mode_2_6_chg_flag = 1
    or mode_2_6_chg_flag = 0 and TPS closed
    or mode_2_6_chg_flag = 0 and curr rpm < target_idle_speed + RPM_Word
3:  during warmup / if TPS in between and no accel/decel and curr rpm >= target_idle + RPM_Word (non-idle fuel mode)
4:  during warmup / if accelerating
5:  during warmup / throttle closed and curr rpm <= target_idle + RPM_Word (idle fuel mode)
6:  after warmup / throttle open (main tables)
    or throttle closed and curr rpm < target idle + RPM_Word (idle fuel mode)
    or throttle closed and curr rpm > target_idle + RPM_Word + RPM_Word
    or mode_2_6_chg_flag = 1 (still unclear when set)
    or if rev passed > rev_Table_
7:  after warmup / if throttle open and curr rpm < target_idle + RPM_Word (idle fuel mode)
8:  after warmup / throttle in between and accel (main fuel tables, non-idle fuel mode)
9:  after warmup / throttle closed and curr rpm < target idle + RPM_Word
    if throttle WOT
    or throttle in between and accel/decel and curr rpm > target_idle + RPM_Word
10: after warmup / engine turning
    if mode_10_11_chg_word = 1 or 2
11: engine stopped, start for run mode selection?
    if mode_10_11_chg_word = 2
    or power_state <> 4
    or if rev passed < rev_Table

Simply put, modes 10 and 11 are engine braking modes. The respective routines calculate different fuel values. And finally, voila, the fuel values for both cylinders are there.





And are used in another sub, which inputs the changes from acceleration/deceleration modes and leads to the calculation of the injector pulse width.





Cheers
Meinolf

Offline bad Chad

  • Gaggle Hero
  • *****
  • *
  • Posts: 9551
  • Location: Central Il
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #20 on: June 26, 2021, 02:20:41 PM »
So, in no more than a three or four sentences, what does this all mean?
2007 Breva 1100  Red Arrow (and faster than yours!)
2016 CSC 250TT Zongshen
2017 V9 Roamer

Offline Zenermaniac

  • Gosling
  • ***
  • Posts: 234
  • Location: Armpit of Ohio, USA
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #21 on: June 26, 2021, 02:49:32 PM »
Thanks, Meinolf. This is fascinating. I appreciate all your research.
A couple of questions if I may: Where do the traction control modes figure into this? If I want to make any small changes to fueling (assuming I have the lambdas turned off) would it be best to make those changes in the right and left cylinder main fuel tables and leave everything else alone or divide the changes up across other tables?
« Last Edit: June 26, 2021, 06:49:38 PM by Zenermaniac »

Offline Meinolf

  • Gosling
  • ***
  • Posts: 243
  • Location: Germany
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #22 on: June 26, 2021, 10:28:09 PM »
Hi,

So, in no more than a three or four sentences, what does this all mean?

lot's of interesting stuff going on inside the ECU....

Sorry, my description of the fuel calc part is already very much simplified.

Cheers
Meinolf

Offline Meinolf

  • Gosling
  • ***
  • Posts: 243
  • Location: Germany
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #23 on: June 26, 2021, 10:58:06 PM »
Hi,

Where do the traction control modes figure into this?

What do you mean by traction control modes. I have not extensively researched the different models using the MIUG3, but haven't found any mention of traction control modes in the user manual or the wiring diagram. On other models any traction control is activated by discrete switches connected to the dashboard, which then sends this as part of a CANBus message to the ECU. I've identified the CANBus sections and packet IDs in the code, but having no log of the stuff being sent on the CANBus makes it very difficult to understand the content and meaning.

If I want to make any small changes to fueling (assuming I have the lambdas turned off) would it be best to make those changes in the right and left cylinder main fuel tables and leave everything else alone or divide the changes up across other tables?

My experience is that the lowest hanging fruit for improving engine performance (not neccessarily torque/power) is to check and correct, if so required, the synchronization of AFR/Lambda between the cylinders. My experience after logging Lambda, rpm, TPS, etc on a V11, a Jackal and a Norge over more than 40.000km is that the fuel values are not optimized for this. Setting this right will result in 90% of the achievable improvement, anything else really is just cream on top. Nice to have, but not essential.

Changing any of the trim and scaling scalars or tables generally not a good idea. In the past I've found that Marelli uses airtemp/pressure correction values in the respective tables of the 15M/RC and 5AM which are wrong. They differ from the values dictated by the general gas equation pV=mRT, I created a spreadsheet several years ago to calculate the correct values and used this in my BINs.

Turning off the closed loop operation is not really a good idea unless you a willing to deep dive into this topic. The engines are designed to work well at Lambda 1.0 and the resulting fuel and ignition values are closely intertwined. Changing Lambda absolutely requires corresponding changes in ignition values.

On a different note, you are an E.E.? Have you taken a closer look at the MIUG3? Understanding how the I/O pins of the ECU are internally connected to the CPU and ASICs and stuff would be very helpful, in fact it's a prequisite, to make further progress.

Cheers
Meinolf


Offline Zenermaniac

  • Gosling
  • ***
  • Posts: 234
  • Location: Armpit of Ohio, USA
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #24 on: June 27, 2021, 07:47:36 AM »
Hi,

What do you mean by traction control modes. I have not extensively researched the different models using the MIUG3, but haven't found any mention of traction control modes in the user manual or the wiring diagram. On other models any traction control is activated by discrete switches connected to the dashboard, which then sends this as part of a CANBus message to the ECU. I've identified the CANBus sections and packet IDs in the code, but having no log of the stuff being sent on the CANBus makes it very difficult to understand the content and meaning.


My experience is that the lowest hanging fruit for improving engine performance (not neccessarily torque/power) is to check and correct, if so required, the synchronization of AFR/Lambda between the cylinders. My experience after logging Lambda, rpm, TPS, etc on a V11, a Jackal and a Norge over more than 40.000km is that the fuel values are not optimized for this. Setting this right will result in 90% of the achievable improvement, anything else really is just cream on top. Nice to have, but not essential.

Changing any of the trim and scaling scalars or tables generally not a good idea. In the past I've found that Marelli uses airtemp/pressure correction values in the respective tables of the 15M/RC and 5AM which are wrong. They differ from the values dictated by the general gas equation pV=mRT, I created a spreadsheet several years ago to calculate the correct values and used this in my BINs.

Turning off the closed loop operation is not really a good idea unless you a willing to deep dive into this topic. The engines are designed to work well at Lambda 1.0 and the resulting fuel and ignition values are closely intertwined. Changing Lambda absolutely requires corresponding changes in ignition values.

On a different note, you are an E.E.? Have you taken a closer look at the MIUG3? Understanding how the I/O pins of the ECU are internally connected to the CPU and ASICs and stuff would be very helpful, in fact it's a prequisite, to make further progress.

Cheers
Meinolf

My V9 has the MGTC system(Moto Guzzi Controllo Trazione). It reduces acceleration if it detects wheel slippage - for instance - if you accelerate in the rain and lose traction it reduces your acceleration to compensate.  My thought is either the CPU has to back off the fueling or spark timing to compensate or the ABS is applying slight braking. If you see nothing in the programming then perhaps the latter applies.

I have not found any literature beyond the brief MIUG3 tutorial linked here in other threads. Searching the internet yields little beyond linking Magnetti-Marelli’s home page. I have hesitated to actually open mine up to ID the chips and do any circuit tracing. Maybe I should start there.

My impetus for delving into this in the beginning was after trying a popular map to get rid of the herky-jerky nature of the V9 at slow steady speeds.  The map did cure that wonderfully but also introduced more vibration and an unsteady (kind of lumpy) idle.  When opening the throttle it immediately accelerates without bogging down (that’s good) so my impression is it may be a tad rich rather than too lean at idle. On examining the map I see the O2 sensors are turned off which makes sense because they would negate any changes to the fueling.  However no corresponding changes in ignition timing were made. What has piqued my curiosity most is the fact that this map was made last year when the current XDF has the right and left cylinders incorrectly labeled as warm and cold. That misconception may have influenced some of the changes I see in the map as far as unbalanced right and left fueling that may be the source of the vibration. Another related issue is in the change to reduce overrun popping. On one cylinder at minimum throttle the fueling is reduced to zero at minimum throttle and the other it is only slightly reduced. My OCD says fueling in both cylinders need to be equal at that stage. Another change that caught my attention is the Pressure-Air Temp Correction table. The values are nearly negated over what Marelli thinks they should be so it looks like almost no temperature/air pressure compensation. I seem to be running rich at higher elevations.
« Last Edit: July 14, 2021, 02:27:35 PM by Zenermaniac »

Pdmartin

  • Guest
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #25 on: June 27, 2021, 01:20:56 PM »



Turning off the closed loop operation is not really a good idea unless you a willing to deep dive into this topic. The engines are designed to work well at Lambda 1.0 and the resulting fuel and ignition values are closely intertwined. Changing Lambda absolutely requires corresponding changes in ignition values.


Cheers
Meinolf

Since part of the time at RPMs below 4k it is operating open loop ie not at a steady cruise, wouldn't it be a safe assumption that the open loop base map is reasonably safe if the O2 sensors were turned off.  There have been a few mentions in other threads where just turning them off resulted in smoother operation or elimination of snatchiness. Assuming, of course, a basically stock bike with stock exhaust not needing a substantially richer mapping change.
« Last Edit: June 29, 2021, 09:01:10 AM by Pdmartin »

Offline SmithSwede

  • Gaggle Hero
  • *****
  • *
  • Posts: 2113
  • I don't want a pickle
  • Location: Dallas, Texas
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #26 on: June 27, 2021, 11:06:05 PM »
Fascinating stuff.  Thanks for sharing all your hard work. 

Here’s a dumb question.  I have a 2013 V7 Stone.  I foolishly left my mufflers out in the rain for a month while working on my clutch.  When I put everything back together, I now have a constant check engine light, which has persisted for 35,000 miles now.   I’m convinced it is due to failed/rusty lambda sensors, but haven’t confirmed it. 

Here’s the deal though.  The bike runs just fine.  I get the exact same gas mileage.  It starts fine cold or hot.  The only difference is that about 10 seconds after a cold start, it obviously gets too lean and won’t idle well unless I rev it to 1500 rpm or more and let it warm up a minute or so.  When warmed up it idles fine.

Is this the behavior you would expect give this stock fuel mapping and a presumed failure of the lambda sensors?

I probably need to get a Bettle map but just haven’t gotten around to it. 

If this is somehow horrible for my engine please let me know.
Accentuate the positive;
Eliminate the negative;
Latch on to the affirmative;
Don't mess with Mister In-Between.

Offline Meinolf

  • Gosling
  • ***
  • Posts: 243
  • Location: Germany
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #27 on: June 28, 2021, 12:02:34 AM »
Hi,

My V9 has the MGTC system(Moto Guzzi Controllo Trazione). It reduces acceleration if it detects wheel slippage - for instance - if you accelerate in the rain and lose traction it reduces your acceleration to compensate.  My thought is either the CPU has to back off the fueling or spark timing to compensate or the ABS is applying slight braking. If you see nothing in the programming then perhaps the latter applies.

Thanks, following this up I did find some basic explanation MGCT. I'll keep my eyes open when browsing the code. As MGCT seems to be using the speed wheel sensors and the delta between the speeds as slip indication it's very likely that this is send to the ECU over the CANBus. BUt, without having log data of what is sent on the CANBus it will be challenging to find the details.
The speed wheel sensors are connected to the ABS modul, not the ECU. I can't imagine that ABS is used for this purpose, ignition retardation is more likely.

On examining the map I see the O2 sensors are turned off which makes sense because they would negate any changes to the fueling

My experience is that the fuel tables are on the rich side, which serves as a precaution in case the O2 sensors fail. Rather a to rich than a to lean mixture. The closed loop operation is only active in a small range. TPS below ~25°, rpm < 4000, temperature thresholds are met, no acceleration/deceleration.

...when the current XDF has the right and left cylinders incorrectly labeled as warm and cold

There's a user changeable flag which can dedicate the two main fuel to act as cold/warm main fuel tables. As, however, a multi-cylinder engine always requires different fuel values for each cylinder this arrangement would only make sense on a single cylinder engine. As it turns out the code base used in the MIUG3 is very similar to the MBC1 ECU used in a number of BMWs. Some of which, I believe, are single  cylinder engines.

However no corresponding changes in ignition timing were made.

Searching for "afr flame propagation" will lead towards many sources explaining the effect the mixture has on which ignition retardation is required. On a typical street engine the highest combustion chamber should occur ~12-15° after TDC. Leaning, or enrichening, the mixture delays the initial flame propagation by up to ~+/-20°, which could either lead to a to high pressure while the pistons are still on their way up to TDC or wasted power/fuel if the max. pressure occurs when the piston is already traveling downwards.

...I have hesitated to actually open mine up to ID the chips and do any circuit tracing. Maybe I should start there.

If you have the time and experience to trace the circuits then understanding more of the details would be easier. Certainly the mastermind behind the analysis of the 5AM, John, which is an experienced E.E. from the UK, drew numerous conclusions from dissecting, identifying the active and passive components and circuit tracing.

I wouldn't use a working ECU, though. Maybe someone can sponsor this with a defective ECU.

Cheers
Meinolf
« Last Edit: June 28, 2021, 12:04:28 AM by Meinolf »

Online GuzziOrDeath

  • Hatchling
  • **
  • Posts: 118
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #28 on: June 28, 2021, 04:40:46 AM »
Fascinating stuff.  Thanks for sharing all your hard work. 

Here’s a dumb question.  I have a 2013 V7 Stone.  I foolishly left my mufflers out in the rain for a month while working on my clutch.  When I put everything back together, I now have a constant check engine light, which has persisted for 35,000 miles now.   I’m convinced it is due to failed/rusty lambda sensors, but haven’t confirmed it. 

Here’s the deal though.  The bike runs just fine.  I get the exact same gas mileage.  It starts fine cold or hot.  The only difference is that about 10 seconds after a cold start, it obviously gets too lean and won’t idle well unless I rev it to 1500 rpm or more and let it warm up a minute or so.  When warmed up it idles fine.

Is this the behavior you would expect give this stock fuel mapping and a presumed failure of the lambda sensors?

I probably need to get a Bettle map but just haven’t gotten around to it. 

If this is somehow horrible for my engine please let me know.



You should check the DTC's (error codes).  Keep in mind that the ECU doesn't go into closed loop mode (lambda fuel trims active) until the engine & intake temperatures meet a predetermined value (typically 55 degrees C for the engine).



Since part of the time at RPMs below 4k it is operating open loop ie not at a steady cruise, wouldn't it be a safe assumption that the open loop base map is reasonably safe if the O2 sensors were turned off.  There have been a few mentions in other threads where just turning them off resulted in smoother operation or elimination of snatchiness. Assuming, of course, a basically stock bike with stock exhaust not needing a substantially richer mapping change. I want to try it on mine.



In open loop mode, the base map is usually slightly rich (for the stock exhaust). Deactivating lambda (and resetting the fuel trims) with a stock bike will typically result in a slightly rich running bike. It certainly won't cause any harm, but fuel consumption will be noticeably higher. Acceleration may seem more tardy.




Offline Zenermaniac

  • Gosling
  • ***
  • Posts: 234
  • Location: Armpit of Ohio, USA
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #29 on: June 28, 2021, 07:02:11 AM »


Quote from: Meinolf on June 06, 2021, 12:28:08 AM
Hi,

recently some question about the MIU G3 as used in the V7 III were asked in the German Guzzi forum. So, another deep dive into a BIN was taken, disassembling and reverse engineering the code as done previously for the 5AM BINs.

The result is this V7III XDF
https://drive.google.com/file/d/1tt02RMq80C2hMfRFN2WDMZ8aAlMgoAup/view?usp=sharing

<Edit> Responding to questions further down the thread a XDF for the V9 was written. The addresses are based on the CM275401 / 46040VC29 BIN with HW311.
The result is this V9 XDF https://drive.google.com/file/d/1jKjloifm4S9aAEIvOKR2E6ZfgYg7u4Id/view?usp=sharing

The code of the V7III and V9 is very similar. Without having done a deep analysis of either BIN the differences are mainly sligthly shifted addresses.

Cheers
Meinolf



My V9’s bin requires the 464D version xdf which shifts a few addresses. I’ve changed them in your xdf so I can read mine. The only slot I couldn’t verify is 76F95 ISO Code as I didn’t know what I should see there. It’s at https://www.dropbox.com/sh/ad6lmx6pikb51bw/AAAeoe2wwYtlAkKANCeM557ja?dl=0 if anyone wants to try it.

 

Quad Lock - The best GPS / phone mount system for your motorcycles, no damage to your cameras!!
Get a Wildguzzi discount of 10% off your order!
http://quadlock.refr.cc/luapmckeever
Advertise Here