Code covered by the BSD License
-
[param]=db2s(input)
-
[param]=db2w(input)
-
[param]=db3s(input)
-
[param]=db3w(input)
-
[param]=mv2(input)
-
[param]=pp2b_1(input)
-
[param]=pp2b_2(input)
-
[param]=pp2c2dof(input)
[param]=pp2c2dof(input)
-
[param]=pp2chp(input)
-
[param]=pp2chp(input)
-
[param]=pp3c2dof(input)
[param]=pp3c2dof(input)
-
[param]=pp3chp(input)
-
[param]=zn2ast(input)
-
[param]=zn2ast(input)
-
[param]=zn2pd(input)
-
[param]=zn2tak(input)
-
[param]=zn3pd(input)
-
[param]=zn3tak(input)
-
[q]=zn2fpd(input)
-
[q]=zn3fpd(input)
-
[qp]=ba2(input)
-
[qp]=da2(input)
-
[qp]=pp2a_1(input)
-
[qp]=pp2a_2(input)
-
[qp]=zn2br(input)
-
[qp]=zn2fd(input)
-
[qp]=zn2fr(input)
-
[qp]=zn2pi(input)
-
[qp]=zn2tr(input)
-
[qp]=zn3br(input)
-
[qp]=zn3fd(input)
-
[qp]=zn3fr(input)
-
[qp]=zn3pi(input)
-
[qp]=zn3tr(input)
-
[sys,x0,str,ts]=sid(t,x,u,fla...
Discrete model identification function.
-
scast(t,x,u,flag,T0,alfa,beta...
-
scfpd(t,x,u,flag,T0)
PID controller based on forward rectangular method of discretization
-
scqp(t,x,u,flag,T0)
-
scrqp(t,x,u,flag,T0)
RQP feedforward feedback controller
-
scrqp(t,x,u,flag,T0,nr,nq,np)
FBFW feedforward feedback controller
-
slblocks
% Name of the subsystem which will show up in the Simulink Blocksets
-
ultim(B,A,T0,trace)
-
circuit
-
stcsl_std
-
View all files
from
STCSL - standard version
by Petr Chalupa
Self-Tuning Controllers Simulink Library - standard version.
|
| [param]=mv2(input)
|
function [param]=mv2(input)
% [param] = mv2(input)
% Minimum variance controller for processes of 2nd order.
% This function computes parameters of the controller (r0, q0, q1, q2, p1, p2).
% Output of the controller is calculated follows:
%
% u(k) = 1/q * ( a1*y(k-1) + a2*y(k-2) - b1*u(k-1) - b2*u(k-2) + w(k) ) + u(k-1)
%
%
% r0 q0 + q1*z^-1 + q2*z^-2
% U(z^-1) = ----------------------- * W(z^-1) - ------------------------ * Y(z^-1)
% 1 + p1*z^-1 + p2*z^-2 1 + p1*z^-1 + p2*z^-2
%
% where q0=0
%
% Transfer function of the controlled system is:
%
% b1*z^-1 + b2*z^-2
% Gs(z^-1) = -----------------------
% 1 + a1*z^-1 + a2*z^-2
%
% Input: input ... input parameters
% input(1) ... a1
% input(2) ... b1
% input(3) ... a2
% input(4) ... b2
% input(5) ... penalisation factor q
% Output: param ... controller parameters
% param(1) ... r0
% param(2) ... q0
% param(3) ... q1
% param(4) ... q2
% param(5) ... p1
% param(6) ... p2
a1 = input(1);
b1 = input(2);
a2 = input(3);
b2 = input(4);
q = input(5);
% check inputs
if (q == 0)
disp('mv2.m: Input parameter q (penalisation factor) must not be equal 0');
disp(' parameter value has been changed to 1e-6');
q = 1e-6;
end
r0 = 1/q;
q0 = -1/q * a1;
q1 = -1/q * a2;
q2 = 0;
p1 = 1/q * b1 - 1;
p2 = 1/q * b2;
param=[r0; q0; q1; q2; p1; p2];
|
|
Contact us at files@mathworks.com