|
RomRaider
Documentation
Community
Developers
|
| Author |
Message |
|
fujiillin
|
Post subject: Re: Speed Density FAQ Posted: Tue Jul 28, 2009 7:27 am |
|
 |
| Experienced |
 |
Joined: Wed Feb 13, 2008 3:00 am Posts: 153
|
|
Haven't had much time to get stuff together, but, this should help.
Read through the "32-bit disassembly in IDA" thread, specifically the part about using the VBR to open up the rom, and the bit about using the XMLtoIDC program and script, which will make things much easier once you get the rom to open up in IDA.
I'm not sure which thread it is in, or if it's even been posted formally, but look around for info about the lookup tables and subroutines the ecu uses to find 2d and 3d maps. In a nutshell, the rom is given the lookup table address, and the realtime values, then runs a lookup routine (2d or 3d) to get the right value of any map. In the lookup table, it lists the data type, conversion factor, and the addresses of the table axes and data (addresses in the definitions and IDC files).
Once you get comfortable with it, follow the definitions around to find important subroutines. One thing I found handy was looking at sensor voltages to find the routines that store them as real values, which are then used by other routines and sometimes ran through smoothing routines first. Another very helpful thing for the SD rom is the learn how the CEL table works, iirc there's a good thread in this forum on it.
_________________ 06 Wrx Wagon 2.3 longrod in the works
|
|
| Top |
|
 |
|
gabedude
|
Post subject: Re: Speed Density FAQ Posted: Tue Jul 28, 2009 11:27 am |
|
 |
| RomRaider Developer |
 |
Joined: Tue Jan 23, 2007 9:11 pm Posts: 966 Location: Hillsboro, Oregon
|
|
Have it installed, will be loading up my mappings shortly, stealing some of Victor's work (thanks Victor) and applying it to the 07 and 06 STi. I have an 06 STi spare ECU as well, so that guy is going to be used for reflash testing in Linux.
|
|
| Top |
|
 |
|
06rexwagon
|
Post subject: Re: Speed Density FAQ Posted: Tue Jul 28, 2009 11:39 am |
|
 |
| RomRaider Donator |
 |
Joined: Wed Jun 14, 2006 8:47 pm Posts: 316 Location: New Mexico
|
gabedude wrote: Have it installed, will be loading up my mappings shortly, stealing some of Victor's work (thanks Victor) and applying it to the 07 and 06 STi. I have an 06 STi spare ECU as well, so that guy is going to be used for reflash testing in Linux. Any chance you want to make it work on an 06 WRX?
_________________ 2006 WRX wagon 9.82@150.55mph CAMTuning
|
|
| Top |
|
 |
|
gabedude
|
Post subject: Re: Speed Density FAQ Posted: Tue Jul 28, 2009 11:50 am |
|
 |
| RomRaider Developer |
 |
Joined: Tue Jan 23, 2007 9:11 pm Posts: 966 Location: Hillsboro, Oregon
|
06rexwagon wrote: gabedude wrote: Have it installed, will be loading up my mappings shortly, stealing some of Victor's work (thanks Victor) and applying it to the 07 and 06 STi. I have an 06 STi spare ECU as well, so that guy is going to be used for reflash testing in Linux. Any chance you want to make it work on an 06 WRX? Once I get into it, the code should be easy enough to do for almost any 32 bit ROM. Just give me about a month or so. I am just doing this cause I don't want to buy a new MAF sensor. 
|
|
| Top |
|
 |
|
nsfw
|
Post subject: Re: Speed Density FAQ Posted: Tue Jul 28, 2009 5:00 pm |
|
 |
| Moderator |
Joined: Thu Nov 23, 2006 2:23 am Posts: 2565
|
|
Interested in a tag-team project? I've been meaning to get started again on IDA stuff...
_________________ 2005 Legacy GT w/ ATP 3076, IWG, MBC, BCS, BC 272, LC, FFS, OMG Please don't send questions via PM. Post a thread and send me a link to it instead. Thanks!
|
|
| Top |
|
 |
|
gabedude
|
Post subject: Re: Speed Density FAQ Posted: Tue Jul 28, 2009 5:17 pm |
|
 |
| RomRaider Developer |
 |
Joined: Tue Jan 23, 2007 9:11 pm Posts: 966 Location: Hillsboro, Oregon
|
NSFW wrote: Interested in a tag-team project? I've been meaning to get started again on IDA stuff... Probably. I think I found a leak at the BPV adapter hose that was causing all my weird issues (boost falling off, MAF works sometimes and throws the codes other times, visually it looks ok). After fixing this, if my MAF is ok, I'll spend around 2 weeks tuning my car on E85 (MAF), then dive into running SD. I'll publish my results and what I found in the 07 STi ROM, so other 32 bitters can have some more to go by.
|
|
| Top |
|
 |
|
deucex6400
|
Post subject: Re: Speed Density FAQ Posted: Wed Jul 29, 2009 12:41 am |
|
 |
| Newbie |
Joined: Tue Apr 22, 2008 6:46 pm Posts: 17 Location: Blooming Grove, TX
|
|
I'm working on A2ZJE11J (USDM 06 STI), I'll share any useful information I can uncover. I've been able to get most of the ROM to unwind using the VBR method, so that's a good place to start.
|
|
| Top |
|
 |
|
gabedude
|
Post subject: Re: Speed Density FAQ Posted: Wed Jul 29, 2009 2:46 am |
|
 |
| RomRaider Developer |
 |
Joined: Tue Jan 23, 2007 9:11 pm Posts: 966 Location: Hillsboro, Oregon
|
|
Cool, I fixed my leak, the TXS BPV adapter had come loose (the part that screws into the adapter that connects the hose). After fixing that the MAF started working, so I am gonna spend some time tuning my car first before I go SD for a good VE reference.
Gabe
|
|
| Top |
|
 |
|
Boogaloo
|
Post subject: Re: Speed Density FAQ Posted: Fri Sep 11, 2009 12:22 am |
|
 |
| Newbie |
Joined: Wed Sep 02, 2009 4:35 pm Posts: 81 Location: Southern California
|
|
Any updates on this for us 06 WRX guys? I am really looking hard at this but it is pretty far beyond me to disassemble rom's and do heavy lifting in that area. Would love to have a go at speed density on my car however.
|
|
| Top |
|
 |
|
wittmer25
|
Post subject: Re: Speed Density FAQ Posted: Fri Sep 11, 2009 2:52 pm |
|
 |
| Experienced |
Joined: Fri Mar 23, 2007 2:47 pm Posts: 100 Location: Waco, Texas
|
|
I have been running this for over a year. Has anyone experienced trouble starting their engines? It seems more difficult to start my engine when the engine is warm than when its cold. It turns over fine, just difficult to start. I did remove the fuel comps for intake air temps because air intake temps should already be accounted for. Maybe i need to put them back in? any suggestions?
_________________ Jonathon Wittmer
Waco, Texas
04 Black WRX STi
GT30r
|
|
| Top |
|
 |
|
root
|
Post subject: Re: Speed Density FAQ Posted: Fri Sep 11, 2009 4:25 pm |
|
 |
| Newbie |
Joined: Sat Dec 23, 2006 12:42 am Posts: 51
|
wittmer25 wrote: I have been running this for over a year. Has anyone experienced trouble starting their engines? It seems more difficult to start my engine when the engine is warm than when its cold. It turns over fine, just difficult to start. I did remove the fuel comps for intake air temps because air intake temps should already be accounted for. Maybe i need to put them back in? any suggestions? No significant trouble starting, however if the engine was hot (and the car sat for a short bit) when I start it, I do notice the temp sensor showing signs of heat soak which does screw up the fuel for a few minutes. I haven't really tried to fix it, but I do keep an eye on the wideband gauge to make sure fuel goes back to normal after a minute or two of driving (and it always does).
|
|
| Top |
|
 |
|
Nuke209
|
Post subject: Re: Speed Density FAQ Posted: Fri Oct 16, 2009 5:15 pm |
|
 |
| Experienced |
Joined: Mon Oct 16, 2006 1:10 am Posts: 195
|
Any launch control? Would be really great 
|
|
| Top |
|
 |
