Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Kristian Soltesz
PIDopt
Commits
4f4c694f
Commit
4f4c694f
authored
Sep 06, 2017
by
Kristian Soltesz
Browse files
Added code for computing tau and Tar.
parent
82251aee
Changes
1
Hide whitespace changes
Inline
Side-by-side
getTauTar.m
0 → 100644
View file @
4f4c694f
% The relative dead time tau = L/(L+T) and arrest time Tar = T+L are
% defined for first order time delayed SISO LTI systems
%P(s) = K/(s*T+1)*exp(-s*L)
%
% This code computes generalizations of tau and Tar for arbitrary SISO LTI
% systems, which can be either discrete or continuous.
% Written by kristian@control.lth.se
% Downloaded from git@gitlab.control.lth.se:kristian/PIDopt.git
function
[
tau
,
Tar
,
L
]
=
getTauTar
(
P
)
[
~
,
t
]
=
step
(
P
);
t
=
linspace
(
0
,
t
(
end
),
1e5
);
[
y
,
t
]
=
step
(
P
,
t
);
ydot
=
impulse
(
P
,
t
);
[
~
,
i
]
=
max
(
ydot
);
tmax
=
t
(
i
);
ymax
=
y
(
i
);
L
=
tmax
-
ymax
/
ydot
(
i
);
if
dcgain
(
P
)
==
inf
tau
=
0
;
Tar
=
inf
;
return
end
P
=
P
/
dcgain
(
P
);
if
P
.
Ts
>
0
P
=
d2c
(
P
,
'zoh'
)
end
Tar
=
sum
(
-
1.
/
pole
(
P
))
-
sum
(
-
1.
/
zero
(
P
))
+
totaldelay
(
P
);
T
=
Tar
-
L
;
tau
=
L
/
Tar
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment