Deriving the transfer function for a bridged t-network pt. 1

This post will derive the transfer function for a bridged t-network, expressed using impedances, and will be the first of a series of posts I’ll be making as I’m learning about, and working on, a design for an analog drum machine similar to that of the famous Roland machines.

The post will begin with a short background for why the bridged t-network in particular will be examined. Then, the derivation of the transfer function will be given, followed by a simulation of the circuit to validate that the derived expression is correct.

I. Background

In the service manual for the tr-808 drum machine, the following principal diagram for the basic pulse-triggered sound generator can be found:

tr808_sound_generator
Fig 1, representative bridged t-network schematic from tr-808 service manual

While the circuitry in the tr-808 is not as straight forward as in Fig 1, it is an excellent starting point for a study. By understanding the principal schematic, it creates the foundation for learning about the more complex and nuanced circuits in the actual hardware.

The sound generator consists of an operational amplifier (op-amp) and a feedback circuit consisting of the bridged t-network, which forms a bandpass filter with a high resonance. The filter acts as a damped oscillator (see Fig 2), and will self-oscillate at the resonance-frequency for a short time after being stimulated by an input-pulse. This is makes up the basic drum sound.

Fig 2, example of a damped oscillation

The circuit above (Fig 1) will be able to create a tom-like sound or a kick-like sound depending on the resonant frequency’s value, which is determined by the valeus of the circuit components.

II. Transfer function for the bridged t-network

The transfer function describes the relation between the components and the circuits’ behavior, and will be derived from the following diagram:

schematic
Fig 3, bridged t-network with currents labeled I1 and I2

The transfer function is an expression for the ratio between the output voltage  V_o and a given input voltage V_i:

\displaystyle \textrm{transfer function} = \frac{V_o}{V_i}

Deriving the transfer function from the schematic becomes a process of finding an expression for the output voltage as as a function of the input voltage, and factoring that expression.

The output voltage node and input voltage node are separated by the impedance Z_1. The current I_1 via Z_1 causes a voltage drop, so that the output voltage can be expressed by:

\displaystyle V_o=V_i-I_1 Z_1

I_1 can be expressed by introducing a common-voltage V_{com} at the junction between Z_2, Z_3 and Z_4:

\displaystyle I_1=\frac{V_i-V_{com}}{Z_1+Z_3}

