College of Engineering
Computer Engineering Department
BS in Computer Engineering
Genetic Algorithm Amplifier Biasing System (GAABS) - Senior Project Analysis
Summary of Functional Requirements
This project integrates LTSpice with a python script that runs a genetic algorithm to bias a differential amplifier. The system biases the amplifier with 2 different voltages, the base voltage for the PNP BJTs of the active loads and a voltage controlling the current of the current sink. The project runs via a python script, gets data from LTSpice’s command line call, and iteratively runs until the system is biased to achieve the greatest gain on an arbitrary input voltage.
Some of the main challenges associated with this project are going to be the getting the genetic algorithm to work consistently and getting LTSpice to integrate well with command line. The genetic algorithm, though controlled, will have a good deal of randomness involved with converging to a certain gain value. A strong genetic algorithm should be able to converge to the same value every time and should be designed accordingly. Having never experienced using LTSpice via command line, but it shouldn’t be too difficult to call. Collecting data from the simulation will be challenging, but ideally there would be resources for help on that portion.
The original estimated cost for components is $0, as all the software should be open source and free to download and access to a computer should be considered free. There is no hardware, as it’s all simulation, so there is nothing there to be purchased.
Bill of Materials
The total did end up being $0 as anticipated. Everything that could be downloaded was free to download.
The original time for development at the start of the project was anticipated being 100+ hours. Given the need to integrate everything and work to get the genetic algorithm working well, 100 hours seemed reasonable. In the end, it did end up taking roughly 80 hours. Having to try different approaches to the problem took up a lot of time and tweaking the genetic algorithm (and running the tests) took a long time, but the integration was easy to set up. The integration being easy shaved a large chunk of time off the projected time to complete the project.
This code is open source on GitHub, and won’t be manufactured on a commercial basis.
There are no environmental impacts associated with manufacturing. The only potential impact on the environment of this project would be the heat generated by a computer running the script. The script takes up to 30+ minutes to run, and it is somewhat intensive in terms of computing power; this would generate heat from the computer running it, and heat from computers cannot be neglected in terms of their effect on global warming. However, the heat that would be generated by 1 computer should be considered negligible, as there are much greater contributors.
As stated before, there are no issue with manufacturing this project because it’s open source. Everything needed to run the code can be found online for free download, and the script can be taken from online.
The code runs on Python 2.7 and the current version of LTSpice. It should have no issue running on later versions of Python and LTSpice, so long as there are no drastic changes. The project is on the internet, and so it will be sustainably existing as long as it’s not taken down by GitHub. Upgrades that would improve the design of the project include running more children per generation in simulation at once to speed up runtime and taking more generations to come to the best bias voltages to make it more accurate.
There is no ethical implication to the use or design of this project.
Health and Safety
Other than long term computer use’s impact on a user, there are no health and safety concerns with this project whatsoever.
Social and Political
There are no social and political implications to the use or design of this project.
During the development of this project, I had to learn how to use Python on a much deeper level. My CPE 101 class was in Python, but that was winter quarter of 2015, and this project took place in the winter and spring of 2018. I remembered very little, but I got to see a lot of the functionality of python in terms of it being a great language for running scripts to work on a variety of applications across platforms. I had to research a lot on genetic algorithms and how to implement them, as that was a huge portion of this project.