# skrf.network.Network.stability_circle

Network.stability_circle(target_port, npoints=181)[source]

Returns loci of stability circles for a given port (0 or 1). The network must have two ports. The center and radius of the load (here target_port=1) stability circle are calculated by the following equation [1].

\begin{align}\begin{aligned}C_{L} = \frac{(S_{22} - DS_{11}^*)^*}{|S_{22}|^{2} - |D|^{2}}\\R_{L} = |\frac{S_{12}S_{21}}{|S_{22}|^2 - |D|^{2}}|\\with\\D = S_{11} S_{22} - S_{12} S_{21}\end{aligned}\end{align}

Similarly, those of the source side (here target_port=0) are calculated by the following equations.

\begin{align}\begin{aligned}C_{S} = \frac{(S_{11} - DS_{22}^*)^*}{|S_{11}|^{2} - |D|^{2}}\\R_{S} = |\frac{S_{12}S_{21}}{|S_{11}|^2 - |D|^{2}}|\end{aligned}\end{align}
Parameters:
• target_port (int) – Specifies the port number (0 or 1) to calculate stability circles.

• npoints (int, optional) – The number of points on the circumference of the circle. More points result in a smoother circle, but require more computation. Default is 181.

Returns:

sc – Loci of stability circles in complex numbers

Return type:

numpy.ndarray (shape is npoints x f)

Example

>>> import skrf as rf
>>> import matplotlib.pyplot as plt


Create a two-port network object

>>> ntwk = rf.Network('fet.s2p')


Calculate the load stability circles for all the frequencies

>>> lsc = ntwk.stability_circle(target_port=1)


Plot the circles on the smith chart

>>> rf.plotting.plot_smith(s=lsc, smith_r=5, marker='o')
>>> plt.show()


Slicing the network allows you to specify a frequency

>>> lsc = ntwk['1GHz'].stability_circle(target_port=1)
>>> rf.plotting.plot_smith(s=lsc, smith_r=5, marker='o')
>>> plt.show()


References