summaryrefslogtreecommitdiff
path: root/Examples/Clampercircuit
diff options
context:
space:
mode:
authorfossee2019-08-29 12:00:06 +0530
committerfossee2019-08-29 12:00:06 +0530
commitd25a2bf2d63442e3585479751f168b635fc5701e (patch)
treefa1df998749b7dab5b8d404b88d77c5311167d8a /Examples/Clampercircuit
downloadeSim-d25a2bf2d63442e3585479751f168b635fc5701e.tar.gz
eSim-d25a2bf2d63442e3585479751f168b635fc5701e.tar.bz2
eSim-d25a2bf2d63442e3585479751f168b635fc5701e.zip
changed Examples
Diffstat (limited to 'Examples/Clampercircuit')
-rw-r--r--Examples/Clampercircuit/Clampercircuit-cache.lib89
-rw-r--r--Examples/Clampercircuit/Clampercircuit-rescue.lib26
-rw-r--r--Examples/Clampercircuit/Clampercircuit.bak261
-rw-r--r--Examples/Clampercircuit/Clampercircuit.cir20
-rw-r--r--Examples/Clampercircuit/Clampercircuit.cir.out26
-rw-r--r--Examples/Clampercircuit/Clampercircuit.pro72
-rw-r--r--Examples/Clampercircuit/Clampercircuit.proj1
-rw-r--r--Examples/Clampercircuit/Clampercircuit.sch262
-rw-r--r--Examples/Clampercircuit/Clampercircuit_Previous_Values.xml1
-rw-r--r--Examples/Clampercircuit/D.lib2
-rw-r--r--Examples/Clampercircuit/analysis1
-rw-r--r--Examples/Clampercircuit/plot_data_i.txt76
-rw-r--r--Examples/Clampercircuit/plot_data_v.txt153
13 files changed, 990 insertions, 0 deletions
diff --git a/Examples/Clampercircuit/Clampercircuit-cache.lib b/Examples/Clampercircuit/Clampercircuit-cache.lib
new file mode 100644
index 00000000..27e49426
--- /dev/null
+++ b/Examples/Clampercircuit/Clampercircuit-cache.lib
@@ -0,0 +1,89 @@
+EESchema-LIBRARY Version 2.3
+#encoding utf-8
+#
+# C
+#
+DEF C C 0 10 N Y 1 F N
+F0 "C" 25 100 50 H V L CNN
+F1 "C" 25 -100 50 H V L CNN
+F2 "" 38 -150 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+$FPLIST
+ C_*
+$ENDFPLIST
+DRAW
+P 2 0 1 20 -80 -30 80 -30 N
+P 2 0 1 20 -80 30 80 30 N
+X ~ 1 0 150 110 D 50 50 1 1 P
+X ~ 2 0 -150 110 U 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# D-RESCUE-Clampercircuit
+#
+DEF D-RESCUE-Clampercircuit D 0 40 N N 1 F N
+F0 "D" 0 100 50 H V C CNN
+F1 "D-RESCUE-Clampercircuit" 0 -100 50 H V C CNN
+F2 "" 0 0 60 H V C CNN
+F3 "" 0 0 60 H V C CNN
+$FPLIST
+ Diode_*
+ D-Pak_TO252AA
+ *SingleDiode
+ *_Diode_*
+ *SingleDiode*
+$ENDFPLIST
+DRAW
+P 2 0 1 6 50 50 50 -50 N
+P 3 0 1 0 -50 50 50 0 -50 -50 F
+X A 1 -150 0 100 R 40 40 1 1 P
+X K 2 150 0 100 L 40 40 1 1 P
+ENDDRAW
+ENDDEF
+#
+# GND
+#
+DEF GND #PWR 0 0 Y Y 1 F P
+F0 "#PWR" 0 -250 50 H I C CNN
+F1 "GND" 0 -150 50 H V C CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+DRAW
+P 6 0 1 0 0 0 0 -50 50 -50 0 -100 -50 -50 0 -50 N
+X GND 1 0 0 0 D 50 50 1 1 W N
+ENDDRAW
+ENDDEF
+#
+# plot_v1
+#
+DEF plot_v1 U 0 40 Y Y 1 F N
+F0 "U" 0 500 60 H V C CNN
+F1 "plot_v1" 200 350 60 H V C CNN
+F2 "" 0 0 60 H V C CNN
+F3 "" 0 0 60 H V C CNN
+DRAW
+C 0 500 100 0 1 0 N
+X ~ ~ 0 200 200 U 50 50 1 1 I
+ENDDRAW
+ENDDEF
+#
+# sine
+#
+DEF sine v 0 40 Y Y 1 F N
+F0 "v" -200 100 60 H V C CNN
+F1 "sine" -200 -50 60 H V C CNN
+F2 "R1" -300 0 60 H V C CNN
+F3 "" 0 0 60 H V C CNN
+$FPLIST
+ 1_pin
+$ENDFPLIST
+DRAW
+A -50 0 50 1 1799 0 1 0 N 0 0 -100 0
+A 50 0 50 -1799 -1 0 1 0 N 0 0 100 0
+C 0 0 150 0 1 0 N
+X + 1 0 450 300 D 50 0 1 1 I
+X - 2 0 -450 300 U 50 0 1 1 I
+ENDDRAW
+ENDDEF
+#
+#End Library
diff --git a/Examples/Clampercircuit/Clampercircuit-rescue.lib b/Examples/Clampercircuit/Clampercircuit-rescue.lib
new file mode 100644
index 00000000..26b32fc5
--- /dev/null
+++ b/Examples/Clampercircuit/Clampercircuit-rescue.lib
@@ -0,0 +1,26 @@
+EESchema-LIBRARY Version 2.3
+#encoding utf-8
+#
+# D-RESCUE-Clampercircuit
+#
+DEF D-RESCUE-Clampercircuit D 0 40 N N 1 F N
+F0 "D" 0 100 50 H V C CNN
+F1 "D-RESCUE-Clampercircuit" 0 -100 50 H V C CNN
+F2 "" 0 0 60 H V C CNN
+F3 "" 0 0 60 H V C CNN
+$FPLIST
+ Diode_*
+ D-Pak_TO252AA
+ *SingleDiode
+ *_Diode_*
+ *SingleDiode*
+$ENDFPLIST
+DRAW
+P 2 0 1 6 50 50 50 -50 N
+P 3 0 1 0 -50 50 50 0 -50 -50 F
+X A 1 -150 0 100 R 40 40 1 1 P
+X K 2 150 0 100 L 40 40 1 1 P
+ENDDRAW
+ENDDEF
+#
+#End Library
diff --git a/Examples/Clampercircuit/Clampercircuit.bak b/Examples/Clampercircuit/Clampercircuit.bak
new file mode 100644
index 00000000..da932747
--- /dev/null
+++ b/Examples/Clampercircuit/Clampercircuit.bak
@@ -0,0 +1,261 @@
+EESchema Schematic File Version 2
+LIBS:eSim_Analog
+LIBS:eSim_Devices
+LIBS:eSim_Digital
+LIBS:eSim_Hybrid
+LIBS:eSim_Miscellaneous
+LIBS:eSim_Plot
+LIBS:eSim_Power
+LIBS:eSim_Sources
+LIBS:eSim_Subckt
+LIBS:eSim_User
+LIBS:adc-dac
+LIBS:memory
+LIBS:xilinx
+LIBS:microcontrollers
+LIBS:dsp
+LIBS:microchip
+LIBS:analog_switches
+LIBS:motorola
+LIBS:texas
+LIBS:intel
+LIBS:audio
+LIBS:interface
+LIBS:digital-audio
+LIBS:philips
+LIBS:display
+LIBS:cypress
+LIBS:siliconi
+LIBS:opto
+LIBS:atmel
+LIBS:contrib
+LIBS:power
+LIBS:device
+LIBS:transistors
+LIBS:conn
+LIBS:linear
+LIBS:regul
+LIBS:74xx
+LIBS:cmos4000
+LIBS:Clampercircuit-cache
+EELAYER 25 0
+EELAYER END
+$Descr A4 11693 8268
+encoding utf-8
+Sheet 1 1
+Title ""
+Date ""
+Rev ""
+Comp ""
+Comment1 ""
+Comment2 ""
+Comment3 ""
+Comment4 ""
+$EndDescr
+$Comp
+L sine v1
+U 1 1 56A864A1
+P 3750 3550
+F 0 "v1" H 3550 3650 60 0000 C CNN
+F 1 "sine" H 3550 3500 60 0000 C CNN
+F 2 "R1" H 3450 3550 60 0000 C CNN
+F 3 "" H 3750 3550 60 0000 C CNN
+ 1 3750 3550
+ 1 0 0 -1
+$EndComp
+$Comp
+L C C1
+U 1 1 56A86522
+P 4300 2900
+F 0 "C1" H 4325 3000 50 0000 L CNN
+F 1 "1n" H 4325 2800 50 0000 L CNN
+F 2 "" H 4338 2750 30 0000 C CNN
+F 3 "" H 4300 2900 60 0000 C CNN
+ 1 4300 2900
+ 0 1 1 0
+$EndComp
+$Comp
+L D D1
+U 1 1 56A86555
+P 5100 3400
+F 0 "D1" H 5100 3500 50 0000 C CNN
+F 1 "D" H 5100 3300 50 0000 C CNN
+F 2 "" H 5100 3400 60 0000 C CNN
+F 3 "" H 5100 3400 60 0000 C CNN
+ 1 5100 3400
+ 0 1 1 0
+$EndComp
+$Comp
+L GND #PWR01
+U 1 1 56A86578
+P 4550 4150
+F 0 "#PWR01" H 4550 3900 50 0001 C CNN
+F 1 "GND" H 4550 4000 50 0000 C CNN
+F 2 "" H 4550 4150 50 0000 C CNN
+F 3 "" H 4550 4150 50 0000 C CNN
+ 1 4550 4150
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 4150 2900 3750 2900
+Wire Wire Line
+ 3750 2900 3750 3100
+Wire Wire Line
+ 4450 2900 5100 2900
+Wire Wire Line
+ 5100 2900 5100 3250
+Wire Wire Line
+ 3750 4000 3750 4100
+Wire Wire Line
+ 3750 4100 5100 4100
+Wire Wire Line
+ 5100 4100 5100 3550
+Text GLabel 3700 2800 0 60 Input ~ 0
+in_neg
+Text GLabel 5000 2750 2 60 Input ~ 0
+out_neg
+Wire Wire Line
+ 3700 2800 3800 2800
+Wire Wire Line
+ 3800 2750 3800 2900
+Connection ~ 3800 2900
+Wire Wire Line
+ 5000 2750 4950 2750
+Wire Wire Line
+ 4950 2750 4950 2900
+Connection ~ 4950 2900
+Wire Wire Line
+ 4550 4150 4550 4100
+Connection ~ 4550 4100
+$Comp
+L sine v2
+U 1 1 56A86723
+P 6950 3550
+F 0 "v2" H 6750 3650 60 0000 C CNN
+F 1 "sine" H 6750 3500 60 0000 C CNN
+F 2 "R1" H 6650 3550 60 0000 C CNN
+F 3 "" H 6950 3550 60 0000 C CNN
+ 1 6950 3550
+ 1 0 0 -1
+$EndComp
+$Comp
+L C C2
+U 1 1 56A86783
+P 7600 2900
+F 0 "C2" H 7625 3000 50 0000 L CNN
+F 1 "1n" H 7625 2800 50 0000 L CNN
+F 2 "" H 7638 2750 30 0000 C CNN
+F 3 "" H 7600 2900 60 0000 C CNN
+ 1 7600 2900
+ 0 1 1 0
+$EndComp
+$Comp
+L D D2
+U 1 1 56A867F1
+P 8500 3400
+F 0 "D2" H 8500 3500 50 0000 C CNN
+F 1 "D" H 8500 3300 50 0000 C CNN
+F 2 "" H 8500 3400 60 0000 C CNN
+F 3 "" H 8500 3400 60 0000 C CNN
+ 1 8500 3400
+ 0 -1 -1 0
+$EndComp
+$Comp
+L GND #PWR02
+U 1 1 56A868AB
+P 7850 4150
+F 0 "#PWR02" H 7850 3900 50 0001 C CNN
+F 1 "GND" H 7850 4000 50 0000 C CNN
+F 2 "" H 7850 4150 50 0000 C CNN
+F 3 "" H 7850 4150 50 0000 C CNN
+ 1 7850 4150
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 6950 3100 6950 2900
+Wire Wire Line
+ 6950 2900 7450 2900
+Wire Wire Line
+ 7750 2900 8500 2900
+Wire Wire Line
+ 8500 2900 8500 3250
+Wire Wire Line
+ 6950 4000 6950 4050
+Wire Wire Line
+ 6950 4050 8500 4050
+Wire Wire Line
+ 8500 4050 8500 3550
+Wire Wire Line
+ 7850 4150 7850 4050
+Connection ~ 7850 4050
+Text GLabel 7000 2800 0 60 Input ~ 0
+in_pos
+Text GLabel 8450 2750 2 60 Input ~ 0
+out_pos
+Wire Wire Line
+ 7000 2800 7050 2800
+Wire Wire Line
+ 7050 2650 7050 2900
+Connection ~ 7050 2900
+Wire Wire Line
+ 8450 2750 8400 2750
+Wire Wire Line
+ 8400 2750 8400 2900
+Connection ~ 8400 2900
+Text Notes 4150 4750 0 60 ~ 0
+Negative Clamper\n\n
+Text Notes 7600 4650 0 60 ~ 0
+Positive Clamper\n
+$Comp
+L plot_v1 U1
+U 1 1 56D43FBF
+P 3800 2950
+F 0 "U1" H 3800 3450 60 0000 C CNN
+F 1 "plot_v1" H 4000 3300 60 0000 C CNN
+F 2 "" H 3800 2950 60 0000 C CNN
+F 3 "" H 3800 2950 60 0000 C CNN
+ 1 3800 2950
+ 1 0 0 -1
+$EndComp
+$Comp
+L plot_v1 U2
+U 1 1 56D44022
+P 4950 2900
+F 0 "U2" H 4950 3400 60 0000 C CNN
+F 1 "plot_v1" H 5150 3250 60 0000 C CNN
+F 2 "" H 4950 2900 60 0000 C CNN
+F 3 "" H 4950 2900 60 0000 C CNN
+ 1 4950 2900
+ 1 0 0 -1
+$EndComp
+$Comp
+L plot_v1 U3
+U 1 1 56D44072
+P 7050 2850
+F 0 "U3" H 7050 3350 60 0000 C CNN
+F 1 "plot_v1" H 7250 3200 60 0000 C CNN
+F 2 "" H 7050 2850 60 0000 C CNN
+F 3 "" H 7050 2850 60 0000 C CNN
+ 1 7050 2850
+ 1 0 0 -1
+$EndComp
+$Comp
+L plot_v1 U4
+U 1 1 56D440D3
+P 8400 2850
+F 0 "U4" H 8400 3350 60 0000 C CNN
+F 1 "plot_v1" H 8600 3200 60 0000 C CNN
+F 2 "" H 8400 2850 60 0000 C CNN
+F 3 "" H 8400 2850 60 0000 C CNN
+ 1 8400 2850
+ 1 0 0 -1
+$EndComp
+Connection ~ 3800 2800
+Wire Wire Line
+ 4950 2700 4950 2800
+Connection ~ 4950 2800
+Connection ~ 7050 2800
+Wire Wire Line
+ 8400 2650 8400 2800
+Connection ~ 8400 2800
+$EndSCHEMATC
diff --git a/Examples/Clampercircuit/Clampercircuit.cir b/Examples/Clampercircuit/Clampercircuit.cir
new file mode 100644
index 00000000..dd1eec1d
--- /dev/null
+++ b/Examples/Clampercircuit/Clampercircuit.cir
@@ -0,0 +1,20 @@
+* /home/fossee/eSim-Workspace/Clampercircuit/Clampercircuit.cir
+
+* EESchema Netlist Version 1.1 (Spice format) creation date: Mon Feb 29 18:25:22 2016
+
+* To exclude a component from the Spice Netlist add [Spice_Netlist_Enabled] user FIELD set to: N
+* To reorder the component spice node sequence add [Spice_Node_Sequence] user FIELD and define sequence: 2,1,0
+
+* Sheet Name: /
+v1 in_neg GND sine
+C1 out_neg in_neg 1n
+D1 out_neg GND D
+v2 in_pos GND sine
+C2 out_pos in_pos 1n
+D2 GND out_pos D
+U1 in_neg plot_v1
+U2 out_neg plot_v1
+U3 in_pos plot_v1
+U4 out_pos plot_v1
+
+.end
diff --git a/Examples/Clampercircuit/Clampercircuit.cir.out b/Examples/Clampercircuit/Clampercircuit.cir.out
new file mode 100644
index 00000000..8ebcb64b
--- /dev/null
+++ b/Examples/Clampercircuit/Clampercircuit.cir.out
@@ -0,0 +1,26 @@
+* /home/fossee/esim-workspace/clampercircuit/clampercircuit.cir
+
+.include D.lib
+v1 in_neg gnd sine(0 5 50 0 0)
+c1 out_neg in_neg 1n
+d1 out_neg gnd 1N4148
+v2 in_pos gnd sine(0 5 50 0 0)
+c2 out_pos in_pos 1n
+d2 gnd out_pos 1N4148
+* u1 in_neg plot_v1
+* u2 out_neg plot_v1
+* u3 in_pos plot_v1
+* u4 out_pos plot_v1
+.tran 10e-03 100e-03 0e-00
+
+* Control Statements
+.control
+run
+print allv > plot_data_v.txt
+print alli > plot_data_i.txt
+plot v(in_neg)
+plot v(out_neg)
+plot v(in_pos)
+plot v(out_pos)
+.endc
+.end
diff --git a/Examples/Clampercircuit/Clampercircuit.pro b/Examples/Clampercircuit/Clampercircuit.pro
new file mode 100644
index 00000000..16a62adf
--- /dev/null
+++ b/Examples/Clampercircuit/Clampercircuit.pro
@@ -0,0 +1,72 @@
+update=Sat Jun 15 20:25:51 2019
+version=1
+last_client=eeschema
+[general]
+version=1
+RootSch=
+BoardNm=
+[pcbnew]
+version=1
+LastNetListRead=
+UseCmpFile=1
+PadDrill=0.600000000000
+PadDrillOvalY=0.600000000000
+PadSizeH=1.500000000000
+PadSizeV=1.500000000000
+PcbTextSizeV=1.500000000000
+PcbTextSizeH=1.500000000000
+PcbTextThickness=0.300000000000
+ModuleTextSizeV=1.000000000000
+ModuleTextSizeH=1.000000000000
+ModuleTextSizeThickness=0.150000000000
+SolderMaskClearance=0.000000000000
+SolderMaskMinWidth=0.000000000000
+DrawSegmentWidth=0.200000000000
+BoardOutlineThickness=0.100000000000
+ModuleOutlineThickness=0.150000000000
+[cvpcb]
+version=1
+NetIExt=net
+[eeschema]
+version=1
+LibDir=
+[eeschema/libraries]
+LibName1=Clampercircuit-rescue
+LibName2=eSim_Analog
+LibName3=eSim_Devices
+LibName4=eSim_Digital
+LibName5=eSim_Hybrid
+LibName6=eSim_Miscellaneous
+LibName7=eSim_Plot
+LibName8=eSim_Power
+LibName9=eSim_Sources
+LibName10=eSim_Subckt
+LibName11=eSim_User
+LibName12=adc-dac
+LibName13=memory
+LibName14=xilinx
+LibName15=microcontrollers
+LibName16=dsp
+LibName17=microchip
+LibName18=analog_switches
+LibName19=motorola
+LibName20=texas
+LibName21=intel
+LibName22=audio
+LibName23=interface
+LibName24=digital-audio
+LibName25=philips
+LibName26=display
+LibName27=cypress
+LibName28=siliconi
+LibName29=opto
+LibName30=atmel
+LibName31=contrib
+LibName32=power
+LibName33=device
+LibName34=transistors
+LibName35=conn
+LibName36=linear
+LibName37=regul
+LibName38=74xx
+LibName39=cmos4000
diff --git a/Examples/Clampercircuit/Clampercircuit.proj b/Examples/Clampercircuit/Clampercircuit.proj
new file mode 100644
index 00000000..e4b64dc6
--- /dev/null
+++ b/Examples/Clampercircuit/Clampercircuit.proj
@@ -0,0 +1 @@
+schematicFile Clampercircuit.sch
diff --git a/Examples/Clampercircuit/Clampercircuit.sch b/Examples/Clampercircuit/Clampercircuit.sch
new file mode 100644
index 00000000..3396eeca
--- /dev/null
+++ b/Examples/Clampercircuit/Clampercircuit.sch
@@ -0,0 +1,262 @@
+EESchema Schematic File Version 2
+LIBS:Clampercircuit-rescue
+LIBS:eSim_Analog
+LIBS:eSim_Devices
+LIBS:eSim_Digital
+LIBS:eSim_Hybrid
+LIBS:eSim_Miscellaneous
+LIBS:eSim_Plot
+LIBS:eSim_Power
+LIBS:eSim_Sources
+LIBS:eSim_Subckt
+LIBS:eSim_User
+LIBS:adc-dac
+LIBS:memory
+LIBS:xilinx
+LIBS:microcontrollers
+LIBS:dsp
+LIBS:microchip
+LIBS:analog_switches
+LIBS:motorola
+LIBS:texas
+LIBS:intel
+LIBS:audio
+LIBS:interface
+LIBS:digital-audio
+LIBS:philips
+LIBS:display
+LIBS:cypress
+LIBS:siliconi
+LIBS:opto
+LIBS:atmel
+LIBS:contrib
+LIBS:power
+LIBS:device
+LIBS:transistors
+LIBS:conn
+LIBS:linear
+LIBS:regul
+LIBS:74xx
+LIBS:cmos4000
+LIBS:Clampercircuit-cache
+EELAYER 25 0
+EELAYER END
+$Descr A4 11693 8268
+encoding utf-8
+Sheet 1 1
+Title ""
+Date ""
+Rev ""
+Comp ""
+Comment1 ""
+Comment2 ""
+Comment3 ""
+Comment4 ""
+$EndDescr
+$Comp
+L sine v1
+U 1 1 56A864A1
+P 3750 3550
+F 0 "v1" H 3550 3650 60 0000 C CNN
+F 1 "sine" H 3550 3500 60 0000 C CNN
+F 2 "R1" H 3450 3550 60 0000 C CNN
+F 3 "" H 3750 3550 60 0000 C CNN
+ 1 3750 3550
+ 1 0 0 -1
+$EndComp
+$Comp
+L C C1
+U 1 1 56A86522
+P 4300 2900
+F 0 "C1" H 4325 3000 50 0000 L CNN
+F 1 "1n" H 4325 2800 50 0000 L CNN
+F 2 "" H 4338 2750 30 0000 C CNN
+F 3 "" H 4300 2900 60 0000 C CNN
+ 1 4300 2900
+ 0 1 1 0
+$EndComp
+$Comp
+L D-RESCUE-Clampercircuit D1
+U 1 1 56A86555
+P 5100 3400
+F 0 "D1" H 5100 3500 50 0000 C CNN
+F 1 "D" H 5100 3300 50 0000 C CNN
+F 2 "" H 5100 3400 60 0000 C CNN
+F 3 "" H 5100 3400 60 0000 C CNN
+ 1 5100 3400
+ 0 1 1 0
+$EndComp
+$Comp
+L GND #PWR01
+U 1 1 56A86578
+P 4550 4150
+F 0 "#PWR01" H 4550 3900 50 0001 C CNN
+F 1 "GND" H 4550 4000 50 0000 C CNN
+F 2 "" H 4550 4150 50 0000 C CNN
+F 3 "" H 4550 4150 50 0000 C CNN
+ 1 4550 4150
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 4150 2900 3750 2900
+Wire Wire Line
+ 3750 2900 3750 3100
+Wire Wire Line
+ 4450 2900 5100 2900
+Wire Wire Line
+ 5100 2900 5100 3250
+Wire Wire Line
+ 3750 4000 3750 4100
+Wire Wire Line
+ 3750 4100 5100 4100
+Wire Wire Line
+ 5100 4100 5100 3550
+Text GLabel 3700 2800 0 60 Input ~ 0
+in_neg
+Text GLabel 5000 2750 2 60 Input ~ 0
+out_neg
+Wire Wire Line
+ 3700 2800 3800 2800
+Wire Wire Line
+ 3800 2750 3800 2900
+Connection ~ 3800 2900
+Wire Wire Line
+ 5000 2750 4950 2750
+Wire Wire Line
+ 4950 2750 4950 2900
+Connection ~ 4950 2900
+Wire Wire Line
+ 4550 4150 4550 4100
+Connection ~ 4550 4100
+$Comp
+L sine v2
+U 1 1 56A86723
+P 6950 3550
+F 0 "v2" H 6750 3650 60 0000 C CNN
+F 1 "sine" H 6750 3500 60 0000 C CNN
+F 2 "R1" H 6650 3550 60 0000 C CNN
+F 3 "" H 6950 3550 60 0000 C CNN
+ 1 6950 3550
+ 1 0 0 -1
+$EndComp
+$Comp
+L C C2
+U 1 1 56A86783
+P 7600 2900
+F 0 "C2" H 7625 3000 50 0000 L CNN
+F 1 "1n" H 7625 2800 50 0000 L CNN
+F 2 "" H 7638 2750 30 0000 C CNN
+F 3 "" H 7600 2900 60 0000 C CNN
+ 1 7600 2900
+ 0 1 1 0
+$EndComp
+$Comp
+L D-RESCUE-Clampercircuit D2
+U 1 1 56A867F1
+P 8500 3400
+F 0 "D2" H 8500 3500 50 0000 C CNN
+F 1 "D" H 8500 3300 50 0000 C CNN
+F 2 "" H 8500 3400 60 0000 C CNN
+F 3 "" H 8500 3400 60 0000 C CNN
+ 1 8500 3400
+ 0 -1 -1 0
+$EndComp
+$Comp
+L GND #PWR02
+U 1 1 56A868AB
+P 7850 4150
+F 0 "#PWR02" H 7850 3900 50 0001 C CNN
+F 1 "GND" H 7850 4000 50 0000 C CNN
+F 2 "" H 7850 4150 50 0000 C CNN
+F 3 "" H 7850 4150 50 0000 C CNN
+ 1 7850 4150
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 6950 3100 6950 2900
+Wire Wire Line
+ 6950 2900 7450 2900
+Wire Wire Line
+ 7750 2900 8500 2900
+Wire Wire Line
+ 8500 2900 8500 3250
+Wire Wire Line
+ 6950 4000 6950 4050
+Wire Wire Line
+ 6950 4050 8500 4050
+Wire Wire Line
+ 8500 4050 8500 3550
+Wire Wire Line
+ 7850 4150 7850 4050
+Connection ~ 7850 4050
+Text GLabel 7000 2800 0 60 Input ~ 0
+in_pos
+Text GLabel 8450 2750 2 60 Input ~ 0
+out_pos
+Wire Wire Line
+ 7000 2800 7050 2800
+Wire Wire Line
+ 7050 2650 7050 2900
+Connection ~ 7050 2900
+Wire Wire Line
+ 8450 2750 8400 2750
+Wire Wire Line
+ 8400 2750 8400 2900
+Connection ~ 8400 2900
+Text Notes 4150 4750 0 60 ~ 0
+Negative Clamper\n\n
+Text Notes 7600 4650 0 60 ~ 0
+Positive Clamper\n
+$Comp
+L plot_v1 U1
+U 1 1 56D43FBF
+P 3800 2950
+F 0 "U1" H 3800 3450 60 0000 C CNN
+F 1 "plot_v1" H 4000 3300 60 0000 C CNN
+F 2 "" H 3800 2950 60 0000 C CNN
+F 3 "" H 3800 2950 60 0000 C CNN
+ 1 3800 2950
+ 1 0 0 -1
+$EndComp
+$Comp
+L plot_v1 U2
+U 1 1 56D44022
+P 4950 2900
+F 0 "U2" H 4950 3400 60 0000 C CNN
+F 1 "plot_v1" H 5150 3250 60 0000 C CNN
+F 2 "" H 4950 2900 60 0000 C CNN
+F 3 "" H 4950 2900 60 0000 C CNN
+ 1 4950 2900
+ 1 0 0 -1
+$EndComp
+$Comp
+L plot_v1 U3
+U 1 1 56D44072
+P 7050 2850
+F 0 "U3" H 7050 3350 60 0000 C CNN
+F 1 "plot_v1" H 7250 3200 60 0000 C CNN
+F 2 "" H 7050 2850 60 0000 C CNN
+F 3 "" H 7050 2850 60 0000 C CNN
+ 1 7050 2850
+ 1 0 0 -1
+$EndComp
+$Comp
+L plot_v1 U4
+U 1 1 56D440D3
+P 8400 2850
+F 0 "U4" H 8400 3350 60 0000 C CNN
+F 1 "plot_v1" H 8600 3200 60 0000 C CNN
+F 2 "" H 8400 2850 60 0000 C CNN
+F 3 "" H 8400 2850 60 0000 C CNN
+ 1 8400 2850
+ 1 0 0 -1
+$EndComp
+Connection ~ 3800 2800
+Wire Wire Line
+ 4950 2700 4950 2800
+Connection ~ 4950 2800
+Connection ~ 7050 2800
+Wire Wire Line
+ 8400 2650 8400 2800
+Connection ~ 8400 2800
+$EndSCHEMATC
diff --git a/Examples/Clampercircuit/Clampercircuit_Previous_Values.xml b/Examples/Clampercircuit/Clampercircuit_Previous_Values.xml
new file mode 100644
index 00000000..f58b615c
--- /dev/null
+++ b/Examples/Clampercircuit/Clampercircuit_Previous_Values.xml
@@ -0,0 +1 @@
+<KicadtoNgspice><source><v1 name="Source type">sine<field1 name="Offset Value">0</field1><field2 name="Amplitude">5</field2><field3 name="Frequency">50</field3><field4 name="Delay Time">0</field4><field5 name="Damping Factor">0</field5></v1><v2 name="Source type">sine<field1 name="Offset Value">0</field1><field2 name="Amplitude">5</field2><field3 name="Frequency">50</field3><field4 name="Delay Time">0</field4><field5 name="Damping Factor">0</field5></v2></source><model /><devicemodel><d2><field>/home/fossee/esim-clones/eSim/src/deviceModelLibrary/Diode/D.lib</field></d2><d1><field>/home/fossee/esim-clones/eSim/src/deviceModelLibrary/Diode/D.lib</field></d1></devicemodel><subcircuit /><analysis><ac><field1 name="Lin">true</field1><field2 name="Dec">false</field2><field3 name="Oct">false</field3><field4 name="Start Frequency" /><field5 name="Stop Frequency" /><field6 name="No. of points" /><field7 name="Start Fre Combo">Hz</field7><field8 name="Stop Fre Combo">Hz</field8></ac><dc><field1 name="Source 1" /><field2 name="Start" /><field3 name="Increment" /><field4 name="Stop" /><field5 name="Operating Point">0</field5><field6 name="Start Combo">Volts or Amperes</field6><field7 name="Increment Combo">Volts or Amperes</field7><field8 name="Stop Combo">Volts or Amperes</field8><field9 name="Source 2" /><field10 name="Start" /><field11 name="Increment" /><field12 name="Stop" /><field13 name="Start Combo">Volts or Amperes</field13><field14 name="Increment Combo">Volts or Amperes</field14><field15 name="Stop Combo">Volts or Amperes</field15></dc><tran><field1 name="Start Time">0</field1><field2 name="Step Time">10</field2><field3 name="Stop Time">100</field3><field4 name="Start Combo">Sec</field4><field5 name="Step Combo">ms</field5><field6 name="Stop Combo">ms</field6></tran></analysis></KicadtoNgspice> \ No newline at end of file
diff --git a/Examples/Clampercircuit/D.lib b/Examples/Clampercircuit/D.lib
new file mode 100644
index 00000000..8a7fb4da
--- /dev/null
+++ b/Examples/Clampercircuit/D.lib
@@ -0,0 +1,2 @@
+.model 1n4148 D(is=2.495E-09 rs=4.755E-01 n=1.679E+00 tt=3.030E-09 cjo=1.700E-12 vj=1 m=1.959E-01 bv=1.000E+02 ibv=1.000E-04)
+
diff --git a/Examples/Clampercircuit/analysis b/Examples/Clampercircuit/analysis
new file mode 100644
index 00000000..d5e13546
--- /dev/null
+++ b/Examples/Clampercircuit/analysis
@@ -0,0 +1 @@
+.tran 10e-03 100e-03 0e-00 \ No newline at end of file
diff --git a/Examples/Clampercircuit/plot_data_i.txt b/Examples/Clampercircuit/plot_data_i.txt
new file mode 100644
index 00000000..2be372e6
--- /dev/null
+++ b/Examples/Clampercircuit/plot_data_i.txt
@@ -0,0 +1,76 @@
+ * /home/fossee/esim-workspace/clampercircuit/clampercircuit.cir
+ Transient Analysis Thu Aug 22 14:15:29 2019
+--------------------------------------------------------------------------------
+Index time v1#branch v2#branch
+--------------------------------------------------------------------------------
+0 0.000000e+000 0.000000e+000 0.000000e+000
+1 1.000000e-005 -3.75264e-009 -3.41664e-009
+2 1.162771e-005 -3.97364e-009 -3.51095e-009
+3 1.488313e-005 -4.44997e-009 -3.68848e-009
+4 2.139398e-005 -5.58173e-009 -3.98936e-009
+5 3.441567e-005 -8.81785e-009 -4.40919e-009
+6 6.045905e-005 -2.21136e-008 -4.82882e-009
+7 9.023818e-005 -6.26522e-008 -4.98992e-009
+8 1.271204e-004 -2.11054e-007 -5.02764e-009
+9 1.691461e-004 -6.38228e-007 -5.01825e-009
+10 2.203033e-004 -1.29532e-006 -4.99487e-009
+11 3.057421e-004 -1.61245e-006 -4.94629e-009
+12 4.301355e-004 -1.53971e-006 -4.88007e-009
+13 5.565338e-004 -1.55627e-006 -4.81431e-009
+14 8.093305e-004 -1.52062e-006 -4.69281e-009
+15 1.314924e-003 -1.45261e-006 -4.46258e-009
+16 2.326110e-003 -1.19428e-006 -3.99523e-009
+17 4.326110e-003 -4.03974e-007 -2.91422e-009
+18 6.326110e-003 3.606613e-009 -1.69771e-009
+19 8.326110e-003 4.318030e-009 -6.81454e-010
+20 1.032611e-002 4.421533e-009 3.249287e-007
+21 1.189320e-002 3.906091e-009 2.485055e-006
+22 1.334664e-002 3.404576e-009 3.838998e-009
+23 1.511140e-002 2.393479e-009 5.119388e-007
+24 1.645191e-002 1.802625e-009 -3.65637e-009
+25 1.766016e-002 1.164507e-009 -4.07353e-009
+26 1.950334e-002 6.794750e-010 -4.54249e-009
+27 2.150334e-002 5.600008e-010 -4.01590e-009
+28 2.350334e-002 1.343926e-009 -3.37414e-009
+29 2.550334e-002 2.496618e-009 -2.14197e-009
+30 2.750334e-002 4.263282e-009 -1.34934e-009
+31 2.950334e-002 4.335044e-009 -5.49971e-010
+32 3.150334e-002 4.232408e-009 -6.95190e-010
+33 3.350334e-002 3.161861e-009 -1.21862e-009
+34 3.550334e-002 2.354892e-009 -2.84437e-009
+35 3.750334e-002 1.133678e-009 -4.12362e-009
+36 3.950334e-002 7.588148e-010 -4.46740e-009
+37 4.150334e-002 4.734238e-010 -4.09607e-009
+38 4.350334e-002 1.417761e-009 -3.29634e-009
+39 4.550334e-002 1.661650e-009 -2.22013e-009
+40 4.750334e-002 4.355620e-009 -1.26964e-009
+41 4.950334e-002 4.251879e-009 -6.25847e-010
+42 5.150334e-002 4.320534e-009 -6.12078e-010
+43 5.350334e-002 3.076039e-009 -1.28919e-009
+44 5.550334e-002 2.441064e-009 -2.44938e-009
+45 5.750334e-002 1.046018e-009 -4.21244e-009
+46 5.950334e-002 8.427555e-010 -4.38787e-009
+47 6.150334e-002 3.823835e-010 -4.18066e-009
+48 6.350334e-002 1.495975e-009 -3.21411e-009
+49 6.550334e-002 -5.07776e-010 -2.30272e-009
+50 6.750334e-002 4.451931e-009 -1.18553e-009
+51 6.950334e-002 4.164071e-009 -7.06156e-010
+52 7.150334e-002 4.412907e-009 -5.24541e-010
+53 7.350334e-002 2.985780e-009 -1.36415e-009
+54 7.550334e-002 2.531640e-009 -1.42006e-009
+
+Index time v1#branch v2#branch
+--------------------------------------------------------------------------------
+55 7.750334e-002 9.540739e-010 -4.30570e-009
+56 7.950334e-002 9.312811e-010 -4.30370e-009
+57 8.150334e-002 2.873080e-010 -4.26974e-009
+58 8.350334e-002 1.578828e-009 -3.12731e-009
+59 8.550334e-002 -5.23664e-009 -2.38986e-009
+60 8.750334e-002 4.550643e-009 -1.09691e-009
+61 8.950334e-002 4.072139e-009 -7.91094e-010
+62 9.150334e-002 4.508455e-009 -4.32574e-010
+63 9.350334e-002 2.891908e-009 -1.44446e-009
+64 9.550334e-002 2.625767e-009 1.200768e-009
+65 9.750334e-002 8.588663e-010 -4.40270e-009
+66 9.950334e-002 1.023786e-009 -4.21494e-009
+67 1.000000e-001 2.595927e-010 -4.58152e-009
diff --git a/Examples/Clampercircuit/plot_data_v.txt b/Examples/Clampercircuit/plot_data_v.txt
new file mode 100644
index 00000000..614d3985
--- /dev/null
+++ b/Examples/Clampercircuit/plot_data_v.txt
@@ -0,0 +1,153 @@
+ * /home/fossee/esim-workspace/clampercircuit/clampercircuit.cir
+ Transient Analysis Thu Aug 22 14:15:29 2019
+--------------------------------------------------------------------------------
+Index time in_neg in_pos out_neg
+--------------------------------------------------------------------------------
+0 0.000000e+000 0.000000e+000 0.000000e+000 1.944812e-018
+1 1.000000e-005 1.570794e-002 1.570794e-002 1.567041e-002
+2 1.162771e-005 1.826473e-002 1.826473e-002 1.822073e-002
+3 1.488313e-005 2.337829e-002 2.337829e-002 2.332058e-002
+4 2.139398e-005 3.360533e-002 3.360533e-002 3.351497e-002
+5 3.441567e-005 5.405895e-002 5.405895e-002 5.387484e-002
+6 6.045905e-005 9.496314e-002 9.496314e-002 9.437625e-002
+7 9.023818e-005 1.417268e-001 1.417268e-001 1.398778e-001
+8 1.271204e-004 1.996273e-001 1.996273e-001 1.927308e-001
+9 1.691461e-004 2.655691e-001 2.655691e-001 2.408268e-001
+10 2.203033e-004 3.457754e-001 3.457754e-001 2.715756e-001
+11 3.057421e-004 4.795205e-001 4.795205e-001 2.811022e-001
+12 4.301355e-004 6.736008e-001 6.736008e-001 2.791286e-001
+13 5.565338e-004 8.697541e-001 8.697541e-001 2.796190e-001
+14 8.093305e-004 1.257640e+000 1.257640e+000 2.785921e-001
+15 1.314924e-003 2.007232e+000 2.007232e+000 2.765617e-001
+16 2.326110e-003 3.337213e+000 3.337213e+000 2.682917e-001
+17 4.326110e-003 4.888366e+000 4.888366e+000 2.211920e-001
+18 6.326110e-003 4.572330e+000 4.572330e+000 -4.95211e-001
+19 8.326110e-003 2.509819e+000 2.509819e+000 -2.54980e+000
+20 1.032611e-002 -5.11357e-001 -5.11357e-001 -5.56223e+000
+21 1.189320e-002 -2.80157e+000 -2.80157e+000 -7.84593e+000
+22 1.334664e-002 -4.34054e+000 -4.34054e+000 -9.37958e+000
+23 1.511140e-002 -4.99694e+000 -4.99694e+000 -1.00309e+001
+24 1.645191e-002 -4.48882e+000 -4.48882e+000 -9.51993e+000
+25 1.766016e-002 -3.35325e+000 -3.35325e+000 -8.38256e+000
+26 1.950334e-002 -7.76989e-001 -7.76989e-001 -5.80461e+000
+27 2.150334e-002 2.274627e+000 2.274627e+000 -2.75175e+000
+28 2.350334e-002 4.457412e+000 4.457412e+000 -5.67063e-001
+29 2.550334e-002 4.937618e+000 4.937618e+000 -8.30171e-002
+30 2.750334e-002 3.531822e+000 3.531822e+000 -1.48205e+000
+31 2.950334e-002 7.769892e-001 7.769892e-001 -4.22829e+000
+32 3.150334e-002 -2.27463e+000 -2.27463e+000 -7.27134e+000
+33 3.350334e-002 -4.45741e+000 -4.45741e+000 -9.44673e+000
+34 3.550334e-002 -4.93762e+000 -4.93762e+000 -9.92142e+000
+35 3.750334e-002 -3.53182e+000 -3.53182e+000 -8.51213e+000
+36 3.950334e-002 -7.76989e-001 -7.76989e-001 -5.75541e+000
+37 4.150334e-002 2.274627e+000 2.274627e+000 -2.70256e+000
+38 4.350334e-002 4.457412e+000 4.457412e+000 -5.17882e-001
+39 4.550334e-002 4.937618e+000 4.937618e+000 -3.45965e-002
+40 4.750334e-002 3.531822e+000 3.531822e+000 -1.43438e+000
+41 4.950334e-002 7.769892e-001 7.769892e-001 -4.18060e+000
+42 5.150334e-002 -2.27463e+000 -2.27463e+000 -7.22364e+000
+43 5.350334e-002 -4.45741e+000 -4.45741e+000 -9.39903e+000
+44 5.550334e-002 -4.93762e+000 -4.93762e+000 -9.87372e+000
+45 5.750334e-002 -3.53182e+000 -3.53182e+000 -8.46444e+000
+46 5.950334e-002 -7.76989e-001 -7.76989e-001 -5.70772e+000
+47 6.150334e-002 2.274627e+000 2.274627e+000 -2.65488e+000
+48 6.350334e-002 4.457412e+000 4.457412e+000 -4.70212e-001
+49 6.550334e-002 4.937618e+000 4.937618e+000 1.098188e-002
+50 6.750334e-002 3.531822e+000 3.531822e+000 -1.39087e+000
+51 6.950334e-002 7.769892e-001 7.769892e-001 -4.13709e+000
+52 7.150334e-002 -2.27463e+000 -2.27463e+000 -7.18013e+000
+53 7.350334e-002 -4.45741e+000 -4.45741e+000 -9.35551e+000
+54 7.550334e-002 -4.93762e+000 -4.93762e+000 -9.83020e+000
+
+Index time in_neg in_pos out_neg
+--------------------------------------------------------------------------------
+55 7.750334e-002 -3.53182e+000 -3.53182e+000 -8.42092e+000
+56 7.950334e-002 -7.76989e-001 -7.76989e-001 -5.66420e+000
+57 8.150334e-002 2.274627e+000 2.274627e+000 -2.61137e+000
+58 8.350334e-002 4.457412e+000 4.457412e+000 -4.26715e-001
+59 8.550334e-002 4.937618e+000 4.937618e+000 4.983310e-002
+60 8.750334e-002 3.531822e+000 3.531822e+000 -1.35665e+000
+61 8.950334e-002 7.769892e-001 7.769892e-001 -4.10286e+000
+62 9.150334e-002 -2.27463e+000 -2.27463e+000 -7.14589e+000
+63 9.350334e-002 -4.45741e+000 -4.45741e+000 -9.32128e+000
+64 9.550334e-002 -4.93762e+000 -4.93762e+000 -9.79597e+000
+65 9.750334e-002 -3.53182e+000 -3.53182e+000 -8.38669e+000
+66 9.950334e-002 -7.76989e-001 -7.76989e-001 -5.62997e+000
+67 1.000000e-001 -6.12323e-015 -6.12323e-015 -4.85266e+000
+
+ * /home/fossee/esim-workspace/clampercircuit/clampercircuit.cir
+ Transient Analysis Thu Aug 22 14:15:29 2019
+--------------------------------------------------------------------------------
+Index time out_pos
+--------------------------------------------------------------------------------
+0 0.000000e+000 -5.50430e-019
+1 1.000000e-005 1.567377e-002
+2 1.162771e-005 1.822484e-002
+3 1.488313e-005 2.332669e-002
+4 2.139398e-005 3.352874e-002
+5 3.441567e-005 5.392768e-002
+6 6.045905e-005 9.471157e-002
+7 9.023818e-005 1.413291e-001
+8 1.271204e-004 1.990448e-001
+9 1.691461e-004 2.647755e-001
+10 2.203033e-004 3.447257e-001
+11 3.057421e-004 4.780461e-001
+12 4.301355e-004 6.715153e-001
+13 5.565338e-004 8.670559e-001
+14 8.093305e-004 1.253740e+000
+15 1.314924e-003 2.001017e+000
+16 2.326110e-003 3.326722e+000
+17 4.326110e-003 4.870966e+000
+18 6.326110e-003 4.550318e+000
+19 8.326110e-003 2.485428e+000
+20 1.032611e-002 -2.11501e-001
+21 1.189320e-002 -2.99972e-001
+22 1.334664e-002 -3.02076e-002
+23 1.511140e-002 -2.31495e-001
+24 1.645191e-002 6.173036e-001
+25 1.766016e-002 1.748206e+000
+26 1.950334e-002 4.316522e+000
+27 2.150334e-002 7.359580e+000
+28 2.350334e-002 9.534975e+000
+29 2.550334e-002 1.000967e+001
+30 2.750334e-002 8.600377e+000
+31 2.950334e-002 5.843646e+000
+32 3.150334e-002 2.790785e+000
+33 3.350334e-002 6.060850e-001
+34 3.550334e-002 1.218163e-001
+35 3.750334e-002 1.520645e+000
+36 3.950334e-002 4.266886e+000
+37 4.150334e-002 7.309939e+000
+38 4.350334e-002 9.485332e+000
+39 4.550334e-002 9.960021e+000
+40 4.750334e-002 8.550735e+000
+41 4.950334e-002 5.794007e+000
+42 5.150334e-002 2.741153e+000
+43 5.350334e-002 5.564662e-001
+44 5.550334e-002 7.252188e-002
+45 5.750334e-002 1.471657e+000
+46 5.950334e-002 4.217889e+000
+47 6.150334e-002 7.260936e+000
+48 6.350334e-002 9.436327e+000
+49 6.550334e-002 9.911016e+000
+50 6.750334e-002 8.501731e+000
+51 6.950334e-002 5.745007e+000
+52 7.150334e-002 2.692161e+000
+53 7.350334e-002 5.074860e-001
+54 7.550334e-002 2.449607e-002
+
+Index time out_pos
+--------------------------------------------------------------------------------
+55 7.750334e-002 1.424567e+000
+56 7.950334e-002 4.170790e+000
+57 8.150334e-002 7.213832e+000
+58 8.350334e-002 9.389221e+000
+59 8.550334e-002 9.863910e+000
+60 8.750334e-002 8.454626e+000
+61 8.950334e-002 5.697906e+000
+62 9.150334e-002 2.645066e+000
+63 9.350334e-002 4.604035e-001
+64 9.550334e-002 -2.00459e-002
+65 9.750334e-002 1.382549e+000
+66 9.950334e-002 4.128763e+000
+67 1.000000e-001 4.903568e+000