Learning The Difference Between an Embedded System and Real Time System
Have you ever wondered what a Real Time system actually means. We were discussing this topic this week as it relates to SAP BW. Sometimes our customers want and expect SAP BW data to be presented to them in "Real Time".
What Does Real Time Mean?
The question is, what exactly does real time mean. Well, we happen to have a deep pool of experts with expertise and experience in developing real-time embedded systems for automotive and aerospace application control systems.
Compare Embedded Systems vs Real Time Systems
Within this environment, a typical real-time scenario involves reading an electrical square wave generated by a crank or cam sensor as the crank or cam gear rotates past the sensor while an engine is operating. There are many configurations and variants in this application.
The question we want to answer is “How fast is real-time in this environment”?
The crank gear itself is normally a 60 tooth gear spaced 6 degrees apart and this crank gear spins as the engine spins.
However, to synchronize engine position so that engine position is positively known, 2 gear teeth are missing.
Tooth 58 and tooth 59 are usually missing and are known as “the gap”.
The gap is used to indicate to the real time embedded software that the number 1 cylinder is at TDC (Top Dead Center) and is a point of positive synchronization.
Sometimes, the engine timing does get lost and the gap synchronization point is used to bring the software back in sync with the engine.
Mechanics will know this as the “Top Dead Center” teeth.
If the engine is spinning or idling at 1000 RPM, the embedded crank sensor generates a square wave created by an electromagnetic hall effect off each tooth, which is then picked up as an input to the TIO (or Timer Input Output Unit).
The TIO is a specialized port on the microprocessor dedicated to processing Fuel and Spark Timing events.
While the next fuel and spark event is being calculated from the crank sensor tooth that just passed the sensor, the microprocessor has to wait about 20,000 clock cycles or microseconds between the passage of one tooth and the next tooth.
In other words, the microprocessor is doing nothing except executing a “wait loop” waiting for the next crank tooth to pass by the crank sensor.
Keep in mind that the engine is spinning at 1000 rpm in our example and the crank teeth are also spinning at 1000 RPM and the crank teeth are spaced only 6 degrees apart.
This is fast by human standards but glacially slow by real time embedded microprocessor standards.
The microprocessor used in these systems typically runs at 40,000,000 cycles per second, which is really slow by today’s standards.
Because the application, in this case, real time embedded car sensor systems, don’t require the fastest chips on the planet. This means the OEMs can get by with cheaper older generation microprocessors.
Real-Time Embedded Sensor Equiped Gear
What is the microprocessor (also known as the ECM or Engine Control Module) doing with these 20,000 cycles?
It is recalculating the fuel quantity and spark delivery timing between each crank tooth. What does it do with the rest of the cycles?
It mostly waits.
Typically, the time to execute and update the fuel and spark calculation is on the order of 40 nanoseconds. So the time required to execute the software is minimal and the wait time between each crank tooth interrupt is quite long.
The point of the above real time embedded software application description is to demonstrate the meaning of real time.
The engine software is reacting to the engine from moment to moment.
How would Real-Time Data Acquisition be used in a SAP Business Warehouse application?
If you have seen the movie Minority Report, you’ve already seen one potential application of real time data:
Advertising that is specific to a single user.
You might call it the Honey Pot billboard advertising model, which, in real-time, can scan a face, recognize who it is, and serve up advertising specific to that person's interest.
Going one step further, and probably well beyond the Real Time Data acquisition capabilities of SAP BW, you could modify the advertising offer or offer new or customized offers on the fly to reflect past purchasing or other demographic or behavior based information as well as reacting to the consumer in real time as the consumer interacts with the products on the shelf.
For example, with RFID chips attached to different products coupled with the demographic history of the particular customer browser, real time data could customize offerings to that specific potential customer as they walk down the shopping mall or through smart electronic billboards through GPS smart phone tracking.
You see this with how Amazon seems to read your mind when you visit their site.
This is also math based as well as real-time based. GPS phone tracking is also how some of the vehicle route navigational traffic flow tracking is performed while you are driving down the road to indicate to you on the route map that there is a traffic jam ahead and for how long the traffic jam is.
Would this be real time?
Well, a person walking up to a sign with such capabilities is actually going extremely slow in comparison to our engine example.
So it appears to be real time; in fact, it mostly is wait time for the microprocessor.
What makes this application real time is the fact that the offer is responding to the person walking up to a sign as they walk up to the sign and it is customized and specific to that particular person walking up to that sign.
What might be a system that is closer to real-time, meaning that the system needs to operate in real-time.
Well, Hubspot, which we use to host our inbound marketing efforts, comes real close to it.
With thousands of customers getting millions of hits constantly, they have a heavy processing load to handle, while giving us constant updates on our sites' performance.
Other embedded systems applications include such things as apps that track your position while traveling, in real time, though they do lag behind where you are actually at most of the time.
SAP HANA is, of course, the tool that enables near real time performance of BW systems. In a subsequent article, we will compare the performance of an engine embedded system to a SAP HANA scenario.
In the meantime, if you need SAP HANA expertise or embedded systems consulting, don’t hesitate to get in contact with us.
Tell Us About Your SAP HANA Experience