|
fujiillin
|
Post subject: Re: Speed Density FAQ Posted: Tue Nov 17, 2009 2:45 pm |
|
 |
| Experienced |
 |
Joined: Wed Feb 13, 2008 3:00 am Posts: 153
|
NSFW wrote: I kind of ignored this thread for a long time, but I have taken a renewed interest after seeing how poorly MAF-based fueling is working for my Legacy after switching to a FMIC and the standard "stage 2" exhaust upgrades. It's ridiculous. I want to put in a bigger turbo this summer (probably an ATP 3076) but I suspect that the higher pressures will just screw up my AFR's even more. So I just read the whole thread. Got excited at the mention of possible ports to the Legacy, got depressed when I reach about the shift issues... ...and had an idea. Freon wrote: TGUI: It takes more power from the turbo to push air past a partially closed throttle, which takes a higher PR across the turbine, which means backpressure in the manifold is higher. Every Speed and Density combination (every spot on the VE map) could still be multiple situations with different throttle angles, different backpressure, and thusly different VE. Am I just stabbing the throttle and waiting for spool @ 90-100% TPS? Or am I cruising up a slight incline @ 20-25% TPS? VE will be higher in the former. Both could be 0psiG, 3200rpm, the same spot on the VE map.
[...]
I am leaning towards using primary metric of boost error and also delta MAP. Trusting boost error as an input means making some assumptions about boost targets and how the car reaches them... but I think those assumptions change depending on which gear you're pulling in. That's certainly the case for my car, and I've also noticed it in graphs MickeyD has posted, showing boost response in different gears. It also seems like delta-MAP would be misleading in cars mine where the boost tapers toward redline. I don't think that means backpressure is decreasing. Have you considered using throttle history to approximate backpressure? What I mean is: Set aside a memory location to store a low-pass-filtered copy of the throttle plate angle. With each iteration of the code, set that filtered value as follows: throttle_delta = current_value - filtered_value filtered_value = filtered_value + (0.5 * throttle_delta) The value of the constant (0.5) could be adjusted to make the filtered value converge on the current value quickly or slowly. If the filtered value is less than the current value, you know the driver is adding throttle, so you assume that backpressure is low (and VE is increased). If the filtered value is higher than the current throttle, you can assume that the driver is lifting throttle, so backpressure is probably high (VE is decreased). So you can apply a compensation like: VE = VE + (compensation_factor * throttle_delta) With luck, a scalar will suffice for the compensation factor, but it might help to look it up from from a 2D table indexed by throttle_delta. I've been looking at SD code some more, and have come up with the following: To clarify: decay_tpa is the 'filtered' tps value that is decayed (towards current tps) delta_decay is the difference between current tps and decay_tps *initalize some stuff* Get last_tpa Get tpa Calculate delta_tpa *check for large delta_tpa and delta_decay convergence to zero* IF (abs(delta_tpa) < Threshold1 && abs(delta_decay) < Threshold2) [store last_tpa => decay_tpa] *set positive or negative delta constants* IF (delta_decay < 0) [set K = negK set K1 = negK1] ELSE [set K = posK set K1 = posK1] *set decay multiplier* set decay = [(K/delta_tpa) + K1] **consider an RPM based factor?** *set new delta_decay value* set delta_decay = tpa - decay_tpa *Decay* set decay_tpa = decay_tpa + (decay * delta_decay) *Finish up* pull comp table with lookup delta_decay set last_tpa = current_tpa From there, lookup values in a 2D compensation table with a delta_decay axis, maybe use a threshold to apply the compensation. This has the option to add a more derivative control if necessary, and provides different response for positive/negative delta_tps. I think it's safe to assume boost onset is going to require different comps vs releasing boost via BOV/BPV. Also, I'm considering removing the +/- 'modes' and using a 3D table with a delta_tpa axis, which would provide the most control with least CPU cycles and less chances to introduce problematic code, but would be trickier to tune. I'm also contemplating a 3D table with RPM or MAP and delta TPA axes as an even simpler method, but it may lack the necessary control, I'm thinking it's redundant; that maybe the same effect could be done with the tip-in and VE tables. I was bored and wrote some preliminary assembly just to see what it would look like. Pretty large and prone to problems, I might just go ahead and test with only delta_map compensation. Code: mov.l (tpa), r6 mov.l (last_tpa), r2 fmov.s @r6, fr1 ! fr1 = tpa mov.l (decay_tpa),r3 fmov.s @r2, fr4 ! fr4 = last_tpa mova (thresh_dt),r1 fsub fr4, fr1 mov.l (delta_decay),r5 fmov.s @r1, fr0 ! fr0 = thresh_dt fmov.s fr1, fr5 ! fr5 = delta tpa fabs fr1 ! fr1 = abs(delta_tpa)
fcmp/gt fr0, fr1 bf/s decay_set ! if below threshold, skip decay_tpa set nop
mova (thresh_delta_decay),r2 fmov.s r2, fr0 ! fr0 = thresh_dd fmov.s @r5, fr1 fmov.s fr1, fr2 fabs fr1 ! fr2 = delta_decay, fr1 = abs(delta_decay)
fcmp/gt fr0, fr1 ! is abs(delta_decay) > threshold? bf/s decay_set ! if below threshold, skip decay_tpa set nop decay_tpa_set: ! thresholds OK, set decay_tpa fmov.s fr4, @r3 ! set last_tpa to decay_tpa
decay_set: fldi0 fr0 fcmp/gt fr0, fr2 ! is delta_decay > 0? bf/s negdecay ! if delta_decay is negative, go to negative decay nop mova (pos_k1), r1 ! set positive constants mova (pos_k), r0 bra decay nop
negdecay: mova (neg_k1), r1 mova (pos_k), r0 ! set negative constants
decay: fmov.s @r0, fr0 ! fr0 = K fmov.s @r3, fr3 ! fr3 = decay_tpa fmov.s @r1, fr1 ! fr1 = K1 fmac fr5, fr0, fr1 ! fr1 = (delta_tpa * K) + K1 fmac fr1, fr2, fr3 ! fr3 = decay_tpa + {[(delta_tpa*K)+K1] * delta_decay} mov.l (decay_table), r4 fmov.s fr3, @r3 ! store new decay_tpa in RAM fmov.s @r6, fr1 ! fr1 = tpa fmov.s fr3, fr4 ! fr4 = delta_decay fsub fr1, fr3 ! fr 3 = delta_decay = tpa - decay tpa fmov.s fr3, @r5 ! store new delta_decay mov.l (pull2d), r2 jsr @r2 ! Pull2d from decay_table with lookup delta_decay mov.l (maf_out), r1 fmov.s @r1, fr1 fmul fr1, fr0 fmov.s fr0, @r1 ! Store Comp'd VEflow to maf_out
_________________ 06 Wrx Wagon 2.3 longrod in the works
|
|
| Top |
|
 |
