{"id":15145387,"url":"https://github.com/frankih9/planar_baluns","last_synced_at":"2025-07-23T08:37:35.691Z","repository":{"id":183615890,"uuid":"138830826","full_name":"frankih9/Planar_Baluns","owner":"frankih9","description":"Python script to draw GDS cells of planar baluns","archived":false,"fork":false,"pushed_at":"2022-07-03T08:13:57.000Z","size":3874,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-09-27T11:23:58.273Z","etag":null,"topics":["balun","electromagnetic-simulation","gds","interleaved-baluns","planar-baluns","rf","rfic","transformer"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frankih9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-06-27T04:47:48.000Z","updated_at":"2024-07-19T18:39:18.000Z","dependencies_parsed_at":"2023-07-25T06:44:04.922Z","dependency_job_id":null,"html_url":"https://github.com/frankih9/Planar_Baluns","commit_stats":null,"previous_names":["frankih9/planar_baluns"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankih9%2FPlanar_Baluns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankih9%2FPlanar_Baluns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankih9%2FPlanar_Baluns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankih9%2FPlanar_Baluns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frankih9","download_url":"https://codeload.github.com/frankih9/Planar_Baluns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219867315,"owners_count":16555821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["balun","electromagnetic-simulation","gds","interleaved-baluns","planar-baluns","rf","rfic","transformer"],"created_at":"2024-09-26T11:24:17.509Z","updated_at":"2024-10-10T00:40:41.266Z","avatar_url":"https://github.com/frankih9.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Planar Baluns\n\n- [Introduction](#introduction)\n  * [Balun decomposition](#balun-Decomposition)   \n- [Balun parts](#balun-parts)\n  * [Crossovers](#crossovers)\n- [Graph representation of baluns](#graph-representation-of-baluns)\n  * [Key observations of the graph representation](#key-observations-of-the-graph-representation)\n- [Common balun topologies](#common-balun-topologies)\n  * [_X_ crossover](#_x_-crossover)\n  * [_XX_ crossover](#_xx_-crossover)\n  * [_XI_ crossover](#_xi_-crossover)  \n- [Python scripts](#python-scripts)\n  * [Requirements](#requirements)\n  * [Script outputs](#script-outputs)\n    \n## Introduction \n\nShown 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. \nA complete balun might require additional capacitors to 'tune' the balun to the intended frequency.  There will be no additional discussion on the \nelectrical behavior of the balun.  Other then that the turn ratios mentioned here are only to account for the physical turns, and will not always \ngive the same expected electrical effect.   \n\n\u003cimg src=\"Balun_Images/6T-2-1A2-1.png\" alt=\"alt text\" width=600\u003e\n\n### Balun Decomposition \nThe balun shown above can be decomposed into a primary winding and a secondary winding. \nThese are shown respectively from left to right.\n\n\u003cimg src=\"Balun_Images/6T-2-1_split_A2-1.png\" alt=\"alt text\" \u003e\n\n___\n\n## Balun parts \nJust so we are on the same page, the naming convention used for the various parts of the balun is shown here.\nIn all the balun figures, only the secondary center-tap is shown.\n\n\u003cimg src=\"Balun_Images/6T-2-1B2-1.png\" alt=\"alt text\"\u003e|\u003cimg src=\"Balun_Images/6T-2-1D2-1.png\" alt=\"alt text\"\u003e\n:---:|:---:\n_Tracks_|_Ports_\n\n\u003cimg src=\"Balun_Images/6T-2-1C2-1.png\" alt=\"alt text\"\u003e|\u003cimg src=\"Balun_Images/6T-2-1E2-1.png\" alt=\"alt text\"\u003e\n:---:|:---:\n_Crossovers_|Secondary _Center-tap_\n\n### Crossovers \nThe various crossover structures are further broken down below, along with their naming convention. \nTo preserve balun symmetry, only symmetrical crossovers such as _-_, _X_, _XX_, and _Asterisk_ \ncan be placed along the y-axis or the axis of the ports. \nThis here, is definitely not an exhaustive collection of crossovers.\n\n\u003cimg src=\"Balun_Images/XO_-_2.png\" alt=\"alt text\"\u003e|\u003cimg src=\"Balun_Images/XO_1x_2.png\" alt=\"alt text\"\u003e|\u003cimg src=\"Balun_Images/XO_2x_2.png\" alt=\"alt text\"\u003e\n:---:|:---:|:---:\n_Jumper_ or _-_|_X_|_XX_\n\n\u003cimg src=\"Balun_Images/XO_2x2_2.png\" alt=\"alt text\"\u003e|\u003cimg src=\"Balun_Images/XO_3x_2.png\" alt=\"alt text\"\u003e|\u003cimg src=\"Balun_Images/XO_3x-_2.png\" alt=\"alt text\"\u003e\n:---:|:---:|:---:\nunnamed|_XI_|*_Asterisk_\n\n##### *Note on the _Asterisk_:\nCare is needed for the expansion of connections of this structure. \nAs more connections are added, more metal layers are needed, and the structure approaches the following:  \n\u003cimg src=\"Balun_Images/BOC.jpg\" alt=\"asshole\" width=80\u003e \n\n___\n\n## Graph representation of baluns \nSo far, we have only dealt with the physical layout of the balun. \nWe can represent the balun in graph form with vertices and edges to ease their analysis and synthesis. \nWe start by replacing the tracks with vertices and the crossovers with edges. \nThen we utilize the symmetry and fold the vertices and edges about the y-axis.  These steps are illustrated below.\n\n\u003cimg src=\"Balun_Images/6T-2-1F-1.png\" alt=\"alt text\" width=900\u003e|\u003cimg src=\"Balun_Images/6T-2-1G2-1.png\" alt=\"alt text\"\u003e\n:---:|:---:\nBalun with vertices and edges superimposed|Graph representation\n\n### Key observations of the graph representation \nSome somewhat obvious observations/rules are listed below.\n    \n|Graph with emphasized portion in red|Notes|\n|---|:---:|\n|\u003cimg src=\"Balun_Images/6T-2-1H-1.png\" alt=\"alt text\" width=1000\u003e|These vertices with a single edge are the ports.|\n|\u003cimg src=\"Balun_Images/6T-2-1I-1.png\" alt=\"alt text\" width=1000\u003e|These vertices with a self loop are the center-tap locations.|\n|\u003cimg src=\"Balun_Images/6T-2-1J-1.png\" alt=\"alt text\" width=1000\u003e|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.|\n|\u003cimg src=\"Balun_Images/6T-2-1K-1.png\" alt=\"alt text\" width=1000\u003e|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.|\n\n**_Believe it or not, this graph representation simplifies analysis and synthesis of planar baluns._**\n\n___\n\n## Common balun topologies\n### _X_ crossover\nThis class of balun is generally used as a 1:1 balun.  Although ratios such as 1:2 can be realized, \nthe distribution of the tracks may not result in a good electrical 1:2.\nThe center-tap location is at the inner most winding, this may be inconvenient to access.\nSome examples are shown below:\n\n\n\u003cimg src=\"Balun_Images/L_G_1T-1-1X-1.png\" alt=\"alt text\" width=600\u003e|\u003cimg src=\"Balun_Images/G_1T-1-1X-1.png\" alt=\"alt text\"\u003e\n:---:|:---:\n1 Turn 1:1 Layout|1 Turn 1:1 Graph\n\n\u003cimg src=\"Balun_Images/L_G_2T-1-1X-1.png\" alt=\"alt text\" width=600\u003e|\u003cimg src=\"Balun_Images/G_2T-1-1X-1.png\" alt=\"alt text\"\u003e\n:---:|:---:\n2 Turn 1:1 Layout|2 Turn 1:1 Graph\n\n\u003cimg src=\"Balun_Images/L_G_3T-1-1X-1.png\" alt=\"alt text\" width=600\u003e|\u003cimg src=\"Balun_Images/G_3T-1-1X-1.png\" alt=\"alt text\"\u003e\n:---:|:---:\n3 Turn 1:1 Layout|3 Turn 1:1 Graph\n\n\u003cimg src=\"Balun_Images/SCI-106.png\" alt=\"alt text\" width=600\u003e|\u003cimg src=\"Balun_Images/G_SCI-106-1.png\" alt=\"alt text\"\u003e\n:---:|:---:\n3:5 Turn Layout|3:5 Turn Graph\n\n### _XX_ crossover\nThis 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.  \nThe center-tap location can be chosen on the second outermost winding.  This is a convenient location and can be accessed without vias.\nThe minimum turns is 2.  Also, for non 1:1 ratios, the turns on each winding must be even. \n\n\u003cimg src=\"Balun_Images/L_G_2T-1-1XX-1.png\" alt=\"alt text\" width=600\u003e|\u003cimg src=\"Balun_Images/G_2T-1-1XX-1.png\" alt=\"alt text\"\u003e\n:---:|:---:\n2 Turn 1:1 Layout|2 Turn 1:1 Graph\n\n\u003cimg src=\"Balun_Images/L_G_3T-1-1XX-1.png\" alt=\"alt text\" width=600\u003e|\u003cimg src=\"Balun_Images/G_3T-1-1XX-1.png\" alt=\"alt text\"\u003e\n:---:|:---:\n3 Turn 1:1 Layout|3 Turn 1:1 Graph\n\n\u003cimg src=\"Balun_Images/L_G_4T-1-1XX-1.png\" alt=\"alt text\" width=600\u003e|\u003cimg src=\"Balun_Images/G_4T-1-1XX-1.png\" alt=\"alt text\"\u003e\n:---:|:---:\n4 Turn 1:1 Layout|4 Turn 1:1 Graph\n\n\u003cimg src=\"Balun_Images/L_G_4T-4-6XX-1.png\" alt=\"alt text\" width=600\u003e|\u003cimg src=\"Balun_Images/G_4T-4-6XX-1.png\" alt=\"alt text\"\u003e\n:---:|:---:\n4:6 Turn Layout|4:6 Turn Graph\n\n### _XI_ crossover\nThis 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.  \nThe center-tap location for one winding can be chosen on the second outermost winding. \nSee the docstring in Balun_XI_Example for turn ratio limitations.\n  \n\u003cimg src=\"Balun_Images/L_G_1-2XY-1.png\" alt=\"alt text\" width=600\u003e|\u003cimg src=\"Balun_Images/G_1-2XY-1.png\" alt=\"alt text\"\u003e\n:---:|:---:\n1:2 Turn Layout|1:2 Turn Graph\n\n\u003cimg src=\"Balun_Images/L_G_2-4XY_1-1.png\" alt=\"alt text\" width=600\u003e|\u003cimg src=\"Balun_Images/G_2-4XY_1-1.png\" alt=\"alt text\"\u003e\n:---:|:---:\n2:4 Turn Layout|2:4 Turn Graph\n\n\u003cimg src=\"Balun_Images/L_G_2-4XY_2-1.png\" alt=\"alt text\" width=600\u003e|\u003cimg src=\"Balun_Images/G_2-4XY_2-1.png\" alt=\"alt text\"\u003e\n:---:|:---:\n2:4 Turn Non-Expandable Layout|2:4 Turn Non-Expandable Graph\n\n\u003cimg src=\"Balun_Images/L_G_4-4XY-1.png\" alt=\"alt text\" width=600\u003e|\u003cimg src=\"Balun_Images/G_4-4XY-1.png\" alt=\"alt text\"\u003e\n:---:|:---:\n4 Turn 1:1 Layout|4 Turn 1:1 Graph\n\n___\n\n## Python scripts (updated for gdspy 1.6.12)\nThe motivation for these scripts is to simplify the generation of these complex structures for electromagnetic simulations.\nThere are probably infinite ways to realize these types of baluns. Three of which are explicated with the example scripts. \n\n### Requirements\n* [Python 3.x](http://www.python.org/) \n* [Gdspy 1.6.12](https://github.com/heitzmann/gdspy)\n\n### Script outputs\n\n```sh\npython3 Balun_X_Example.py\n```\n\u003cimg src=\"Balun_Images/Balun_X_Example.jpg\" alt=\"alt text\" \u003e\n\n```sh\npython3 Balun_XX_Example.py\n```\n\u003cimg src=\"Balun_Images/Balun_XX_Example.jpg\" alt=\"alt text\" \u003e\n\n```sh\npython3 Balun_XI_Example.py\n```\n\u003cimg src=\"Balun_Images/Balun_XI_Example.jpg\" alt=\"alt text\" \u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrankih9%2Fplanar_baluns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrankih9%2Fplanar_baluns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrankih9%2Fplanar_baluns/lists"}