||
张国亮
.基于FPGA的无功功率测量仪的设计[D]. 哈尔滨理工大学, 2015,硕士论文提出
对 Hilbert 变换进行全相位改进
对 Hilbert 变换之前,对数据进行了全相位加窗处理,实验表明,有效的提高了无功功率的计量精度。
论文致力于提高无功功率的计量精度,针对无功功率的多种测量方式,选取了测量精度更高的 Hilbert 变法,并针对电网中电能信号无法实现同步采样的实际情况,对 Hilbert 变换之前,对数据进行了全相位加窗处理,实验表明,有效的提高了无功功率的计量精度。
同时针对电网中无法实现同步采样这一特点,采用全相位 FFT 来代替代替 DFT 运算,比传统的 Hilbert 算法计算精度更高。
论文中提出了全相位予处理+Hilbert变换,全相位Hilbert teansform(ap-Hilbert ),
並给出了和传统Hilbert法比较结果
hilbert和ap-Hilbert比较程序:
clc;clear;clf;close all;
N=200;f1=50.3;fs=1000;
t = (0:N-1)*1/fs;
y = sin(2*pi*f1*t);
yh = hilbert(y);
yi=imag(yh);
subplot(421);plot(t,y,'R.-'),grid;title('(a)orignal sin signal')
subplot(422);plot(t,yi,'B.-');grid;ylim([-1,1]),title('(b)Hilbert transform signal')
yih=hilbert(yi);
yii=imag(yih);
disp('The results of Hilbert transform for two times the orignal signal')
max(y+yii)
disp('orthogonal signal Hilbert transform and orignal signal');
sum(y.*yi)
NFFT=2^nextpow2(N);
f=fs*linspace(0,1,NFFT);
Y=fft(y,NFFT)/N;
YH=fft(yh,NFFT)/N;
subplot(423);plot(f,(abs(Y*2)),'R.-'),grid;title('(c)Bilateal spectrum of the orignal signal')
subplot(424);plot(f,(abs(YH)),'B.-'),grid;title('(d)Bilateal spectrum of complex signal composed of the signal after Hilbert transformation')
tt = (-N+1:N-1)*1/fs;
y = sin(2*pi*f1*tt);
win=ones(1,N);
win1=conv(win,win)/N;
%win1=win1/sum(win1);
y1=y.*win1;
ya=y1(N:end)+[0 y1(1:N-1)];
yha = hilbert(ya);
yai=imag(yha);
subplot(425);plot(t,ya,'R.-');grid;title('(e)orignal all phase signal')
subplot(426);plot(t,yai,'B.-'),grid;title('(f)Hilbert transform all phase signal')
yih=hilbert(yai);
yii=imag(yih);
disp('The results of Hilbert transform for two times the orignal ap-signal')
max(ya+yii)
disp('orthogonal ap-signal Hilbert transform and orignal ap-signal');
sum(ya.*yai)
NFFT=2^nextpow2(N);
f=fs*linspace(0,1,NFFT);
Y=fft(ya,NFFT)/N;
YH=fft(yha,NFFT)/N;
subplot(427);plot(f,(abs(Y*2)),'R.-');grid;title('(g)Bilateal spectrum of the orignal all phase signal')
subplot(428);plot(f,(abs(YH)),'B.-'),grid;title('(h)Bilateal spectrum of complex signal composed of the all phasesignal after Hilbert transformation')
clc;clear all;close all
ts = 0.001;
fs = 1/ts;
N = 200;
t =(0:N-1)*1/fs;
f1 = 10.;
f2 = 70.;
a = cos(2*pi*f1*t);
a = 2 + cos(2*pi*f1*t);
%a = 1./(1+t.^2*50);
m = sin(2*pi*f2*t+pi/3);
y = a.*m;% 信号调制
subplot(241);plot(t, a);title('envelope');
subplot(242);plot(t, m);title('modulatation signal');
subplot(243);plot(t, y);title('modulation results');
yh = hilbert(y);
aabs = abs(yh); % envelope abstract value
aangle = unwrap(angle(yh)); % envelope phase
af = diff(aangle)/2/pi ; % instantaneous frequency of envelope, difference instead differental calculation
dd=af*fs;
% NFFT = 2^nextpow2(N);
NFFT = 2^nextpow2(1024*4); % improve fence effect
f = fs*linspace(0,1,NFFT);
YH = fft(yh, NFFT)/N; % Hilbert transform spectrum of complex signals
A = fft(aabs, NFFT)/N; % envelope spectrum
subplot(245);plot(t, aabs, t, a, '.');title('absolute value of envelope');legend('envelope analysis results', 'real envelope');ylim([0,3])
subplot(246);plot(t, aangle);title('phase modulation signal')
subplot(247);plot(t(1:end-1), af*fs);title('instantaneous frequency modulation signal')
subplot(244);plot(f,abs(YH));title('original signal Hilbert spectrum');xlabel('frequency f (Hz)');ylabel('|YH(f)|');xlim([0,N])
subplot(248);plot(f,abs(A));title('envepole spectrum');xlabel('frequency (Hz)');ylabel('|A(f)|');xlim([0,N])
figure
t = (-N+1:N-1)*1/fs;
a = cos(2*pi*f1*t); % envelope1
a = 2 + cos(2*pi*f1*t); % envelope2
%a = 1./(1+t.^2*50); % envelope3
m = sin(2*pi*f2*t+pi/3) ; % modulation signal
y =a.*m; % signal modulation
win=ones(1,N);
win1=conv(win,win)/N;
y1=y.*win1;
ya=y1(N:end)+[0 y1(1:N-1)];
subplot(241);plot(t, a);title('envelope');
subplot(242);plot(t, m);title('modulatation signal');
tt=(0:N-1)*1/fs;
subplot(243);plot(tt,ya);title('modulation results');%tt=(0:N-1)*1/fs;xlim([1,N])
yh = hilbert(ya);
aabs = abs(yh); % envelope abstract value
aangle1 = unwrap(angle(yh)); % envelope phase
af1 = diff(aangle1)/2/pi; % instantaneous frequency of envelope, difference instead differental calculation
dd=af1*fs;
% NFFT = 2^nextpow2(N);
NFFT = 2^nextpow2(1024*4); % improve fence effect
f = fs*linspace(0,1,NFFT);
YH = fft(yh, NFFT)/N; % Hilbert transform spectrum of complex signals
A = fft(aabs, NFFT)/N; % envelope spectrum
subplot(245);plot(tt, aabs,tt,a(N:end), '.');title('absolute value of envelope');legend('envelope analysis results', 'real envelope');ylim([0,3])
subplot(246);plot(tt,aangle1);title('phase modulation signal');
subplot(247);plot(tt(1:end-1),af1*fs);title('instantaneous frequency modulation signal');
subplot(244);plot(f,abs(YH));title('original signal Hilbert spectrum');xlabel('frequency(Hz)');ylabel('|YH(f)|');xlim([1,N])
subplot(248);plot(f,abs(A));title('envepole spectrum');xlabel('frequency f (Hz)');ylabel('|A(f)|');xlim([1,N])
图1 Hilbery transform
图2 ap-Hilbery transform
Hilbert变换对信号是否有要求?离散Hilbert変换是否要求同步采样,即整周期采样?
Hilbert変换有一个重要性质
正弦信号的和它的二次hillbert変换之和为另.或正弦信号的二次hillbert変换后変成原信号的负值
Matlab验证表明,上述性质必须信号是整周期采样才严格成立,当有频偏时,这个性质有误差
图3(a)显示不同频偏下(f=5.0,5.1,5.3)sin函数和它的二次hilbert变换之和,和零的误差在10(-2)数量级,频偏越大,误差越大.
图3(b)显示不同频偏下(f=5.0,5.1,5.3)sin函数和它的二次ap-hilbert变换之和,和零的误差在10(-3)数量级,比图3(b)小一个数量级,
所以在非整周期采样时引入全相位hilbert可介决统传hilbert这个误差问题,因为信号经全相位予处理后,非整周期采样変成整周期采样,正交性恢复
GMT+8, 2024-5-9 19:36 , Processed in 0.032242 second(s), 16 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.