EV5_Modcon/README.MD

1.3 KiB

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/]