Raised Cosine Transmit Filter
Apply pulse shaping by upsampling signal using raised cosine FIR filter
Library
Comm Filters
Description
The Raised Cosine Transmit Filter block upsamples and filters the input signal using a normal raised cosine FIR filter or a square root raised cosine FIR filter. The block icon shows the impulse response of the filter.
Characteristics of the Filter
The Filter shape parameter determines which type of filter the block
uses; choices are Normal
and Square
root
.
The impulse response of a normal raised cosine filter with rolloff factor R and symbol period T is
The impulse response of a square root raised cosine filter with rolloff factor R is
The impulse response of a square root raised cosine filter convolved with itself is approximately equal to the impulse response of a normal raised cosine filter.
Because the ideal raised cosine filter has an infinite impulse response, the block truncates the impulse response to the number of symbols that the Filter span in symbols parameter specifies. The Filter span in symbols, N, and the Output samples per symbol, L, determine the length of the filter's impulse response, which is L * Filter span in symbols + 1.
The Rolloff factor parameter is the filter's rolloff factor. It must be a real number between 0 and 1. The rolloff factor determines the excess bandwidth of the filter. For example, a rolloff factor of .5 means that the bandwidth of the filter is 1.5 times the input sampling frequency.
The block normalizes the filter coefficients to unit energy. If you specify a
Linear amplitude filter gain other than 1
, then the
block scales the normalized filter coefficients using the gain value you specify.
Input Signals and Output Signals
The input must be a discrete-time signal. This block accepts a column vector or matrix input signal. For information about the data types each block port supports, see the Supported Data Type table on this page.
The Rate options method and the value of the Output samples per symbol, L, parameter determine the characteristics of the output signal:
Single-Rate Processing
When you set the Rate options parameter to Enforce
single-rate processing
, the input and output of the block have the same sample
rate. To generate the output while maintaining the input sample rate, the block resamples the
data in each column of the input such that the frame size of the output
(Mo) is L times larger than that
of the input (Mo =
Mi*L), where L
represents the value of the Output samples per symbol parameter.
Multirate Processing
When you set the Rate options parameter to Allow
multirate processing
, the input and output of the block are the same size.
However, the sample rate of the output is L times faster than that of the
input (i.e. the output sample time is 1/L times the input sample time). When the block is in
multirate processing mode, you must also specify a value for the Input
processing parameter:
When you set the Input processing parameter to
Elements as channels (sample based)
, the block treats an M-by-L matrix input as M*N independent channels, and processes each channel over time. The output sample period (Tso) is L times shorter than the input sample period (Tso = Tsi/L), while the input and output sizes remain identical.When you set the Input processing parameter to
Columns as channels (frame based)
, the block treats an Mi-by-N matrix input as N independent channels. The block processes each column of the input over time by keeping the frame size constant (Mi=Mo), while making the output frame period (Tfo) L times shorter than the input frame period (Tfo = Tfi/L).
Exporting Filter Coefficients to the MATLAB Workspace
To examine or manipulate the coefficients of the filter that this block designs, select Export filter coefficients to workspace. Then set the Coefficient variable name parameter to the name of a variable that you want the block to create in the MATLAB® workspace. Running the simulation causes the block to create the variable, overwriting any previous contents in case the variable already exists.
Parameters
- Filter shape
Specify the filter shape as
Square root
orNormal
.- Rolloff factor
Specify the rolloff factor of the filter. Use a real number between
0
and1
.- Filter span in symbols
Specify the number of symbols the filter spans as an even, integer-valued positive scalar. The default is
10
. Because the ideal raised cosine filter has an infinite impulse response, the block truncates the impulse response to the number of symbols that this parameter specifies.- 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. The number of taps for the raised cosine filter equals the value of this parameter multiplied by the value of the Filter span in symbols parameter.
- Linear amplitude filter gain
Specify a positive scalar value that the block uses to scale the filter coefficients. By default, the block normalizes filter coefficients to provide unit energy gain. If you specify a gain other than
1
, the block scales the normalized filter coefficients using the gain value you specify.- Input processing
Specify how the block processes the input signal. You can set this parameter to one of the following options:
Columns as channels (frame based)
— When you select this option, the block treats each column of the input as a separate channel.Elements as channels (sample based)
— When you select this option, the block treats each element of the input as a separate channel.
- Rate options
Specify the method by which the block should upsample and filter the input signal. You can select one of the following options:
Enforce single-rate processing
— When you select this option, the block maintains the input sample rate, and processes the signal by increasing the output frame size by a factor of N. To select this option, you must set the Input processing parameter toColumns as channels (frame based)
.Allow multirate processing
— When you select this option, the block processes the signal such that the output sample rate is N times faster than the input sample rate.
- Export filter coefficients to workspace
Select this check box to create a variable in the MATLAB workspace that contains the filter coefficients.
- Visualize filter with FVTool
If you click this button, then MATLAB launches the Filter Visualization Tool,
fvtool
, to analyze the raised cosine filter whenever you apply any changes to the block's parameters. If you launchfvtool
for the filter, and subsequently change parameters in the mask,fvtool
will not update. You will need to launch a newfvtool
in order to see the new filter characteristics. Also note that if you have launchedfvtool
, then it will remain open even after the model is closed.
- Rounding mode
Select the rounding mode for fixed-point operations. The block uses the Rounding mode when the result of a fixed-point calculation does not map exactly to a number representable by the data type and scaling storing the result. The filter coefficients do not obey this parameter; they always round to
Nearest
. For more information, see Rounding Modes or Rounding Mode: Simplest (Fixed-Point Designer).- Saturate on integer overflow
Select the overflow mode for fixed-point operations. The filter coefficients do not obey this parameter; they are always saturated.
- Coefficients
Choose how you specify the word length and the fraction length of the filter coefficients (numerator and/or denominator). See Filter Structure Diagrams for illustrations depicting the use of the coefficient data types in this block:
When you select
Same word length as input
, the word length of the filter coefficients match that of the input to the block. In this mode, the fraction length of the coefficients is automatically set to the binary-point only scaling that provides you with the best precision possible given the value and word length of the coefficients.When you select
Specify word length
, you are able to enter the word length of the coefficients, in bits. In this mode, the fraction length of the coefficients is automatically set to the binary-point only scaling that provides you with the best precision possible given the value and word length of the coefficients.When you select
Binary point scaling
, you are able to enter the word length and the fraction length of the coefficients, in bits. If applicable, you are able to enter separate fraction lengths for the numerator and denominator coefficients.When you select
Slope and bias scaling
, you are able to enter the word length, in bits, and the slope of the coefficients. If applicable, you are able to enter separate slopes for the numerator and denominator coefficients. This block requires power-of-two slope and a bias of zero.The filter coefficients do not obey the Rounding mode and the Saturate on integer overflow parameters; they are always saturated and rounded to
Nearest
.
- Product output
Use this parameter to specify how you would like to designate the product output word and fraction lengths. See Filter Structure Diagrams and Multiplication Data Types for illustrations depicting the use of the product output data type in this block:
When you select
Same as input
, these characteristics match those of the input to the block.When you select
Binary point scaling
, you are able to enter the word length and the fraction length of the product output, in bits.When you select
Slope and bias scaling
, you are able to enter the word length, in bits, and the slope of the product output. This block requires power-of-two slope and a bias of zero.
- Accumulator
Use this parameter to specify how you would like to designate the accumulator word and fraction lengths. See Filter Structure Diagrams and Multiplication Data Types for illustrations depicting the use of the accumulator data type in this block:
When you select
Same as input
, these characteristics match those of the input to the block.When you select
Same as product output
, these characteristics match those of the product output.When you select
Binary point scaling
, you are able to enter the word length and the fraction length of the accumulator, in bits.When you select
Slope and bias scaling
, you are able to enter the word length, in bits, and the slope of the accumulator. This block requires power-of-two slope and a bias of zero.
- Output
Choose how you specify the output word length and fraction length:
When you select
Same as input
, these characteristics match those of the input to the block.When you select
Same as accumulator
, these characteristics match those of the accumulator.When you select
Binary point scaling
, you are able to enter the word length and the fraction length of the output, in bits.When you select
Slope and bias scaling
, you are able to enter the word length, in bits, and the slope of the output. This block requires power-of-two slope and a bias of zero.
- Lock data type settings against changes by the fixed-point tools
Select this parameter to prevent any fixed-point scaling you specify in this block mask from being overridden by the autoscaling tool in the Fixed-Point Tool.
Supported Data Type
Port | Supported Data Types |
---|---|
In |
|
Out |
|
Pair Block
Extended Capabilities
Version History
Introduced before R2006a