├── API.html ├── Condition Indicator └── phaseSpaceReconstruction.jpg ├── DataProcessing ├── classificationLearnerSession.PNG ├── dataVisualization.png ├── exportFeature.PNG ├── featuresRanking.PNG ├── featuresRanking1.PNG ├── importData.png ├── powerSpec.png ├── powerSpecPressure.png ├── powerSpecSpecification.PNG ├── predictive_maintenance_workflow.png ├── result.PNG ├── timeDomainFeatures.PNG ├── timeDomainFeatures1.PNG ├── timeDomainFeatures2.PNG ├── timeDomainFeatures3.PNG └── viewFeature.PNG ├── Examples_slides ├── example1.html ├── example10.html ├── example11.html ├── example12.html ├── example13.html ├── example14.html ├── example15.html ├── example16.html ├── example17.html ├── example2.html ├── example3.html ├── example4.html ├── example5.html ├── example6.html ├── example7.html ├── example8.html └── example9.html ├── HIDesign ├── APP_1.PNG ├── APP_2.PNG ├── ARXmodel.PNG ├── BaggingModel.PNG ├── CentrifugalPumpFaultDiagnosisUsingResidualAnalysisExample_04.png ├── HITendence.png ├── LPV_pump_pipe.slx ├── LPV_pump_pipe.slxc ├── anomalyResultHead.PNG ├── anomalyResultTorque.PNG ├── bagError.png ├── bearingData.png ├── defectDepth.png ├── defectSpec.png ├── dynamicPipeEst.m ├── dynamicPumpModel.png ├── dynamicPumpPipeModel.png ├── ellipsoidWithPoint.png ├── ellipsoidWithPointAndLines.png ├── ellipsoidWithoutPoint.png ├── featuresPlot.png ├── finalModel.PNG ├── forecaseValue.png ├── forecastValueToEnd.png ├── headConfusionMaxtrix.png ├── healthPumpDeliveryHead.png ├── healthSpec.png ├── healthyEnsemble.png ├── helperAddDistanceLines.m ├── helperComputeEnsembleResidues.m ├── helperGenerateFeatureTable.m ├── helperPlotConfidenceEllipsoid.m ├── helperPlotHistogram.m ├── helperPlotSVM.m ├── identifyNonlinearARXModel.m ├── initMeanPeakFreq.png ├── inversePumpModel.png ├── linearFit.m ├── middleFilteredSpec.png ├── middleSpec.png ├── misclassification.png ├── multiPumpDeliveryHead.png ├── oneClassSVM4H.png ├── oneClassSVM4K.png ├── paraDistributionHead.png ├── paraDistributionTorque.png ├── paraEstimated.PNG ├── paraEstimatedK.PNG ├── probaDistribution.png ├── pumpModeLikelihoodTest.m ├── pumpSpeed.png ├── residualAR.png ├── residualPlot.png ├── residueFeatures.PNG ├── selectedFeaturePlot.png ├── selectedFeatureSensorBiasPlot.png ├── sensorBiasModel.png ├── simulatePumpPipeModel.m ├── staticPumpEst.m ├── staticPumpModel.png ├── sysPara.PNG ├── systemFlow.png ├── testDataPreview.PNG └── torqueConfusionMaxtrix.png ├── MATLAB Predictive Maintenance Toolbox Introduction.md ├── MATLAB Predictive Maintenance Toolbox Introduction.pdf ├── README.md ├── TSA ├── FindAndVisualizeTheDifferenceSignalOfACompoundTSASignalExample_02.png ├── FindAndVisualizeTheRegularSignalOfACompoundTSASignalExample_02.png └── FindAndVisualizeTheResidualOfATSASignalExample_02.png ├── algo_dev ├── BatteryIndicatorSignal.png ├── BatteryMeasurement.PNG ├── BatterySimscapeMDL.jpg ├── BatteryStateTransition.PNG ├── BatteryUKF.PNG ├── EFKperformance.png ├── EFKperformance3sigma.png ├── EFKperformanceError.png ├── EFKperformanceVelocityAccl.png ├── EKFResult.PNG ├── EKFResultBoundary.png ├── EKFResultKurtosis.png ├── Housing_Default_sldprt.STEP ├── Manifold_Default_sldprt.STEP ├── MathworksVibrationModel.PNG ├── MathworksVibrationModelCasing.PNG ├── MathworksVibrationModelGearToothFault.PNG ├── MathworksVibrationModelOuputShaft.PNG ├── MathworksVibrationModelSensorShift.PNG ├── MathworksVibrationModelShaft.PNG ├── RollingElementBearingFaultDiagnosisExample.mlx ├── RollingElementBearingFaultDiagnosisExample.png ├── SOCEstiamtion.png ├── SWClassifierHisto.png ├── SimulationLog.PNG ├── TachoPulses.png ├── UKFSpecification.PNG ├── VibrationSignalsEvery10.png ├── VibrationSpectrum.png ├── VibrationTimeSyncAverage.png ├── allDataVisual.png ├── analyzeData.m ├── bearingFeatureExtraction.m ├── classifyTF.PNG ├── classifyTFHisto.png ├── confusionMatrixTransmission.png ├── dAmplitudeDataScatter.png ├── dataOverview.PNG ├── ensObject.PNG ├── ensObjectVariables.PNG ├── ensembleDataObject.PNG ├── ensembleTestData.PNG ├── envAnalysisLocal.png ├── envSpecAfterFilter.png ├── envSpecOutRaceFault.png ├── featureData.PNG ├── featureData.mat ├── featureTableTrain.PNG ├── fileEnsembleDataStores.PNG ├── frequencyBandResult.png ├── helperPlotCombs.m ├── helperSpectrogramAndSpectralKurtosis.m ├── linearKFPara_1.PNG ├── linearKFPara_2.PNG ├── logRatioAmplitude.png ├── logRatioAmplitudeTest.png ├── mech_hydro_forcesPS_lib.slx ├── otherModesEnv.png ├── otherOutFaultEnv.png ├── pdmMotorModelMeasJacobianFcn.m ├── pdmMotorModelMeasurementFcn.m ├── pdmMotorModelStateFcn.m ├── pdmMotorModelStateJacobianFcn.m ├── pdmTransmissionCasing.slxc ├── prepareData.m ├── rawSignalEnvSpectrum.png ├── rawSignalIRF.png ├── rawSignalPowerSpectrum.png ├── rawSignalPowerSpectrumZoomed.png ├── readMFPTBearing.m ├── sdataProperty.PNG ├── sensorDriftFeatureClassifySD.PNG ├── sensorDriftFeatureHistogram.png ├── sensorDriftFeatureWeights.PNG ├── shaftWearClassifySW.PNG ├── shaftWearFeatureWeights.PNG ├── sm_pump_triplex_Crank_IMAGE.png ├── sm_pump_triplex_Cylinder_IMAGE.png ├── sm_pump_triplex_FlowSensor_IMAGE.png ├── sm_pump_triplex_FlowSensor_L_IMAGE.png ├── sm_pump_triplex_Housing_IMAGE.png ├── sm_pump_triplex_Manifold_IMAGE.png ├── sm_pump_triplex_PlungerPart_IMAGE.png ├── sm_pump_triplex_Plunger_IMAGE.png ├── sm_pump_triplex_Pump_IMAGE.png ├── sm_pump_triplex_Rod_IMAGE.png ├── sm_pump_triplex_Seal_Leak_Off_IMAGE.png ├── sm_pump_triplex_Seal_Leak_On_IMAGE.png ├── sm_pump_triplex_Valve_Vis_IMAGE.png ├── specKurtosis.png ├── spectrumKurtosis.png ├── tachoPulsesoutput.PNG ├── tallData.PNG ├── vibrationDataVisualization.png ├── writeMFPTBearing.m ├── xxbatteryDischargeChargeCurve.jpg └── xxbatteryEquivalentCircuit.jpg ├── cn-deep-learning-vs-machine-learning-ebook.pdf ├── estimating-remaining-useful-life-ebook.pdf ├── faultBand ├── withSideband.fig ├── withSideband.jpg ├── withoutSideband.fig └── withoutSideband.jpg ├── faultDetectionAndPrognose ├── ARMAMODEL.PNG ├── ARXParaEstimator.png ├── ARXParaEstimatorWithLocation.png ├── ChangePointResult.PNG ├── ChemicalProcessFaultDetectionUsingDeepLearningExample_01.png ├── ChemicalProcessFaultDetectionUsingDeepLearningExample_02.png ├── ChemicalProcessFaultDetectionUsingDeepLearningExample_03.png ├── ChemicalProcessFaultDetectionUsingDeepLearningExample_04.png ├── ResponseComparision.png ├── ResponseComparisionSetofModels.png ├── ans.PNG ├── clfResult.png ├── faultfreeTraining.PNG ├── faultyTraining.PNG ├── helperPreprocess.m ├── inputOutputData.png ├── mdlPara.png ├── measuredResponseSegment.png ├── mechanicalSystem.PNG ├── parameterValueSegmented.png ├── pdmARMASpectrumPlot.m ├── pdmDeterioratingSystemEstimation.slxc ├── pdmMechanicalSystem.slxc ├── powerSpecFault.png ├── powerSpecWithCI.png ├── powerSpecfaultynormal.png ├── residualCorrelationship.png ├── residueCorrelation.png ├── scope.PNG ├── scopeDeterioratingSystem.PNG ├── scopeEOF.PNG ├── scopeSingle.PNG └── timeVaryingEsti.png ├── index.html ├── modelUpdate ├── ModelParameters.png ├── TestdataHead5.PNG ├── estimatedRUL.png └── modelPrioir.PNG ├── monotonicity ├── compare.jpg ├── multiVar.jpg ├── prognosability.jpg ├── singleVar.jpg ├── trend.jpg └── trendability.jpg ├── other_pics ├── 1570541294351.jpg ├── image-20200122094152378.png └── modelTypesOverview.PNG ├── reveal.js ├── .travis.yml ├── CONTRIBUTING.md ├── LICENSE ├── bower.json ├── css │ ├── print │ │ ├── paper.css │ │ └── pdf.css │ ├── reset.css │ ├── reveal.css │ ├── reveal.scss │ └── theme │ │ ├── README.md │ │ ├── beige.css │ │ ├── black.css │ │ ├── blood.css │ │ ├── league.css │ │ ├── moon.css │ │ ├── night.css │ │ ├── serif.css │ │ ├── simple.css │ │ ├── sky.css │ │ ├── solarized.css │ │ ├── source │ │ ├── beige.scss │ │ ├── black.scss │ │ ├── blood.scss │ │ ├── league.scss │ │ ├── moon.scss │ │ ├── night.scss │ │ ├── serif.scss │ │ ├── simple.scss │ │ ├── sky.scss │ │ ├── solarized.scss │ │ └── white.scss │ │ ├── template │ │ ├── mixins.scss │ │ ├── settings.scss │ │ └── theme.scss │ │ └── white.css ├── gruntfile.js ├── js │ └── reveal.js ├── lib │ ├── css │ │ ├── monokai.css │ │ └── zenburn.css │ ├── font │ │ ├── league-gothic │ │ │ ├── LICENSE │ │ │ ├── league-gothic.css │ │ │ ├── league-gothic.eot │ │ │ ├── league-gothic.ttf │ │ │ └── league-gothic.woff │ │ └── source-sans-pro │ │ │ ├── LICENSE │ │ │ ├── source-sans-pro-italic.eot │ │ │ ├── source-sans-pro-italic.ttf │ │ │ ├── source-sans-pro-italic.woff │ │ │ ├── source-sans-pro-regular.eot │ │ │ ├── source-sans-pro-regular.ttf │ │ │ ├── source-sans-pro-regular.woff │ │ │ ├── source-sans-pro-semibold.eot │ │ │ ├── source-sans-pro-semibold.ttf │ │ │ ├── source-sans-pro-semibold.woff │ │ │ ├── source-sans-pro-semibolditalic.eot │ │ │ ├── source-sans-pro-semibolditalic.ttf │ │ │ ├── source-sans-pro-semibolditalic.woff │ │ │ └── source-sans-pro.css │ └── js │ │ ├── html5shiv.js │ │ └── promise.js ├── package-lock.json ├── package.json ├── plugin │ ├── highlight │ │ └── highlight.js │ ├── markdown │ │ ├── example.html │ │ ├── example.md │ │ ├── markdown.js │ │ └── marked.js │ ├── math │ │ └── math.js │ ├── multiplex │ │ ├── client.js │ │ ├── index.js │ │ ├── master.js │ │ └── package.json │ ├── notes-server │ │ ├── client.js │ │ ├── index.js │ │ └── notes.html │ ├── notes │ │ ├── notes.html │ │ └── notes.js │ ├── print-pdf │ │ └── print-pdf.js │ ├── search │ │ └── search.js │ └── zoom-js │ │ └── zoom.js └── test │ ├── assets │ ├── external-script-a.js │ ├── external-script-b.js │ ├── external-script-c.js │ └── external-script-d.js │ ├── examples │ ├── assets │ │ ├── beeping.txt │ │ ├── beeping.wav │ │ ├── image1.png │ │ └── image2.png │ ├── barebones.html │ ├── embedded-media.html │ ├── math.html │ ├── slide-backgrounds.html │ └── slide-transitions.html │ ├── qunit-2.5.0.css │ ├── qunit-2.5.0.js │ ├── simple.md │ ├── test-dependencies-async.html │ ├── test-dependencies.html │ ├── test-grid-navigation.html │ ├── test-iframe-backgrounds.html │ ├── test-iframes.html │ ├── test-markdown-element-attributes.html │ ├── test-markdown-element-attributes.js │ ├── test-markdown-external.html │ ├── test-markdown-external.js │ ├── test-markdown-options.html │ ├── test-markdown-options.js │ ├── test-markdown-slide-attributes.html │ ├── test-markdown-slide-attributes.js │ ├── test-markdown.html │ ├── test-markdown.js │ ├── test-pdf.html │ ├── test-pdf.js │ ├── test-plugins.html │ ├── test-state.html │ ├── test.html │ └── test.js └── rulPred ├── BatteryRULTestData.PNG ├── HIFused.png ├── HIPlot.png ├── HIValidationData.png ├── HIVisualization.png ├── KMeansPerformance.PNG ├── KNNPlot.png ├── KNNPlot70.png ├── KNNPlot90.png ├── PCADistribution.png ├── PHMdata.PNG ├── PlotEnsemblerMember.png ├── RULDistribution50.png ├── RULDistribution70.png ├── RULDistribution90.png ├── RULPred.png ├── RegimePlot.png ├── RegimePlotWithCluster.png ├── SurvialFunction.png ├── WindTurbineHighSpeedBearingPrognosisExample_08.gif ├── alphaLambdaPlot.png ├── bearingTallData.PNG ├── biasValue.PNG ├── degradationDataDemo.PNG ├── degradationSensorFusion.m ├── errorMean.PNG ├── errorMedian.PNG ├── errorOverview.png ├── errorSD.PNG ├── featureExtractionProcess.PNG ├── featureRanking.png ├── featureSmooth.png ├── featureTimeTable.PNG ├── helperAlphaLambdaPlot.m ├── helperLoadData.m ├── helperPlotClusters.m ├── helperPlotEnsemble.m ├── helperPlotRUL.m ├── helperPlotRULDistribution.m ├── helperPlotTrend.m ├── helperReadData.m ├── helperSortedBarPlot.m ├── helperWriteToHSBearing.m ├── predictionErrorBox.png ├── predictionRULErrorDistribution.png ├── probabilityPredRULWithinAlphaBound.png ├── regimeNormalization.m ├── selectedFeatures.PNG ├── selectedSensors.PNG ├── sensorMean.PNG ├── sensorSD.PNG ├── trendPlot.png ├── trendedSensorsPlot.png ├── vibrationVisualization.png ├── vibratonSpecKurtosis.png ├── weights.PNG └── 捕获.PNG /Condition Indicator/phaseSpaceReconstruction.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/Condition Indicator/phaseSpaceReconstruction.jpg -------------------------------------------------------------------------------- /DataProcessing/classificationLearnerSession.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/DataProcessing/classificationLearnerSession.PNG -------------------------------------------------------------------------------- /DataProcessing/dataVisualization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/DataProcessing/dataVisualization.png -------------------------------------------------------------------------------- /DataProcessing/exportFeature.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/DataProcessing/exportFeature.PNG -------------------------------------------------------------------------------- /DataProcessing/featuresRanking.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/DataProcessing/featuresRanking.PNG -------------------------------------------------------------------------------- /DataProcessing/featuresRanking1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/DataProcessing/featuresRanking1.PNG -------------------------------------------------------------------------------- /DataProcessing/importData.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/DataProcessing/importData.png -------------------------------------------------------------------------------- /DataProcessing/powerSpec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/DataProcessing/powerSpec.png -------------------------------------------------------------------------------- /DataProcessing/powerSpecPressure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/DataProcessing/powerSpecPressure.png -------------------------------------------------------------------------------- /DataProcessing/powerSpecSpecification.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/DataProcessing/powerSpecSpecification.PNG -------------------------------------------------------------------------------- /DataProcessing/predictive_maintenance_workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/DataProcessing/predictive_maintenance_workflow.png -------------------------------------------------------------------------------- /DataProcessing/result.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/DataProcessing/result.PNG -------------------------------------------------------------------------------- /DataProcessing/timeDomainFeatures.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/DataProcessing/timeDomainFeatures.PNG -------------------------------------------------------------------------------- /DataProcessing/timeDomainFeatures1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/DataProcessing/timeDomainFeatures1.PNG -------------------------------------------------------------------------------- /DataProcessing/timeDomainFeatures2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/DataProcessing/timeDomainFeatures2.PNG -------------------------------------------------------------------------------- /DataProcessing/timeDomainFeatures3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/DataProcessing/timeDomainFeatures3.PNG -------------------------------------------------------------------------------- /DataProcessing/viewFeature.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/DataProcessing/viewFeature.PNG -------------------------------------------------------------------------------- /HIDesign/APP_1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/APP_1.PNG -------------------------------------------------------------------------------- /HIDesign/APP_2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/APP_2.PNG -------------------------------------------------------------------------------- /HIDesign/ARXmodel.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/ARXmodel.PNG -------------------------------------------------------------------------------- /HIDesign/BaggingModel.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/BaggingModel.PNG -------------------------------------------------------------------------------- /HIDesign/CentrifugalPumpFaultDiagnosisUsingResidualAnalysisExample_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/CentrifugalPumpFaultDiagnosisUsingResidualAnalysisExample_04.png -------------------------------------------------------------------------------- /HIDesign/HITendence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/HITendence.png -------------------------------------------------------------------------------- /HIDesign/LPV_pump_pipe.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/LPV_pump_pipe.slx -------------------------------------------------------------------------------- /HIDesign/LPV_pump_pipe.slxc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/LPV_pump_pipe.slxc -------------------------------------------------------------------------------- /HIDesign/anomalyResultHead.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/anomalyResultHead.PNG -------------------------------------------------------------------------------- /HIDesign/anomalyResultTorque.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/anomalyResultTorque.PNG -------------------------------------------------------------------------------- /HIDesign/bagError.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/bagError.png -------------------------------------------------------------------------------- /HIDesign/bearingData.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/bearingData.png -------------------------------------------------------------------------------- /HIDesign/defectDepth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/defectDepth.png -------------------------------------------------------------------------------- /HIDesign/defectSpec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/defectSpec.png -------------------------------------------------------------------------------- /HIDesign/dynamicPipeEst.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/dynamicPipeEst.m -------------------------------------------------------------------------------- /HIDesign/dynamicPumpModel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/dynamicPumpModel.png -------------------------------------------------------------------------------- /HIDesign/dynamicPumpPipeModel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/dynamicPumpPipeModel.png -------------------------------------------------------------------------------- /HIDesign/ellipsoidWithPoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/ellipsoidWithPoint.png -------------------------------------------------------------------------------- /HIDesign/ellipsoidWithPointAndLines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/ellipsoidWithPointAndLines.png -------------------------------------------------------------------------------- /HIDesign/ellipsoidWithoutPoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/ellipsoidWithoutPoint.png -------------------------------------------------------------------------------- /HIDesign/featuresPlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/featuresPlot.png -------------------------------------------------------------------------------- /HIDesign/finalModel.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/finalModel.PNG -------------------------------------------------------------------------------- /HIDesign/forecaseValue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/forecaseValue.png -------------------------------------------------------------------------------- /HIDesign/forecastValueToEnd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/forecastValueToEnd.png -------------------------------------------------------------------------------- /HIDesign/headConfusionMaxtrix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/headConfusionMaxtrix.png -------------------------------------------------------------------------------- /HIDesign/healthPumpDeliveryHead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/healthPumpDeliveryHead.png -------------------------------------------------------------------------------- /HIDesign/healthSpec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/healthSpec.png -------------------------------------------------------------------------------- /HIDesign/healthyEnsemble.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/healthyEnsemble.png -------------------------------------------------------------------------------- /HIDesign/helperAddDistanceLines.m: -------------------------------------------------------------------------------- 1 | function helperAddDistanceLines(PlotNo, Distance, Mean, TestTheta, Threshold) 2 | %helperAddDistanceLines Add Mahanobis distance lines to the confidence region plot. 3 | % 4 | % This function is only in support of 5 | % CentrifugalPumpFaultDiagnosisUsingSteadyStateExperimentsExample. It may 6 | % change in a future release. 7 | 8 | % Copyright 2017 The MathWorks, Inc. 9 | 10 | subplot(1,2,PlotNo) 11 | hold on 12 | for ct = 1:size(TestTheta,1) 13 | if Distance(ct)>Threshold^2 14 | Color = [1 0 0]; 15 | else 16 | Color = [0 1 .2]; 17 | end 18 | line([Mean(1);TestTheta(ct,1)],... 19 | [Mean(2);TestTheta(ct,2)],... 20 | [Mean(3); TestTheta(ct,3)],'Color',Color) 21 | text(TestTheta(ct,1),TestTheta(ct,2),TestTheta(ct,3),num2str(Distance(ct),2)) 22 | end 23 | -------------------------------------------------------------------------------- /HIDesign/helperComputeEnsembleResidues.m: -------------------------------------------------------------------------------- 1 | function R = helperComputeEnsembleResidues(Ensemble,Ts,sys,x1,x2,x3,x4,x5) 2 | %helperComputeEnsembleResidues Compute residues for a given dataset ensemble. 3 | % This function is only in support of 4 | % CentrifugalPumpFaultDiagnosisUsingResidualAnalysisExample. It may change 5 | % in a future release. 6 | 7 | % Copyright 2017 The MathWorks, Inc. 8 | 9 | load_system('LPV_pump_pipe') 10 | N = numel(Ensemble); 11 | r1 = cell(N,1); 12 | r2 = r1; 13 | r3 = r1; 14 | r4 = r1; 15 | for kexp = 1:N 16 | [r1{kexp},r2{kexp},r3{kexp},r4{kexp}] = ... 17 | localComputeResidue(Ensemble{kexp},Ts,sys,x1,x2,x3,x4,x5); 18 | end 19 | R = [r1,r2,r3,r4]; 20 | 21 | %-------------------------------------------------------------------------- 22 | function [r1,r2,r3,r4] = localComputeResidue(Data,Ts,sys,x1,x2,x3,x4,x5) 23 | % Residues for one dataset. 24 | w = Data.Speed; 25 | I1 = w<=900; 26 | I2 = w>900 & w<=1500; 27 | I3 = w>1500; 28 | rho = 1800; 29 | g = 9.81; 30 | dp = Data.Head*rho*g; 31 | Q = Data.Discharge; 32 | Mmot = Data.MotorTorque; 33 | 34 | dpest = NaN(size(dp)); 35 | dpest(I1) = [w(I1).^2 w(I1)]*[x1(1); x2(1)]; 36 | dpest(I2) = [w(I2).^2 w(I2)]*[x1(2); x2(2)]; 37 | dpest(I3) = [w(I3).^2 w(I3)]*[x1(3); x2(3)]; 38 | r1 = dp - dpest; 39 | 40 | Switch = ones(size(w)); 41 | Switch(I2) = 2; 42 | Switch(I3) = 3; 43 | assignin('base', 'Switch', Switch); 44 | assignin('base', 'UseEstimatedP', 0); 45 | Qest_pipe = simulatePumpPipeModel(Ts,x3,x4,x5); 46 | r2 = Q - Qest_pipe; 47 | 48 | assignin('base', 'UseEstimatedP', 1); 49 | Qest_pump_pipe = simulatePumpPipeModel(Ts,x3,x4,x5); 50 | r3 = Q - Qest_pump_pipe; 51 | 52 | zv = iddata(Mmot,[w Q/3600],Ts); 53 | e = pe(sys,zv); 54 | r4 = e.y; 55 | -------------------------------------------------------------------------------- /HIDesign/helperGenerateFeatureTable.m: -------------------------------------------------------------------------------- 1 | function [T, MinMax] = helperGenerateFeatureTable(Ensemble, CandidateFeatures, Names, MinMax) 2 | %helperGenerateFeatureTable Extract features from residues. 3 | % This function is only in support of 4 | % CentrifugalPumpFaultDiagnosisUsingResidualAnalysisExample. It may change 5 | % in a future release. 6 | 7 | % Copyright 2018 The MathWorks, Inc. 8 | 9 | [N,m] = size(Ensemble); % N experiments, m residues 10 | nf = length(Names); % nf features 11 | F = zeros(N,m*nf); 12 | ColNames = cell(1,m*nf); 13 | for j = 1:nf 14 | fcn = CandidateFeatures{j}; 15 | F(:,(j-1)*m+(1:m)) = cellfun(@(x)fcn(x),Ensemble,'uni',1); 16 | ColNames((j-1)*m+(1:m)) = strseq(Names{j},1:m); 17 | end 18 | if nargout>1 && nargin<4 19 | MinMax = [min(F); max(F)]; 20 | end 21 | 22 | if nargin>3 || nargout>1 23 | Range = diff(MinMax); 24 | F = (F-MinMax(1,:))./Range; 25 | end 26 | T = array2table(F,'VariableNames',ColNames); 27 | -------------------------------------------------------------------------------- /HIDesign/helperPlotConfidenceEllipsoid.m: -------------------------------------------------------------------------------- 1 | function helperPlotConfidenceEllipsoid(M,C,n,color) 2 | %helperPlotConfidenceEllipsoid Plot confidence region for 3D data. 3 | % 4 | % This function is only in support of 5 | % CentrifugalPumpFaultDiagnosisUsingSteadyStateExperimentsExample. It may 6 | % change in a future release. 7 | 8 | % Copyright 2017 The MathWorks, Inc. 9 | 10 | %Compute the surface points of a N standard deviations ellipsoid 11 | %corresponding to the provided mean (M) and covariance (C) data. 12 | [U,L] = eig(C); 13 | 14 | % For n standard deviation spread of data, the radii of the ellipsoid will 15 | % be given by n*SQRT(eigenvalues) 16 | l = 50; 17 | radii = n*sqrt(diag(L)); 18 | [xc,yc,zc] = ellipsoid(0,0,0,radii(1),radii(2),radii(3),l); 19 | % 20 | a = kron(U(:,1),xc); b = kron(U(:,2),yc); c = kron(U(:,3),zc); 21 | data = a+b+c; 22 | nc = size(data,2); 23 | x = data(1:nc,:)+M(1); 24 | y = data(nc+1:2*nc,:)+M(2); 25 | z = data(2*nc+1:end,:)+M(3); 26 | 27 | if isscalar(color), color = color*ones(1,3); end 28 | ColorMap(:,:,1) = color(1)*ones(l+1); 29 | ColorMap(:,:,2) = color(2)*ones(l+1); 30 | ColorMap(:,:,3) = color(3)*ones(l+1); 31 | 32 | sc = surf(x,y,z,ColorMap); 33 | shading interp 34 | alpha(sc,0.4); 35 | camlight headlight 36 | lighting phong 37 | 38 | -------------------------------------------------------------------------------- /HIDesign/helperPlotHistogram.m: -------------------------------------------------------------------------------- 1 | function helperPlotHistogram(Theta1, Theta2, Theta3, names) 2 | %helperPlotHistogram Plot histograms of pump parameters. 3 | % 4 | % This function is only in support of 5 | % CentrifugalPumpFaultDiagnosisUsingSteadyStateExperimentsExample. It may 6 | % change in a future release. 7 | 8 | % Copyright 2017 The MathWorks, Inc. 9 | f = figure; 10 | subplot(311) 11 | localAdjustMarkers(histfit(Theta1(:,1))); 12 | hold on 13 | localAdjustMarkers(histfit(Theta2(:,1))) 14 | localAdjustMarkers(histfit(Theta3(:,1))) 15 | ylabel(names{1}) 16 | if strcmp(names{1},'hnn') 17 | title('Fault Mode Histograms: Head Parameters') 18 | else 19 | title('Fault Mode Histograms: Torque Parameters') 20 | end 21 | L = findall(gca,'Type','line','Tag','PDF'); 22 | uistack(L,'top'); 23 | 24 | subplot(312) 25 | hg = histfit(Theta1(:,2)); 26 | hasbehavior(hg(2),'legend',false) 27 | localAdjustMarkers(hg) 28 | hold on 29 | hg = histfit(Theta2(:,2)); 30 | hasbehavior(hg(2),'legend',false) 31 | localAdjustMarkers(hg) 32 | hg = histfit(Theta3(:,2)); 33 | hasbehavior(hg(2),'legend',false); 34 | localAdjustMarkers(hg) 35 | ylabel(names{2}) 36 | legend('Healthy','Large', 'Small') 37 | L = findall(gca,'Type','line','Tag','PDF'); 38 | uistack(L,'top'); 39 | 40 | subplot(313) 41 | localAdjustMarkers(histfit(Theta1(:,3))) 42 | hold on 43 | localAdjustMarkers(histfit(Theta2(:,3))) 44 | localAdjustMarkers(histfit(Theta3(:,3))) 45 | ylabel(names{3}) 46 | L = findall(gca,'Type','line','Tag','PDF'); 47 | uistack(L,'top'); 48 | 49 | f.Position(4) = f.Position(4)*1.8571; 50 | centerfig(f) 51 | 52 | %-------------------------------------------------------------------------- 53 | function localAdjustMarkers(hh) 54 | % Configure PDF curve markers to improve discernment. 55 | 56 | Col = hh(1).FaceColor; 57 | hh(2).Color = Col*0.7; 58 | hh(1).FaceColor = min(Col*1.2,[1 1 1]); 59 | hh(1).EdgeColor = Col*0.9; 60 | hh(1).FaceAlpha = 0.5; 61 | hh(2).Tag = 'PDF'; 62 | -------------------------------------------------------------------------------- /HIDesign/helperPlotSVM.m: -------------------------------------------------------------------------------- 1 | function helperPlotSVM(SVMModel,TestData) 2 | %helperPlotSVM Generate SVM boundary and view outliers. 3 | % 4 | % This function is only in support of 5 | % CentrifugalPumpFaultDiagnosisUsingSteadyStateExperimentsExample. It may 6 | % change in a future release. 7 | 8 | % Copyright 2017-2018 The MathWorks, Inc. 9 | 10 | svInd = SVMModel.IsSupportVector; 11 | dd = min(abs(diff(TestData)))/10; 12 | 13 | [X1,X2] = meshgrid(min(TestData(:,1)):dd(1):max(TestData(:,1)),... 14 | min(TestData(:,2)):dd(2):max(TestData(:,2))); 15 | [~,score] = predict(SVMModel,[X1(:),X2(:)]); 16 | scoreGrid = reshape(score,size(X1,1),size(X2,2)); 17 | [~,score1] = predict(SVMModel,TestData); 18 | outlierInd = score1>0; 19 | 20 | plot(TestData(:,1),TestData(:,2),'k.') 21 | hold on 22 | plot(TestData(svInd,1),TestData(svInd,2),'go','MarkerSize',6) 23 | plot(TestData(outlierInd,1),TestData(outlierInd,2),'ro','MarkerSize',10) 24 | [C,h] = contour(X1,X2,scoreGrid); 25 | clabel(C,h,0,'Color','k','LabelSpacing',50,'FontSize',6); 26 | colorbar; 27 | legend('Data','Support Vector','Outliers') 28 | hold off 29 | end -------------------------------------------------------------------------------- /HIDesign/identifyNonlinearARXModel.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/identifyNonlinearARXModel.m -------------------------------------------------------------------------------- /HIDesign/initMeanPeakFreq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/initMeanPeakFreq.png -------------------------------------------------------------------------------- /HIDesign/inversePumpModel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/inversePumpModel.png -------------------------------------------------------------------------------- /HIDesign/linearFit.m: -------------------------------------------------------------------------------- 1 | function varargout = linearFit(Form, Data) 2 | %linearFit Linear least squares solution for Pump Head and Torque parameters. 3 | % 4 | % If Form==0, accept separate inputs and return separate outputs. For one experiment only. 5 | % If Form==1, accept an ensemble and return compact parameter vectors. For several experiments (ensemble). 6 | if Form==0 7 | w = Data{1}; 8 | Q = Data{2}; 9 | H = Data{3}; 10 | M = Data{4}; 11 | n = length(Q); 12 | if isscalar(w), w = w*ones(n,1); end 13 | Q = Q(:); H = H(:); M = M(:); 14 | Predictor = [w.^2, w.*Q, Q.^2]; 15 | Theta1 = Predictor\H; 16 | hnn = Theta1(1); 17 | hnv = -Theta1(2); 18 | hvv = -Theta1(3); 19 | Theta2 = Predictor\M; 20 | k0 = Theta2(2); 21 | k1 = -Theta2(3); 22 | k2 = Theta2(1); 23 | varargout = {hnn, hnv, hvv, k0, k1, k2}; 24 | else 25 | H = cellfun(@(x)x.Head,Data,'uni',0); 26 | Q = cellfun(@(x)x.Discharge,Data,'uni',0); 27 | M = cellfun(@(x)x.Torque,Data,'uni',0); 28 | W = cellfun(@(x)x.Speed,Data,'uni',0); 29 | N = numel(H); 30 | 31 | Theta1 = zeros(3,N); 32 | Theta2 = zeros(3,N); 33 | 34 | for kexp = 1:N 35 | Predictor = [W{kexp}.^2, W{kexp}.*Q{kexp}, Q{kexp}.^2]; 36 | X1 = Predictor\H{kexp}; 37 | hnn = X1(1); 38 | hnv = -X1(2); 39 | hvv = -X1(3); 40 | X2 = Predictor\M{kexp}; 41 | k0 = X2(2); 42 | k1 = -X2(3); 43 | k2 = X2(1); 44 | 45 | Theta1(:,kexp) = [hnn; hnv; hvv]; 46 | Theta2(:,kexp) = [k0; k1; k2]; 47 | end 48 | varargout = {Theta1', Theta2'}; 49 | end 50 | end -------------------------------------------------------------------------------- /HIDesign/middleFilteredSpec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/middleFilteredSpec.png -------------------------------------------------------------------------------- /HIDesign/middleSpec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/middleSpec.png -------------------------------------------------------------------------------- /HIDesign/misclassification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/misclassification.png -------------------------------------------------------------------------------- /HIDesign/multiPumpDeliveryHead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/multiPumpDeliveryHead.png -------------------------------------------------------------------------------- /HIDesign/oneClassSVM4H.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/oneClassSVM4H.png -------------------------------------------------------------------------------- /HIDesign/oneClassSVM4K.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/oneClassSVM4K.png -------------------------------------------------------------------------------- /HIDesign/paraDistributionHead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/paraDistributionHead.png -------------------------------------------------------------------------------- /HIDesign/paraDistributionTorque.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/paraDistributionTorque.png -------------------------------------------------------------------------------- /HIDesign/paraEstimated.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/paraEstimated.PNG -------------------------------------------------------------------------------- /HIDesign/paraEstimatedK.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/paraEstimatedK.PNG -------------------------------------------------------------------------------- /HIDesign/probaDistribution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/probaDistribution.png -------------------------------------------------------------------------------- /HIDesign/pumpModeLikelihoodTest.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/pumpModeLikelihoodTest.m -------------------------------------------------------------------------------- /HIDesign/pumpSpeed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/pumpSpeed.png -------------------------------------------------------------------------------- /HIDesign/residualAR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/residualAR.png -------------------------------------------------------------------------------- /HIDesign/residualPlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/residualPlot.png -------------------------------------------------------------------------------- /HIDesign/residueFeatures.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/residueFeatures.PNG -------------------------------------------------------------------------------- /HIDesign/selectedFeaturePlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/selectedFeaturePlot.png -------------------------------------------------------------------------------- /HIDesign/selectedFeatureSensorBiasPlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/selectedFeatureSensorBiasPlot.png -------------------------------------------------------------------------------- /HIDesign/sensorBiasModel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/sensorBiasModel.png -------------------------------------------------------------------------------- /HIDesign/simulatePumpPipeModel.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/simulatePumpPipeModel.m -------------------------------------------------------------------------------- /HIDesign/staticPumpEst.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/staticPumpEst.m -------------------------------------------------------------------------------- /HIDesign/staticPumpModel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/staticPumpModel.png -------------------------------------------------------------------------------- /HIDesign/sysPara.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/sysPara.PNG -------------------------------------------------------------------------------- /HIDesign/systemFlow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/systemFlow.png -------------------------------------------------------------------------------- /HIDesign/testDataPreview.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/testDataPreview.PNG -------------------------------------------------------------------------------- /HIDesign/torqueConfusionMaxtrix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/HIDesign/torqueConfusionMaxtrix.png -------------------------------------------------------------------------------- /MATLAB Predictive Maintenance Toolbox Introduction.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/MATLAB Predictive Maintenance Toolbox Introduction.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **开启展示页面:** 2 | 3 | markdown版: 直接打开文件`MATLAB Predictive Maintenance Toolbox Introduction.md` 4 | 5 | pdf版:直接打开文件`MATLAB Predictive Maintenance Toolbox Introduction.pdf` 6 | 7 | 网页slides版:打开`index.html`查看案例,打开`工具箱函数介绍.html`查看工具箱函数接口 8 | 9 | **Tips for author:** 10 | 11 | `pandoc`转换`.md`文件为`revealjs`支持的slides网页 12 | 13 | 1. 使用命令`pandoc demo.md -o demo.html -t revealjs -s -V theme=simple`,其中`demo.md`表示想要转换的原始`markdown`文件,`deml.html`表示目标文件名,`theme=simple`表示主题,具体可选主题可参考`reveal.js`安装文件夹中的`css/theme`部分。 14 | 2. 手动将生成的`.html`文件中的`revealjs`文件目录改成安装的绝对路径,如从`reveal.js/css/theme/moon.css`改为`C:/Users/jian.gan/reveal.js/css/theme/moon.css`。生成的`.html`文件以`.md`文件中的标题级别作为slide的划分依据。 15 | -------------------------------------------------------------------------------- /TSA/FindAndVisualizeTheDifferenceSignalOfACompoundTSASignalExample_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/TSA/FindAndVisualizeTheDifferenceSignalOfACompoundTSASignalExample_02.png -------------------------------------------------------------------------------- /TSA/FindAndVisualizeTheRegularSignalOfACompoundTSASignalExample_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/TSA/FindAndVisualizeTheRegularSignalOfACompoundTSASignalExample_02.png -------------------------------------------------------------------------------- /TSA/FindAndVisualizeTheResidualOfATSASignalExample_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/TSA/FindAndVisualizeTheResidualOfATSASignalExample_02.png -------------------------------------------------------------------------------- /algo_dev/BatteryIndicatorSignal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/BatteryIndicatorSignal.png -------------------------------------------------------------------------------- /algo_dev/BatteryMeasurement.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/BatteryMeasurement.PNG -------------------------------------------------------------------------------- /algo_dev/BatterySimscapeMDL.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/BatterySimscapeMDL.jpg -------------------------------------------------------------------------------- /algo_dev/BatteryStateTransition.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/BatteryStateTransition.PNG -------------------------------------------------------------------------------- /algo_dev/BatteryUKF.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/BatteryUKF.PNG -------------------------------------------------------------------------------- /algo_dev/EFKperformance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/EFKperformance.png -------------------------------------------------------------------------------- /algo_dev/EFKperformance3sigma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/EFKperformance3sigma.png -------------------------------------------------------------------------------- /algo_dev/EFKperformanceError.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/EFKperformanceError.png -------------------------------------------------------------------------------- /algo_dev/EFKperformanceVelocityAccl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/EFKperformanceVelocityAccl.png -------------------------------------------------------------------------------- /algo_dev/EKFResult.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/EKFResult.PNG -------------------------------------------------------------------------------- /algo_dev/EKFResultBoundary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/EKFResultBoundary.png -------------------------------------------------------------------------------- /algo_dev/EKFResultKurtosis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/EKFResultKurtosis.png -------------------------------------------------------------------------------- /algo_dev/MathworksVibrationModel.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/MathworksVibrationModel.PNG -------------------------------------------------------------------------------- /algo_dev/MathworksVibrationModelCasing.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/MathworksVibrationModelCasing.PNG -------------------------------------------------------------------------------- /algo_dev/MathworksVibrationModelGearToothFault.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/MathworksVibrationModelGearToothFault.PNG -------------------------------------------------------------------------------- /algo_dev/MathworksVibrationModelOuputShaft.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/MathworksVibrationModelOuputShaft.PNG -------------------------------------------------------------------------------- /algo_dev/MathworksVibrationModelSensorShift.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/MathworksVibrationModelSensorShift.PNG -------------------------------------------------------------------------------- /algo_dev/MathworksVibrationModelShaft.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/MathworksVibrationModelShaft.PNG -------------------------------------------------------------------------------- /algo_dev/RollingElementBearingFaultDiagnosisExample.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/RollingElementBearingFaultDiagnosisExample.mlx -------------------------------------------------------------------------------- /algo_dev/RollingElementBearingFaultDiagnosisExample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/RollingElementBearingFaultDiagnosisExample.png -------------------------------------------------------------------------------- /algo_dev/SOCEstiamtion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/SOCEstiamtion.png -------------------------------------------------------------------------------- /algo_dev/SWClassifierHisto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/SWClassifierHisto.png -------------------------------------------------------------------------------- /algo_dev/SimulationLog.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/SimulationLog.PNG -------------------------------------------------------------------------------- /algo_dev/TachoPulses.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/TachoPulses.png -------------------------------------------------------------------------------- /algo_dev/UKFSpecification.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/UKFSpecification.PNG -------------------------------------------------------------------------------- /algo_dev/VibrationSignalsEvery10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/VibrationSignalsEvery10.png -------------------------------------------------------------------------------- /algo_dev/VibrationSpectrum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/VibrationSpectrum.png -------------------------------------------------------------------------------- /algo_dev/VibrationTimeSyncAverage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/VibrationTimeSyncAverage.png -------------------------------------------------------------------------------- /algo_dev/allDataVisual.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/allDataVisual.png -------------------------------------------------------------------------------- /algo_dev/bearingFeatureExtraction.m: -------------------------------------------------------------------------------- 1 | function bearingFeatureExtraction(ensemble) 2 | % Extract condition indicators from bearing data 3 | data = read(ensemble); 4 | x = data.gs{1}; 5 | fs = data.sr; 6 | 7 | % Critical Frequencies 8 | BPFO = data.BPFO; 9 | BPFI = data.BPFI; 10 | 11 | level = 9; 12 | [~, ~, ~, fc, ~, BW] = kurtogram(x, fs, level); 13 | 14 | % Bandpass filtered Envelope Spectrum 15 | [pEnvpBpf, fEnvBpf] = envspectrum(x, fs, 'FilterOrder', 200, 'Band', [max([fc-BW/2 0]) min([fc+BW/2 0.999*fs/2])]); 16 | deltaf = fEnvBpf(2) - fEnvBpf(1); 17 | 18 | BPFIAmplitude = max(pEnvpBpf((fEnvBpf > (BPFI-5*deltaf)) & (fEnvBpf < (BPFI+5*deltaf)))); 19 | BPFOAmplitude = max(pEnvpBpf((fEnvBpf > (BPFO-5*deltaf)) & (fEnvBpf < (BPFO+5*deltaf)))); 20 | 21 | writeToLastMemberRead(ensemble, table(BPFIAmplitude, BPFOAmplitude, 'VariableNames', {'BPFIAmplitude', 'BPFOAmplitude'})); 22 | end -------------------------------------------------------------------------------- /algo_dev/classifyTF.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/classifyTF.PNG -------------------------------------------------------------------------------- /algo_dev/classifyTFHisto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/classifyTFHisto.png -------------------------------------------------------------------------------- /algo_dev/confusionMatrixTransmission.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/confusionMatrixTransmission.png -------------------------------------------------------------------------------- /algo_dev/dAmplitudeDataScatter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/dAmplitudeDataScatter.png -------------------------------------------------------------------------------- /algo_dev/dataOverview.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/dataOverview.PNG -------------------------------------------------------------------------------- /algo_dev/ensObject.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/ensObject.PNG -------------------------------------------------------------------------------- /algo_dev/ensObjectVariables.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/ensObjectVariables.PNG -------------------------------------------------------------------------------- /algo_dev/ensembleDataObject.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/ensembleDataObject.PNG -------------------------------------------------------------------------------- /algo_dev/ensembleTestData.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/ensembleTestData.PNG -------------------------------------------------------------------------------- /algo_dev/envAnalysisLocal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/envAnalysisLocal.png -------------------------------------------------------------------------------- /algo_dev/envSpecAfterFilter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/envSpecAfterFilter.png -------------------------------------------------------------------------------- /algo_dev/envSpecOutRaceFault.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/envSpecOutRaceFault.png -------------------------------------------------------------------------------- /algo_dev/featureData.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/featureData.PNG -------------------------------------------------------------------------------- /algo_dev/featureData.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/featureData.mat -------------------------------------------------------------------------------- /algo_dev/featureTableTrain.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/featureTableTrain.PNG -------------------------------------------------------------------------------- /algo_dev/fileEnsembleDataStores.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/fileEnsembleDataStores.PNG -------------------------------------------------------------------------------- /algo_dev/frequencyBandResult.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/frequencyBandResult.png -------------------------------------------------------------------------------- /algo_dev/helperPlotCombs.m: -------------------------------------------------------------------------------- 1 | function helperPlotCombs(ncomb, f) 2 | %HELPERPLOTCOMBS Plot harmonic cursors on a power spectrum plot 3 | 4 | % Copyright 2017 The MathWorks, Inc. 5 | ylimit = get(gca, 'YLim'); 6 | ylim(ylimit); 7 | ycomb = repmat([ylimit nan], 1, ncomb); 8 | hold(gca, 'on') 9 | for i = 1:length(f) 10 | xcomb = f(i)*(1:ncomb); 11 | xcombs = [xcomb; xcomb; nan(1, ncomb)]; 12 | xcombs = xcombs(:)'; 13 | plot(xcombs, ycomb, '--') 14 | end 15 | hold(gca, 'off') 16 | end -------------------------------------------------------------------------------- /algo_dev/helperSpectrogramAndSpectralKurtosis.m: -------------------------------------------------------------------------------- 1 | function helperSpectrogramAndSpectralKurtosis(x, fs, level) 2 | %HELPERSPECTROGRAMANDSPECTRALKURTOSIS Compute and plot spectrogram and 3 | %spectral kurtosis. Spectral kurtosis is plotted on the side of 4 | %the spectrogram. 5 | 6 | % Copyright 2017 The MathWorks, Inc. 7 | [~, ~, ~, fc, wc, BW] = kurtogram(x, fs, level); 8 | [sk, fsk] = pkurtosis(x, fs, wc); 9 | 10 | figure 11 | subplot('position', [0.35 0.12 0.6 0.82]) 12 | pspectrum(x, fs, 'spectrogram', 'Reassign', true); 13 | title('') 14 | hold on 15 | xlimits1 = get(gca, 'XLim'); 16 | ylimits1 = get(gca, 'YLim'); 17 | scale = ylimits1(2)/(fs/2); 18 | fc_scaled = fc*scale; 19 | BW_scaled = BW*scale; 20 | xlim(xlimits1) 21 | plot(xlimits1, [fc_scaled fc_scaled]) 22 | plot([xlimits1 NaN xlimits1], [fc_scaled-BW_scaled/2 fc_scaled-BW_scaled/2 NaN fc_scaled+BW_scaled/2 fc_scaled+BW_scaled/2], '--') 23 | hold off 24 | 25 | subplot('position', [0.05 0.12 0.15 0.82]) 26 | plot(fsk*scale, sk) 27 | hold on 28 | ylimits2 = [min(sk(:)) - 0.5, max(sk(:)) + 0.5]; 29 | xlim(ylimits1) 30 | ylim(ylimits2) 31 | plot([fc_scaled fc_scaled], ylimits2) 32 | plot([fc_scaled-BW_scaled/2 fc_scaled-BW_scaled/2 NaN fc_scaled+BW_scaled/2 fc_scaled+BW_scaled/2], [ylimits2 NaN ylimits2], '--') 33 | ylabel('Spectral Kurtosis') 34 | camroll(90) 35 | hold off 36 | end -------------------------------------------------------------------------------- /algo_dev/linearKFPara_1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/linearKFPara_1.PNG -------------------------------------------------------------------------------- /algo_dev/linearKFPara_2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/linearKFPara_2.PNG -------------------------------------------------------------------------------- /algo_dev/logRatioAmplitude.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/logRatioAmplitude.png -------------------------------------------------------------------------------- /algo_dev/logRatioAmplitudeTest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/logRatioAmplitudeTest.png -------------------------------------------------------------------------------- /algo_dev/mech_hydro_forcesPS_lib.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/mech_hydro_forcesPS_lib.slx -------------------------------------------------------------------------------- /algo_dev/otherModesEnv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/otherModesEnv.png -------------------------------------------------------------------------------- /algo_dev/otherOutFaultEnv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/otherOutFaultEnv.png -------------------------------------------------------------------------------- /algo_dev/pdmMotorModelMeasJacobianFcn.m: -------------------------------------------------------------------------------- 1 | function J = pdmMotorModelMeasJacobianFcn(x,varargin) 2 | %PDMMOTORMODELMEASJACOBIANFCN 3 | % 4 | % Jacobian of motor model measurement equations. See 5 | % pdmMotorModelMeasurementFcn for the model equations. 6 | % 7 | % Jac = pdmMotorModelMeasJacobianFcn(x,u,J,Ts) 8 | % 9 | % Inputs: 10 | % x - state with elements [angular velocity; friction] 11 | % u - motor torque input 12 | % J - motor inertia 13 | % Ts - sampling time 14 | % 15 | % Outputs: 16 | % Jac - measurement Jacobian computed at x 17 | % 18 | 19 | % Copyright 2016-2017 The MathWorks, Inc. 20 | 21 | % System parameters 22 | J = varargin{2}; % System innertia 23 | 24 | % Jacobian 25 | J = [ ... 26 | 1 0; 27 | -x(2)/J -x(1)/J]; 28 | end 29 | -------------------------------------------------------------------------------- /algo_dev/pdmMotorModelMeasurementFcn.m: -------------------------------------------------------------------------------- 1 | function y = pdmMotorModelMeasurementFcn(x,varargin) 2 | %PDMMOTORMODELMEASUREMENTFCN 3 | % 4 | % Measurement equations for a motor with friction as a state 5 | % 6 | % y = pdmMotorModelMeasurementFcn(x0,u,J,Ts) 7 | % 8 | % Inputs: 9 | % x - motor state with elements [angular velocity; friction] 10 | % u - motor torque input 11 | % J - motor inertia 12 | % Ts - sampling time 13 | % 14 | % Outputs: 15 | % y - motor measurements with elements [angular velocity; angular acceleration] 16 | % 17 | 18 | % Copyright 2016-2017 The MathWorks, Inc. 19 | 20 | % Extract data from inputs 21 | u = varargin{1}; % Input 22 | J = varargin{2}; % System innertia 23 | 24 | % Output equation 25 | y = [... 26 | x(1); ... 27 | (u-x(1)*x(2))/J]; 28 | end -------------------------------------------------------------------------------- /algo_dev/pdmMotorModelStateFcn.m: -------------------------------------------------------------------------------- 1 | function x1 = pdmMotorModelStateFcn(x0,varargin) 2 | %PDMMOTORMODELSTATEFCN 3 | % 4 | % State update equations for a motor with friction as a state 5 | % 6 | % x1 = pdmMotorModelStateFcn(x0,u,J,Ts) 7 | % 8 | % Inputs: 9 | % x0 - initial state with elements [angular velocity; friction] 10 | % u - motor torque input 11 | % J - motor inertia 12 | % Ts - sampling time 13 | % 14 | % Outputs: 15 | % x1 - updated states 16 | % 17 | 18 | % Copyright 2016-2017 The MathWorks, Inc. 19 | 20 | % Extract data from inputs 21 | u = varargin{1}; % Input 22 | J = varargin{2}; % System innertia 23 | Ts = varargin{3}; % Sample time 24 | 25 | % State update equation 26 | x1 = [... 27 | x0(1)+Ts/J*(u-x0(1)*x0(2)); ... 28 | x0(2)]; 29 | end -------------------------------------------------------------------------------- /algo_dev/pdmMotorModelStateJacobianFcn.m: -------------------------------------------------------------------------------- 1 | function Jac = pdmMotorModelStateJacobianFcn(x,varargin) 2 | %PDMMOTORMODELSTATEJACOBIANFCN 3 | % 4 | % Jacobian of motor model state equations. See pdmMotorModelStateFcn for 5 | % the model equations. 6 | % 7 | % Jac = pdmMotorModelJacobianFcn(x,u,J,Ts) 8 | % 9 | % Inputs: 10 | % x - state with elements [angular velocity; friction] 11 | % u - motor torque input 12 | % J - motor inertia 13 | % Ts - sampling time 14 | % 15 | % Outputs: 16 | % Jac - state Jacobian computed at x 17 | % 18 | 19 | % Copyright 2016-2017 The MathWorks, Inc. 20 | 21 | % Model properties 22 | J = varargin{2}; 23 | Ts = varargin{3}; 24 | 25 | % Jacobian 26 | Jac = [... 27 | 1-Ts/J*x(2) -Ts/J*x(1); ... 28 | 0 1]; 29 | end -------------------------------------------------------------------------------- /algo_dev/pdmTransmissionCasing.slxc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/pdmTransmissionCasing.slxc -------------------------------------------------------------------------------- /algo_dev/prepareData.m: -------------------------------------------------------------------------------- 1 | function sData = prepareData(data) 2 | %% 3 | % 4 | % Clean up the signals in the data: 5 | % Vibration signal - remove the 1st 10 seconds of data and any duplicte times. 6 | % Tacho - remove 1st 10 seconds, find rising edge times 7 | 8 | %The first 10 seconds of the simulation contains data where the 9 | %transmission system is starting up; for analysis we discard this data. 10 | Vibration = data.Vibration{1}; 11 | plot(Vibration.Time,Vibration.Data) 12 | title('Vibration') 13 | idx = Vibration.Time >= seconds(10); 14 | Vibration = Vibration(idx,:); 15 | Vibration.Time = Vibration.Time - Vibration.Time(1); 16 | 17 | %The tacho signal contains pulses for the rotations of the drive and load 18 | %shafts. Later we use time synchronous averaging on the vibration data and 19 | %that requires the times of shaft rotations, the following code discards 20 | %the first 10 seconds of the tacho data and finds the shaft rotation times 21 | %in TachoPulses. 22 | Tacho = data.Tacho{1}; 23 | idx = Tacho.Time >= seconds(10); 24 | Tacho = Tacho(idx,:); 25 | plot(Tacho.Time,Tacho.Data) 26 | title('Tacho pulses') 27 | idx = diff(Tacho.Data(:,2)) > 0.5; 28 | tachoPulses = Tacho.Time(find(idx)+1)-Tacho.Time(1); 29 | 30 | %The Simulink.SimulationInput.Variables property contains the values of the 31 | %fault parameters used for the simulation, these values allow us to create 32 | %fault labels for each ensemble member. 33 | vars = data.SimulationInput{1}.Variables; 34 | sF = false; sV = false; sT = false; 35 | idx = strcmp({vars.Name},'SDrift'); 36 | if any(idx) 37 | sF = abs(vars(idx).Value) > 0.01; %Small drift values are not faults 38 | end 39 | idx = strcmp({vars.Name},'ShaftWear'); 40 | if any(idx) 41 | sV = vars(idx).Value < 0; 42 | end 43 | idx = strcmp({vars.Name},'ToothFaultGain'); 44 | if any(idx) 45 | sT = abs(vars(idx).Value) < 0.1; %Small tooth fault values are not faults 46 | end 47 | FaultCode = sF+2*sV+4*sT; %A fault code to capture different fault conditions 48 | 49 | %Collect processed data into a table 50 | sData = table({Vibration},{tachoPulses},sF,sV,sT,FaultCode, ... 51 | 'VariableNames',{'Vibration','TachoPulses','SensorDrift','ShaftWear','ToothFault','FaultCode'}); 52 | end -------------------------------------------------------------------------------- /algo_dev/rawSignalEnvSpectrum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/rawSignalEnvSpectrum.png -------------------------------------------------------------------------------- /algo_dev/rawSignalIRF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/rawSignalIRF.png -------------------------------------------------------------------------------- /algo_dev/rawSignalPowerSpectrum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/rawSignalPowerSpectrum.png -------------------------------------------------------------------------------- /algo_dev/rawSignalPowerSpectrumZoomed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/rawSignalPowerSpectrumZoomed.png -------------------------------------------------------------------------------- /algo_dev/readMFPTBearing.m: -------------------------------------------------------------------------------- 1 | function data = readMFPTBearing(filename, variables) 2 | % Read variables from a file, used by the ReadFcn of a 3 | % fileEnsembleDatastore object. 4 | % 5 | % Inputs: 6 | % filename - a string of the file name to read from 7 | % variables - a string array containing variable names to read 8 | % 9 | % Output: 10 | % data - return a table with a single row 11 | % 12 | 13 | % Note: This function uses dynamic field references to read data from 14 | % files, see 15 | % https://www.mathworks.com/help/matlab/matlab_prog/generate-field-names-from-variables.html 16 | % for more information 17 | 18 | % Copyright 2017-2018 The MathWorks, Inc. 19 | 20 | data = table(); 21 | 22 | mfile = matfile(filename); % Allows partial loading 23 | [~, fname] = fileparts(filename); 24 | bearing = mfile.bearing; 25 | for ct = 1:numel(variables) 26 | if strcmp(variables{ct},'FileName') 27 | %Return filename 28 | val = string(fname); 29 | elseif strcmp(variables{ct},'Label') 30 | %Set label based on filename 31 | cfname = char(fname); 32 | switch cfname(1:3) 33 | case 'bas' 34 | val = "Normal"; 35 | case 'Inn' 36 | val = "Inner Race Fault"; 37 | case 'Out' 38 | val = "Outer Race Fault"; 39 | otherwise 40 | val = "Unknown"; 41 | end 42 | else 43 | 44 | % The data could be either stored at top level or within bearing structure 45 | if isfield(bearing, variables{ct}) 46 | val = bearing.(variables{ct}); 47 | else 48 | val = mfile.(variables{ct}); 49 | end 50 | 51 | % Handle unstructured data 52 | % e.g. numeric data in string type or missing data 53 | if ischar(val) 54 | val = str2double(val); 55 | elseif isempty(val) 56 | val = nan; 57 | end 58 | 59 | if numel(val) > 1 60 | val = {val}; 61 | end 62 | end 63 | data.(variables{ct}) = val; 64 | end 65 | end 66 | -------------------------------------------------------------------------------- /algo_dev/sdataProperty.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/sdataProperty.PNG -------------------------------------------------------------------------------- /algo_dev/sensorDriftFeatureClassifySD.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/sensorDriftFeatureClassifySD.PNG -------------------------------------------------------------------------------- /algo_dev/sensorDriftFeatureHistogram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/sensorDriftFeatureHistogram.png -------------------------------------------------------------------------------- /algo_dev/sensorDriftFeatureWeights.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/sensorDriftFeatureWeights.PNG -------------------------------------------------------------------------------- /algo_dev/shaftWearClassifySW.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/shaftWearClassifySW.PNG -------------------------------------------------------------------------------- /algo_dev/shaftWearFeatureWeights.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/shaftWearFeatureWeights.PNG -------------------------------------------------------------------------------- /algo_dev/sm_pump_triplex_Crank_IMAGE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/sm_pump_triplex_Crank_IMAGE.png -------------------------------------------------------------------------------- /algo_dev/sm_pump_triplex_Cylinder_IMAGE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/sm_pump_triplex_Cylinder_IMAGE.png -------------------------------------------------------------------------------- /algo_dev/sm_pump_triplex_FlowSensor_IMAGE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/sm_pump_triplex_FlowSensor_IMAGE.png -------------------------------------------------------------------------------- /algo_dev/sm_pump_triplex_FlowSensor_L_IMAGE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/sm_pump_triplex_FlowSensor_L_IMAGE.png -------------------------------------------------------------------------------- /algo_dev/sm_pump_triplex_Housing_IMAGE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/sm_pump_triplex_Housing_IMAGE.png -------------------------------------------------------------------------------- /algo_dev/sm_pump_triplex_Manifold_IMAGE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/sm_pump_triplex_Manifold_IMAGE.png -------------------------------------------------------------------------------- /algo_dev/sm_pump_triplex_PlungerPart_IMAGE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/sm_pump_triplex_PlungerPart_IMAGE.png -------------------------------------------------------------------------------- /algo_dev/sm_pump_triplex_Plunger_IMAGE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/sm_pump_triplex_Plunger_IMAGE.png -------------------------------------------------------------------------------- /algo_dev/sm_pump_triplex_Pump_IMAGE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/sm_pump_triplex_Pump_IMAGE.png -------------------------------------------------------------------------------- /algo_dev/sm_pump_triplex_Rod_IMAGE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/sm_pump_triplex_Rod_IMAGE.png -------------------------------------------------------------------------------- /algo_dev/sm_pump_triplex_Seal_Leak_Off_IMAGE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/sm_pump_triplex_Seal_Leak_Off_IMAGE.png -------------------------------------------------------------------------------- /algo_dev/sm_pump_triplex_Seal_Leak_On_IMAGE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/sm_pump_triplex_Seal_Leak_On_IMAGE.png -------------------------------------------------------------------------------- /algo_dev/sm_pump_triplex_Valve_Vis_IMAGE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/sm_pump_triplex_Valve_Vis_IMAGE.png -------------------------------------------------------------------------------- /algo_dev/specKurtosis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/specKurtosis.png -------------------------------------------------------------------------------- /algo_dev/spectrumKurtosis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/spectrumKurtosis.png -------------------------------------------------------------------------------- /algo_dev/tachoPulsesoutput.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/tachoPulsesoutput.PNG -------------------------------------------------------------------------------- /algo_dev/tallData.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/tallData.PNG -------------------------------------------------------------------------------- /algo_dev/vibrationDataVisualization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/vibrationDataVisualization.png -------------------------------------------------------------------------------- /algo_dev/writeMFPTBearing.m: -------------------------------------------------------------------------------- 1 | function writeMFPTBearing(filename, data) 2 | % Append data to a file, used by the WriteToMemberFcn of a 3 | % fileEnsembleDatastore. 4 | % 5 | % Inputs: 6 | % filename - string with name of file to write to 7 | % data - a structure with data to write 8 | 9 | % Copyright 2017-2018 The MathWorks, Inc. 10 | 11 | save(filename, '-append', '-struct', 'data'); 12 | end -------------------------------------------------------------------------------- /algo_dev/xxbatteryDischargeChargeCurve.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/xxbatteryDischargeChargeCurve.jpg -------------------------------------------------------------------------------- /algo_dev/xxbatteryEquivalentCircuit.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/algo_dev/xxbatteryEquivalentCircuit.jpg -------------------------------------------------------------------------------- /cn-deep-learning-vs-machine-learning-ebook.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/cn-deep-learning-vs-machine-learning-ebook.pdf -------------------------------------------------------------------------------- /estimating-remaining-useful-life-ebook.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/estimating-remaining-useful-life-ebook.pdf -------------------------------------------------------------------------------- /faultBand/withSideband.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultBand/withSideband.fig -------------------------------------------------------------------------------- /faultBand/withSideband.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultBand/withSideband.jpg -------------------------------------------------------------------------------- /faultBand/withoutSideband.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultBand/withoutSideband.fig -------------------------------------------------------------------------------- /faultBand/withoutSideband.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultBand/withoutSideband.jpg -------------------------------------------------------------------------------- /faultDetectionAndPrognose/ARMAMODEL.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/ARMAMODEL.PNG -------------------------------------------------------------------------------- /faultDetectionAndPrognose/ARXParaEstimator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/ARXParaEstimator.png -------------------------------------------------------------------------------- /faultDetectionAndPrognose/ARXParaEstimatorWithLocation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/ARXParaEstimatorWithLocation.png -------------------------------------------------------------------------------- /faultDetectionAndPrognose/ChangePointResult.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/ChangePointResult.PNG -------------------------------------------------------------------------------- /faultDetectionAndPrognose/ChemicalProcessFaultDetectionUsingDeepLearningExample_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/ChemicalProcessFaultDetectionUsingDeepLearningExample_01.png -------------------------------------------------------------------------------- /faultDetectionAndPrognose/ChemicalProcessFaultDetectionUsingDeepLearningExample_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/ChemicalProcessFaultDetectionUsingDeepLearningExample_02.png -------------------------------------------------------------------------------- /faultDetectionAndPrognose/ChemicalProcessFaultDetectionUsingDeepLearningExample_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/ChemicalProcessFaultDetectionUsingDeepLearningExample_03.png -------------------------------------------------------------------------------- /faultDetectionAndPrognose/ChemicalProcessFaultDetectionUsingDeepLearningExample_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/ChemicalProcessFaultDetectionUsingDeepLearningExample_04.png -------------------------------------------------------------------------------- /faultDetectionAndPrognose/ResponseComparision.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/ResponseComparision.png -------------------------------------------------------------------------------- /faultDetectionAndPrognose/ResponseComparisionSetofModels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/ResponseComparisionSetofModels.png -------------------------------------------------------------------------------- /faultDetectionAndPrognose/ans.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/ans.PNG -------------------------------------------------------------------------------- /faultDetectionAndPrognose/clfResult.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/clfResult.png -------------------------------------------------------------------------------- /faultDetectionAndPrognose/faultfreeTraining.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/faultfreeTraining.PNG -------------------------------------------------------------------------------- /faultDetectionAndPrognose/faultyTraining.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/faultyTraining.PNG -------------------------------------------------------------------------------- /faultDetectionAndPrognose/helperPreprocess.m: -------------------------------------------------------------------------------- 1 | function processed = helperPreprocess(mydata,limit) 2 | H = size(mydata); 3 | processed = {}; 4 | for ind = 1:limit:H 5 | x = mydata(ind:(ind+(limit-1)),4:end); 6 | processed = [processed; x']; 7 | end 8 | end -------------------------------------------------------------------------------- /faultDetectionAndPrognose/inputOutputData.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/inputOutputData.png -------------------------------------------------------------------------------- /faultDetectionAndPrognose/mdlPara.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/mdlPara.png -------------------------------------------------------------------------------- /faultDetectionAndPrognose/measuredResponseSegment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/measuredResponseSegment.png -------------------------------------------------------------------------------- /faultDetectionAndPrognose/mechanicalSystem.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/mechanicalSystem.PNG -------------------------------------------------------------------------------- /faultDetectionAndPrognose/parameterValueSegmented.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/parameterValueSegmented.png -------------------------------------------------------------------------------- /faultDetectionAndPrognose/pdmARMASpectrumPlot.m: -------------------------------------------------------------------------------- 1 | function idARMASpectrumPlot(a, c, t, cov) 2 | %idARMASpectrumPlot Plot the output spectrum for current estimate of ARMA 3 | %model. 4 | % Inputs: 5 | % a: A polynomial estimate at time t. 6 | % c: C polynomial estimate. 7 | % t: The current time value. 8 | % cov: Parameter vector covariance matrix. 9 | 10 | % Copyright 2015 The MathWorks, Inc. 11 | 12 | persistent DataSrc TextObj CL 13 | 14 | if t==0 15 | % Fetch the starting system (healthy state) 16 | sys = idpoly(a,[],c,'Ts',1/256); % original system for reference 17 | sys = setcov(sys, cov); 18 | sys2 = sys; % second system whose parameters adapt (originally same as sys) 19 | % Generate a spectrum plot for the reference (sys) and adapting (sys2) 20 | % systems 21 | h = spectrumplot(gca,sys,sys2); 22 | % View peak response marker 23 | showCharacteristic(h,'PeakResponse') 24 | % View 2-std (99.7%) confidence region 25 | showConfidence(h, 3) 26 | % Add barrier line for visual inspection of condition 27 | line([10 80 80 150 150 804],[21.3*[1 1] 0.4*[1 1] -20*[1 1]],'color','k','LineWidth',2) 28 | % Fetch the data source corresponding to the adapting system sys2 and 29 | % cache it for updating. 30 | DataSrc = h.Responses(2).DataSrc; % the data source 31 | % Create a text object to display the "good" or "fault" tag 32 | TextObj = text(123, 19,' ','FontSize',14); 33 | axis([10 500 -40 30]) 34 | grid on 35 | 36 | % Fetch the classifier 37 | CL = evalin('base','cl'); 38 | 39 | elseif rem(t,2)==0 % make only 100 updates for speed 40 | % Fetch the data source 41 | Model = DataSrc.Model; 42 | % Update the model parameters and covariance 43 | Model.a = a; Model.c = c; Model = setcov(Model, cov); 44 | % Update data source with the latest model. This causes the plot to 45 | % update. 46 | DataSrc.Model = Model; 47 | % Compute poles of the latest model 48 | p = esort(pole(noise2meas(Model))); 49 | % Predict the data class (good or faulty) using dominant poles of the 50 | % model 51 | [pr, score] = predict(CL, [real(p(1)),imag(p(1)),real(p(3)),imag(p(3))]); 52 | % Display the result of prediction. Call the results "tentative" if 53 | % the prediction score is close to the boundary of separation. 54 | add = ''; 55 | if abs(score(1))<0.3 56 | add = ' (tentative)'; 57 | end 58 | if strcmp(pr,'good') 59 | TextObj.String = ['Good',add]; 60 | TextObj.Color = [0 .5 0]; 61 | else 62 | TextObj.String = ['Fault',add]; 63 | TextObj.Color = [0.9 0 0]; 64 | end 65 | end 66 | -------------------------------------------------------------------------------- /faultDetectionAndPrognose/pdmDeterioratingSystemEstimation.slxc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/pdmDeterioratingSystemEstimation.slxc -------------------------------------------------------------------------------- /faultDetectionAndPrognose/pdmMechanicalSystem.slxc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/pdmMechanicalSystem.slxc -------------------------------------------------------------------------------- /faultDetectionAndPrognose/powerSpecFault.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/powerSpecFault.png -------------------------------------------------------------------------------- /faultDetectionAndPrognose/powerSpecWithCI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/powerSpecWithCI.png -------------------------------------------------------------------------------- /faultDetectionAndPrognose/powerSpecfaultynormal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/powerSpecfaultynormal.png -------------------------------------------------------------------------------- /faultDetectionAndPrognose/residualCorrelationship.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/residualCorrelationship.png -------------------------------------------------------------------------------- /faultDetectionAndPrognose/residueCorrelation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/residueCorrelation.png -------------------------------------------------------------------------------- /faultDetectionAndPrognose/scope.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/scope.PNG -------------------------------------------------------------------------------- /faultDetectionAndPrognose/scopeDeterioratingSystem.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/scopeDeterioratingSystem.PNG -------------------------------------------------------------------------------- /faultDetectionAndPrognose/scopeEOF.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/scopeEOF.PNG -------------------------------------------------------------------------------- /faultDetectionAndPrognose/scopeSingle.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/scopeSingle.PNG -------------------------------------------------------------------------------- /faultDetectionAndPrognose/timeVaryingEsti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/faultDetectionAndPrognose/timeVaryingEsti.png -------------------------------------------------------------------------------- /modelUpdate/ModelParameters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/modelUpdate/ModelParameters.png -------------------------------------------------------------------------------- /modelUpdate/TestdataHead5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/modelUpdate/TestdataHead5.PNG -------------------------------------------------------------------------------- /modelUpdate/estimatedRUL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/modelUpdate/estimatedRUL.png -------------------------------------------------------------------------------- /modelUpdate/modelPrioir.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/modelUpdate/modelPrioir.PNG -------------------------------------------------------------------------------- /monotonicity/compare.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/monotonicity/compare.jpg -------------------------------------------------------------------------------- /monotonicity/multiVar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/monotonicity/multiVar.jpg -------------------------------------------------------------------------------- /monotonicity/prognosability.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/monotonicity/prognosability.jpg -------------------------------------------------------------------------------- /monotonicity/singleVar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/monotonicity/singleVar.jpg -------------------------------------------------------------------------------- /monotonicity/trend.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/monotonicity/trend.jpg -------------------------------------------------------------------------------- /monotonicity/trendability.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/monotonicity/trendability.jpg -------------------------------------------------------------------------------- /other_pics/1570541294351.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/other_pics/1570541294351.jpg -------------------------------------------------------------------------------- /other_pics/image-20200122094152378.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/other_pics/image-20200122094152378.png -------------------------------------------------------------------------------- /other_pics/modelTypesOverview.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/other_pics/modelTypesOverview.PNG -------------------------------------------------------------------------------- /reveal.js/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 11 4 | after_script: 5 | - npm run build -- retire 6 | -------------------------------------------------------------------------------- /reveal.js/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | Please keep the [issue tracker](http://github.com/hakimel/reveal.js/issues) limited to **bug reports**, **feature requests** and **pull requests**. 4 | 5 | 6 | ### Personal Support 7 | If you have personal support or setup questions the best place to ask those are [StackOverflow](http://stackoverflow.com/questions/tagged/reveal.js). 8 | 9 | 10 | ### Bug Reports 11 | When reporting a bug make sure to include information about which browser and operating system you are on as well as the necessary steps to reproduce the issue. If possible please include a link to a sample presentation where the bug can be tested. 12 | 13 | 14 | ### Pull Requests 15 | - Should follow the coding style of the file you work in, most importantly: 16 | - Tabs to indent 17 | - Single-quoted strings 18 | - Should be made towards the **dev branch** 19 | - Should be submitted from a feature/topic branch (not your master) 20 | 21 | 22 | ### Plugins 23 | Please do not submit plugins as pull requests. They should be maintained in their own separate repository. More information here: https://github.com/hakimel/reveal.js/wiki/Plugin-Guidelines 24 | -------------------------------------------------------------------------------- /reveal.js/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2019 Hakim El Hattab, http://hakim.se, and reveal.js contributors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /reveal.js/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reveal.js", 3 | "version": "3.8.0", 4 | "main": [ 5 | "js/reveal.js", 6 | "css/reveal.css" 7 | ], 8 | "homepage": "http://revealjs.com", 9 | "license": "MIT", 10 | "description": "The HTML Presentation Framework", 11 | "authors": [ 12 | "Hakim El Hattab " 13 | ], 14 | "repository": { 15 | "type": "git", 16 | "url": "git://github.com/hakimel/reveal.js.git" 17 | }, 18 | "ignore": [ 19 | "**/.*", 20 | "node_modules", 21 | "bower_components", 22 | "test" 23 | ] 24 | } -------------------------------------------------------------------------------- /reveal.js/css/print/pdf.css: -------------------------------------------------------------------------------- 1 | /** 2 | * This stylesheet is used to print reveal.js 3 | * presentations to PDF. 4 | * 5 | * https://github.com/hakimel/reveal.js#pdf-export 6 | */ 7 | 8 | * { 9 | -webkit-print-color-adjust: exact; 10 | } 11 | 12 | body { 13 | margin: 0 auto !important; 14 | border: 0; 15 | padding: 0; 16 | float: none !important; 17 | overflow: visible; 18 | } 19 | 20 | html { 21 | width: 100%; 22 | height: 100%; 23 | overflow: visible; 24 | } 25 | 26 | /* Remove any elements not needed in print. */ 27 | .nestedarrow, 28 | .reveal .controls, 29 | .reveal .progress, 30 | .reveal .playback, 31 | .reveal.overview, 32 | .fork-reveal, 33 | .share-reveal, 34 | .state-background { 35 | display: none !important; 36 | } 37 | 38 | h1, h2, h3, h4, h5, h6 { 39 | text-shadow: 0 0 0 #000 !important; 40 | } 41 | 42 | .reveal pre code { 43 | overflow: hidden !important; 44 | font-family: Courier, 'Courier New', monospace !important; 45 | } 46 | 47 | ul, ol, div, p { 48 | visibility: visible; 49 | position: static; 50 | width: auto; 51 | height: auto; 52 | display: block; 53 | overflow: visible; 54 | margin: auto; 55 | } 56 | .reveal { 57 | width: auto !important; 58 | height: auto !important; 59 | overflow: hidden !important; 60 | } 61 | .reveal .slides { 62 | position: static; 63 | width: 100% !important; 64 | height: auto !important; 65 | zoom: 1 !important; 66 | 67 | left: auto; 68 | top: auto; 69 | margin: 0 !important; 70 | padding: 0 !important; 71 | 72 | overflow: visible; 73 | display: block; 74 | 75 | perspective: none; 76 | perspective-origin: 50% 50%; 77 | } 78 | 79 | .reveal .slides .pdf-page { 80 | position: relative; 81 | overflow: hidden; 82 | z-index: 1; 83 | 84 | page-break-after: always; 85 | } 86 | 87 | .reveal .slides section { 88 | visibility: visible !important; 89 | display: block !important; 90 | position: absolute !important; 91 | 92 | margin: 0 !important; 93 | padding: 0 !important; 94 | box-sizing: border-box !important; 95 | min-height: 1px; 96 | 97 | opacity: 1 !important; 98 | 99 | transform-style: flat !important; 100 | transform: none !important; 101 | } 102 | 103 | .reveal section.stack { 104 | position: relative !important; 105 | margin: 0 !important; 106 | padding: 0 !important; 107 | page-break-after: avoid !important; 108 | height: auto !important; 109 | min-height: auto !important; 110 | } 111 | 112 | .reveal img { 113 | box-shadow: none; 114 | } 115 | 116 | .reveal .roll { 117 | overflow: visible; 118 | line-height: 1em; 119 | } 120 | 121 | /* Slide backgrounds are placed inside of their slide when exporting to PDF */ 122 | .reveal .slide-background { 123 | display: block !important; 124 | position: absolute; 125 | top: 0; 126 | left: 0; 127 | width: 100%; 128 | height: 100%; 129 | z-index: auto !important; 130 | } 131 | 132 | /* Display slide speaker notes when 'showNotes' is enabled */ 133 | .reveal.show-notes { 134 | max-width: none; 135 | max-height: none; 136 | } 137 | .reveal .speaker-notes-pdf { 138 | display: block; 139 | width: 100%; 140 | height: auto; 141 | max-height: none; 142 | top: auto; 143 | right: auto; 144 | bottom: auto; 145 | left: auto; 146 | z-index: 100; 147 | } 148 | 149 | /* Layout option which makes notes appear on a separate page */ 150 | .reveal .speaker-notes-pdf[data-layout="separate-page"] { 151 | position: relative; 152 | color: inherit; 153 | background-color: transparent; 154 | padding: 20px; 155 | page-break-after: always; 156 | border: 0; 157 | } 158 | 159 | /* Display slide numbers when 'slideNumber' is enabled */ 160 | .reveal .slide-number-pdf { 161 | display: block; 162 | position: absolute; 163 | font-size: 14px; 164 | } 165 | -------------------------------------------------------------------------------- /reveal.js/css/reset.css: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ 2 | v4.0 | 20180602 3 | License: none (public domain) 4 | */ 5 | 6 | html, body, div, span, applet, object, iframe, 7 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 8 | a, abbr, acronym, address, big, cite, code, 9 | del, dfn, em, img, ins, kbd, q, s, samp, 10 | small, strike, strong, sub, sup, tt, var, 11 | b, u, i, center, 12 | dl, dt, dd, ol, ul, li, 13 | fieldset, form, label, legend, 14 | table, caption, tbody, tfoot, thead, tr, th, td, 15 | article, aside, canvas, details, embed, 16 | figure, figcaption, footer, header, hgroup, 17 | main, menu, nav, output, ruby, section, summary, 18 | time, mark, audio, video { 19 | margin: 0; 20 | padding: 0; 21 | border: 0; 22 | font-size: 100%; 23 | font: inherit; 24 | vertical-align: baseline; 25 | } 26 | /* HTML5 display-role reset for older browsers */ 27 | article, aside, details, figcaption, figure, 28 | footer, header, hgroup, main, menu, nav, section { 29 | display: block; 30 | } -------------------------------------------------------------------------------- /reveal.js/css/theme/README.md: -------------------------------------------------------------------------------- 1 | ## Dependencies 2 | 3 | Themes are written using Sass to keep things modular and reduce the need for repeated selectors across files. Make sure that you have the reveal.js development environment including the Grunt dependencies installed before proceeding: https://github.com/hakimel/reveal.js#full-setup 4 | 5 | ## Creating a Theme 6 | 7 | To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js)) when you run `npm run build -- css-themes`. 8 | 9 | Each theme file does four things in the following order: 10 | 11 | 1. **Include [/css/theme/template/mixins.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/mixins.scss)** 12 | Shared utility functions. 13 | 14 | 2. **Include [/css/theme/template/settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss)** 15 | Declares a set of custom variables that the template file (step 4) expects. Can be overridden in step 3. 16 | 17 | 3. **Override** 18 | This is where you override the default theme. Either by specifying variables (see [settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss) for reference) or by adding any selectors and styles you please. 19 | 20 | 4. **Include [/css/theme/template/theme.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/theme.scss)** 21 | The template theme file which will generate final CSS output based on the currently defined variables. 22 | -------------------------------------------------------------------------------- /reveal.js/css/theme/source/beige.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Beige theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(../../lib/font/league-gothic/league-gothic.css); 17 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainColor: #333; 22 | $headingColor: #333; 23 | $headingTextShadow: none; 24 | $backgroundColor: #f7f3de; 25 | $linkColor: #8b743d; 26 | $linkColorHover: lighten( $linkColor, 20% ); 27 | $selectionBackgroundColor: rgba(79, 64, 28, 0.99); 28 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 29 | 30 | // Background generator 31 | @mixin bodyBackground() { 32 | @include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) ); 33 | } 34 | 35 | 36 | 37 | // Theme template ------------------------------ 38 | @import "../template/theme"; 39 | // --------------------------------------------- -------------------------------------------------------------------------------- /reveal.js/css/theme/source/black.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. This is the opposite of the 'white' theme. 3 | * 4 | * By Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 16 | 17 | 18 | // Override theme settings (see ../template/settings.scss) 19 | $backgroundColor: #191919; 20 | 21 | $mainColor: #fff; 22 | $headingColor: #fff; 23 | 24 | $mainFontSize: 42px; 25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif; 26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif; 27 | $headingTextShadow: none; 28 | $headingLetterSpacing: normal; 29 | $headingTextTransform: uppercase; 30 | $headingFontWeight: 600; 31 | $linkColor: #42affa; 32 | $linkColorHover: lighten( $linkColor, 15% ); 33 | $selectionBackgroundColor: lighten( $linkColor, 25% ); 34 | 35 | $heading1Size: 2.5em; 36 | $heading2Size: 1.6em; 37 | $heading3Size: 1.3em; 38 | $heading4Size: 1.0em; 39 | 40 | section.has-light-background { 41 | &, h1, h2, h3, h4, h5, h6 { 42 | color: #222; 43 | } 44 | } 45 | 46 | 47 | // Theme template ------------------------------ 48 | @import "../template/theme"; 49 | // --------------------------------------------- -------------------------------------------------------------------------------- /reveal.js/css/theme/source/blood.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Blood theme for reveal.js 3 | * Author: Walther http://github.com/Walther 4 | * 5 | * Designed to be used with highlight.js theme 6 | * "monokai_sublime.css" available from 7 | * https://github.com/isagalaev/highlight.js/ 8 | * 9 | * For other themes, change $codeBackground accordingly. 10 | * 11 | */ 12 | 13 | // Default mixins and settings ----------------- 14 | @import "../template/mixins"; 15 | @import "../template/settings"; 16 | // --------------------------------------------- 17 | 18 | // Include theme-specific fonts 19 | 20 | @import url(https://fonts.googleapis.com/css?family=Ubuntu:300,700,300italic,700italic); 21 | 22 | // Colors used in the theme 23 | $blood: #a23; 24 | $coal: #222; 25 | $codeBackground: #23241f; 26 | 27 | $backgroundColor: $coal; 28 | 29 | // Main text 30 | $mainFont: Ubuntu, 'sans-serif'; 31 | $mainColor: #eee; 32 | 33 | // Headings 34 | $headingFont: Ubuntu, 'sans-serif'; 35 | $headingTextShadow: 2px 2px 2px $coal; 36 | 37 | // h1 shadow, borrowed humbly from 38 | // (c) Default theme by Hakim El Hattab 39 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 40 | 41 | // Links 42 | $linkColor: $blood; 43 | $linkColorHover: lighten( $linkColor, 20% ); 44 | 45 | // Text selection 46 | $selectionBackgroundColor: $blood; 47 | $selectionColor: #fff; 48 | 49 | 50 | // Theme template ------------------------------ 51 | @import "../template/theme"; 52 | // --------------------------------------------- 53 | 54 | // some overrides after theme template import 55 | 56 | .reveal p { 57 | font-weight: 300; 58 | text-shadow: 1px 1px $coal; 59 | } 60 | 61 | .reveal h1, 62 | .reveal h2, 63 | .reveal h3, 64 | .reveal h4, 65 | .reveal h5, 66 | .reveal h6 { 67 | font-weight: 700; 68 | } 69 | 70 | .reveal p code { 71 | background-color: $codeBackground; 72 | display: inline-block; 73 | border-radius: 7px; 74 | } 75 | 76 | .reveal small code { 77 | vertical-align: baseline; 78 | } -------------------------------------------------------------------------------- /reveal.js/css/theme/source/league.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * League theme for reveal.js. 3 | * 4 | * This was the default theme pre-3.0.0. 5 | * 6 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(../../lib/font/league-gothic/league-gothic.css); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | // Override theme settings (see ../template/settings.scss) 22 | $headingTextShadow: 0px 0px 6px rgba(0,0,0,0.2); 23 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 24 | 25 | // Background generator 26 | @mixin bodyBackground() { 27 | @include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) ); 28 | } 29 | 30 | 31 | 32 | // Theme template ------------------------------ 33 | @import "../template/theme"; 34 | // --------------------------------------------- -------------------------------------------------------------------------------- /reveal.js/css/theme/source/moon.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Dark theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/league-gothic/league-gothic.css); 16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 17 | 18 | /** 19 | * Solarized colors by Ethan Schoonover 20 | */ 21 | html * { 22 | color-profile: sRGB; 23 | rendering-intent: auto; 24 | } 25 | 26 | // Solarized colors 27 | $base03: #002b36; 28 | $base02: #073642; 29 | $base01: #586e75; 30 | $base00: #657b83; 31 | $base0: #839496; 32 | $base1: #93a1a1; 33 | $base2: #eee8d5; 34 | $base3: #fdf6e3; 35 | $yellow: #b58900; 36 | $orange: #cb4b16; 37 | $red: #dc322f; 38 | $magenta: #d33682; 39 | $violet: #6c71c4; 40 | $blue: #268bd2; 41 | $cyan: #2aa198; 42 | $green: #859900; 43 | 44 | // Override theme settings (see ../template/settings.scss) 45 | $mainColor: $base1; 46 | $headingColor: $base2; 47 | $headingTextShadow: none; 48 | $backgroundColor: $base03; 49 | $linkColor: $blue; 50 | $linkColorHover: lighten( $linkColor, 20% ); 51 | $selectionBackgroundColor: $magenta; 52 | 53 | 54 | 55 | // Theme template ------------------------------ 56 | @import "../template/theme"; 57 | // --------------------------------------------- 58 | -------------------------------------------------------------------------------- /reveal.js/css/theme/source/night.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(https://fonts.googleapis.com/css?family=Montserrat:700); 16 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic); 17 | 18 | 19 | // Override theme settings (see ../template/settings.scss) 20 | $backgroundColor: #111; 21 | 22 | $mainFont: 'Open Sans', sans-serif; 23 | $linkColor: #e7ad52; 24 | $linkColorHover: lighten( $linkColor, 20% ); 25 | $headingFont: 'Montserrat', Impact, sans-serif; 26 | $headingTextShadow: none; 27 | $headingLetterSpacing: -0.03em; 28 | $headingTextTransform: none; 29 | $selectionBackgroundColor: #e7ad52; 30 | 31 | 32 | // Theme template ------------------------------ 33 | @import "../template/theme"; 34 | // --------------------------------------------- -------------------------------------------------------------------------------- /reveal.js/css/theme/source/serif.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is brown. 4 | * 5 | * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed. 6 | */ 7 | 8 | 9 | // Default mixins and settings ----------------- 10 | @import "../template/mixins"; 11 | @import "../template/settings"; 12 | // --------------------------------------------- 13 | 14 | 15 | 16 | // Override theme settings (see ../template/settings.scss) 17 | $mainFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 18 | $mainColor: #000; 19 | $headingFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 20 | $headingColor: #383D3D; 21 | $headingTextShadow: none; 22 | $headingTextTransform: none; 23 | $backgroundColor: #F0F1EB; 24 | $linkColor: #51483D; 25 | $linkColorHover: lighten( $linkColor, 20% ); 26 | $selectionBackgroundColor: #26351C; 27 | 28 | .reveal a { 29 | line-height: 1.3em; 30 | } 31 | 32 | 33 | // Theme template ------------------------------ 34 | @import "../template/theme"; 35 | // --------------------------------------------- 36 | -------------------------------------------------------------------------------- /reveal.js/css/theme/source/simple.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is darkblue. 4 | * 5 | * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed. 6 | * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | 22 | // Override theme settings (see ../template/settings.scss) 23 | $mainFont: 'Lato', sans-serif; 24 | $mainColor: #000; 25 | $headingFont: 'News Cycle', Impact, sans-serif; 26 | $headingColor: #000; 27 | $headingTextShadow: none; 28 | $headingTextTransform: none; 29 | $backgroundColor: #fff; 30 | $linkColor: #00008B; 31 | $linkColorHover: lighten( $linkColor, 20% ); 32 | $selectionBackgroundColor: rgba(0, 0, 0, 0.99); 33 | 34 | section.has-dark-background { 35 | &, h1, h2, h3, h4, h5, h6 { 36 | color: #fff; 37 | } 38 | } 39 | 40 | 41 | // Theme template ------------------------------ 42 | @import "../template/theme"; 43 | // --------------------------------------------- -------------------------------------------------------------------------------- /reveal.js/css/theme/source/sky.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Sky theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic); 17 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainFont: 'Open Sans', sans-serif; 22 | $mainColor: #333; 23 | $headingFont: 'Quicksand', sans-serif; 24 | $headingColor: #333; 25 | $headingLetterSpacing: -0.08em; 26 | $headingTextShadow: none; 27 | $backgroundColor: #f7fbfc; 28 | $linkColor: #3b759e; 29 | $linkColorHover: lighten( $linkColor, 20% ); 30 | $selectionBackgroundColor: #134674; 31 | 32 | // Fix links so they are not cut off 33 | .reveal a { 34 | line-height: 1.3em; 35 | } 36 | 37 | // Background generator 38 | @mixin bodyBackground() { 39 | @include radial-gradient( #add9e4, #f7fbfc ); 40 | } 41 | 42 | 43 | 44 | // Theme template ------------------------------ 45 | @import "../template/theme"; 46 | // --------------------------------------------- 47 | -------------------------------------------------------------------------------- /reveal.js/css/theme/source/solarized.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Light theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/league-gothic/league-gothic.css); 16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 17 | 18 | 19 | /** 20 | * Solarized colors by Ethan Schoonover 21 | */ 22 | html * { 23 | color-profile: sRGB; 24 | rendering-intent: auto; 25 | } 26 | 27 | // Solarized colors 28 | $base03: #002b36; 29 | $base02: #073642; 30 | $base01: #586e75; 31 | $base00: #657b83; 32 | $base0: #839496; 33 | $base1: #93a1a1; 34 | $base2: #eee8d5; 35 | $base3: #fdf6e3; 36 | $yellow: #b58900; 37 | $orange: #cb4b16; 38 | $red: #dc322f; 39 | $magenta: #d33682; 40 | $violet: #6c71c4; 41 | $blue: #268bd2; 42 | $cyan: #2aa198; 43 | $green: #859900; 44 | 45 | // Override theme settings (see ../template/settings.scss) 46 | $mainColor: $base00; 47 | $headingColor: $base01; 48 | $headingTextShadow: none; 49 | $backgroundColor: $base3; 50 | $linkColor: $blue; 51 | $linkColorHover: lighten( $linkColor, 20% ); 52 | $selectionBackgroundColor: $magenta; 53 | 54 | // Background generator 55 | // @mixin bodyBackground() { 56 | // @include radial-gradient( rgba($base3,1), rgba(lighten($base3, 20%),1) ); 57 | // } 58 | 59 | 60 | 61 | // Theme template ------------------------------ 62 | @import "../template/theme"; 63 | // --------------------------------------------- 64 | -------------------------------------------------------------------------------- /reveal.js/css/theme/source/white.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * White theme for reveal.js. This is the opposite of the 'black' theme. 3 | * 4 | * By Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 16 | 17 | 18 | // Override theme settings (see ../template/settings.scss) 19 | $backgroundColor: #fff; 20 | 21 | $mainColor: #222; 22 | $headingColor: #222; 23 | 24 | $mainFontSize: 42px; 25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif; 26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif; 27 | $headingTextShadow: none; 28 | $headingLetterSpacing: normal; 29 | $headingTextTransform: uppercase; 30 | $headingFontWeight: 600; 31 | $linkColor: #2a76dd; 32 | $linkColorHover: lighten( $linkColor, 15% ); 33 | $selectionBackgroundColor: lighten( $linkColor, 25% ); 34 | 35 | $heading1Size: 2.5em; 36 | $heading2Size: 1.6em; 37 | $heading3Size: 1.3em; 38 | $heading4Size: 1.0em; 39 | 40 | section.has-dark-background { 41 | &, h1, h2, h3, h4, h5, h6 { 42 | color: #fff; 43 | } 44 | } 45 | 46 | 47 | // Theme template ------------------------------ 48 | @import "../template/theme"; 49 | // --------------------------------------------- -------------------------------------------------------------------------------- /reveal.js/css/theme/template/mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin vertical-gradient( $top, $bottom ) { 2 | background: $top; 3 | background: -moz-linear-gradient( top, $top 0%, $bottom 100% ); 4 | background: -webkit-gradient( linear, left top, left bottom, color-stop(0%,$top), color-stop(100%,$bottom) ); 5 | background: -webkit-linear-gradient( top, $top 0%, $bottom 100% ); 6 | background: -o-linear-gradient( top, $top 0%, $bottom 100% ); 7 | background: -ms-linear-gradient( top, $top 0%, $bottom 100% ); 8 | background: linear-gradient( top, $top 0%, $bottom 100% ); 9 | } 10 | 11 | @mixin horizontal-gradient( $top, $bottom ) { 12 | background: $top; 13 | background: -moz-linear-gradient( left, $top 0%, $bottom 100% ); 14 | background: -webkit-gradient( linear, left top, right top, color-stop(0%,$top), color-stop(100%,$bottom) ); 15 | background: -webkit-linear-gradient( left, $top 0%, $bottom 100% ); 16 | background: -o-linear-gradient( left, $top 0%, $bottom 100% ); 17 | background: -ms-linear-gradient( left, $top 0%, $bottom 100% ); 18 | background: linear-gradient( left, $top 0%, $bottom 100% ); 19 | } 20 | 21 | @mixin radial-gradient( $outer, $inner, $type: circle ) { 22 | background: $outer; 23 | background: -moz-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 24 | background: -webkit-gradient( radial, center center, 0px, center center, 100%, color-stop(0%,$inner), color-stop(100%,$outer) ); 25 | background: -webkit-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 26 | background: -o-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 27 | background: -ms-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 28 | background: radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 29 | } -------------------------------------------------------------------------------- /reveal.js/css/theme/template/settings.scss: -------------------------------------------------------------------------------- 1 | // Base settings for all themes that can optionally be 2 | // overridden by the super-theme 3 | 4 | // Background of the presentation 5 | $backgroundColor: #2b2b2b; 6 | 7 | // Primary/body text 8 | $mainFont: 'Lato', sans-serif; 9 | $mainFontSize: 40px; 10 | $mainColor: #eee; 11 | 12 | // Vertical spacing between blocks of text 13 | $blockMargin: 20px; 14 | 15 | // Headings 16 | $headingMargin: 0 0 $blockMargin 0; 17 | $headingFont: 'League Gothic', Impact, sans-serif; 18 | $headingColor: #eee; 19 | $headingLineHeight: 1.2; 20 | $headingLetterSpacing: normal; 21 | $headingTextTransform: uppercase; 22 | $headingTextShadow: none; 23 | $headingFontWeight: normal; 24 | $heading1TextShadow: $headingTextShadow; 25 | 26 | $heading1Size: 3.77em; 27 | $heading2Size: 2.11em; 28 | $heading3Size: 1.55em; 29 | $heading4Size: 1.00em; 30 | 31 | $codeFont: monospace; 32 | 33 | // Links and actions 34 | $linkColor: #13DAEC; 35 | $linkColorHover: lighten( $linkColor, 20% ); 36 | 37 | // Text selection 38 | $selectionBackgroundColor: #FF5E99; 39 | $selectionColor: #fff; 40 | 41 | // Generates the presentation background, can be overridden 42 | // to return a background image or gradient 43 | @mixin bodyBackground() { 44 | background: $backgroundColor; 45 | } 46 | -------------------------------------------------------------------------------- /reveal.js/lib/css/monokai.css: -------------------------------------------------------------------------------- 1 | /* 2 | Monokai style - ported by Luigi Maselli - http://grigio.org 3 | */ 4 | 5 | .hljs { 6 | display: block; 7 | overflow-x: auto; 8 | padding: 0.5em; 9 | background: #272822; 10 | color: #ddd; 11 | } 12 | 13 | .hljs-tag, 14 | .hljs-keyword, 15 | .hljs-selector-tag, 16 | .hljs-literal, 17 | .hljs-strong, 18 | .hljs-name { 19 | color: #f92672; 20 | } 21 | 22 | .hljs-code { 23 | color: #66d9ef; 24 | } 25 | 26 | .hljs-class .hljs-title { 27 | color: white; 28 | } 29 | 30 | .hljs-attribute, 31 | .hljs-symbol, 32 | .hljs-regexp, 33 | .hljs-link { 34 | color: #bf79db; 35 | } 36 | 37 | .hljs-string, 38 | .hljs-bullet, 39 | .hljs-subst, 40 | .hljs-title, 41 | .hljs-section, 42 | .hljs-emphasis, 43 | .hljs-type, 44 | .hljs-built_in, 45 | .hljs-builtin-name, 46 | .hljs-selector-attr, 47 | .hljs-selector-pseudo, 48 | .hljs-addition, 49 | .hljs-variable, 50 | .hljs-template-tag, 51 | .hljs-template-variable { 52 | color: #a6e22e; 53 | } 54 | 55 | .hljs-comment, 56 | .hljs-quote, 57 | .hljs-deletion, 58 | .hljs-meta { 59 | color: #75715e; 60 | } 61 | 62 | .hljs-keyword, 63 | .hljs-selector-tag, 64 | .hljs-literal, 65 | .hljs-doctag, 66 | .hljs-title, 67 | .hljs-section, 68 | .hljs-type, 69 | .hljs-selector-id { 70 | font-weight: bold; 71 | } 72 | -------------------------------------------------------------------------------- /reveal.js/lib/css/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #3f3f3f; 13 | color: #dcdcdc; 14 | } 15 | 16 | .hljs-keyword, 17 | .hljs-selector-tag, 18 | .hljs-tag { 19 | color: #e3ceab; 20 | } 21 | 22 | .hljs-template-tag { 23 | color: #dcdcdc; 24 | } 25 | 26 | .hljs-number { 27 | color: #8cd0d3; 28 | } 29 | 30 | .hljs-variable, 31 | .hljs-template-variable, 32 | .hljs-attribute { 33 | color: #efdcbc; 34 | } 35 | 36 | .hljs-literal { 37 | color: #efefaf; 38 | } 39 | 40 | .hljs-subst { 41 | color: #8f8f8f; 42 | } 43 | 44 | .hljs-title, 45 | .hljs-name, 46 | .hljs-selector-id, 47 | .hljs-selector-class, 48 | .hljs-section, 49 | .hljs-type { 50 | color: #efef8f; 51 | } 52 | 53 | .hljs-symbol, 54 | .hljs-bullet, 55 | .hljs-link { 56 | color: #dca3a3; 57 | } 58 | 59 | .hljs-deletion, 60 | .hljs-string, 61 | .hljs-built_in, 62 | .hljs-builtin-name { 63 | color: #cc9393; 64 | } 65 | 66 | .hljs-addition, 67 | .hljs-comment, 68 | .hljs-quote, 69 | .hljs-meta { 70 | color: #7f9f7f; 71 | } 72 | 73 | 74 | .hljs-emphasis { 75 | font-style: italic; 76 | } 77 | 78 | .hljs-strong { 79 | font-weight: bold; 80 | } 81 | -------------------------------------------------------------------------------- /reveal.js/lib/font/league-gothic/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License (OFL) 2 | http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL 3 | -------------------------------------------------------------------------------- /reveal.js/lib/font/league-gothic/league-gothic.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'League Gothic'; 3 | src: url('league-gothic.eot'); 4 | src: url('league-gothic.eot?#iefix') format('embedded-opentype'), 5 | url('league-gothic.woff') format('woff'), 6 | url('league-gothic.ttf') format('truetype'); 7 | 8 | font-weight: normal; 9 | font-style: normal; 10 | } -------------------------------------------------------------------------------- /reveal.js/lib/font/league-gothic/league-gothic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/reveal.js/lib/font/league-gothic/league-gothic.eot -------------------------------------------------------------------------------- /reveal.js/lib/font/league-gothic/league-gothic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/reveal.js/lib/font/league-gothic/league-gothic.ttf -------------------------------------------------------------------------------- /reveal.js/lib/font/league-gothic/league-gothic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/reveal.js/lib/font/league-gothic/league-gothic.woff -------------------------------------------------------------------------------- /reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.eot -------------------------------------------------------------------------------- /reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.ttf -------------------------------------------------------------------------------- /reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.woff -------------------------------------------------------------------------------- /reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.eot -------------------------------------------------------------------------------- /reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.ttf -------------------------------------------------------------------------------- /reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.woff -------------------------------------------------------------------------------- /reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.eot -------------------------------------------------------------------------------- /reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.ttf -------------------------------------------------------------------------------- /reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.woff -------------------------------------------------------------------------------- /reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot -------------------------------------------------------------------------------- /reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf -------------------------------------------------------------------------------- /reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff -------------------------------------------------------------------------------- /reveal.js/lib/font/source-sans-pro/source-sans-pro.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Source Sans Pro'; 3 | src: url('source-sans-pro-regular.eot'); 4 | src: url('source-sans-pro-regular.eot?#iefix') format('embedded-opentype'), 5 | url('source-sans-pro-regular.woff') format('woff'), 6 | url('source-sans-pro-regular.ttf') format('truetype'); 7 | font-weight: normal; 8 | font-style: normal; 9 | } 10 | 11 | @font-face { 12 | font-family: 'Source Sans Pro'; 13 | src: url('source-sans-pro-italic.eot'); 14 | src: url('source-sans-pro-italic.eot?#iefix') format('embedded-opentype'), 15 | url('source-sans-pro-italic.woff') format('woff'), 16 | url('source-sans-pro-italic.ttf') format('truetype'); 17 | font-weight: normal; 18 | font-style: italic; 19 | } 20 | 21 | @font-face { 22 | font-family: 'Source Sans Pro'; 23 | src: url('source-sans-pro-semibold.eot'); 24 | src: url('source-sans-pro-semibold.eot?#iefix') format('embedded-opentype'), 25 | url('source-sans-pro-semibold.woff') format('woff'), 26 | url('source-sans-pro-semibold.ttf') format('truetype'); 27 | font-weight: 600; 28 | font-style: normal; 29 | } 30 | 31 | @font-face { 32 | font-family: 'Source Sans Pro'; 33 | src: url('source-sans-pro-semibolditalic.eot'); 34 | src: url('source-sans-pro-semibolditalic.eot?#iefix') format('embedded-opentype'), 35 | url('source-sans-pro-semibolditalic.woff') format('woff'), 36 | url('source-sans-pro-semibolditalic.ttf') format('truetype'); 37 | font-weight: 600; 38 | font-style: italic; 39 | } -------------------------------------------------------------------------------- /reveal.js/lib/js/html5shiv.js: -------------------------------------------------------------------------------- 1 | document.createElement('header'); 2 | document.createElement('nav'); 3 | document.createElement('section'); 4 | document.createElement('article'); 5 | document.createElement('aside'); 6 | document.createElement('footer'); 7 | document.createElement('hgroup'); -------------------------------------------------------------------------------- /reveal.js/lib/js/promise.js: -------------------------------------------------------------------------------- 1 | /* MIT | https://github.com/taylorhakes/promise-polyfill */ 2 | !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n()}(0,function(){"use strict";function e(e){var n=this.constructor;return this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){return n.reject(t)})})}function n(){}function t(e){if(!(this instanceof t))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],u(e,this)}function o(e,n){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,t._immediateFn(function(){var t=1===e._state?n.onFulfilled:n.onRejected;if(null!==t){var o;try{o=t(e._value)}catch(f){return void i(n.promise,f)}r(n.promise,o)}else(1===e._state?r:i)(n.promise,e._value)})):e._deferreds.push(n)}function r(e,n){try{if(n===e)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var o=n.then;if(n instanceof t)return e._state=3,e._value=n,void f(e);if("function"==typeof o)return void u(function(e,n){return function(){e.apply(n,arguments)}}(o,n),e)}e._state=1,e._value=n,f(e)}catch(r){i(e,r)}}function i(e,n){e._state=2,e._value=n,f(e)}function f(e){2===e._state&&0===e._deferreds.length&&t._immediateFn(function(){e._handled||t._unhandledRejectionFn(e._value)});for(var n=0,r=e._deferreds.length;r>n;n++)o(e,e._deferreds[n]);e._deferreds=null}function u(e,n){var t=!1;try{e(function(e){t||(t=!0,r(n,e))},function(e){t||(t=!0,i(n,e))})}catch(o){if(t)return;t=!0,i(n,o)}}var c=setTimeout;t.prototype["catch"]=function(e){return this.then(null,e)},t.prototype.then=function(e,t){var r=new this.constructor(n);return o(this,new function(e,n,t){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.promise=t}(e,t,r)),r},t.prototype["finally"]=e,t.all=function(e){return new t(function(n,t){function o(e,f){try{if(f&&("object"==typeof f||"function"==typeof f)){var u=f.then;if("function"==typeof u)return void u.call(f,function(n){o(e,n)},t)}r[e]=f,0==--i&&n(r)}catch(c){t(c)}}if(!e||"undefined"==typeof e.length)throw new TypeError("Promise.all accepts an array");var r=Array.prototype.slice.call(e);if(0===r.length)return n([]);for(var i=r.length,f=0;r.length>f;f++)o(f,r[f])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(n){n(e)})},t.reject=function(e){return new t(function(n,t){t(e)})},t.race=function(e){return new t(function(n,t){for(var o=0,r=e.length;r>o;o++)e[o].then(n,t)})},t._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){c(e,0)},t._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var l=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"Promise"in l?l.Promise.prototype["finally"]||(l.Promise.prototype["finally"]=e):l.Promise=t}); -------------------------------------------------------------------------------- /reveal.js/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reveal.js", 3 | "version": "3.8.0", 4 | "description": "The HTML Presentation Framework", 5 | "homepage": "http://revealjs.com", 6 | "subdomain": "revealjs", 7 | "main": "js/reveal.js", 8 | "scripts": { 9 | "test": "grunt test", 10 | "start": "grunt serve", 11 | "build": "grunt" 12 | }, 13 | "author": { 14 | "name": "Hakim El Hattab", 15 | "email": "hakim.elhattab@gmail.com", 16 | "web": "http://hakim.se" 17 | }, 18 | "repository": { 19 | "type": "git", 20 | "url": "git://github.com/hakimel/reveal.js.git" 21 | }, 22 | "engines": { 23 | "node": ">=9.0.0" 24 | }, 25 | "devDependencies": { 26 | "express": "^4.16.2", 27 | "grunt": "^1.0.4", 28 | "grunt-autoprefixer": "^3.0.4", 29 | "grunt-cli": "^1.3.2", 30 | "grunt-contrib-connect": "^2.0.0", 31 | "grunt-contrib-cssmin": "^3.0.0", 32 | "grunt-contrib-jshint": "^2.0.0", 33 | "grunt-contrib-qunit": "^3.1.0", 34 | "grunt-contrib-uglify": "^3.3.0", 35 | "grunt-contrib-watch": "^1.1.0", 36 | "grunt-sass": "^3.0.2", 37 | "grunt-zip": "~0.17.1", 38 | "load-grunt-tasks": "^4.0.0", 39 | "mustache": "^2.3.0", 40 | "node-sass": "^4.13.1", 41 | "socket.io": "^2.2.0" 42 | }, 43 | "license": "MIT" 44 | } 45 | -------------------------------------------------------------------------------- /reveal.js/plugin/markdown/example.md: -------------------------------------------------------------------------------- 1 | # Markdown Demo 2 | 3 | 4 | 5 | ## External 1.1 6 | 7 | Content 1.1 8 | 9 | Note: This will only appear in the speaker notes window. 10 | 11 | 12 | ## External 1.2 13 | 14 | Content 1.2 15 | 16 | 17 | 18 | ## External 2 19 | 20 | Content 2.1 21 | 22 | 23 | 24 | ## External 3.1 25 | 26 | Content 3.1 27 | 28 | 29 | ## External 3.2 30 | 31 | Content 3.2 32 | 33 | 34 | ## External 3.3 35 | 36 | ![External Image](https://s3.amazonaws.com/static.slid.es/logo/v2/slides-symbol-512x512.png) 37 | -------------------------------------------------------------------------------- /reveal.js/plugin/math/math.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A plugin which enables rendering of math equations inside 3 | * of reveal.js slides. Essentially a thin wrapper for MathJax. 4 | * 5 | * @author Hakim El Hattab 6 | */ 7 | var RevealMath = window.RevealMath || (function(){ 8 | 9 | var options = Reveal.getConfig().math || {}; 10 | var mathjax = options.mathjax || 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js'; 11 | var config = options.config || 'TeX-AMS_HTML-full'; 12 | var url = mathjax + '?config=' + config; 13 | 14 | var defaultOptions = { 15 | messageStyle: 'none', 16 | tex2jax: { 17 | inlineMath: [ [ '$', '$' ], [ '\\(', '\\)' ] ], 18 | skipTags: [ 'script', 'noscript', 'style', 'textarea', 'pre' ] 19 | }, 20 | skipStartupTypeset: true 21 | }; 22 | 23 | function defaults( options, defaultOptions ) { 24 | 25 | for ( var i in defaultOptions ) { 26 | if ( !options.hasOwnProperty( i ) ) { 27 | options[i] = defaultOptions[i]; 28 | } 29 | } 30 | 31 | } 32 | 33 | function loadScript( url, callback ) { 34 | 35 | var head = document.querySelector( 'head' ); 36 | var script = document.createElement( 'script' ); 37 | script.type = 'text/javascript'; 38 | script.src = url; 39 | 40 | // Wrapper for callback to make sure it only fires once 41 | var finish = function() { 42 | if( typeof callback === 'function' ) { 43 | callback.call(); 44 | callback = null; 45 | } 46 | } 47 | 48 | script.onload = finish; 49 | 50 | // IE 51 | script.onreadystatechange = function() { 52 | if ( this.readyState === 'loaded' ) { 53 | finish(); 54 | } 55 | } 56 | 57 | // Normal browsers 58 | head.appendChild( script ); 59 | 60 | } 61 | 62 | return { 63 | init: function() { 64 | 65 | defaults( options, defaultOptions ); 66 | defaults( options.tex2jax, defaultOptions.tex2jax ); 67 | options.mathjax = options.config = null; 68 | 69 | loadScript( url, function() { 70 | 71 | MathJax.Hub.Config( options ); 72 | 73 | // Typeset followed by an immediate reveal.js layout since 74 | // the typesetting process could affect slide height 75 | MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub ] ); 76 | MathJax.Hub.Queue( Reveal.layout ); 77 | 78 | // Reprocess equations in slides when they turn visible 79 | Reveal.addEventListener( 'slidechanged', function( event ) { 80 | 81 | MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub, event.currentSlide ] ); 82 | 83 | } ); 84 | 85 | } ); 86 | 87 | } 88 | } 89 | 90 | })(); 91 | 92 | Reveal.registerPlugin( 'math', RevealMath ); 93 | -------------------------------------------------------------------------------- /reveal.js/plugin/multiplex/client.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var multiplex = Reveal.getConfig().multiplex; 3 | var socketId = multiplex.id; 4 | var socket = io.connect(multiplex.url); 5 | 6 | socket.on(multiplex.id, function(data) { 7 | // ignore data from sockets that aren't ours 8 | if (data.socketId !== socketId) { return; } 9 | if( window.location.host === 'localhost:1947' ) return; 10 | 11 | Reveal.setState(data.state); 12 | }); 13 | }()); 14 | -------------------------------------------------------------------------------- /reveal.js/plugin/multiplex/index.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | var express = require('express'); 3 | var fs = require('fs'); 4 | var io = require('socket.io'); 5 | var crypto = require('crypto'); 6 | 7 | var app = express(); 8 | var staticDir = express.static; 9 | var server = http.createServer(app); 10 | 11 | io = io(server); 12 | 13 | var opts = { 14 | port: process.env.PORT || 1948, 15 | baseDir : __dirname + '/../../' 16 | }; 17 | 18 | io.on( 'connection', function( socket ) { 19 | socket.on('multiplex-statechanged', function(data) { 20 | if (typeof data.secret == 'undefined' || data.secret == null || data.secret === '') return; 21 | if (createHash(data.secret) === data.socketId) { 22 | data.secret = null; 23 | socket.broadcast.emit(data.socketId, data); 24 | }; 25 | }); 26 | }); 27 | 28 | [ 'css', 'js', 'plugin', 'lib' ].forEach(function(dir) { 29 | app.use('/' + dir, staticDir(opts.baseDir + dir)); 30 | }); 31 | 32 | app.get("/", function(req, res) { 33 | res.writeHead(200, {'Content-Type': 'text/html'}); 34 | 35 | var stream = fs.createReadStream(opts.baseDir + '/index.html'); 36 | stream.on('error', function( error ) { 37 | res.write('

reveal.js multiplex server.

Generate token'); 38 | res.end(); 39 | }); 40 | stream.on('readable', function() { 41 | stream.pipe(res); 42 | }); 43 | }); 44 | 45 | app.get("/token", function(req,res) { 46 | var ts = new Date().getTime(); 47 | var rand = Math.floor(Math.random()*9999999); 48 | var secret = ts.toString() + rand.toString(); 49 | res.send({secret: secret, socketId: createHash(secret)}); 50 | }); 51 | 52 | var createHash = function(secret) { 53 | var cipher = crypto.createCipher('blowfish', secret); 54 | return(cipher.final('hex')); 55 | }; 56 | 57 | // Actually listen 58 | server.listen( opts.port || null ); 59 | 60 | var brown = '\033[33m', 61 | green = '\033[32m', 62 | reset = '\033[0m'; 63 | 64 | console.log( brown + "reveal.js:" + reset + " Multiplex running on port " + green + opts.port + reset ); -------------------------------------------------------------------------------- /reveal.js/plugin/multiplex/master.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | // Don't emit events from inside of notes windows 4 | if ( window.location.search.match( /receiver/gi ) ) { return; } 5 | 6 | var multiplex = Reveal.getConfig().multiplex; 7 | 8 | var socket = io.connect( multiplex.url ); 9 | 10 | function post() { 11 | 12 | var messageData = { 13 | state: Reveal.getState(), 14 | secret: multiplex.secret, 15 | socketId: multiplex.id 16 | }; 17 | 18 | socket.emit( 'multiplex-statechanged', messageData ); 19 | 20 | }; 21 | 22 | // post once the page is loaded, so the client follows also on "open URL". 23 | window.addEventListener( 'load', post ); 24 | 25 | // Monitor events that trigger a change in state 26 | Reveal.addEventListener( 'slidechanged', post ); 27 | Reveal.addEventListener( 'fragmentshown', post ); 28 | Reveal.addEventListener( 'fragmenthidden', post ); 29 | Reveal.addEventListener( 'overviewhidden', post ); 30 | Reveal.addEventListener( 'overviewshown', post ); 31 | Reveal.addEventListener( 'paused', post ); 32 | Reveal.addEventListener( 'resumed', post ); 33 | 34 | }()); 35 | -------------------------------------------------------------------------------- /reveal.js/plugin/multiplex/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reveal-js-multiplex", 3 | "version": "1.0.0", 4 | "description": "reveal.js multiplex server", 5 | "homepage": "http://revealjs.com", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "engines": { 10 | "node": "~4.1.1" 11 | }, 12 | "dependencies": { 13 | "express": "~4.13.3", 14 | "grunt-cli": "~0.1.13", 15 | "mustache": "~2.2.1", 16 | "socket.io": "~1.3.7" 17 | }, 18 | "license": "MIT" 19 | } 20 | -------------------------------------------------------------------------------- /reveal.js/plugin/notes-server/client.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | // don't emit events from inside the previews themselves 4 | if( window.location.search.match( /receiver/gi ) ) { return; } 5 | 6 | var socket = io.connect( window.location.origin ), 7 | socketId = Math.random().toString().slice( 2 ); 8 | 9 | console.log( 'View slide notes at ' + window.location.origin + '/notes/' + socketId ); 10 | 11 | window.open( window.location.origin + '/notes/' + socketId, 'notes-' + socketId ); 12 | 13 | /** 14 | * Posts the current slide data to the notes window 15 | */ 16 | function post() { 17 | 18 | var slideElement = Reveal.getCurrentSlide(), 19 | notesElement = slideElement.querySelector( 'aside.notes' ); 20 | 21 | var messageData = { 22 | notes: '', 23 | markdown: false, 24 | socketId: socketId, 25 | state: Reveal.getState() 26 | }; 27 | 28 | // Look for notes defined in a slide attribute 29 | if( slideElement.hasAttribute( 'data-notes' ) ) { 30 | messageData.notes = slideElement.getAttribute( 'data-notes' ); 31 | } 32 | 33 | // Look for notes defined in an aside element 34 | if( notesElement ) { 35 | messageData.notes = notesElement.innerHTML; 36 | messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string'; 37 | } 38 | 39 | socket.emit( 'statechanged', messageData ); 40 | 41 | } 42 | 43 | // When a new notes window connects, post our current state 44 | socket.on( 'new-subscriber', function( data ) { 45 | post(); 46 | } ); 47 | 48 | // When the state changes from inside of the speaker view 49 | socket.on( 'statechanged-speaker', function( data ) { 50 | Reveal.setState( data.state ); 51 | } ); 52 | 53 | // Monitor events that trigger a change in state 54 | Reveal.addEventListener( 'slidechanged', post ); 55 | Reveal.addEventListener( 'fragmentshown', post ); 56 | Reveal.addEventListener( 'fragmenthidden', post ); 57 | Reveal.addEventListener( 'overviewhidden', post ); 58 | Reveal.addEventListener( 'overviewshown', post ); 59 | Reveal.addEventListener( 'paused', post ); 60 | Reveal.addEventListener( 'resumed', post ); 61 | 62 | // Post the initial state 63 | post(); 64 | 65 | }()); 66 | -------------------------------------------------------------------------------- /reveal.js/plugin/notes-server/index.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | var express = require('express'); 3 | var fs = require('fs'); 4 | var io = require('socket.io'); 5 | var Mustache = require('mustache'); 6 | 7 | var app = express(); 8 | var staticDir = express.static; 9 | var server = http.createServer(app); 10 | 11 | io = io(server); 12 | 13 | var opts = { 14 | port : 1947, 15 | baseDir : __dirname + '/../../' 16 | }; 17 | 18 | io.on( 'connection', function( socket ) { 19 | 20 | socket.on( 'new-subscriber', function( data ) { 21 | socket.broadcast.emit( 'new-subscriber', data ); 22 | }); 23 | 24 | socket.on( 'statechanged', function( data ) { 25 | delete data.state.overview; 26 | socket.broadcast.emit( 'statechanged', data ); 27 | }); 28 | 29 | socket.on( 'statechanged-speaker', function( data ) { 30 | delete data.state.overview; 31 | socket.broadcast.emit( 'statechanged-speaker', data ); 32 | }); 33 | 34 | }); 35 | 36 | [ 'css', 'js', 'images', 'plugin', 'lib' ].forEach( function( dir ) { 37 | app.use( '/' + dir, staticDir( opts.baseDir + dir ) ); 38 | }); 39 | 40 | app.get('/', function( req, res ) { 41 | 42 | res.writeHead( 200, { 'Content-Type': 'text/html' } ); 43 | fs.createReadStream( opts.baseDir + '/index.html' ).pipe( res ); 44 | 45 | }); 46 | 47 | app.get( '/notes/:socketId', function( req, res ) { 48 | 49 | fs.readFile( opts.baseDir + 'plugin/notes-server/notes.html', function( err, data ) { 50 | res.send( Mustache.to_html( data.toString(), { 51 | socketId : req.params.socketId 52 | })); 53 | }); 54 | 55 | }); 56 | 57 | // Actually listen 58 | server.listen( opts.port || null ); 59 | 60 | var brown = '\033[33m', 61 | green = '\033[32m', 62 | reset = '\033[0m'; 63 | 64 | var slidesLocation = 'http://localhost' + ( opts.port ? ( ':' + opts.port ) : '' ); 65 | 66 | console.log( brown + 'reveal.js - Speaker Notes' + reset ); 67 | console.log( '1. Open the slides at ' + green + slidesLocation + reset ); 68 | console.log( '2. Click on the link in your JS console to go to the notes page' ); 69 | console.log( '3. Advance through your slides and your notes will advance automatically' ); 70 | -------------------------------------------------------------------------------- /reveal.js/plugin/print-pdf/print-pdf.js: -------------------------------------------------------------------------------- 1 | /** 2 | * phantomjs script for printing presentations to PDF. 3 | * 4 | * Example: 5 | * phantomjs print-pdf.js "http://revealjs.com?print-pdf" reveal-demo.pdf 6 | * 7 | * @author Manuel Bieh (https://github.com/manuelbieh) 8 | * @author Hakim El Hattab (https://github.com/hakimel) 9 | * @author Manuel Riezebosch (https://github.com/riezebosch) 10 | */ 11 | 12 | // html2pdf.js 13 | var system = require( 'system' ); 14 | 15 | var probePage = new WebPage(); 16 | var printPage = new WebPage(); 17 | 18 | var inputFile = system.args[1] || 'index.html?print-pdf'; 19 | var outputFile = system.args[2] || 'slides.pdf'; 20 | 21 | if( outputFile.match( /\.pdf$/gi ) === null ) { 22 | outputFile += '.pdf'; 23 | } 24 | 25 | console.log( 'Export PDF: Reading reveal.js config [1/4]' ); 26 | 27 | probePage.open( inputFile, function( status ) { 28 | 29 | console.log( 'Export PDF: Preparing print layout [2/4]' ); 30 | 31 | var config = probePage.evaluate( function() { 32 | return Reveal.getConfig(); 33 | } ); 34 | 35 | if( config ) { 36 | 37 | printPage.paperSize = { 38 | width: Math.floor( config.width * ( 1 + config.margin ) ), 39 | height: Math.floor( config.height * ( 1 + config.margin ) ), 40 | border: 0 41 | }; 42 | 43 | printPage.open( inputFile, function( status ) { 44 | console.log( 'Export PDF: Preparing pdf [3/4]') 45 | printPage.evaluate( function() { 46 | Reveal.isReady() ? window.callPhantom() : Reveal.addEventListener( 'pdf-ready', window.callPhantom ); 47 | } ); 48 | } ); 49 | 50 | printPage.onCallback = function( data ) { 51 | // For some reason we need to "jump the queue" for syntax highlighting to work. 52 | // See: http://stackoverflow.com/a/3580132/129269 53 | setTimeout( function() { 54 | console.log( 'Export PDF: Writing file [4/4]' ); 55 | printPage.render( outputFile ); 56 | console.log( 'Export PDF: Finished successfully!' ); 57 | phantom.exit(); 58 | }, 0 ); 59 | }; 60 | } 61 | else { 62 | 63 | console.log( 'Export PDF: Unable to read reveal.js config. Make sure the input address points to a reveal.js page.' ); 64 | phantom.exit( 1 ); 65 | 66 | } 67 | } ); 68 | -------------------------------------------------------------------------------- /reveal.js/test/assets/external-script-a.js: -------------------------------------------------------------------------------- 1 | window.externalScriptSequence += 'A'; -------------------------------------------------------------------------------- /reveal.js/test/assets/external-script-b.js: -------------------------------------------------------------------------------- 1 | window.externalScriptSequence += 'B'; -------------------------------------------------------------------------------- /reveal.js/test/assets/external-script-c.js: -------------------------------------------------------------------------------- 1 | window.externalScriptSequence += 'C'; -------------------------------------------------------------------------------- /reveal.js/test/assets/external-script-d.js: -------------------------------------------------------------------------------- 1 | window.externalScriptSequence += 'D'; -------------------------------------------------------------------------------- /reveal.js/test/examples/assets/beeping.txt: -------------------------------------------------------------------------------- 1 | Source: https://freesound.org/people/fennelliott/sounds/379419/ 2 | License: CC0 (public domain) -------------------------------------------------------------------------------- /reveal.js/test/examples/assets/beeping.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/reveal.js/test/examples/assets/beeping.wav -------------------------------------------------------------------------------- /reveal.js/test/examples/assets/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/reveal.js/test/examples/assets/image1.png -------------------------------------------------------------------------------- /reveal.js/test/examples/assets/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/reveal.js/test/examples/assets/image2.png -------------------------------------------------------------------------------- /reveal.js/test/examples/barebones.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Barebones 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 |
17 | 18 |
19 |

Barebones Presentation

20 |

This example contains the bare minimum includes and markup required to run a reveal.js presentation.

21 |
22 | 23 |
24 |

No Theme

25 |

There's no theme included, so it will fall back on browser defaults.

26 |
27 | 28 |
29 | 30 |
31 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /reveal.js/test/examples/embedded-media.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Embedded Media 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 |
20 | 21 |
22 |

Embedded Media Test

23 |
24 | 25 |
26 | 27 |
28 | 29 |
30 |

Empty Slide

31 |
32 | 33 |
34 |

Auto-playing audio

35 | 36 |
37 | 38 |
39 | 40 |
41 | 42 | 43 | 44 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /reveal.js/test/examples/slide-transitions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Slide Transitions 8 | 9 | 10 | 11 | 21 | 22 | 23 | 24 | 25 |
26 | 27 |
28 | 29 |
30 |

Default

31 |
32 | 33 |
34 |

Default

35 |
36 | 37 |
38 |

data-transition: zoom

39 |
40 | 41 |
42 |

data-transition: zoom-in fade-out

43 |
44 | 45 |
46 |

Default

47 |
48 | 49 |
50 |

data-transition: convex

51 |
52 | 53 |
54 |

data-transition: convex-in concave-out

55 |
56 | 57 |
58 |
59 |

Default

60 |
61 |
62 |

data-transition: concave

63 |
64 |
65 |

data-transition: convex-in fade-out

66 |
67 |
68 |

Default

69 |
70 |
71 | 72 |
73 |

data-transition: none

74 |
75 | 76 |
77 |

Default

78 |
79 | 80 |
81 | 82 |
83 | 84 | 85 | 86 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /reveal.js/test/simple.md: -------------------------------------------------------------------------------- 1 | ## Slide 1.1 2 | 3 | ```js 4 | var a = 1; 5 | ``` 6 | 7 | 8 | ## Slide 1.2 9 | 10 | 11 | 12 | ## Slide 2 13 | -------------------------------------------------------------------------------- /reveal.js/test/test-dependencies-async.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Async Dependencies 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 27 | 28 | 29 | 30 | 31 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /reveal.js/test/test-dependencies.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Dependencies 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 27 | 28 | 29 | 30 | 31 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /reveal.js/test/test-grid-navigation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Grid 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 39 | 40 | 41 | 42 | 43 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /reveal.js/test/test-iframe-backgrounds.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Iframe Backgrounds 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 32 | 33 | 34 | 35 | 36 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /reveal.js/test/test-iframes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Iframes 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 32 | 33 | 34 | 35 | 36 | 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /reveal.js/test/test-markdown-element-attributes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown Element Attributes 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /reveal.js/test/test-markdown-element-attributes.js: -------------------------------------------------------------------------------- 1 | Reveal.addEventListener( 'ready', function() { 2 | 3 | QUnit.module( 'Markdown' ); 4 | 5 | QUnit.test( 'Vertical separator', function( assert ) { 6 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 4, 'found four slides' ); 7 | }); 8 | 9 | QUnit.test( 'Attributes on element header in vertical slides', function( assert ) { 10 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section>section h2.fragment.fade-out' ).length, 1, 'found one vertical slide with class fragment.fade-out on header' ); 11 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section>section h2.fragment.shrink' ).length, 1, 'found one vertical slide with class fragment.shrink on header' ); 12 | }); 13 | 14 | QUnit.test( 'Attributes on element paragraphs in vertical slides', function( assert ) { 15 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section>section p.fragment.grow' ).length, 2, 'found a vertical slide with two paragraphs with class fragment.grow' ); 16 | }); 17 | 18 | QUnit.test( 'Attributes on element list items in vertical slides', function( assert ) { 19 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section>section li.fragment.grow' ).length, 3, 'found a vertical slide with three list items with class fragment.grow' ); 20 | }); 21 | 22 | QUnit.test( 'Attributes on element paragraphs in horizontal slides', function( assert ) { 23 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section p.fragment.highlight-red' ).length, 4, 'found a horizontal slide with four paragraphs with class fragment.grow' ); 24 | }); 25 | 26 | QUnit.test( 'Attributes on element list items in horizontal slides', function( assert ) { 27 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section li.fragment.highlight-green' ).length, 5, 'found a horizontal slide with five list items with class fragment.roll-in' ); 28 | }); 29 | 30 | QUnit.test( 'Attributes on element image in horizontal slides', function( assert ) { 31 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section img.reveal.stretch' ).length, 1, 'found a horizontal slide with stretched image, class img.reveal.stretch' ); 32 | }); 33 | 34 | QUnit.test( 'Attributes on elements in vertical slides with default element attribute separator', function( assert ) { 35 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section h2.fragment.highlight-red' ).length, 2, 'found two h2 titles with fragment highlight-red in vertical slides with default element attribute separator' ); 36 | }); 37 | 38 | QUnit.test( 'Attributes on elements in single slides with default element attribute separator', function( assert ) { 39 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section p.fragment.highlight-blue' ).length, 3, 'found three elements with fragment highlight-blue in single slide with default element attribute separator' ); 40 | }); 41 | 42 | } ); 43 | 44 | Reveal.initialize(); 45 | -------------------------------------------------------------------------------- /reveal.js/test/test-markdown-external.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /reveal.js/test/test-markdown-external.js: -------------------------------------------------------------------------------- 1 | Reveal.addEventListener( 'ready', function() { 2 | 3 | QUnit.module( 'Markdown' ); 4 | 5 | QUnit.test( 'Vertical separator', function( assert ) { 6 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' ); 7 | }); 8 | 9 | QUnit.test( 'Horizontal separator', function( assert ) { 10 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section' ).length, 2, 'found two slides' ); 11 | }); 12 | 13 | QUnit.test( 'Language highlighter', function( assert ) { 14 | assert.strictEqual( document.querySelectorAll( '.hljs-keyword' ).length, 1, 'got rendered highlight tag.' ); 15 | assert.strictEqual( document.querySelector( '.hljs-keyword' ).innerHTML, 'var', 'the same keyword: var.' ); 16 | }); 17 | 18 | } ); 19 | 20 | Reveal.initialize(); 21 | -------------------------------------------------------------------------------- /reveal.js/test/test-markdown-options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown Options 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /reveal.js/test/test-markdown-options.js: -------------------------------------------------------------------------------- 1 | Reveal.addEventListener( 'ready', function() { 2 | 3 | QUnit.module( 'Markdown' ); 4 | 5 | QUnit.test( 'Options are set', function( assert ) { 6 | assert.strictEqual( marked.defaults.smartypants, true ); 7 | }); 8 | 9 | QUnit.test( 'Smart quotes are activated', function( assert ) { 10 | var text = document.querySelector( '.reveal .slides>section>p' ).textContent; 11 | 12 | assert.strictEqual( /['"]/.test( text ), false ); 13 | assert.strictEqual( /[“”‘’]/.test( text ), true ); 14 | }); 15 | 16 | } ); 17 | 18 | Reveal.initialize({ 19 | dependencies: [ 20 | { src: '../plugin/markdown/marked.js' }, 21 | // Test loading JS files with query strings 22 | { src: '../plugin/markdown/markdown.js?query=string' }, 23 | ], 24 | markdown: { 25 | smartypants: true 26 | } 27 | }); 28 | -------------------------------------------------------------------------------- /reveal.js/test/test-markdown-slide-attributes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown Attributes 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /reveal.js/test/test-markdown-slide-attributes.js: -------------------------------------------------------------------------------- 1 | Reveal.addEventListener( 'ready', function() { 2 | 3 | QUnit.module( 'Markdown' ); 4 | 5 | QUnit.test( 'Vertical separator', function( assert ) { 6 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 6, 'found six vertical slides' ); 7 | }); 8 | 9 | QUnit.test( 'Id on slide', function( assert ) { 10 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section#slide2' ).length, 1, 'found one slide with id slide2' ); 11 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section a[href="#/slide2"]' ).length, 1, 'found one slide with a link to slide2' ); 12 | }); 13 | 14 | QUnit.test( 'data-background attributes', function( assert ) { 15 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#A0C66B"]' ).length, 1, 'found one vertical slide with data-background="#A0C66B"' ); 16 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#ff0000"]' ).length, 1, 'found one vertical slide with data-background="#ff0000"' ); 17 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#C6916B"]' ).length, 1, 'found one slide with data-background="#C6916B"' ); 18 | }); 19 | 20 | QUnit.test( 'data-transition attributes', function( assert ) { 21 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="zoom"]' ).length, 1, 'found one vertical slide with data-transition="zoom"' ); 22 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="fade"]' ).length, 1, 'found one vertical slide with data-transition="fade"' ); 23 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section [data-transition="zoom"]' ).length, 1, 'found one slide with data-transition="zoom"' ); 24 | }); 25 | 26 | QUnit.test( 'data-background attributes with default separator', function( assert ) { 27 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#A7C66B"]' ).length, 1, 'found one vertical slide with data-background="#A0C66B"' ); 28 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#f70000"]' ).length, 1, 'found one vertical slide with data-background="#ff0000"' ); 29 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#C7916B"]' ).length, 1, 'found one slide with data-background="#C6916B"' ); 30 | }); 31 | 32 | QUnit.test( 'data-transition attributes with default separator', function( assert ) { 33 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="concave"]' ).length, 1, 'found one vertical slide with data-transition="zoom"' ); 34 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="page"]' ).length, 1, 'found one vertical slide with data-transition="fade"' ); 35 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section [data-transition="concave"]' ).length, 1, 'found one slide with data-transition="zoom"' ); 36 | }); 37 | 38 | QUnit.test( 'data-transition attributes with inline content', function( assert ) { 39 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#ff0000"]' ).length, 3, 'found three horizontal slides with data-background="#ff0000"' ); 40 | }); 41 | 42 | } ); 43 | 44 | Reveal.initialize(); 45 | -------------------------------------------------------------------------------- /reveal.js/test/test-markdown.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /reveal.js/test/test-markdown.js: -------------------------------------------------------------------------------- 1 | Reveal.addEventListener( 'ready', function() { 2 | 3 | QUnit.module( 'Markdown' ); 4 | 5 | QUnit.test( 'Vertical separator', function( assert ) { 6 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' ); 7 | }); 8 | 9 | } ); 10 | 11 | Reveal.initialize(); 12 | -------------------------------------------------------------------------------- /reveal.js/test/test-pdf.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test PDF exports 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 | 19 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /reveal.js/test/test-pdf.js: -------------------------------------------------------------------------------- 1 | Reveal.addEventListener( 'ready', function() { 2 | 3 | // Only one test for now, we're mainly ensuring that there 4 | // are no execution errors when running PDF mode 5 | 6 | QUnit.test( 'Reveal.isReady', function( assert ) { 7 | assert.strictEqual( Reveal.isReady(), true, 'returns true' ); 8 | }); 9 | 10 | } ); 11 | 12 | Reveal.initialize({ pdf: true }); 13 | -------------------------------------------------------------------------------- /reveal.js/test/test-plugins.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Plugins 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 27 | 28 | 29 | 30 | 31 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /reveal.js/test/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Tests 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /rulPred/BatteryRULTestData.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/BatteryRULTestData.PNG -------------------------------------------------------------------------------- /rulPred/HIFused.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/HIFused.png -------------------------------------------------------------------------------- /rulPred/HIPlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/HIPlot.png -------------------------------------------------------------------------------- /rulPred/HIValidationData.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/HIValidationData.png -------------------------------------------------------------------------------- /rulPred/HIVisualization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/HIVisualization.png -------------------------------------------------------------------------------- /rulPred/KMeansPerformance.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/KMeansPerformance.PNG -------------------------------------------------------------------------------- /rulPred/KNNPlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/KNNPlot.png -------------------------------------------------------------------------------- /rulPred/KNNPlot70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/KNNPlot70.png -------------------------------------------------------------------------------- /rulPred/KNNPlot90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/KNNPlot90.png -------------------------------------------------------------------------------- /rulPred/PCADistribution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/PCADistribution.png -------------------------------------------------------------------------------- /rulPred/PHMdata.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/PHMdata.PNG -------------------------------------------------------------------------------- /rulPred/PlotEnsemblerMember.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/PlotEnsemblerMember.png -------------------------------------------------------------------------------- /rulPred/RULDistribution50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/RULDistribution50.png -------------------------------------------------------------------------------- /rulPred/RULDistribution70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/RULDistribution70.png -------------------------------------------------------------------------------- /rulPred/RULDistribution90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/RULDistribution90.png -------------------------------------------------------------------------------- /rulPred/RULPred.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/RULPred.png -------------------------------------------------------------------------------- /rulPred/RegimePlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/RegimePlot.png -------------------------------------------------------------------------------- /rulPred/RegimePlotWithCluster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/RegimePlotWithCluster.png -------------------------------------------------------------------------------- /rulPred/SurvialFunction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/SurvialFunction.png -------------------------------------------------------------------------------- /rulPred/WindTurbineHighSpeedBearingPrognosisExample_08.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/WindTurbineHighSpeedBearingPrognosisExample_08.gif -------------------------------------------------------------------------------- /rulPred/alphaLambdaPlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/alphaLambdaPlot.png -------------------------------------------------------------------------------- /rulPred/bearingTallData.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/bearingTallData.PNG -------------------------------------------------------------------------------- /rulPred/biasValue.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/biasValue.PNG -------------------------------------------------------------------------------- /rulPred/degradationDataDemo.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/degradationDataDemo.PNG -------------------------------------------------------------------------------- /rulPred/degradationSensorFusion.m: -------------------------------------------------------------------------------- 1 | function dataFused = degradationSensorFusion(data, sensorToFuse, weights) 2 | % Combine measurements from different sensors according 3 | % to the weights, smooth the fused data and offset the data 4 | % so that all the data start from 1 5 | 6 | % Fuse the data according to weights 7 | dataToFuse = data{:, cellstr(sensorToFuse)}; 8 | dataFusedRaw = dataToFuse*weights; 9 | 10 | % Smooth the fused data with moving mean 11 | stepBackward = 10; 12 | stepForward = 10; 13 | dataFused = movmean(dataFusedRaw, [stepBackward stepForward]); 14 | 15 | % Offset the data to 1 16 | dataFused = dataFused + 1 - dataFused(1); 17 | end -------------------------------------------------------------------------------- /rulPred/errorMean.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/errorMean.PNG -------------------------------------------------------------------------------- /rulPred/errorMedian.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/errorMedian.PNG -------------------------------------------------------------------------------- /rulPred/errorOverview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/errorOverview.png -------------------------------------------------------------------------------- /rulPred/errorSD.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/errorSD.PNG -------------------------------------------------------------------------------- /rulPred/featureExtractionProcess.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/featureExtractionProcess.PNG -------------------------------------------------------------------------------- /rulPred/featureRanking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/featureRanking.png -------------------------------------------------------------------------------- /rulPred/featureSmooth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/featureSmooth.png -------------------------------------------------------------------------------- /rulPred/featureTimeTable.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/featureTimeTable.PNG -------------------------------------------------------------------------------- /rulPred/helperAlphaLambdaPlot.m: -------------------------------------------------------------------------------- 1 | function alphaBoundProbablity = helperAlphaLambdaPlot(alpha, trueRULHist, estRULHist, ... 2 | CIRULHist, pdfRULHist, degradationTime, breakpoint, timeUnit) 3 | %HELPERALPHALAMBDAPLOT create alpha-lambda plot and the probability metric 4 | 5 | % Copyright 2018 The MathWorks, Inc. 6 | 7 | N = length(trueRULHist); 8 | t = 1:N; 9 | t2 = t((degradationTime+1):end); 10 | 11 | % Compute the alpha bounds 12 | alphaPlus = trueRULHist + alpha*trueRULHist; 13 | alphaMinus = trueRULHist - alpha*trueRULHist; 14 | 15 | % ---------------- Alpha-Lambda Plot -------------------- 16 | figure 17 | hold on 18 | grid on 19 | 20 | % Plot true RUL and its alpha bounds 21 | plot(t, trueRULHist) 22 | fill([t fliplr(t)], [alphaPlus(t)' fliplr(alphaMinus(t)')], ... 23 | 'b', 'FaceAlpha', 0.2, 'EdgeColor', 'none') 24 | 25 | % Plot the estimated RUL and its confidence intervals 26 | plot(t2, estRULHist(t2), '--') 27 | fill([t2 fliplr(t2)], ... 28 | [CIRULHist(t2, 1)' fliplr(CIRULHist(t2, 2)')], ... 29 | 'r', 'FaceAlpha', 0.2, 'EdgeColor', 'none') 30 | 31 | % Plot the train-test breakpoint 32 | ylow = 0; 33 | yup = 80; 34 | plot([breakpoint breakpoint], [ylow yup], 'k-.') 35 | 36 | % Add labels and legends 37 | ylim([ylow yup]) 38 | hold off 39 | xlabel(['Time (' timeUnit ')']) 40 | ylabel(['RUL (' timeUnit ')']) 41 | legend('True RUL', ['\alpha = +\\-' num2str(alpha*100) '%'], ... 42 | 'Predicted RUL After Degradation Detected', ... 43 | 'Confidence Interval After Degradation Detected', 'Train-Test Breakpoint') 44 | 45 | % ---------------- Probability Metric -------------------- 46 | % Compute the probability of predicted RUL within alpha bounds 47 | alphaBoundProbablity = zeros(N, 1); 48 | for i = 1:N 49 | pdfRUL = pdfRULHist{i}; 50 | idx = (pdfRUL{:, 1} > alphaMinus(i)) & (pdfRUL{:, 1} < alphaPlus(i)); 51 | prob = sum(pdfRUL{idx, 2}); 52 | alphaBoundProbablity(i) = prob; 53 | end 54 | end 55 | -------------------------------------------------------------------------------- /rulPred/helperLoadData.m: -------------------------------------------------------------------------------- 1 | function degradationData = helperLoadData(filename) 2 | % Load degradation data from text file and convert to cell array of tables. 3 | % 4 | % This function supports the Similarity-based Remaining Useful Life 5 | % Estimation example. It may change in a future release. 6 | 7 | % Copyright 2017-2018 The MathWorks, Inc. 8 | 9 | % Load the text file as a table 10 | t = readtable(filename); 11 | t(:,end) = []; %Discard last column of loaded data as all are empty '' 12 | 13 | % Add variable names to the table 14 | VarNames = {... 15 | 'id', 'time', 'op_setting_1', 'op_setting_2', 'op_setting_3', ... 16 | 'sensor_1', 'sensor_2', 'sensor_3', 'sensor_4', 'sensor_5', ... 17 | 'sensor_6', 'sensor_7', 'sensor_8', 'sensor_9', 'sensor_10', ... 18 | 'sensor_11', 'sensor_12', 'sensor_13', 'sensor_14', 'sensor_15', ... 19 | 'sensor_16', 'sensor_17', 'sensor_18', 'sensor_19', 'sensor_20', ... 20 | 'sensor_21'}; 21 | t.Properties.VariableNames = VarNames; 22 | 23 | % Split the signals from each machine ID into individual tables 24 | % and collect the tables in a cell array. 25 | IDs = t{:,1}; 26 | nID = unique(IDs); 27 | degradationData = cell(numel(nID),1); 28 | for ct=1:numel(nID) 29 | idx = IDs == nID(ct); 30 | degradationData{ct} = t(idx,:); 31 | end 32 | end -------------------------------------------------------------------------------- /rulPred/helperPlotClusters.m: -------------------------------------------------------------------------------- 1 | function helperPlotClusters(X, idx, C) 2 | % HELPERPLOTCLUSTER Helper function for cluster plotting 3 | % 4 | % This function supports the Similarity-based Remaining Useful Life 5 | % Estimation example. It may change in a future release. 6 | 7 | % Copyright 2017-2018 The MathWorks, Inc. 8 | 9 | if(nargin>1) 10 | hold on 11 | for i = 1:max(idx) 12 | scatter3(X{idx==i,1}, X{idx==i,2}, X{idx==i,3}); 13 | end 14 | scatter3(C(:,1),C(:,2),C(:,3), 'x', 'MarkerFaceColor', [0 0 0], ... 15 | 'MarkerEdgeColor', [0 0 0], 'LineWidth', 2); 16 | legendStr = ["Cluster "+(1:6), "Centroids"]; 17 | legend(cellstr(legendStr), 'Location', 'NW'); 18 | hold off 19 | view(-30,30) 20 | grid on 21 | else 22 | scatter3(X{:,1}, X{:,2}, X{:,3}); 23 | end 24 | xlabel(X.Properties.VariableNames{1}, 'Interpreter', 'none') 25 | ylabel(X.Properties.VariableNames{2}, 'Interpreter', 'none') 26 | zlabel(X.Properties.VariableNames{3}, 'Interpreter', 'none') 27 | end -------------------------------------------------------------------------------- /rulPred/helperPlotEnsemble.m: -------------------------------------------------------------------------------- 1 | function helperPlotEnsemble(ensemble, TimeVariable, DataVariables, nsample, varargin) 2 | % HELPERPLOTENSEMBLE Helper function to plot ensemble data 3 | % 4 | % This function supports the Similarity-based Remaining Useful Life 5 | % Estimation example. It may change in a future release. 6 | 7 | % Copyright 2017-2018 The MathWorks, Inc. 8 | 9 | % Ensemble is a cell array of matrices/timetables/tables 10 | randIdx = randperm(length(ensemble)); 11 | ensembleSample = ensemble(randIdx(1:nsample)); 12 | numData = length(DataVariables); 13 | for i = 1:numData 14 | data2plot = DataVariables(i); 15 | subplot(numData, 1, i) 16 | hold on 17 | for j = 1:length(ensembleSample) 18 | ensembleMember = ensembleSample{j}; 19 | if isa(ensembleMember, 'double') 20 | % TimeVariable and DataVariables are doubles 21 | if isempty(TimeVariable) 22 | plot(ensembleMember(:, DataVariables), varargin{:}) 23 | else 24 | plot(ensembleMember(:, TimeVariable), ensembleMember(:, DataVariables), varargin{:}) 25 | end 26 | xlblstr = "time"; 27 | ylblstr = "Var " + data2plot; 28 | else 29 | % ensembleMember is a table 30 | plot(ensembleMember.(char(TimeVariable)), ensembleMember.(char(data2plot)), varargin{:}) 31 | xlblstr = TimeVariable; 32 | ylblstr = data2plot; 33 | end 34 | end 35 | hold off 36 | ylabel(ylblstr, 'Interpreter', 'none') 37 | end 38 | xlabel(xlblstr) 39 | end -------------------------------------------------------------------------------- /rulPred/helperPlotRUL.m: -------------------------------------------------------------------------------- 1 | function helperPlotRUL(ax, trueRUL, estRUL, CIRUL, pdfRUL, timeUnit) 2 | %HELPERPLOTRULDISTRIBUTION helper function to refresh the distribution plot 3 | 4 | % Copyright 2018 The MathWorks, Inc. 5 | cla(ax) 6 | hold(ax, 'on') 7 | plot(ax, pdfRUL{:,1}, pdfRUL{:,2}) 8 | plot(ax, [estRUL estRUL], [0 pdfRUL{find(pdfRUL{:,1} >= estRUL, 1), 2}]) 9 | plot(ax, [trueRUL trueRUL], [0 pdfRUL{find(pdfRUL{:,1} >= trueRUL, 1), 2}], '--') 10 | idx = pdfRUL{:,1} >= CIRUL(1) & pdfRUL{:,1}<=CIRUL(2); 11 | area(ax, pdfRUL{idx, 1}, pdfRUL{idx, 2}, ... 12 | 'FaceAlpha', 0.2, 'FaceColor', 'g', 'EdgeColor', 'none'); 13 | hold(ax, 'off') 14 | ylabel(ax, 'PDF') 15 | xlabel(ax, ['Time (' timeUnit ')']) 16 | legend(ax, 'pdf of RUL', 'Estimated RUL', 'True RUL', 'Confidence Interval') -------------------------------------------------------------------------------- /rulPred/helperPlotRULDistribution.m: -------------------------------------------------------------------------------- 1 | function helperPlotRULDistribution(trueRUL, estRUL, pdfRUL, ciRUL) 2 | % HELPERPLOTRULDISTRIBUTION Plot RUL distribution 3 | % 4 | % This function supports the Similarity-based Remaining Useful Life 5 | % Estimation example. It may change in a future release. 6 | 7 | % Copyright 2017-2018 The MathWorks, Inc. 8 | 9 | hold on 10 | plot(pdfRUL.RUL, pdfRUL.ProbabilityDensity, 'b'); 11 | idx = find(pdfRUL.RUL > trueRUL, 1, 'first'); 12 | if isempty(idx) 13 | y = pdfRUL.ProbabilityDensity(end); 14 | else 15 | y = pdfRUL.ProbabilityDensity(idx); 16 | end 17 | plot([trueRUL, trueRUL], [0, y], 'r'); 18 | idx = find(pdfRUL.RUL > estRUL, 1, 'first'); 19 | if isempty(idx) 20 | y = pdfRUL.ProbabilityDensity(end); 21 | else 22 | y = pdfRUL.ProbabilityDensity(idx); 23 | end 24 | plot([estRUL, estRUL], [0, y], 'g'); 25 | idx = pdfRUL.RUL >= ciRUL(1) & pdfRUL.RUL<=ciRUL(2); 26 | area(pdfRUL.RUL(idx), pdfRUL.ProbabilityDensity(idx), ... 27 | 'FaceAlpha', 0.2, 'FaceColor', 'y', 'EdgeColor', 'none'); 28 | hold off 29 | legend('Probability Density Function', 'True RUL', 'Estimated RUL', '90% Confidence Inteval'); 30 | xlabel('Cycle') 31 | ylabel('Probability Density') 32 | title('RUL Estimation') 33 | end 34 | -------------------------------------------------------------------------------- /rulPred/helperPlotTrend.m: -------------------------------------------------------------------------------- 1 | function helperPlotTrend(ax, currentDay, healthIndicator, mdl, threshold, timeUnit) 2 | %HELPERPLOTTREND helper function to refresh the trending plot 3 | 4 | % Copyright 2018 The MathWorks, Inc. 5 | t = 1:size(healthIndicator, 1); 6 | HIpred = mdl.Phi + mdl.Theta*exp(mdl.Beta*(t - mdl.InitialLifeTimeValue)); 7 | HIpredCI1 = mdl.Phi + ... 8 | (mdl.Theta - sqrt(mdl.ThetaVariance)) * ... 9 | exp((mdl.Beta - sqrt(mdl.BetaVariance))*(t - mdl.InitialLifeTimeValue)); 10 | HIpredCI2 = mdl.Phi + ... 11 | (mdl.Theta + sqrt(mdl.ThetaVariance)) * ... 12 | exp((mdl.Beta + sqrt(mdl.BetaVariance))*(t - mdl.InitialLifeTimeValue)); 13 | 14 | cla(ax) 15 | hold(ax, 'on') 16 | plot(ax, t, HIpred) 17 | plot(ax, [t NaN t], [HIpredCI1 NaN, HIpredCI2], '--') 18 | plot(ax, t(1:currentDay), healthIndicator(1:currentDay, :)) 19 | plot(ax, t, threshold*ones(1, length(t)), 'r') 20 | hold(ax, 'off') 21 | if ~isempty(mdl.SlopeDetectionInstant) 22 | title(ax, sprintf('Day %d: Degradation detected!\n', currentDay)) 23 | else 24 | title(ax, sprintf('Day %d: Degradation NOT detected.\n', currentDay)) 25 | end 26 | ylabel(ax, 'Health Indicator') 27 | xlabel(ax, ['Time (' timeUnit ')']) 28 | legend(ax, 'Degradation Model', 'Confidence Interval', ... 29 | 'Health Indicator', 'Threshold', 'Location', 'Northwest') 30 | end -------------------------------------------------------------------------------- /rulPred/helperReadData.m: -------------------------------------------------------------------------------- 1 | function data = helperReadData(filename, variables) 2 | % Read data variables for the fileEnsemble 3 | % 4 | % Inputs: 5 | % filename - a string of the file name to read from. 6 | % variables - a string array containing variable names to read. 7 | % It must be a subset of DataVariables specified 8 | % in fileEnsembleDatastore. 9 | % Output: 10 | % data - return a table with a single row 11 | 12 | % Copyright 2017-2018 The MathWorks, Inc. 13 | 14 | data = table; 15 | mfile = matfile(filename); % Allows partial loading 16 | for ct = 1:numel(variables) 17 | if strcmp(variables{ct}, "Date") 18 | % Extract the datetime information from the file names 19 | % as the independent variable of the ensemble datastore 20 | [~, fname] = fileparts(filename); 21 | token = regexp(fname, 'data-(\w+)', 'tokens'); 22 | data.Date = datetime(token{1}{1}, 'InputFormat', 'yyyyMMdd''T''HHmmss''Z'''); 23 | else 24 | val = mfile.(variables{ct}); 25 | % Convert non-scalar values into a single cell 26 | if numel(val) > 1 27 | val = {val}; 28 | end 29 | data.(variables{ct}) = val; 30 | end 31 | end 32 | end -------------------------------------------------------------------------------- /rulPred/helperSortedBarPlot.m: -------------------------------------------------------------------------------- 1 | function sortedIdx = helperSortedBarPlot(tbl, ylbl) 2 | % HELPERSORTEDBARPLOT helper function to create sorted bar plot 3 | 4 | % Copyright 2018 The MathWorks, Inc. 5 | [~, sortedIdx] = sort(tbl{1,:}, 'descend'); 6 | tblSorted = tbl(:, sortedIdx); 7 | figure 8 | bar(tblSorted{1,:}) 9 | xticks(1:size(tblSorted,2)) 10 | xticklabels(tbl.Properties.VariableNames(sortedIdx)) 11 | xtickangle(45) 12 | ylabel(ylbl) 13 | end -------------------------------------------------------------------------------- /rulPred/helperWriteToHSBearing.m: -------------------------------------------------------------------------------- 1 | function helperWriteToHSBearing(filename, data) 2 | % Write data to the fileEnsemble 3 | % Inputs: 4 | % filename - a string of the file name to write to. 5 | % data - a structure 6 | save(filename, '-append', '-struct', 'data'); 7 | end -------------------------------------------------------------------------------- /rulPred/predictionErrorBox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/predictionErrorBox.png -------------------------------------------------------------------------------- /rulPred/predictionRULErrorDistribution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/predictionRULErrorDistribution.png -------------------------------------------------------------------------------- /rulPred/probabilityPredRULWithinAlphaBound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/probabilityPredRULWithinAlphaBound.png -------------------------------------------------------------------------------- /rulPred/regimeNormalization.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/regimeNormalization.m -------------------------------------------------------------------------------- /rulPred/selectedFeatures.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/selectedFeatures.PNG -------------------------------------------------------------------------------- /rulPred/selectedSensors.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/selectedSensors.PNG -------------------------------------------------------------------------------- /rulPred/sensorMean.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/sensorMean.PNG -------------------------------------------------------------------------------- /rulPred/sensorSD.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/sensorSD.PNG -------------------------------------------------------------------------------- /rulPred/trendPlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/trendPlot.png -------------------------------------------------------------------------------- /rulPred/trendedSensorsPlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/trendedSensorsPlot.png -------------------------------------------------------------------------------- /rulPred/vibrationVisualization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/vibrationVisualization.png -------------------------------------------------------------------------------- /rulPred/vibratonSpecKurtosis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/vibratonSpecKurtosis.png -------------------------------------------------------------------------------- /rulPred/weights.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/weights.PNG -------------------------------------------------------------------------------- /rulPred/捕获.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-gan/MatlabPred/a5dbc2dd52072b919cd7c11c18008f57cf5c6ab2/rulPred/捕获.PNG --------------------------------------------------------------------------------