Team:NAWI Graz/ControlSystem

CONTROL SYSTEMS

The integration of the living and inanimate components of the project of course requires a reliable and thought through architecture of control systems. Based on the Raspberry Pi single board computer, we devised a server / client system that manages actuation, measurement and intra system interaction. Running on Raspbian linux and written in Python3, both very well documented approaches for hardware - software interfaces, our system is highly adaptable, scalable and offers flexibility during the experimental developement of new functionality. The wide availability and low cost of all of the hardware components used in the control system of , ties well into our concept of enginieering without financial hurdles that could slow down or inhibit developement and innovation.

The Server

Our server was built and programmed as centerpiece of the control architecture that encompasses the bioreactor and measurement system of and as communication hub between scientists, reactor and robot. The single-board Raspberry Pi hardware platform that is present in all parts of the system is of course also the base of the server component. Connected to the other hardware components via the GPIO (general purpose input output) interface, and communicating with the robot and client via UDP, the server is the central information hub and controler of the system.

The server code controls the interaction modules, the measurement chambers and the communication with the robot in the arena. It listens for commands that are sent by either the robot or the client software and reacts by executing the following functions.

Directly available -Server functions activated by commands sent from client:

  • heat Starts the heating module for 5 seconds.
  • pump_1 Start all pumps for 11 seconds (the length of one measure cycle) to flush the system and fill it with fresh suspension from the reactor.
  • temp Get the current temperature reading from the themperature sensor in the Temperature Interaction Module.
  • cam Take a testpicture with the master camera and report the measurement result.
  • drive Send out a drive command to the Robot to test range and connection.
  • turn Send out a turn command to the Robot to calibrate the radius.
Tab 1: List of commands and the corresponding functionality in the servercode.

In the case of a real experiment run in the temperature setup, the robot sends one of the following messages to the server according to it's position and orientation in the arena and the sensor input perceives. The server reacts by initiating the corresponding processes as described below.

Robot - Server interaction :

  • clear

    The server starts a waiting loop to cool down the potentially still hot heating chamber to prevent tainting of the current run by previous runs. After this cooldown period, fresh suspension is pumped into the measurement chamber and a baseline measurement is conducted. To prevent any unknown or outside influences, another waiting loop, identical in duration to the activation heating period during a run with activated temperature interaction, is started now. Finally, the suspension is now pumped into the measurement chamber and a measurement is taken. The baseline measurement and actual measurement data is now compared and in case the difference surpasses a given threshold, the server sends the turn command to the robot. Otherwise drive sent to the robot to signal an open path ahead.

  • obstacle

    The server starts with a cooldown period to prevent tainted measuring results. A baselinge measurement is made with fresh suspension. Fresh suspension is pumped into the temperature interaction module and heated to target temperature. The heated and activated suspension is pumped into the measurement chamber and a measurement is taken and compared to the baseline value. If the baseline and the actual measurement have a differnece equal or grater than the given threshold, the server sends the turn command to the robot. Otherwise drive sent to the robot to signal an open path ahead.


The Client

To be able to test all of the control systems functionality (pump control, heating, measurements) without having to actually run the full experiments, a small command line application was written in Python3. Intended to being run on any computer in the same network as the Server and Robot, this application allowed us to conveniently send the above mentioned commands to the server for testing and verification of the componenets of the bioreactor setup and robot. Especially during the calibration of the interaction modules and pump cycle lengths, this little tool proved to be very useful.

The commands are sent and answers are received over UDP, a common data transfer protocol. Although not reliable for critical communication because of missing error checking and guaranteed order of the packets arriving, for the small data packets we are sending here it is sufficient.