Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Mean :2014-12-25 05:14:59 Mean :151.0
- 3rd Qu.:2015-01-23 07:45:00 3rd Qu.:155.1
- Max. :2015-03-01 13:00:00 Max. :165.6
- > sd(On[,2])
- [1] 5.226163
- > On_All <-ggarrange(On_L,On_B, On_H,
- + labels = c("A", "B","C"),
- + ncol = 1, nrow = 3,common.lege .... [TRUNCATED]
- `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
- `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
- > annotate_figure(On_All,top = text_grob("Period for When Heat Exchanger is ON (Temp >130oC)", color = "red", face = "bold", size = 14))
- > summary(On)
- Time Temp
- Min. :2014-10-28 00:00:00 Min. :131.9
- 1st Qu.:2014-11-29 04:15:00 1st Qu.:147.9
- Median :2014-12-29 15:30:00 Median :149.9
- Mean :2014-12-25 05:14:59 Mean :151.0
- 3rd Qu.:2015-01-23 07:45:00 3rd Qu.:155.1
- Max. :2015-03-01 13:00:00 Max. :165.6
- > sd(On[,2])
- [1] 5.226163
- > #Filtered
- > #Set On1
- > On1<- MD %>%
- + filter(Temp>=130,Time<"2014/11/8 00:00:00")
- > On1_L<-ggplot(On1, aes(Time,Temp))+geom_line()+ggtitle("Temperature Over Time for Time<2014/11/8")+scale_y_continuous("Temperature /oC")
- > On1_B<-ggplot(On1,aes(Time,Temp))+geom_boxplot()+ggtitle("Boxplot of Temperature Over Time")+scale_y_continuous("Temperature /oC")
- > summary(On1)
- Time Temp
- Min. :2014-10-28 00:00:00 Min. :143.9
- 1st Qu.:2014-10-30 17:45:00 1st Qu.:147.0
- Median :2014-11-02 11:30:00 Median :148.0
- Mean :2014-11-02 11:30:00 Mean :148.1
- 3rd Qu.:2014-11-05 05:15:00 3rd Qu.:149.6
- Max. :2014-11-07 23:00:00 Max. :151.6
- > sd(On1[,2])
- [1] 1.777138
- > #Set On2
- > On2<- MD %>%
- + filter(Temp>=130,Time>"2014/11/21 00:00:00",Time<"2014/12/12 00:00:00")
- > On2_L<-ggplot(On2,aes(Time,Temp))+geom_line()+ggtitle("Temperature Over Time for 2014/11/21<Time<2014/12/12")+scale_y_continuous("Temperature /oC")
- > On2_B<-ggplot(On2,aes(Time,Temp))+geom_boxplot()+ggtitle("Boxplot of Temperature Over Time")+scale_y_continuous("Temperature /oC")
- > summary(On2)
- Time Temp
- Min. :2014-11-22 08:00:00 Min. :144.2
- 1st Qu.:2014-11-27 02:00:00 1st Qu.:148.7
- Median :2014-12-01 20:00:00 Median :149.5
- Mean :2014-12-01 20:00:00 Mean :149.7
- 3rd Qu.:2014-12-06 14:00:00 3rd Qu.:150.5
- Max. :2014-12-11 08:00:00 Max. :162.7
- > sd(On2[,2])
- [1] 2.328006
- > #Set On3
- > On3<- MD %>%
- + filter(Temp>=130,Time>"2014/12/23 00:00:00",Time<"2015/01/12 00:00:00")
- > On3_L<- ggplot(On3,aes(Time,Temp))+geom_line()+ggtitle("Temperature Over Time for 2014/12/23<Time<2015/01/12")+scale_y_continuous("Temperature /oC")
- > On3_B<- ggplot(On3,aes(Time,Temp))+geom_boxplot()+ggtitle("Boxplot of Temperature Over Time")+scale_y_continuous("Temperature /oC")
- > summary(On3)
- Time Temp
- Min. :2014-12-23 03:00:00 Min. :141.4
- 1st Qu.:2014-12-28 02:00:00 1st Qu.:146.4
- Median :2015-01-02 01:00:00 Median :155.1
- Mean :2015-01-02 01:00:00 Mean :152.5
- 3rd Qu.:2015-01-07 00:00:00 3rd Qu.:156.4
- Max. :2015-01-11 23:00:00 Max. :162.1
- > sd(On3[,2])
- [1] 5.348035
- > #Set On4
- > On4<- MD %>%
- + filter(Temp>=130,Time>"2015/1/19 00:00:00",Time<"2015/02/8 00:00:00")
- > On4_L<-ggplot(On4,aes(Time,Temp))+geom_line()+ggtitle("Temperature Over Time for 2015/1/19<Time<2015/02/8")+scale_y_continuous("Temperature /oC")
- > On4_B<-ggplot(On4,aes(Time,Temp))+geom_boxplot()+ggtitle("Boxplot of Temperature Over Time")+scale_y_continuous("Temperature /oC")
- > summary(On4)
- Time Temp
- Min. :2015-01-19 01:00:00 Min. :132.3
- 1st Qu.:2015-01-24 01:15:00 1st Qu.:148.9
- Median :2015-01-29 00:30:00 Median :151.1
- Mean :2015-01-29 00:20:20 Mean :153.6
- 3rd Qu.:2015-02-02 23:45:00 3rd Qu.:159.6
- Max. :2015-02-07 23:00:00 Max. :165.6
- > sd(On4[,2])
- [1] 5.824139
- > #Set On5
- > On5<- MD %>%
- + filter(Temp>=130,Time>"2015/02/26 00:00:00")
- > On5_L <-ggplot(On5,aes(Time,Temp))+geom_line()+ggtitle("Temperature Over Time for Time>2015/02/26")+scale_y_continuous("Temperature /oC")
- > On5_B <-ggplot(On5,aes(Time,Temp))+geom_boxplot()+ggtitle("Boxplot of Temperature Over Time")+scale_y_continuous("Temperature /oC")
- > summary(On4)
- Time Temp
- Min. :2015-01-19 01:00:00 Min. :132.3
- 1st Qu.:2015-01-24 01:15:00 1st Qu.:148.9
- Median :2015-01-29 00:30:00 Median :151.1
- Mean :2015-01-29 00:20:20 Mean :153.6
- 3rd Qu.:2015-02-02 23:45:00 3rd Qu.:159.6
- Max. :2015-02-07 23:00:00 Max. :165.6
- > sd(On4[,2])
- [1] 5.824139
- > On_TimeFrames <-ggarrange(On1_L,On1_B, On2_L,On2_B,On3_L,On3_B,On4_L,On4_B,On5_L,On5_B,
- + labels = c("A", "B","C", "D","E", "F","G","H"," ..." ... [TRUNCATED]
- > annotate_figure(On_TimeFrames,top = text_grob("Time periods when Heat Exchanger is ON (Temp >130oC)", color = "red", face = "bold", size = 14))
- > #Set Off
- > Off<- MD %>%
- + filter(Temp<=50)
- > Off_L <- ggplot(Off,aes(x=Time,y=Temp))+geom_line()+ggtitle("Temperature Over Time")+scale_y_continuous("Temperature /oC")
- > Off_B <- ggplot(Off,aes(x=Time,y=Temp))+geom_boxplot()+ggtitle("Boxplot of Temperature Data")+scale_y_continuous("Temperature /oC")
- > Off_H <- ggplot(Off,aes(x=Temp))+geom_histogram()+ggtitle("Temperature Frequency Distribution")+scale_x_continuous("Temperature / oC")+scale_y_conti .... [TRUNCATED]
- > Off_all <- ggarrange(Off_L,Off_B, Off_H,
- + labels = c("A", "B","C"),
- + ncol = 1, nrow = 3,common.legend .... [TRUNCATED]
- `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
- `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
- > annotate_figure(Off_all,top = text_grob("Period for When Heat Exchanger is OFF (Temp <50oC)", color = "red", face = "bold", size = 14))
- > summary(Off)
- Time Temp
- Min. :2014-11-09 08:00:00 Min. :25.57
- 1st Qu.:2014-11-20 22:45:00 1st Qu.:33.79
- Median :2014-12-22 10:30:00 Median :37.36
- Mean :2015-01-04 18:12:47 Mean :37.25
- 3rd Qu.:2015-02-14 10:15:00 3rd Qu.:40.53
- Max. :2015-02-26 16:00:00 Max. :49.64
- > sd(Off[,2])
- [1] 4.490162
- > #Filtered
- > #Set Off1
- > Off1<- MD %>%
- + filter(Temp<=50,Time>"2014/11/8 00:00:00", Time<"2014/11/21 00:00:00")
- > Off1_L<-ggplot(Off1, aes(Time,Temp))+geom_line()+ggtitle("Temperature Over Time for 2014/11/8>Time>2014/11/21")+scale_y_continuous("Temperature /oC" .... [TRUNCATED]
- > Off1_B<-ggplot(Off1,aes(Time,Temp))+geom_boxplot()+ggtitle("Boxplot of Temperature Over Time")+scale_y_continuous("Temperature /oC")
- > summary(Off1)
- Time Temp
- Min. :2014-11-09 08:00:00 Min. :29.37
- 1st Qu.:2014-11-12 05:45:00 1st Qu.:37.82
- Median :2014-11-15 03:30:00 Median :40.00
- Mean :2014-11-15 03:30:00 Mean :40.12
- 3rd Qu.:2014-11-18 01:15:00 3rd Qu.:42.40
- Max. :2014-11-20 23:00:00 Max. :49.38
- > sd(Off1[,2])
- [1] 3.389296
- > #Set Off2
- > Off2<- MD %>%
- + filter(Temp<=50,Time>"2014/12/12 00:00:00",Time<"2014/12/23 00:00:00")
- > Off2_L<-ggplot(Off2,aes(Time,Temp))+geom_line()+ggtitle("Temperature Over Time for 2014/12/12>Time>2014/12/23")+scale_y_continuous("Temperature /oC" .... [TRUNCATED]
- > Off2_B<-ggplot(Off2,aes(Time,Temp))+geom_boxplot()+ggtitle("Boxplot of Temperature Over Time")+scale_y_continuous("Temperature /oC")
- > summary(Off2)
- Time Temp
- Min. :2014-12-12 01:00:00 Min. :28.70
- 1st Qu.:2014-12-14 16:15:00 1st Qu.:34.48
- Median :2014-12-17 07:30:00 Median :38.29
- Mean :2014-12-17 07:30:00 Mean :37.79
- 3rd Qu.:2014-12-19 22:45:00 3rd Qu.:40.93
- Max. :2014-12-22 14:00:00 Max. :45.21
- > sd(Off2[,2])
- [1] 3.805508
- > #Set Off3
- > Off3<- MD %>%
- + filter(Temp<=50,Time>"2015/01/12 00:00:00",Time<"2015/1/19 00:00:00")
- > Off3_L<- ggplot(Off3,aes(Time,Temp))+geom_line()+ggtitle("Temperature Over Time for 2015/01/12>Time>2015/1/19")+scale_y_continuous("Temperature /oC" .... [TRUNCATED]
- > Off3_B<- ggplot(Off3,aes(Time,Temp))+geom_boxplot()+ggtitle("Boxplot of Temperature Over Time")+scale_y_continuous("Temperature /oC")
- > summary(Off3)
- Time Temp
- Min. :2015-01-13 02:00:00 Min. :31.17
- 1st Qu.:2015-01-14 09:45:00 1st Qu.:35.50
- Median :2015-01-15 17:30:00 Median :38.30
- Mean :2015-01-15 17:30:00 Mean :38.18
- 3rd Qu.:2015-01-17 01:15:00 3rd Qu.:40.67
- Max. :2015-01-18 09:00:00 Max. :48.62
- > sd(Off3[,2])
- [1] 3.389462
- > #Set off4
- > Off4<- MD %>%
- + filter(Temp<=50,Time>"2015/02/8 00:00:00",Time<"2015/02/26 00:00:00")
- > Off4_L<-ggplot(Off4,aes(Time,Temp))+geom_line()+ggtitle("Temperature Over Time for 2015/02/8>Time>2015/02/26")+scale_y_continuous("Temperature /oC")
- > Off4_B<-ggplot(Off4,aes(Time,Temp))+geom_boxplot()+ggtitle("Boxplot of Temperature Over Time")+scale_y_continuous("Temperature /oC")
- > summary(Off4)
- Time Temp
- Min. :2015-02-08 08:00:00 Min. :25.57
- 1st Qu.:2015-02-12 14:00:00 1st Qu.:32.02
- Median :2015-02-16 20:00:00 Median :33.85
- Mean :2015-02-16 22:20:49 Mean :34.31
- 3rd Qu.:2015-02-21 02:00:00 3rd Qu.:36.50
- Max. :2015-02-25 23:00:00 Max. :49.64
- > sd(Off4[,2])
- [1] 3.932441
- > On_TimeFrames <-ggarrange(Off1_L,Off1_B, Off2_L,Off2_B,Off3_L,Off3_B,Off4_L,Off4_B,
- + labels = c("A", "B","C", "D","E", "F ..." ... [TRUNCATED]
- > annotate_figure(On_TimeFrames,top = text_grob("Time periods when Heat Exchanger is OFF (Temp<50oC)", color = "red", face = "bold", size = 14))
- > #Variance PLot
- > #dz<-diff(MD[,2])
- > #plot(time_var,dz)
- >
- >
- > # # #Set 1_5/5
- > # # we<- MD %>%
- > # # filter(Temp>=135,Time<"2014/11/9 12:00:00") .... [TRUNCATED]
- There were 50 or more warnings (use warnings() to see the first 50)
- > source('~/CHICA/Ass1/Ass1/FFT.R', echo=TRUE)
- > #install.packages(tidy)
- > #D2H14A:TTPV Exchanger 14A temperature
- > library(readxl)
- > library(tidyverse)
- > library(xts)
- > library(forecast)
- > library(ggpubr)
- > library(EnvStats)
- > rm(list=ls())
- > data<- read_excel("QAL_plant.xlsx", sheet = 1, skip = 3, col_names = TRUE)
- New names:
- * Date -> Date..1
- * Date -> Date..2
- * D2H12TTPVTemp_oC -> D2H12TTPVTemp_oC..21
- * D2H13TTPVTemp_oC -> D2H13TTPVTemp_oC..22
- * D2H14TTPVTemp_oC -> D2H14TTPVTemp_oC..23
- * ... and 5 more
- > T1Col <- 18
- > #Temp Data
- > my_Temp<-data[T1Col]
- > #Creating Time Data
- > time_index <- seq(from=as.POSIXct("2014-10-28 00:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > time_var<- seq(from=as.POSIXct("2014-10-28 01:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > #My Data
- > MD <- data.frame(time_index,my_Temp)
- > colnames(MD) <- c("Time","Temp")
- > #################################################= Required Functions
- > plot.frequency.spectrum <- function(X.k, xlimits=c(0,length(X.k))) {
- + plo .... [TRUNCATED]
- > # Plot the i-th harmonic
- > # Xk: the frequencies computed by the FFt
- > # i: which harmonic
- > # ts: the sampling time points
- > # acq.freq: the acqui .... [TRUNCATED]
- > get.trajectory <- function(X.k,ts,acq.freq) {
- +
- + N <- length(ts)
- + i <- complex(real = 0, imaginary = 1)
- + x.n <- rep(0,N) # .... [TRUNCATED]
- > 2############################=Working
- [1] 2
- > X.k <- fft(MD$Temp) # find all harmonics with fft()
- > plot.frequency.spectrum(X.k, xlimits=c(0,100))
- There were 50 or more warnings (use warnings() to see the first 50)
- > source('~/CHICA/Ass1/Ass1/FFT.R', echo=TRUE)
- > #install.packages(tidy)
- > #D2H14A:TTPV Exchanger 14A temperature
- > library(readxl)
- > library(tidyverse)
- > library(xts)
- > library(forecast)
- > library(ggpubr)
- > library(EnvStats)
- > rm(list=ls())
- > data<- read_excel("QAL_plant.xlsx", sheet = 1, skip = 3, col_names = TRUE)
- New names:
- * Date -> Date..1
- * Date -> Date..2
- * D2H12TTPVTemp_oC -> D2H12TTPVTemp_oC..21
- * D2H13TTPVTemp_oC -> D2H13TTPVTemp_oC..22
- * D2H14TTPVTemp_oC -> D2H14TTPVTemp_oC..23
- * ... and 5 more
- > T1Col <- 18
- > #Temp Data
- > my_Temp<-data[T1Col]
- > #Creating Time Data
- > time_index <- seq(from=as.POSIXct("2014-10-28 00:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > time_var<- seq(from=as.POSIXct("2014-10-28 01:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > #My Data
- > MD <- data.frame(time_index,my_Temp)
- > colnames(MD) <- c("Time","Temp")
- > #################################################= Required Functions
- > plot.frequency.spectrum <- function(X.k, xlimits=c(0,length(X.k))) {
- + plo .... [TRUNCATED]
- > # Plot the i-th harmonic
- > # Xk: the frequencies computed by the FFt
- > # i: which harmonic
- > # ts: the sampling time points
- > # acq.freq: the acqui .... [TRUNCATED]
- > get.trajectory <- function(X.k,ts,acq.freq) {
- +
- + N <- length(ts)
- + i <- complex(real = 0, imaginary = 1)
- + x.n <- rep(0,N) # .... [TRUNCATED]
- > 2############################=Working
- [1] 2
- > X.k <- fft(MD$Temp %>% filter(Temp>=137)) # find all harmonics with fft()
- Error in UseMethod("filter_") :
- no applicable method for 'filter_' applied to an object of class "c('double', 'numeric')"
- In addition: There were 50 or more warnings (use warnings() to see the first 50)
- > source('~/CHICA/Ass1/Ass1/FFT.R', echo=TRUE)
- > #install.packages(tidy)
- > #D2H14A:TTPV Exchanger 14A temperature
- > library(readxl)
- > library(tidyverse)
- > library(xts)
- > library(forecast)
- > library(ggpubr)
- > library(EnvStats)
- > rm(list=ls())
- > data<- read_excel("QAL_plant.xlsx", sheet = 1, skip = 3, col_names = TRUE)
- New names:
- * Date -> Date..1
- * Date -> Date..2
- * D2H12TTPVTemp_oC -> D2H12TTPVTemp_oC..21
- * D2H13TTPVTemp_oC -> D2H13TTPVTemp_oC..22
- * D2H14TTPVTemp_oC -> D2H14TTPVTemp_oC..23
- * ... and 5 more
- > T1Col <- 18
- > #Temp Data
- > my_Temp<-data[T1Col]
- > #Creating Time Data
- > time_index <- seq(from=as.POSIXct("2014-10-28 00:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > time_var<- seq(from=as.POSIXct("2014-10-28 01:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > #My Data
- > MD <- data.frame(time_index,my_Temp)
- > colnames(MD) <- c("Time","Temp")
- > #################################################= Required Functions
- > plot.frequency.spectrum <- function(X.k, xlimits=c(0,length(X.k))) {
- + plo .... [TRUNCATED]
- > # Plot the i-th harmonic
- > # Xk: the frequencies computed by the FFt
- > # i: which harmonic
- > # ts: the sampling time points
- > # acq.freq: the acqui .... [TRUNCATED]
- > get.trajectory <- function(X.k,ts,acq.freq) {
- +
- + N <- length(ts)
- + i <- complex(real = 0, imaginary = 1)
- + x.n <- rep(0,N) # .... [TRUNCATED]
- > 2############################=Working
- [1] 2
- > X.k <- fft(MD %>% filter(Temp>=137)) # find all harmonics with fft()
- Error in fft(MD %>% filter(Temp >= 137)) : non-numeric argument
- In addition: There were 50 or more warnings (use warnings() to see the first 50)
- > source('~/CHICA/Ass1/Ass1/FFT.R', echo=TRUE)
- > #install.packages(tidy)
- > #D2H14A:TTPV Exchanger 14A temperature
- > library(readxl)
- > library(tidyverse)
- > library(xts)
- > library(forecast)
- > library(ggpubr)
- > library(EnvStats)
- > rm(list=ls())
- > data<- read_excel("QAL_plant.xlsx", sheet = 1, skip = 3, col_names = TRUE)
- New names:
- * Date -> Date..1
- * Date -> Date..2
- * D2H12TTPVTemp_oC -> D2H12TTPVTemp_oC..21
- * D2H13TTPVTemp_oC -> D2H13TTPVTemp_oC..22
- * D2H14TTPVTemp_oC -> D2H14TTPVTemp_oC..23
- * ... and 5 more
- > T1Col <- 18
- > #Temp Data
- > my_Temp<-data[T1Col]
- > #Creating Time Data
- > time_index <- seq(from=as.POSIXct("2014-10-28 00:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > time_var<- seq(from=as.POSIXct("2014-10-28 01:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > #My Data
- > MD <- data.frame(time_index,my_Temp)
- > colnames(MD) <- c("Time","Temp")
- > #################################################= Required Functions
- > plot.frequency.spectrum <- function(X.k, xlimits=c(0,length(X.k))) {
- + plo .... [TRUNCATED]
- > # Plot the i-th harmonic
- > # Xk: the frequencies computed by the FFt
- > # i: which harmonic
- > # ts: the sampling time points
- > # acq.freq: the acqui .... [TRUNCATED]
- > get.trajectory <- function(X.k,ts,acq.freq) {
- +
- + N <- length(ts)
- + i <- complex(real = 0, imaginary = 1)
- + x.n <- rep(0,N) # .... [TRUNCATED]
- > 2############################=Working
- [1] 2
- > X.k <- fft(MD$Temp %>% filter(Temp>=137)) # find all harmonics with fft()
- Error in UseMethod("filter_") :
- no applicable method for 'filter_' applied to an object of class "c('double', 'numeric')"
- In addition: There were 50 or more warnings (use warnings() to see the first 50)
- > source('~/CHICA/Ass1/Ass1/FFT.R', echo=TRUE)
- > #install.packages(tidy)
- > #D2H14A:TTPV Exchanger 14A temperature
- > library(readxl)
- > library(tidyverse)
- > library(xts)
- > library(forecast)
- > library(ggpubr)
- > library(EnvStats)
- > rm(list=ls())
- > data<- read_excel("QAL_plant.xlsx", sheet = 1, skip = 3, col_names = TRUE)
- New names:
- * Date -> Date..1
- * Date -> Date..2
- * D2H12TTPVTemp_oC -> D2H12TTPVTemp_oC..21
- * D2H13TTPVTemp_oC -> D2H13TTPVTemp_oC..22
- * D2H14TTPVTemp_oC -> D2H14TTPVTemp_oC..23
- * ... and 5 more
- > T1Col <- 18
- > #Temp Data
- > my_Temp<-data[T1Col]
- > #Creating Time Data
- > time_index <- seq(from=as.POSIXct("2014-10-28 00:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > time_var<- seq(from=as.POSIXct("2014-10-28 01:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > #My Data
- > MD <- data.frame(time_index,my_Temp)
- > colnames(MD) <- c("Time","Temp")
- > #################################################= Required Functions
- > plot.frequency.spectrum <- function(X.k, xlimits=c(0,length(X.k))) {
- + plo .... [TRUNCATED]
- > # Plot the i-th harmonic
- > # Xk: the frequencies computed by the FFt
- > # i: which harmonic
- > # ts: the sampling time points
- > # acq.freq: the acqui .... [TRUNCATED]
- > get.trajectory <- function(X.k,ts,acq.freq) {
- +
- + N <- length(ts)
- + i <- complex(real = 0, imaginary = 1)
- + x.n <- rep(0,N) # .... [TRUNCATED]
- > On<- MD %>%
- + filter(Temp>=137)
- > 2############################=Working
- [1] 2
- > X.k <- fft(On$Temp) # find all harmonics with fft()
- > plot.frequency.spectrum(X.k, xlimits=c(0,100))
- There were 50 or more warnings (use warnings() to see the first 50)
- > source('~/CHICA/Ass1/Ass1/FFT.R', echo=TRUE)
- > #install.packages(tidy)
- > #D2H14A:TTPV Exchanger 14A temperature
- > library(readxl)
- > library(tidyverse)
- > library(xts)
- > library(forecast)
- > library(ggpubr)
- > library(EnvStats)
- > rm(list=ls())
- > data<- read_excel("QAL_plant.xlsx", sheet = 1, skip = 3, col_names = TRUE)
- New names:
- * Date -> Date..1
- * Date -> Date..2
- * D2H12TTPVTemp_oC -> D2H12TTPVTemp_oC..21
- * D2H13TTPVTemp_oC -> D2H13TTPVTemp_oC..22
- * D2H14TTPVTemp_oC -> D2H14TTPVTemp_oC..23
- * ... and 5 more
- > T1Col <- 18
- > #Temp Data
- > my_Temp<-data[T1Col]
- > #Creating Time Data
- > time_index <- seq(from=as.POSIXct("2014-10-28 00:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > time_var<- seq(from=as.POSIXct("2014-10-28 01:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > #My Data
- > MD <- data.frame(time_index,my_Temp)
- > colnames(MD) <- c("Time","Temp")
- > #################################################= Required Functions
- > plot.frequency.spectrum <- function(X.k, xlimits=c(0,length(X.k))) {
- + plo .... [TRUNCATED]
- > # Plot the i-th harmonic
- > # Xk: the frequencies computed by the FFt
- > # i: which harmonic
- > # ts: the sampling time points
- > # acq.freq: the acqui .... [TRUNCATED]
- > get.trajectory <- function(X.k,ts,acq.freq) {
- +
- + N <- length(ts)
- + i <- complex(real = 0, imaginary = 1)
- + x.n <- rep(0,N) # .... [TRUNCATED]
- > On<- MD %>%
- + filter(Temp>=137)
- > On1<- MD %>%
- + filter(Temp>=137,Time<"2014/11/8 00:00:00")
- > On2<- MD %>%
- + filter(Temp>=137,Time>"2014/11/21 00:00:00",Time<"2014/12/12 00:00:00")
- > On3<- MD %>%
- + filter(Temp>=137,Time>"2014/12/23 00:00:00",Time<"2015/01/12 00:00:00")
- > On4<- MD %>%
- + filter(Temp>=137,Time>"2015/1/19 00:00:00",Time<"2015/02/8 00:00:00")
- > On5<- MD %>%
- + filter(Temp>=137,Time>"2014/11/01 00:00:00",Time<"2014/11/01 12:00:00")
- > 2############################=Working
- [1] 2
- > X.k <- fft(On1$Temp) # find all harmonics with fft()
- > plot.frequency.spectrum(X.k, xlimits=c(0,100))
- There were 50 or more warnings (use warnings() to see the first 50)
- > source('~/CHICA/Ass1/Ass1/FFT.R', echo=TRUE)
- > #install.packages(tidy)
- > #D2H14A:TTPV Exchanger 14A temperature
- > library(readxl)
- > library(tidyverse)
- > library(xts)
- > library(forecast)
- > library(ggpubr)
- > library(EnvStats)
- > rm(list=ls())
- > data<- read_excel("QAL_plant.xlsx", sheet = 1, skip = 3, col_names = TRUE)
- New names:
- * Date -> Date..1
- * Date -> Date..2
- * D2H12TTPVTemp_oC -> D2H12TTPVTemp_oC..21
- * D2H13TTPVTemp_oC -> D2H13TTPVTemp_oC..22
- * D2H14TTPVTemp_oC -> D2H14TTPVTemp_oC..23
- * ... and 5 more
- > T1Col <- 18
- > #Temp Data
- > my_Temp<-data[T1Col]
- > #Creating Time Data
- > time_index <- seq(from=as.POSIXct("2014-10-28 00:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > time_var<- seq(from=as.POSIXct("2014-10-28 01:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > #My Data
- > MD <- data.frame(time_index,my_Temp)
- > colnames(MD) <- c("Time","Temp")
- > #################################################= Required Functions
- > plot.frequency.spectrum <- function(X.k, xlimits=c(0,length(X.k))) {
- + plo .... [TRUNCATED]
- > # Plot the i-th harmonic
- > # Xk: the frequencies computed by the FFt
- > # i: which harmonic
- > # ts: the sampling time points
- > # acq.freq: the acqui .... [TRUNCATED]
- > get.trajectory <- function(X.k,ts,acq.freq) {
- +
- + N <- length(ts)
- + i <- complex(real = 0, imaginary = 1)
- + x.n <- rep(0,N) # .... [TRUNCATED]
- > On<- MD %>%
- + filter(Temp>=137)
- > On1<- MD %>%
- + filter(Temp>=137,Time<"2014/11/8 00:00:00")
- > On2<- MD %>%
- + filter(Temp>=137,Time>"2014/11/21 00:00:00",Time<"2014/12/12 00:00:00")
- > On3<- MD %>%
- + filter(Temp>=137,Time>"2014/12/23 00:00:00",Time<"2015/01/12 00:00:00")
- > On4<- MD %>%
- + filter(Temp>=137,Time>"2015/1/19 00:00:00",Time<"2015/02/8 00:00:00")
- > On5<- MD %>%
- + filter(Temp>=137,Time>"2014/11/01 00:00:00",Time<"2014/11/01 12:00:00")
- > 2############################=Working
- [1] 2
- > X.k <- fft(On2$Temp) # find all harmonics with fft()
- > plot.frequency.spectrum(X.k, xlimits=c(0,100))
- There were 50 or more warnings (use warnings() to see the first 50)
- > source('~/CHICA/Ass1/Ass1/FFT.R', echo=TRUE)
- > #install.packages(tidy)
- > #D2H14A:TTPV Exchanger 14A temperature
- > library(readxl)
- > library(tidyverse)
- > library(xts)
- > library(forecast)
- > library(ggpubr)
- > library(EnvStats)
- > rm(list=ls())
- > data<- read_excel("QAL_plant.xlsx", sheet = 1, skip = 3, col_names = TRUE)
- New names:
- * Date -> Date..1
- * Date -> Date..2
- * D2H12TTPVTemp_oC -> D2H12TTPVTemp_oC..21
- * D2H13TTPVTemp_oC -> D2H13TTPVTemp_oC..22
- * D2H14TTPVTemp_oC -> D2H14TTPVTemp_oC..23
- * ... and 5 more
- > T1Col <- 18
- > #Temp Data
- > my_Temp<-data[T1Col]
- > #Creating Time Data
- > time_index <- seq(from=as.POSIXct("2014-10-28 00:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > time_var<- seq(from=as.POSIXct("2014-10-28 01:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > #My Data
- > MD <- data.frame(time_index,my_Temp)
- > colnames(MD) <- c("Time","Temp")
- > #################################################= Required Functions
- > plot.frequency.spectrum <- function(X.k, xlimits=c(0,length(X.k))) {
- + plo .... [TRUNCATED]
- > # Plot the i-th harmonic
- > # Xk: the frequencies computed by the FFt
- > # i: which harmonic
- > # ts: the sampling time points
- > # acq.freq: the acqui .... [TRUNCATED]
- > get.trajectory <- function(X.k,ts,acq.freq) {
- +
- + N <- length(ts)
- + i <- complex(real = 0, imaginary = 1)
- + x.n <- rep(0,N) # .... [TRUNCATED]
- > On<- MD %>%
- + filter(Temp>=137)
- > On1<- MD %>%
- + filter(Temp>=137,Time<"2014/11/8 00:00:00")
- > On2<- MD %>%
- + filter(Temp>=137,Time>"2014/11/21 00:00:00",Time<"2014/12/12 00:00:00")
- > On3<- MD %>%
- + filter(Temp>=137,Time>"2014/12/23 00:00:00",Time<"2015/01/12 00:00:00")
- > On4<- MD %>%
- + filter(Temp>=137,Time>"2015/1/19 00:00:00",Time<"2015/02/8 00:00:00")
- > On5<- MD %>%
- + filter(Temp>=137,Time>"2014/11/01 00:00:00",Time<"2014/11/01 12:00:00")
- > 2############################=Working
- [1] 2
- > X.k <- fft(On$Temp) # find all harmonics with fft()
- > plot.frequency.spectrum(X.k, xlimits=c(0,100))
- There were 50 or more warnings (use warnings() to see the first 50)
- > source('~/CHICA/Ass1/Ass1/FFT.R', echo=TRUE)
- > #install.packages(tidy)
- > #D2H14A:TTPV Exchanger 14A temperature
- > library(readxl)
- > library(tidyverse)
- > library(xts)
- > library(forecast)
- > library(ggpubr)
- > library(EnvStats)
- > rm(list=ls())
- > data<- read_excel("QAL_plant.xlsx", sheet = 1, skip = 3, col_names = TRUE)
- New names:
- * Date -> Date..1
- * Date -> Date..2
- * D2H12TTPVTemp_oC -> D2H12TTPVTemp_oC..21
- * D2H13TTPVTemp_oC -> D2H13TTPVTemp_oC..22
- * D2H14TTPVTemp_oC -> D2H14TTPVTemp_oC..23
- * ... and 5 more
- > T1Col <- 18
- > #Temp Data
- > my_Temp<-data[T1Col]
- > #Creating Time Data
- > time_index <- seq(from=as.POSIXct("2014-10-28 00:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > time_var<- seq(from=as.POSIXct("2014-10-28 01:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > #My Data
- > MD <- data.frame(time_index,my_Temp)
- > colnames(MD) <- c("Time","Temp")
- > #################################################= Required Functions
- > plot.frequency.spectrum <- function(X.k, xlimits=c(0,length(X.k))) {
- + plo .... [TRUNCATED]
- > # Plot the i-th harmonic
- > # Xk: the frequencies computed by the FFt
- > # i: which harmonic
- > # ts: the sampling time points
- > # acq.freq: the acqui .... [TRUNCATED]
- > get.trajectory <- function(X.k,ts,acq.freq) {
- +
- + N <- length(ts)
- + i <- complex(real = 0, imaginary = 1)
- + x.n <- rep(0,N) # .... [TRUNCATED]
- > On<- MD %>%
- + filter(Temp>=137)
- > On1<- MD %>%
- + filter(Temp>=137,Time<"2014/11/8 00:00:00")
- > On2<- MD %>%
- + filter(Temp>=137,Time>"2014/11/21 00:00:00",Time<"2014/12/12 00:00:00")
- > On3<- MD %>%
- + filter(Temp>=137,Time>"2014/12/23 00:00:00",Time<"2015/01/12 00:00:00")
- > On4<- MD %>%
- + filter(Temp>=137,Time>"2015/1/19 00:00:00",Time<"2015/02/8 00:00:00")
- > On5<- MD %>%
- + filter(Temp>=137,Time>"2014/11/01 00:00:00",Time<"2014/11/01 12:00:00")
- > 2############################=Working
- [1] 2
- > X.k <- fft(On3$Temp) # find all harmonics with fft()
- > plot.frequency.spectrum(X.k, xlimits=c(0,100))
- There were 50 or more warnings (use warnings() to see the first 50)
- > source('~/CHICA/Ass1/Ass1/FFT.R', echo=TRUE)
- > #install.packages(tidy)
- > #D2H14A:TTPV Exchanger 14A temperature
- > library(readxl)
- > library(tidyverse)
- > library(xts)
- > library(forecast)
- > library(ggpubr)
- > library(EnvStats)
- > rm(list=ls())
- > data<- read_excel("QAL_plant.xlsx", sheet = 1, skip = 3, col_names = TRUE)
- New names:
- * Date -> Date..1
- * Date -> Date..2
- * D2H12TTPVTemp_oC -> D2H12TTPVTemp_oC..21
- * D2H13TTPVTemp_oC -> D2H13TTPVTemp_oC..22
- * D2H14TTPVTemp_oC -> D2H14TTPVTemp_oC..23
- * ... and 5 more
- > T1Col <- 18
- > #Temp Data
- > my_Temp<-data[T1Col]
- > #Creating Time Data
- > time_index <- seq(from=as.POSIXct("2014-10-28 00:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > time_var<- seq(from=as.POSIXct("2014-10-28 01:00"), to =as.POSIXct("2015-03-01 13:00"), by="hour")
- > #My Data
- > MD <- data.frame(time_index,my_Temp)
- > colnames(MD) <- c("Time","Temp")
- > #################################################= Required Functions
- > plot.frequency.spectrum <- function(X.k, xlimits=c(0,length(X.k))) {
- + plo .... [TRUNCATED]
- > # Plot the i-th harmonic
- > # Xk: the frequencies computed by the FFt
- > # i: which harmonic
- > # ts: the sampling time points
- > # acq.freq: the acqui .... [TRUNCATED]
- > get.trajectory <- function(X.k,ts,acq.freq) {
- +
- + N <- length(ts)
- + i <- complex(real = 0, imaginary = 1)
- + x.n <- rep(0,N) # .... [TRUNCATED]
- > On<- MD %>%
- + filter(Temp>=137)
- > On1<- MD %>%
- + filter(Temp>=137,Time<"2014/11/8 00:00:00")
- > On2<- MD %>%
- + filter(Temp>=137,Time>"2014/11/21 00:00:00",Time<"2014/12/12 00:00:00")
- > On3<- MD %>%
- + filter(Temp>=137,Time>"2014/12/23 00:00:00",Time<"2015/01/12 00:00:00")
- > On4<- MD %>%
- + filter(Temp>=137,Time>"2015/1/19 00:00:00",Time<"2015/02/8 00:00:00")
- > On5<- MD %>%
- + filter(Temp>=137,Time>"2014/11/01 00:00:00",Time<"2014/11/01 12:00:00")
- > 2############################=Working
- [1] 2
- > X.k <- fft(On4$Temp) # find all harmonics with fft()
- > plot.frequency.spectrum(X.k, xlimits=c(0,100))
- There were 50 or more warnings (use warnings() to see the first 50)
- >
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement