How to generate signal with seasonal and diurnal component?

3 ビュー (過去 30 日間)
Charles Barbier Mr
Charles Barbier Mr 2017 年 2 月 13 日
編集済み: Charles Barbier Mr 2017 年 4 月 8 日
If we had a time series of hourly air temperature measurements and then plotted the entire series it would look similar to a bell shaped curve
i.e.
a = 0; b = 30;
x = a + (b-a) * rand(1, 8760);
m = (a + b)/2;
s = 12;
p1 = -.5 * ((x - m)/s) .^ 2;
p2 = (s * sqrt(2*pi));
f = exp(p1) ./ p2;
plot(x,f,'.')
with the maximum values occurring in mid summer and lowest values during the winter. However, by zooming in on specific days we would see that the temperature also fluctuates between the day and the evening where maximum temperatures would occur at approximately 15:00 and minimum temperature at approximately 06:00. So, my question is how would I generate this series, i.e. a time series which had a maximum value of say 30 degrees in mid summer i.e. value (8760/2) and also had the daily pattern mentioned above incorporated into the overall pattern?

採用された回答

Bjorn Gustavsson
Bjorn Gustavsson 2017 年 2 月 13 日
Well a first stab would be to look at this as a function that has a daily variation, i.e. a time-period of 24 hours, and then perhaps bot the average and amplitude of that curve would have a 365 day variation. Perhaps something like this:
t = 0:(24*365);
T = -4*cos(t*2*pi/(24*365))-6*(1-0.25*cos(t*4*pi/(24*365))).*cos(t*2*pi/24);
Or whatever suits your needs/looks like a reasonable representation of what you're supposed to model.
HTH

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by