summaryrefslogtreecommitdiffstats
path: root/templates/compute_tube_controller.m
blob: 2c567f0e249b7009f8d22be790fe858f224a0c3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright (c) 2023, Amon Lahr, Simon Muntwiler, Antoine Leeman & Fabian Flürenbrock Institute for Dynamic Systems and Control, ETH Zurich.
%
% All rights reserved.
%
% Please see the LICENSE file that has been included as part of this package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function K_tube = compute_tube_controller(p,params)
	% YOUR CODE HERE
	Az = params.model.A;
	Bz  =params.model.B;
	% Bz = [params.model.B,eye(params.model.nx)];
	K_tube = -place(Az,Bz,p);
	% K_tube = K(1:params.model.nu,:);
end