Skip to main content

Control Systems Analysis Framework (CSAF)

CI

CSAF is a framework to minimize the effort required to evaluate, implement, and verify controller design (classical and learning enabled) with respect to the system dynamics. Its key features are:

  • Component based controller design
  • Native support for python and C language executables
  • Compatibility with external hardware and software processes
  • Ease of deployment

csaf_importing_components

Controllers, subsystems and plants are implemented as a collection of components. Below is an example of a topology graph of F16 system with GCAS autopilot.

f16_components

Quick Start

Installation

csaf_quickstart

Native

Clone the repo, and install via pip,

pip install csaf

To install additional dependencies needed for the examples, go to the repo root and run

pip install -r requirements.txt

Docker

CSAF runs inside a Docker container, and in order to use CSAF, you first need to install 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 image

docker build -t csaf .

Now you can run an example

docker run -v $PWD:/out csaf python -m csaf_f16 --output-dir /out

Alternatively, a jupyter instance can be launched

docker run -p 8888:8888 csaf jupyter notebook --allow-root

Examples

CSAF 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 System

To run a F16 system simulation, run

$ python -m csaf_f16 --time-max 30.0 --system F16Simple  

f16_components

The 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 Result

Jupyter notebooks

CSAF can be used from within a jupyter notebook. To start CSAF in the notebook mode, go to the notebooks folder and run

jupyter notebook

Tests

CSAF unit and integration tests use the pytest framework. After installing the mypy plugin, static tests can be added by adding the switch

pytest --mypy -s tests

Development

CONTRIBUTING.md contains 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.

Licensing

The code in this repository is licensed under two different licenses. The core of CSAF (csaf directory) and the majority of examples is licensed under BSD license. The f16 examples in the csaf_f16 module is licensed under GPL license.

Acknowledgment

This 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.

Metadata

Release files for csaf-controls 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for csaf-controls 0.2
File Size Uploaded Provenance Actions
csaf-controls-0.2.tar.gz 2.8 MB Without provenance Details for csaf-controls-0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for csaf-controls 0.2
File Interpreter ABI Platform Actions
csaf_controls-0.2-py3-none-any.whl Python 3 none any Details for csaf_controls-0.2-py3-none-any.whl

Total release size: 3.2 MB

Release files / csaf-controls-0.2.tar.gz

Download URL csaf-controls-0.2.tar.gz
Size 2.8 MB
Tags Source
SHA-256 checksum
How to use checksums
17c365831ed39676fa6febddfdd335ebe3ab673baec2239a3d53d1e5466e398c
BLAKE2b-256 checksum
How to use checksums
24fa438b235d77bab3719b9224dbd527cdd9ea0fb5e58da7038dbc634067c16b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.6.4 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.2

Release files / csaf_controls-0.2-py3-none-any.whl

Download URL csaf_controls-0.2-py3-none-any.whl
Size 439.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f69c2fc028ff3b08683fcabd6c6e317e82bdf4817bf1eec3e0179f327f80ea39
BLAKE2b-256 checksum
How to use checksums
fde504294eea5305d45615cae6fb4837cb69e40e04c9b3ec29c6efff5f69a4f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.6.4 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.2

Security for csaf-controls 0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page