Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Distributed Minimax Adaptive Control
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Regler
Distributed Minimax Adaptive Control
Commits
b9bb76b3
Commit
b9bb76b3
authored
Mar 28, 2024
by
Venkatraman Renganathan
Browse files
Options
Downloads
Patches
Plain Diff
Replace DistributedMinimaxAdaptiveControl.m
parent
fb6afbb9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
DistributedMinimaxAdaptiveControl.m
+14
-64
14 additions, 64 deletions
DistributedMinimaxAdaptiveControl.m
with
14 additions
and
64 deletions
DistributedMinimaxAdaptiveControl.m
+
14
−
64
View file @
b9bb76b3
...
...
@@ -358,42 +358,34 @@ hold on;
tvec
=
0
:
T
;
%
Prepare
the
legend
text
for
plotting
i
=
1
;
text
_
1
=
'
$
\
left
\
Vert
x
^
{
\
dagger
}
_
{
';
text
_
2
=
num2str
(
i
)
;
text
_
3
=
'
}
';
text1
=
strcat
(
text
_
1
,
strcat
(
text
_
2
,
text
_
3
))
;
text
_
1
=
'
-
x
^
{
\
star
}
_
{
';
text
_
2
=
num2str
(
i
)
;
text
_
1
=
'
$x
^
{
\
dagger
}
-
x
^
{
\
star
}
$
';
if
(
disturbFlag
==
1
)
text
_
3
=
'
}
\
right
\
|_
{
1
}
$
:
white
noise
$w$
';
text
_
3
=
':
white
noise
$w$
';
elseif
(
disturbFlag
==
2
)
text
_
3
=
'
}
\
right
\
|_
{
1
}
$
:
sinusoidal
$w$
';
text
_
3
=
':
sinusoidal
$w$
';
elseif
(
disturbFlag
==
3
)
text
_
3
=
'
}
\
right
\
|_
{
1
}
$
:
step
$w$
';
text
_
3
=
':
step
$w$
';
end
text2
=
strcat
(
text1
,
strcat
(
text
_
1
,
strcat
(
text
_
2
,
text
_
3
)
))
;
text2
=
strcat
(
text
_
1
,
text
_
3
)
;
legendInfos
{
i
}
=
[
text2
]
;
plot
(
tvec
,
abs
(
x
_
minmax
(
1
,:
)
-
x
_
hinfty
(
1
,:
))
',
'
o
-'
)
;
shadedErrorBar
(
tvec
,
x
_
minmax
-
x
_
hinfty
,
{
@
mean
,@
std
}
,
'
lineprops
','-
b
','
patchSaturation
',
0.33
)
tvec
=
0
:
T
-
1
;
%
Prepare
the
legend
text
for
plotting
i
=
1
;
text
_
1
=
'
$
\
left
\
Vert
u
^
{
\
dagger
}
_
{
';
text
_
2
=
num2str
(
i
)
;
text
_
3
=
'
}
';
text1
=
strcat
(
text
_
1
,
strcat
(
text
_
2
,
text
_
3
))
;
text
_
1
=
'
-
u
^
{
\
star
}
_
{
';
text
_
2
=
num2str
(
i
)
;
text
_
1
=
'
$u
^
{
\
dagger
}
-
u
^
{
\
star
}
$
';
if
(
disturbFlag
==
1
)
text
_
3
=
'
}
\
right
\
|_
{
1
}
$
:
white
noise
$w$
';
text
_
3
=
':
white
noise
$w$
';
elseif
(
disturbFlag
==
2
)
text
_
3
=
'
}
\
right
\
|_
{
1
}
$
:
sinusoidal
$w$
';
text
_
3
=
':
sinusoidal
$w$
';
elseif
(
disturbFlag
==
3
)
text
_
3
=
'
}
\
right
\
|_
{
1
}
$
:
step
$w$
';
text
_
3
=
':
step
$w$
';
end
text2
=
strcat
(
text1
,
strcat
(
text
_
1
,
strcat
(
text
_
2
,
text
_
3
)
))
;
text2
=
strcat
(
text
_
1
,
text
_
3
)
;
legendInfos
{
i
+
1
}
=
[
text2
]
;
plot
(
tvec
,
abs
(
U
_
minmax
(
1
,:
)
-
u
_
hinfty
(
1
,:
))
',
'
o
-'
)
;
shadedErrorBar
(
tvec
,
U
_
minmax
-
u
_
hinfty
,
{
@
mean
,@
std
}
,'
lineprops
','-
r
','
patchSaturation
',
0.33
)
xlabel
(
'
Time
'
)
;
legend
(
legendInfos
,
'
interpreter
',
'
latex
'
)
;
...
...
@@ -406,45 +398,3 @@ set(a, 'FontSize', 50);
%
Convert
matlab
figs
to
tikz
for
pgfplots
in
latex
document
.
matlab2tikz
(
'
figurehandle
',
figure1
,'
filename
','
statesControlsDiff
.
tex
'
,'
standalone
',
true
,
'
showInfo
',
false
)
;
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
%%
Compute
the
cumulative
regret
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
%
Define
design
parameters
.
%
Q
=
eye
(
n
)
;
%
State
penalty
matrix
%
R
=
eye
(
m
)
;
%
Input
penalty
matrix
%
%
%
Initiate
model
based
regret
to
zero
for
each
model
%
cumulativeRegret
=
zeros
(
T
+
1
,
1
)
;
%
%
%
Loop
through
all
finite
set
of
linear
system
models
%
inputSum
=
0
;
%
stateSum
=
0
;
%
%
Loop
through
the
entire
time
horizon
%
for
t
=
1
:
T
+
1
%
%
compute
u
'
Ru
and
add
it
to
control
sum
%
if
(
t
<
T
+
1
)
%
inputSum
=
inputSum
+
(
U
_
minmax
(
:,
t
)
-
u
_
hinfty
(
:,
t
))
'*
R
*
(
U
_
minmax
(
:,
t
)
-
u
_
hinfty
(
:,
t
))
;
%
end
%
%
compute
x
'
Qx
and
add
it
to
state
sum
%
stateSum
=
stateSum
+
(
x
_
minmax
(
:,
t
)
-
x
_
hinfty
(
:,
t
))
'*
Q
*
(
x
_
minmax
(
:,
t
)
-
x
_
hinfty
(
:,
t
))
;
%
%
%
Record
the
regret
incurred
upto
that
time
%
cumulativeRegret
(
t
,
1
)
=
stateSum
+
inputSum
;
%
end
%
%
%%
Plot
the
regret
vs
time
%
Tvec
=
0
:
T
;
%
figure3
=
figure
(
'
Color
',
[
1
1
1
])
;
%
plot
(
Tvec
,
cumulativeRegret
,
'-
ob
'
)
;
%
xlabel
(
'
Time
'
)
;
%
ylabel
(
'
Regret
'
)
;
%
hold
off
;
%
a
=
findobj
(
gcf
,
'
type
',
'
axes
'
)
;
%
h
=
findobj
(
gcf
,
'
type
',
'
line
'
)
;
%
set
(
h
,
'
linewidth
',
4
)
;
%
set
(
a
,
'
linewidth
',
4
)
;
%
set
(
a
,
'
FontSize
',
40
)
;
%
%
%%
Convert
matlab
figs
to
tikz
for
pgfplots
in
latex
document
.
%
matlab2tikz
(
'
figurehandle
',
figure3
,'
filename
','
CumRegret
.
tex
'
,'
standalone
',
true
,
'
showInfo
',
false
)
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment