Everything for the EE HU Semester 5 Modelling and Control course
Go to file
2023-12-06 23:04:26 +01:00
res README 2023-12-06 23:04:26 +01:00
src README 2023-12-06 23:04:26 +01:00
.gitignore Gitignore to exclude personal exercises 2023-11-29 12:52:19 +01:00
cc.ps1 C code setup 2023-11-29 12:38:53 +01:00
deploy.ps1 C code setup 2023-11-29 12:38:53 +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/]