-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathControlSIM.m
More file actions
29 lines (21 loc) · 791 Bytes
/
Copy pathControlSIM.m
File metadata and controls
29 lines (21 loc) · 791 Bytes
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
29
% Specify and initialize environment's necessary properties
V = 4000; %Volume of air in greenhouse, m^3
U = 4; %heat transfer coefficient W/(Km^2)
A = 1000; %Surface area of greenhouse, m^2
rho = 1.2; %Density of air, kg/m^3
Cp = 1006; %specific heat of air, J/kgK
gamma = 2257; %latent heat of vaporization, J/g
alpha = 0.125; %leaf cover coefficient
T_out_eq = 19.2763;
Si_eq = 143.6157;
u1_eq = 50000;
u2_eq = 0;
T_in_eq = T_out_eq + (Si_eq/U)+((u1_eq-gamma*u2_eq)/(U*A));
dfdx1 = -((U*A)/(rho*V*Cp));
dfdu1 = 1/(rho*V*Cp);
dfdu2 = gamma/(rho*V*Cp);
Amat = dfdx1;
Bmat = [dfdu1];
Cmat = [1];
Dmat = [0];
sys = ss(Amat,Bmat,Cmat,Dmat)