【20220207】【Signal Processing】Hilbert transform definition and demodulation principle

1. Analyze the signal

1. Definition

        The analytic signal is a complex-valued function without negative frequency components , and the real and imaginary parts of the analytic signal are real-valued functions associated by the Hilbert transform.

        (Reference: Analyzing Signals )

2. Concept

        The Hilbert transform of a real-valued function  x(t) is denoted as  \hat{x}(t), then  x(t) the analytical signal of is:

                                                                                  \tilde{x}=x(t)+j\hat{x}(t)

3. Nature

        (Reference: Introduction to Hilbert Transform )

        Analytic signals have the following properties:

(1) The real and imaginary power spectra are the same;

(2) The real and imaginary autocorrelation functions are the same;

(3) The cross-correlation function of the real part and the imaginary part is an odd function;

(4) The spectrum of the analytical signal is only in the positive frequency band, and the amplitude becomes twice the original (realizing the transformation from double-sided spectrum to single-sided spectrum);

(5) The power spectrum of the analytical signal only has the positive frequency band, and the intensity becomes 4 times of the original one.

2. Hilbert transform

1. Definition

        The Hilbert transform of a real-valued function x(t) is the convolution of x(t) and 1/Πt. Therefore, the result of the Hilbert transform is the output of the input signal x(t) after passing through a linear time invariant system (LTI) whose impulse response is 1/Πt.

        After the signal undergoes Hilbert transform, the amplitude of each frequency component in the frequency domain remains unchanged, but the phase appears 90°phase shifted. That is, the positive frequency lags by Π/2, and the negative frequency leads by Π/2, so the Hilbert converter is also called a 90° phase shifter.

        (Reference: Hilbert Transform )

2. Formula derivation

        Assuming x(t) is a real-valued function, find the Hilbert transform of the function.        

                                                \hat{x}(t)=H[x(t))]=x(t)\ast \frac{1}{\pi t}=\frac{1}{\pi }\int_{-\infty }^{\infty }\frac{x(\tau )}{t-\tau }d\tau

It can therefore  \hat{x}(t) be read as  x(t) the output of a linear time-invariant system whose impulse response is:

                                                                                     h(t)=\frac{1}{\pi t}

