CHE 396 Spring 2020: Homework 3
Due date: 4/20
1. NB2_exercise_cooling_prediction.ipynb provided by OSISoft
2. In NB1_exercise_ADF_Prediction.ipynb, a linear model and then a piece wise linear model was used to fit the ADF data (i.e. ADF vs fermentation time, part 5). Can you instead fit a single nonlinear model to this data? Hint: Think of a nonlinear functional form of the type f(x)/g(x) that can generate the “S-shape” of the data. Use the same analysis as was used in Part 5a to check if the new model fits better than the linear model and piece wise linear model. There are potentially multiple models that can fit this data. Comment on whether your model has any physical or biological basis (to the extent of your knowledge on the subject).
3. Use the attached dataset xtrain.npy and ytrain.npy (npy is a numpy array data file, find out how you can directly import data from such files and store them in arrays) to build a multivariate model using polynomial regression. The goal is to find the most compact model that is able to explain the data. Start from a linear model, and progressively add complexity to your model (such as by adding all quadratic terms, all bilinear terms like x1x2, x2x3, and so on, and then all cubic terms. You do not need to consider beyond cubic terms). At each stage, you can seek a sparse model via any regularization method. Finally, pick the “best” model using an information criterion. Show the step-by-step process of identifying your final model in your notebook.
Bonus question (You are encouraged to work on this as it may help practice how to code more sophisticated nonlinear models. You can also use the data from this question in your final project.)
In the attached excel spreadsheet (HW3.xlsx), you will find the kinetics data of steam methane reforming (a process by which methane is converted into carbon dioxide and hydrogen). This is the method that, for instance, Air Products in Allentown PA uses to produce industrial hydrogen. According to Xu and Froment (AIChE J 1989, 35, 88), there are three main reactions (with the given rate expressions):
• CH4 + H2O CO + 3H2
• CO + H2O CO2 + H2
• CH4 + 2H2O CO2 + 4H2
Where
Where is the partial pressure of species . , are kinetic and equilibrium constants.
Xu and Froment further proposed that the rate of CO formation is while that of CO2 formation is . The experiments are at low conversion, so the partial pressure at any point in the reactor is equal to the partial pressure of the inlet. The data in the spreadsheet gives the temperature, total pressure , feed flow rate in μmol/site/sec (moles of reactant fed per site on the catalyst per second), and outlet CO2 and CO in μmol/site/sec (Note that the units of the outlet is already that of rate, so these are and ). By definition, then,
The authors also note that
where is a reference temperature, is the reference kinetics at that temperature, and the equation describes the Arrhenius relationship. Similarly,
where is a reference temperature and the equation describes the Vant Hoff relationship.
Fit the model to the data to calculate all in terms of their reference values at , . Show model performance with a parity plot and three-fold cross validation. Note: Scipy’s curve_fit may not be sufficient here, so you may have to look for other packages.