Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!p49g2000hsd.googlegroups.com!not-for-mail
From: Greg Heath <heath@alumni.brown.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: simple parameter estimation
Date: Sat, 11 Oct 2008 21:36:10 -0700 (PDT)
Organization: http://groups.google.com
Lines: 68
Message-ID: <e0cb26ac-a3a0-4274-bfc3-c2b615ab397b@p49g2000hsd.googlegroups.com>
References: <gcl2c0$b9$1@fred.mathworks.com> <71fa8fc8-7b22-4b35-bf27-393643767166@8g2000hse.googlegroups.com>
NNTP-Posting-Host: 69.141.173.117
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1223786170 11250 127.0.0.1 (12 Oct 2008 04:36:10 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sun, 12 Oct 2008 04:36:10 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: p49g2000hsd.googlegroups.com; posting-host=69.141.173.117; 
	posting-account=mUealwkAAACvQrLWvunjg50tRAnsNtJR
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 
	5.1),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:494740


On Oct 10, 11:25 pm, Greg Heath <he...@alumni.brown.edu> wrote:
> On Oct 9, 9:53 am, "Marcio " <marciobarba...@yahoo.com> wrote:
>
> > please, dear friends,
>
> > how'd you solve a system like this:
>
> > for a given y1, y2 and y3:
>
> > dy1/dt = a*y1 +     b*y2 - c*y3
> > dy2/dt = b*y1 - (a-1)*y2 - c*y1*y3
> > dy3/dt = a*y1 - b
>
> > How to find a, b and c?
>
> > Many thanks
>
> If y1,y2,y3 are given, dy1/dt,dy2/dt and dy3/dt
> are readily estimated.
>
> You then have 3 systems of N linear equations for
> A = [a b c]'.
>
> Define
>
> Y1 = [y1 y2 -y3];
> Y2 = [-y2 y1 -y1.*y3];
> Y3 = [y1 -ones(N,1) zeros(N,1)];
>
> Then
>
> dy1/dt    = Y1*A
> dy2 - y2  = Y2*A
> dy3/dt    = Y3*A
>
> Note that Y3 is rank deficient. Therefore, the LS
> solution of the 3rd system may not be unique.
> Although Y1 and Y2 are full rank, the 1st two equations
> yield 2 unique, but very different LS solutions
> for A. In general, all of the three LS solutions will
> be different.
>
> A more satisfactory approach is to use a combined LS
> solution. If there is evidence that points or equations
> have unequal importance, weighting is easily introduced.
>
> The ordinary LS solution results from minimizing
>
> f = ||dy1/dt-Y1*A||^2 + ||dy2/dt-y2-Y2*A||^2
>      + ||dy3/dt-Y3*A||^2.

I forgot how to take the gradient of f w.r.t. a,b,c.
However, it looks like the result should be the same as
if you just added the three equations together.
Therefore, a weighted version would look like

w1*dy1/dt + w2*(dy2-y2) + w3*dy3/dt

   = (w1*Y1 + w2*Y2 + w3*Y3)*A

with solution

A = (w1*Y1 + w2*Y2 + w3*Y3) ...
     \(w1*dy1/dt + w2*(dy2-y2) + w3*dy3/dt)

Hope this helps.

Greg