The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> Filter to be used in PSS and Pnoise
https://designers-guide.org/forum/YaBB.pl?num=1476465430

Message started by WishToRemainAnonymous on Oct 14th, 2016, 10:17am

Title: Filter to be used in PSS and Pnoise
Post by WishToRemainAnonymous on Oct 14th, 2016, 10:17am

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

Title: Re: Filter to be used in PSS and Pnoise
Post by Ken Kundert on Oct 14th, 2016, 11:41am

I know of no issue with the laplace filters.

The transient analysis starts with a DC analysis to set the initial condition. There is no support for explicitly setting the initial condition on the laplace filter itself. If you need it to start from zero, then you should probably skip the DC analysis entirely.

-Ken

Title: Re: Filter to be used in PSS and Pnoise
Post by WishToRemainAnonymous on Oct 14th, 2016, 11:47am

Thanks Ken for the information! There are no known issues using "Laplace" function in a block that is to be used in PSS + Pnoise simulations right? Please let me know.

Title: Re: Filter to be used in PSS and Pnoise
Post by Ken Kundert on Oct 14th, 2016, 7:47pm

I know of no issue with the laplace filters.

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