To express the common-voltage we notice that Z_1, Z_2 and Z_3 form an equivalent resistor Z_{(1+3)//2} that together with Z_4 form a voltage divider with V_{com} as its output:

\displaystyle V_{com}=V_i \frac{Z_4}{Z_{tot}}

where the total impedance Z_{tot} is:

\displaystyle Z_{tot}=Z_{(1+3)//2}+Z_4

The current I_1 can now be rewritten as:

\begin{aligned} \displaystyle I_1 &= V_i \frac{1}{Z_1+Z_3}-V_{com}\frac{1}{Z_1+Z_3} \\[0.5em] \displaystyle &= V_i \frac{1}{Z_1+Z_3}-V_i\frac{Z_4}{Z_{tot}}\frac{1}{Z_1+Z_3} \\[0.5em] \end{aligned}

and then factored:

\begin{aligned} \displaystyle &= \frac{V_i}{Z_1+Z_3} (1-\frac{Z_4}{Z_{tot}}) \\[0.5em] \displaystyle &= \frac{V_i}{Z_1+Z_3} (\frac{Z_{tot}-Z_4}{Z_{tot}}) \\[0.5em] \displaystyle &= \frac{V_i}{Z_1+Z_3} (\frac{Z_{(1+3)//2}}{Z_{tot}}) \\[0.5em] \end{aligned}

By calculating the equivalent impedance Z_{(1+3)//2} and then Z_{tot}, the expression for the current can be made explicit:

\begin{aligned} \displaystyle Z_{(1+3)//2} &= \frac{(Z_1+Z_3)Z_2}{(Z_1+Z_3)+Z_2} \\[1em] \displaystyle Z_{tot} &= \frac{(Z_1+Z_3)Z_2}{(Z_1+Z_3)+Z_2}+Z4 \\[0.5em] &= \frac{(Z_1+Z_3)Z_2}{Z_1+Z_2+Z_3}+Z4\frac{(Z_1+Z_2+Z_3)}{(Z_1+Z_2+Z_3)} \\[0.5em] &= \frac{(Z_1+Z_3)Z_2+Z_4(Z_1+Z_2+Z_3)}{Z_1+Z_2+Z_3} \\[0.5em] \end{aligned}

The impedance-quotient then becomes:

\displaystyle \begin{aligned} \frac{Z_{(1+3)//2}}{Z_{tot}} &= \frac {\displaystyle \frac{(Z_1+Z_3)Z_2}{Z_1+Z_2+Z_3}} {\displaystyle \frac{(Z_1+Z_3)Z_2+Z_4(Z_1+Z_2+Z_3)}{Z_1+Z_2+Z_3}} \\[0.5em] &= \frac{(Z_1+Z_3)Z_2}{(Z_1+Z_3)Z_2+Z_4(Z_1+Z_2+Z_3)} \end{aligned}

The current I_1 can now be expressed with the known impedances as:

\begin{aligned} \displaystyle I_1 &= \frac{V_i}{Z_1+Z_3} (\frac{Z_{(1+3)//2}}{Z_{tot}}) \\[0.7em] \displaystyle &= \frac{V_i}{(Z_1+Z_3)} \frac{(Z_1+Z_3)Z_2}{(Z_1+Z_3)Z_2+Z_4(Z_1+Z_2+Z_3)} \\[0.7em] \displaystyle &= V_i \frac{Z_2}{(Z_1+Z_3)Z_2+Z_4(Z_1+Z_2+Z_3)} \\[0.7em] \end{aligned}

Finally, we can return to the output voltage expression, and factor out V_i:

\begin{aligned} \displaystyle V_o &= V_i-I_1 Z_1 \\[0.5em] \displaystyle &= V_i-V_i \frac{Z_2}{(Z_1+Z_3)Z_2+Z_4(Z_1+Z_2+Z_3)} Z_1 \\[0.5em] \displaystyle &= V_i \left(1-\frac{Z_1 Z_2}{(Z_1+Z_3)Z_2+Z_4(Z_1+Z_2+Z_3)}\right) \\[0.5em] \end{aligned}

and then calculate the difference inside the parentheses by expanding the leading 1-term:

\begin{aligned} \displaystyle &= V_i \frac{(Z_1+Z_3)Z_2+Z_4(Z_1+Z_2+Z_3)-Z_1 Z_2}{(Z_1+Z_3)Z_2+Z_4(Z_1+Z_2+Z_3)} \\[0.5em] \displaystyle &= V_i \frac{Z_1 Z_2+Z_2 Z_3 +Z_4(Z_1+Z_2+Z_3)-Z_1 Z_2}{(Z_1+Z_3)Z_2+Z_4(Z_1+Z_2+Z_3)} \\[0.5em] \displaystyle &= V_i \frac{Z_2 Z_3 +Z_4(Z_1+Z_2+Z_3)}{(Z_1+Z_3)Z_2+Z_4(Z_1+Z_2+Z_3)} \\[0.5em] \end{aligned}

With the original expression fully factorized, the transfer function can now be expressed:

\begin{aligned} \displaystyle \frac{V_o}{V_i} &= \frac{Z_2 Z_3 +Z_4(Z_1+Z_2+Z_3)}{(Z_1+Z_3)Z_2+Z_4(Z_1+Z_2+Z_3)} \\[0.5em] \end{aligned}

And the parenthesises expanded:

\begin{aligned} \displaystyle \frac{V_o}{V_i} &= \frac{Z_1 Z_4+Z_2 Z_3 +Z_2 Z_4+Z_3 Z_4}{Z_1 Z_2+Z_1 Z_4+Z_2 Z_3+Z_2 Z_4+Z_3 Z_4} \\[0.5em] \end{aligned}

The transfer function for the schematic has now been derived.

III. Validating the transfer function with a simulation

In order to validate that the transfer function is correct, it will be tested using resistive values and compared to the output from the simulation software PSpice.

A simple straight forward test is to simply define all the impedances to 1kΩ:

\begin{aligned} \displaystyle \frac{V_o}{V_i}(Z_i=1k) &= \frac{(1+1+1+1)k}{(1+1+1+1+1)k} = \frac{4k}{5k} = 0.8\\[0.5em] \end{aligned}

sim1
Fig 4, simulation result from PSpice for test 1

With the input voltage V_i set to 1V, the output voltage V_o is 0.8V as expected.

In order to make sure this isn’t just a fluke result, another set of test-values can be defined:

\begin{aligned} \displaystyle \frac{V_o}{V_i}(V_i=i k) &= \frac{(1\cdot4+2\cdot3 +2\cdot4+3\cdot4)k}{(1\cdot2+1\cdot4+2\cdot3+2\cdot4+3\cdot4)k}\\&=\frac{4+6+8+12}{2+4+6+8+12}=\frac{30}{32}=0.9375\end{aligned}

sim2
Fig 5, simulation result from PSpice for test 2

For this second test the result is also the expected one, with an input voltage V_i of 1 giving 937.5 mV output.

IV. Conclusion

A valid transfer function for the bridged t-network has been derived for impedances. In order to analyze its oscillation properties and bode diagram, those impedances need to be defined using resistors R and capacitors C.

This will be explored in the next part.

Advertisements

Using Sublime as external text editor for an IAR Embedded Workbench project

To use Sublime Text 3 as an external editor with IAR, simply go to Tools -> Options -> Editor -> External Editor -> select “Use External Editor”.

exteditor
Option configuration for external editor

Set Editor to the search path for sublime_text.exe

Use the arguments “$FILE_PATH$:$CUR_LINE$”. This enables IAR to open sublime at a specific line, which is useful when following an error or warning message.

error
Error message, with line number we want to visit
sublimeopen
Sublime editor opened at the line specified in the error message

That’s it! Now we can use Sublime as an external editor and preserve a quick and efficient workflow.

If you would like to switch back to using the internal editor, for instance when using the project indexer to find a function definition or a variable declaration, you can use the “keyboard shortcut”: alt + t -> o -> tab -> space -> enter.

This will take you to the options-menu, and given that the last thing you had viewed there was the external editor page, the tab will select the “use external editor” box. Space checks or unchecks this box, and enter commits the change.

Hello blog

This is the first post. I am sitting in a coffee shop in the national library. This blog is a way for me to chronicle things I make and write down technical details so I can remember them later. Hopefully some of these things will be useful for others as well. If you’re reading this, hello!