简体   繁体   中英

Create Time-Series Model with data every 15minutes

I'm working on a SHM system where I have data every 15 minutes that came from sensors on a structure. I have a set of observations where there is no damage and another where some kind of damage was simulated. My objective is to take the undamaged data and use it to forecast. This forecasted data is then compared to the undamaged one and this difference will then be used to create control charts.

However my undamaged data is of around 5 months and the damaged state is of 8 months. I tried to explore the forecast package using multiple seasonality ( msts ) of 96 (1 day) and 35060 (1 year) since I believe it has a connection to temperature.

The models that I created that followed some kind of pattern that could resemble reality had a small amplitude, while the real data was much more volatile.

Can someone point me in the right direction as to what to do next and how to do it?

PS: When using the ts function even though I try to make it start at 2018-04-27 14:15:00 , when plotting the ts object always starts at 1-1-2018 . I think this is more aesthetic than anything but setting it right would be appreciated.

ts and msts objects are not well suited to high frequency data. I suggest you try using tsibble objects via the tsibble package ( http://tsibble.tidyverts.org ). With tsibble , the time index is explicit. Here is an example using 30 minute data.

library(tsibble)
library(feasts)
library(ggplot2)
tsibbledata::vic_elec
#> # A tsibble: 52,608 x 5 [30m] <UTC>
#>    Time                Demand Temperature Date       Holiday
#>    <dttm>               <dbl>       <dbl> <date>     <lgl>  
#>  1 2012-01-01 00:00:00  4263.        21.0 2012-01-01 TRUE   
#>  2 2012-01-01 00:30:00  4049.        20.7 2012-01-01 TRUE   
#>  3 2012-01-01 01:00:00  3878.        20.6 2012-01-01 TRUE   
#>  4 2012-01-01 01:30:00  4036.        20.4 2012-01-01 TRUE   
#>  5 2012-01-01 02:00:00  3866.        20.2 2012-01-01 TRUE   
#>  6 2012-01-01 02:30:00  3694.        20.1 2012-01-01 TRUE   
#>  7 2012-01-01 03:00:00  3562.        19.6 2012-01-01 TRUE   
#>  8 2012-01-01 03:30:00  3433.        19.1 2012-01-01 TRUE   
#>  9 2012-01-01 04:00:00  3359.        19.0 2012-01-01 TRUE   
#> 10 2012-01-01 04:30:00  3331.        18.8 2012-01-01 TRUE   
#> # … with 52,598 more rows
tsibbledata::vic_elec %>% autoplot(Demand)

在此处输入图片说明

Created on 2019-11-27 by the reprex package (v0.3.0)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM