PowerSpectralDensity[data,ω]
估计 data 的功率谱密度.
PowerSpectralDensity[data,ω,sspec]
估计平滑规范 sspec 下 data 的功率谱密度.
PowerSpectralDensity[tproc,ω]
表示时间序列过程 tproc 的功率谱密度.
PowerSpectralDensity
PowerSpectralDensity[data,ω]
估计 data 的功率谱密度.
PowerSpectralDensity[data,ω,sspec]
估计平滑规范 sspec 下 data 的功率谱密度.
PowerSpectralDensity[tproc,ω]
表示时间序列过程 tproc 的功率谱密度.
更多信息和选项
- PowerSpectralDensity 也称为能量谱密度.
- 对于弱平稳时间序列过程,PowerSpectralDensity[tproc,ω] 被定义为
,其中
表示 CovarianceFunction[proc,h]. - 可以给出下列平滑规范 sspec:
-
c 使用 c 作为截止点 w 使用窗函数 w {c,w} 同时使用截止点和窗函数 - 对于窗函数 w 和正整数 c,PowerSpectralDensity[data,ω,{c,w}] 用
计算,其中
被定义为 CovarianceFunction[data,h]. - 默认情况下,选择截止点 c 为
,其中
是 data 的长度,而窗函数是 DirichletWindow. - 窗函数
是偶函数,满足
,
,当
时
,包括诸如 HammingWindow、ParzenWindow 等标准窗函数. - 窗函数可由数值列表 {w0,…} 给出,其中
,对于向量值序列,会将窗函数对称运用. - PowerSpectralDensity 使用 FourierParameters 选项. FourierParameters 的常见设置包括:
-
{1,1} 
缺省设置 {-1,1} 
常用于时间序列 {a,b} 
通用设置
范例
打开所有单元 关闭所有单元基本范例 (3)
PowerSpectralDensity[Range[10], ω]PowerSpectralDensity[ARProcess[{a}, σ^2], ω]data = RandomFunction[ARProcess[{.2}, .1], {1, 1000}];cutoffs = {5, 10, 17};
spec = Table[PowerSpectralDensity[data, ω, i], {i, cutoffs}];Plot[Evaluate@spec, {ω, -π, π}, PlotLegends -> cutoffs]范围 (14)
经验估计 (4)
data = TemporalData[TimeSeries, {{{-0.0614065187043199, 2.6306604608936857, 3.9465133828074777,
3.745705410210661, 3.049768958525431, 1.4003183889805526, -0.755044374280679,
-2.0834316975526366, -1.3583280202011117, 0.14932145182161072, -0.8588219015885377}},
{{0, 10, 1}}, 1, {"Continuous", 1}, {"Discrete", 1}, 1,
{ValueDimensions -> 1, ResamplingMethod -> None}}, False, 10.1];PowerSpectralDensity[data, ω]Plot[%, {ω, -π, π}, Filling -> Axis, PlotRange -> All]data = TemporalData[TimeSeries, {{{{-0.8805412843977076, 0.5330873177260956},
{-1.091904325250007, 2.8824771870568764}, {0.4712280848587277, -2.563788099997642},
{-1.0458566604266817, 1.2863067750997783}, {0.15937341588902115, 0.0582751907559111 ... 0441, -1.4624411116452787},
{-1.2038000803608786, 0.6266434204415561}, {-1.5532848855025663, -1.4784686973103551}}},
{{0, 10, 1}}, 1, {"Continuous", 1}, {"Discrete", 1}, 2,
{ValueDimensions -> 2, ResamplingMethod -> None}}, False, 10.1];psd = PowerSpectralDensity[data, ω]//SimplifyTable[Plot[psd[[i, i]], {ω, -π, π}], {i, 1, 2}]Table[ParametricPlot[{Re[#], Im[#]}&@psd[[i, Mod[i, 2] + 1]], {ω, -π, π}, ColorFunction -> Function[{x, y, ω}, (ColorData["Rainbow"][ω])]], {i, 1, 2}]data = RandomFunction[ARProcess[{.8}, 1], {0, 100}, 5];psd = PowerSpectralDensity[data, ω];Plot[psd, {ω, -π, π}, PlotRange -> All, Filling -> Axis]proc = MAProcess[{.4, .3, .5, .6, .3}, 1.];data = RandomFunction[proc, {0, 10 ^ 2}];Plot[#, {ω, -π, π}, Filling -> Axis, PlotRange -> All]& /@ {PowerSpectralDensity[proc, ω], PowerSpectralDensity[data, ω]}平滑 (5)
data = Range[10];sspec = PowerSpectralDensity[data, ω, 5]Plot[{Evaluate@PowerSpectralDensity[data, ω], sspec}, {ω, -π, π}, Filling -> Axis, PlotRange -> All]使用 NuttallWindow 计算功率谱密度:
data = Range[10];sspec = PowerSpectralDensity[data, ω, NuttallWindow]Plot[{Evaluate@PowerSpectralDensity[data, ω], sspec}, {ω, -π, π}, Filling -> Axis, PlotRange -> All]data = Range[10];sspec = PowerSpectralDensity[data, ω, HannPoissonWindow[#, (1/2)]&]Plot[{Evaluate@PowerSpectralDensity[data, ω], sspec}, {ω, -π, π}, Filling -> Axis, PlotRange -> All]n = 10;
data = Range[n];
win = TukeyWindow[(#/2 * (n - 1)), (1/3)]& /@ Range[0, n - 1];和用 TukeyWindow 作为窗函数的结果进行比较:
PowerSpectralDensity[data, ω, win] === PowerSpectralDensity[data, ω, TukeyWindow]Plot[{Evaluate@PowerSpectralDensity[data, ω], Evaluate@PowerSpectralDensity[data, ω, TukeyWindow]}, {ω, -π, π}, Filling -> Axis, PlotRange -> All]data = Range[10];sspec = PowerSpectralDensity[data, ω, {5, BartlettWindow}]Plot[{Evaluate@PowerSpectralDensity[data, ω], sspec}, {ω, -π, π}, Filling -> Axis, PlotRange -> All]随机过程 (5)
ARProcess 的功率谱密度:
proc[a_] = ARProcess[{a}, 1];Plot[PowerSpectralDensity[#, w], {w, -π, π}, Filling -> Axis, PlotRange -> All]& /@ {proc[0.8], proc[-0.8]}PowerSpectralDensity[proc[a], w]向量 ARProcess:
a = {{1 / 7, 0}, {1 / 3, 0}};
Σ = {{1, -1 / 3}, {-1 / 3, 1}};
proc = ARProcess[{a}, Σ];psd = PowerSpectralDensity[proc, ω];
psd//MatrixFormParametricPlot[{Re[#], Im[#]}&@psd[[1, 2]], {ω, -π, π}, ColorFunction -> Function[{x, y, ω}, (ColorData["Rainbow"][ω])]]MAProcess 的功率谱密度:
proc[b_] = MAProcess[{b}, 1];Plot[PowerSpectralDensity[#, w], {w, -π, π}, Filling -> Axis]& /@ {proc[0.9], proc[-0.9]}PowerSpectralDensity[proc[b], w]向量 MAProcess:
a = {{1 / 10, 0}, {1 / 3, 0}};
Σ = {{1, 1 / 3}, {1 / 3, 1}};
proc = MAProcess[{a}, Σ];psd = PowerSpectralDensity[proc, ω];
psd//MatrixFormParametricPlot[{Re[#], Im[#]}&@psd[[1, 2]], {ω, -π, π}, ColorFunction -> Function[{x, y, ω}, (ColorData["Rainbow"][ω])], AspectRatio -> 1]ARMAProcess 的功率谱密度:
proc[a_, b_] = ARMAProcess[{a}, {b}, 1];Plot[PowerSpectralDensity[#, w], {w, -π, π}, Filling -> Axis, PlotRange -> All]& /@ {proc[0.3, 0.2], proc[-0.3, -0.2]}PowerSpectralDensity[proc[a, b], w]向量 ARMAProcess:
a = {{1 / 9, 0}, {1 / 3, 1 / 2}};
b = {{1, 3 / 4}, {1 / 2, -1 / 4}};
Σ = {{1, 1 / 3}, {1 / 3, 1}};
proc = ARMAProcess[{a}, {b}, Σ];psd = PowerSpectralDensity[proc, ω];
psd//FullSimplify//MatrixFormParametricPlot[{Re[#], Im[#]}&@psd[[1, 2]], {ω, -π, π}, ColorFunction -> Function[{x, y, ω}, (ColorData["Rainbow"][ω])], AspectRatio -> 1]Plot[PowerSpectralDensity[FARIMAProcess[{.3, -.2}, -.4, {1}, 1], w], {w, -π, π}, Filling -> Axis, PlotRange -> All]PowerSpectralDensity[FARIMAProcess[{.3, .2}, .4, {1}, 1], w]向量 FARIMAProcess:
a = {{1 / 9, 0}, {1 / 3, 1 / 2}};
b = {{1, 1 / 4}, {1 / 2, 0}};
Σ = {{1, 0}, {0, 1}};
proc = FARIMAProcess[{a}, {1 / 3, -1 / 4}, {b}, Σ];psd = PowerSpectralDensity[proc, ω];
psd//FullSimplify//MatrixFormParametricPlot[{Re[#], Im[#]}&@psd[[1, 2]], {ω, -π, π}, ColorFunction -> Function[{x, y, ω}, (ColorData["Rainbow"][ω])], AspectRatio -> 1]Plot[PowerSpectralDensity[SARMAProcess[{.2}, {.4}, {12, {.3}, {1}}, 1], w], {w, -π, π}, Filling -> Axis]PowerSpectralDensity[SARMAProcess[{a}, {b}, {12, {g}, {h}}, σ^2], ω]向量 SARMAProcess:
a = {{1 / 9, 0}, {1 / 3, 1 / 2}};
b = {{1 / 3, 1 / 4}, {1 / 2, 0}};
Σ = {{1, 0}, {0, 1}};
proc = SARMAProcess[{}, {b}, {4, {b}, {}}, Σ];psd = PowerSpectralDensity[proc, ω];
psd//FullSimplify//MatrixFormParametricPlot[{Re[#], Im[#]}&@psd[[1, 2]], {ω, -π, π}, ColorFunction -> Function[{x, y, ω}, (ColorData["Rainbow"][ω])], AspectRatio -> 1]选项 (2)
FourierParameters 的缺省值:
PowerSpectralDensity[Range[10], ω, FourierParameters -> {1, 1}]PowerSpectralDensity[Range[10], ω]% - %%PowerSpectralDensity[Range[10], ω, FourierParameters -> {-1, 1}]PowerSpectralDensity[Range[10], ω]% / %%//Simplify应用 (1)
data = RandomFunction[ARProcess[{.3, .2}, 1], {10 ^ 3}];EstimatedProcess[data, ARProcess[2], ProcessEstimator -> "SpectralEstimator"]EstimatedProcess[data, ARProcess[2], ProcessEstimator -> {"SpectralEstimator", "Window" -> 5}]属性和关系 (11)
时间序列的功率谱密度是 CovarianceFunction 的变换:
proc = ARProcess[c, {a}, σ^2];
cf = CovarianceFunction[proc, h]ft = FourierSequenceTransform[cf, h, z]PowerSpectralDensity[proc, z]FullSimplify[% - ft]proc = ARProcess[{{{1 / 3, 11 / 10}, {1 / 5, 1 / 10}}}, {{1, 0}, {0, 1}}];cov = CovarianceFunction[proc, h]//PiecewiseExpand;fst = FourierSequenceTransform[cov, h, w]fst - PowerSpectralDensity[proc, w]//Simplify数据的功率谱密度是样本 CovarianceFunction 的变换:
sample = Range[20];
n = Length[sample];
cov = CovarianceFunction[sample, {-n + 1, n - 1}];运用 ListFourierSequenceTransform:
ListFourierSequenceTransform[cov, w, -n + 1]//Simplify和 SamplePowerSpectralDensity 比较:
PowerSpectralDensity[sample, w]//Simplify% - %%//FullSimplifydata = RandomFunction[ARProcess[{{{.3, .1}, {.2, .1}}}, {{1, 0}, {0, 1}}], {10}];
n = data["PathLength"];cov = CovarianceFunction[data, {-n + 1, n - 1}]["Values"];lfst = Table[ListFourierSequenceTransform[cov[[All, i, j]], w, -n + 1], {i, 1, 2}, {j, 1, 2}]PowerSpectralDensity[data, w] - lfst//Simplify//ChopFourierSequenceTransform[Piecewise[{{1, x == 0}}, 0], x, w]和 MAProcess 的特例进行比较:
AbsoluteCorrelationFunction[MAProcess[{}, 1], h]PowerSpectralDensity[MAProcess[{}, 1], w]Integrate[PowerSpectralDensity[ARProcess[{a}, σ^2], w, FourierParameters -> {-1, 1}], {w, -π, π}, Assumptions -> σ > 0 && -1 ≤ a ≤ 1]CovarianceFunction[ARProcess[{a}, σ^2], 0]% - %%//Simplifydata = TemporalData[TimeSeries, {{{0.30013118796154015, 0.4256944865636253, -1.2546039329698115,
0.09639437311894994, -1.9173223832884778, 0.16259596973060586, -0.001109688881539693,
0.6619148052033135, 2.232751727745077, 0.06794816837802453, 1. ... 5330770230747, 0.22924102933021667, 0.1509993303482705,
-0.4613641689767734}}, {{1, 100, 1}}, 1, {"Continuous", 1}, {"Discrete", 1}, 1,
{ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}, ValueDimensions -> 1}}, False,
10.1];NIntegrate[PowerSpectralDensity[data, w, FourierParameters -> {-1, 1}], {w, -π, π}]CovarianceFunction[data, 0]% - %%//Chop谐波频率的功率谱密度和 PeriodogramArray 相关:
data = Range[20];
n = Length[data];
spec = Table[PowerSpectralDensity[data, 2π j / n], {j, 0, n - 1}]//N和 PeriodogramArray 比较:
periodogram = PeriodogramArray[data]First[periodogram] - n * Mean[data] ^ 2Rest[spec] - Rest[periodogram]//Chopdata = TemporalData[TimeSeries, {{{{0.22321490696028234, -0.09955096694103477},
{-1.2036012283524826, 0.21356213785864084}, {-2.170758245872314, -2.172602353385546},
{-2.0417769517615256, -0.9854153357651101}, {-1.8679940757580273, 0.11399938753 ... 3335557631977, 1.4574116828470514}, {-0.6330195762966424, -0.6361997810358189}}},
{{0, 10, 1}}, 1, {"Continuous", 1}, {"Discrete", 1}, 2,
{ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}, ValueDimensions -> 2}}, False,
10.1];data["ValueDimensions"]psd = PowerSpectralDensity[data, ω];dens = Table[PowerSpectralDensity[data["Values"][[All, i]], ω], {i, 2}];Table[Plot[{psd[[i, i]], dens[[i]]}, {ω, -π, π}, PlotStyle -> {Automatic, Dotted}, PlotLegends -> {"Vector Component", "Univariate"}], {i, 2}]proc = ARProcess[{{{1 / 3, 1 / 10}, {1 / 5, 1 / 10}}}, {{1, 0}, {0, 1}}];Conjugate /@ PowerSpectralDensity[proc, -2]PowerSpectralDensity[proc, 2]% - %%proc = ARMAProcess[{a}, {b}, σ^2];PowerSpectralDensity[proc, w] == PowerSpectralDensity[proc, -w]proc = ARMAProcess[{{{1 / 3, 1 / 10}, {1 / 5, 1 / 10}}}, {{{1 / 8, -3 / 10}, {3 / 5, 1 / 6}}}, {{1, -.3}, {-.3, 1}}];HermitianMatrixQ[PowerSpectralDensity[proc, RandomReal[{-π, π}]]]PositiveSemidefiniteMatrixQ[PowerSpectralDensity[proc, RandomReal[{-π, π}]]]data = TemporalData[EventSeries,
{{{{0.4294925809742698255912415200470240013516218314553046886407`30.,
-1.7225955472058514396692544902832573500729728703324221048`30.},
{0.0548388212316276096199767991813010875210668838810634829247`30.,
0 ... 255531611908244000251642161167860416322414`30.,
0.0404300321804073415502129760700924797739015008346027682413`30.}}}, {{0, 20, 1}}, 1,
{"Continuous", 1}, {"Discrete", 1}, 2, {ResamplingMethod -> None, ValueDimensions -> 2}}, False,
10.1];data["ValueDimensions"]psd = PowerSpectralDensity[data, 3]//ChopAbs[psd[[1, 2]]] ^ 2 - Times@@Diagonal[psd]FindMaximum[Abs@Det[PowerSpectralDensity[data, w]], {w, -3, 3}]用 TransferFunctionModel 来计算时间序列的 PowerSpectralDensity:
proc = ARMAProcess[{a}, {b}, σ^2];
psd[ω_] = PowerSpectralDensity[proc, ω]g[z_] = TransferFunctionModel[proc][z][[1, 1]]σ^2g[Exp[I ω]]g[Exp[-I ω]]//ComplexExpand//TrigExpand//Simplify% - psd[ω]//Simplify相关链接
文本
Wolfram Research (2012),PowerSpectralDensity,Wolfram 语言函数,https://reference.wolfram.com/language/ref/PowerSpectralDensity.html.
CMS
Wolfram 语言. 2012. "PowerSpectralDensity." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/PowerSpectralDensity.html.
APA
Wolfram 语言. (2012). PowerSpectralDensity. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/PowerSpectralDensity.html 年
BibTeX
@misc{reference.wolfram_2026_powerspectraldensity, author="Wolfram Research", title="{PowerSpectralDensity}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/PowerSpectralDensity.html}", note=[Accessed: 13-July-2026]}
BibLaTeX
@online{reference.wolfram_2026_powerspectraldensity, organization={Wolfram Research}, title={PowerSpectralDensity}, year={2012}, url={https://reference.wolfram.com/language/ref/PowerSpectralDensity.html}, note=[Accessed: 13-July-2026]}