I am working with 30 days (monthly) per cycle and thus have approximately 2 cycles in my historical dataset.
R script is,
library(forecast)
value <- c(117.2 , 224.2 , 258.0 , 292.1 , 400.1 , 509.9 , 626.8 , 722.9 , 826.1 , 883.6,916.6, 1032.1, 1151.2, 1273.4 ,1391.8, 1499.2, 1532.5 ,1565.9 ,1690.9, 1813.6,1961.4 ,2102.8 ,2208.2, 2256.8, 2290.8 ,2413.7, 2569.4 ,2730.3, 2882.9 ,2977.5, 117.2 , 224.2 , 258.0 , 292.1 , 400.1 , 509.9 , 626.8 , 722.9 , 826.1 , 883.6,916.6, 1032.1, 1151.2, 1273.4 ,1391.8, 1499.2, 1532.5 ,1565.9 ,1690.9, 1813.6,1961.4 ,2102.8 ,2208.2, 2256.8, 2290.8 ,2413.7, 2569.4 ,2730.3, 2882.9 ,2977.5)
sensor<-ts(value,frequency=30)#daily data of month,here only 2 month's data
fit <- auto.arima(sensor)
LH.pred<-predict(fit,n.ahead=30)
plot(sensor,ylim=c(0,4000),xlim=c(0,5),type="o", lwd="1")
lines(LH.pred$pred,col="red",type="o",lwd="1")
grid()
The resulting graph is

But I am not satisfied with the prediction. Is there any way to make the prediction look similar to the value trends preceding it (see graph)?
You are asking a lot of
auto.arima()to find a model using only two months of data. At least help it out a little by suggesting a seasonal difference. Further, don’t usepredict. Theforecastfunction is much nicer.For reasons why
forecast()is “nicer”, see the Journal of Statistical Software of July 2008, in particular section 4.4:Try the following.