40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
 40m Log Not logged in  Tue Jun 25 12:42:16 2013, gautam, Update, General, Serial-interface with Doubling Oven at Y end Wed Jun 26 11:45:06 2013, gautam, Update, General, PID tuning-Doubling Oven at Y end   Message ID: 8755     Entry time: Wed Jun 26 11:45:06 2013     In reply to: 8745
 Author: gautam Type: Update Category: General Subject: PID tuning-Doubling Oven at Y end

Summary

Having established the serial link between the Doubling oven at the Y-end and the Raspberry pi, I wanted to use this interface to collect time-series from the oven after applying a step function in an effort to measure the transfer function of the oven. The idea was that knowing the transfer function of the oven, I could use some simple PID tuning rules like the Ziegler-Nichols rule or put everything in SIMULINK and find the optimal PID gains. However, I am unable to extract the oven transfer function from the time series data collected.

Methodology:

Last night, between 920pm and 940pm I applied a step function to the doubling oven by changing the setpoint of the controller from 35.7 Celsius to 39 Celsius (having checked elog 3203 to get an idea of a 'safe' step to apply). I then used the Pi to collect time series data for 6 minutes, then returned the set-point back to 35.7 Celsius, and took another time-series to make sure things were back to normal. Having gotten the time series data, I attempted to fit it using some exponentials which I derived as follows: I couldn't think of a way to get the laplace transform of the time-series data collected, so I approximated the oven transfer function as a system with a one simple pole i.e. G(s)=K/(1+Ts), where K and T are parameters that characterise the oven transfer function. I then plugged in the above expression for Y(s) into Mathematica (knowing X(s)=constant/s, and H(s) = 250 + 60/s +25s from the PID gains) and did an inverse laplace transform to find a y(t) with two unknown parameters K and T to which I could fit the time-series data.

Results:

The time-series data collected via the Pi after applying the step was this: The inverse laplace transform from mathematica yielded the following (formidable!) function (time, the independent variable, is x, and the fitting parameters are a=K and b=T where K and T are as described earlier):

(39*(exp(x*(1/(2*(25*a - b)) - (125*a)/(25*a - b) - sqrt(1 - 500*a+ 56500*a^2 + 240*a*b)/(2*(25*a - b)))) - exp(x*(1/(2*(25*a - b)) - (125*a)/(25*a - b) + sqrt(1 - 500*a + 56500*a^2 + 240*a*b)/(2*(25*a - b)))))*a)/sqrt(1 - 500*a + 56500*a^2 + 240*a*b)

My best attempts to fit this using MATLAB's cftool have given me useless fits:

I tried changing the start-points for the fitting parameters but I didn't get any better fits.

To Do:

1. Explore other fitting options.
2. Try and find a way to Laplace transform the time-series data so I can do the fitting in the s-domain.
3. I have some tweaking to do as far as the python scripts on the pi are concerned.
4. I have to get the current temperature readings onto one of the unused Y-arm EPICS channels, and log that data ~ once every 10 seconds.

Misc Remarks:

1. The time-series data has a 'stepped' appearance because of the resolution of the temperature sensor: it is 0.1 Celsius.
2. The sampling rate of the data-acquisition is limited; right now, I wait for 0.15 seconds after sending the command word to the controller before reading the data. When I set the wait-period any lower than this, I get errors. This has to be investigated more as I feel I should be able to get better sampling with the advertised baudrate of 115200, but in any case, it looks like it is sufficient for our purposes.

ELOG V3.1.3-