Remaining Usefull Time - Predict RUL not working on ThingSpeak

1 次查看(过去 30 天)
I can succesfulkly run the code on Matlab but ,it shows error while running on ThingSpeak.
I really dont understan whats wrong, can you help me
error i am getting on Thingspeak Matlab Analysis
Warning: While loading an object of class 'linearDegradationModel':
Unrecognized field name "AlphaLevel".
> In MATLABAnalysis>getValues (line 50)
In MATLABAnalysis (line 34)
Error using rulModel/predictRUL (line 269)
Operands to the logical and (&&) and or (||) operators must be convertible to logical scalar values.
Error in MATLABAnalysis>getValues (line 62)
[estTTS, CITTS, pdfTTS] = predictRUL(T.mdl{failureMode},[-NaN healthIndicator],threshold);
Error in MATLABAnalysis (line 34)
[estTTS,healthIndicator,threshold,EmailAlertFlag] = getValues(features, out,dropBoxAccessToken, IFTTTURL, secondChID,thresholdTTS,labels,secondReadAPIKey) %Get the others values to be written on
second channel
  3 个评论
Aniket Manjare
Aniket Manjare 2021-4-21
Sure,
Well My project is Condition based predictive Maintenece of Motor by Vibration signal Analysis tecniques. our aim is to real time fault identification and predict the threshold before that need to be taken action by maintenece team.
function [estTTS,healthIndicator,threshold,EmailAlertFlag] = getValues(features, out,dropBoxAccessToken, IFTTTURL, secondChID,thresholdTTS,labels,readKey)
if(out == 0 || out == 1) %Don't need Predictive Maintenance during normal operation
estTTS = NaN;
healthIndicator = NaN;
threshold = NaN;
else
rawdata = downloadFromDropbox(dropBoxAccessToken,'Fan TTS Model.mat');
f = fopen('Fan TTS Model.mat','w');
fwrite(f,rawdata);
fclose(f);
T = load('Fan TTS Model.mat');
failureMode = out - 1 ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 to 0 then dutct block work
if(out ==2)
failureMode = 2;
else
failureMode = out - 1;
end
if(length(T.selectedFeatures{failureMode})==1)
healthIndicator = table2array(features(:,T.selectedFeatures{failureMode}));
threshold = T.threshold{failureMode};
[estTTS, CITTS, pdfTTS] = predictRUL(T.mdl{failureMode},[-NaN healthIndicator],threshold);
estTTS = estTTS*T.conversion{failureMode};
CITTS = CITTS*T.conversion{failureMode};
pdfTTS.TTS = pdfTTS.RUL*T.conversion{failureMode};
else
selectedFeatures = features(:,T.selectedFeatures{failureMode});
healthIndicator = (selectedFeatures{:,:} - T.meanTrain{failureMode}) ./ T.sdTrain{failureMode} * T.pcaCoeff{failureMode}(:, 1);
threshold = T.threshold{failureMode};
[estTTS, CITTS, pdfTTS] = predictRUL(T.mdl{failureMode},[-NaN healthIndicator],threshold);
estTTS = estTTS*T.conversion{failureMode};
CITTS = CITTS*T.conversion{failureMode};
pdfTTS.TTS = pdfTTS.RUL*T.conversion{failureMode};
end
end
end
ricardo arias
ricardo arias 2021-9-30
编辑:ricardo arias 2021-9-30
Can I use your code to predict the RUL with a file like this:
Only for VelB2 (Velocity in Bearing 2, in in/s). Threshold 0.351 in/s.
Could you help me with this??
Thanks

请先登录,再进行评论。

回答(0 个)

社区

更多回答在  ThingSpeak Community

类别

Help CenterFile Exchange 中查找有关 Food Sciences 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by