jingweimo的个人博客分享 http://blog.sciencenet.cn/u/jingweimo

博文

1-D Hilber transform and amplitude demodulation

已有 2469 次阅读 2015-7-28 22:12 |系统分类:科研笔记

% 1-D Hilber transform and amplitude demodulation

% writen by Lu, 7/28/2015

clc; clear all; close all;

% setup

X=linspace(0,1,1024);

ac=255/2; dc=ac;

Y=255/2+(255/2)*sin(2*pi*5*X);

Yac=Y-dc;


% Hilbert transfrom (-90 degree phase shifter), x=xr+i*xi

% G(k)=F(k)*H(k), H(k)=-i*sgn(k); k>0, sgn=1 and k<0, sgn=-1

% If xr=b*cos(phai), then xi=b*sin(phai);

% If xr=b*sin(phai), then xi=-b*cos(phai);


% Transfrom steps: x=ac+dc*b*cos(phai)

% 1) fft on x, F=fft(x)

% 2) frequency processing: F(1)=0, remove dc component;

% 2) F(p+1:end)=F(p+1:end)*(-1), p=ceil(length(F)/2),

% 2) that is, mutiply the negative frequencies by -1

% 3) apply ifft, the obtained signal is i*xi

% Those can easily proofed by inspection of dirac functions forms of

% Fourier transfrom of cosine and sine functions


Y_fft=fft(Y);

P=ceil(length(Y)/2); % note how fftshift/ifftshift works

Y_fft(1)=0;

Y_fft(P+1:end)=Y_fft(P+1:end)*(-1);

Yht=ifft(Y_fft);

Yreal=real(Yht);

Yimag=imag(Yht);


% Amplitude demodulation

% Amp=abs(Yac+Yht);

Amp=sqrt(Yac.^2+Yimag.^2);


figure; plot(X, Yreal,'r-',X,Yimag,'g-','linewidth',2);

hold on;

plot(X,Yac,'b-','linewidth',2);

plot(X,Amp,'k-','linewidth',2);

xlabel('spatial distance'); ylabel('intensity');

title('Hilbert transform based demodulation');


%Comments:

% The 1-D transfrom can be extended to 2-D space by line by line processing

% But note boundary effect esists in the hilbert-transform based demodulation

% Further cutoff should be considered to mitigate the boundary effects

% compare with spiral-phase-operator based transfrom (vortex transform)



https://blog.sciencenet.cn/blog-578676-908971.html

上一篇:文本读写操作
下一篇:Phase unwrapping
收藏 IP: 35.10.57.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-12-1 00:25

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部