# The Analog Dog

### Site Tools

lcr_guitar

This is an old revision of the document!

# The LCR Guitar

The LCR Guitar is a musical instrument based on the physics of second order systems. A second order system has two energy storage elements, and can be described by second order differential equations. Two textbook examples of second order systems are the mass spring system and the LCR (Inductor-Capacitor-Resistor) circuit. In the mass spring system, energy is stored in the elasticity of the spring and as inertia in the mass. In the LCR circuit, energy is stored in the electric field of the capacitor and the magnetic field of the inductor. Second order systems allow for oscillations which enables their use as a musical instrument.

Instead of creating the instrument from individual LCR circuits each tuned to a particular note, this project will use analog computing techniques to simulate the physics of the circuit. The analog computing circuit has a number of advantages over the straight LCR circuit approach, including eliminating the need for bulky inductors, and allowing for both the pitch and the decay to be changed using only resistors.

## Circuit Theory

The above schematic is of the parallel RLC circuit which we plan to simulate using analog computing techniques to make a musical instrument.

Follow this link for a complete analysis of the LCR circuit.

The circuit is characterized by the following second order differential equation.

$\frac{d^2v_{OUT}}{dt^2} + \frac{1}{RC}\frac{dv_{OUT}}{dt} + \frac{1}{LC}v_{OUT}=0$

To make the variables more recognizable, typically the equation is written in the following form:

$\frac{d^2v_{OUT}}{dt^2} + 2\alpha \frac{dv_{OUT}}{dt} + w_o^2 v_{OUT}=0$

with the new variables defined as:

$\alpha=\frac{1}{2RC}$ $w_o=\sqrt{\frac{1}{LC}}$

The frequency of oscillation is given by:

$w_d=\sqrt{w_o^2-\alpha^2}$

In this particular application, $\alpha$ is much smaller than $w_o$, so the frequency of oscillation is given by $w_o$. $\alpha$ controls the decay of the note.

## Music Theory

### Basics

Sounds can be characterized by their pitch, loudness, and timbre.

Pitch is simply the frequency of oscillation of a sound. The faster a wave oscillates the higher the frequency and therefore the pitch. The pitch of the LCR guitar will be controlled with the $w_o$ variable above.

Loudness is related to the amplitude of the wave, the higher the amplitude, the louder the sound is. Typically the amplitude must be increase 10x for our ears to hear a 2x difference in sound. In this circuit the loudness is controlled by the audio amplifier, but could also be controlled by the initial conditions on the circuit.

Timbre is all the other characteristics of a sound that let us distinguish between sounds that have the same pitch and loudness. Timbre is what makes one instrument sound different from another and really what makes sounds interesting to the ear. Timbre is defined by harmonic content, attack and decay, and vibrato. Harmonic content is the spectrum of frequencies in a sound besides the main note. Attack and Decay is how fast loudness of a sound increases or decreases when played. If you pluck a string on a guitar, the sound is loudest almost immediately, but takes some time to decay. In the LCR Guitar circuit, the attack will be instant and the decay will be controlled by the $\alpha$ parameter. The definition of vibrato is “periodic changes in the pitch of the tone”, and the term tremolo is used to indicate periodic changes in the amplitude or loudness of the tone. The initial version of the LCR guitar, will not include vibrato.

### Scales

Equal temperament or the equal tempered scale is the most commonly used scale today.

Between each octave, the frequency doubles. For instance, between the two C notes on the piano the frequency doubles.

Each octave is divided into 12 equal semitones. That means each note is spaced apart by a factor of $2^{\frac{1}{12}}$ or $\approx 1.059$x.

Let's compute the frequency of the notes in one octave. Let's start with the open low E string of a guitar E = 82.4Hz

• E = 82.4Hz = 517.73 rad/s
• F = 87.3Hz = 548.52 rad/s
• F# = 92.5Hz = 581.14 rad/s
• G = 98Hz = 615.7 rad/s
• G# = 103.8Hz = 652.3 rad/s
• A = 110Hz = 691.1 rad/s
• A# = 116.5Hz = 732.2 rad/s
• B = 123.5Hz = 775.7 rad/s
• C = 130.8Hz = 821.85 rad/s
• C# = 138.6Hz = 870.72 rad/s
• D = 146.8Hz = 922.5 rad/s
• D# = 155.6Hz = 977.4 rad/s
• E= 164.8Hz = 1035.5 rad/s

## Analog Computer Simulation of LCR Circuit

The block diagram for the second order system / analog computer is shown below.

The block diagrams can be translated into differential equations:

$\frac{d^2v}{dt^2} = -G_1 K_1 \frac{dv}{dt} + - G_1 G_2 K_2 V$

or

$\frac{d^2v}{dt^2} + G_1 K_1 \frac{dv}{dt} + G_1 G_2 K_2 V=0$

Putting the equation into standard form yields:

$\alpha=\frac{G_1K_1}{2}$ $w_o=\sqrt{G_1 G_2 K_2}$

What should $K_2$ be to have a frequency of 82.4Hz / 517.73 rads/s? Assume $G_1$ and $G_2$ are 1000. Then plugging into the above formula, we get $K_2$=0.268.

We want $\alpha$ to be around 4. That makes $K_1=0.004$

## KiCAD Board

lcr_guitar.1454798225.txt.gz · Last modified: 2016/02/06 17:37 by admin