% This code was written to solve SISO mean-square optimal design
% problem of the following form:
% Let the controlled plant is described by differential equation
% A(p)x = B(p)u + f(t), (1)
% where x - scalar controlled variable, u - scalar control, A(p),B(p) are
% polynomials of p = d/dt, f(t) - external disturbance with known spectral
% density Sf=S(s)S(-s)=N(s)N(-s)/(T(s)T(-s)) (N(s),T(s) are Hurwitz
% polynomials).
% It is necessary to find transfer function of the controller
% u = W(s)x, W(s)=W1(s)/W2(s) (2)
% stabilizing closed-loop system (1),(2) and minimizing mean-square
% performance criterion
% J=m^2<x^2>+<u^2>. (3)
% The program is based on the theory proposed in [1].
% To begin with, run script 'sisomsc.m', then input polynomials
% A(p),B(p),N(s),T(s) and press 'Run Analysis' button on control panel.
% The plots of relationship between <u^2> and <x^2> for varying values of the
% weight multiplier m^2 in the range (0,inf) will appear.
% If it is necessary, input the exact value of m^2 in special window and
% obtain an optimal control by pressing 'Control ' button.
%Example:
% SISO system: (p^2+5p-4)x=(p+3)u+f(t);
% spectral density: S(s)=1/(s+0.1);
% performance criterion: J=<x^2>+<u^2>;
% initial polynomials: A(p)=p^2+5p-4, B(p)=p+3, N(s)=1, T(s)=s+0.1.
%
% Optimal controller: u=((0.41556p^2+2.4878p+0.79105)/(0.41556p+0.65672)) x
%
% REFERENCE
%
% 1. Veremey E.I. The frequency method of the optimal controllers synthesis
% for the linear systems with scalar disturbance. Part 1,2.
% Izvestija Vuzov SSSR, Electromehanika, N10 (p.52-57),
% N12 (p.33-39), 1985.
%
%About authors:
% Maxim V. Korovkin, Sergei V. Pogozev - 4th year students of Applied
% Mathematics and Control Processes Faculty of Saint Petersburg
% State University, Russia,
% Evgeny I. Veremey - scientific advisor, professor of Applied
% Mathematics and Control Processes Faculty of Saint Petersburg
% State University, Russia.
% E-mail: veremei@vrm.apmath.spb.su
%
%The MATLAB 5.0 version was used.
%
%Project includes the following files:
% sisomsc.m - the main program
% sisomsc.mat
% alg2.m
% analys.m
% gurnogur.m
% mysort.m
% polfac.m
% polsum.m
% xuminmax.m