ranjang
Junior Member
Offline
Posts: 13
india
|
Hi,
I am just writing code series rlc circuit like below.
module series_rlc(p,n); inout p,n; electrical p,n; parameter r=1; parameter l=1u; parameter c=1u; real vr; real vl; real vc; analog begin V(p,n)<+r*I(p,n); vr=r*I(p,n); V(p,n)<+ l*ddt(I(p,n)); vl=(l*ddt(I(p,n))); V(p,n)<+(1/c)*idt(I(p,n)); vc=(1/c)*idt(I(p,n)); end
But when I check vl in waves it is always showing zero. I've two questions 1>why the values of vl is zero if I apply a dc or pulse voltage source with enough high and low pulse (around 10 us high and 10 us low on p) 2>what will this vr,vl,and vc values display will it give voltage across resistor,voltage across inductor,voltage across capacitor individually or something else.
|