The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 8:29am
Pages: 1
Send Topic Print
model of filter (Read 1603 times)
pdrobh
New Member
*
Offline



Posts: 1

model of filter
Apr 30th, 2010, 12:14pm
 
Hi everyone,
Well I would like to do a pass band filter model, with noise figure=3db, and high order transfer function;
I know how to create a model with the transfer function or with the noise parameter, but I can't do it with both.
This filter is the first block of a cascade system.
I create this code @t verilog-a:

`define db10_to_real(x)  (pow(10, (x)/10))  

module pbf_1_1_rf(ain1, aout1);

  input ain1;
  output aout1;
  electrical ain1, aout1;

 parameter real Gain     = 1.0;      // Gain of the filter.
 parameter NF=3;
 parameter Rin=50;

real real_NF,a1;

  analog begin

real_NF    = `db10_to_real(NF);

// Modeling the Filter complex input impedance
   I(ain1) <+  V(ain1)/Rin;
     
   // Adding the Noise Figure effect
   I(ain1) <+  white_noise((real_NF-1.0) * 4 * `P_K * $temperature / Rin);  
 // V(ain1,ground) <+ 50*I(ain1);
     
// a1=0.5*(V(ain1)/sqrt(50));
   
     V(aout1, ground) <+ Gain*laplace_nd(V(ain1, ground), {9.219310539265049e81,7.524676473000738e83,4.325801870411197e74,1.32231383039810
3e65,7.327525707109294e55,8.278418578192012e45,4.461057806890000e36,2.2117483486
06223e26,1.165129004142420e17,2.145654472089892e6,1.108504598650085e-3},
{1.952521825393577e97,2.465418499573499e86,3.414115807481905e78,3.43752197553887
8e67,2.382843994656680e59,1.792896889463470e48,8.297856957628673e39,4.1459469090
33728e28,1.441782693933439e20,3.586626489076120e8,1});      
 
       
  end
endmodule

thanks
Back to top
 
 
View Profile   IP Logged
Marq Kole
Senior Member
****
Offline

Hmmm. That's
weird...

Posts: 122
Eindhoven, The Netherlands
Re: model of filter
Reply #1 - May 14th, 2010, 1:39am
 
So what's the problem? Syntax error? Run-time error? No noise? No filter action? Give us a few more clues on what's wrong with your model.

As a divide-and-conquer strategy, why not cascade a noiseless filter and a noisy all-pass as separate models.

Marq
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.