The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> why the filter based on laplace_nd can't be used to do transient simulation?
https://designers-guide.org/forum/YaBB.pl?num=1598607278

Message started by lwzunique on Aug 28th, 2020, 2:34am

Title: why the filter based on laplace_nd can't be used to do transient simulation?
Post by lwzunique on 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[1]=a1;
a[2]=a2;
a[3]=a3;
a[4]=a4;
b[0]=b0;
b[1]=b1;
end
V(out)<+ laplace_nd(V(in),a,b);
end
endmodule




so what is wrong? thanks

Title: Re: why the filter based on laplace_nd can't be used to do transient simulation?
Post by Ken Kundert on 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

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.