The PW equation that the (EBL) ECM uses is:
PW = BPC * ~AFR * ~T * MAP * VE (+- closed loop correction term)
It is based on ideal gas law. However, in the case of the inverse AFR and inverse temperature, there are tables that hold the actual values used in the calculation.
The $8D code does it a little differently. Directly calculating the mass of air in a cylinder (based on ~T and VE). Then applying the inverse AFR to that to get the mass of fuel required. Then factoring in the injector flow rate.
There is an article that explains SD well enough that you could put together a spread sheet for the calcs. OK, found the link:
http://marcintology.com/tuning/HowSp...ityWorks16.doc
This article explains how it is done along with showing the equations along the way. A real easy read, Marcin did a good job of writing it in an understandable form.
RBob.