Fuel injectors have a known and calibrated flow capacity. The ECU pulses the injectors for a set time and pressure according to its map, and therefore precisely knows the total fuel being delivered to the engine at any time.
"On a pulse width modulated system there is only one fuel line going to the fuel rail. There is no return line since it is a single line system. You’ll also notice a pressure sensor that monitors fuel rail pressure and sends a signal to the ECM telling the fuel rail pressure.
On a typical Ford pulse width modulated system, the ECM monitors fuel rail pressure by the fuel rail pressure sensor. The ECM determines the fuel rail pressure by looking at engine load and rpms. When it determines the correct amount it sends a duty-cycle signal to the driver module. Then, the driver module duty-cycles the pump to control rail pressure.
The General Motors system is similar to Ford’s except that it does not have a fuel pressure sensor on the fuel rail. Instead, the ECM tells the driver module what fuel rail pressure it wants. The driver module then controls the fuel pump and the pressure in the fuel rail."
More here for creating a PWM Controller:
http://cr4.globalspec.com/thread/40208/Fuel-Injection-Controller
PWM - Pulse Width Modulation for DC Motor Speed and LED Brightness - Robot Room
This is a good paper to study:
MODELLING AND OPERATIONAL TESTING OF PULSE-WIDTH MODULATION AT INJECTION TIME FOR A SPARK-IGNITION ENGINE by Ioan Hiticas, Daniel Marin, Liviu Mihon
ISSN 1330-3651 (Print), ISSN 1848-6339 (Online)