comm.RaisedCosineTransmitFilter System object

Package: comm

Apply pulse shaping by interpolating signal using raised cosine filter

Description

The Raised Cosine Transmit Filter System object™ applies pulse-shaping by interpolating an input signal using a raised cosine FIR filter.

To interpolate the input signal:

  1. Define and set up your raised cosine transmit filter object. See Construction.

  2. Call step to interpolate the input signal according to the properties of comm.RaisedCosineTransmitFilter. The behavior of step is specific to each object in the toolbox.

Construction

H = comm.RaisedCosineTransmitFilter returns a raised cosine transmit filter System object, H, which interpolates an input signal using a raised cosine FIR filter. The filter uses an efficient polyphase FIR interpolation structure and has unit energy.

H = comm.RaisedCosineTransmitFilter(PropertyName,PropertyValue, ...) returns a raised cosine transmit filter object, H, with each specified property set to the specified value.

Properties

Shape

Filter shape

Specify the filter shape as one of Normal or Square root. The default is Square root.

RolloffFactor

Rolloff factor

Specify the rolloff factor as a scalar between 0 and 1. The default is 0.2.

FilterSpanInSymbols

Filter span in symbols

Specify the number of symbols the filter spans as an integer-valued, positive scalar. The default is 10. Because the ideal raised cosine filter has an infinite impulse response, the object truncates the impulse response to the value you specify for this property.

OutputSamplesPerSymbol

Output samples per symbol

Specify the number of output samples for each input symbol. The default is 8. This property accepts an integer-valued, positive scalar value. The raised cosine filter has (FilterSpanInSymbols x OutputSamplesPerSymbol + 1) taps.

Gain

Linear filter gain

Specify the linear gain of the filter as a positive numeric scalar. The default is 1. The object designs a raised cosine filter that has unit energy, and then applies the linear gain to obtain final tap values.

Methods

cloneCreate RaisedCosineTransmitFilter object with same property values
coeffsReturns coefficients for filters
isLockedLocked status for input attributes and nontunable properties
releaseAllow property value and input characteristics changes
resetReset internal states of System object
stepOutput interpolated values of input signal

Examples

expand all

Interpolate Signal Using Square Root Raised Cosine Filter

This example shows how to interpolate a signal using the comm.RaisedCosineTransmitFilter System object and to display its spectrum.

Create a square root raised square root cosine transmit filter object. You can see that its default settings are such that the fitler has a square root shape and that there are 8 samples per symbol.

hFilt = comm.RaisedCosineTransmitFilter
hFilt = 

  System: comm.RaisedCosineTransmitFilter 

  Properties:
                     Shape: 'Square root'
             RolloffFactor: 0.2          
       FilterSpanInSymbols: 10           
    OutputSamplesPerSymbol: 8            
                      Gain: 1            
                                         

Generate random bipolar data.

data = 2*randi([0 1],10000,1) - 1;

Filter the data by using the step function of the filter object, hFilt.

filteredData = step(hFilt,data);

To view the spectrum of the filtered signal, create a spectrum analyzer object with a sample rate of 1000 Hz.

hSA = dsp.SpectrumAnalyzer('SampleRate',1000);

View the spectrum of the filtered signal using the spectrum analyzer.

step(hSA,filteredData)

Specify Filter Span of Raised Cosine Transmit Filter

This example shows to create an interpolated signal from a square root raised cosine filter that is truncated to six symbol durations.

Create a raised cosine filter and set the FilterSpanInSymbols to 6. The object truncates the impulse response to six symbols.

hTxFilt = comm.RaisedCosineTransmitFilter('FilterSpanInSymbols',6);

Launch the filter visualization tool to show the impulse response.

fvtool(hTxFilt)

Generate a random bipolar signal and then interpolate.

x = 2*randi([0 1],96,1) - 1;
y = step(hTxFilt,x);

Plot the interpolated signal.

plot(y)
grid on

Create a Raised Cosine Transmit Filter with Unity Passband Gain

This example shows how to create a raised cosine transmit filter with unity passband gain.

Generate a filter with unit energy. You can obtain the filter coefficients using the coeffs method.

h = comm.RaisedCosineTransmitFilter;
b = coeffs(h);

Plot the filter response. You can see that its gain is greater than unity (more than 0 dB).

fvtool(h)

A filter with unity passband gain has filter coefficients that sum to 1. Set the Gain property to the inverse of the sum of b.Numerator

h.Gain = 1/sum(b.Numerator);

Verify that the resulting filter coefficients sum to 1.

bNorm = coeffs(h);
sum(bNorm.Numerator)
ans =

    1.0000

Plot the filter frequency response. Note that it shows a passband gain of 0 dB.

fvtool(h)

Was this topic helpful?