Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ICS
ICS Public
Lecture Files
Commits
836ddc5c
Commit
836ddc5c
authored
Jun 02, 2021
by
Adwait Datar
Browse files
Gitlab Runner Update from orc-aux-files/master:Add code for for 16_3, 17_1, 17_2
parent
3e76caa6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
0 deletions
+91
-0
ORC/exercise-files/Exercise_material_SoSe_2021/code/E_16_3_waterbed.m
...-files/Exercise_material_SoSe_2021/code/E_16_3_waterbed.m
+91
-0
ORC/exercise-files/Exercise_material_SoSe_2021/code/E_17_1.zip
...xercise-files/Exercise_material_SoSe_2021/code/E_17_1.zip
+0
-0
ORC/exercise-files/Exercise_material_SoSe_2021/code/E_17_2.zip
...xercise-files/Exercise_material_SoSe_2021/code/E_17_2.zip
+0
-0
No files found.
ORC/exercise-files/Exercise_material_SoSe_2021/code/E_16_3_waterbed.m
0 → 100644
View file @
836ddc5c
% ORC 16.3 :: Waterbed effect
%
% TUHH :: Institut for Control Systems :: Optimal and Robust Control
% Last update: 30.06.2020
% The following example is borrowed from:
% Skogestad, S. & Postlethwaite, I.
% "Multivariable Feedback Control - Analysis and Design"
% John Wiley & Sons, Ltd. , 2001
clear
clc
close
all
%% Sub-problem a) and b)
% G = tf( 2, [1 1 0] );
% K1 = 0.1; K2 = 1; K3 = 10;
%% Sub-problem c)
G
=
tf
(
[
-
1
2
],[
1
2
0
]
);
K1
=
0.1
;
K2
=
0.5
;
K3
=
1.5
;
%% Open loop transfer function L
L1
=
G
*
K1
;
L2
=
G
*
K2
;
L3
=
G
*
K3
;
figure
()
margin
(
L1
)
hold
on
margin
(
L2
)
margin
(
L3
)
legend
([
'K1='
num2str
(
K1
)],
[
'K2='
num2str
(
K2
)],
[
'K3='
num2str
(
K3
)])
figure
()
nyquist
(
L1
,
'r'
)
hold
on
nyquist
(
L2
,
'g'
)
nyquist
(
L3
,
'b'
)
legend
([
'K1='
num2str
(
K1
)],
[
'K2='
num2str
(
K2
)],
[
'K3='
num2str
(
K3
)])
%% Frequency response Analysis: loop transfer functions
S1
=
feedback
(
1
,
L1
);
T1
=
feedback
(
L1
,
1
);
S2
=
feedback
(
1
,
L2
);
T2
=
feedback
(
L2
,
1
);
S3
=
feedback
(
1
,
L3
);
T3
=
feedback
(
L3
,
1
);
% Plot sensitivity and complementary sensitivity for different designs
figure
()
subplot
(
211
)
sigma
(
S1
,
'r-'
,
S2
,
'g-'
,
S3
,
'b-'
);
title
(
'S'
);
subplot
(
212
)
sigma
(
T1
,
'r-'
,
T2
,
'g-'
,
T3
,
'b-'
);
title
(
'T'
)
legend
([
'K1='
num2str
(
K1
)],
[
'K2='
num2str
(
K2
)],
[
'K3='
num2str
(
K3
)])
figure
()
sigma
(
S1
,
'r-'
,
S2
,
'g-'
,
S3
,
'b-'
,
T1
,
'r-'
,
T2
,
'g-'
,
T3
,
'b-'
);
title
(
'S&T in one plot'
)
%% Time domain analysis
% Step response of the closed loop (Without input disturbance)
figure
()
step
(
T1
,
'r-'
,
T2
,
'g-'
,
T3
,
'b-'
);
legend
([
'K1='
num2str
(
K1
)],
[
'K2='
num2str
(
K2
)],
[
'K3='
num2str
(
K3
)])
%% Sine tracking of the closed loop without input disturbance
t
=
0
:
0.1
:
100
;
% time
u
=
sin
(
0.05
*
t
);
% Step input
figure
()
lsim
(
T1
,
u
',t,'
r
'
)
hold
on
lsim
(
T2
,
u
',t,'
g
'
)
lsim
(
T3
,
u
',t,'
b
'
)
legend
([
'K1='
num2str
(
K1
)],
[
'K2='
num2str
(
K2
)],
[
'K3='
num2str
(
K3
)])
%%
% Sine tracking of the closed loop with input disturbance
t
=
0
:
0.1
:
100
;
% time
u
=
sin
(
0.05
*
t
);
% Step input
d
=
0.05
*
sin
(
1.9
*
t
);
% Input disturbance
ud
=
(
u
+
d
)
'
;
% input=step+noise
figure
()
lsim
(
T1
,
ud
,
t
,
'r'
)
hold
on
lsim
(
T2
,
ud
,
t
,
'g'
)
lsim
(
T3
,
ud
,
t
,
'b'
)
legend
([
'K1='
num2str
(
K1
)],
[
'K2='
num2str
(
K2
)],
[
'K3='
num2str
(
K3
)])
ORC/exercise-files/Exercise_material_SoSe_2021/code/E_17_1.zip
0 → 100644
View file @
836ddc5c
File added
ORC/exercise-files/Exercise_material_SoSe_2021/code/E_17_2.zip
0 → 100644
View file @
836ddc5c
File added
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