INSTRUCTOR: Here, I'm going to describe the terms
in the Excel spreadsheet that we can use
if we want to calculate kinetic parameters
using nonlinear regression,
but it's on data that's obtained from a plug flow reactor.
So on a separate screen cast,
describe the reasoning and the approach we used
to carry out this calculation.
Here, I just wanted to discuss the setup
of the spreadsheet and show what terms are there.
And then in the subsequent screen cast,
show the actual use of the spreadsheet.
So the rate expression that we're looking at
to model a catalytic reaction is shown here.
And just as a reminder,
the two parameters, the rate constant,
the absorption equilibrium constant.
So let's look at a copy of the spreadsheet.
So the two parameters we're trying to determine
are indicated in yellow.
These are the values we obtain
as we did nonlinear regression.
So in the spreadsheet,
what I've done is I generated some data
and the data used these values for parameters.
And then I added some noise to that data.
And then I took the model
and regressed comparing the calculated data
to experimental data.
And I'll show you what I've done with that.
Here's the pressure, temperature, gas constant,
and then the feed concentration,
this is in micro moles per cubic centimeter.
The step size is the size that I'm going to use
to step through the numeric integration.
The volumetric flow rate, we're actually going to change.
So I put in one as a value,
but as you'll see, that's our variable
because experimentally, that's what we varied.
Now, something I want to point out is
we're doing a lot of calculations here.
We're doing numerical integration,
in this case for like 400 steps,
and each of those steps has five terms to calculate
and then we're creating a table.
So we're doing that 10 times or so.
So the Solver, when we run it
after we do that calculation,
every time the Solver iterates,
it's gotta redo the calculation with different parameters.
So it can take more than a minute to get to the solution,
and of course depends how good our initial guess is.
But as I explained and as I listed up here,
the K terms, easiest way is to calculate K term
for the first step,
the 0.05 cubic centimeters,
where here's our inlet at the volume of the reactor is zero,
we calculate the four K terms
and then we calculate CA from this term.
So that's what each column is in each row.
So we just copy the cells down
because we're stepping through increasing volume,
down the end of the spreadsheet,
the volume is 20 cubic centimeters,
that's the volume we're using in the calculation.
Now the critical thing,
the thing that makes this feasible
is to create a data table.
So this is the data table.
This is the cell that indicates what we're calculating.
And this value is the cell I411.
So that's the value of CA at the end of the reactor
over the volume is 20 cubic centimeters.
And then the way the data table works
it will now use the volumetric flow rate
first a one then a 1.1.
And it'll calculate what the exit concentration is.
And you can see as we increase the volume metric flow rate
and therefore decrease the residence time,
then the concentration leaving the reactor increases
the conversion decreases.
So this column is from our model
for whatever values we'll put in for K and Ka,
the next column it'll-
These are the experimental values
that I created by taking the calculation
for Ka of 0.1 and rate constant is 0.4,
and then adding noise.
Residuals are the difference between the calculated value
and experimental value,
so it's experimental minus calculated.
And then this column are these residual squared
because that's what we used to do our regression.
So this column, this final cell here,
the yellow cell is the sum of the values
in this residual squared column,
that's what we wanna regression to minimize.
These are the actual residuals,
the difference that show once we've done a fit
how close we are to our measured values.
Now we can use the data then to make a plot.
The squares are the experimental values
in the column I just showed you.
And then the orange line is calculated from our model
for the parameters that we obtained
for nonlinear regression, and shows the fit is good.
The other graph that we can make
that's useful is the residuals.
And the reason we interest in this,
because it shows us if we have a random distribution
of errors, of course.
Here's [indistinct] in their actual experiments
but were generated, they're random.
And if these were experiments
to kind of things we wanna calculate
would be the run number namely,
how many sets of one sign are there of the residuals?
So for example, here's a set for negative,
then the set positive.
Now it's set negative, positive, negative positive.
So the run can be three or four of the same sign.
All we're interested in is
how many of the circled values are.
Here, there are seven.
So that's certainly what we would expect
if we have 11 data points divided by two, add one.
That's the expected number.
What numbered above indicate we have ran distribution.
And of course we do because it was generated.
So on the subsequent screen cast,
we'll actually look at the spreadsheet
to get a better understanding
of how to carry out this calculation.