## Introduction

This site contains several articles on audio and general electronic circuit design. The first article describes an algorithm for the design of vented-box loudspeakers using a technique suitable for software implementation. The second deals with using the freeware programs LTspice and FreePCB together to design printed circuit boards. The third discusses the design of a popular kind of phono preamp circuit using active RIAA equalization. The fourth discusses some improvements to the publicly-available SPICE models for the ON Semiconductor MJL3281A and MJL1302A power transistors. Brief descriptions follow below.

## This Site Uses MathJax for MathML Equation Display

In order to get compatibility with as many browser types as possible, this site uses MathJax for rendering MathML equations. MathJax relies on JavaScript for its rendering, and is much slower than using a browser having native MathML support. Even when using browsers having native MathML support, the default behavior on sites using MathJax is to not use native MathML. Using Firefox, you can get faster page display by right-clicking on any equation and choosing "Math Setttings, Math Renderer, MathML". A better solution for Firefox is to install the MathJax Native MathML add-on, which forces native MathML rendering for all sites using MathJax. When using this add-on, you should disable two of its options: both "Disable MathJax mml2jax preprocessor" and "Fix MathJax NativeMML bugs" should be *unchecked*. This avoids a bug where, on some web sites, an error message pops up saying, "No PDK base URL could be detected. Asynchronous load of PDK requies a tp:baseUrl meta tag". For more information, see this discussion. If you use the Firefox native MathML support, follow the instructions on the Firefox MathML fonts page to prevent problems with ugly fonts that occur after the upgrade to Firefox 31.

## 1. Vented-Box Loudspeaker Design Including Conventional and Assisted Alignments of Arbitrary Order and Box Quality Factor

This article covers three topics in vented-box design. The first is a new algorithm for design with a given driver that allows any box quality factor to be specified. This eliminates the lookup procedure implied by the alignment charts and tables of the classic literature on the subject, replacing it with an algorithm that solves a single nonlinear equation in one unknown using conventional root-finding techniques. Using this procedure, one is no longer restricted to the discrete set of box quality factors imposed by the classic techniques.

The second is the extension of these techniques to assisted alignments of arbitrary order n. Thiele's notion of *alignment class* is extended to higher-order systems that require more than one class number to fully describe how the system transfer function is partitioned between the loudspeaker and external filter.

Finally, high-pass filtering techniques for reducing cone excursion below the box tuning frequency are explored. Some performance comparisons are made between assisted alignments and systems designed in the normal way with a high-pass filter added after the fact.

## 2. Using LTspice as a Schematic Capture Tool for FreePCB

The LTspice - FreePCB article shows how to use these two freeware programs together to design printed circuit boards. Using netlist export in LTspice, a netlist is created and imported into FreePCB. The default behavior of LTspice when assigning pin numbers to devices in the exported netlist often results in incorrect pin numbering. This in turn would result in an incorrect circuit board design if nothing were done to correct the problem. This article introduces the concept of "pin-swapping subcircuits" for SPICE. These pin-swapping subcircuits can be used together with user-created LTspice symbol files to fix the LTspice pin numbering problem. Once this is done, LTspice and FreePCB become a powerful and free set of tools for creating PCB designs from a working simulation.

## 3. Phono Preamp Design With Active Equalization

This article covers the design of a simple and popular active RIAA phono equalization circuit. The equations developed can also be used for the design of an inverse RIAA network used for lab testing of phono preamps. Emphasis is placed on a technique for allowing the designer to explicitly specify the time constant associated with what's normally considered an undesired zero of the circuit's transfer function. This zero causes a break frequency that's above the audio band in a proper design. The idea could be used to implement the controversial "Neumann time constant", or the frequency of the zero could be chosen so as to force the capacitor ratio to correspond to actual standard values. Methods for achieving the best possible equalization accuracy are presented. The impact of finite op-amp gain-bandwidth product and DC open-loop gain on RIAA equalization errors is quantified. A SPICE technique for isolating the effects of op-amp-induced errors from the total equalization errors is shown. A complete derivation of the design equations used is provided in an appendix. This derivation uses a Foster expansion approach not covered elsewhere in the literature.

## 4. Improved SPICE Models for MJL3281A and MJL1302A

These bipolar power transistors are very popular as output stage transistors for audio power amplifiers. The SPICE models currently available from ON Semiconductor for these devices do not yield simulated performance that matches the datasheet measurements very well for some parameters. This leads to misleading simulation results in many cases. At a typical quiescent current one would use for a power amplifier output stage design, the SPICE model for the MJL3281A shows a simulated f_{T} that's low by a factor of six. The MJL1302A model shows a simulated β that's low by a factor of two to three, depending on collector current. The article shows graphs of the discrepancies between simulated and measured data. New models are developed in the article and can be downloaded here. Detailed information of the model extraction process is presented. Graphs of the simulated f_{T}, β and other parameters for the newly-developed model are shown, demonstrating improved correlation with measured device parameters.

### A Note About SPICE

The power transistor SPICE article borrows heavily from the book *Semiconductor Device Modeling with SPICE* by Massobrio and Antognetti. That text contains a wealth of information about the equations used internally by SPICE to simulate device behavior. Such information is probably of most use to those writing simulator software or support tools. But there is also much insight to be gained by the end user in studying some of the SPICE modeling equations. Much of SPICE bipolar transistor modeling is related directly to device physics. But in its attempt to provide the most detailed information possible to software developers, Massobrio and Antognetti miss some opportunities to provide insight to the end user. I found that reading the text gave me a fuller understanding of the Early effect and the variation of f_{T} with collector current, but not until I had filled in some missing pieces. In the section of this site that describes how the model parameters were extracted, I have tried to pass on what I've learned about these two subjects to the reader. Looking at the Early effect from the perspective of the Gummel plots is especially thought-provoking. I have also attempted to fill in some missing information in the study of f_{T} behavior vs. collector current by first relating the behavior of h_{FE} vs. frequency to the hybrid-π model parameters. Then the hybrid-π model parameters are connected to the SPICE BJT model parameters to complete the picture.