Filtering
Filter settings allow to filtering the waveform in order to achieve a finite bandwidth and improve the spectral efficiency.
Before introducing the Filtering, we will start with the two other setting:
Rolloff factor: defines the filter rolloff. 0<rolloff factor<1.
Filter span: defines the number of symbols truncated. 0<filter span.
Filtering: Three filtering options are available in the Waveform Generator :

None
In this case, no filter are applied to the waveform leading to a non-finite bandwidth.
Raised Cosine Filter
Raised cosine filters are used in systems which perform all the filtering in the transmitter. This is typical of some mobile communication systems.
The Raised cosine filter is specified with a rolloff factor. The filter is truncated
to Filter span
symbols, and each symbol period contains
Oversampling
samples. The order of the filter is
Oversampling*Filter span
. The filter energy is 1.
The equation for the raised cosine (Nyquist) filter is given in the following code:
function filterRaisedCosine(Oversampling,SynbolLength,Rolloff)
{
delay = (SynbolLength*Oversampling)/2;
t=stepspace(-delay/Oversampling,delay/Oversampling,1/Oversampling);
b=0;
Xt=colvector(size(t));
denom = (1-(2*Rolloff*t).**2);
for(a=0;a<size(t)-1;a++)
{
if (abs(denom[a])>sqrt(2.2204e-16))
{
if (t[a]!=0)
{
Xt[a] = (sin(pi*t[a])./(pi*t[a])).*(cos(pi*Rolloff*t[a])./denom[a])/Oversampling;
}
else
{
Xt[a] = (cos(pi*Rolloff*t[a])./denom[a])/Oversampling;
}
}
else
{
Xt[a] = Rolloff * sin(pi/(2*Rolloff)) / (2*Oversampling);
}
}
sum=0;
for(a=0;a<size(t);a++)
{
sum=sum+Xt[a].**2;
}
Xt = (Xt./sqrt(sum));
return Xt;
}
Root Raised Cosine Filter
Many communication systems use distributed filtering which means that the filtering
is performed partially in the transmitter, to limit the bandwidth, and partially in
the receiver, to limit the interference. For these systems, matched square-root
raised cosine filters are used in the transmitter and the receiver sections of the
system to achieve optimum signal to noise ratio. The Root Raised cosine filters is
specified with a rolloff factor. The filter is truncated to Filter
span
symbols, and each symbol period contains
Oversampling
samples. The order of the filter is
Oversampling*Filter span
. The filter energy is 1.
The equation for the root raised cosine (Nyquist) filter is given in the following code :
function filterRootRaisedCosine(Oversampling,SynbolLength,Rolloff)
{
delay = (SynbolLength*Oversampling)/2;
t=stepspace(-delay/Oversampling,delay/Oversampling,1/Oversampling);
b=0;
Xt=colvector(size(t));
for(a=0;a<size(t)-1;a++)
{
if (t[a]==0)
{
Xt[a] = -1 ./ (pi.*Oversampling) .* (pi.*(Rolloff-1) - 4.*Rolloff );
}
else if (abs(abs(4.*Rolloff.*t[a]) - 1.0) < sqrt(2.2204e-16))
{
Xt[a] = 1 ./ (2.*pi.*Oversampling)*(pi.*(Rolloff+1).* sin(pi.*(Rolloff+1)./(4.*Rolloff))- 4.*Rolloff* sin(pi.*(Rolloff-1)./(4.*Rolloff))+ pi.*(Rolloff-1).* cos(pi.*(Rolloff-1)./(4.*Rolloff)));
}
else
{
Xt[a] = -4.*Rolloff./Oversampling .* (cos((1+Rolloff).*pi.*t[a]) +sin((1-Rolloff).*pi.*t[a]) ./ (4.*Rolloff.*t[a]))./ (pi .* ((4.*Rolloff.*t[a]).**2 - 1));
}
}
sum=0;
for(a=0;a<size(t);a++)
{
sum=sum+Xt[a].**2;
}
Xt = (Xt./sqrt(sum));
return Xt;
}