RC串联电路模型介绍,可以参考原文链接:
1、RC串联计算Cs、Rs
/********************************************************
* function:RC串联计算Cs、Rs
* parameter:frq -- 测试频点
* impedence -- 测试阻抗
* phase -- 测试角度
* Cs -- 计算RC的Cs值(uF)
* Rs -- 计算RC的Rs值(Ω)
* return:void
* date:2022.3.28
* note:
* ******************************************************/
void Calculate_Cs_Rs(float frq,float impedence,float phase,double *Cs,double *Rs)
{
double pi = 3.14159265,w = 0.0;
w = 2.0 * pi * frq;
*Rs = impedence / sqrt(1.0 + pow(tan(phase / 180.0 * pi),2));
*Cs = -1.0 / (tan(phase / 180.0 * pi) * w * *Rs) * 1000000.0;
}
2、RC串联计算阻抗、相位
/********************************************************
* function:RC串联计算阻抗、相位
* parameter:frq -- 测试频点
* Cs -- RC的Cs值(uF)
* Rs -- RC的Rs值(Ω)
* impedence -- 阻抗
* phase -- 角度
* return:void
* date:2022.3.28
* note:
* ******************************************************/
void Calculate_Cs_Rs2(float frq,double Cs,double Rs,float *impedence,float *phase)
{
double pi = 3.14159265,w = 0.0;
Cs /= 1000000.0;
w = 2.0 * pi * frq;
*impedence = sqrt(pow(Rs,2) + pow((1.0 / (w * Cs)),2));
*phase = -atan(1.0 / (w * Cs * Rs)) / pi * 180.0;
}
实测:
RL串联:
/********************************************************
-
function:RL串联计算Ls、Rs
-
parameter:frq – 测试频点
-
impedence -- 测试阻抗
-
phase -- 测试角度
-
Ls -- 计算RL的Ls值(uH)
-
Rs -- 计算RL的Rs值(Ω)
-
return:void
-
date:2022.4.7
-
note:
-
******************************************************/
void Calculate_Ls_Rs(float frq,float impedence,float phase,double *Ls,double *Rs)
{
double pi = 3.14159265,w = 0.0;w = 2.0 * pi * frq;
*Rs = impedence / sqrt(1.0 + pow(tan(phase /180.0 * pi),2));
*Ls = *Rs * tan(phase / 180.0 * pi) / w * 1000000.0;
}
/********************************************************
-
function:RL串联计算阻抗、相位
-
parameter:frq – 测试频点
-
Ls -- RL的Ls值(uH)
-
Rs -- RL的Rs值(Ω)
-
impedence -- 阻抗
-
phase -- 角度
-
return:void
-
date:2022.4.7
-
note:
-
******************************************************/
void Calculate_Ls_Rs2(float frq,double Ls,double Rs,float *impedence,float *phase)
{
double pi = 3.14159265,w = 0.0;Ls /= 1000000.0;
w = 2.0 * pi * frq;
impedence = sqrt(pow(Rs,2) + pow(wLs,2));
*phase = atan(w * Ls / Rs) / pi * 180.0;
}