Version 4 SHEET 1 1448 804 WIRE -16 128 -16 112 WIRE 256 128 256 112 WIRE 528 128 528 112 WIRE -16 224 -16 208 WIRE 256 224 256 208 WIRE 528 224 528 208 WIRE -16 384 -16 368 WIRE 256 384 256 368 WIRE 528 384 528 368 WIRE -16 480 -16 464 WIRE 256 480 256 464 WIRE 528 480 528 464 WIRE -16 656 -16 640 WIRE 256 656 256 640 WIRE -16 752 -16 736 WIRE 256 752 256 736 FLAG 256 224 0 FLAG -16 224 0 FLAG -16 112 X FLAG 528 224 0 FLAG 528 112 MAX FLAG 256 112 MIN FLAG 528 480 0 FLAG 528 368 MINMAX FLAG 256 480 0 FLAG 256 368 tanh FLAG -16 480 0 FLAG -16 368 limit FLAG -16 752 0 FLAG -16 640 MINMAX5 FLAG 256 752 0 FLAG 256 640 MINMAX4 SYMBOL bv 256 112 R0 SYMATTR InstName B1 SYMATTR Value V=dnlim(V(x),-5,1) SYMBOL voltage -16 112 R0 SYMATTR InstName V1 SYMATTR Value 0 SYMBOL bv 528 112 R0 SYMATTR InstName B2 SYMATTR Value V=uplim(V(x),5,1) SYMBOL bv 528 368 R0 SYMATTR InstName B3 SYMATTR Value V=dnlim(uplim(V(x),5,1), -5,1) SYMBOL bv 256 368 R0 SYMATTR InstName B4 SYMATTR Value V=5*tanh(V(x)/5) SYMBOL bv -16 368 R0 SYMATTR InstName B5 SYMATTR Value V=limit(V(x),-5,5) SYMBOL bv -16 640 R0 SYMATTR InstName B6 SYMATTR Value V=softlimit5(x) SYMBOL bv 256 640 R0 SYMATTR InstName B7 SYMATTR Value V=softlimit4(x) TEXT -24 32 Left 2 !.dc V1 -8 8 1m TEXT -40 -744 Left 2 ;There are two new limit-functions in LTspice.\n \nThe new functions dnlimit() and uplimit() have the big \nadvantage of continuous derivation compared to the limit()\nfunction. This is a big improvement compared to the limit()\nfunction regarding convergence.\nThey have additionally the advantage of a wide range of\nperfect linearity which makes them superior to the smooth \ntanh() function in most amplifier applications.\n \nLower Limit\ndnlimt(V(x),limit,range)\n \nUpper Limit\nuplimt(V(x),limit,range)\n \nLower and Upper Limit\ndnlim(uplim(V(x),limit_h,range_h),limit_l,range_l) \n \nVery Soft Limit\nconst1*tanh(V(x)/const2)\n \nHard Limit\nlimit(V(x),a,b)\n \nThe parameter "range" defines the width where the function \nsmoothly starts to limit the output. TEXT 400 616 Left 2 !.func softlimit5(x) {dnlim(uplim(V(x),5,1), -5,1)} TEXT 400 648 Left 2 !.func softlimit4(x) {dnlim(uplim(V(x),4,1), -4,1)} RECTANGLE Normal 960 800 -64 512 2