Main Content

S-parameters

Model RF complex baseband S-parameters in Simulink

Since R2023a

  • Idealized S-parameters block icon

Libraries:
RF Blockset / Idealized Baseband

Description

Use the Idealized Baseband S-parameter block to model RF complex baseband S-parameters in Simulink®. You can input your S-parameters as a Touchstone file, an sparameters object, or as a rational object. If you describe the S-parameters using a Touchstone file or an sparameters object, the software uses rational fitting to derive a rational object. You can also model your S-parameters data in either the time or frequency domain and plot the S-parameters characteristics.

If you want to design S-parameters with impedance mismatches, use the Circuit Envelope S-Parameters block.

Ports

Input

expand all

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

expand all

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

expand all

Main

Data source to model RF complex baseband S-parameters, specified as one of the following:

  • Data file — Select this option to specify a Touchstone file with the extension .s2p. The block ignores noise and nonlinearity data in imported files.

  • S-parameters object — Select this option to specify an sparameters object.

  • Rational object — Select this option to specify a rational object.

Name of the two-port Touchstone file, specified as a character vector.

Dependencies

To enable this parameter, set Data source to Data file.

Select this parameter to use an sparameters object as the data source to model the S-parameters.

Dependencies

To enable this parameter, set Data source to S-parameters object.

Select this parameter to use a rational object as the data source to model the S-parameters.

Dependencies

To enable this parameter, set Data source to Rational object.

Carrier frequency at which the S-parameters are modeled, specified as a positive real scalar in Hz.

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 the Code 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 the Interpreted execution option.

Modeling

Modeling domain, specified as one of the following:

  • Time domain (Fixed step) — Model using fixed-step solvers (NDF2, Trapezoidal, and Backward Euler)

  • Time domain (Continuous) — Model using continuous or stiff solvers (ode15s, ode23s, ode23t, and ode23tb)

  • Frequency domain (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 method

  • ode23s — Solve stiff differential equations using a low-order method

  • ode23t (trap) — Solve moderately stiff ODEs and DAEs using a trapezoidal rule

  • ode23tb (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 domain (Fixed step).

  • Continuous time-domain solvers, set Modeling domain to Time domain (Continuous).

Rational fit fitting options to control the complex frequency-dependent data fitting process, specified as Share all poles, Fit individually, or Share poles by columns.

Dependencies

To set this parameter, set Data source to either Data file or S-parameters object.

Rational fit fitting arguments to control the fit, specified as a cell array.

Dependencies

To set this parameter, set Data source to either Data file or S-parameters object.

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 domain (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.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2023a