Simple Filter Design with Persistent Memory Option

by

 

Basic RRC Match Filter Design with Persistent Memory Option

filterDesign.m
clear all
close all
clc

ayar.alpha          = 0.3;  % roll-off factor
ayar.UpSampleRate   = 16;   % upsampling rate
ayar.Nsym           = 100;    % The long of the filter response [in symbol]

type                        	= fdesign.interpolator(ayar.UpSampleRate,'Square Root Raised Cosine',ayar.UpSampleRate,'Nsym,Beta',ayar.Nsym,ayar.alpha);
shapingFilter                 	= design(type, 'window');   % filter object
shapingFilter.States          	= 0;                        % initial output value
shapingFilter.PersistentMemory	= true;                     % it keeps the tails

type2                        	= fdesign.decimator(16,'Square Root Raised Cosine',ayar.UpSampleRate,'Nsym,Beta',ayar.Nsym,ayar.alpha);
shapingFilter2                 	= design(type2, 'window');   % filter object
shapingFilter2.States          	= 0;                        % initial output value
shapingFilter2.PersistentMemory	= true;                     % it keeps the tails
shapingFilter2.reset


%% test for persisten memory
dataAll = [];
lastData = 50;
for i=1:lastData+1
    if i == lastData+1
        dataPart = zeros(1,ayar.Nsym);
    else
        dataPart = randint(1,3);
    end
    tranmitIF  = filter(shapingFilter, dataPart);
    receivedIF = filter(shapingFilter2, tranmitIF);
    dataAll     = [dataAll receivedIF];
end
plot(dataAll)
hold on

Contact us