Hello All,
I have a filter that I need to use in PSS + PAC and PSS + Pnoise simulations. I checked that it works fine in PSS and PAC simulations. I have two questions in this regard.
1. I wanted to know from you if there are any issues using the Laplace function for this filter as many sources suggest avoiding the use of Laplace function.
2. I wish to have an initial condition to the output of this filter that is not 0. Is there a way to add that to the code? Please let me know.
Code:// VerilogA for zz_aarakali, filter_with_a_notch, veriloga
`include "constants.vams"
`include "disciplines.vams"
module filter_with_a_notch(in,out);
input in;
output out;
voltage in,out;
parameter f_notch=480e6;
parameter f_lpf=200e6;
real wz,wp;
real n[0:2],d[0:3];
analog begin
wz=2*`M_PI*f_notch;
wp=2*`M_PI*f_lpf;
n[0]=1;
n[1]=0;
n[2]=1/wz/wz;
d[0]=1;
d[1]=2/wp;
d[2]=2/wp/wp;
d[3]=1/wp/wp/wp;
V(out) <+ laplace_nd(V(in),n,d);
end
endmodul