The International Open Source Hydrogen On Demand Builders Network.
More work on indicator diagrams:
The first plot below is called an indicator diagram, a plot of pressure vs. volume in the cylinder of a small, 4-stroke gas engine. It's not much different from an earlier one except that the plot covers about 2 and 1/2 cycles so the intake / exhaust stroke is visible as well as the compression / power stroke. There is some noise on the pressure signal so it as been oversampled - 9 samples for every data point. Note that the maximum volume is the same as the engine displacement, 0.212 liters.
In the next plot, the intersection point of the plot is located and used as the start and stop point for a trapezoid integration going all the way around plot of the compression/power stroke. That way the area enclosed within the plot is computed. On this plot, the individual data points are shown.
Software was written which stores the data and then sends it out a serial port to a laptop running minicom which captures the stream as a text file. The text file can be copy pasted into a spreadsheet which was used to make these plots.
Using Java in the Eclipse IDE, text files were loaded into arrays used for this computation. The area of this plot is 3.9176426696 psi liters. Whatever that works out to in actual energy units, I haven't calculated yet. Having tested about 50 plots on both Java and the spreadsheet, agreement is very good (about 0.0001%) if double precision floating point variables are used. According to IEEE 754, that's 52 bits and a sign bit. Discrepancy was greater (as much as 2%) at some lower precisions.
Right now, I am doing the embedded C code with a PIC18, which is an 8-bit processor. If I want to do 15-30 integrations per second, a 52 bit precision is going to overwhelm a little 8 bit processor. So I am thinking of migration up to a PIC32. The cost for the actual chips is about $4.00 vs. $2.00 so the main issue is doing the software development on a platform that is a bit more complex.
Papers on the subject of indicated pressure say that such estimates have a high degree of variance. One paper said an average should be based on 300 such estimates. Depending on engine speed, it would take 10 to 20 seconds to accumulate that much data if each power/compression stroke is being integrated. The idea is to use indicated measurement to control engine load in a feedback loop so collecting and processing data probably will require a 32-bit processor. Using fuel injection rather than a carburetor may help reduce variance, but that remains to be determined.