]> permondes.de Git - Analog_Engine.git/blob - scripts/CompoundFunctions.LACE
Further examples of harmonic oscillation
[Analog_Engine.git] / scripts / CompoundFunctions.LACE
1 # CompoundFunctions.LACE
2 # collection of compound functions which can be realized with THAT
3
4 # Open Amplifier
5 define openamp (weight*: variable-1, …) -> output
6 isum (weight*: variable-1, …) -> output
7 connect (FB:) -> GND
8
9 # Division
10 define idivide (numerator, denominator) -> -quotient
11 openamp (numerator, product) -> -quotient
12 multiply (-quotient, denominator) -> product
13
14 # Integration extension
15 define iintegrate (weight*: variable-1, …, ic: variable-IC, limit: gt0) -> variable-n
16 iintegrate (weight*: variable-1, …) -> variable-n
17 diode (cat:variable-n) -> DA
18 connect (DA) -> sj
19 # diode and connect used to limit the result to values >0
20
21 # Building an additional integrator with the help of an openamp
22 define iintegrate.additional (variable) -> integral
23 openamp variable -> integral
24 connect SJ -> cp
25 capacitor.100nF (integral) -> cp
26 # NB: The 100 nF capacitor is available on a THAT. This capacitance corresponds to those of the SLOW settings. In order to use the standard time constant an external 1 nF capacitor has to be used.
27
28 # Summing extension
29 define isum (weight*: variable-1, …, /divisor) -> -result
30 isum (weight*: variable-1, …) -> -result
31 connect (-result, …) -> IN