Filter
Libraries:
RF Blockset /
Idealized Baseband
Description
Use the Idealized Baseband Filter block to filter RF complex baseband signals in Simulink. You can use the Butterworth, Chebyshev, or inverse Chebyshev design methods to design your filter. You can also model your filter either in the time- or frequency-domain and plot the filter characteristics.
To design an RF filter with impedance mismatches, use the Circuit Envelope Filter block.
Note
The Idealized Baseband Filter block replaces the Lowpass RF Filter, Highpass RF Filter, Bandpass RF Filter, and Bandstop RF Filter blocks.
Examples
Time Domain Filtering of RF Complex Baseband Signals in Simulink
Compare Idealized Baseband and Circuit Envelope Filter blocks.
Ports
Input
Time-dependent input signal, specified as a real scalar, real column, complex scalar, or complex column. A column represents consecutive points in time.
Data Types: double
| single
Output
Time-dependent output signal, returned as a complex scalar or complex column. The output time-dependent signal is equal in size to the input time-dependent signal.
Data Types: double
| single
Parameters
Main
Filter design method, specified as one of the following:
Butterworth
Chebyshev
Inverse Chebyshev
Filter response type, specified as one of the following:
Lowpass
— Simulates a lowpass filter type with the design specified in Design method.Highpass
— Simulates a highpass filter type with the design specified in Design method.Bandpass
— Simulates a bandpass filter type with the design specified in Design method.Bandstop
— Simulates a bandstop filter type with the design specified in Design method.
Select this parameter to implement the filter order manually.
Filter order, specified as a integer greater than 2
. If you
set Filter design to Lowpass
or
Highpass
, specify the number of lumped storage elements.
If you set Filter design to Bandpass
or Bandstop
, specify twice the number of lumped storage
elements.
Dependencies
To enable this parameter, select Implement using filter order.
Passband frequency for lowpass, highpass, and bandpass filter types, specified as a positive real scalar or positive ascending two-tuple vector in Hz. Based on the Filter Type, accepted value types and default values differ as follows.
Filter Type | Value Type | Default Values (Hz) |
---|---|---|
Lowpass | Positive real scalar | 1e9 |
Highpass | Positive real scalar | 2000000000 |
Bandpass | Positive ascending two-tuple vector | [2000000000 3000000000] |
Dependencies
To enable this parameter, set Filter type to
Lowpass
, Highpass
, or
Bandpass
.
Passband attenuation of the filter, specified as a positive real scalar in dB. For bandpass filters, this value is applied equally to both edges of the passband.
Dependencies
To enable this parameter, set Filter type to
Lowpass
, Highpass
, or
Bandpass
.
Stopband frequencies for bandstop filters, specified as either a positive real scalar or positive ascending two-tuple vector in Hz. Based on the Filter Type and Implement using filter order parameters, accepted value types and default values differ as follows.
Filter Type | Value Type | Default Values (Hz) | To enable this parameter |
---|---|---|---|
Lowpass | Positive real scalar | 2000000000 | Set Filter type to
Lowpass and clear Implement using
filter order. |
Highpass | Positive real scalar | 1000000000 | Set Filter type to
Highpass and clear Implement using
filter order. |
Bandpass | Positive ascending two-tuple vector | [1500000000 3500000000] | Set Filter type to
Bandpass and clear Implement using
filter order. |
Bandstop | Positive ascending two-tuple vector | [2100000000 2900000000] | Set Filter type to
Bandstop and clear or select
Implement using filter order. |
Stopband attenuation, specified as a positive real scalar greater than the Passband attenuation (dB) value in dB.
Dependencies
To enable this parameter, you can either:
Set Filter type to
Lowpass
,Highpass
, orBandpass
and clear Implement using filter order.Set Filter type to
Bandstop
, select Implement using filter order.
Center of the signal bandwidth with respect to the filter transfer function, specified as a positive real scalar in Hz. The signal bandwidth is .
Type of simulation to run, specified as one of the following:
Interpreted execution
— Simulate the model using the MATLAB® interpreter. This option shortens the startup time, but the speed of the subsequent simulations is slower than when you use theCode generation
option. Use this mode to debug the source code of the block.Code generation
— Simulate the model using generated C code. The first time you run a simulation, Simulink® generates C code for the block. The C code is reused for subsequent simulations as long as the model does not change. This option requires additional startup time, but the speed of the subsequent simulations is faster than when you use theInterpreted execution
option.
Modeling
Modeling domain, specified as one of the following:
Time (Fixed step)
— Model using fixed-step solvers (NDF2
,Trapezoidal
, andBackward Euler
)Time(Continuous)
— Model using continuous or stiff solvers (ode15s
,ode23s
,ode23t
, andode23tb
)Frequency (Digital filter)
— model using a 1-D digital filter.
Fixed-step and continuous time-domain solvers, specified as one of the following:
Fixed-step Solvers
NDF2
— Balance narrowband and wideband accuracy. This solver is suitable for situations where the frequency content of the signals in the system is unknown relative to the Nyquist rate.Trapezoidal
— Perform narrowband simulations. Frequency warping and the lack of damping effects make this method inappropriate for most wideband simulations.Backward Euler
— Simulate the largest class of systems and signals. Damping effects make this solver suitable for wideband simulation, but overall accuracy is low.
Continuous Solvers
ode15s
— Solve stiff differential equations and DAEs using a variable order methodode23s
— Solve stiff differential equations using a low-order methodode23t (trap)
— Solve moderately stiff ODEs and DAEs using a trapezoidal ruleode23tb (trap+BE)
— Solve stiff differential equations using a trapezoidal rule and backward differentiation formula
Dependencies
To enable:
Fixed-step time-domain solvers, set Modeling domain to
Time (Fixed step)
.Continuous time-domain solvers, set Modeling domain to
Time (Continuous)
.
Filter length of the 1-D digital filter or impulse response duration, specified as a real positive integer.
Dependencies
To set this parameter, set Modeling domain to
Frequency (Digital filter)
.
Visualization
Plot type of the first plot, specified as one of the following:
S21
Phase delay
Group delay
Impulse response
Step response
Input arguments to plot the impulse response, specified as a two-element vector.
Plot the impulse response by specifying the sample time of the input signal and the
number of samples in this parameter. For more information, see impulse
.
Dependencies
To set this parameter, set First plot type or
Second plot type to Impulse
response
.
Input arguments to plot the step response, specified as a three-element vector.
Plot the step response by specifying the sample time of the input signal, the number
of samples, and the amount of time required for the step signal to reach the maximum
value in this parameter. For more information, see stepresp
.
Dependencies
To set this parameter, set First plot type or
Second plot type to Step
response
.
Y-axis units of the first plot, specified as one of the following:
Magnitude (dB)
Magnitude (linear)
Angle (degrees)
Real
Imaginary
Dependencies
To set this parameter, set First plot type to
S21
.
Plot type of the second plot, specified as one of the following:
None
S21
Phase delay
Group delay
Impulse response
Step response
Y-axis units of the second plot, specified as one of the following:
Magnitude (dB)
Magnitude (linear)
Angle (degrees)
Real
Imaginary
Dependencies
To set this parameter, set Second plot type to
S21
.
Frequency points to plot the S-parameter data, specified as a positive real vector in Hz.
Select this parameter to plot your data on a linear or logarithmic X-axis scale.
Specify Linear
or
Logarithmic
.
Select this parameter to plot your data in a linear or logarithmic Y-axis scale.
Specify Linear
or
Logarithmic
.
Select this button to plot the characteristics of the S-parameters data.
Algorithms
The software calculates the discrete FIR filter coefficients using the RF frequency (Hz) and FIR filter length parameters and the transfer function specified using the derived filter poles and zeros.
The following steps are followed to determine the Discrete FIR Filter block direct form coefficients:
Determine the frequency points contained in the bandwidth centered around the carrier frequency using this formula.
Use the
rffilter
object and its functions to determine the rational analog filter transfer function from the mask parameters in [z,p,k] form.Determine transfer function values for the frequency points in step one using this formula.
Determine the discrete FIR filter coefficients using this formula.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version History
Introduced in R2023aThe following in the Filter block in the idealized baseband library have been renamed:
Parameter Name Before R2024b | Parameter Name Since R2024b |
---|---|
Carrier frequency (Hz) | RF frequency (Hz) |
The following parameter values in the Filter block in the idealized baseband library have been changed.
Parameter | Values Before R2024b | Values Since R2024b |
---|---|---|
Modeling domain | Time domain (Fixed step) | Time (Fixed step) |
Time domain (Continuous) | Time (Continuous) | |
Frequency domain (Digital filter) | Frequency (Digital filter) |
When you open a model created before R2024b containing the S-parameters block, the software replaces the parameter names and values as shown in the table.
Starting in R2023a, the idealized baseband Filter block replaces the Lowpass RF Filter, Highpass RF Filter, Bandpass RF Filter, and Bandstop RF Filter blocks.
When you open a model created before R2023a containing the Lowpass RF Filter, Highpass RF Filter, Bandpass RF Filter, and Bandstop RF Filter Filter blocks, the software replace the old blocks with the new idealized baseband Filter block.
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: United States.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)