csaf-controls
Control Systems Analysis Framework - a framework to minimize the effort required to evaluate, implement, and verify controller design (classical and learning enabled) with respect to the system dynamics.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.4%) to scientific vocabulary
Keywords
Repository
Control Systems Analysis Framework - a framework to minimize the effort required to evaluate, implement, and verify controller design (classical and learning enabled) with respect to the system dynamics.
Basic Info
Statistics
- Stars: 13
- Watchers: 6
- Forks: 4
- Open Issues: 13
- Releases: 0
Topics
Metadata Files
README.md
Control Systems Analysis Framework (CSAF)
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

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.

Quick Start
Installation

Native
Clone the repo, and install via pip,
bash
pip install csaf-controls
To install additional dependencies needed for the examples, go to the repo root and run
bash
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
bash
docker build -t csaf .
Now you can run an example
bash
docker run -v $PWD:/out csaf python -m csaf_f16 --output-dir /out
Alternatively, a jupyter instance can be launched
bash
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

The library CLI options are ``` $ python -m csaf_f16 --help
F16 Components (CSAF Library) usage: main.py [-h] [-s SYSTEM] [-o OUTPUT_DIR] [-t TIMEMAX] [-d DOOPEN]
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 OUTPUTDIR, --output-dir OUTPUTDIR Directory to Store Artifacts -t TIMEMAX, --time-max TIMEMAX Timespan to Simulate -d DOOPEN, --do-open DOOPEN 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
python
jupyter notebook
CLI Apps
CSAF has functionality to wrap CLI functionality around core CSAF concepts, like systems and scenarios. For
example, after creating a scenario type AcasSimpleScenario, one can create an app by adding
```python
from csaf_f16.goals import AcasSimpleScenario
from csaf.utils.app import ScenarioCsafApp
if name == 'main': app = ScenarioCsafApp(AcasSimpleScenario) app.main() ```
Passing in the scenario.json file
json
{
"rel_pos_x" : 5000,
"rel_pos_y" : 5000,
"rel_angle" : 0.5,
"rel_speed" : 200
}
with
bash
python scenario_app.py -i scenario.json -t 200.0
creates traces.json file with simulation results. Also, docker can be used, such as,
bash
docker run -v $PWD:/out csaf python /out/scenario_app.py -i /out/scenario_list.json -o /out/docker_traces.json
Tests
CSAF unit and integration tests use the pytest framework. After installing the mypy plugin,
static tests can be added by adding the switch
python
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.
Distribution
"Distribution Statement "A" (Approved for Public Release, Distribution Unlimited)” "© 2021 Galois, Inc."
Owner
- Name: Galois, Inc.
- Login: GaloisInc
- Kind: organization
- Location: Portland, OR
- Website: http://galois.com
- Repositories: 450
- Profile: https://github.com/GaloisInc
Citation (CITATION.cff)
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 376
- Total Committers: 7
- Avg Commits per committer: 53.714
- Development Distribution Score (DDS): 0.436
Top Committers
| Name | Commits | |
|---|---|---|
| Ethan Lew | e****w@g****m | 212 |
| Michal Podhradsky | m****y@g****m | 108 |
| Aditya Zutshi | a****i@g****m | 31 |
| Matt Bauer | m****r@g****m | 19 |
| Ben Hamlin | h****b@g****m | 3 |
| dependabot[bot] | 4****]@u****m | 2 |
| Andrew Kent | a****w@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 77
- Total pull requests: 23
- Average time to close issues: 12 days
- Average time to close pull requests: 20 days
- Total issue authors: 5
- Total pull request authors: 3
- Average comments per issue: 2.71
- Average comments per pull request: 0.7
- Merged pull requests: 14
- Bot issues: 0
- Bot pull requests: 3
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- podhrmic (52)
- cslockett (21)
- EthanJamesLew (2)
- zutshi (1)
- jeappen (1)
Pull Request Authors
- podhrmic (15)
- EthanJamesLew (5)
- dependabot[bot] (3)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 7 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 1
- Total maintainers: 1
pypi.org: csaf-controls
Control Systems Analysis Framework
- Homepage: https://github.com/GaloisInc/csaf
- Documentation: https://csaf-controls.readthedocs.io/
- License: BSD License
-
Latest release: 0.2
published about 4 years ago
Rankings
Maintainers (1)
Dependencies
- Cython ==0.29.24
- GPy ==1.10.0
- GPyOpt ==1.2.6
- Jinja2 ==3.0.1
- MarkupSafe ==2.0.1
- Pillow ==9.0.0
- PyYAML ==5.4.1
- Pygments ==2.10.0
- QtPy ==1.11.1
- Send2Trash ==1.8.0
- appnope ==0.1.2
- argon2-cffi ==21.1.0
- attrs ==21.2.0
- backcall ==0.2.0
- bleach ==4.1.0
- blessings ==1.7
- bpython ==0.21
- certifi ==2021.5.30
- cffi ==1.14.6
- charset-normalizer ==2.0.5
- cloudpickle ==2.0.0
- coverage ==5.5
- curtsies ==0.3.5
- cwcwidth ==0.1.4
- cycler ==0.10.0
- data-science-types ==0.2.23
- debugpy ==1.4.3
- decorator ==5.1.0
- defusedxml ==0.7.1
- entrypoints ==0.3
- filelock ==3.0.12
- flatbuffers ==2.0
- greenlet ==1.1.1
- idna ==3.2
- iniconfig ==1.1.1
- ipykernel ==6.4.1
- ipython ==7.31.1
- ipython-genutils ==0.2.0
- ipywidgets ==7.6.5
- jedi ==0.18.0
- joblib ==1.0.1
- jsonschema ==3.2.0
- jupyter ==1.0.0
- jupyter-client ==7.0.2
- jupyter-console ==6.4.0
- jupyter-core ==4.7.1
- jupyterlab-pygments ==0.1.2
- jupyterlab-widgets ==1.0.2
- kiwisolver ==1.3.2
- llvmlite ==0.37.0
- matplotlib ==3.4.3
- matplotlib-inline ==0.1.3
- mistune ==0.8.4
- mypy ==0.910
- mypy-extensions ==0.4.3
- nbclient ==0.5.4
- nbconvert ==6.1.0
- nbformat ==5.1.3
- nbmake ==0.8
- nest-asyncio ==1.5.1
- notebook ==6.4.3
- numba ==0.54.0
- numpy ==1.20.0
- onnxruntime ==1.8.1
- packaging ==21.0
- pandocfilters ==1.5.0
- paramz ==0.9.5
- parso ==0.8.2
- pathlib ==1.0.1
- pexpect ==4.8.0
- pickleshare ==0.7.5
- pip ==21.2.4
- pluggy ==1.0.0
- prometheus-client ==0.11.0
- prompt-toolkit ==3.0.20
- protobuf ==3.17.3
- ptyprocess ==0.7.0
- py ==1.10.0
- pyaml ==21.8.3
- pycparser ==2.20
- pydantic ==1.8.2
- pydot ==1.4.2
- pymap3d ==2.4.0
- pyparsing ==2.4.7
- pyrsistent ==0.18.0
- pytest ==6.2.5
- pytest-mypy ==0.8.1
- python-dateutil ==2.8.2
- pyxdg ==0.27
- pyzmq ==22.2.1
- qtconsole ==5.1.1
- requests ==2.26.0
- scikit-learn ==0.24.2
- scikit-optimize ==0.8.1
- scipy ==1.7.1
- setuptools ==52.0
- six ==1.16.0
- svgpath2mpl ==1.0.0
- terminado ==0.12.1
- testpath ==0.5.0
- threadpoolctl ==2.2.0
- toml ==0.10.2
- tornado ==6.1
- tqdm ==4.62.2
- traitlets ==5.1.0
- typing-extensions ==3.10.0.2
- urllib3 ==1.26.6
- wcwidth ==0.2.5
- webencodings ==0.5.1
- wheel ==0.37.0
- widgetsnbextension ==3.5.1
- GPyOpt >=1.2.6
- matplotlib >=3.4.3
- numba >=0.54.0
- numpy >=1.20.0
- onnxruntime >=1.7.0
- pydot >=1.4.1
- scipy >=1.7.1
- svgpath2mpl >=1.0.0
- tqdm >=4.62.2
- actions/checkout v2 composite
- actions/setup-python v2 composite
- syphar/restore-pip-download-cache v1 composite
- syphar/restore-virtualenv v1 composite
- python 3.9 build