The Fourier transform of this impulse response is:

                                                                H(w)=-jsgn(w)=\left\{\begin{matrix} -j, & w>0\\ 0, &w=0 \\ +j,&w<0 \end{matrix}\right.

So  \hat{x}(t) the Fourier transform is:

        ​​​​​​​                        \hat{X}(w)=X(w)\ast H(w)=X(w)\ast (-jsgn(w))=-jX(w)\ast sgn(w)

Right now:

        ​​​​​​​                                ​​​​​​​        \hat{X}(w)=\left\{\begin{matrix} -jX(w), &w>0 \\ 0, &w=0 \\ jX(w)), &w<0 \end{matrix}\right. =\left\{\begin{matrix} -j\frac{w}{|w|X(w)}, &w\neq 0 \\ 0, &w=0 \end{matrix}\right.

        (Reference: Proof of Fourier Transform of 1/t

3. Nature

        The Hilbert transformer is also called a 90° phase shifter, as shown in the figure below. After two Hilbert transforms, the phase of the original signal is reversed by 180°, and after four Hilbert transforms, it turns back to itself.

        The Hilbert transform has the following properties:

(1) Antisymmetric: H(-x) = -H(x);

(2) Suppress the DC component: H(0) = 0;

(3) The energy of non-zero frequency components is 1: |H(x)| = 1, for any x≠0;

(4) \hat{x}(t) and  x(t) orthogonal.

        (Reference: Introduction to Hilbert Transform )

3. Hilbert demodulation principle

1. Signal demodulation

        Signal demodulation is the reverse process of signal modulation, which is to demodulate the original modulated signal from the modulated high-frequency signal. Signal modulation includes amplitude modulation, frequency modulation, and phase modulation. Therefore, the purpose of signal demodulation is to extract the envelope, phase, and frequency information of the signal based on the existing signal.

        (Reference: Basic Principles of Signal Demodulation )

        (Reference: What are the commonly used signal demodulation methods? )

2. Euler's formula

                                                                             e^{jx}=cos(x)+jsin(x)

        Euler's formula shows that a complex exponential signal can be expressed as the sum of a real signal and an imaginary signal, and the real part and the imaginary part are related, and the phase difference between the two is different \frac{\pi }{2}.

time domain signal         Fourier transform
cos(x) \pi [\delta (w+w_{0})+\delta (w-w_{0})]
sin(x) j\pi [\delta (w+w_{0})-\delta (w-w_{0})]

        Therefore, the Fourier transform of the complex exponential signal on the left side of Eq  2\pi \delta (w-w_{0}). Euler's formula is the simplest analytical signal. It can be seen that the analytical signal is a complex number in the time domain, but in the frequency domain, there are only positive frequency components, and the amplitude is twice the amplitude of the real signal.

3. Hilbert modulation principle

        Suppose there is a modulated real signal x(t)=a(t)cos[w_{0}t+b(t)], where  a(t) is the amplitude modulation (amplitude modulation) of the signal, b(t) is the phase modulation (phase modulation) of the signal, and w_{0} is the carrier frequency. Then the analytical signal of the real signal is:

                                       \widetilde{x}(t)=x(t)+j\hat{x}(t)=a(t)cos(w_{0}t+b(t))+ja(t)sin(w_{0}t+b(t))             

Right now:   

                                        \widetilde{x}(t)=a(t)[cos(w_{0}t+b(t))+jsin(w_{0}t+b(t))]=a(t)e^{j(w_{0}t+b(t))}​​​​​​​

Then there are:

        ​​​​​​​        ​​​​​​​        ​​​​​​​        ​​​​​​​                        ​​​​​​​        ​​​​​​​        ​​​​​​​       \widetilde{x}(t)=a(t)e^{jb(t)}e^{jw_{0}t}

Among them, a(t)e^{jb(t)} is the complex envelope, and e^{jw_{0}t} is the complex carrier signal.

        So the demodulation information is:

        envelope: |\widetilde{x}(t)|=|a(t)e^{jb(t)}|=|a(t)|;

        phase: \theta (t)=w_{0}t+b(t)=arctan\frac{\hat{x}(t)}{x(t)};

        Instantaneous frequency: f(t)=\frac{1}{2\pi }\frac{d\theta (t)}{dt}=\frac{1}{2\pi}\frac{darctan\frac{\hat{x}(t)}{x(t)}}{dt}=\frac{1}{2\pi}[w_{0}+\frac{db(t)}{dt}].

        It can be drawn that the instantaneous amplitude of the real signal is the modulus of the analytic signal, the instantaneous phase of the real signal is the arctangent of the ratio of the imaginary part to the real part of the analytic signal, and the instantaneous frequency of the real signal is the derivative of the instantaneous phase divided by 2Π.

        (Reference: Hilbert Transform Envelope Principle )

        (Reference: Hilbert Transform and Signal Envelope_Instantaneous Phase and Instantaneous Frequency (pdf page) )

        Summarize the Hilbert demodulation steps:

        (1) Find  x(t) the Hilbert transform of the original signal \hat{x}(t)to obtain the analytical signal of the original signal \widetilde{x}(t);

        (2) Instantaneous amplitude (envelope) = modulo of the analytical signal = \sqrt{x^{2}(t)+\widetilde{x}^{2}(t)};

        (3)   The arc tangent of  instantaneous phase = \hat{x}(t) and  ratio = ;x(t)arctan\frac{\widetilde{x}(t)}{x(t)}

        (4) Instantaneous frequency = derivative of instantaneous phase / 2Π =  \frac{1}{2\pi }\frac{d\theta (t)}{dt}=\frac{1}{2\pi }\frac{[\theta (t+1)-\theta (t)]}{T_{s}} , namely:

        ​​​​​​​        ​​​​​​​        ​​​​​​​        ​​​​​​​        ​​​​​​​        ​​​​​​​        ​​​​​​​        ​​​​​​​        ​​​​​​​        ​​​​​​​  \frac{f_{s}}{2\pi }\[\theta (t+1)-\theta (t)]

        (Reference: Past and Present of Hilbert-Huang Transform (HHT) - A Story from Instantaneous Frequency )

        (Reference: Hilbert Transform and Instantaneous Frequency Issues--Serial Part 2 )

4. Significance of Hilbert's demodulation

        My question is: why is it necessary to demodulate a known signal to get amplitude, phase and frequency information?

        Answer: Because in practical problems, we only know  x(t) the result of the real number signal, but not its specific form, so there is no way to get this information directly according to the signal formula, so the Hilbert demodulation principle is used~

        (Reference: Signal Processing - Hilbert Transform and Spectral Analysis )

4. Hilbert demodulates the little chestnut

%% 
clear; clc; close all; warning off;

%% 生成调制信号
fs = 400;  % 采样频率
Ts = 1 / fs;
N = 400;  % 观测时长
t = (0 : N-1) * Ts;

fa = 5;  % 调幅单频
fp = 10;  % 调相单频
fc = 30;  % 载波单频

a = 1 + 0.5 * cos(2 * pi * fa * t);  % 调幅包络
b = 0.5 * sin(2 * pi * fp * t);  % 调相
c = cos(2 * pi * fc * t);  % 载波
s = a .* cos(2 * pi * fc * t + b);  % 调制信号


%% Hilbert分析 
s_analy = hilbert(s);  % Matlab的hilbert命令得到的是解析信号
sh = imag(s_analy);  % 调制信号的希尔伯特变换
envelope = abs(s_analy);  % 解析信号包络的绝对值
angle = unwrap(angle(s_analy));  % 解析信号的相位
fi = diff(angle) / 2 / pi * fs;  % 瞬时频率

% 作图
figure;
subplot(2, 2, 1);plot(t, a); title('包络(调幅信号)');
subplot(2, 2, 2); plot(t, b); title('调相信号');
subplot(2, 2, 3); plot(t, c); title('载波');
subplot(2, 2, 4); 
plot(t, s, 'b'); hold on;
plot(t, sh, 'r--'); hold off;
legend('调制结果', '调制信号的希尔伯特变换'); title('调制信号');


%% FFT分析
NFFT = 2 ^ nextpow2(N);
f = (0 : NFFT-1) / NFFT * fs;

sFFT = fft(s, NFFT);  % 原始信号FFT
saFFT = fft(s_analy, NFFT);  % 解析信号FFT
envFFT = fft(envelope, NFFT);  % 包络的FFT

figure;
subplot(3, 2, 1); 
plot(t, envelope); hold on;
plot(t, a, '--'); hold off; 
legend('瞬时包络绝对值', '真实包络'); title('瞬时包络');
subplot(3, 2, 2); plot(t, angle); title('瞬时相位');
subplot(3, 2, 3); plot(t(2:end), fi); title('瞬时频率');
subplot(3, 2, 4); plot(f, abs(sFFT)); title('原始信号FFT');
subplot(3, 2, 5); plot(f, abs(saFFT)); title('解析信号FFT');
subplot(3, 2, 6); plot(f, abs(envFFT)); title('包络的FFT');

         It can be seen that the spectrum of the analytic signal is a one-sided spectrum, and its amplitude is twice that of the original real signal. On the other hand, there is a boundary effect after Hilbert demodulation, that is, a large boundary error.

        (Reference: The principle of side frequency generated by signal modulation and Hilbert demodulation )

        (Reference: Signal Processing - Hilbert Transform and Spectral Analysis )

 

Guess you like

Origin blog.csdn.net/weixin_40583722/article/details/122812953