using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Scientific
{
class Transmission
{
//double c;
//double pi = Math.PI;
public Transmission()
{
//c = 1 / Math.Sqrt(4e-7 * Math.PI * 8.854e-12);
}
#region [ Open Line Zin ]
public static cplx OpenLine(double Ueff, double Er, double f, double l, double Z)
{
//f in MHz; l in meter;
double c = 1 / Math.Sqrt(4e-7 * Math.PI * 8.854e-12);
double Vp = c / Math.Sqrt(Ueff * Er);
double lamda = Vp / (f * 1e6);
double eLength = 2 * Math.PI * l / lamda;
double TanE = Math.Tan(eLength);
return new cplx(0, -1 * Z / TanE);
}
public static cplx OpenLine(double eLength, double Z)
{
//eLength in Arc
return new cplx(0, -1 * Z / Math.Tan(eLength));
}
#endregion
#region [ ShorT Line Zin ]
public static cplx ShortLine(double Ueff, double Er, double f, double l, double Z)
{
//f in MHz; l in meter;
double c = 1 / Math.Sqrt(4e-7 * Math.PI * 8.854e-12);// MessageBox.Show(c.ToString());
double Vp = c / Math.Sqrt(Ueff * Er);
double lamda = Vp / (f * 1e6);
double eLength = 2 * Math.PI * l / lamda;
double TanE = Math.Tan(eLength);
return Z * new cplx(0, TanE);
}
public static cplx ShortLine(double eLength, double Z)
{
//eLength in Arc
return Z * new cplx(0, Math.Tan(eLength));
}
#endregion
#region [ Series Line Zin ]
public static cplx Series(double Ueff, double Er, double f, double l, double Z, cplx Zl)
{
//f in MHz; l in meter;
double c = 1 / Math.Sqrt(4e-7 * Math.PI * 8.854e-12);// MessageBox.Show(c.ToString());
double Vp = c / Math.Sqrt(Ueff * Er);
double lamda = Vp / (f * 1e6); //MessageBox.Show(lamda.ToString());
double eLength = 2 * Math.PI * l / lamda;
double TanE = Math.Tan(eLength);
cplx A = Zl + Z * new cplx(0, TanE);
cplx B = Z + Zl * new cplx(0, TanE);
return Z * A / B;
}
public static cplx Series(double eLength, double Z, cplx Zl)
{
//eLength in Arc
double TanE = Math.Tan(eLength);
cplx A = Zl + Z * new cplx(0, TanE);
cplx B = Z + Zl * new cplx(0, TanE);
return Z * A / B;
}
#endregion
#region [ Z StripLine ]
public static double Z_stripline(double Er, double Ueff, double w, double h, double t)
{
double A = 30D * Math.PI * Math.Sqrt(Ueff / Er); //MessageBox.Show("A = " + A.ToString());
double H = 2 * h + t;
double B = (w + H) / (w + t);// MessageBox.Show(Math.Log(B).ToString());
return A * Math.Log(B);
}
#endregion
}
}
Transmission
最新推荐文章于 2022-12-27 14:20:05 发布