0

I have data stored for N=1000 elements (air conditioners, ACs).

Each element has a number of characteristics, mainly their temperature, and the binary state of the ON/OFF switch. All this data is already generated and stored in the following way:

  • Each AC is an entry in a cell array.
  • Each AC has a different deadband temperature limits_deadband (this is an entry of the upper cell array).
  • For the temperature I have another cell array with a vector from a simulation, of dimension 8641x1.
  • For the ON/OFF binary state I have another cell array with a vector from a simulation, of dimension 8641x1.

What I would like to generate is the following:

  • Divide limits_deadband for each AC into N/2 bins (say 20 for example).
  • Then use N to represent the temperature and the ON/OFF status.
  • Plot the number of ACs in each bin and ON/OFF status over the measured 8641 data points.

What I have so far:

load(['my_data.mat']);

%% 1) Divide the deadband of each EWH into N_bin bins
%
% number of bins
N_bin = 20;

limits_deadband = cell(1,1000);
ON_OFF_state = cell(1,1000);
for ii = 1:1000
    % get the limits for the 20 bins of the deadband
    limits_deadband{ii} = linspace(0,Params.T_dead(:,:,ii),N_bin + 1);
    % add the temperature set-point
    limits_deadband{ii} = limits_deadband{ii} + Params.T_set(:,:,ii);

    % ON/OFF state of the internal switch for an entire day
    ON_OFF_state{ii} = Results_comparison.urec(1,:,ii);
end

limits_deadband are the edges of the bins in which I would like to store the temperatures. ON_OFF_state gives the state.

Any ideas on how to plot this properly? I thought using histogram, but not sure on how to do this.

titus.andronicus
  • 517
  • 1
  • 7
  • 19
  • Output should roughly look like this for each individual AC? `hist(rand(30,2));legend({'on','off'});xlabel('temperature');` – Daniel Mar 27 '15 at 10:14
  • @Daniel well, that's another question. I could either do it as you suggest, generating such a plot as you suggested every 30 minutes/1 hour (basically sampling the `8641` points of the simulation), OR doing a 3D plot out of it (temp vs. ON/OFF status vs. time) – titus.andronicus Mar 27 '15 at 10:19
  • @Daniel major issue for me is also the **classification** of the data into the bin edges and ON/OFF states – titus.andronicus Mar 27 '15 at 10:21

0 Answers0