I want to use co-simulation between Energy plus and Simulink. my controller is MPC type,so I need to define its properties in workspace, and then use from it in simulink,so I define this code in simulateAndExit m-file, and then run bcvtb. Now I want to know that is this method correct?
my simulateAndExit:
Ts=2;
A=[-9.9715 11.3176;0.2972 -4.9608];
B=[-4.1442;0.0395];
C=[1.0e+04 *0.0157 1.0e+04 *(-1.8878);1.0e+04 *(-0.0002) 1.0e+04 *0.0001];
D=[0;0];
model=ss(A,B,C,D,Ts);
p=10;
m=5;
MPCobj=mpc(model,Ts,p,m);
addpath([getenv('BCVTB_HOME'), 'E:\bcvtb\lib\matlab']);
sim('controller');
quit;
Thanks.