Home > freetb4matlab > control > lqr.m

# lqr

## PURPOSE

% construct the linear quadratic regulator for the continuous time system

## SYNOPSIS

function [k, p, e] = lqr (a, b, q, r, s)

## DESCRIPTION

% -*- texinfo -*-
% @deftypefn {Function File} {[@var{k}, @var{p}, @var{e}] =} lqr (@var{a}, @var{b}, @var{q}, @var{r}, @var{z})
% construct the linear quadratic regulator for the continuous time system
% @iftex
% @tex
% $$% {dx\over dt} = A x + B u %$$
% @end tex
% @end iftex
% @ifinfo
%
% @example
% dx
% -- = A x + B u
% dt
% @end example
%
% @end ifinfo
% to minimize the cost functional
% @iftex
% @tex
% $$% J = \int_0^\infty x^T Q x + u^T R u %$$
% @end tex
% @end iftex
% @ifinfo
%
% @example
%       infinity
%       /
%   J = |  x' Q x + u' R u
%      /
%     t=0
% @end example
% @end ifinfo
%
% @noindent
% @var{z} omitted or
% @iftex
% @tex
% $$% J = \int_0^\infty x^T Q x + u^T R u + 2 x^T Z u %$$
% @end tex
% @end iftex
% @ifinfo
%
% @example
%       infinity
%       /
%   J = |  x' Q x + u' R u + 2 x' Z u
%      /
%     t=0
% @end example
%
% @end ifinfo
% @var{z} included.
%
% The following values are returned:
%
% @table @var
% @item k
% The state feedback gain,
% @iftex
% @tex
% $(A - B K)$
% @end tex
% @end iftex
% @ifinfo
% (@var{a} - @var{b}@var{k})
% @end ifinfo
% is stable and minimizes the cost functional
%
% @item p
% The stabilizing solution of appropriate algebraic Riccati equation.
%
% @item e
% The vector of the closed loop poles of
% @iftex
% @tex
% $(A - B K)$.
% @end tex
% @end iftex
% @ifinfo
% (@var{a} - @var{b}@var{k}).
% @end ifinfo
% @end table
%
% @strong{Reference}
% Anderson and Moore, @cite{Optimal control: linear quadratic methods},
% Prentice-Hall, 1990, pp. 56--58.
% @end deftypefn

## CROSS-REFERENCE INFORMATION

This function calls:
• are % Solve the Algebraic Riccati Equation
This function is called by:
• dgkfdemo % Octave Controls toolbox demo:
• lqe % Construct the linear quadratic estimator (Kalman filter) for the
• lqg % Design a linear-quadratic-gaussian optimal controller for the system

Generated on Sat 16-May-2009 00:04:49 by m2html © 2003