Commit 48724d85 authored by Kristian Soltesz's avatar Kristian Soltesz
Browse files

Added script that will contain a use case example.

parent cdeebb5e
% This example demonstrates how to invoke the scripts for obtaining
%IE-optimal and IAE optimal (with or without LP filter) PID controllers.
% Downloaded from
% Process model (continuous time LTI SISO system)
s = tf('s');
P = 5/(s+1)/(3*s+1)*exp(-2*s);
% Note: While defaults in the optimization code work for many processes,
% you may need to change grids and tolerances for some.
% Note: The optimization scripts were primarily written with stable process
% models in mind. If applied to unstable process models, they may need to
% be modified.
% Note: The optimization scripts assume contunuous time process models.
% Modifying them to accomodate discrete time process models is
% straightforward.
% Note: If a filter has been designed for the process, simply incorprate it
% into the process model (that is, as a series connected component of P).
Ms = 1.5; % Maximum allowed sensitivity function magnitude
Mt = 1.5; % Maximum allowed complementary sensitivity function magnitude
Mks = 10; % Maximum allowed magnitude of transfer function from process
% output to control signal, sometimes referred to as noise
% sensitivity.
%% Design
% IE-optimal design
p0 = [0 0 0]'; % Parameters of any PID controller, which stabilizes P.
% See pidIE.m for details. Use p = [0 0] to synthesize PI
% controller.
[K1,p1] = pidIE(P,Ms,Mt,Mks,p0)
% IAE-optimal design
[K2,p2] = pidIAE(P,Ms,Mt,Mks,p1) % Hot-start with K1 parameters
% IAE-optimal design with filter
[K,p3] = pidfIAE(P,Ms,Mt,Mks,p2) % Hot-start with K2 parameters
% Note: The IE-optimal design method relies on convex-concave optimization.
% It guarantees robustness but not stability. So if you choose the grid in
% an unfortunate way, you might end up with a robustly unstable design.
% Note: Behaviour of the methods is undefined (or at least unexplained
% here) if the constraint combinatioon Ms,Mt,Mks is infeasible for P.
% Note: Neither the IE nor IAE (with or without filter) guarantee
% optimality. However, both methods have been verified to find the true
% optimum in a large number of cases, such as ...
%% Evaluation
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment