Developed and validated code and algorithms for the DO-178C avionics standard. These are just some of the huge amount of trials and projects developed
The Sobel filter for the edge detector has been implemented within the SCADE tool, thus having generated code certified do-178c, with the possibility of testing it soon (in progress).
The idea was to initially implement it on an MNIST image, in this case number 1, to which it was transformed into a bit-image and submitted as input (32x32) to manage the limitation of SCADE Simulator.
The edge detector is the Sobel filter, and the following steps were implemented:
- Convolution of vertical/horizontal filters to identify variations and the result represents how strongly the image changes in that direction.
- Calculating the total gradient = used a formula to approximate it, without square root G(i,j)=∣Gx(i,j)∣+∣Gy(i,j)∣
- Edge identification via threshold
Below is the pipeline used for the edge detector :
As is possible to see from the results, you can see how the edges are highlighted:
Embedded system that:
- Receives commands via UDP from a Python script.
- Processes them with a State Machine generated by SCADE.
- Returns a mission state via UDP if there are changes.
- Shows debug data via serial port (sciDisplayText).
+-------------------+ UDP +----------------------+
| 🖥️ Python Sender | ---------------- -> | 🧠 Embedded Board |
| (WCU_Trigger_Event) | | (wcu_fas_loop) |
+-------------------+ | - Receive input |
| - Execute FSM (SCADE) |
+-------------------+ UDP se output | - Send output |
| 🖥️ Python Receiver | <------------------ | via UdpSend() |
| (WCU_Mission_Status)| +----------------------+
+-------------------+
Sent/received data are structures with different msg_id and composed as follows : typedef struct { kcg_int8 Input1; kcg_int8 Input2; Type1_State_Machine_TI Input3; } inC_StateMachine_State_Machine_TI;
typedef struct { kcg_bool struct_bool; kcg_int8 struct_int; } Type1_State_Machine_TI;
The following image shows the implemented state machine :
Note :
- alchogen drivers were used
- the state machine meets the requirements to be do-178c
In this example exercise we went to create an operator whose goal is to correct bias using a cumulative average of the various elements of the value window. Then the average difference of the corrected and original value without bias is calculated, and if it exceeds a threshold the system will warn of the warning. The generated code is DO-178C certified , has not been covered by testing , but only with simulations and debugging , and is written in C. The modules of the little project are as follows :
- Random Operator = operator which is used to distort the signal randomly , being deterministic code at the same input will result in the same distortion , by nature of the code itself. The random function implemented is the Linear Congruential Generator
- Correcting Operator = Operator that corrects the distorted signal by making it correct using the progressive window average consisting of 10 elements. The signal is corrected using the ideal signal and the distorted signal , one should not use the ideal signal but an estimated error , but this complication was not introduced being a basic example to test the tool
- Pipeline Operator = Pipeline that brings together all the stages , then. Ideal Signal --> Biased signal (Random Operator)--> correction (Correction Operator) --> Total Abs Error with threshold
In this state machine , you have 3 states connected by a weak connection , and inside the second state are two state machines running in parallel.
The first one on the left is called by itself , so that it performs continuous checks on the variables.
The second on the right , proceeds in the flow and terminates in the final state.
The hierarchically higher state machine , will go from state 2 to state 3 , only if one of the checks fails in the iterative SM.
To achieve and meet the requirements for DO-178c certification, tests must be performed, initially on hosts,
with traceability of requirements. As can be seen from the image below, all components were tested, achieving model coverage close to 100%.
Each test was carried out using scenarios and checks which, by tracing the finite state machine, checked each step.
And tests can be run all toghether , using the test suite :