Closed Loop Wideband Code Requirements.....
#51
Supreme Member
iTrader: (2)
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes
on
3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
I was thinking about the origional topic of WB O2 closed loop control. Taking a brief look at the current PID loop, most of that code could probably be reused. My thoughts would be to use a linear voltage vs afr output to the ecm and have the mean O2 volts ride along the curve as the AFRs change and set the thresholds for the adjustments about that. The loop would essentially work the same way as it does with the NB, but would have the same actions throughout a range of desired AFRs (Id probably only select one at any one time to minimize complications). I dont think this would work well for PE or high load, though. The computer is too slow to support a fast PID loop and the corrections may be too sloppy when your in PE. Not only that but I wouldnt like the idea of having the AFRs constantly swinging around when the engine is under high load. Obviously how the O2 volts are handled as well as the gains and such would need SERIOUS reworking. Im thinking of looking deeper into it.
It has really good appeal to me as the 8 bit A/D converter can resolve things as well as a blind nursing home patient with cataracts. I have a good deal of error in my MAF readings at low airflows so my AFRs come in descrete values, and not across a smooth range. This means that most of the time I cant run at an actual AFR, so to run at stoich, Im entirely dependant on the PID loop. It would also mean that one could run leaner then stoich with correction from the ecm. Would come in handy for saving fuel when your cruising. Im thinking of seriously looking into it now that I have my WB. I dont think Id use it all the time, but it I was going on a trip with the car, id probably use it to do the corrections. The wear and tear on the WB could easily be offset by the fuel savings in that situation.
It has really good appeal to me as the 8 bit A/D converter can resolve things as well as a blind nursing home patient with cataracts. I have a good deal of error in my MAF readings at low airflows so my AFRs come in descrete values, and not across a smooth range. This means that most of the time I cant run at an actual AFR, so to run at stoich, Im entirely dependant on the PID loop. It would also mean that one could run leaner then stoich with correction from the ecm. Would come in handy for saving fuel when your cruising. Im thinking of seriously looking into it now that I have my WB. I dont think Id use it all the time, but it I was going on a trip with the car, id probably use it to do the corrections. The wear and tear on the WB could easily be offset by the fuel savings in that situation.
#52
Supreme Member
Join Date: Aug 1999
Location: sweden
Posts: 2,441
Likes: 0
Received 1 Like
on
1 Post
Car: GTA -89
Engine: Blown 415"
Transmission: 4L80E
Axle/Gears: Strange 12-bolt
What are theese changes?
Adress my.bin new WB bin
$758 C8 88
$770 C0 80
$772 C0 80
/N.
Adress my.bin new WB bin
$758 C8 88
$770 C0 80
$772 C0 80
/N.
Last edited by gta324; 05-20-2005 at 03:51 AM.
#53
My downloaded 58_WB bin has:
$758 88 1C
$770 80 00
$772 80 01
BBZB
$758 C8 1C
$770 C0 00
$772 C0 01
From AYBN_hac.src
When he made the bin 32k, things got moved around.
The prom id was at C000 with the 16k bin due to the $4000 offset when loaded on the prom.
In a 32k bin it is offset on load to $8000. So the prom id is now at $8000. Hope I did that right. I haven't messed with any 16k bins.
$758 88 1C
$770 80 00
$772 80 01
BBZB
$758 C8 1C
$770 C0 00
$772 C0 01
From AYBN_hac.src
Code:
;--------------------------------------------- ; F95 ; ;--------------------------------------------- LC750 FCB 0 ; LC751 FCB 0 ; LC752 FCB 0 ; LC753 FCB 0 ; LC754 FCB 0 ; LC755 FCB 0 ; LC756 FCB 0 ; LC757 FCB 0 ; LC758 FCB 200 ; 88h LC759 FCB 28 ; 1Ch ;-------------------------------------------------- ; SERIAL DATA ADDRESSES ; ALDL ; F95 ;-------------------------------------------------- LC770 FCB $C000 ; 1, EPROM ID WD, MSB LC772 FCB $C001 ; 2, EPROM ID WD, LSB
The prom id was at C000 with the 16k bin due to the $4000 offset when loaded on the prom.
In a 32k bin it is offset on load to $8000. So the prom id is now at $8000. Hope I did that right. I haven't messed with any 16k bins.
Last edited by Z69; 05-20-2005 at 03:55 AM.
#54
Supreme Member
Join Date: Aug 1999
Location: sweden
Posts: 2,441
Likes: 0
Received 1 Like
on
1 Post
Car: GTA -89
Engine: Blown 415"
Transmission: 4L80E
Axle/Gears: Strange 12-bolt
I copied all the values between 0x0000 to 0x076F from my current $58bin and then did a diffrence check in tunerpro and found those as undefined and I cant se why they have been changed in the WB code......
I want to understand everychange before I test it in my car.......
I want to understand everychange before I test it in my car.......
#55
You got in before I finished my edits.....
Looking at it again, the copy address might need to be changed.
Someone more familiar with $58 than I am.
edit: I'll try
Try to copy through 74F instead.
Looking at it again, the copy address might need to be changed.
Someone more familiar with $58 than I am.
edit: I'll try
Try to copy through 74F instead.
Last edited by Z69; 05-20-2005 at 04:02 AM.
#56
Supreme Member
Join Date: Aug 1999
Location: sweden
Posts: 2,441
Likes: 0
Received 1 Like
on
1 Post
Car: GTA -89
Engine: Blown 415"
Transmission: 4L80E
Axle/Gears: Strange 12-bolt
Ok, so now its seems ok, but what do the changes do?
58_WB bin has:
$758 88 1C
$770 80 00
$772 80 01
BBZB
$758 C8 1C
$770 C0 00
$772 C0 01
Should "we" name this code to something else then $58 or $AA to make it easier.....??? (have its own TDF/xdf files and so on)
/N.
58_WB bin has:
$758 88 1C
$770 80 00
$772 80 01
BBZB
$758 C8 1C
$770 C0 00
$772 C0 01
Should "we" name this code to something else then $58 or $AA to make it easier.....??? (have its own TDF/xdf files and so on)
/N.
#57
LC770 FCB $C000 ; 1, EPROM ID WD, MSB
LC772 FCB $C001 ; 2, EPROM ID WD, LSB
These are the addresses the aldl subroutine uses to go get the data from. The data that is transmitted out the dianostic port.
It's simple list of go here, here, here for this data.
So the ALDL list needs to be updated to look at the correct location to get the actual prom ID and not some garbage data.
Since the bin was expanded. The physical location(address) of this data was changed to $8000 & $8001. This particular data is on the prom. A lot of the aldl data is in ram so it was not moved by this patch.
A different xdf/ecu isn't really needed. F95 is almost the bottom of the cal area. The xdf uses the bin address to locate data. Which for the cal data, was not moved. 1981TTA only moved the code portion of the bin. Most people don't have the aldl list in their ecu file. Only data referenced by the code as stored on the chip needs changed. Which is a code problem and 1981TTA had to take care of that prior to publish. The xdf still looks at the same "line" in the bin regardless since he did not actually move the tables around. Your about at my limits for explanation.
Rbob or someone else will need to step in if I'm not getting this across adaquately.
LC772 FCB $C001 ; 2, EPROM ID WD, LSB
These are the addresses the aldl subroutine uses to go get the data from. The data that is transmitted out the dianostic port.
It's simple list of go here, here, here for this data.
So the ALDL list needs to be updated to look at the correct location to get the actual prom ID and not some garbage data.
Since the bin was expanded. The physical location(address) of this data was changed to $8000 & $8001. This particular data is on the prom. A lot of the aldl data is in ram so it was not moved by this patch.
A different xdf/ecu isn't really needed. F95 is almost the bottom of the cal area. The xdf uses the bin address to locate data. Which for the cal data, was not moved. 1981TTA only moved the code portion of the bin. Most people don't have the aldl list in their ecu file. Only data referenced by the code as stored on the chip needs changed. Which is a code problem and 1981TTA had to take care of that prior to publish. The xdf still looks at the same "line" in the bin regardless since he did not actually move the tables around. Your about at my limits for explanation.
Rbob or someone else will need to step in if I'm not getting this across adaquately.
Last edited by Z69; 05-20-2005 at 04:53 AM.
#59
$758 is still aldl stuff and was changed for the same reason.
Don't know what that location is for though.
No comment in either of my hacs for it.
edit:
Not for aldl. But the numerical change suggests it was changed for the same as the other two.
Don't know what that location is for though.
No comment in either of my hacs for it.
edit:
Not for aldl. But the numerical change suggests it was changed for the same as the other two.
Last edited by Z69; 05-20-2005 at 05:08 AM.
#60
Moderator
iTrader: (1)
Join Date: Mar 2002
Location: Chasing Electrons
Posts: 18,432
Likes: 0
Received 225 Likes
on
211 Posts
Car: check
Engine: check
Transmission: check
Originally posted by Z69
$758 is still aldl stuff and was changed for the same reason.
Don't know what that location is for though.
No comment in either of my hacs for it.
edit:
Not for aldl. But the numerical change suggests it was changed for the same as the other two.
$758 is still aldl stuff and was changed for the same reason.
Don't know what that location is for though.
No comment in either of my hacs for it.
edit:
Not for aldl. But the numerical change suggests it was changed for the same as the other two.
RBob.
#61
Supreme Member
iTrader: (2)
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes
on
3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
1981TTA, have you gotten anywhere with the closed loop wideband idea? If nothing else, maybe all of us could collectivly kick that side of it off with some of the theory needed to get it to work.
#62
Member
Thread Starter
Join Date: May 2004
Location: SE Michigan
Posts: 289
Likes: 0
Received 0 Likes
on
0 Posts
Car: 81 Turbo Trans Am
Engine: 301 T
Transmission: 200-4R
Sorry I've been away for the last couple of days. Things at work kicked up a notch or two....
gta324, I answered your PM before reading this. You'll notice Z69 and I are in complete agreement on the reasons for the changes. RBob is correct about the second part. You guys must have been looking over my shoulder when I moved things around. Very impressive! You guys are good! When doing a compare, just about any change of $Cx or $Cxxx to $8x or $8xxx was due to the expansion of the code space. By all means keep asking questions. I can completely understand wanting to understand all this before turning it loose in the car!!
I would agree a different "name" isn't needed (yet) for XDF purposes. But, for clarity when talking about specific masks and functions, we have $58 and $60. It might be a good idea to come up with a way to separate this latest mask from the rest. Although I don't know if it's used otherwise, $59 would have a neat meaning. A little better than $58 but "lesser" than $60! I do look forward to the day the WB changes can be merged into $60. But, until things are stable enough to do that, we're left with the middle ground. Until the day of the big merge and assuming there are enough people willing to test, I'm more than happy to continue to make changes.
gta324, I answered your PM before reading this. You'll notice Z69 and I are in complete agreement on the reasons for the changes. RBob is correct about the second part. You guys must have been looking over my shoulder when I moved things around. Very impressive! You guys are good! When doing a compare, just about any change of $Cx or $Cxxx to $8x or $8xxx was due to the expansion of the code space. By all means keep asking questions. I can completely understand wanting to understand all this before turning it loose in the car!!
Should "we" name this code to something else then $58 or $AA to make it easier.....???
#63
Member
Thread Starter
Join Date: May 2004
Location: SE Michigan
Posts: 289
Likes: 0
Received 0 Likes
on
0 Posts
Car: 81 Turbo Trans Am
Engine: 301 T
Transmission: 200-4R
Originally posted by vernw
If there's anything I can do on the $8D version, like in car testing, etc., please be sure to let me know. I'm not well versed enough to handle doing coding changes, but would still like to help out if possible so that I'm not just being a "sponge" on this effort.....
If you like, I can even email you a 730 $8D BIN to start working from.... just let me know.
If there's anything I can do on the $8D version, like in car testing, etc., please be sure to let me know. I'm not well versed enough to handle doing coding changes, but would still like to help out if possible so that I'm not just being a "sponge" on this effort.....
If you like, I can even email you a 730 $8D BIN to start working from.... just let me know.
#64
Member
Thread Starter
Join Date: May 2004
Location: SE Michigan
Posts: 289
Likes: 0
Received 0 Likes
on
0 Posts
Car: 81 Turbo Trans Am
Engine: 301 T
Transmission: 200-4R
Originally posted by skwayb
For the 3 Bar information .....Great work btw.. If you get the AFR vs Map Vs RPM table working that is going to be killer. How are you going to handle the Boost Multipler table?
For the 3 Bar information .....Great work btw.. If you get the AFR vs Map Vs RPM table working that is going to be killer. How are you going to handle the Boost Multipler table?
#65
Member
Thread Starter
Join Date: May 2004
Location: SE Michigan
Posts: 289
Likes: 0
Received 0 Likes
on
0 Posts
Car: 81 Turbo Trans Am
Engine: 301 T
Transmission: 200-4R
Originally posted by dimented24x7
I was thinking about the origional topic of WB O2 closed loop control. ......
have you gotten anywhere with the closed loop wideband idea? If nothing else, maybe all of us could collectivly kick that side of it off with some of the theory needed to get it to work....
I was thinking about the origional topic of WB O2 closed loop control. ......
have you gotten anywhere with the closed loop wideband idea? If nothing else, maybe all of us could collectivly kick that side of it off with some of the theory needed to get it to work....
I very much welcome any ideas on what and how to do the algorithm. I've received some good ideas from others that state as you do that we probably won't want to remove fuel during PE. But, the ability to add it in the proper amount, if needed, could be a very beneficial thing. Your idea of a "controlled" lean cruise is another cool thing to try. My original intent of this thread was to use it as a sounding board for ideas. Definitely keep them coming!
#66
What really got me motivated on this was a post on one of the Buick boards. It was a CL WB setup.
Used it during PE WOT etc, bit selectable to turn off....
Found it...
WB control
No info on how he did it of course.
Just that he has it.
Used it during PE WOT etc, bit selectable to turn off....
Found it...
WB control
No info on how he did it of course.
Just that he has it.
#67
Supreme Member
iTrader: (1)
Join Date: Apr 2004
Location: Browns Town
Posts: 3,178
Likes: 0
Received 3 Likes
on
3 Posts
Car: 86 Monte SS (730,$8D,G3,AP,4K,S_V4)
Engine: 406 Hyd Roller 236/242
Transmission: 700R4 HomeBrew, 2.4K stall
Axle/Gears: 3:73 Posi, 7.5 Soon to break
Excellent concept he implemented!
I think it would be better using a table for the AFR rather than sticking it to one value.
Sounded like it worked well too.
I think it would be better using a table for the AFR rather than sticking it to one value.
Sounded like it worked well too.
#68
Member
Thread Starter
Join Date: May 2004
Location: SE Michigan
Posts: 289
Likes: 0
Received 0 Likes
on
0 Posts
Car: 81 Turbo Trans Am
Engine: 301 T
Transmission: 200-4R
I noticed an error in the original *.bin file that I've just fixed. (New file on Moates site called $59_05222005.zip.) In addition to the WB sensor changes, I also have pieces of logic laying around that I was using to do closed loop control. Before releasing the first version of software, I *thought* I'd disabled everything via the use of calibrations, commenting, deletion and jump/branch statements. Unfortunately, I missed one.
In the original version of the software, I "jump" over the cold AFR routines when a WBO2 isn't selected. In that version, regardless of temperature, the stoichiometric AFR is the only one that will be used. The updated .bin file has re-enabled this logic regardless of O2 sensor.
In addition to this fix, I've also implemented a "Raw Output" option to the code. A second option word has been implemented to cover this functionality. On a better note, that leaves us with 7 more sensors we can configure!!
One final thing I'd like to wrap up before digging into the closed loop logic. Based on some feedback above, the Desired AFR field isn't the best output for the WB AFR. This will become even more apparent as the ability to choose different AFRs for different engine operating conditions are implemented. So, what should we discard from the existing ALDL list in favor of the WB reading....??
In the original version of the software, I "jump" over the cold AFR routines when a WBO2 isn't selected. In that version, regardless of temperature, the stoichiometric AFR is the only one that will be used. The updated .bin file has re-enabled this logic regardless of O2 sensor.
In addition to this fix, I've also implemented a "Raw Output" option to the code. A second option word has been implemented to cover this functionality. On a better note, that leaves us with 7 more sensors we can configure!!
One final thing I'd like to wrap up before digging into the closed loop logic. Based on some feedback above, the Desired AFR field isn't the best output for the WB AFR. This will become even more apparent as the ability to choose different AFRs for different engine operating conditions are implemented. So, what should we discard from the existing ALDL list in favor of the WB reading....??
Last edited by 1981TTA; 05-22-2005 at 07:59 PM.
#69
I see we have a ALDL count. Never used that option.
Another depending on how you plan to do it, is the BLM.
If you going WB closed loop, is BLM somewhat changed or being removed? just be INT's?
I know when I tune, being the 749 BLM's are worthless with only 2 storages (closed and open throttle) I general block them off, let INT handle it.
Couple others could be spark count (most just look at degrees)
O2 cross counts (may or maynot be useful with wb o2)
I am still excited to see this project move forward.
Another depending on how you plan to do it, is the BLM.
If you going WB closed loop, is BLM somewhat changed or being removed? just be INT's?
I know when I tune, being the 749 BLM's are worthless with only 2 storages (closed and open throttle) I general block them off, let INT handle it.
Couple others could be spark count (most just look at degrees)
O2 cross counts (may or maynot be useful with wb o2)
I am still excited to see this project move forward.
#70
Supreme Member
iTrader: (1)
Join Date: Apr 2004
Location: Browns Town
Posts: 3,178
Likes: 0
Received 3 Likes
on
3 Posts
Car: 86 Monte SS (730,$8D,G3,AP,4K,S_V4)
Engine: 406 Hyd Roller 236/242
Transmission: 700R4 HomeBrew, 2.4K stall
Axle/Gears: 3:73 Posi, 7.5 Soon to break
seems like FP volts would be another possible candidate.
You already have battery volts there.
the run time is another good one providing the datalogging is not using the time as a reference value. That give you two spots.
You already have battery volts there.
the run time is another good one providing the datalogging is not using the time as a reference value. That give you two spots.
#71
Supreme Member
iTrader: (2)
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes
on
3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
Originally posted by ty1295
I see we have a ALDL count. Never used that option.
Another depending on how you plan to do it, is the BLM.
If you going WB closed loop, is BLM somewhat changed or being removed? just be INT's?
I know when I tune, being the 749 BLM's are worthless with only 2 storages (closed and open throttle) I general block them off, let INT handle it.
Couple others could be spark count (most just look at degrees)
O2 cross counts (may or maynot be useful with wb o2)
I am still excited to see this project move forward.
I see we have a ALDL count. Never used that option.
Another depending on how you plan to do it, is the BLM.
If you going WB closed loop, is BLM somewhat changed or being removed? just be INT's?
I know when I tune, being the 749 BLM's are worthless with only 2 storages (closed and open throttle) I general block them off, let INT handle it.
Couple others could be spark count (most just look at degrees)
O2 cross counts (may or maynot be useful with wb o2)
I am still excited to see this project move forward.
#72
Member
Thread Starter
Join Date: May 2004
Location: SE Michigan
Posts: 289
Likes: 0
Received 0 Likes
on
0 Posts
Car: 81 Turbo Trans Am
Engine: 301 T
Transmission: 200-4R
I was playing around tonight and found another good candidate (I think). There are two AFR values on the ALDL. One is located at word #41 (Cranking AFR?). The other is the more familiar AFR at #55 which I'm currently using. This is listed in TunerPro. But, I don't see it in Datamaster. If it is available there, this would seem to be the best of both worlds!
Regarding the functional questions, here's how I think the first iteration is going to go...... To help everyone work their way into this with the least amount of relearning, we'll use the vast majority of the existing INT/BLM logic....
* The WB sensor's AFR value will be compared to the desired AFR value to determine whether the engine is "rich" or "lean". (Very similar to NB except the WB would comprehend values other than 14.7.)
* The existing O2 transport delay logic portion of the INT will remain intact. The INT update rate can be changed via the existing MAP and RPM-based calibration tables.
* The portion of the NB CL logic that can "bump" the INT based on O2 voltages will be bypassed (for now).
* The existing proportional steps (with EGR dependencies) will be left as-is.
* The BLMs will function pretty much as-is except it will be allowed to learn when not at "stoich".
* O2 MALF codes will be disabled.
* Current fueling modifiers while in PE (i.e. use INT as-is if > 128 else reset to 128) will continue to apply.
* Leave the NBO2 stuff there and calibration selectable so we can switch back-and-forth as needed.
You might wonder why I've gone into this much detail. Well, because that's the functionality that worked on the bench after working on this today!! WooHoo!! Next step will be working in the vehicle tomorrow to do some further testing........
After this level of functionality checks out for stoich operation, we'll implement a desired AFR table and the potential to "learn" during PE. (Probably only enrichen...?) Further changes would include implementing a "real" integrator algorithm with the potential for modifying the current BLM operation.
Regarding the functional questions, here's how I think the first iteration is going to go...... To help everyone work their way into this with the least amount of relearning, we'll use the vast majority of the existing INT/BLM logic....
* The WB sensor's AFR value will be compared to the desired AFR value to determine whether the engine is "rich" or "lean". (Very similar to NB except the WB would comprehend values other than 14.7.)
* The existing O2 transport delay logic portion of the INT will remain intact. The INT update rate can be changed via the existing MAP and RPM-based calibration tables.
* The portion of the NB CL logic that can "bump" the INT based on O2 voltages will be bypassed (for now).
* The existing proportional steps (with EGR dependencies) will be left as-is.
* The BLMs will function pretty much as-is except it will be allowed to learn when not at "stoich".
* O2 MALF codes will be disabled.
* Current fueling modifiers while in PE (i.e. use INT as-is if > 128 else reset to 128) will continue to apply.
* Leave the NBO2 stuff there and calibration selectable so we can switch back-and-forth as needed.
You might wonder why I've gone into this much detail. Well, because that's the functionality that worked on the bench after working on this today!! WooHoo!! Next step will be working in the vehicle tomorrow to do some further testing........
After this level of functionality checks out for stoich operation, we'll implement a desired AFR table and the potential to "learn" during PE. (Probably only enrichen...?) Further changes would include implementing a "real" integrator algorithm with the potential for modifying the current BLM operation.
#73
Supreme Member
iTrader: (2)
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes
on
3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
I think there needs to be at least some form of error handling. Like maybe something to set a code if the volts from the WB are zero or the O2 fails to cross-count after a certain time interval. In my stock code, at least, they also clear out the prop. gains and skip the int adjustment if the O2 volts get stuck around .450 from an open circuit or something.
#74
Member
Thread Starter
Join Date: May 2004
Location: SE Michigan
Posts: 289
Likes: 0
Received 0 Likes
on
0 Posts
Car: 81 Turbo Trans Am
Engine: 301 T
Transmission: 200-4R
I agree! In concert with "errors", we also need to determine when the WB is "ready". Since I don't have details for all sensors, I've started by implementing an engine run time check along with upper/lower AFR bounds to determine readiness. These AFR bounds are also constantly monitored so the CL algorithm will default INT to 128 if the sensor goes crazy.
Implementation of a smarter algorithm to insure there's a change in AFR when fuel is added or subtracted is a good idea. For now, the existing INT/BLM clamps are in place to insure any erroneous WB reading doesn't have any more authority to change fueling than a false NB reading.
Implementation of a smarter algorithm to insure there's a change in AFR when fuel is added or subtracted is a good idea. For now, the existing INT/BLM clamps are in place to insure any erroneous WB reading doesn't have any more authority to change fueling than a false NB reading.
#75
Originally posted by 1981TTA
I don't know how you're translating the calibrations between bins. But, if you aren't already, you should be able to simply copy everything from 0x0000 to 0x076F directly over.
I don't know how you're translating the calibrations between bins. But, if you aren't already, you should be able to simply copy everything from 0x0000 to 0x076F directly over.
I have a $60 code already on my buick thanks to Grumpy. Wouldn't mind trying your code, but obviously I have a lot of tables that have been changed.
This will overide the cylinder select as an example right? Do I just go back and fix that?
#76
Supreme Member
iTrader: (2)
Join Date: Jul 2003
Location: Dallas, TX area
Posts: 3,205
Likes: 0
Received 0 Likes
on
0 Posts
Car: 91 Formula WS6 (Black, T-Tops)
Engine: 383 MiniRam (529 HP, 519 TQ - DD2K)
Transmission: Built '97 T56, Pro 5.0, CF-DF
Axle/Gears: 4.11 posi Ford 9"
Originally posted by 1981TTA
Got a few things going and a few offers of help on $8D that might get things moving quicker. I'll keep everyone posted. I'm very certain we'll need people to test the results. I'll definitely take you up on that offer!
Got a few things going and a few offers of help on $8D that might get things moving quicker. I'll keep everyone posted. I'm very certain we'll need people to test the results. I'll definitely take you up on that offer!
#77
Originally posted by ty1295
Is this still true?
I have a $60 code already on my buick thanks to Grumpy. Wouldn't mind trying your code, but obviously I have a lot of tables that have been changed.
This will overide the cylinder select as an example right? Do I just go back and fix that?
Is this still true?
I have a $60 code already on my buick thanks to Grumpy. Wouldn't mind trying your code, but obviously I have a lot of tables that have been changed.
This will overide the cylinder select as an example right? Do I just go back and fix that?
You could do a cut and paste to the individual tables to swap your tune. Tedious......
I'm not sure if 1981TTA is doing this concurrently on the $60.
But it would be a lot easier to simply put some wb code into the $60.
#78
Member
Thread Starter
Join Date: May 2004
Location: SE Michigan
Posts: 289
Likes: 0
Received 0 Likes
on
0 Posts
Car: 81 Turbo Trans Am
Engine: 301 T
Transmission: 200-4R
The cal area has a lot of changes to it in the $60.
You could do a cut and paste to the individual tables to swap your tune. Tedious......
I'm not sure if 1981TTA is doing this concurrently on the $60.
But it would be a lot easier to simply put some wb code into the $60.
You could do a cut and paste to the individual tables to swap your tune. Tedious......
I'm not sure if 1981TTA is doing this concurrently on the $60.
But it would be a lot easier to simply put some wb code into the $60.
I'm planning on implementing the WB logic in $60 some time in the future. For now, "new" changes to the $60 source code are on hold while testing/verification is underway. As anyone who's seen or used this code knows, there is quite a bit of functionality in there that wasn't present in $58. Piling on more changes before what's there has been verified would likely be counterproductive...... I can speak personally of my ability to trip over my own changes in the code.
#79
Member
Thread Starter
Join Date: May 2004
Location: SE Michigan
Posts: 289
Likes: 0
Received 0 Likes
on
0 Posts
Car: 81 Turbo Trans Am
Engine: 301 T
Transmission: 200-4R
Originally posted by vernw
I sure hope you do! I'd like to at least be somewhat of a help on this....
I sure hope you do! I'd like to at least be somewhat of a help on this....
https://www.thirdgen.org/techbb2/sho...hreadid=298357
#80
Supreme Member
iTrader: (2)
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes
on
3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
Another thing I was thinking is if we could get a derivative term in the current PI(but not the D) loop. The current setup with the crossing NB O2 volts will make a derivative term sort of pointless as teh system is designed to overshoot, anyway, to make the O2 cross-count. But, with damping to prevent the overshoot we could instead have the ecm seek a steady AFR via the WB rather then have the swinging O2 with the integral/BLM centering the AFR around a certain value.
Of course, the flip side is that the loop is so sluggish in comparison with the engine that a derivative term may not be needed.
Of course, the flip side is that the loop is so sluggish in comparison with the engine that a derivative term may not be needed.
#81
Supreme Member
iTrader: (2)
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes
on
3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
Heres what appears to be a good theoretical discussion of PID control: http://www.expertune.com/tutor.html
#82
Supreme Member
iTrader: (2)
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes
on
3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
I started working on roughing in a routine.
I decided to use the following equations as teh core for my routine:
error = (O2 setpoint - filtered O2)
Prop gain = K(error)
INT = K*(1/Int. time)*integral(error(t) dt))=(1/int time)*integral( prop gain)
Obviously the actual form in the code differs quite a bit. The gain terms, int time, etc are all in tables based off of airflow.
No derivative term, though, nowhere near enough room timewise for that in my code. I added deadband around the setpoint instead to try and break the corrections to prevent overshoot. Basically it scales the O2 error down to zero when the AFRs reach teh dead band. I hope itll at least kinda work.
I decided to use the following equations as teh core for my routine:
error = (O2 setpoint - filtered O2)
Prop gain = K(error)
INT = K*(1/Int. time)*integral(error(t) dt))=(1/int time)*integral( prop gain)
Obviously the actual form in the code differs quite a bit. The gain terms, int time, etc are all in tables based off of airflow.
No derivative term, though, nowhere near enough room timewise for that in my code. I added deadband around the setpoint instead to try and break the corrections to prevent overshoot. Basically it scales the O2 error down to zero when the AFRs reach teh dead band. I hope itll at least kinda work.
#83
Member
Thread Starter
Join Date: May 2004
Location: SE Michigan
Posts: 289
Likes: 0
Received 0 Likes
on
0 Posts
Car: 81 Turbo Trans Am
Engine: 301 T
Transmission: 200-4R
I would agree the "D" term really shouldn't be needed. My assumption (well, one of many...) during development is that the VE tables are reasonably close or are getting there. Therefore, the feedforward portion of the fueling algorithm should handle the vast majority of driving conditions that would cause a sudden deviation from setpoint.
I was able to get some time over the weekend to try out my first WBCL algorithm in-vehicle. This is the version that simply uses the existing INT/BLM logic with the WBO2 indicating "rich" or "lean" of the desired AFR as described above. I think I remember a post by RBob that described the resolution of the INT term a while back. I'm going to have to go through the math myself to see how big of a "step" in fueling is achieved with a "step" in INT. As the algorithm stands now, the INT would move +/-1 while the WBO2 AFR moved +/- 0.1 AFR. Since this represents the lowest resolution of each variable, things would appear pretty stable. Although I can only test at idle, the algorithm appeared to behave very well.
I did run into some issues with my WBO2 sensor connection. It appears to "cut-out" at times such that it indicates a lean mixture for a few seconds before moving back to what it was reading previously. I think this is due to a poor connection in the rats nest of wires I have floating around the ECM. This problem did make me consider some additional constraints to put on the algorithm. Currently, I only have upper and lower absolute AFR limits to determine whether the algortihm should operate. Now, I'm leaning toward an AFR "band" around the current desired AFR value. Also, I currently don't filter the WBO2 signal/AFR into the ECM. This was originally left out so I could datalog transient behavior. A calibratable filter on the value going into the CL algorithm may be helpful....? Given my sensor reading problems, this may turn out to be unneeded. Maybe a setpoint deadband like you implemented would be better....
The testing continues......
I was able to get some time over the weekend to try out my first WBCL algorithm in-vehicle. This is the version that simply uses the existing INT/BLM logic with the WBO2 indicating "rich" or "lean" of the desired AFR as described above. I think I remember a post by RBob that described the resolution of the INT term a while back. I'm going to have to go through the math myself to see how big of a "step" in fueling is achieved with a "step" in INT. As the algorithm stands now, the INT would move +/-1 while the WBO2 AFR moved +/- 0.1 AFR. Since this represents the lowest resolution of each variable, things would appear pretty stable. Although I can only test at idle, the algorithm appeared to behave very well.
I did run into some issues with my WBO2 sensor connection. It appears to "cut-out" at times such that it indicates a lean mixture for a few seconds before moving back to what it was reading previously. I think this is due to a poor connection in the rats nest of wires I have floating around the ECM. This problem did make me consider some additional constraints to put on the algorithm. Currently, I only have upper and lower absolute AFR limits to determine whether the algortihm should operate. Now, I'm leaning toward an AFR "band" around the current desired AFR value. Also, I currently don't filter the WBO2 signal/AFR into the ECM. This was originally left out so I could datalog transient behavior. A calibratable filter on the value going into the CL algorithm may be helpful....? Given my sensor reading problems, this may turn out to be unneeded. Maybe a setpoint deadband like you implemented would be better....
The testing continues......
#84
Very nice work. In my GN ecm code for the wideband I adjust the BLM address in a similar single point fashion since the 148 code locks the BLM to BLM cell 15(0-15) value once you reach any decent level of PE. The fun part then is determining the correct frequency for making these adustments and if you want to be able to make faster adjustments if the reported WB A/F ratio is really out of whack to what you've programmed PE to run at. My code is only active in PE w/ a MAF greater than 180 because below 180 its just too easy to let the ecm and stock switching o2 control C/L fueling. I worked on and ran some rull time C/L WB code but the frequency again changes since the airflow thru the system is so small it takes a certain amount of time for the WB so see throttle movement and such. Non PE O/L is also an option by getting all the non PE MAF/VE tables in adjustment since you have the WB to work with to get them in line BTDT too and still like the factory C/L non PE for simplicity. If you can figure out how to adjust the o2 switching values in your code then you can adjust the A/F ratio for all non PE to run a little richer or leaner whatever your car likes and certainly helps for emissions
Anyway, I've rambled too long,
Keep up the good work...
Anyway, I've rambled too long,
Keep up the good work...
Last edited by BoostKillsStres; 06-01-2005 at 12:52 AM.
#85
Supreme Member
iTrader: (2)
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes
on
3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
Now that I think of it Im not as happy with what i have at the moment as I could be. i tried to re-use some of the stock algorithms and I dont think itll work too well. I freed up some space elsewhere so I can now have a little more time in the loop where the PID code resides. Im thinking of adding a derivative term and just using the fast filtered O2 for all the calculations rather then the slow filtered O2 thats based off of airflow. I think it could make for a much better control routine.
The next step is to try and model the engine as a simple airpump with air entering and heated gasses leaving and factor in the transport delays from the tbi to the end of the header. Itll be super-idealized, but at least Ill be able to see the PID algorithm running in MATLAB or something so Ill be able to make a good guess at setting it up. Also helps to see what Im actually trying to accomplish.
The next step is to try and model the engine as a simple airpump with air entering and heated gasses leaving and factor in the transport delays from the tbi to the end of the header. Itll be super-idealized, but at least Ill be able to see the PID algorithm running in MATLAB or something so Ill be able to make a good guess at setting it up. Also helps to see what Im actually trying to accomplish.
#86
Moderator
iTrader: (1)
Join Date: Mar 2002
Location: Chasing Electrons
Posts: 18,432
Likes: 0
Received 225 Likes
on
211 Posts
Car: check
Engine: check
Transmission: check
I don't know if this will help, just some ramblings on the stock PID control. The proportional gains are setup in such as way to force the fueling to crosscount (O2 switch rich-lean, or lean-rich). As such the PID loop is forced to oscillate. Reducing the proportional gains will then cause the INTegrator to oscillate. The stock code needs to see crosscounts, it is designed to oscillate.
There are several items that I consider derivative terms. Basically they are resets of certain values. On a crosscount the proportional gain is reset along with some timers (INT delay, prop delay?). Optionally the INT can be reset on AE active or a BLM cell to use change.
For WB control would we/you want a more traditional PID loop, or one that has BLM cells? Stock, the BLM follows the INT. Traditional, the INT is only used to remove that last bit of error that the proportional gain can't eliminate. My thought is that a more traditional PID loop would be better for WB control.
Use a separate section of code that is called when WB fuel control is required. Use proportional gains to get the fueling close, then clean it up with some INTegrator gain. During transient conditions the WB controller would be put in a hold state. This is to prevent wide PID swings from AE or DE.
A reset of the WB fuel control PID parameters may be required under certain conditions. Integrator windup is another issue that may need to be addressed.
Once all this is in place it is an easy matter to implement WB O2 sensor testing. Create a rich or lean slug and check the WB input for a reasonable value and response time.
For in-vehicle code testing have the code monitor a digital input. If the input is active use the WB code, inactive, use stock fuel code. Put a switch on that input so that the fueling mode can be chosen. This way the vehicle can be driven w/o issue, and once that deserted industrial park is reached flip the switch and try out the closed loop WB control. If it gets out of hand, flip the switch back.
BobR.
There are several items that I consider derivative terms. Basically they are resets of certain values. On a crosscount the proportional gain is reset along with some timers (INT delay, prop delay?). Optionally the INT can be reset on AE active or a BLM cell to use change.
For WB control would we/you want a more traditional PID loop, or one that has BLM cells? Stock, the BLM follows the INT. Traditional, the INT is only used to remove that last bit of error that the proportional gain can't eliminate. My thought is that a more traditional PID loop would be better for WB control.
Use a separate section of code that is called when WB fuel control is required. Use proportional gains to get the fueling close, then clean it up with some INTegrator gain. During transient conditions the WB controller would be put in a hold state. This is to prevent wide PID swings from AE or DE.
A reset of the WB fuel control PID parameters may be required under certain conditions. Integrator windup is another issue that may need to be addressed.
Once all this is in place it is an easy matter to implement WB O2 sensor testing. Create a rich or lean slug and check the WB input for a reasonable value and response time.
For in-vehicle code testing have the code monitor a digital input. If the input is active use the WB code, inactive, use stock fuel code. Put a switch on that input so that the fueling mode can be chosen. This way the vehicle can be driven w/o issue, and once that deserted industrial park is reached flip the switch and try out the closed loop WB control. If it gets out of hand, flip the switch back.
BobR.
Last edited by RBob; 06-01-2005 at 09:19 AM.
#87
Supreme Member
iTrader: (2)
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes
on
3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
My thoughts on the BLMs is taht they can be a good fail-safe in the event of some sort of serious fueling snafu. like a failing pump or a maf that goes **** up. My idea was to have the PG/INT handle all the fueling corrections and only have the BLMs step in when there is an error on the fueling side. they could then do a bit of smoothing so the car is more drivable.
Although, it sure is tempting to dump the BLM routine. I may very well ditch them altogether. With the extra time, I could consolidate the two fuel loops and run the PID routine 80 times a second.
Although, it sure is tempting to dump the BLM routine. I may very well ditch them altogether. With the extra time, I could consolidate the two fuel loops and run the PID routine 80 times a second.
#88
Supreme Member
iTrader: (2)
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes
on
3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
As far as windup goes, are there any conditions during P/T where windup would ocur? Obviously if it was used during PE the INT could easily windup if the injectors went static.
#89
Supreme Member
iTrader: (2)
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes
on
3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
Does anyone think that a model would be of any use for simulations?
my entire fueling world revolves around airflow and dutycycle so in that respect the engine is just a large pump that Im dumping fuel into to match the air thats going in. On the buisness end I have hot gasses rushing out through the headers and past my O2 sensor. it would seem that I could at least get some crude information on how the PID loop will react by simulating the change in AFR input for a given correction and the transient times at each given airflow.
my entire fueling world revolves around airflow and dutycycle so in that respect the engine is just a large pump that Im dumping fuel into to match the air thats going in. On the buisness end I have hot gasses rushing out through the headers and past my O2 sensor. it would seem that I could at least get some crude information on how the PID loop will react by simulating the change in AFR input for a given correction and the transient times at each given airflow.
#90
Member
Thread Starter
Join Date: May 2004
Location: SE Michigan
Posts: 289
Likes: 0
Received 0 Likes
on
0 Posts
Car: 81 Turbo Trans Am
Engine: 301 T
Transmission: 200-4R
I worked on and ran some rull time C/L WB code but the frequency again changes since the airflow thru the system is so small it takes a certain amount of time for the WB so see throttle movement and such.
If you can figure out how to adjust the o2 switching values in your code then you can adjust the A/F ratio for all non PE to run a little richer or leaner whatever your car likes and certainly helps for emissions
...and still like the factory C/L non PE for simplicity ...
Anyway, I've rambled too long,
#91
Member
Thread Starter
Join Date: May 2004
Location: SE Michigan
Posts: 289
Likes: 0
Received 0 Likes
on
0 Posts
Car: 81 Turbo Trans Am
Engine: 301 T
Transmission: 200-4R
As far as windup goes, are there any conditions during P/T where windup would ocur?
Does anyone think that a model would be of any use for simulations?
...Although, it sure is tempting to dump the BLM routine ...
#92
Supreme Member
iTrader: (2)
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes
on
3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
I did a simple simulation with the engine basically being a pump and there being a delay from the time it takes the cylinders to go through a work cycle and also from the travel time of the exhaust.
Basically I learned:
1). There can be NO derivative term!!! Theres something called the Nyquist frequency. This is where the frequency of the signal approaches 1/2 the sampling rate. Above this the signal begins to lead the readings and signal appears as noise to the derivative term. It becomes ever more sensitive and basically flies off the handle. This showed up as a bouncing in the simulated AFRs whenever any derivative was present. With our PID loop, the sampling rate is very close to the rate that the cylinders fire. So... put a big thick dash through the derivative.
2). The integral does indeed 'windup' if the gain or the integral time arnt correct and it has much more gain then it should. Basically itll respond much faster then the engine does so itll keep dumping or removing fuel well before it gets any true feedback.
3). The end result of any corrections must be in terms of fueling (PW, DC, etc.), not AFR or raw O2 output. Basically the fuel is the input into the motor and your basically correcting to get the actual fueling to equal the desired fueling at the setpoint AFR. The stock code does this by basically having the integral be very small. Each integral/Prop gain term step in my stock code is 15.26 usecs of fuel IIRC.
Basically I learned:
1). There can be NO derivative term!!! Theres something called the Nyquist frequency. This is where the frequency of the signal approaches 1/2 the sampling rate. Above this the signal begins to lead the readings and signal appears as noise to the derivative term. It becomes ever more sensitive and basically flies off the handle. This showed up as a bouncing in the simulated AFRs whenever any derivative was present. With our PID loop, the sampling rate is very close to the rate that the cylinders fire. So... put a big thick dash through the derivative.
2). The integral does indeed 'windup' if the gain or the integral time arnt correct and it has much more gain then it should. Basically itll respond much faster then the engine does so itll keep dumping or removing fuel well before it gets any true feedback.
3). The end result of any corrections must be in terms of fueling (PW, DC, etc.), not AFR or raw O2 output. Basically the fuel is the input into the motor and your basically correcting to get the actual fueling to equal the desired fueling at the setpoint AFR. The stock code does this by basically having the integral be very small. Each integral/Prop gain term step in my stock code is 15.26 usecs of fuel IIRC.
#93
Supreme Member
iTrader: (2)
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes
on
3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
Another problem that I thought of is that the Proportioning term only seeks stability, so itll tend to settle out wherever the hell it feels like it and leave the INT to do the rest of the work involved in bringing the AFRs in line. All fine and good but its sluggish with the int handing it alone. We could use the prop term to help out more but without the derivative, the prop. term will swing around like its on a spring and take some time to settle out, wich will cause overshoot. Teh factory basically just uses the swing in its favor to allow the PID to come to the mean desired AFR more quickly.
#94
Supreme Member
iTrader: (2)
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes
on
3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
Based on this, I may just keep the narrow band. I could use a traditional PI loop, but it would be relatively slow to finally reach the targeted AFR when small errors are present. With large errors, the prop. gain handles it but once the error gets below a certain level, the PG goes off to the land of truncated bits and rounding errors and no longer helps. Even better is if the gain was too high. It would wink in and out from some extra dimension and cause the fueling to get all screwy.
Just some random thoughts, but during PE, though, the WB could be of use. it wouldnt be able to make the AFRs dead on, but if there is large errors present, the PG would quickly correct for them. You probably could just use a P control algorithm as the INT wont be of much use during the furies of WOT. This would be quite simple to implement and would allow for corrections if the fueling where to stray way off from the desired AFR.
Just some random thoughts, but during PE, though, the WB could be of use. it wouldnt be able to make the AFRs dead on, but if there is large errors present, the PG would quickly correct for them. You probably could just use a P control algorithm as the INT wont be of much use during the furies of WOT. This would be quite simple to implement and would allow for corrections if the fueling where to stray way off from the desired AFR.
#95
Member
Thread Starter
Join Date: May 2004
Location: SE Michigan
Posts: 289
Likes: 0
Received 0 Likes
on
0 Posts
Car: 81 Turbo Trans Am
Engine: 301 T
Transmission: 200-4R
Originally posted by dimented24x7
Another problem that I thought of is that the Proportioning term only seeks stability, so itll tend to settle out wherever the hell it feels like it and leave the INT to do the rest of the work involved in bringing the AFRs in line. All fine and good but its sluggish with the int handing it alone. We could use the prop term to help out more but without the derivative, the prop. term will swing around like its on a spring and take some time to settle out, wich will cause overshoot. Teh factory basically just uses the swing in its favor to allow the PID to come to the mean desired AFR more quickly.
Another problem that I thought of is that the Proportioning term only seeks stability, so itll tend to settle out wherever the hell it feels like it and leave the INT to do the rest of the work involved in bringing the AFRs in line. All fine and good but its sluggish with the int handing it alone. We could use the prop term to help out more but without the derivative, the prop. term will swing around like its on a spring and take some time to settle out, wich will cause overshoot. Teh factory basically just uses the swing in its favor to allow the PID to come to the mean desired AFR more quickly.
#96
Member
Thread Starter
Join Date: May 2004
Location: SE Michigan
Posts: 289
Likes: 0
Received 0 Likes
on
0 Posts
Car: 81 Turbo Trans Am
Engine: 301 T
Transmission: 200-4R
Originally posted by dimented24x7
Based on this, I may just keep the narrow band. I could use a traditional PI loop, but it would be relatively slow to finally reach the targeted AFR when small errors are present. With large errors, the prop. gain handles it but once the error gets below a certain level, the PG goes off to the land of truncated bits and rounding errors and no longer helps. Even better is if the gain was too high. It would wink in and out from some extra dimension and cause the fueling to get all screwy.
Based on this, I may just keep the narrow band. I could use a traditional PI loop, but it would be relatively slow to finally reach the targeted AFR when small errors are present. With large errors, the prop. gain handles it but once the error gets below a certain level, the PG goes off to the land of truncated bits and rounding errors and no longer helps. Even better is if the gain was too high. It would wink in and out from some extra dimension and cause the fueling to get all screwy.
Originally posted by dimented24x7
Just some random thoughts, but during PE, though, the WB could be of use. it wouldnt be able to make the AFRs dead on, but if there is large errors present, the PG would quickly correct for them. You probably could just use a P control algorithm as the INT wont be of much use during the furies of WOT. This would be quite simple to implement and would allow for corrections if the fueling where to stray way off from the desired AFR.
Just some random thoughts, but during PE, though, the WB could be of use. it wouldnt be able to make the AFRs dead on, but if there is large errors present, the PG would quickly correct for them. You probably could just use a P control algorithm as the INT wont be of much use during the furies of WOT. This would be quite simple to implement and would allow for corrections if the fueling where to stray way off from the desired AFR.
#97
Member
Thread Starter
Join Date: May 2004
Location: SE Michigan
Posts: 289
Likes: 0
Received 0 Likes
on
0 Posts
Car: 81 Turbo Trans Am
Engine: 301 T
Transmission: 200-4R
Originally posted by RBob
For WB control would we/you want a more traditional PID loop, or one that has BLM cells? Stock, the BLM follows the INT. Traditional, the INT is only used to remove that last bit of error that the proportional gain can't eliminate. My thought is that a more traditional PID loop would be better for WB control.
For WB control would we/you want a more traditional PID loop, or one that has BLM cells? Stock, the BLM follows the INT. Traditional, the INT is only used to remove that last bit of error that the proportional gain can't eliminate. My thought is that a more traditional PID loop would be better for WB control.
Originally posted by RBob
Use a separate section of code that is called when WB fuel control is required. Use proportional gains to get the fueling close, then clean it up with some INTegrator gain. During transient conditions the WB controller would be put in a hold state. This is to prevent wide PID swings from AE or DE.
Use a separate section of code that is called when WB fuel control is required. Use proportional gains to get the fueling close, then clean it up with some INTegrator gain. During transient conditions the WB controller would be put in a hold state. This is to prevent wide PID swings from AE or DE.
Originally posted by RBob
For in-vehicle code testing have the code monitor a digital input. If the input is active use the WB code, inactive, use stock fuel code. Put a switch on that input so that the fueling mode can be chosen. This way the vehicle can be driven w/o issue, and once that deserted industrial park is reached flip the switch and try out the closed loop WB control. If it gets out of hand, flip the switch back.
For in-vehicle code testing have the code monitor a digital input. If the input is active use the WB code, inactive, use stock fuel code. Put a switch on that input so that the fueling mode can be chosen. This way the vehicle can be driven w/o issue, and once that deserted industrial park is reached flip the switch and try out the closed loop WB control. If it gets out of hand, flip the switch back.
#98
Supreme Member
iTrader: (2)
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes
on
3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
Originally posted by 1981TTA
The nature of the PI loop is to move "slowly" when error is low and "quickly" when error is high. I do agree some rescaling of variables would be in order. Given a WB AFR reading with a resolution of 0.1, there has to be quite a bit of error before we escape the land of truncation!
The nature of the PI loop is to move "slowly" when error is low and "quickly" when error is high. I do agree some rescaling of variables would be in order. Given a WB AFR reading with a resolution of 0.1, there has to be quite a bit of error before we escape the land of truncation!
Oh, what the hell, Ill try the WB closed loop at p/t to see how it works. One question though is how to tie the O2 in with the fuel calibration. Ideally the errors should be in terms of fueling and not O2. I would assume, though, that one way to make the WB error tie into the fueling is to fudge it and just make the minumum stepsize of the correction term from the PI loop sufficiently small and set the gains to get the desired output. The other way would be to calculate the error in terms of PW or DC using the MAF airflow. But, the MAF is one of my sources of error so that might not be the best idea. Hmmm...
#99
As long as the ve table is pretty close, I'd think a PI could made to control well. But people will use it w/o a good table.
A small 2d table with PG or multipliers vs error would minimize the slow vs fast response time issue .
Could also use a multiplier for PE vs non PE to alter the response time some more. Things can always be set to 1 or zereo as needed to prevent them from having an effect.
Non linear can be tuned pretty easy as long as it's not too non linear. You just have to graph the actual response and the curve built into the code. A dip in the afr at x needs a change in the table value for that range. I'm too tired to get it across better. But I had to redo a non linear tune once.
Just had to graph everything out. Then it was clear which values needed changed for the desired effect. Note: this was pre excel so it was graph paper and a calculator.
A small 2d table with PG or multipliers vs error would minimize the slow vs fast response time issue .
Could also use a multiplier for PE vs non PE to alter the response time some more. Things can always be set to 1 or zereo as needed to prevent them from having an effect.
Non linear can be tuned pretty easy as long as it's not too non linear. You just have to graph the actual response and the curve built into the code. A dip in the afr at x needs a change in the table value for that range. I'm too tired to get it across better. But I had to redo a non linear tune once.
Just had to graph everything out. Then it was clear which values needed changed for the desired effect. Note: this was pre excel so it was graph paper and a calculator.
#100
Supreme Member
iTrader: (2)
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes
on
3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
Heres anothere brain tickler... What to base the error term on?
AFR itself probably wont work as the AFR is non linear from the standpoint of fueling. I was thinking inverse AFR with the gain + constant based on airflow to estimate the error in injector duty cycle all rolled into one table.
AFR itself probably wont work as the AFR is non linear from the standpoint of fueling. I was thinking inverse AFR with the gain + constant based on airflow to estimate the error in injector duty cycle all rolled into one table.