File:HilbertTransform EnvelopePhase.png

页面内容不支持其他语言。
维基教科书,自由的教学读本

HilbertTransform_EnvelopePhase.png(800 × 600像素,文件大小:48 KB,MIME类型:image/png

摘要

描述
English: Graph showing how envelope (in red) and phase (black dots, for zero crossings) of a signal can be simply derived with the Hilbert Transform.

The corresponding python code is:

import numpy as np
import scipy.signal
import matplotlib.pyplot as mp
import matplotlib.mlab as mm

# Create a function for the instantaneous frequency ...
dt = 0.01
t = np.arange(0,20,dt)
f = (0.2 + 1.3*np.exp(-((t-10)/4)**2))

# ... and envelope
env = 2-f/2

#  Plot the corresponding function values
df = 2*np.pi*f*dt
fsum = np.cumsum(df)
x = np.sin(fsum)*env

#  Using the Hilbert transform, find the envelope and zero crossings
envelope = abs(scipy.signal.hilbert(x))
phase = np.angle(scipy.signal.hilbert(x))
zeroCrossing = mm.find(np.diff(np.sign(np.cos(phase)))==2)

# Plot the results
mp.plot(x)
mp.hold('on')
mp.plot(envelope, 'r')
mp.plot((0, 2000), (0,0), 'k--')
mp.plot(zeroCrossing, np.zeros(zeroCrossing.size), 'ko')
mp.ylim((-2, 2.2))
mp.savefig('hilbert.eps')
mp.show()
日期
来源 自己的作品
作者 Thomas.haslwanter

许可协议

我,本作品著作权人,特此采用以下许可协议发表本作品:
w:zh:知识共享
署名 相同方式共享
您可以自由地:
  • 共享 – 复制、发行并传播本作品
  • 修改 – 改编作品
惟须遵守下列条件:
  • 署名 – 您必须对作品进行署名,提供授权条款的链接,并说明是否对原始内容进行了更改。您可以用任何合理的方式来署名,但不得以任何方式表明许可人认可您或您的使用。
  • 相同方式共享 – 如果您再混合、转换或者基于本作品进行创作,您必须以与原先许可协议相同或相兼容的许可协议分发您贡献的作品。

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2012年3月11日 (日) 11:422012年3月11日 (日) 11:42版本的缩略图800 × 600(48 KB)Thomas.haslwanter

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件:

元数据