findx
Posts: 29
Joined: Mon Jul 29, 2013 7:52 pm

Raspberry Pi Machine Learning for Near Chaotic Combustion

Sun Sep 28, 2014 9:34 pm

I posted here earlier about the FIQ size under Linux, and I thought I'd post a follow up about where things stand now that all my FIQ and real-time Linux issues are resolved.

The link below is a video of the Raspberry Pi connected a gasoline engine running an adaptive machine learning algorithm that predicts near chaotic combustion behavior in real-time. It's streaming the data over a WebSocket to a web browser that's rendering the real-time engine data with d3.js. The ultimate goal of this research is to improve fuel efficiency and cut CO₂ emissions.

https://www.youtube.com/watch?v=_yrLWFffP_Q

If there's any interest, I can post a guide with my small set of patches needed to get the USB driver to run completely within a regular IRQ and not interfere with the FIQ. Incidentally, if you don't force the USB driver into a low priority IRQ under PREEMPT_RT Linux it can occasionally add up to ~10 milliseconds of process latency under heavy network IO, which is unacceptable in my application.

Finally, I'd like to send a big thank you to dwelch67 and thinkingeek.com for their assembly guides that got me up to speed with this architecture. Also to osadl.org for creating a rock solid stable, tested collection of PREEMPT_RT patches for the Raspberry Pi.

User avatar
Burngate
Posts: 6303
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Raspberry Pi Machine Learning for Near Chaotic Combustio

Mon Sep 29, 2014 10:57 am

Very interesting!

Totally off-topic, but didn't some German guy solve the inefficiency problem at low load? By removing the butterfly valve that causes most of the pumping losses, and controlling the engine by adjusting the fuel injection?
Name of Rudolf Diesel, if my memory serves me correctly.

findx
Posts: 29
Joined: Mon Jul 29, 2013 7:52 pm

Re: Raspberry Pi Machine Learning for Near Chaotic Combustio

Mon Sep 29, 2014 3:43 pm

Diesel engines have issues with soot particles and NOx (a toxic smog and acid rain precursor). There are solutions to deal with those issues, but they are not ideal (e.g. requiring you to buy Diesel Exhaust Fluid (DEF) to clean up NOx with additional catalyst hardware at a rate of ~2% DEF per quantity of fuel consumed). Homogeneous Charge Compression Ignition (the video topic) is similar to a Diesel engine in that it is compression ignited without a throttle, but the mixture is well mixed like a gasoline engine. It can stop the NOx and soot problem before it occurs by changing the way we burn the fuel.

Honestly, I didn't think there was enough time in a YouTube video to get into those challenges without digressing too much (the video is already 11 minutes long), but maybe I should have. A great review paper covering these topics is available below. Unfortunately, like most of modern science, it's behind a $36 paywall.

Samveg Saxena, Iván D. Bedoya, Fundamental phenomena affecting low temperature combustion and HCCI engines, high load limits and strategies for extending these limits, Progress in Energy and Combustion Science, Volume 39, Issue 5, October 2013, Pages 457-488, ISSN 0360-1285, http://dx.doi.org/10.1016/j.pecs.2013.05.002.
(http://www.sciencedirect.com/science/ar ... 8513000257)

User avatar
Burngate
Posts: 6303
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Raspberry Pi Machine Learning for Near Chaotic Combustio

Mon Sep 29, 2014 4:26 pm

Sorry if I sounded flippant ... well maybe I meant it that way, but not in any derogatory sense. I'm in awe of anyone who understands flame chemistry, and also anyone who's willing to undertake that level of research.
I'm well aware that you can't fit x years of research into 11 minutes of video, and anyway I'd have to do the 3 year undergrad course before I could make a sensible comment.
It was just the mention of compression ignition in that video that set me off.
I doubt you're aware that our beloved leader Boris (Mayor of London) has just recently had another stab at us diesel-owners - he wants to give me £2,000 to take my $20,000 diesel car off the road!

But I do think (a) the research is interesting and (b) it's an interesting application for the Pi

Now where is my $36 for a copy of that paper ...

Return to “Bare metal, Assembly language”