Documentation |
Apply pulse shaping by upsampling signal using raised cosine FIR filter
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's icon shows the filter's impulse response.
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
$$h(t)=\frac{\mathrm{sin}(\pi t/T)}{(\pi t/T)}\cdot \frac{\mathrm{cos}(\pi Rt/T)}{(1-4{R}^{2}{t}^{2}/{T}^{2})}$$
The impulse response of a square root raised cosine filter with rolloff factor R is
$$h(t)=4R\frac{\mathrm{cos}\left((1+R)\pi t/T\right)+\frac{\mathrm{sin}\left((1-R)\pi t/T\right)}{(4Rt/T)}}{\pi \sqrt{T}\left(1-{(4Rt/T)}^{2}\right)}$$
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 Liner amplitude filter gain other than 1, then the block scales the normalized filter coefficients using the gain value you specify.
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:
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 (M_{o}) is L times larger than that of the input (M_{o} = M_{i}*L), where L represents the value of the Output samples per symbol parameter.
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 (T_{so}) is L times shorter than the input sample period (T_{so} = T_{si}/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 M_{i}-by-N matrix input as N independent channels. The block processes each column of the input over time by keeping the frame size constant (M_{i}=M_{o}), while making the output frame period (T_{fo}) L times shorter than the input frame period (T_{fo} = T_{fi}/L).
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.
Specify the filter shape as Square root or Normal.
Specify the rolloff factor of the filter. Use a real number between 0 and 1.
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.
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.
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.
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.
Note: The Inherited (this choice will be removed - see release notes) option will be removed in a future release. See Frame-Based Processing in the Communications System Toolbox™ Release Notes for more information. |
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 to Columns 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.
Select this check box to create a variable in the MATLAB workspace that contains the filter coefficients.
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 launch fvtool for the filter, and subsequently change parameters in the mask, fvtool will not update. You will need to launch a new fvtool in order to see the new filter characteristics. Also note that if you have launched fvtool, then it will remain open even after the model is closed.
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 in the DSP System Toolbox™ documentation or Rounding Mode: Simplest in the Fixed-Point Designer™ documentation.
Select the overflow mode for fixed-point operations. The filter coefficients do not obey this parameter; they are always saturated.
Choose how you specify the word length and the fraction length of the filter coefficients (numerator and/or denominator). See Filter Structure Diagrams in DSP System Toolbox Reference Guide 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 Overflow mode parameters; they are always saturated and rounded to Nearest.
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 in DSP System Toolbox Reference Guide 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.
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.
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.
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.