Changes

Jump to: navigation, search
Real-timeness, frame dropping, and alarm detection latency
The first requirement is obvious, but it can be relaxed a little bit in the sense that it has to be satisfied while when the system is waiting for an alarm to happen and until the alarm buffer is filled. After that moment, a fame loss can be tolerated because it does not compromise system functionalities. In other words, following the detection of a new alarm say A1, it is acceptable that the system ignores new possible alarms until the buffer associated with A1 is stored on the SSD. Once storing is completed, the system is ready to detect and process a new alarm again.
The second requirement is a little more subtle and it will be explained with the help of Fig. 3.
The top part shows the ideal recording buffer. As described in section [[#Sizing the alarm buffer|''Sizing the alarm buffer'']], the recording is supposed to start 8 seconds (t<sub>B</sub>) before the occurrence of the alarm event (t<sub>0</sub>) and end 3 seconds afterwards (t<sub>A</sub>)). As a matter of fact, the recording system takes some time to recognize that the alarm signal is asserted—we refer to this time as ''alarm detection latency''. The fact that this latency is greater than 0 leads to the actual situation illustrated in the bottom part of the picture. Let t<sub>0'</sub> be the actual instant when the PP detects the assertion of the alarm signal. Consequently, the beginning and the end of the recording buffer (t<sub>B'</sub> and t<sub>A'</sub> respectively) are delayed as well. Of course, alarm detection latency should be minimized in order to get the actual recording buffer as close as possible to the ideal one. If the latency is too large, in fact, the recording could miss essential events for the post-mortem analysis. See, for For instance, the instant t<sub>F</sub> in the image. Letlet's assume that the alarm was triggered by a failure causing the alarm took place occurring at time t<sub>F</sub> as shown in the picture. Because of the alarm detection latency, this instant is before the start of the actual recording buffer and thus it is not available for the post-mortem analysis.
In light of these requirements, it is clear that the processing platform should be engineered as a real-time system. Despite these considerations, however, a platform not specifically designed with real-time capabilities was utilized. Rather, it was decided to use a platform providing enough headroom in terms of processing power and to verify experimentally the fulfillment of requirements. This approach allowed to meet the budget available for the PoC by limiting implementation effort and development time.
Basically, two different approaches were utilized for this verification.
# * With regard to frame loss, a mechanism able to detect it this anomaly was implemented at the application software level. Should a frame loss occur, this event is logged and reportedas shown by the example log below (see "Abnormal frame rate" messages). Incidentally, this mechanism exploits frame timestamps described in [[#Alarm recordings|this section]].# <pre class="board-terminal">[2020-08-10 10:48:53,674][INFO][main_logger.main] SAVING_ALARM_BUFFER -> STREAM_ONLY[2020-08-10 10:48:53,675][INFO][main_logger.main] STREAM_ONLY -> WAITING_FOR_ALARM[2020-08-10 10:49:22,570][DEBUG][main_logger.main] Alarm signal asserted[2020-08-10 10:49:22,571][INFO][main_logger.main] WAITING_FOR_ALARM -> FILLING_ALARM_BUFFER[2020-08-10 10:49:23,571][DEBUG][main_logger.main] Alarm signal deasserted[2020-08-10 10:49:25,631][INFO][main_logger.alarmbuffersaverthread] Starting AlarmBufferSaverThread ...[2020-08-10 10:49:25,631][INFO][main_logger.main] FILLING_ALARM_BUFFER -> SAVING_ALARM_BUFFER[2020-08-10 10:49:25,678][ERROR][main_logger.main] Abnormal frame rate (42.6 fps)[2020-08-10 10:49:25,716][INFO][main_logger.alarmbuffersaverthread] Deleting oldest alarm ...[2020-08-10 10:49:25,778][ERROR][main_logger.main] Abnormal frame rate (59.6 fps)[2020-08-10 10:49:25,839][ERROR][main_logger.main] Abnormal frame rate (74.5 fps)[2020-08-10 10:49:25,938][INFO][main_logger.alarmbuffersaverthread] Saving to /mnt/alarms/2020-08-10_10.49.22_CEST[2020-08-10 10:50:45,750][ERROR][main_logger.main] Stopping to stream frames ...[2020-08-10 10:50:45,784][ERROR][main_logger.main] It is enough data for buffer ...[2020-08-10 10:50:48,822][ERROR][main_logger.main] Stopping to stream frames ...[2020-08-10 10:50:48,855][ERROR][main_logger.main] It is enough data for buffer ...[2020-08-10 10:51:02,582][DEBUG][main_logger.main] Alarm signal asserted[2020-08-10 10:51:03,581][DEBUG][main_logger.main] Alarm signal deasserted[2020-08-10 10:51:59,825][INFO][main_logger.alarmbuffersaverthread] Ending AlarmBufferSaverThread ...[2020-08-10 10:51:59,844][INFO][main_logger.main] SAVING_ALARM_BUFFER -> STREAM_ONLY[2020-08-10 10:51:59,844][INFO][main_logger.main] STREAM_ONLY -> WAITING_FOR_ALARM</pre> * Concerning alarm detection latency, a tailor-made testbed was built as illustrated in the next section.
===Alarm detection latency verification===
The following diagram shows how the specific testbed used for this verification looks like.
*t<sub>0</sub> = 50.000s
*t<sub>A</sub> = 50.000+3.000 = 53.000s
 
Ideally,
==Future work==
4,650
edits

Navigation menu