The shape of Pressure: Compression plot puzzle
Hi everyone! I have joined the DN after Keith from Staten Island pointed me to a few articles posted on this site, and those had info that is hard to find elsewhere.
I am not an automotive diagnostician, and not going to pretend to be one. Instead, my areas of expertise include data processing, statistics, optimization, and mathematical modelling. However, in automotive diagnostics I recognize the same approaches that I routinely use for absolutely different projects. Another aspect of diagnostics I like is that each case is a puzzle. To solve puzzles I like looking at data from various angles. Often this involves loading the dataset into a program like MATLAB/Octave and playing with it.
Below you will find one such instance where I got interested in the shape of pressure waveform coming from a compression test after reading the series on in-cylinder pressure testing by Bernie Thompson. Perhaps my question is too specialized, too technical, and contains quite a bit of math... or may be someone thought about this already and will have great pointers and ideas to share! I hope for the latter!
Consider a cranking compression test: Pressure plotted versus Time. In thermodynamics, however, it is typical to plot Pressure versus Volume. As Volume shrinks, Pressure rises.
For example, if the process follows Boyle's law, PV = const, and, thus, P = const / V.
If we use logarithmic scales, it will be an even simpler, linear, relationship: log10(P) = a - b * log10(V)
For Boyle's law, b=1. For a realistic compression test, b should be greater than 1, as temperature rises during the compression process.
So, the question is, can we take a Pressure versus Time waveform and plot it as log10(Pressure) versus log10(Volume)? Let's try to do just that! Take a waveform from Bernie Thompson's article on In-cylinder Pressure Testing, Part 2:
Minimum pressure is -5psi, maximum is 120psi, relative to atmospheric. Well, thermodynamic laws operate with absolute pressures, so the compression goes from 10psi to 135psi, absolute.
To process data, I need a data file, not a picture. Not a problem -- I use open-source Plot Digitizer program to digitize the waveform. If you ever need to convert a plot into a table, try it!
This gives me a file with Pressure versus Angle data. Now I need to convert Angle into Volume... I use the Slider Crank Model (well described here: engr.colostate.edu/~allan/thermo… ) to do that. For a lack of better values, I use compression ratio CR=10 and rod-to-stroke ratio (RSR) of 1.7, though other reasonable values do not radically change the shape of Volume versus Angle relationship:
Alright! I've got Pressure, I've got Volume, let's plot their logarithms:
OK... the wiggle in the bottom-right corner is because the intake valve takes a little while to close -- good!
The shape of the rest of the graph is somewhat linear, with, on average, negative 1.2 slope, significantly lower than Boyle's law slope of negative 1 -- good!
But why is it not exactly linear, but rather concave -- for a given calculated volume, the reported pressure is higher than the linear function would predict... What?
Is it the pressure transducer? Is it the scope? Is it something else? Or is it supposed to be like that?
So, this is the puzzle. I know one good reason this may be happening, but what are your thoughts?
I am by no means a math guy or any engineer by any stretch of imagination. However, would piston ring leakage and physical speed of the piston moving at its maximum speed halfway through its stroke have any bearing on that concave?
Great ideas, Maynard, I will discuss them in the update!
I find this interesting.
What type of work do you do?
You are on a whole other level than me. I wonder If Bernie has RSR and comp #'s for you?
I can't help but think the data may be skewed from inaccurate data input. Could you humor me and input lower and higher RSR to demostrate?
I can think of no reason for data to be skewed high in the midstroke, If anything I would suspect low from transducer lag during maximum piston velocity.
I am here to learn.
mostly I work with financial data, but sometimes I get to work on a logistics or scheduling project.
It would be great if Bernie chimed in with the exact values and I would need to redo the experiment only once... but in case that doesn't happen -- see attached graphs! RSR within 1.5 .. 1.9 does not seem to have much effect, and CR needs to go all the way to 7 to straighten out the curve!!!
"If anything I would suspect low from transducer lag during maximum piston velocity" -- this is an amazing point. Often (especially under time pressure) we tend to explain things away with something simple, but if that something actually has opposite effect to what is observed, the whole diagnostic process can be derailed. But you are vigilant and are not letting that to happen.
I will post an update soon, stay tuned!
I asked what you do for work because this type of data point collection and analysis would likely be applicable to writing diagnostic programs into a vehicles ECM. Something I suspect will be coming very soon. Not specifically for in cylinder pressure transducer readings, more so to work with all the signals the vehicle is already equipped with that are not utilized as well as they could be.
Data analysis is pretty universal, and, for sure, people are writing code to detect misfires and enhance fuel management. But if it goes inside the ECM, it's a proprietary algorithm... and we can only observe echoes of it in scantool values. If I could reproduce or reverse engineer some of those algorithms to help diagnosticians with their tasks, that would be pretty cool. If you notice a good application, please send it my way!
I see no reason why there should not already be mechanical fault codes or guided tests to pinpoint a mechanical fault. Some tools have capability to perform a relative compression test. Why not make it guided and add data from map sensors to drill down further yet. I just think there is a pile of uncharted water. My opinion is a really good diagnostics program could make car repair much simpler. Not that I want that, but its coming whether I like it or not. I have used the phrase "If your mechanic looks at the scan tool and says the scan tool tells him to replace a sensor, then you need a new mechanic." Fast forward 10 years (2029) and I think my phrase will be "If your scan tool says you need a new sensor and your mechanic doesn't replace it, I think you need a new mechanic"
Hmm, why are you sure there will be a scantool at all? :) There is a chance the "scantool" will be integrated into the car computer (which will run tests and store log files), and all you'd have to do is to connect a laptop via the Ethernet plug and "log in" into the car computer to access the results (after paying $$$ to the manufacturer for the login info, of course!).
I don't think there will be a scan tool. I think it will be integrated into the vehicle.
There will be a Human machine interface. I think it will be a set of augmented reality glasses. They verify you with a retina scan, and then show you what the problem is. It will tell you where to look and how to fix it. If it's in a new place then it will record that and enter it into its data base. I don't think we will be able to compete with onboard diagnosis in new vehicles. Lets say in 10 years. Not joking.
That math is over my head but if I remember correctly Bernie mentioned something about actual pressure values being higher because the speed of the piston movement puts energy into the volume of air, which creates heat and the heat then further increases pressure, or something like that. I will have to go back and re-read what Bernie wrote.
Interesting thought puzzle.
good memory, Bernie did talk about that process in the article. But in the HCCI article he posted about a month ago he describes it in even more detail.
Technically, any time the piston performs work to compress gas (no matter how fast or slow), that work gets added to gas energy. More energy would mean more heat, but there is also heat loss through cylinder walls. When the piston moves fast, there is little time for heat loss to occur.
In the cranking compression test the piston moves not particularly fast, and so we see all kinds of weird effects. Maynard mentioned a few, and there may be a few more.
Maynard, Bill, Bob -- thank you for your replies! This is exactly the type of discussion I was hoping for.
This is how I understand the compression process. To compress, the piston performs work. This work adds to energy of gas. That energy can leak out though -- some as heat loss, some as a leak, literally. If the ratio of leaked (no matter how) energy to total added energy is constant, the graph will be linear with the slope determined by that ratio, and there will be no curvature. If the leaked energy ratio is changing a lot throughout the process, curvature will arise. So far a few possible reasons have been mentioned:
- Around the mid-stroke the piston is moving fast, but slows down a lot later on in the process. So we can expect the slope to be steeper around mid-stroke. By the way, where is that point on the graph? This is where logarithms may play a trick on our visual perception. Halfway through the stroke is approximately (10+1)/2 = 5.5, but taking logarithm of that we get log10(5.5) = 0.74. The mid-stroke point is actually three quarters to the right on the graph!
- At the end of the process the pressure in the cylinder is high, so leaks through piston rings and valves will become more pronounced. That should flatten the slope on the left side of our log10(Pressure) versus log10(Volume) graph.
Also, as Bill noted, transducer lag and scope filtering are NOT possible explanations for the phenomenon, as they would actually bring the pressure down and reduce the curvature that we observe.
OK, so we have two possible explanations, but are there more? Well, I think so. Here is a hint: I would like you to think about how modern car computers detect a misfire and what would that algorithm detect during the cranking compression test? And, of course, if you have any other ideas, please share!
I know this was an oldie, there is still a lot of great information I'm catching up with on here.
Your post, and the picture, reminds me of a similar discussion I saw in an old book that described building, calibrating, and using an apparatus for timing steam engines. It was an intricate setup that actually essentially worked as an incredibly early pressure transducer/lab scope as it would graph out the motions of the engine to determine pressure etc.
I have to dig through my library tonight, I know I have it somewhere. They do mathematics based off of Boyle's law and also postulated some reasons as to variations within the expected curves.
The title is The Steam Engine Indicator and its Appliances by William Houghtaling 1901.
Once I find it, I'll do some research and then update you. I think you'll find it fascinating and informative. I'm sure I could get it out in the mail to you, if so desired.
Better late than never I guess. Did some reading and thinking.
My math is rusty, but logarithims are generally used, especially in finance, to change a non-linear equation into a linear one, correct? So is there a possibility that just the nature of this mathematical expression can't accurately represent a real life compression event? I ask from a place of lack of education.
What stuck in my mind is that there is the theoretical line and the actual curvature. As stated, it is expected to see some variations due to added heat. There will be a finite amount of heat added due to the act of compression, and a finite amount of cooling due to thermal losses to the cylinder walls.
I believe that the volatility and amount of the fuel would have to be taken into account as well, because there will be a certain amount of cooling and heating effects from the addition of the fuel. This will cause some slight pressure fluctuations which would build and possibly stack with the pressure variations caused by any moisture contained within the charge air. Then there is the additional of the oil film on the walls which will play into the relationship.
There is also the rotational force of the additional cylinders that will change overall speed of any cylinder compressing. Say one cylinder with an exceptionally strong combustion event pushing down harder and so speeding up the next pistons travel. This would cause a speed change, be it positive or negative depending on overall engine condition, and turn create fluctuations above your theoretical curve.
Overall, for any change in volume the corresponding change in pressure would be more than if temperature had remained constant (which we have established it does not). So due to valve leakage and so on, the curve will most likely always trend to the high side of the theoretical.
First picture here is a theoretical graph of pressure on x axis vs volume on y axis in a steam engine.
Second is an actual pressure vs volume graph from each side of a working dual piston steam engine overlayed onto each other. You'll notice that they also tend to ride higher than the theoretical line.
Chris, thank you for the follow-up. There are quite a few variables left to explore, but you just mentioned the big one -- the crankshaft speed change during the process. In all the analysis above I rely on the 0-720 degree grid, but it is not precise! So next time I will try to process the waveform that includes both the pressure values and the CKP signal.
I believe I have quite a few in cylinder waveforms with cam/crank syncs. I believe there are quite a few where i even disabled cylinders to see what effect it would have on the in cylinder waveform.
Unfortunately, they are not Pico captures (only ever had a snap on scope), but I'd be more than willing to send you what I have for research purposes.