Wideband cotroller algorithm
Read the manual to see if your question is answered there before posting. Many users will not reply if the answer is already available in the manual.
If your question is about troubleshooting, configuration, or tuning, you MUST include your processor type (MS-I or MS-II) and code version in your post. If your question is about PCB assembly or modifications, you must also include the main board version number (1.01, 2.2 or 3.0). For tuning/troubleshooting questions, please attached a datalog and your MSQ file to your post.
If you have questions about MS1/Extra or MS2/Extra code configuration or tuning, please post them at www.msextra.com Such questions posted here will be moved to: a temporary MSextra sub-forum, where they will be removed after 7 days
The full forum rules are here: Forum Rules, be sure to read them all regularly.
Wideband cotroller algorithm
-
- Master Squirter
- Posts: 475
- Joined: Thu Oct 29, 2009 12:54 pm
Re: Wideband cotroller algorithm
Did you see this: http://www.megamanual.com/mt29.htm#wb ?
TunerStudio should take you directly to the appropriate web page/anchor if you hit 'F1' while in a menu (and connected to the internet).
Lance.
Re: Wideband cotroller algorithm
The discussion of the transport delay is useful in that it confirms what the firmware is doing with those two variables. I have tuned PID controllers in industrial applications and did not find the Megamanual link to the Wiki description of PID particularly useful in the context of Megasquirt. I understand the narrowband algorithm which applies a fixed percentage increase (step size) up or down if the EGO sensor says the AFR is off target. I presume that this increase / decrease is the gammaE O2 term in the fuel equation. What is not clear to me is the arrangement for a wideband sensor. In that Wiki closed loop control diagram y(t) would presumably be the actual measured exhaust AFR and r(t) is the target exhaust AFR. In the diagram, the error signal e(t) is shown as e(t) = r(t) - y(t); however, without having gone through the source code, I am thinking that the error signal is likely e(t) = y(t)/r(t). This would be expressed as a percentage and I am guessing this is the value that is applied to the PID terms. I am also guessing that the three PID terms are summed together to create a composite gammaE O2 term. I am particularly interested in the Integrator term. Does the integrator simply accumulate the error signal values and create a signal which is based on the arithmetic sum of the errors since the EGO goes active (a true integrator with no washout)? That is a fair amount of guessing!
My interests are not purely academic. During a little testing on my car running simple proportional control with fairly high gain I was able to create conditions under light load at idle where the EGO output and AFR were oscillating in an undamped mode and causing the engine speed to swing between 750 and a 1000 rpm with a period of 9 seconds with no throttle action at all. Cranking way down on the proportional gain has eliminated the oscillation; but, I now have a sustained steady state error in the AFR which the EGO will not correct. I would like to investigate adding some integral control to get rid of the steady state error. Getting a better understanding of how the control loop is set up might help me with tuning the I term in the PID loop.