function help = helperstructs()

%% helper_structs

% pumps
help.pumps = {'cyan' 'magenta' 'yellow' 'water' 'sugar'};
help.dp_pump = {'cyan_sensor_dp' 'magenta_sensor_dp' 'yellow_sensor_dp' 'water_sensor_dp' 'sugar_sensor_dp'};
help.level_pump = {'cyan_sensor_fill_level' 'magenta_sensor_fill_level' 'yellow_sensor_fill_level' 'water_sensor_fill_level' 'sugar_sensor_fill_level'};
help.dp_module = {'cyan_module_dp' 'magenta_module_dp' 'yellow_module_dp' 'water_module_dp' 'sugar_module_dp'};
help.speeds = {'cyan_rpm' 'magenta_rpm' 'yellow_rpm' 'water_rpm' 'sugar_rpm'};
help.q_pump = {'cyan_sensor_Q' 'magenta_sensor_Q' 'yellow_sensor_Q' 'water_sensor_Q' 'sugar_sensor_Q'};
help.P_pump = {'cyan_power' 'magenta_power' 'yellow_power' 'water_power' 'sugar_power'};
help.fill_level = {'cyan_sensor_fill_level' 'magenta_sensor_fill_level' 'yellow_sensor_fill_level' 'water_sensor_fill_level' 'sugar_sensor_fill_level'};
help.pump_wear = {'cyan_pump_wear' 'magenta_pump_wear' 'yellow_pump_wear' 'water_pump_wear' 'sugar_pump_wear'};
help.module_clogging = {'cyan_module_clogging' 'magenta_module_clogging' 'yellow_module_clogging' 'water_module_clogging' 'sugar_module_clogging'};
help.module_widening = {'cyan_module_widening' 'magenta_module_widening' 'yellow_module_widening' 'water_module_widening' 'sugar_module_widening'};
help.sens_dp_pump_high = {'cyan_sens_dp_pump_high' 'magenta_sens_dp_pump_high' 'yellow_sens_dp_pump_high' 'water_sens_dp_pump_high' 'sugar_sens_dp_pump_high'};
help.sens_dp_pump_low = {'cyan_sens_dp_pump_low' 'magenta_sens_dp_pump_low' 'yellow_sens_dp_pump_low' 'water_sens_dp_pump_low' 'sugar_sens_dp_pump_low'};

%mixers
help.mixers = {'mixer1' 'mixer2'};
help.dp_mixer = {'mixer1_sensor_dp' 'mixer2_sensor_dp'};
help.q_mixer = {'mixer1_sensor_Q' 'mixer2_sensor_Q'};
help.mixer_clogging = {'mixer1_mixer_clogging' 'mixer2_mixer_clogging'};
help.mixer_widening = {'mixer1_mixer_widening' 'mixer2_mixer_widening'};
help.sens_dp_mix_high = {'mixer1_sens_dp_mix_high' 'mixer2_sens_dp_mix_high'};
help.sens_dp_mix_low= {'mixer1_sens_dp_mix_low' 'mixer2_sens_dp_mix_low'};

help.modules = [help.pumps help.mixers];

% topology
help.pump_downstream = {'mixer2' 'mixer2'; 'mixer2' 'mixer2'; 'mixer2' 'mixer2'; 'mixer1' 'mixer2'; 'mixer1' 'mixer2'};
help.pump_parallel = {'magenta' 'yellow' 'magenta' 'yellow'; 'cyan' 'yellow' 'cyan' 'yellow'; 'cyan' 'magenta' 'cyan' 'magenta'; 'cyan' 'magenta' 'yellow' 'sugar'; 'cyan' 'magenta' 'yellow' 'water'};
help.mixer_upstream.mixer1 = {'water' 'sugar'};
help.mixer_upstream.mixer2 = {'cyan' 'magenta' 'yellow' 'water' 'sugar'};
help.mixer_upstream_corr.mixer1 = {'sugar'};
help.mixer_upstream_corr.mixer2 = {'cyan' 'magenta' 'yellow' 'sugar'};
% adjancency matrix: modules nxn Matrix with a 1 for connection and 0 for
% no connection between two modules
help.adjancency = [0 0 0 0 0 0 1; 0 0 0 0 0 0 1; 0 0 0 0 0 0 1;...
    0 0 0 0 0 1 1; 0 0 0 0 0 1 1; 0 0 0 1 1 0 0; 1 1 1 1 1 0 0];


