How Stuff Works
What We Did


Simulink Model

We created a Simulink model to simulate the ADR system and the ideas in our new code. The box entitled “ouradr” above is an S-function used in MATLAB. S-functions manipulate the input data using a process that is defined by the programmer. The S-function "ouradr" implements our version of PID control used in the actual ADR control code.

After calibrating the simulation to model data from the old ADR control code, we were then able to feed in different values of tau (for the smoothing function) and the PID coefficients. We optimized these values so that the data reaches the set point quickly and with few oscillations. Below is a graph of the old data (in blue) and the simulated model (in red) with the values of tau = 6.0, P = 0.1, I = 0.0, and D = 1.0.