赞
踩
本文详细介绍了基于多相滤波器的数字信道化算法的推导过程, 如果您在阅读的过程中发现算法推导过程中有任何错误, 请不吝指出.
此外, 进入我的Github仓库polyphase , 可查看基于多相滤波器的数字信道化算法的Python代码实现; Matlab代码可从我的资源中下载. 感兴趣的小伙伴可以下载使用, 希望对大家有所帮助.
多相滤波信道化是对传统信道化结构的改进, 通过各支路共用一个低通滤波器提高资源的利用率, 同时采用多相抽取提高了后续滤波和 FFT 的运算效率. 给定输入信号为
x
(
n
)
x(n)
x(n), 欲划分的信道数为
K
K
K, 原型滤波器
h
(
n
)
h(n)
h(n)
的阶数为
N
N
N, 且滤波器阶数能被信道数整除, 即
L
=
N
/
K
L = N / K
L=N/K, 则原型滤波器的系统函数
H
(
z
)
H(z)
H(z)可表示为:
H ( z ) = ∑ n = 0 N − 1 h ( n ) z − n = h 0 z − 0 + h K z − K + . . . + h ( L − 1 ) K z − ( L − 1 ) K + h 1 z − 1 + h K + 1 z − ( K + 1 ) + . . . + h ( L − 1 ) K + 1 z − [ ( L − 1 ) K + 1 ] . . . + h K − 1 z − ( K − 1 ) + h 2 K − 1 z − ( 2 K − 1 ) + . . . + h L K − 1 z − ( L K − 1 ) = z − 0 ( h 0 + h K z − K + . . . + h ( L − 1 ) K z − ( L − 1 ) K ) + z − 1 ( h 1 + h K + 1 z − K + . . . + h ( L − 1 ) K + 1 z − ( L − 1 ) K ) . . . + z − ( K − 1 ) ( h K − 1 + h 2 K − 1 z − K + . . . + h L K − 1 z − ( L − 1 ) K ) = ∑ k = 0 K − 1 ( z − k ∑ l = 0 L − 1 h l K + k z − l K ) (1) H(z) = \sum_{n = 0}^{N-1}h(n)z^{-n} \\ = h_0z^{-0} + h_Kz^{-K} + ... + h_{(L-1)K}z^{-(L-1)K} \\ + h_1z^{-1} + h_{K+1}z^{-(K+1)} + ... + h_{(L-1)K + 1}z^{-[(L-1)K+1]} \\ ... \\ + h_{K-1}z^{-(K-1)} + h_{2K-1}z^{-(2K-1)} + ... + h_{LK-1}z^{-(LK-1)} \\ = z^{-0}(h_0 + h_Kz^{-K} + ... + h_{(L-1)K}z^{-(L-1)K}) \\ + z^{-1}(h_1 + h_{K+1}z^{-K} + ... + h_{(L-1)K + 1}z^{-(L-1)K}) \\ ... \\ + z^{-(K-1)}(h_{K-1} + h_{2K-1}z^{-K} + ... + h_{LK-1}z^{-(L-1)K}) \\ = \sum_{k = 0}^{K-1}(z^{-k}\sum_{l=0}^{L-1}h_{lK+k}z^{-lK}) \tag{1} H(z)=n=0∑N−1h(n)z−n=h0z−0+hKz−K+...+h(L−1)Kz−(L−1)K+h1z−1+hK+1z−(K+1)+...+h(L−1)K+1z−[(L−1)K+1]...+hK−1z−(K−1)+h2K−1z−(2K−1)+...+hLK−1z−(LK−1)=z−0(h0+hKz−K+...+h(L−1)Kz−(L−1)K)+z−1(h1+hK+1z−K+...+h(L−1)K+1z−(L−1)K)...+z−(K−1)(hK−1+h2K−1z−K+...+hLK−1z−(L−1)K)=k=0∑K−1(z−kl=0∑L−1hlK+kz−lK)(1)
令 e r ( l ) = h ( l K + r ) e_r(l)=h(lK+r) er(l)=h(lK+r)为原型滤波器 h ( n ) h(n) h(n)的多相分量, 则
E r ( z ) = ∑ l = 0 L − 1 e r ( l ) z − l = ∑ l = 0 L − 1 h ( l K + r ) z − l (2) E_r(z) = \sum_{l=0}^{L-1}e_r(l)z^{-l}=\sum_{l=0}^{L-1}h(lK+r)z^{-l} \tag{2} Er(z)=l=0∑L−1er(l)z−l=l=0∑L−1h(lK+r)z−l(2)
那么 H ( z ) H(z) H(z)可表示为
H ( z ) = ∑ r = 0 K − 1 ( E r ( z K ) z − r (3) H(z) = \sum_{r = 0}^{K-1}(E_r(z^K)z^{-r} \tag{3} H(z)=r=0∑K−1(Er(zK)z−r(3)
传统数字信道化结构中, 第 k k k路信道的实现框图如下图所示. 信号经过滤波后, 与复指数信号 e − 2 j π k n / K e^{-2j\pi kn/K} e−2jπkn/K相乘, 实现正交下变频到基带信号. 其中, 滤波器 h k ( n ) h_k(n) hk(n)的系统函数 H k ( z ) H_k(z) Hk(z)可表示为 h k ( n ) = h 0 ( n ) e 2 j π k n / K h_k(n)=h_0(n)e^{2j\pi kn/K} hk(n)=h0(n)e2jπkn/K, h 0 ( n ) h_0(n) h0(n)为低通原型滤波器.
令
w
k
=
−
2
π
k
/
K
w_k = -2\pi k/K
wk=−2πk/K,则复数乘法器的输出
v
k
(
n
)
v_k(n)
vk(n)可表示为
v k ( n ) = [ x ( n ) ∗ h k ( n ) ] e j w k n = ∑ i = 0 N − 1 x ( n − i ) [ h 0 ( i ) e − j w k i ] e j w k n = ∑ i = 0 N − 1 x ( n − i ) [ h 0 ( i ) e j w k ( n − i ) ] (4) v_k(n) = [x(n) * h_k(n)]e^{jw_kn} \\ = \sum_{i=0}^{N-1}x(n-i)[h_0(i)e^{-jw_ki}]e^{jw_kn} \\ = \sum_{i=0}^{N-1}x(n-i)[h_0(i)e^{jw_k(n-i)}] \tag{4} vk(n)=[x(n)∗hk(n)]ejwkn=i=0∑N−1x(n−i)[h0(i)e−jwki]ejwkn=i=0∑N−1x(n−i)[h0(i)ejwk(n−i)](4)
∗ * ∗: 卷积符号, 下同.
第 k k k路的输出 y k ( m ) y_k(m) yk(m)为
y k ( m ) = v k ( n ) ∣ n = K m = ∑ i = 0 N − 1 x ( K m − i ) [ h 0 ( i ) e j w k ( K m − i ) ] (5) y_k(m) = v_k(n)|_{n=Km} = \sum_{i=0}^{N-1}x(Km-i)[h_0(i)e^{jw_k(Km-i)}] \tag{5} yk(m)=vk(n)∣n=Km=i=0∑N−1x(Km−i)[h0(i)ejwk(Km−i)](5)
令 i = l K + r i = lK+r i=lK+r, 则上式可表示为
y k ( m ) = ∑ r = 0 K − 1 ∑ l = 0 L − 1 x ( K m − K l − r ) h 0 ( K l + r ) e j w k ( K m − K l − r ) (6) y_k(m) = \sum_{r=0}^{K-1}\sum_{l=0}^{L-1}x(Km-Kl-r)h_0(Kl+r)e^{jw_k(Km-Kl-r)} \tag{6} yk(m)=r=0∑K−1l=0∑L−1x(Km−Kl−r)h0(Kl+r)ejwk(Km−Kl−r)(6)
令 x r ( m − l ) = x ( K ( m − l ) − r ) x_r(m-l) = x(K(m-l)-r) xr(m−l)=x(K(m−l)−r), 结合原型滤波器 h ( n ) h(n) h(n)的多相分量 e r ( l ) = h ( K l + r ) e_r(l)=h(Kl+r) er(l)=h(Kl+r), 上式可表示为
y k ( m ) = ∑ r = 0 K − 1 ∑ l = 0 L − 1 x r ( m − l ) e r ( l ) e j w k ( K m − K l − r ) = ∑ r = 0 K − 1 e − j w k r ∑ l = 0 L − 1 x r ( m − l ) e r ( l ) e j w k K ( m − l ) (7) y_k(m) = \sum_{r=0}^{K-1}\sum_{l=0}^{L-1}x_r(m-l)e_r(l)e^{jw_k(Km-Kl-r)} \\ = \sum_{r=0}^{K-1}e^{-jw_kr} \sum_{l=0}^{L-1}x_r(m-l)e_r(l)e^{jw_kK(m-l)} \tag{7} yk(m)=r=0∑K−1l=0∑L−1xr(m−l)er(l)ejwk(Km−Kl−r)=r=0∑K−1e−jwkrl=0∑L−1xr(m−l)er(l)ejwkK(m−l)(7)
K K K分别为奇数和偶数时, 信道分配采用如下图所示的方式进行排列
第
k
k
k 路的中心频率
w
k
w_k
wk 为
w k = − π + 2 π k + π K (8) w_k = -\pi + \frac{2\pi k + \pi}{K} \tag{8} wk=−π+K2πk+π(8)
将上式带入公式 (7) 得
y k ( m ) = ∑ r = 0 K − 1 e j ( π − 2 π k + π K ) r ∑ l = 0 L − 1 x r ( m − l ) e r ( l ) ( − 1 ) ( K − 1 ) ( m − l ) (9) y_k(m) = \sum_{r=0}^{K-1}e^{j(\pi-\frac{2\pi k + \pi}{K})r} \sum_{l=0}^{L-1}x_r(m-l)e_r(l)(-1)^{(K-1)(m-l)} \tag{9} yk(m)=r=0∑K−1ej(π−K2πk+π)rl=0∑L−1xr(m−l)er(l)(−1)(K−1)(m−l)(9)
注: e − j π = − 1 e^{-j\pi} = -1 e−jπ=−1, x a b = ( x a ) b x^{ab} = (x^a)^b xab=(xa)b ==> e − j π ( K − 1 ) ( m − l ) = ( − 1 ) ( K − 1 ) ( m − l ) e^{-j\pi(K-1)(m-l)} = (-1)^{(K-1)(m-l)} e−jπ(K−1)(m−l)=(−1)(K−1)(m−l)
令
u r ( m ) = ∑ l = 0 L − 1 x r ( m − l ) ( − 1 ) ( K − 1 ) ( m − l ) e r ( l ) = x r ( m ) ( − 1 ) ( K − 1 ) m ∗ e r ( m ) (10) u_r(m) = \sum_{l=0}^{L-1}x_r(m-l)(-1)^{(K-1)(m-l)}e_r(l) \\ = x_r(m)(-1)^{(K-1)m}*e_r(m) \tag{10} ur(m)=l=0∑L−1xr(m−l)(−1)(K−1)(m−l)er(l)=xr(m)(−1)(K−1)m∗er(m)(10)
代入上式得
y k ( m ) = ∑ r = 0 K − 1 u r ( m ) e j ( π − 2 π k + π K ) r = ∑ r = 0 K − 1 u r ( m ) e j π r e − j π r / K e − j ( 2 π k K ) r (11) y_k(m) = \sum_{r=0}^{K-1}u_r(m)e^{j(\pi-\frac{2\pi k + \pi}{K})r}\\ = \sum_{r=0}^{K-1}u_r(m)e^{j\pi r}e^{-j\pi r/K}e^{-j(\frac{2\pi k}{K})r} \tag{11} yk(m)=r=0∑K−1ur(m)ej(π−K2πk+π)r=r=0∑K−1ur(m)ejπre−jπr/Ke−j(K2πk)r(11)
N点的DFT定义为 X ( k ) = D F T [ x ( n ) ] = ∑ n = 0 N − 1 x ( n ) e − 2 j π k n / N X(k) = DFT[x(n)] = \sum_{n=0}^{N-1}x(n)e^{-2j\pi kn/N} X(k)=DFT[x(n)]=∑n=0N−1x(n)e−2jπkn/N
m
i
m_i
mi时刻, 各个信道的输出为
Y
m
i
(
k
)
=
{
y
0
(
m
i
)
,
y
1
(
m
i
)
,
y
2
(
m
i
)
,
.
.
.
,
y
K
−
1
(
m
i
)
}
(12)
Y_{m_i}(k) = \{y_0(m_i), y_1(m_i), y_2(m_i), ... ,y_{K-1}(m_i) \} \tag{12}
Ymi(k)={y0(mi),y1(mi),y2(mi),...,yK−1(mi)}(12)
=
D
F
T
[
u
r
(
m
)
(
−
1
)
r
e
j
π
r
/
K
]
∣
m
=
m
i
= DFT[u_r(m)(-1)^re^{j\pi r/K}]|_{m=m_i}
=DFT[ur(m)(−1)rejπr/K]∣m=mi
以上是多相滤波数字信道化结构的推导过程. 对推导过程总结如下:
u k ( m ) = x k ( m ) ( − 1 ) ( K − 1 ) m ∗ e k ( m ) (15) u_k(m) = x_k(m)(-1)^{(K-1)m}*e_k(m) \tag{15} uk(m)=xk(m)(−1)(K−1)m∗ek(m)(15)
由此得到的多相滤波信道化原理结构框图如下图所示.
使用python对多相滤波数字信道化算法进行仿真. 代码如下:
from scipy.signal import chirp, remez
import matplotlib.pyplot as plt
# [how to install `polyphase`](https://github.com/falwat/polyphase)
from polyphase import Channelizer
from numpy import arange, real, imag
from numpy.fft import fft, fftshift
# 通道数
channel_num = 8
# 采样率
fs = 1280000
f0 = 0
f1 = fs/2
t1 = 1
#
T = 1
t = arange(0, int(T*fs)) / fs
# 生成一个chirp信号
s = chirp(t, f0, t1, f1)
# 创建原型滤波器
cutoff = fs / channel_num / 2 # Desired cutoff frequency, Hz
trans_width = cutoff / 10 # Width of transition from pass band to stop band, Hz
numtaps = 128 # Size of the FIR filter.
taps = remez(numtaps, [0, cutoff - trans_width, cutoff + trans_width, 0.5*fs],
[1, 0], Hz=fs)
# 创建信道化器
channelizer = Channelizer(taps, channel_num)
ss = channelizer.dispatch(s)
segs = 500;
ns = int(fs/segs);
nss = int(ss.shape[1]/segs);
# 分段绘图
fig, axs = plt.subplots(3, 1)
for i in range(segs):
s0 = s[i*ns:i*ns+ns]
h0 = abs(fft(s0))
ss0 = ss[0:4, i*nss:i*nss+nss]
hh0 = abs(fftshift(fft(ss0)))
for ax in axs:
ax.cla()
axs[0].set_title(r'original signal')
axs[1].set_title(r'The spectrum of channelized signals')
axs[2].set_title(r'Waveform of channelized signal(real part)')
axs[0].plot(h0 / max(h0))
axs[1].plot(abs(hh0.T / hh0.max()))
axs[2].plot(real(ss0.T))
plt.pause(0.05)
仿真视频如下:
多相滤波数字信道化仿真
链接: 仿真视频
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。