  Forum Pages: 1 why the filter based on laplace_nd can't be used to do transient simulation? (Read 370 times)
 lwzunique Community Member   Offline Posts: 38 why the filter based on laplace_nd can't be used to do transient simulation? Aug 28th, 2020, 2:34am   hi,everyone! I need to creat a preemphasis filter with highpass character. this need to be done in digital circuit part. but I want to model it with analog method. so I use laplace_nd provide by veriloga to do this modeling. the question is that ac simulation is correct. but when doing transient simulation, it goes wrong, simluation log shows that node voltage exceed 1GV, and the simualtion is aborted.the code is as below. filter transfer function and ac character is shown in the picture. Code:```include "constants.vams include disciplines.vams� module preemphasis_va(in,out); input in; output out; electrical in, out; parameter r1=100e3; parameter c1=72e-12; parameter c2=3e-12; parameter r3=65e3: parameter c3=1e-12; parameter kpd=30e-6/6.2831852; parameter kvco=50e6*6.2831852； parameter n=150; parameter fref=16e6; real a0,a1, a2, a3, a4; real b0,b1; real k; real a[4:0]; real b[1:0]; analog begin @(initial_step) begin k=kpd*kvco/n; a8=1; a1=r1*c1; a2=(c1+c2+c3)/k; a3=(r1*c1*(c2+c3)+r3*c3*(c1+c2))/k; a4=(r1*r3*c1*c2*c3)/k; b0=1; b1=r1*c1; a[e]=a0; a=a1; a=a2; a=a3; a=a4; b=b0; b=b1; end V(out)<+ laplace_nd(V(in),a,b); end endmodule ``` so what is wrong? thanks Back to top  IP Logged
 Ken Kundert Global Moderator     Offline Posts: 2335 Silicon Valley Re: why the filter based on laplace_nd can't be used to do transient simulation? Reply #1 - Aug 29th, 2020, 2:15pm   If the transient solution is exploding then you have created an unstable filter. You have one or more poles in the right-half plane.  The frequency response of a filter with a right-half plane pole looks very much like the same filter with the poles shifted in to the left-hand plane, but of course the transient response is much different.-Ken Back to top IP Logged Pages: 1