An open API service indexing awesome lists of open source software.

https://github.com/frankih9/planar_baluns

Python script to draw GDS cells of planar baluns
https://github.com/frankih9/planar_baluns

balun electromagnetic-simulation gds interleaved-baluns planar-baluns rf rfic transformer

Last synced: 12 months ago
JSON representation

Python script to draw GDS cells of planar baluns

Awesome Lists containing this project

README

          

# Planar Baluns

- [Introduction](#introduction)
* [Balun decomposition](#balun-Decomposition)
- [Balun parts](#balun-parts)
* [Crossovers](#crossovers)
- [Graph representation of baluns](#graph-representation-of-baluns)
* [Key observations of the graph representation](#key-observations-of-the-graph-representation)
- [Common balun topologies](#common-balun-topologies)
* [_X_ crossover](#_x_-crossover)
* [_XX_ crossover](#_xx_-crossover)
* [_XI_ crossover](#_xi_-crossover)
- [Python scripts](#python-scripts)
* [Requirements](#requirements)
* [Script outputs](#script-outputs)

## Introduction

Shown here is an example of a 1:2 planar balun. The red and blue represent two unique metal layers and the cyan represents their via.
A complete balun might require additional capacitors to 'tune' the balun to the intended frequency. There will be no additional discussion on the
electrical behavior of the balun. Other then that the turn ratios mentioned here are only to account for the physical turns, and will not always
give the same expected electrical effect.

alt text

### Balun Decomposition
The balun shown above can be decomposed into a primary winding and a secondary winding.
These are shown respectively from left to right.

alt text

___

## Balun parts
Just so we are on the same page, the naming convention used for the various parts of the balun is shown here.
In all the balun figures, only the secondary center-tap is shown.

alt text|alt text
:---:|:---:
_Tracks_|_Ports_

alt text|alt text
:---:|:---:
_Crossovers_|Secondary _Center-tap_

### Crossovers
The various crossover structures are further broken down below, along with their naming convention.
To preserve balun symmetry, only symmetrical crossovers such as _-_, _X_, _XX_, and _Asterisk_
can be placed along the y-axis or the axis of the ports.
This here, is definitely not an exhaustive collection of crossovers.

alt text|alt text|alt text
:---:|:---:|:---:
_Jumper_ or _-_|_X_|_XX_

alt text|alt text|alt text
:---:|:---:|:---:
unnamed|_XI_|*_Asterisk_

##### *Note on the _Asterisk_:
Care is needed for the expansion of connections of this structure.
As more connections are added, more metal layers are needed, and the structure approaches the following:
asshole

___

## Graph representation of baluns
So far, we have only dealt with the physical layout of the balun.
We can represent the balun in graph form with vertices and edges to ease their analysis and synthesis.
We start by replacing the tracks with vertices and the crossovers with edges.
Then we utilize the symmetry and fold the vertices and edges about the y-axis. These steps are illustrated below.

alt text|alt text
:---:|:---:
Balun with vertices and edges superimposed|Graph representation

### Key observations of the graph representation
Some somewhat obvious observations/rules are listed below.

|Graph with emphasized portion in red|Notes|
|---|:---:|
|alt text|These vertices with a single edge are the ports.|
|alt text|These vertices with a self loop are the center-tap locations.|
|alt text|The upper row and lower row form two sets. With the exception of the port vertices, each vertex has exactly one edge to each set.|
|alt text|These connected vertices form a path that is the secondary winding. The number of vertices in a set along a path is the number of turns in that winding.|

**_Believe it or not, this graph representation simplifies analysis and synthesis of planar baluns._**

___

## Common balun topologies
### _X_ crossover
This class of balun is generally used as a 1:1 balun. Although ratios such as 1:2 can be realized,
the distribution of the tracks may not result in a good electrical 1:2.
The center-tap location is at the inner most winding, this may be inconvenient to access.
Some examples are shown below:

alt text|alt text
:---:|:---:
1 Turn 1:1 Layout|1 Turn 1:1 Graph

alt text|alt text
:---:|:---:
2 Turn 1:1 Layout|2 Turn 1:1 Graph

alt text|alt text
:---:|:---:
3 Turn 1:1 Layout|3 Turn 1:1 Graph

alt text|alt text
:---:|:---:
3:5 Turn Layout|3:5 Turn Graph

### _XX_ crossover
This class of balun is probably best used as a 1:1 balun. Although ratios such as 1:2 can be realized, the distribution of the tracks may not result in a good electrical 1:2.
The center-tap location can be chosen on the second outermost winding. This is a convenient location and can be accessed without vias.
The minimum turns is 2. Also, for non 1:1 ratios, the turns on each winding must be even.

alt text|alt text
:---:|:---:
2 Turn 1:1 Layout|2 Turn 1:1 Graph

alt text|alt text
:---:|:---:
3 Turn 1:1 Layout|3 Turn 1:1 Graph

alt text|alt text
:---:|:---:
4 Turn 1:1 Layout|4 Turn 1:1 Graph

alt text|alt text
:---:|:---:
4:6 Turn Layout|4:6 Turn Graph

### _XI_ crossover
This class of balun is probably best used as a 1:2 balun. Although ratios such as 1:1 can be realized, the distribution of the tracks may not result in a good electrical 1:1.
The center-tap location for one winding can be chosen on the second outermost winding.
See the docstring in Balun_XI_Example for turn ratio limitations.

alt text|alt text
:---:|:---:
1:2 Turn Layout|1:2 Turn Graph

alt text|alt text
:---:|:---:
2:4 Turn Layout|2:4 Turn Graph

alt text|alt text
:---:|:---:
2:4 Turn Non-Expandable Layout|2:4 Turn Non-Expandable Graph

alt text|alt text
:---:|:---:
4 Turn 1:1 Layout|4 Turn 1:1 Graph

___

## Python scripts (updated for gdspy 1.6.12)
The motivation for these scripts is to simplify the generation of these complex structures for electromagnetic simulations.
There are probably infinite ways to realize these types of baluns. Three of which are explicated with the example scripts.

### Requirements
* [Python 3.x](http://www.python.org/)
* [Gdspy 1.6.12](https://github.com/heitzmann/gdspy)

### Script outputs

```sh
python3 Balun_X_Example.py
```
alt text

```sh
python3 Balun_XX_Example.py
```
alt text

```sh
python3 Balun_XI_Example.py
```
alt text