29.09.2014 Views

Casestudie Breakdown prediction Contell PILOT - Transumo

Casestudie Breakdown prediction Contell PILOT - Transumo

Casestudie Breakdown prediction Contell PILOT - Transumo

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

%Name and location of the source file<br />

unit = 1;<br />

filename = strcat('Channel', int2str(unit), '.csv');<br />

path = 'C:\Dokumente und Einstellungen\Christian\Eigene<br />

Dateien\Dokumente\Studium\Diplomarbeit\Monitoring Data Nijmegen<br />

(Converted)\';<br />

%Import Dataset<br />

import = importdata(strcat(path, filename));<br />

%Create Datevector (as serial date number):<br />

date = datenum(import.textdata(:,1), 'dd-mm-yy HH:MM:SS');<br />

%Import Interpolated Data from Disk<br />

interpolation = importdata(strcat(path, filename, '- Interpolated.txt'));<br />

%Definition of a Second<br />

second = 1/(24*60*60);<br />

%Definition of a Minute (For Performance Reasons)<br />

minute = 1/(60*24);<br />

%Definition of Day- and Nighttime<br />

daybegin = (1/24)*6;<br />

dayend = (1/24)*22;<br />

%Start (Index of the imported data)<br />

%1 = Begin of imported file, add 1440 per Day<br />

start = 1 + 7*1440;<br />

%Self defined limits:<br />

upperLimit = 6;<br />

lowerLimit = 2;<br />

DoorOffset = 3; %Offset in Minutes<br />

%Determine Number of Occured Alarms<br />

%-----using the Original Limits!-----<br />

%Contains Date and Information, which Kind of Alarm<br />

%(1 = Above High Temperature Border; -1 = Below Low Temperature Border)<br />

%and Duration<br />

%Contains: [Date, Type of Alarm, Duration, Maximum Temperature]<br />

AlarmsOL = [];<br />

Alarmbefore = 0;<br />

Duration = 0;<br />

maxtemp = 0;<br />

for i = start:length(interpolation(:,1));<br />

if (interpolation(i,2) >= interpolation(i,5)) && (Alarmbefore == 0);<br />

%Get Duration<br />

k = i;<br />

while (k =<br />

interpolation(k,5));<br />

k = k + 1;<br />

end<br />

Duration = k - i;<br />

maxtemp = max(interpolation(i:k,2));<br />

AlarmsOL = [AlarmsOL; [interpolation(i,1), 1, Duration, maxtemp]];<br />

Alarmbefore = 1;<br />

A-128

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!