]> permondes.de Git - Analog_Engine.git/blame - scripts/CompoundFunctions.LACE
Focus on potential fields
[Analog_Engine.git] / scripts / CompoundFunctions.LACE
CommitLineData
e25ae380 1# CompoundFunctions.LACE
6d26a6bd
P
2# collection of compound functions which can be realized with THAT
3
4# Open Amplifier
5define openamp (weight*: variable-1, …) -> output
6 isum (weight*: variable-1, …) -> output
7 connect (FB:) -> GND
8
9# Division
10define idivide (numerator, denominator) -> -quotient
11 openamp (numerator, product) -> -quotient
12 multiply (-quotient, denominator) -> product
13
14# Integration extension
15define 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
22define 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
29define isum (weight*: variable-1, …, /divisor) -> -result
30 isum (weight*: variable-1, …) -> -result
31 connect (-result, …) -> IN