Everything for the EE HU Semester 5 Modelling and Control course
doc | ||
res | ||
src | ||
.gitignore | ||
Modcon.code-workspace | ||
README.MD | ||
requirements.txt |
EV5_Modcon
Everything for the EE HU Semester 5 Modelling and Control course
Simulation
The inverted pendulum system has been simulated in Python using pygame.
Running simulator
- Open the venv:
$ ./.venv/Scripts/Activate
- Start the script
$ python3 ./src/sim/sim.py
- The script can be controlled using the following commands:
Key | Purpose |
---|---|
Esc | Exit |
Space | Reset simulation |
P | Pause simulation |
G | Show debugging graphs |
C | Toggle PID Control |
A / Left | Accelerate cart left |
D / Right | Accelerate cart right |
Hardware
A robot has been built using LEGO EV3 to show the simulated system in action.
Connections to EV3 required
- Large motor on port B
- Large motor on port C
- Gyro-sensor on port 2
Connecting to EV3
Connect either via WiFi, USB or Bluetooth. Do note that connecting via USB or Bluetooth does not provide the EV3 with an internet connection so updating packages is not possible.
Compiling C++
Compiling C or C++ requires a Docker installation of the compiler following (this guide)[https://www.ev3dev.org/docs/tutorials/using-docker-to-cross-compile/]