微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 微波和射频技术 > 电磁仿真讨论 > Help Me Understand a piece of code.

Help Me Understand a piece of code.

时间:03-31 整理:3721RD 点击:
In order to know how get the IP3,I find this in ads,but I can't understand the sentence that :
decl vIM = (vIMx >= 1e-304)*vIMx + (vIMx < 1e-304)*1e-304; //v3rd
What's the meaning of 1e-304?
The whole code isthis:
defun ip3_out(vOut,fundFreq,imFreq,zRef,Mix)
{
decl z0 = if (zRef == NULL) then 50.0 else zRef;
decl vFund =abs(mix(vOut,fundFreq,Mix)); //v1st
decl vIMx = abs(mix(vOut,imFreq,Mix));
decl vIM = (vIMx >= 1e-304)*vIMx + (vIMx < 1e-304)*1e-304; //v3rd

decl fund = 10 * log(0.5*real(vFund * conj(vFund)/conj(z0)))+30;
decl third = 10 * log(0.5*real(vIM * conj(vIM)/conj(z0)))+30;
return 0.5*(3*fund-third);

/*
decl vFund3 = pow(vFund,3);
decl toi = 10*log(vFund3/(2*z0*vIM));
return toi + 30;
*/
} //fun - ip3_out()

regards
Yang

How to translate this code to mathematical expression.

Regards
Yang

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top