产生具有季节性和昼夜成分的信号 [英] generate signal with seasonal and diurnal component

查看:108
本文介绍了产生具有季节性和昼夜成分的信号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个相当模糊的问题,但是现在我们开始吧-我想生成一个用于一年的每小时测量的时间序列,因此对于2011年,ti在该序列中将有8760个值.为了更容易理解我要做什么,我将使用一个真实的例子:

This is a rather vague question but here we go - I would like to generate a time series for hourly measurements of one year, so for 2011 ti would 8760 values within the series. To make it easier to understand what I am trying to do I will use a real world example:

如果我们有一个每小时的气温测量值的时间序列,然后绘制整个序列,它将看起来类似于钟形曲线,即

If we had a time series of hourly air temperature measurements an 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,'.')

最大值发生在夏季中期,而最小值发生在冬季.但是,通过放大特定的日期,我们会看到温度也在白天和晚上之间波动,那里的最高温度大约在15:00发生,而最低温度大约在06:00.

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.

所以,我的问题是我将如何生成这个序列,即一个在夏天中旬具有最大值(例如,值(8760/2))为30度并且还将上述日常模式纳入整体的时间序列模式?

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?

推荐答案

执行此操作的显而易见的方法是将两个正弦波加在一起,一个用于日变化,另一个用于年变化.

The obvious way to do this would be to add together 2 sine waves, one for the diurnal variations and one for the annual variations.

我不知道正弦波是否足够接近钟形曲线,但是我可以做出一个模糊的论点,因为年和日温度的变化是(部分)乘积仍然应该使用正弦波进行(大约)圆周运动.

Whether or not a sine wave is close enough to a bell-shaped curve for your liking I don't know, but I could make a vague argument that since the variation in annual and diurnal temperatures is (in part) a product of (approximately) circular motions you should be using sine waves anyway.

如果您需要帮助来生成正弦波,请更新您的问题.

If you need help generating the sine waves update your question.

这篇关于产生具有季节性和昼夜成分的信号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