forked from roahmlab/koopman-realizations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Kmpc_setup.m
18 lines (17 loc) · 858 Bytes
/
Kmpc_setup.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
% Kmpc_setup.m
%
% Creates an instance of the Kmpc class bases on user arguments.
% Must have a Ksysid class in the workspace for this to work
Kmpc = Kmpc( Ksysid ,...
'horizon' , 10 ,...
'input_bounds' , [ -7*pi/8 , 7*pi/8 ] ,...
'input_slopeConst' , 1e-1 ,...
'input_smoothConst' , [] ,... % [1e-1] ,...
'state_bounds' , [] ,...
'cost_running' , 10 ,... % 0.1
'cost_terminal' , 100 ,... % 100
'cost_input' , 0.1 * [ 3e-2 , 2e-2 , 1e-2 ]' ,... % 1e-1
'projmtx' , Ksysid.model.C(end-1:end,:) ); %,... % just end effector
% 'mpc_type' , 'nonlinear' ,... % only need specify if you want to do nonlinear mpc with a bilinear model
% 'load_obs_horizon' , 40 ,... % only needed for loaded models
% 'load_obs_period' , 20 ); % only needed for loaded models