# stabilityk

Stability factor K of 2-port network

## Syntax

```[k,b1,b2,delta] = stabilityk(s_params) [k,b1,b2,delta] = stabilityk(hs) ```

## Description

`[k,b1,b2,delta] = stabilityk(s_params)` calculates and returns the stability factor, `k`, and the conditions `b1`, `b2`, and `delta` for the 2-port network. The input `s_params` is a complex 2-by-2-by-M array, representing M 2-port S-parameters.

`[k,b1,b2,delta] = stabilityk(hs)` calculates and returns the stability factor and stability conditions for the 2-port network represented by the S-parameter object `hs`.

## Examples

collapse all

Examine the stability of network data from a file. Calculate stability factor and conditions

```ckt = read(rfckt.passive,'passive.s2p'); s_params = ckt.NetworkData.Data; freq = ckt.NetworkData.Freq; [k,b1,b2,delta] = stabilityk(s_params);```

Check stability criteria

```stability_index = (k>1)&(abs(delta)<1); is_stable = all(stability_index)```
```is_stable = logical 1 ```

List frequencies with unstable S-parameters

`freq_unstable = freq(~stability_index)`
```freq_unstable = 0x1 empty double column vector ```

## Algorithms

Necessary and sufficient conditions for stability are `k`>`1` and `abs(delta)`<`1`. `stabilityk` calculates the outputs using the equations

`$\begin{array}{c}K=\frac{1-{|{S}_{11}|}^{2}-{|{S}_{22}|}^{2}+{|\Delta |}^{2}}{2|{S}_{12}{S}_{21}|}\\ {B}_{1}=1+{|{S}_{11}|}^{2}-{|{S}_{22}|}^{2}-{|\Delta |}^{2}\\ {B}_{2}=1-{|{S}_{11}|}^{2}+{|{S}_{22}|}^{2}-{|\Delta |}^{2}\end{array}$`

where:

• S11, S12, S21, and S22 are S-parameters from the input argument `s_params`.

• Δ is a vector whose members are the determinants of the M 2-port S-parameter matrices:

`$\Delta ={S}_{11}{S}_{22}-{S}_{12}{S}_{21}$`

The function performs these calculations element-wise for each of the M S-parameter matrices in `s_params`.

## References

Gonzalez, Guillermo, Microwave Transistor Amplifiers: Analysis and Design, 2nd edition. Prentice-Hall, 1997, pp. 217–228.