Tuesday, August 17, 2021

Nonlinear Regression

Problem 15.11.


The following model is used to represent the effect of solar radiation on the photosynthesis rate of aquatic plants:




where P = the photosynthesis rate (mg m-3d-1), Pm = the maximum photosynthesis rate (mg m-3d-1), I = solar radiation (µE m-2s-1), and Isat = optimal solar radiation (µE m-2s-1). Use nonlinear regression to evaluate Pm and Isat based on the following data:


Solution:


First, a M-file function must be created to compute the sum of squares: 
function f = fSSR(a,Im,Pm)
Pp = a(1)*Im/a(2).*exp(-Im/a(2)+1);
% a(1) = Pm, a(2) = Isat
f = sum((Pm-Pp).^2);

In command mode, the data can be entered as:
>> I = [50 80 130 200 250 350 450 550 700];
>> P = [99 177 202 248 229 219 173 142 72];

Employ initial guesses of 200 for the coefficients. The minimization of the function is then implemented by:
>> a = fminsearch(@fSSR, [200, 200], [], I, P)

a =

  238.7124  221.8239

The best-fit model is therefore




The fit along with the data can be displayed graphically as:
>> Ip = linspace(min(I),max(I));
>> Pp = a(1)*Ip/a(2).*exp(-Ip/a(2)+1);
>> plot(I,P,'o',Ip,Pp)
>> xlabel('I'),ylabel('P')
>> title('Effect of solar radiation on photosynthesis rate')

No comments:

Post a Comment

Numerical Integration Formulas

Here are the M-files to implement composite trapezoidal rule for equally spaced data and unequally spaced data.  Composite Trapezoidal Rule ...