|
reid-o
|
Post subject: Re: Speed Density FAQ Posted: Wed Nov 25, 2009 8:38 pm |
|
 |
| Newbie |
Joined: Sat Apr 29, 2006 6:57 pm Posts: 30
|
root wrote: wittmer25 wrote: I have been running this for over a year. Has anyone experienced trouble starting their engines? It seems more difficult to start my engine when the engine is warm than when its cold. It turns over fine, just difficult to start. I did remove the fuel comps for intake air temps because air intake temps should already be accounted for. Maybe i need to put them back in? any suggestions? No significant trouble starting, however if the engine was hot (and the car sat for a short bit) when I start it, I do notice the temp sensor showing signs of heat soak which does screw up the fuel for a few minutes. I haven't really tried to fix it, but I do keep an eye on the wideband gauge to make sure fuel goes back to normal after a minute or two of driving (and it always does). I had to alter my MAF (IAT ) compensation, by 1-2 percent past 160degrees. I did that for all MAF points. It seems to have worked.
|
|
| Top |
|
 |
|
Bad Noodle
|
Post subject: Re: Speed Density FAQ Posted: Mon Mar 01, 2010 2:06 am |
|
 |
| Experienced |
Joined: Mon Mar 24, 2008 9:54 pm Posts: 111
|
|
So is there any kind of guide or walkthrough about how to actually implement SD?
|
|
| Top |
|
 |
Who is online |
Users browsing this forum: No registered users and 3 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|