24 March Update from AK - GaloisInc/HighAssuranceControllerOfSelfBalancingRobotCapstone GitHub Wiki

This is a continuation of Issue #1 - Documentation

  • Note1: Checkout project schedule for entire project overview
  • Note2: These are only the tasks completed by Artem K

Replacing the Bluetooth Telemetry for MKR1010 board:

  1. Attempted to use HTTP communication to write data directly to Apache2 Server, and store in SQL
    1. HTTP string is too long, significantly slowed down the processor, and caused hang ups while running
  2. Went with basic TCP communication with Rust TCPStream program
    1. Had to create encoding on the Arduino side, and decoding on Rust side to reduce data size to 8 bytes
    2. Data is saved to mySQL using diesel-rs
  3. Created website for data visualization and history using PHP+Javascript
    1. Data can either be displayed as a livestream from the Arduino whenever the robot is running
    2. Data can also be saved and viewed in a later time.
  4. Bought cheap domain for our website: otisdata.xyz/live.php Front Page History Page
  5. As of now:
    1. Robot runs using Rust generated PID controller
    2. Robot can run for hours without hanging up
    3. Robot has telemetry with webserver
    4. Data history and visualization is working

Embedded Rust Generation with Lustre

  1. Installed Kind2 and generated Rust Code tested, u_0 input
  2. Started researching various methods of generating Lustre code from Simulink:
    1. Simulink Gateway by SCADE (Commercial, not available to us)
    2. SS2Lus (aka Sim2Lus, S2L)
      1. Only works for MatLab Rev 12-13
  3. Identified Ocaml Rust generation program

Next Steps:

  1. Create Lustre PID controller (currently in progress)
  2. Generate Rust PID controller, modify generated PID controller until it works on MKR1010
    1. Note necessary modifications
  3. Apply modifications to Kind2 LustreToRust file

Potential Issues:

  1. Ran into issues using structs in Rust when attempting the first PID implementations with C++. Will deal with this issue in Next Step 2