Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Thursday, 6 August 2020

Matchable Loads from S-Parameters Defined Matching Networks

This post compares two different ways for finding the matchable loads \(Z_L^{'}\) that provide the desired impedance \(Z_G^{*}\) to the generator.

I will show the difference between two approaches, one rigorous and the other approximate, by using a set of S-parameters obtained by a black box network. The only requirement is that the black-box is linear, as the S-parameters requires linearity. For the curious, they are obtained from a binary weighted sweep of a lossy \(LL\) network composed of 1024 states in total from SimSmith.

Thursday, 19 December 2019

Tandem Directional Coupler: Circuit Theory Approach

This document discusses the analysis of an ideal “tandem” directional coupler using lumped element circuit theory.

A directional coupler is a four port device that is used to sample the forward and reflected wave in a transmission line. It is a key component of a VNA and can be used to measure power flowing in a transmission line, but it can have countless possible uses. Generally they are built using distributed elements structures, but there are also versions built using lumped elements.

The tandem directional coupler, or also tandem bridge, is one of those directional couplers that is built using a lumped element approach. This kind of directional coupler, famous for radio-hams, has inherently large bandwidth and can handle a lot of power. It is also well suited for low frequency scenarios, down to the kHz range. It is composed of two current transformers, or two transformers with a high turn ratio, and two termination resistors with the desired characteristic impedance \(Z_0\), which can be arbitrary but usually 50\(\Omega\).

Sunday, 9 July 2017

Python matplotlib: insets and aligned legends

Sometimes it is needed to create a plot with several lines and to assign a legend to each of them, which quite often ends in cumbersome and clunky legends. In my opinion, a more elegant way is include the legend as aligned text aside to each plot line, which is possible using Python and matplotlib.

Furthermore, to better highlight some details it is also possible to use an inset, hence to add a box which zooms a particular detail of the plot.

In the following is the Python code. The style is optimised for an IEEEtran journal.

Monday, 9 May 2016

Visually engaging periodic plots using Python

In order to obtain periodic images with a technical feel to be embedded in a website, I decided to compose them with Python and Matplotlib. The plots are essentially some sums and multiplications of "noisy" sines.