Author Topic: Internal Combustion Engine crude math functions.  (Read 1496 times)

0 Members and 1 Guest are viewing this topic.

Offline firewalkerTopic starter

  • Super Contributor
  • ***
  • Posts: 2450
  • Country: gr
Internal Combustion Engine crude math functions.
« on: July 19, 2018, 02:52:47 pm »
I want to implement a really simple OBDII emulator (educational) that will send info like Air/Coolant Temperature, RPM, Throttle Position, Air Flow etc.

The thing is I want to send values that are somehow valid. ideally I want only as input a potentiometer that is the accelerator pental.

Are there any crude functions for a car engine? E.g. the Amount of air flow in relation to RPMs and Accelerator pental.

Alexander.
Become a realist, stay a dreamer.

 

Offline EmmanuelFaure

  • Regular Contributor
  • *
  • Posts: 154
  • Country: 00
Re: Internal Combustion Engine crude math functions.
« Reply #1 on: July 20, 2018, 06:33:39 pm »
Are there any crude functions for a car engine?

Yes, but it's complex matter.

At full throttle, the air flow is slightly below displacement * rpm. Look for "Volumetric efficiency". At high rpm (In detail, when the air/fuel mix reachs sonic conditions in the intake manifold) the volumetric efficiency drops.


 
The following users thanked this post: firewalker

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Internal Combustion Engine crude math functions.
« Reply #2 on: July 20, 2018, 06:46:08 pm »
Wouldn't it be easier to look at actual OBDII data?

Somewhere I have some logs from the Megasquirt injection system I have in one of my cars. It's a MAP based system so it measures the absolute pressure in the intake manifold rather than airflow directly. I don't know offhand how easy it is to extract the raw data from the logs but there must be a lot of it out there.
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 11700
  • Country: us
Re: Internal Combustion Engine crude math functions.
« Reply #3 on: July 20, 2018, 07:33:50 pm »
I want to implement a really simple OBDII emulator (educational) that will send info like Air/Coolant Temperature, RPM, Throttle Position, Air Flow etc.

The thing is I want to send values that are somehow valid. ideally I want only as input a potentiometer that is the accelerator pental.

Are there any crude functions for a car engine? E.g. the Amount of air flow in relation to RPMs and Accelerator pental.

Alexander.

Interesting.  What do you want to do with it? 

Could you use a modern ECM and just make some hardware to simulate the engine/vehicle?   

Offline firewalkerTopic starter

  • Super Contributor
  • ***
  • Posts: 2450
  • Country: gr
Re: Internal Combustion Engine crude math functions.
« Reply #4 on: July 20, 2018, 08:57:41 pm »
I want to implement a really simple OBDII emulator (educational) that will send info like Air/Coolant Temperature, RPM, Throttle Position, Air Flow etc.

The thing is I want to send values that are somehow valid. ideally I want only as input a potentiometer that is the accelerator pental.

Are there any crude functions for a car engine? E.g. the Amount of air flow in relation to RPMs and Accelerator pental.

Alexander.

Interesting.  What do you want to do with it? 

Could you use a modern ECM and just make some hardware to simulate the engine/vehicle?

I have done this as a est bench for testing repaired ECUs. But a real ECU floods the bus with all kinds of errors (ABS missing, missfires, body control etc). Good enough to test a real ECU (if boots and reads sensors), but not good as an education thingy.

I want a really simple ECU with some "real" variables that students can monitor on the can bus (maybe K-Line too). It will be part of the lesson.

Alexander.
Become a realist, stay a dreamer.

 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Internal Combustion Engine crude math functions.
« Reply #5 on: July 21, 2018, 02:46:40 am »
Maybe look for an older ECU? The one in my '90 can operate standalone, requiring only signals from the crank sensor, coolant temp sensor and air mass meter. It only has OBDI, but OBDII came out just a few years later and some of those systems were still reasonably simple. The complexity of the newest cars has reached crazy levels, they're bloated with gadgets and toys.
 

Offline firewalkerTopic starter

  • Super Contributor
  • ***
  • Posts: 2450
  • Country: gr
Re: Internal Combustion Engine crude math functions.
« Reply #6 on: July 21, 2018, 07:58:03 am »
It seems someone has made something really close to what I want. I sure I can tweak the code to generate more meaningful values than random.

Alexander.
Become a realist, stay a dreamer.

 

Offline Mattjd

  • Regular Contributor
  • *
  • Posts: 230
  • Country: us
Re: Internal Combustion Engine crude math functions.
« Reply #7 on: July 21, 2018, 04:37:07 pm »
Are there any crude functions for a car engine?

Yes, but it's complex matter.

At full throttle, the air flow is slightly below displacement * rpm. Look for "Volumetric efficiency". At high rpm (In detail, when the air/fuel mix reachs sonic conditions in the intake manifold) the volumetric efficiency drops.

so u r saying the system is probably some nonlinear DiffEq?
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 28300
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Internal Combustion Engine crude math functions.
« Reply #8 on: July 22, 2018, 08:31:47 am »
I want to implement a really simple OBDII emulator (educational) that will send info like Air/Coolant Temperature, RPM, Throttle Position, Air Flow etc.

The thing is I want to send values that are somehow valid. ideally I want only as input a potentiometer that is the accelerator pental.

Are there any crude functions for a car engine? E.g. the Amount of air flow in relation to RPMs and Accelerator pental.

Alexander.
First you need to understand there's a few ways of doing it.
Typically most accelerator throttle bodies are still bowden cable operated and there's a TPS connected to the throttle butterfly shaft to indicate the real throttle position. Then to add complexity there's also real 'fly by wire' accelerators where there's no physical throttle cable connection between the pedal and the throttle body.

Airflow is controlled in the throttle body but measured in two common ways, hot wire or a sprung vane that has it's own positional sensor.
First you sort out what you have and then what info you need from it.
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf