Hi,
Please add your .asc file to your post.
[attachimg=2]
When I run this model I get a similar result to what you are reporting.
[attachimg=1]
The reason for this is I rotated C2 180 degrees when I drew the schematic.
If you look at the SPICE netlist you can see this:
C1 v_c1 0 1u IC=1
C2 0 v_c2 1u IC=1
R1 v_c1 0 1Meg
R2 v_c2 0 1Meg
.tran 3 uic
* Intial Conditions
.backanno
The IC has a sign, it assumes that the first node is the positive node.
C1 node_1 node_2 1u IC=1
Means node_1 is 1V with respect to node_2
It is the same for currents.
Regards,
Jay_Diddy_B
Hi,
Please add your .asc file to your post.
(Attachment Link)
When I run this model I get a similar result to what you are reporting.
(Attachment Link)
The reason for this is I rotated C2 180 degrees when I drew the schematic.
If you look at the SPICE netlist you can see this:
C1 v_c1 0 1u IC=1
C2 0 v_c2 1u IC=1
R1 v_c1 0 1Meg
R2 v_c2 0 1Meg
.tran 3 uic
* Intial Conditions
.backanno
The IC has a sign, it assumes that the first node is the positive node.
C1 node_1 node_2 1u IC=1
Means node_1 is 1V with respect to node_2
It is the same for currents.
Regards,
Jay_Diddy_B
I didn't know about this IC parameter and never used it.
But given what it does, I think that's one more reason to stick to .ic directives.
You'd add the following on the schematic instead:
.ic V(v_c1)=1 V(V_c2)=1
Unambiguous and doesn't rely on any particular orientation of the parts (which I think is nasty.)
What version are you using?
XVII(x64)
Also, why is B3 dependent on I(C2)?
Because otherwise I can not get it to converge, I guess due to the infinite feedback it would create if I used I(C1).
The reason for this is I rotated C2 180 degrees when I drew the schematic.
If you look at the SPICE netlist you can see this:
C1 v_c1 0 1u IC=1
C2 0 v_c2 1u IC=1
R1 v_c1 0 1Meg
R2 v_c2 0 1Meg
.tran 3 uic
* Intial Conditions
.backanno
The IC has a sign, it assumes that the first node is the positive node.
C1 node_1 node_2 1u IC=1
Means node_1 is 1V with respect to node_2
It is the same for currents.
Yes I see that, but I didn't rotate any capacitors according to my netlist (.asc file)
C1 v_c1 0 1.2n IC=100
L1 0 N003 1µ
R3 N001 v_c1 14
C2 v_c2 0 1.2n IC=100
L3 0 N002 1µ
R1 N002 v_c2 14
B3 N001 N003 I=-I(C2)*2
.tran 1u
* RLC circuit
* Mirror circuit
.backanno
.end
So could could the difference in dc level have something to do with inductor BEMF?
You'd add the following on the schematic instead:
.ic V(v_c1)=1 V(V_c2)=1
Unambiguous and doesn't rely on any particular orientation of the parts (which I think is nasty.)
Great tip, thank you.