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.
|
| [qp]=zn3fd(input)
|
function [qp]=zn3fd(input)
% [qp] = zn3fd(input)
% Controller for 3rd order processes with filtration of D-component using
% Tustin approximation. Time constant of the filter Tf = Td/alfa.
% This function computes parameters of the controller (q0, q1, q2, p1, p2).
% Transfer function of the controller is as follows:
%
% q0 + q1*z^-1 + q2*z^-2
% G(z^-1) = ------------------------
% 1 + p1*z^-1 + p2*z^-2
%
% Transfer function of the controlled system is:
%
% b1*z^-1 + b2*z^-2 + b3*z^-3
% Gs(z^-1) = ---------------------------------
% 1 + a1*z^-1 + a2*z^-2 + a3*z^-3
%
% Input: input ... input parameters
% input(1) ... a1
% input(2) ... b1
% input(3) ... a2
% input(4) ... b2
% input(5) ... a3
% input(6) ... b3
% input(7) ... sample time T0
% input(8) ... filtration coeficient alfa
% Output: qp ... controller parameters
% qp(1) ... q0
% qp(2) ... q1
% qp(3) ... q2
% qp(4) ... p1
% qp(5) ... p2
a1 = input(1);
b1 = input(2);
a2 = input(3);
b2 = input(4);
a3 = input(5);
b3 = input(6);
T0 = input(7);
alfa = input(8);
% compute ultimate gain and frequency
[Kpu, Tu] = ultim([b1 b2 b3],[a1 a2 a3],T0);
Kp = 0.6*Kpu;
Ti = Tu/2;
Td = Tu/8;
Tf = Td/alfa;
cf = Tf/T0;
ci = T0/Ti;
cd = Td/T0;
p1 = -4*cf/(1+2*cf);
p2 = (2*cf-1)/(1+2*cf);
q0 = Kp * (1 + 2*(cf+cd) + (ci/2)*(1+2*cf))/(1+2*cf);
q1 = Kp * (ci/2-4*(cf+cd))/(1+2*cf);
q2 = Kp * (cf*(2-ci) + 2*cd + ci/2 - 1)/(1+2*cf);
qp=[q0; q1; q2; p1; p2];
|
|
Contact us at files@mathworks.com