Everything for the EE HU Semester 5 Modelling and Control course
Go to file
2024-02-11 19:46:53 +01:00
doc Final changes formatting and spelling 2024-02-11 19:46:53 +01:00
res Assignment due 2024-02-11 19:29:49 +01:00
src Assignment due 2024-02-11 19:29:49 +01:00
.gitignore Assignment due 2024-02-11 19:29:49 +01:00
Modcon.code-workspace Setup LaTeX and cross-compile 2024-01-07 23:20:31 +01:00
README.MD README 2023-12-06 23:04:26 +01:00
requirements.txt Added nerd graphs for debugging 2023-12-06 19:33:30 +01:00

EV5_Modcon

Everything for the EE HU Semester 5 Modelling and Control course

Screenshot

Simulation

The inverted pendulum system has been simulated in Python using pygame.

Running simulator

  1. Open the venv:
$ ./.venv/Scripts/Activate
  1. Start the script
$ python3 ./src/sim/sim.py
  1. 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/]