83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
if !struct_contains(p_c,"Method")
p_c.Method = "lq";
endif
if struct_contains(p_c,"Method")
if strcmp(p_c.Method,"lq")
p_c.Q = eye(n_y);
p_c.R = (0.1^2)*eye(n_u);
p_c.n_U = n_x;
elseif strcmp(p_c.Method,"original");
if !struct_contains(p_c,"A_w")
p_c.A_w = 0;
endif
if !struct_contains(p_c,"A_u")
p_c.n_U = n_x;
a_u = 2.0;
|
>
>
|
|
|
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
if !struct_contains(p_c,"Method")
p_c.Method = "lq";
endif
if struct_contains(p_c,"Method")
if strcmp(p_c.Method,"lq")
p_c.Q = eye(n_y);
p_c.n_U = n_x;
if !struct_contains(p_c,"R")
p_c.R = (0.1^2)*eye(n_u);
endif
elseif strcmp(p_c.Method,"original");
if !struct_contains(p_c,"A_w")
p_c.A_w = 0;
endif
if !struct_contains(p_c,"A_u")
p_c.n_U = n_x;
a_u = 2.0;
|