% faults
help.fault.cyan = {'pump_wear' 'module_clogging' 'module_widening' 'sens_dp_pump_low' 'sens_dp_pump_high' 'sens_P_pump_low' 'sens_P_pump_high'};
help.fault.magenta = {'pump_wear' 'module_clogging' 'module_widening' 'sens_dp_pump_low' 'sens_dp_pump_high' 'sens_P_pump_low' 'sens_P_pump_high'};
help.fault.yellow = {'pump_wear' 'module_clogging' 'module_widening' 'sens_dp_pump_low' 'sens_dp_pump_high' 'sens_P_pump_low' 'sens_P_pump_high'};
help.fault.water = {'pump_wear' 'module_clogging' 'module_widening' 'sens_dp_pump_low' 'sens_dp_pump_high' 'sens_P_pump_low' 'sens_P_pump_high'};
help.fault.sugar = {'pump_wear' 'module_clogging' 'module_widening' 'sens_dp_pump_low' 'sens_dp_pump_high' 'sens_P_pump_low' 'sens_P_pump_high'};
help.fault.mixer1 = {'mixer_clogging' 'mixer_widening' 'sens_dp_mix_low' 'sens_dp_mix_high'};
help.fault.mixer2 = {'mixer_clogging' 'mixer_widening' 'sens_dp_mix_low' 'sens_dp_mix_high'};

faults = [];
for i_module = 1:length(help.modules)
    for i_fault = 1:length(help.fault.(help.modules{i_module}))
        fault_name = {[help.modules{i_module} '_' help.fault.(help.modules{i_module}){i_fault}]};
        faults =[faults fault_name];
    end
end

help.faults = faults;

help.fault_titles.cyan = {'PUMP WEAR' 'MODULE CLOGGING' 'MODULE WIDENING' 'SENSOR FAULT dp pump LOW' 'SENSOR FAULT dp pump HIGH' 'SENSOR FAULT P pump LOW' 'SENSOR FAULT P pump HIGH'};
help.fault_titles.magenta = {'PUMP WEAR' 'MODULE CLOGGING' 'MODULE WIDENING' 'SENSOR FAULT dp pump LOW' 'SENSOR FAULT dp pump HIGH' 'SENSOR FAULT P pump LOW' 'SENSOR FAULT P pump HIGH'};
help.fault_titles.yellow = {'PUMP WEAR' 'MODULE CLOGGING' 'MODULE WIDENING' 'SENSOR FAULT dp pump LOW' 'SENSOR FAULT dp pump HIGH' 'SENSOR FAULT P pump LOW' 'SENSOR FAULT P pump HIGH'};
help.fault_titles.water = {'PUMP WEAR' 'MODULE CLOGGING' 'MODULE WIDENING' 'SENSOR FAULT dp pump LOW' 'SENSOR FAULT dp pump HIGH' 'SENSOR FAULT P pump LOW' 'SENSOR FAULT P pump HIGH'};
help.fault_titles.sugar = {'PUMP WEAR' 'MODULE CLOGGING' 'MODULE WIDENING' 'SENSOR FAULT dp pump LOW' 'SENSOR FAULT dp pump HIGH' 'SENSOR FAULT P pump LOW' 'SENSOR FAULT P pump HIGH'};
help.fault_titles.mixer1 = {'MIXER CLOGGING' 'MIXER WIDENING' 'SENSOR FAULT dp mix LOW' 'SENSOR FAULT dp mix HIGH'};
help.fault_titles.mixer2 = {'MIXER CLOGGING' 'MIXER WIDENING' 'SENSOR FAULT dp mix LOW' 'SENSOR FAULT dp mix HIGH'};

