]> permondes.de Git - Analog_Engine.git/blob - scripts/CompoundFunctions.LACE
e2a7cef374340a89e68ffd0d6be7f3bfa2cf1931
[Analog_Engine.git] / scripts / CompoundFunctions.LACE
1 # collection of compound functions which can be realized with THAT
2
3 # Open Amplifier
4 define openamp (weight*: variable-1, …) -> output
5 isum (weight*: variable-1, …) -> output
6 connect (FB:) -> GND
7
8 # Division
9 define idivide (numerator, denominator) -> -quotient
10 openamp (numerator, product) -> -quotient
11 multiply (-quotient, denominator) -> product
12
13 # Integration extension
14 define iintegrate (weight*: variable-1, …, ic: variable-IC, limit: gt0) -> variable-n
15 iintegrate (weight*: variable-1, …) -> variable-n
16 diode (cat:variable-n) -> DA
17 connect (DA) -> sj
18 # diode and connect used to limit the result to values >0
19
20 # Building an additional integrator with the help of an openamp
21 define iintegrate.additional (variable) -> integral
22 openamp variable -> integral
23 connect SJ -> cp
24 capacitor.100nF (integral) -> cp
25 # 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.
26
27 # Summing extension
28 define isum (weight*: variable-1, …, /divisor) -> -result
29 isum (weight*: variable-1, …) -> -result
30 connect (-result, …) -> IN