# abcd2s

Convert ABCD-parameters to S-parameters

## Syntax

``s_params = abcd2s(abcd_params,z0)``

## Description

example

````s_params = abcd2s(abcd_params,z0)` converts the ABCD-parameters `abcd_params` into the scattering parameters `s_params`. `z0` is the reference impedance; its default is 50 ohms. `s_params` is a complex 2N-by-2N-by-M array, where M representing number of frequency points of a 2N-port S-parameters.For more information see, RF Network Parameter Objects.```

## Examples

collapse all

Define a matrix of ABCD-parameters.

```A = 0.999884396265344 + 0.000129274757618717i; B = 0.314079483671772 + 2.51935878310427i; C = -6.56176712108866e-007 + 6.67455405306704e-006i; D = 0.999806365547959 + 0.000247230611054075i; abcd_params = [A,B; C,D]```
```abcd_params = 2×2 complex 0.9999 + 0.0001i 0.3141 + 2.5194i -0.0000 + 0.0000i 0.9998 + 0.0002i ```

Convert these ABCD parameters to S-parameters.

`s_params = abcd2s(abcd_params)`
```s_params = 2×2 complex 0.0038 + 0.0248i 0.9961 - 0.0250i 0.9964 - 0.0254i 0.0037 + 0.0249i ```

## Input Arguments

collapse all

The `abcd_params` input is a complex 2N-by-2N-by-M array, where M representing number of frequency points of a 2N-port ABCD-parameters.

The function assumes that the ABCD-parameter matrices have distinct A, B, C, and D submatrices:

`$\left[\begin{array}{cc}\left[A\right]& \left[B\right]\\ \left[C\right]& \left[D\right]\end{array}\right]$`

Reference impedance in ohms, specified as one of the following:

• Positive real scalar when you want to specify the same the reference impedance for all ports in the network.

• Positive real vector of length N when you want to specify a different reference impedance for each port in the N-port network. (since R2023a)

• Positive real vector of length K when you want to specify a different reference impedance for each in the K frequencies in the data. (since R2023a)

If the reference impedance is a vector and the number of ports N equals the number of data frequencies K, N == K, then the `sparameters` object will assign each element of the vector to each port of the network. To specify reference impedances for each frequency in this case, specify `Z0` as a 3-D vector of length 1-by-1-by-K .

## Output Arguments

collapse all

2N-port S-parameters, returned as a 2N-by-2N-by-M array of complex numbers, where M representing number of frequency points of a 2N-port S-Parameters.

 Pozar, David M. Microwave Engineering. 3rd ed, J. Wiley, 2005.