|
From: Holger V. <hol...@un...> - 2020-04-27 16:55:40
|
I have found an LTSPICE OTA replacement: Xota 2 COM 2 2 2 2 N004 2 ng_ota g=100u Iout=10u Ref=1.259 Vhigh=10 Vlow=-10 *A1 2 COM 2 2 2 2 N004 2 OTA g=100u Iout=10u Ref=1.259 Vhigh=10 Vlow=-10 * OTA * http://ltwiki.org/?title=Undocumented_LTspice#OTA * in1- in1+ in2+ in2- nc nc out com .subckt ng_ota n1 n2 n3 n4 n5 n6 n7 n8 g=1 Iout=10u Ref=0 Vhigh=2 Vlow=-2 Rclamp=1 * the formula from wiki is not correct concerning V(n3,n4) Biraw viraw 0 V = g * ( Ref - V(n1,n2) ) $ * (V(n3,n4)) Bout n7 n8 I = tanh(V(viraw)/'Iout')*'Iout' Vh hi 0 'Vhigh' Vl lo 0 'Vlow' * clamp to rails with Rclamp and diodes Rclamp1 nhi hi 'Rclamp' Dclamp1 n7 nhi dio Rclamp2 nlo lo 'Rclamp' Dclamp2 nlo n7 dio .model dio D .ends |