help.fehler_titel.cyan = {'LECKAGE' 'MODULZUSETZEN' 'MODULAUFWEITEN' 'PUMPENDRUCK NIEDRIG' 'PUMPENDRUCK HOCH' 'LEISTUNG NIEDRIG' 'LEISTUNG HOCH'};
help.fehler_titel.magenta = {'LECKAGE' 'MODULZUSETZEN' 'MODULAUFWEITEN' 'PUMPENDRUCK NIEDRIG' 'PUMPENDRUCK HOCH' 'LEISTUNG NIEDRIG' 'LEISTUNG HOCH'};
help.fehler_titel.yellow = {'LECKAGE' 'MODULZUSETZEN' 'MODULAUFWEITEN' 'PUMPENDRUCK NIEDRIG' 'PUMPENDRUCK HOCH' 'LEISTUNG NIEDRIG' 'LEISTUNG HOCH'};
help.fehler_titel.water = {'LECKAGE' 'MODULZUSETZEN' 'MODULAUFWEITEN' 'PUMPENDRUCK NIEDRIG' 'PUMPENDRUCK HOCH' 'LEISTUNG NIEDRIG' 'LEISTUNG HOCH'};
help.fehler_titel.sugar = {'LECKAGE' 'MODULZUSETZEN' 'MODULAUFWEITEN' 'PUMPENDRUCK NIEDRIG' 'PUMPENDRUCK HOCH' 'LEISTUNG NIEDRIG' 'LEISTUNG HOCH'};
help.fehler_titel.mixer1 = {'MISCHERZUSETZEN' 'MISCHERAUFWEITEN' 'MISCHERDRUCK NIEDRIG' 'MISCHERDRUCK HOCH'};
help.fehler_titel.mixer2 = {'MISCHERZUSETZEN' 'MISCHERAUFWEITEN' 'MISCHERDRUCK NIEDRIG' 'MISCHERDRUCK HOCH'};


fault_names = [];
fehler_namen = [];
for i_module = 1:length(help.modules)
    for i_fault = 1:length(help.fault_titles.(help.modules{i_module}))
        fault_name = {[help.modules{i_module} ' ' help.fault_titles.(help.modules{i_module}){i_fault}]};
        fehler_name = {[help.modules{i_module} ' ' help.fehler_titel.(help.modules{i_module}){i_fault}]};
        fault_names =[fault_names fault_name];
        fehler_namen =[fehler_namen fehler_name];
    end
end

help.fault_names = fault_names;


% residuals
help.residuals =  {'cyan_R_pump_plant' 'cyan_R_power_plant' 'cyan_R_power_pump'...
    'magenta_R_pump_plant' 'magenta_R_power_plant' 'magenta_R_power_pump' ...
    'yellow_R_pump_plant' 'yellow_R_power_plant' 'yellow_R_power_pump' ...
    'water_R_pump_plant' 'water_R_power_plant' 'water_R_power_pump' ...
    'sugar_R_pump_plant' 'sugar_R_power_plant' 'sugar_R_power_pump' ...
    'mixer1_R_pump_resis' 'mixer1_R_plant_resis' 'mixer1_R_power_resis'...
    'mixer2_R_pump_resis' 'mixer2_R_plant_resis' 'mixer2_R_power_resis'};

help.residual_names =  {'cyan R pump plant' 'cyan R power plant' 'cyan R power pump'...
    'magenta R pump plant' 'magenta R power plant' 'magenta R power pump' ...
    'yellow R pump plant' 'yellow R power plant' 'yellow R power pump' ...
    'water R pump plant' 'water R power plant' 'water R power pump' ...
    'sugar R pump plant' 'sugar R power plant' 'sugar R power pump' ...
    'mixer1 R pump resis' 'mixer1 R plant resis' 'mixer1 R power resis'...
    'mixer2 R pump resis' 'mixer2 R plant resis' 'mixer2 R power resis'};

help.diss_residuals =  {'R_{pump-plant}^{A}' 'R_{power-plant}^{A}' 'R_{power-pump}^{A}'...
    'R_{pump-plant}^{B}' 'R_{power-plant}^{B}' 'R_{power-pump}^{B}' ...
    'R_{pump-plant}^{C}' 'R_{power-plant}^{C}' 'R_{power-pump}^{C}' ...
    'R_{pump-plant}^{E}' 'R_{power-plant}^{E}' 'R_{power-pump}^{E}' ...
    'R_{pump-plant}^{D}' 'R_{power-plant}^{D}' 'R_{power-pump}^{E}' ...
    'R_{pump-resis}^{M1}' 'R_{plant-resis}^{M1}' 'R_{power-resis}^{M1}'...
    'R_{pump-resis}^{M2}' 'R_{plant-resis}^{M2}' 'R_{power-resis}^{M2}'};

% observers
help.pump_model = {'pump_cyan' 'pump_magenta' 'pump_yellow' 'pump_water' 'pump_sugar'};
help.power_model = {'power_cyan' 'power_magenta' 'power_yellow' 'power_water' 'power_sugar'};

% Colormap
map = zeros(256,3);
for i= 1:256
    map(i,:) = [256-i 256-i 256-i]/255;
end
help.map = map;

end
