How can I use Symbolic Math Toolbox functionalities to solve for the transfer function of an arbitrary RLC circuit?

조회 수: 27 (최근 30일)
I have an RLC circuit for which after applying Kirchhoff's current law at a node I obtain the following expressions:
I1 = V1/R2;
I2 = (V2 - V1)/(L*s + R1);
I3 = (V2 - V1)*s*C;
I1 = I2 + I3;
How can I use the Symbolic Math Toolbox to find the transfer function, expressed by V2 / V1, in terms of the R-L-C component values?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2023년 11월 17일
편집: MathWorks Support Team 2023년 11월 17일
You can follow the approach below:
>> syms R1 R2 L C V2 V1 s;
>> eqns = [V1/R2 == (V2 - V1)/(L*s + R1) + (V2 - V1)*s*C]; % representing the equation I1 = I2 + I3 using their exact expressions
>> V2tmp = solve(eqns, V2); % Here I am solving for the above equation for the variable "V2"
>> TF = simplify(V2tmp/V1) % this step is computing the transfer function and calling the "simplify" on the result
TF =(R1 + R2 + L*s + C*L*R2*s^2 + C*R1*R2*s)/(R2*(C*L*s^2 + C*R1*s + 1))
Here are the documentation links for "solve" and "simplify" for your reference:
Similar steps can be followed to generate the transfer function for any RLC circuit using Symbolic Math Toolbox.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by