The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> How to differentiate in 2nd order
https://designers-guide.org/forum/YaBB.pl?num=1322839878

Message started by aistudy on Dec 2nd, 2011, 7:31am

Title: How to differentiate in 2nd order
Post by aistudy on Dec 2nd, 2011, 7:31am

Hello,

i'm converting Agilent ADS SDD's with functionality for FET RF-components to Verilog-A.

I've a problem to convert a weighted function for using with Verilog-A.

The SDD-Part and resulting function looks as follows:

F[6,0]=-_i6
F[6,6]=(_v6*_v2)
H[6]=rth_/(1+j*2*PI*freq*tauD)+rthf/(1+j*2*PI*freq*tauDF)

--> 0 = -_i6 + (_v6*_v2) * (rth_/(1+j*2*PI*freq*tauD) + rthf/(1+j*2*PI*freq*tauDF))

I've converted the it in Verilog-A to following function:
I(tor6) <+ (rthf + rth_) * (_v6*_v2) + (rthf * tauD + rth_*tauDF) * ddt(_v6*_v2) - (tauD+tauDF) * ddt(_i6) - (tauD+tauDF) * ddt(ddt(_i6));

The simulation results of the whole component varies about two to four decimals from original in S-Parameter simulation.

I must convert the function which depends on the frequency to the time domain. I think this could be the problem, because I need for this calculation a diffential 2nd order. I solved this by using ddt(ddt(x)). I this correct?

Is there any possibility to use frequency dependend functions in Verilog-A and if yes can someone tell me how?

If I want to give freq-value from ADS as parameter I get the error message:
"Improper frequency dependence in `SDD_va' parameters"
How can I solve this problem?

Thanks
aistudy

Title: Re: How to differentiate in 2nd order
Post by Geoffrey_Coram on Dec 5th, 2011, 1:17pm

I haven't fully comprehended what you're trying to do, but I have concerns about ddt(ddt(x)) in an expression.  I would try adding an internal node.

electrical ddtnode;

I(ddtnode) <+ V(ddtnode) + ddt(_i6);
I(tor6) <+ ... * ddt(V(ddtnode));

Title: Re: How to differentiate in 2nd order
Post by aistudy on Dec 5th, 2011, 2:30pm

Hi,

I must use the following differential equation for calculating the current _i6:

0 = -_i6 + (_v6*_v2) * (rth_/(1+j*2*PI*freq*tauD) + rthf/(1+j*2*PI*freq*tauDF))

at the moment I'm using the following statement in Verilog to assign the current:

I(tor6) <+ (rthf + rth_) * (_v6*_v2) + (rthf * tauD + rth_*tauDF) * ddt(_v6*_v2) - (tauD+tauDF) * ddt(_i6) - (tauD+tauDF) * ddt(ddt(_i6));

But it seems that there's something wrong, or Verilog don't accept the  ddt(ddt(_i6)). The DC-Simulation is ok, but the S-Parameters varies two decimals behind the decimal point.

You mean I should do something like this?
I(ddtnode) <+ ddt(_i6);
I(tor6) <+ (rthf + rth_) * (_v6*_v2) + (rthf * tauD + rth_*tauDF) * ddt(_v6*_v2) - (tauD+tauDF) * ddt(_i6) - (tauD+tauDF) * ddt(I(ddtnode))

---
The original equation is in the frequency domain, at the moment I convert it to the time domain for Verilog. Is there any possibility to use directly the equation in frequency domain and give the "freq" value from Agilent ADS to the Verilog module as parameter?

Thanks a lot
aistudy


Title: Re: How to differentiate in 2nd order
Post by boe on Dec 6th, 2011, 4:46am


aistudy wrote on Dec 5th, 2011, 2:30pm:
...
You mean I should do something like this?
I(ddtnode) <+ ddt(_i6);
I(tor6) <+ (rthf + rth_) * (_v6*_v2) + (rthf * tauD + rth_*tauDF) * ddt(_v6*_v2) - (tauD+tauDF) * ddt(_i6) - (tauD+tauDF) * ddt(I(ddtnode))
Yes, I think that's what Geoffrey meant. Some simulators do not support nested ddt's.


Quote:
The original equation is in the frequency domain, at the moment I convert it to the time domain for Verilog. Is there any possibility to use directly the equation in frequency domain and give the "freq" value from Agilent ADS to the Verilog module as parameter?
There are the laplace filters, which allow implementation of (constant) transfer functions.

- B O E

Title: Re: How to differentiate in 2nd order
Post by aistudy on Dec 6th, 2011, 9:52am

Hi,

what do you mean with "constant", in my case I want to use it with the given frequency value from Agilent ADS. Is this possible?

Can you tell me which laplace function I have to use? I'm at the moment a amateur but I want to learn. I've tested to use laplace_nd but I've no reason why it doesn't work. This is the case because I  convert the equation to time domain.

Thanks a lot
aistudy

Title: Re: How to differentiate in 2nd order
Post by boe on Dec 8th, 2011, 3:50am

Hi aistudy,

aistudy wrote on Dec 6th, 2011, 9:52am:
what do you mean with "constant", ...
Time-invariant.


Quote:
Can you tell me which laplace function I have to use? I'm at the moment a amateur but I want to learn. I've tested to use laplace_nd but I've no reason why it doesn't work. This is the case because I  convert the equation to time domain.
You choose the Laplace filter function depending on the form of the transfer function you want to use - as you can see in the L(anguage)R(eference)M(anual).

- B O E

Title: Re: How to differentiate in 2nd order
Post by aistudy on Dec 8th, 2011, 9:45am

Hello boe,

sorry, but I do not know which laplace-function I have to choose for the following equation:

0 = -_i6 + (_v6*_v2) * (rth_/(1+j*2*PI*freq*tauD) + rthf/(1+j*2*PI*freq*tauDF))

This equation should result in an assignment of Current to _i6 and is in frequency domain. Can you help me a little bit to understand?

I'm also not sure if it is constant, because the value "freq" comes from Agilent ADS and will be changed during simulation.

Thanks a lot
aistudy

Title: Re: How to differentiate in 2nd order
Post by boe on Dec 12th, 2011, 12:16pm

aistudy,
your transfer function seems to be
rth_/(1+s*tauD)+rthf/(1+s*tauDF).
It should not be too hard to convert that into a quotient of two polynomials.

- B O E

Title: Re: How to differentiate in 2nd order
Post by aistudy on Dec 12th, 2011, 2:37pm

Hi boe,

I transfered it into

_i6 = (rthf + rth_) * (_v6*_v2) + (rthf * tauD + rth_*tauDF) * ddt(_v6*_v2) - (tauD+tauDF) * ddt(_i6) - (tauD+tauDF) * ddt(ddt(_i6));

I think this should be the correct transformation. Can you help me a little bit, because I'm not so good in system theory. I've only learned the bases.

Thanks
aistudy

Title: Re: How to differentiate in 2nd order
Post by Geoffrey_Coram on Dec 14th, 2011, 8:46am

BOE meant you should convert rth_/(1+s*tauD)+rthf/(1+s*tauDF)
into something like
A (1 - s/z1)(1 - s/z2) / ( (1 - s/p1)(1 - s/p2) )

and now z1,z2 are the zeros and p1,p2 are the poles that would go into the laplace_zp (zero-pole) function.

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