PKT - Controller Design with Arduino

  Box with Arduino and tube with ball Copyright: © IC

In the laboratory Controller Design with Arduino, which is offered as experiment 9 in Praktikum Kommunikationstechnik, students will see into problem statements related to controller design. They prepare by solving preliminary exercises on modelling and controller synthesis, simulate a plant model with their custom controllers, implement their controller on a microcontroller board and test the response of the real plant. In order to do so, we guide the students to reproduce an established procedure for controller design on our hardware.

The chair of Intelligent Control Systems (IC) offers this experiment Controller Design with Arduino in two different variants. Firstly, there is the possibility to attend the course in the common way of solving the preliminary homework and later conduct the experiment on location. Alternatively, we offer the possibility to borrow the lab equipment and solve all the exercises, as well as conduct all the experiments at home.

To pass this course and solve the given exercises, knowledge from the lecture "Systems Theory 1" (or equivalent) is mandatory.

In this lab experiment, students will work in groups with our apparatus FloatShield.

The goal of this lab experiment, is to control the height of a cork ball, which is being held aflow by a current of air. The FloadShield consists of a vertical PVC tube, through which a current of air is channelled by a fan at the lower end. Inside this tube, a cork ball is allowed to move vertically through the air current. At the upper end of the tube, a sensor measures the distance to the cork ball by laser and provides the height of the ball inside the tube. The voltage for the fan at the lower end of the tube can be set by the arduino mirco controller, influencing the rotary frequency of the fan blades and hence the air current. Both, actuator and sensor values, are polled and set with a constant polling rate. Polling and setting are performed by commands from the arduino mega2560, which can be programmed through libraries provided by AutomationShield inside the ArduinoIDE as well as MATLab Simulink.

Depending on the uploaded program, the arduino receives commands from other applications and reacts accordingly.

The control-theroretical goal of this lab experiment is to make the height of the cork ball follow a user-defined reference signal r(t). In oder to do so, the user may use the current height h(t) from the laser sensor at a fixed sampling rate. The user will observe, that the main driver for changes in the current height is the air current in the tube. This air current itself is driven by the rotary frequency of the fan, which itself can be controlled by PWM through the applied input voltage. This voltage can be directly supplied by the microcontroller and is therefore the input to the FloatShield plant.

For their controller design, students will model the entire system as a continuous-time feedback loop and design a continuous-time controller through design methods for linear systems. Afterwards, they will transform their controller into a discrete-time form and implement it digitally on the Arduino platform.