1 ## Copyright (C) 2009 Lukas F. Reichlin
3 ## This file is part of LTI Syncope.
5 ## LTI Syncope is free software: you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation, either version 3 of the License, or
8 ## (at your option) any later version.
10 ## LTI Syncope is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ## GNU General Public License for more details.
15 ## You should have received a copy of the GNU General Public License
16 ## along with LTI Syncope. If not, see <http://www.gnu.org/licenses/>.
19 ## @deftypefn{Function File} {[@var{K}, @var{N}, @var{gamma}, @var{rcond}] =} mixsyn (@var{G}, @var{W1}, @var{W2}, @var{W3}, @dots{})
20 ## Solve stacked S/KS/T H-infinity problem. Bound the largest singular values
21 ## of @var{S} (for performance), @var{K S} (to penalize large inputs) and
22 ## @var{T} (for robustness and to avoid sensitivity to noise).
23 ## In other words, the inputs r are excited by a harmonic test signal.
24 ## Then the algorithm tries to find a controller @var{K} which minimizes
25 ## the H-infinity norm calculated from the outputs z.
30 ## LTI model of plant.
32 ## LTI model of performance weight. Bounds the largest singular values of sensitivity @var{S}.
33 ## Model must be empty @code{[]}, SISO or of appropriate size.
35 ## LTI model to penalize large control inputs. Bounds the largest singular values of @var{KS}.
36 ## Model must be empty @code{[]}, SISO or of appropriate size.
38 ## LTI model of robustness and noise sensitivity weight. Bounds the largest singular values of
39 ## complementary sensitivity @var{T}. Model must be empty @code{[]}, SISO or of appropriate size.
41 ## Optional arguments of @command{hinfsyn}. Type @command{help hinfsyn} for more information.
44 ## All inputs must be proper/realizable.
45 ## Scalars, vectors and matrices are possible instead of LTI models.
50 ## State-space model of the H-infinity (sub-)optimal controller.
52 ## State-space model of the lower LFT of @var{P} and @var{K}.
54 ## L-infinity norm of @var{N}.
56 ## Vector @var{rcond} contains estimates of the reciprocal condition
57 ## numbers of the matrices which are to be inverted and
58 ## estimates of the reciprocal condition numbers of the
59 ## Riccati equations which have to be solved during the
60 ## computation of the controller @var{K}. For details,
61 ## see the description of the corresponding SLICOT algorithm.
64 ## @strong{Block Diagram}
69 ## gamma = min||N(K)|| N = | W2 K S | = lft (P, K)
76 ## +---------------------------------------->| W1 |----->
79 ## | +---------------------->| W2 |----->
81 ## r + e | +--------+ u | +--------+ y +------+ z3
82 ## ----->(+)---+-->| K(s) |----+-->| G(s) |----+---->| W3 |----->
83 ## ^ - +--------+ +--------+ | +------+
85 ## +----------------------------------------+
91 ## | |-----> z1 (p1x1) z1 = W1 e
92 ## r (px1) ----->| P(s) |-----> z2 (p2x1) z2 = W2 u
93 ## | |-----> z3 (p3x1) z3 = W3 y
94 ## u (mx1) ----->| |-----> e (px1) e = r - y
101 ## r ----->| |-----> z
103 ## u +---->| |-----+ e
107 ## +-----| K(s) |<----+
114 ## r ----->| N(s) |-----> z
120 ## Extended Plant: P = augw (G, W1, W2, W3)
121 ## Controller: K = mixsyn (G, W1, W2, W3)
122 ## Entire System: N = lft (P, K)
123 ## Open Loop: L = G * K
124 ## Closed Loop: T = feedback (L)
130 ## Skogestad, S. and Postlethwaite I.
131 ## Multivariable Feedback Control: Analysis and Design
134 ## Chapter 3.8: General Control Problem Formulation
138 ## @strong{Algorithm}@*
139 ## Relies on commands @command{augw} and @command{hinfsyn},
140 ## which use SLICOT SB10FD and SB10DD by courtesy of
141 ## @uref{http://www.slicot.org, NICONET e.V.}
143 ## @seealso{hinfsyn, augw}
146 ## Author: Lukas Reichlin <lukas.reichlin@gmail.com>
147 ## Created: December 2009
150 function [K, N, gamma, rcond] = mixsyn (G, W1 = [], W2 = [], W3 = [], varargin)
158 P = augw (G, W1, W2, W3);
160 [K, N, gamma, rcond] = hinfsyn (P, p, m, varargin{:});