File:Bartl.png

Summary

Description
English: Developed according to [1].
Date
Source Own work
Author Kirlf
Other versions
File:Bartlett's method.svg is a vector version of this file. It should be used in place of this PNG file when not inferior.Category:Vector version available

File:Bartl.png → File:Bartlett's method.svg

For more information, see Help:SVG.

In other languages
Alemannisch  العربية  беларуская (тарашкевіца)  български  বাংলা  català  нохчийн  čeština  dansk  Deutsch  Ελληνικά  English  British English  Esperanto  español  eesti  euskara  فارسی  suomi  français  Frysk  galego  Alemannisch  עברית  हिन्दी  hrvatski  magyar  հայերեն  Bahasa Indonesia  Ido  italiano  日本語  ქართული  한국어  lietuvių  македонски  മലയാളം  Bahasa Melayu  မြန်မာဘာသာ  norsk bokmål  Plattdüütsch  Nederlands  norsk nynorsk  norsk  occitan  polski  prūsiskan  português  português do Brasil  română  русский  sicilianu  Scots  slovenčina  slovenščina  српски / srpski  svenska  தமிழ்  ไทย  Türkçe  татарча / tatarça  українська  vèneto  Tiếng Việt  中文  中文(中国大陆)  中文(简体)  中文(繁體)  中文(马来西亚)  中文(新加坡)  中文(臺灣)  +/−
New SVG image

PNG development
InfoField
Source code
InfoField

Python code

import numpy as np
from scipy import signal
import matplotlib.pyplot as plt

Nsub = 100 # number of subsequences

w_1 = 30 # frequency of the 1st component of the signal (Hz)
w_2 = 40 # frequency of the 2nd component of the signal (Hz)

a = 0.7 # magnitude of the 1st component of the signal
b = 0.4 # magnitude of the 2nd component of the signal

t = np.array([i for i in range(1,301)])/1000 # time samples (s)
fs = 1 / (t[1]-t[0]) # sampling frequency (Hz)

x = a*np.cos(2*np.pi*w_1*t) + b*np.sin(2*np.pi*w_2*t) # considered signal

y_mat = np.dot(np.ones((Nsub, 1)), x.reshape((1, len(x)))) # assume that subsequences are identical

Pxx = np.empty((Nsub, int((len(x)/2)+1)))
for i in range(np.shape(y_mat)[0]):
    y_mat[i,:] = y_mat[i,:] # + 2*np.random.randn(len(t))
    f, Pxx[i,:] = signal.periodogram(y_mat[i,:],\
                                     fs=fs, scaling='spectrum')
Pxx_bart = np.mean(Pxx, axis=0)

plt.subplots(1, 1, figsize=(6, 4), dpi=250)
plt.stem(f[1:20], Pxx_bart[1:20], '-')#, linewidth=2, color='b')
plt.ylabel('Spectrum')
plt.xlabel('Frequencies (Hz)')
plt.title('Bartlett\'s method')
plt.grid(True)
plt.show()

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-4.0#Bartl.png
Category:Self-published work Category:Digital signal processing Category:Images with Python source code
  1. Hayes, Monson H. Statistical digital signal processing and modeling. John Wiley & Sons, 2009. - p. 412-415
Category:CC-BY-SA-4.0 Category:Digital signal processing Category:Images with Python source code Category:PNG created with Matplotlib code Category:Self-published work Category:Vector version available