Requires: SmartSpice & Smartview
Minimum Versions: SMARTSPICE 4.6.5.R
The input deck is an Operational amplifier circuit with .AC and .MEASURE analysis. Rubberband R11[res],R12[res] and R10[res] parameters to change the gain and “.param R_TUNE_FREQ” and “.param C_TUNE_FREQ” to change the frequency response.
The stages in starting rubberband functionality is initially to get reference slider
and reference waveform
then vary the slider
and get the new waveform
vs the reference to see the change in output for the given slider value.
Graphics

Input Files
rubberband_example_03.in
* OPAMP WIEN-BRIDGE OSCILATOR
* Rubberband parameters:
* R11[res], R12[res], R10[res] - gain, GAIN = (1 + (R11 + R12)/R10)
* .param R_TUNE_FREQ, .param C_TUNE_FREQ - frequency, F0 = 1 /(2 * Pi * R_TUNE_FREQ * C_TUNE_FREQ)
VTEST 40 0 AC 1
.PARAM R_TUNE_FREQ=10K
.PARAM C_TUNE_FREQ=16NF
R2 40 6 R_TUNE_FREQ
C2 6 3 C_TUNE_FREQ
R1 3 0 R_TUNE_FREQ
C1 3 0 C_TUNE_FREQ
* NON-INVERTING OPAMP
R10 0 2 10K
R11 2 5 18K
XOP 3 2 4 OPAMP1
* AMPLITUDE STABILIZATION
R12 5 4 5K
*D1 5 4 D1N914
*D2 4 5 D1N914
*
.model D1N914 D(Is=0.1p Rs=16 CJO=2p Tt=12n Bv=100 Ibv=0.1p)
*
* OPAMP MACRO MODEL, SINGLE-POLE
* connections: non-inverting input
* | inverting input
* | | output
* | | |
.SUBCKT OPAMP1 1 2 6
* INPUT IMPEDANCE
RIN 1 2 10MEG
* DC GAIN (100K) AND POLE 1 (100HZ)
EGAIN 3 0 1 2 100K
RP1 3 4 1K
CP1 4 0 1.5915UF
* OUTPUT BUFFER AND RESISTANCE
EBUFFER 5 0 4 0 1
ROUT 5 6 10
.ENDS
*
* ANALYSIS
.AC DEC 10 10 10MEG
.SAVE AC VM(4) VM(3) VP(3) V(3)
.MEASURE AC MAX_GAIN MAX VM(4)
.MEASURE AC FREQ_AT_MAX_GAIN AMAX VM(4)
.END