Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
rli
pbdlib-matlab
Commits
4d61d33e
Commit
4d61d33e
authored
Jan 15, 2015
by
Sylvain Calinon
Browse files
Distinction of finite/infinite horizon in demos
parent
7972af03
Changes
2
Hide whitespace changes
Inline
Side-by-side
demo_TPGMR_LQR01.m
View file @
4d61d33e
...
...
@@ -58,7 +58,7 @@ model = EM_tensorGMM(Data, model);
%% Reproduction with LQR for the task parameters used to train the model
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
disp
(
'Reproductions with LQR...'
);
disp
(
'Reproductions with
finite-horizon
LQR...'
);
DataIn
=
[
1
:
s
(
1
)
.
nbData
]
*
model
.
dt
;
for
n
=
1
:
nbSamples
%Retrieval of attractor path through task-parameterized GMR
...
...
@@ -69,7 +69,7 @@ end
%% Reproduction with LQR for new task parameters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
disp
(
'New reproductions with LQR...'
);
disp
(
'New reproductions with
finite-horizon
LQR...'
);
for
n
=
1
:
nbRepros
for
m
=
1
:
model
.
nbFrames
%Random generation of new task parameters
...
...
@@ -143,8 +143,6 @@ for n=1:nbRepros
end
axis
(
limAxes
);
axis
square
;
set
(
gca
,
'xtick'
,[],
'ytick'
,[]);
%print('-dpng','outTest1.png');
%Plot additional information
figure
;
%Plot norm of control commands
...
...
@@ -168,6 +166,5 @@ plot(r(n).FF(k,:),'b-','linewidth',2);
legend
(
'ddx feedback'
,
'ddx feedforward'
);
xlabel
(
't'
);
ylabel
([
'ddx_'
num2str
(
k
)]);
%print('-dpng','outTest2.png');
%pause;
%close all;
demo_TPGMR_LQR02.m
View file @
4d61d33e
...
...
@@ -58,7 +58,7 @@ model = EM_tensorGMM(Data, model);
%% Reproduction with LQR for the task parameters used to train the model
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
disp
(
'Reproductions with LQR...'
);
disp
(
'Reproductions with
infinite-horizon
LQR...'
);
DataIn
=
[
1
:
s
(
1
)
.
nbData
]
*
model
.
dt
;
for
n
=
1
:
nbSamples
%Retrieval of attractor path through task-parameterized GMR
...
...
@@ -69,7 +69,7 @@ end
%% Reproduction with LQR for new task parameters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
disp
(
'New reproductions with LQR...'
);
disp
(
'New reproductions with
infinite-horizon
LQR...'
);
for
n
=
1
:
nbRepros
for
m
=
1
:
model
.
nbFrames
%Random generation of new task parameters
...
...
@@ -143,8 +143,6 @@ for n=1:nbRepros
end
axis
(
limAxes
);
axis
square
;
set
(
gca
,
'xtick'
,[],
'ytick'
,[]);
%print('-dpng','outTest1.png');
%Plot additional information
figure
;
%Plot norm of control commands
...
...
@@ -168,6 +166,5 @@ plot(r(n).FF(k,:),'b-','linewidth',2);
legend
(
'ddx feedback'
,
'ddx feedforward'
);
xlabel
(
't'
);
ylabel
([
'ddx_'
num2str
(
k
)]);
%print('-dpng','outTest2.png');
%pause;
%close all;
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