RCOS
Redundancy Control Operation System

What is RCOS?

RCOS short for Redundancy Control Operation System is an operating system aiming to use a normal industrial-level microcontroller & Processor to achieve a high faults tolerance systems such as rocket & space applications, and a high EMI environment instead of using outdated and expensive custom chips.

Using RCOS will retain the original program and code to the greatest extent, therefore the migration costs of existing projects are very small and the engineering could more focus on control algorism rather than fault tolerance design.

RCOS will be a cross-platform operating system for high deployment capability, RCOS will also optimize for MBD(Model Base Design) tool for higher iteration speed.

The original purpose of RCOS was to create a reliable control system for my reusable rocket project to against the bit flipping caused by cosmic ray.

RCOS 0.1.0 Preview

This demo runs redundancy control for code generated by the MBD model to fix memory errors. This program is cross-platform and can be deployed under Windows, Linux, and microcontrollers. This program was multithreaded optimized for Windows.

Fault-tolerant demonstration

A simple Simulink MBD model for demonstration.

Inject bit-flip to simulate RAM errors caused by the Cosmic radiation or EMI environment.

1 bit-flip inject in un-protected calculation in each step(iteration).

3 bit-flips inject in redundancy calculation in each step(iteration).

Test 1 – Calculation correctness under RAM-errors

Test 2 – Calculation reliability for long time period.

As this result and previous experiments indicated, without protection, normally 1-3 times bit-flip will cause the control program permanently unavailable.

With RCOS, the control program error only occurs while at least 4 RAM errors occur distributed in 4 calculation threads(6 redundancies). Which is basically impossible to happen. If this does happen, RCOS will still trigger an exception to notify the error was occurred to take further strategy.

Simple workflow to get RCOS ready

1. Start from your MBD model

Build a MATLAB Simulink Embedded model using the template given to construct your algorism.

Generate the C++ code using Embedded coder.

2. Fast and easy to get RCOS to work!

Simply write an interface file to connect your model to RCOS. (Using template given)
The interface will generate automatically for MATLAB Simulink (RCOS 0.2.0)

Import RCOS head file.

#include"RC_Model/RCA_PID.h"//For your model
#include<RCOS_RC.h>//RCOS head file

All done, enjoy!

Configure RCOS to get ready for different working conditions.

Set RCOS work mode to meet different working conditions.
Multi-Thread optimized for Windows and Linux platform

/*** Settings ***/
#define TaskNum 6
#define OpenMP false
#define MultiThread false

/*
Strategy used for memory comparation
0: Compare whole memory each time.
1: Only compare the output.
*/
#define Correction_Strategy 0

/*
Vote strategy used for result
0: Get the result for more than half and beyond, else output error.
1: Output the most popular result,output error while all in different.
*/
#define Vote_Strategy 1

Preview for RCOS 0.2.0

  • Add tool to automatically generate interface for MBD MATLAB.
  • Prevent the RAM-error occur at function stack.
  • Add strategy while unfixable error occurred.

Further progress

  • Using the heterogeneous multi-core processor to run multiple individual systems makes sure at least one system could provide the correct result.
  • Use FPGA, even design ASIC to optimize for the commonly used functions.