init.m 573 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
zetaVariant = 0;

f_hf = 30;
f_lf = f_hf/2;
h_hf = 1/f_hf;
h_lf = 1/f_lf;
N_lf = 10;
N_hf = 2*N_lf;
mpc_mode = 1; % 1 = A, 2 = B, 3 = C

rng(1);

SysC = sysmodel();
Qc = diag([1500 20 0]);
Rc = 1;

[Kc, Sc, Ec] = lqr(SysC, Qc, Rc);
LQc = ss(SysC.A-SysC.B*Kc, SysC.B, SysC.C, 0);
[SysD, Qd, Rd, Nd, Kd, Sd] = getdlq(SysC, Qc, Rc, h_hf);

t = 10;
xinit = [0 0 0];
simtime = h_hf * [0:1/h_hf * t] - 1/60;
simin_ref = [simtime; ones(1, length(simtime))*8]';
simin_drop = [simtime; zeros(1, length(simtime))]';
simin_au = [simtime; zeros(3,length(simtime))]';

experiment = {};