CHAPTER 06.04: NONLINEAR REGRESSION: Harmonic Decline Curve Model: Transformed Data: Example: Part 1 of 2
In this segment, we're going to take the harmonic decline curve, and we're going to look at an example of how do we regress to a harmonic decline curve. And in the example which we're going to take, we're going to use transformed data, which means that what we are trying to do is we're trying to take advantage of our linear regression formulas to be able to fit our data to our harmonic decline curve, which is a nonlinear model. So let's suppose somebody tells you that, hey, I have an oil well, and there is some data which is given to you is that time is given in months, and here you are given the rate of production from the oil well. So the rate of production in an oil well is generally measured in barrels per day. So they are finding out, they're giving you five data points, and then we'll figure out what they want you to do with it. So at 2 months, 6 months, 10 months, 14 months, and 18 months, they are measuring how much is the rate of the production, like how many barrels per day are being pumped up, so let's suppose we call this to be q, the rate, so this is 260, 189, 120, 87, and 75. So these are the data . . . this is the data which is given to us, and what they want us to do is they want to regress, so there are several things which they want us to do, they want us to regress it to the harmonic decline curve, which is simply q is equal to b, divided by 1 plus a t. So that's the harmonic decline curve, because as t . . . as t equal to 0, the q is equal to b, that's the initial production, as t becomes infinity, q will be 0, that means that the oil is all dried up . . . the well is all dried up. And the other things which you are asked to do is find the value of the production at 60 months, that's five years. They're also asking you what is the time, at what time will the production be 20 barrels per day? And the reason why people are interested in finding out the time when the production will be a certain number is because generally the wells will be abandoned when the cost of pumping up the oil becomes more than what it is pumping. So if the capital costs, maintenance costs, and things like that, become more than the revenue they are generating from pumping the oil, they simply abandon the well. So these are the two, that's the two reasons why they're asking you you to calculate this and this, this for finding out what the production is at 60 months, and this one to figure out when they should abandon the well. So let's go ahead and see that how we can solve this problem by using transformed data. So I shouldn't have called this transformed curve here, so this should be transformed data . . . transformed data right there, not curve. So let's go ahead and see how we can go about doing this. So we have q is equal to b, divided by 1 plus a t, so that's our regression curve which we want to be able to fit to the data, and b and a are the constants of the model. So I'm going to take 1 divided by q is equal to 1 plus a t, divided by b, so I get 1 divided by q is equal to 1 divided by b, plus a by b, t, and this 1 divided by q, that's what I'm going to call my z, and this is what I'm going to call my a0, this is what I'm going to call my a1, so I get z is equal to a0, plus a1 times t. So that is the linear relationship which I was linear for, but the linear relationship between z and t, not between q and t, because q and t is the harmonic decline curve, so it's nonlinear, and the reason why we are doing this transformation is so that . . . transforming the data, we're converting the q data to the z data, so that we can use our linear regression formulas for a0 and a1, which are given as a1 is equal to n times summation, zi ti, minus summation, zi, summation ti, divided by n times summation, zi squared, minus summation, zi, whole squared, this is from your linear regression models, and a0 is nothing but z-bar, minus a1 t-bar. So that's how we're going to . . . all the summations which you are seeing here, they're all from 1 to n, so that's why I skipped those. I shouldn't have, but you do need to understand that all the summations are from i is equal to 1 to n. So what you have to do is you have to find your a1 and a0, and then backtrack it to find your b and a, because that's how a0 and a1 are related to a an b, and you can very well see that in order to find a1 and a0, you have to find your zis. So zis will be found out by inverting the q values which are given to us, that's how you're going to calculate that data. And once you have calculated zis, there are other . . . there are summations which you need to calculate, one is the summation of zi ti, summation of zi, summation of ti, and summation of ti squared, this should be ti squared, ti, ti. So you need to calculate this summation, summation, zi ti, summation, zi, summation, ti, and summation of ti squared. Those are the summations which need to calculate a1, and then a0 can be calculated, and then backtrack to calculate a and b. So what I'm going to do is I'm going to write this all in a table so that we can . . . let's go ahead and find out what these summations are. Let's go ahead and do that.