Documentation

三通道小波传播器

This example shows how to reconstruct three independent combined signals transmitted over a single communications link using a Wavelet Transmultiplexer (WTM). The example illustrates the perfect reconstruction property of the discrete wavelet transform (DWT).

介绍

该WTM结合了三个源信号以通过单个链接传输,然后将通道接收端的三个信号分开。该示例演示了三通道传播器,但是该方法可以扩展到任意数量的通道。

WTM的操作在几个方面类似于频域多路复用器(FDM)。在FDM中,基带输入信号被过滤并调制为相邻的频带,将其汇总在一起,然后通过单个链接传输。在接收端,将传输信号过滤到分开的相邻频道,并将信号解调回基带。过滤器还必须强烈衰减相邻的信号,以提供从过滤器通带到其停止带的急剧过渡。此步骤将串扰或信号泄漏的量从一个频带到另一个频段。此外,FDM经常在三个调制频带(称为护罩带)之间采用未使用的频段,以放大FDM过滤器的要求。

在WTM中,通过合成和分析小波过滤器执行的过滤类似于FDM中的过滤步骤,并且合成阶段的插值等同于频率调制。从频域的角度来看,与FDM实施所需的过滤器相比,小波过滤器的光谱过滤器相当较差,从Passband到停止频带表现出缓慢的过渡,并在其响应中提供了严重的失真。使WTM与众不同的原因是,分析和合成过滤完全取消了滤波器失真和信号别名,从而产生了输入信号的完美重建,从而完美地提取了多路复用输入。由于不需要防护带,因此可以实现理想的光谱效率。实施通道过滤器的实际限制会造成带外泄漏和失真。在常规的FDM方法中,同一通信系统中的每个通道都需要自己的过滤器,并且容易受到相邻通道的串扰。使用WTM方法,整个通信通道只需要一个带通滤波器,而频道到通道的干扰被消除了。

不te that a noisy link can cause imperfect reconstruction of the input signals, and the effects of channel noise and other impairments in the recovered signals can differ in FDM and WTM. This can be modeled, for example, by adding a noise source to the data link.

初始化

Creating and initializing your System objects before they are used in a processing loop is critical to get optimal performance.

% Initialize variables used in the example such as the standard deviation of% the channel noise.loaddspwlets;% load filter coefficients and input signalNumTimes = 14;% for-loop iterationsstdnoise = .2^.5;% standard deviation of channel noise

Create a sine wave System object to generate the Channel 1 signal.

正弦= DSP.SineWave('频率', fs/68,...'SampleRate',fs,...'SamplesPerFrame', fs*2);

Create a random number generator stream for the channel noise.

strn = randstream.create('mt19937ar','seed',1);

Create a chirp System object to generate the Channel 2 signal.

chirpSignal = dsp.Chirp(...'Type',``扫cosin'',...'SweepDirection',“双向”,...“初始频率”, fs/5000,...'TargetFrequency', fs/50,...“目标时间”, 1000,...'sweeptime', 1000,...'SampleRate', 1/ts,...'SamplesPerFrame', fs);

Create and configure a dyadic analysis filter bank System object for subband decomposition of the signal.

二聚解分析= DSP.Dyadicanalysisfilterbank(...'CustomLowpassFilter',lod,...'CustomHighpassFilter',藏起来,...'NumLevels',2);

Create three System objects for inserting delays in each channel to compensate for the system delay introduced by the wavelet components.

delay1 = dsp.delay(4);delay2 = dsp.delay(6);delay3 = dsp.delay(6);

Create and configure a dyadic synthesis filter bank System object for reconstructing the signal from different subbands of the signal.

dyadicSynthesis = dsp。DyadicSynthesisFilterBank (...'CustomLowpassFilter',[0 lor],...'CustomHighpassFilter',[0 hir],...'NumLevels',2);

Create time scope System objects to plot the original, reconstructed and error signals.

scope1 = dsp.TimeScope(3,...'Name','Three Channel WTM: Original (delayed)',...'SampleRate',fs,...'TimeSpan',8,...'YLimits', [-2 2],...'ShowLegend', 真的,...“ timespanoverrunaction”,'滚动');pos = scope1.position;pos(3:4)= 0.9*pos(3:4);scope1.position = [pos(1)-1.1*pos(3)pos(2:4)];scope2 = dsp.timescope(3,...'Name','Three Channel WTM: Reconstructed',...'位置', pos,...'SampleRate',fs,...'TimeSpan',8,...'YLimits', [-2 2],...'ShowLegend', 真的,...“ timespanoverrunaction”,'滚动');scope3 = dsp.timescope(3,...'Name',“三个通道WTM:错误”,...'位置', [pos(1)+1.1*pos(3) pos(2:4)],...'SampleRate',fs,...'TimeSpan',8,...'YLimits', [-5e-11 5e-11],...'ShowLegend', 真的,...“ timespanoverrunaction”,'滚动');% Create variable for Channel 3 signal.tx_ch3 = [一个(35,1); zeros(45,1)];% Generate the Channel 3 signal

流处理循环

创建一个处理循环以模拟三个通道传播器。该循环使用您上面实例化的系统对象。

forii = 1:NumTimes Tx_Ch1 = sine() +...stdnoise*randn(strN,fs*2,1);% Generate Channel 1 signalTx_Ch1_delay = delay1(Tx_Ch1); Tx_Ch2 = chirpSignal();% Generate Channel 2 signalTx_Ch2_delay = delay2(Tx_Ch2); Tx_Ch3_delay = delay3(Tx_Ch3);%延迟频道3信号% Concatenate the three channel signalsTx = [Tx_Ch1; Tx_Ch2; Tx_Ch3];% Synthesis stage equivalent to frequency modulation.y =二二合成(TX);%分析阶段Rx = dyadicAnalysis(y);% Separate out the three channelsRx_Ch1 = Rx(1:160); Rx_Ch2 = Rx(161:240); Rx_Ch3 = Rx(241:320);%计算TX和RX信号之间的误差err_Ch1 = Tx_Ch1_delay - Rx_Ch1; err_Ch2 = Tx_Ch2_delay - Rx_Ch2; err_Ch3 = Tx_Ch3_delay - Rx_Ch3;% Plot the results.scope1(Tx_Ch1_delay, Tx_Ch2_delay, Tx_Ch3_delay); scope2(Rx_Ch1, Rx_Ch2, Rx_Ch3); scope3(err_Ch1, err_Ch2, err_Ch3);end释放(Scope1);释放(scope2);释放(scope3);

概括

In this example you used theDyadicAnalysisFilterBankDyadicSynthesisFilterBankSystem objects to implement a Wavelet Transmultiplexer. The perfect reconstruction property of the analysis and synthesis wavelet filters enables perfect extraction of multiplexed inputs.

这个话题有帮助吗?