Status Update – Matt (04/13/2019)

This week I continued to put the finishing touches on the circuit simulator. This included implementing the diode device model. As it turns out, this was a bit trickier than some other components supported by the circuit simulator, due to the fact that the current through a diode is a function that involves exponentials and several more parameters than a simple equation like Ohm’s Law for example. Ultimately, I took a set of parameters off of the data sheet for the diode used in the guitar pedal we’re trying to simulate, and based my model off of those. It wouldn’t be very hard to make it extensible to support a wide variety of different types of diodes (this is what SPICE does), but I think this may not be necessary for our project and I prefer to keep things simple until the need for a more complex solution arises.

Once the diode model was implemented, I tested it on a variety of circuits. A good example is the following circuit, which clips an input signal around 0.7V in both the positive and negative directions, as expected.

Other circuits tested include basic single diode circuits and more complex designs such as bridge rectifiers. Overall, it seems as though everything works pretty well. This should enable us to expand the audio effects we can simulate to include things that rely on clipping, which turns out to be a large portion of guitar pedal effects.

The only issue I noticed was that circuits that include diodes take several more iterations of Newton’s Method to converge to a solution than circuits that contain only resistors, capacitors, and inductors. Ultimately, I’m not too worried about this issue, as even complex rectifier circuits still ran plenty fast enough to process entire *.wav files sampled at 44 KHz in times far shorter than the length of the file, indicating that processing live audio should still be a possibility once the audio processor can support it.

The next step for me is to continue working on the transistor model, which is the last circuit element I plan to support. I started working on transistors this week, but haven’t really gotten much work done since Carnival began. After Carnival, I anticipate this will take me a couple more days and it should be possible to have a finished circuit simulator by the end of the week. After this, I’ll turn my attention to whatever work is unfinished, whether it be testing, helping with the front-end, or whatever else remains to be completed.

Leave a Reply

Your email address will not be published. Required fields are marked *