The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 4:38pm
Pages: 1
Send Topic Print
2nd order passive low pass filter (Read 12883 times)
ultimate
New Member
*
Offline



Posts: 2

2nd order passive low pass filter
Feb 19th, 2010, 10:35am
 
hello,

can somebody give me the verilog A code for 2nd order passive rc low pass filter(capacitors c1 c2 and resistor r)..
Back to top
 
 
View Profile   IP Logged
pancho_hideboo
Senior Fellow
******
Offline



Posts: 1424
Real Homeless
Re: 2nd order passive low pass filter
Reply #1 - Feb 19th, 2010, 11:14pm
 
The followings are general notes for you.

- Always describe vendor's name and tool's name which you use.
- Don't do multiple posts which are same content.
- Don't request source code or behavioral model without any efforts.
- There are many simulators which have analyses called as PSS, PAC and Pnoise.
- Describe in detail with using correct terminologies.
- Warnigns are different from Errors.
- ADS is not name of simulator.
- There is no tool which name is Cadence.
- Don't use Direct Plot of Cadence ADE blindly without knowing definition.
- All gains in Direct Plot of Cadence ADE are "right", "true" and "practical" voltage gain.
- Don't mix up Simulation with Post Processing. They are completely different phase.
- MATLAB are different from Simulink.
- Learn measurements using actual instruments. Not "EDA Tool Play

ultimate wrote on Feb 19th, 2010, 10:35am:
can somebody give me the verilog A code for 2nd order passive rc low pass filter(capacitors c1 c2 and resistor r)..

If you need physical modeling using R and C, you don't have to use Verilog-A.
And you can never generate complex poles if you use only R and C.

For behavioral modeling not physical modeling, what type of model do you need, bidirectional or unidirectional ?
Do you need input and output impedance ?
Is your requirement enough with signal flow model ?

For example, if we use S-parameter formulation, there are three options at least.

(1) Model expressing only S21.
(2) Model expressing {S11, S21, S22}.
(3) Model expressing {S11, S12, S21, S22}, that is, full model.

(1) and (2) are unidirectional.
(3) is bidirectional.
Back to top
 
« Last Edit: Feb 20th, 2010, 2:56am by pancho_hideboo »  
View Profile WWW Top+Secret Top+Secret   IP Logged
Marq Kole
Senior Member
****
Offline

Hmmm. That's
weird...

Posts: 122
Eindhoven, The Netherlands
Re: 2nd order passive low pass filter
Reply #2 - Mar 2nd, 2010, 6:15am
 
If you want a model, here it is; for the rest I agree completely with Pancho.


`include "disciplines.vams"

module lpf(in, out, gnd);

 parameter real c1 = 100p from [0:inf);
 parameter real r1 = 10k from [0:inf);
 parameter real c2 = 1p from [0:inf);

 inout in, out, gnd;
 electrical in, out, gnd;

 electrical n1;

 analog begin
   I(n1, gnd) <+ c1 * ddt(V(n1, gnd));
   V(in, n1)  <+ r1 * I(in, n1);
   I(in, gnd) <+ c2 * ddt(V(in, gnd));
   V(in, out) <+ 0;
 end

endmodule


Back to top
 
 
View Profile   IP Logged
pancho_hideboo
Senior Fellow
******
Offline



Posts: 1424
Real Homeless
Re: 2nd order passive low pass filter
Reply #3 - Mar 2nd, 2010, 6:47am
 
Marq Kole wrote on Mar 2nd, 2010, 6:15am:
 analog begin
   I(n1, gnd) <+ c1 * ddt(V(n1, gnd));
   V(in, n1)  <+ r1 * I(in, n1);
   I(in, gnd) <+ c2 * ddt(V(in, gnd));
   V(in, out) <+ 0;
 end
???????
What LPF do you want to realize ?

Don't you have typo for "V(n1, out) <+ 0;"



I think it should be : Quote:
module lpf(in, out, ref);

parameter real r1 = 10k from [0:inf);
parameter real c1 = 100p from [0:inf);
parameter real r2 = 1k from [0:inf);
parameter real c2 = 1p from [0:inf);

inout in, out, ref;
voltage in, out, ref;

electrical n1, n2, n3, n4;

analog begin
  V(n1) <+ V(in, ref);

  V(n1, n2)  <+ r1 * I(n1, n2);
  I(n2) <+ c1 * ddt(V(n2));

  V(n3) <+ V(n2);

  V(n3, n4)  <+ r2 * I(n3, n4);
  I(n4) <+ c2 * ddt(V(n4));

  V(out, ref) <+ V(n4);
end

endmodule

This is "Signal Flow Model" for second order RC LPF.




Back to top
 
 
View Profile WWW Top+Secret Top+Secret   IP Logged
Marq Kole
Senior Member
****
Offline

Hmmm. That's
weird...

Posts: 122
Eindhoven, The Netherlands
Re: 2nd order passive low pass filter
Reply #4 - Mar 2nd, 2010, 7:21am
 
Hi Pancho,

This is not signal flow, this is current input, voltage output, the kind of model you would use in a simple PLL. The input is attached to the charge pump which delivers a current, while the output is connected to the VCO which requires a voltage. If you read the specifications there was a specific request for c1, c2 and r - then I guessed this was kind-of the application needed for this filter which I had laying around anyway.

Cheers,
Marq
Back to top
 
 
View Profile   IP Logged
pancho_hideboo
Senior Fellow
******
Offline



Posts: 1424
Real Homeless
Re: 2nd order passive low pass filter
Reply #5 - Mar 2nd, 2010, 7:26am
 
Marq Kole wrote on Mar 2nd, 2010, 7:21am:
the kind of model you would use in a simple PLL.
I got.
Back to top
 
 
View Profile WWW Top+Secret Top+Secret   IP Logged
zahrein
Junior Member
**
Offline



Posts: 14

Re: 2nd order passive low pass filter
Reply #6 - Nov 9th, 2011, 9:32pm
 
Quote:
module lpf(in, out, ref);

parameter real r1 = 10k from [0:inf);
parameter real c1 = 100p from [0:inf);
parameter real r2 = 1k from [0:inf);
parameter real c2 = 1p from [0:inf);

inout in, out, ref;
voltage in, out, ref;

electrical n1, n2, n3, n4;

analog begin
 V(n1) <+ V(in, ref);

 V(n1, n2)  <+ r1 * I(n1, n2);
 I(n2) <+ c1 * ddt(V(n2));

 V(n3) <+ V(n2);

 V(n3, n4)  <+ r2 * I(n3, n4);
 I(n4) <+ c2 * ddt(V(n4));

 V(out, ref) <+ V(n4);
end

endmodule


May i know the "ref"  refer to what output from the  p/f detector?
Back to top
 
 
View Profile   IP Logged
Marq Kole
Senior Member
****
Offline

Hmmm. That's
weird...

Posts: 122
Eindhoven, The Netherlands
Re: 2nd order passive low pass filter
Reply #7 - Nov 13th, 2011, 1:27pm
 
ref = signal ground.

In most applications it will be connected to the vss, gnd, or whatever is your reference signal level.

Cheers,
Marq
Back to top
 
 
View Profile   IP Logged
zahrein
Junior Member
**
Offline



Posts: 14

Re: 2nd order passive low pass filter
Reply #8 - Nov 13th, 2011, 5:18pm
 
i see  thanks  for the info.
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.