The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design Languages >> Verilog-AMS >> model of filter https://designers-guide.org/forum/YaBB.pl?num=1272654847 Message started by pdrobh on Apr 30th, 2010, 12:14pm |
Title: model of filter Post by pdrobh on 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.322313830398103e65,7.327525707109294e55,8.278418578192012e45,4.461057806890000e36,2.211748348606223e26,1.165129004142420e17,2.145654472089892e6,1.108504598650085e-3}, {1.952521825393577e97,2.465418499573499e86,3.414115807481905e78,3.437521975538878e67,2.382843994656680e59,1.792896889463470e48,8.297856957628673e39,4.145946909033728e28,1.441782693933439e20,3.586626489076120e8,1}); end endmodule thanks |
Title: Re: model of filter Post by Marq Kole on 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 |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |