Package: csaf-controls
Control Systems Analysis Framework (CSAF)Quick StartExamplesJupyter notebooksJob configurationDevelopmentLicensingAcknowledgmentCSAF is a framework to minimize the effort required to evaluate, implement, andverifycontroller design (classical and learning enabled) with respect to the system dynamics. Its key features are:Component based controller designNative support for python and C language executablesCompatibility with external hardware and software processesEase of deploymentControllers, subsystems and plants are implemented as a collection of components.
Below is an example of a topology graph of F16 system with GCAS autopilot.Quick StartInstallationNativeClone the repo, and install viapip,pipinstallcsafTo install additional dependencies needed for the examples, go to the repo root and runpipinstall-rrequirements.txtDockerCSAF runs inside aDocker container, and in order to use CSAF, you
first need toinstall docker. CSAF has been tested on Linux
(Ubuntu 18.04 and 20.04) and OS X, but should run on any nix-like system that runs docker.At the repo root, build the docker imagedockerbuild-tcsaf.Now you can run an exampledockerrun-v$PWD:/outcsafpython-mcsaf_f16--output-dir/outAlternatively, a jupyter instance can be launcheddockerrun-p8888:8888csafjupyternotebook--allow-rootExamplesCSAF currently contains a number of examples, including the F-16 shown below. These examples are packaged into component
libraries. These libraries have application entry-points for demonstration. Note that CSAF has utilities to generate these
entrypoints for user created component libraries.F-16 Control SystemTo run a F16 system simulation, run$ python -m csaf_f16 --time-max 30.0 --system F16SimpleThe library CLI options are$ python -m csaf_f16 --help

F16 Components (CSAF Library)
usage: __main__.py [-h] [-s SYSTEM] [-o OUTPUT_DIR] [-t TIME_MAX] [-d DO_OPEN]

F16 Components (CSAF Library) CSAF F16 Systems Viewer

optional arguments:
  -h, --help            show this help message and exit
  -s SYSTEM, --system SYSTEM
                        CSAF System to Simulate (examples are ['F16Simple', 'F16AirspeedSimple', 'F16Shield', 'F16MultiAgentCentral', 'F16AcasShield',
                        'F16AcasIntruderBalloon', 'F16AcasShieldIntruderBalloon', 'F16AcasShieldAcasIntruderBalloon'])
  -o OUTPUT_DIR, --output-dir OUTPUT_DIR
                        Directory to Store Artifacts
  -t TIME_MAX, --time-max TIME_MAX
                        Timespan to Simulate
  -d DO_OPEN, --do-open DO_OPEN
                        Open Simulation ResultJupyter notebooksCSAF can be used from within ajupyter notebook.
To start CSAF in the notebook mode, go to thenotebooksfolder and runjupyternotebookTestsCSAF unit and integration tests use the pytest framework. After installing themypy plugin,
static tests can be added by adding the switchpytest--mypy-stestsDevelopmentCONTRIBUTING.mdcontains CSAF development guidelines, please familiarize yourself with the guidelines before opening a
pull request. The best way to contact the dev team is via GitHub issues.LicensingThe code in this repository is licensed under two different licenses. The core of CSAF (csafdirectory) and the majority of
examples is licensed underBSD license. Thef16 examplesin thecsaf_f16module is licensed underGPL license.AcknowledgmentThis material is based upon work supported by the DARPA Assured Autonomy program under the United States Air Force under Contract No. FA8750-19-C-0092. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of DARPA or the United States Air Force.