help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LQG with cross coupling


From: Johan Kullstam
Subject: Re: LQG with cross coupling
Date: 09 Nov 2004 06:38:13 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

NZG <address@hidden> writes:

> In Matlab I can compute an LQG using the robust toolbox's lqg function,
> which is of the form [af,bf,cf,df]=lqg(A,B,C,D,W,V)
> This function can handle cross coupling between the state and input such
> that the loss function is of the form:
> 
> l(x,u)=x'Qx + 2u'Nc'x +u'Ru
> 
> I looked into the Octave-forge lqg function, but it only provides inputs for
> Q and R, assuming that they are not coupled and the loss function is 
> of the form:
> 
> l(x,u)=x'Qx +u'Ru
> 
> Has anyone else had to deal with this problem before?
> How did you solve it?

Use the time-varying solution.  Iterate until the feedback stops
changing.  There are "doubling" algorithms which speed this up.

I have used this to make a time-invariant Wiener filter from Kalman
equations.

Try this (not sure how well it works since it was in my tmp directory
and I wrote it a while back, the iteration idea should be sound
though.)

## darex
##
## solve the discrete algebraic ricatti equation with cross term
## use brute force approach
function [S,L] = darex(F,G,Q1,Q2,W,n,S)
  if nargin < 7,
    S = zeros(size(F));
  endif
  if nargin < 6,
    n = 100;
  endif
  for ii = 1:n,
    S = F'*S*F+Q1-(G'*S*F+W')'*pinv(G'*S*G+Q2)*(G'*S*F+W');
  endfor
  L = pinv(G'*S*G+Q2)*(G'*S*F+W');
endfunction


-- 
Johan KULLSTAM



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]