Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.web-ster.com!news.web-ster.com.POSTED!not-for-mail
NNTP-Posting-Date: Mon, 21 Jul 2008 20:05:51 -0500
Date: Mon, 21 Jul 2008 18:06:03 -0700
From: Tim Wescott <tim@seemywebsite.com>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Newsgroups: sci.stat.math,comp.soft-sys.matlab,sci.engr.control
Subject: Re: Kalman filtering with multiplicative noise
References: <1309743c-3d5c-4165-9cdb-1ab51892727d@z16g2000prn.googlegroups.com> 	<v_WdnRJ79rDWKhnVnZ2dnUVZ_j-dnZ2d@web-ster.com> <451b3f72-9ded-49dc-9f51-5a5e9d4e7695@v1g2000pra.googlegroups.com>
In-Reply-To: <451b3f72-9ded-49dc-9f51-5a5e9d4e7695@v1g2000pra.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <IfmdnSuIRJbyrxjVnZ2dnUVZ_szinZ2d@web-ster.com>
Lines: 78
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-xDkhlFVCnyA14ifmC+lwK1lOT4XbMklUqRqnRAtFYQ7IEGtGtQ75qd/YoZUj4KNuHoQmPsUFZEO2pO7!O+h+sK9DoXYBfPxbiryqRcBS0Bw3yvU/+JtIcNz0lLzr5NN2Xvv4gV4CwpvsZmxgqKkmxRH7b8OC!MpZ7WHdmC0sV4ok=
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.39
Bytes: 4945
Xref: news.mathworks.com sci.stat.math:83512 comp.soft-sys.matlab:480814 sci.engr.control:50819



dsp@myallit.com wrote:
> On Jul 22, 2:20 am, Tim Wescott <t...@seemywebsite.com> wrote:
>> On Sun, 20 Jul 2008 19:51:02 -0700, dsp wrote:
>>> I'm trying to implement a Kalman filter in MATLAB that will use two
>>> types of measurements: volume and in/out flow rate. For the flow rate,
>>> the measurement error is additive Gaussian, but for the volume the
>>> measurement error is expressed as a percentage of the volume, so that
>>> the volume measurement is less accurate when its value is higher. I
>>> think the measurement model should therefore be:
>>> Flow rate measurement model:
>>> z1 = x1 + v1 where v1 ~ N(0,e1)
>>> Volume measurement model:
>>> z2 = x2*v2 where v2 ~ N(1,e2)
>>> I assumed the volume filtering should be done in the log domain to make
>>> the noise additive but how do I deal with a noise mean of one when the
>>> Kalman filter assumes a mean of zero? And how can I have a Kalman filter
>>> using both the measurements if one is in the log domain and the other
>>> one isn't?
>>> I am also dealing with a system where measurements will usually be
>>> missing (they are arriving sequentially) and at an uneven sampling rate,
>>> any other pointers on these too would be appreciated.
>> As Ray pointed out these seem to be completely independent measurements,
>> unless V1 and V2 are correlated.
>>
>> With any affine system, such as the log-domain volume system, you can
>> subtract out the offset to make the system linear, do your linear
>> processing, then add the offset back in.  I.O.W., calculate log z2 = log
>> x2 + log v2 + 1, then define dlz2 = log z2 - 1, then find your estimated
>> dlz2, then back up to your estimated z2.  (Note that your estimate of z2
>> probably won't be strictly optimal in the mean-squared sense, only your
>> estimate of dlz2 will be.  But you'll certainly be closer than you would
>> by a lot of other means).
>>
>> --
>> Tim Wescott
>> Control systems and communications consultinghttp://www.wescottdesign.com
>>
>> Need to learn how to apply control theory in your embedded system?
>> "Applied Control Theory for Embedded Systems" by Tim Wescott
>> Elsevier/Newnes,http://www.wescottdesign.com/actfes/actfes.html
> 
> My state transition for these two measurements is given by:
> 
> F = [dt 1
>      1  0]
> 
> where dt is the time step, so as far as I understand it these
> measurements are correlated - if z1 is positive, then z2 will be
> increasing and vice versa.
> 
> Doing this in the log domain makes sense, but how can I have one
> measurement in the log domain and the other not? The state transition
> won't make sense.
> 
> Equation 2 will actually reach zero quite often, so maybe I need
> multiplicative and additive noise in my measurement model for z2, not
> too sure about that.

You probably need an extended Kalman filter, where you use your current 
best guess of the flow to update the covariance.  This will be more 
computationally intensive because you won't be able to pre-calculate 
your covariance, and it'll be nonlinear because you'll be multiplying by 
one of your states.

That's about as much as I know about the subject, so try google, or get 
a copy of "Optimal State Estimation" by Simon and have fun.

Alternately, can you do a good enough job with good ol' low-pass filters?

-- 

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html