https://github.com/dbenders1/mpc_model_id_mismatch
Package to determine model coefficients and model mismatch
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
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.3%) to scientific vocabulary
Repository
Package to determine model coefficients and model mismatch
Basic Info
- Host: GitHub
- Owner: dbenders1
- License: mit
- Language: Python
- Default Branch: dennis-paper-rohmpc
- Size: 47.5 MB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
mpcmodelid_mismatch
This repository provides a package with the following scripts:
- setup_venv.sh: to create a Python virtual environment with all required dependencies to run the subsequent scripts
- determinemodelcoefficients.py: to determine the coefficients of a nonlinear system model via a filtering-based technique
- determinemodelmismatch.py: to determine the model mismatch of this model with respect to measured simulation or experimental data
- plotmodelmismatch_data.py: to plot the model mismatch results
Install
To run determinemodelmismatch.py, you need to have the following additional packages installed:
- ACADOS release v0.3.5. See this page for installation instructions. Install this package at a convenient location on your system.
Run
Convert the rosbag data to json format using the rosbag2json repository.
Create the Python virtual environment. This environment contains all required dependencies you need to run the subequent scripts. Create the environment by making sure that setupvenv.sh_ is executable:
bash
chmod +x setup_venv.sh
and by running the script:
bash
./setup_venv.sh [/path/to/acados_template]
The script will create a directory called venv in the root of this repository.
:bulb: The path/to/acadostemplate_ is the path to the directory path/to/acados/interfaces/acadostemplate_. This acados Python package needs to be found to generate the solver to solve the receding horizon optimization problem used in determinemodelmismatch.py. It is an optional argument. However, if not specified, you will not be able to run the script successfully.
- Activate the Python virtual environment by running the following command in a terminal:
bash
source venv/bin/activate
- Adjust the settings in determinemodelcoefficients.yaml and run the script determinemodelcoefficients.py to determine the coefficients of the nonlinear system model:
bash
python scripts/determine_model_coefficients.py
The script will estimate model coefficients of which the name is included in the file name and print the desired model coefficient values that can be used in one of the yaml files in the config/systems folder.
- Adjust the settings in determinemodelmismatch.yaml and run the script determinemodelmismatch.py to determine the model mismatch of the nonlinear system model with respect to measured simulation or experimental data:
bash
python scripts/determine_model_mismatch.py
The script will create a json and a mat file in the data/modelmismatchresults folder. The json file contains all data needed to plot the model mismatch results in the next step. The mat file contains the data required in possible subsequent steps to compute a control law and corresponding safe set for the system.
- Plot the model mismatch results using the script plotmodelmismatch_data.py:
bash
python scripts/plot_model_mismatch_data.py
The script creates plots from which you can visually inspect the model mismatch and related quantities.
Owner
- Name: Dennis Benders
- Login: dbenders1
- Kind: user
- Company: Delft University of Technology
- Repositories: 1
- Profile: https://github.com/dbenders1
Hi! My name is Dennis Benders. I am a PhD candidate working on robust motion planning and control with interests in developing software stacks for robot control
GitHub Events
Total
- Push event: 2
Last Year
- Push event: 2
Dependencies
- casadi ==3.5.5
- matplotlib *
- numpy *
- pyyaml *
- scikit-learn *
- scipy *