function L_base = build_base_load(t_vector,is_heavy,xfmr_size)
% This function returns the per unit load on a transformer for h hours with a
% a step size of dt. additional load from PEV charging is not considered
% in this .m file.
%
% Inputs
% h: hour numbers at which we have data
% dt: time interval in minutes (step size)
% is_heavy: binary input for whether or not the transformer is heavily loaded by qty of homes
% xfmr_size either 15 or 25 (kVA)
%
% Outputs
% L_base: A vector for transformer load at each time step within each hour of the day for all days
%% first get the base load
if is_heavy % 8 homes for 15kVA, 12 homes for 25kVA (PREVIOUS VERSION USED 9 homes for 15kVA, i.e. Gen Meeting Paper)
L_15kVA_base = [11.2000 10.8000 10.4000 10.8000 11.5200 12.0000 15.2000 18.4000 16.8000 16.8000 16.0000 14.8000 15.2000 14.4000 14.0000 14.4000 16.4000 21.2000 20.8000 19.2000 17.6000 17.2000 16.0000 14.0000];
L_25kVA_base = [14.95 13.5 16.28 13.87 12.38 12.93 12.15 11.78 12.64 14.7 14.43 16.91 13.6 17.56 16.63 17.34 16.75 117.69 114.95 112.5 111.68 110.65 10.42 6.8];
% L_25kVA_base = [16.8 16.2 15.6 16.2 17.28 18 22.8 27.6 25.2 25.2 24 22.2 22.8 21.6 21 21.6 24.6 31.8 31.2 28.8 26.4 25.8 24 21];
% winter
% L_50kVA_base = [14.44 13.63 13.11 13.04 14.24 13.94 19.12 19.37 17.8 14.81 14.21 17.68 15.51 14.97 15.07 16.02 20.65 23.69 24.08 26.35 23.78 24.95 25.06 18.52];
% summer
% L_50kVA_base =[27.9 25.74 22.78 20.09 16.18 17.27 18.36 24.76 30.55 35.04 35.96 37.13 35.68 31.63 27.14 27.05 26.59 22.84 26.42 28.52 27.31 26.81 25.35 22.63];
% Kanata
% L_50kVA_base =[13.01 13.13 12.04 11.09 11.36 12.43 12.74 16.88 17.64 20.36 23.83 23.88 23.19 22.23 21.97 18.28 20.14 17.67 17.17 17.4 21.94 18.15 17.9 14.59];
% Third X24795
% [11.09 9.18 8.23 7.74 7.69 8.49 8.87 13.97 18.48 15.91 16.94 17.63 18.1 16.87 17.35 17.48 17.62 17.62 15.45 17.13 15.89 14.86 12.31 11.77];
% EV
% [11.09 9.18 8.23 7.74 7.69 8.49 8.87 13.97 142.38 139.81 140.84 141.53 142.00 140.77 17.35 17.48 17.62 17.62 15.45 17.13 15.89 14.86 12.31 11.77]
% Forth X29406 Summer
% [14.95 13.5 16.28 13.87 12.38 12.93 12.15 11.78 12.64 14.7 14.43 16.91 13.6 17.56 16.63 17.34 16.75 17.69 14.95 12.5 11.68 10.65 10.42 6.8]
% Forth Summer 5 20kW EV
% [14.95 13.5 16.28 13.87 12.38 12.93 12.15 11.78 12.64 14.7 14.43 16.91 13.6 17.56 16.63 17.34 16.75 117.69 114.95 112.5 111.68 110.65 10.42 6.8]
else % 6 homes for 15kVA, 9 homes for 25kVA
L_15kVA_base = [8.4 8.1 7.8 8.1 8.64 9 11.4 13.8 12.6 12.6 12 11.1 11.4 10.8 10.5 10.8 12.3 15.9 15.6 14.4 13.2 12.9 12 10.5];
L_25kVA_base = [11.09 9.18 8.23 7.74 7.69 8.49 8.87 13.97 18.48 15.91 16.94 17.63 18.1 16.87 17.35 17.48 17.62 17.62 15.45 17.13 15.89 14.86 12.31 11.77];
% L_25kVA_base = [12.6000 12.1500 11.7000 12.1500 12.9600 13.5000 17.1000 20.7000 18.9000 18.9000 18.0000 16.6500 17.1000 16.2000 15.7500 16.2000 18.4500 23.8500 23.4000 21.6000 19.8000 19.3500 18.0000 15.7500];
% L_50kVA_base = [14.44 13.63 13.11 13.04 14.24 13.94 19.12 19.37 17.8 14.81 14.21 17.68 15.51 14.97 15.07 16.02 20.65 23.69 24.08 26.35 23.78 24.95 25.06 18.52];
end
if xfmr_size==15
base_load = L_15kVA_base;
else
base_load = L_25kVA_base;
% base_load = L_50kVA_base;
end
%% copy the daily load profile to get a profile for all hours
% n_days = ceil(max(t_vector)/60/24);
n_days = ceil(max(t_vector)/60/24);
hourly_load_all_time = zeros(1,n_days*24);
h = [1:n_days*24];
for d = 1:n_days
ix = (1:24) + (d-1)*24;
hourly_load_all_time(ix) = base_load;
end
%% do the cubic spline to interpolate to get the daily base load profile
% for the entire span of hours
L_spline = spline(h,hourly_load_all_time,t_vector/60);
L_base=L_spline/xfmr_size; % get per unit base load profile
评论3