# 多相滤波器

clc;clear all;close all
N = 256;
h = firls(N, [0 .2 .25 1], [1  1 0  0],[.001 .0001]);
D = 8;
% PolyPhase Componets
i = 1:length(h);
h_channel = zeros(D,length(h));
im = sqrt(-1);
for j = 1:D
h_channel(j,:) = h.*exp((-im*2*pi*((j-1)*(i-1)))/D);
end
figure(1)
for i = 1:D+1
switch i
case 1
subplot (2,1,1);
plot(abs(fft(h)));
title('Orignal LPF ')
otherwise
subplot (2,1,2)
plot(abs(fft(h_channel(i-1,:))));
hold on;
title('channelize')
end
end


对应频谱图：

可以看出，信道化接收机的抽取器位于滤波器之后，当抽取率D很大或者滤波器阶数较高，计算效率将难以提升，这时候借助多相滤波器便可以优化。

• 根据指标，确定滤波器类型以及阶数N
• 求解h（n）
• 根据信道个数，并用下式确定多相滤波器：

• 基于低通滤波器组的信道化需要乘法：M1 = D x (1+N) = 4112次；
• 基于多相滤波器的信道化需要乘法：M2 = N+2*D+D*log2D = 352次；

clc;clear all;close all
fs = 1e9;
t = 0:1/fs:1e-6;
f0 = 70e6;
sig = sin(2*pi*t*f0);
len = length(sig);
h = coef_lpf;
N = length(h);
D = 16;
y = zeros(D,len);
% PolyPhase Componets
i = 1:length(h);
h_channel = zeros(D,length(h));
im = sqrt(-1);
x_fre = linspace(0,fs,N);
for j = 1:D
h_channel(j,:) = h.*exp((-im*2*pi*((j-1)*(i-1)))/D);
y(j,:) = filter(h_channel(j,:),1,sig);
end
figure()
for i = 1:D+1
switch i
case 1
subplot (2,1,1);
plot(x_fre,abs(fft(h)));
title('Orignal LPF ')
otherwise
subplot (2,1,2)
plot(x_fre,abs(fft(h_channel(i-1,:))));
hold on;
title('channelize')
end
end
x_fre1 = linspace(0,fs,len);
figure()
plot(x_fre1,abs(fft(sig)));
for iter = 1:D
if mod(iter,4) ==1
figure()
j = 1;
end
subplot(4,1,j)
j = j+1;
plot(x_fre1,abs(fft(y(iter,:))));
title(['信道',num2str(iter)]);
end


仿真结果：

sig = exp(-1j*2*pi*t*f0);


信号只在信道2出现：

clc;clear all;close all;
h = coef_lpf;
%%产生信号
fc = 70e6;
c = 3.0e8;
fs = 1e9;
theta = 30/180*pi;
lambda = c/fc;
d = lambda/4;
len = 2048;
t = 0:1/fs:1/fs*(len-1);
st = exp(-1j*2*pi*t*fc);
Phase = 2*pi*d*sin(theta)/lambda;
st = st/trace(st*st');
Interformer01 = st;
%%信道化
D = 16;
si = 1:length(h);
h_channel = zeros(D,length(h));
im = sqrt(-1);
for j = 1:D
h_channel(j,:) = downsample(h.*exp((im*2*pi*((si-1)*(j-1)))/D),1);
end
figure()
for i = 1:D
plot(abs(fft(h_channel(i,:))));
hold on;
end
Interformer_channel = zeros(D,len/D);
for i = 1:D
Interformer_channel(i,:) = downsample(filter(h_channel(i,:),1,Interformer01),D);
end
figure()
for i = 1:D
subplot(4,4,i)
plot(real((Interformer_channel(i,:))));
end
%%信道化实现思路
si_new = 1:length(h)/D;
Interformer01_py = (reshape(Interformer01,D,len/D));
% Interformer01_py = Interformer01_py.*repmat((exp(1j/2*pi*si_new)),length(h)/D,1);
% h_py = reshape(h,D,length(h)/D);
h_py = fliplr(reshape(h,D,length(h)/D));%.*repmat((exp(1j/2*pi*si_new)),D,1);
Interformer02_channel = zeros(D,len/D);

for i = 1:D
Interformer02_channel(i,:) = downsample(filter(h_py(i,:),1,Interformer01_py(i,:)),1);
%    Interformer02_channel(i,:) = Interformer02_channel(i,:)*(-1)^(i-1)*exp(-1j*pi/2/D*(i-1));
end
Interformer02_channel = fft(Interformer02_channel);
figure()
for i = 1:D
subplot(4,4,i)
plot(real((Interformer02_channel(i,:))));
end

信道化结果：

posted @ 2017-08-01 07:52  桂。  阅读(3204)  评论(0编辑  收藏