Filtering disturbances from time series Lets suppose that time series of the following building climate related measures are given for a small building:


*

*Solar radiation

*Outdoor air temperature

*Heat supply

*Indoor air temperature


The measurements are collected during an occupied period, which means that the occupants possibly have opened and closed the windows, adjusted the set point temperature for the heat supply, closed the external solar shading etc. All actions or disturbances which has affected the measured indoor temperature. These interaction with the building is in this case treated as disturbances of the, otherwise, free running building.
Which statistical methods could possible be used to filter out such disturbances, so the time series of the free running building can be estimated?
 A: If I understood your questions correctly, you wanted essentially remove disturbances from the time series and model the temperature as a time-variant response to the listed 4 predictors. 
One R package I used in the past is 'tsoutliers' to model time series data with known outliers and/or temporary changes. The algorithm iteratively locates, remove outliers and refit the model. If I remember correctly, it uses t-statistics of the residual to identify if a given data point is considered to be an outlier, in your case disturbances. The paper Joint Estimation of Model Parameters and Outlier Effects in Time Series by Chen and Liu in 1993 provides the theoretic contexts if you were interested in that.
There are plenty of documentations and cross-validation questions answered that probably can also help you.
A: It might be difficult to tune outlier detection for this problem, because the individual actions may often have a fairly small effect, and there will also often be significant lags in the system, which will tend to smooth out the responses to the events over time, making outlier detection difficult. That's obvious in the case of sampling faster than your dynamic response, but it's still a factor even for slow sampling, because some events will occur just before a sample is taken, so the effects can be smeared across time steps.
I would look at this as unmeasured disturbances - noise that has to be filtered out.  This can be done when causality is considered.  It looks like your building is a process with measured inputs (solar radiation, outdoor air temperature, and heat supply) and a measured output (room air temperature).  Ideally, the same set of inputs should always result in the same output.  But it doesn't because of the unmeasured disturbances. 
For a given set of input conditions, conceptually you want to average the output over all the times you see the same inputs. Over a long time period, cases of input conditions that are close to each other will repeat, so that clustering can be applied.
You can address the problem with real-time clustering (using the "causal filter" approach of setting the weighting of the output variables to 0 in your distance measure), as described in 
http://gregstanleyandassociates.com/whitepapers/BDAC/Clustering/clustering.htm 
The output is a training set, of representative system data (both inputs and output data) where effects of the unmeasured disturbances have been reduced.   If you were building a static (algebraic) model, you could directly use this synthesized data as input to regression models, neural nets, etc.  For a dynamic model, the time series for each variable can be mapped into one long vector, and you can do the same thing.  That's described in the representation portion of the associated "BDAC" material at the link above. The results in that case, mapped back from the long vector, are a set of representative time series for each variable, with a reduction in the noise.  Apply whatever analysis you would like on those representative time series.  
