필터 지우기
필터 지우기

I want to do a general code to make a transfer function of any rlc circuit

조회 수: 68 (최근 30일)
Luai
Luai 2023년 12월 28일
편집: Luai 2023년 12월 29일
is there any functions or tips to help me in the code. the user only knows the R, L and C values, the currents are unknowns, the laplace out and input of the circuit are determined by the user and the code doesnt know what are they. i know it is a bit complecated, the professor gave us this assignment and the dead line is two days away.
again i have to do a general code to generate any transfer function of an rlc circuit with any number of loops and any cmbination of elements.

답변 (1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023년 12월 28일
The transfer function of RLC circuit will be derived using input voltage vs. voltage across capacitor (1) or input voltage vs. current (2):
(1) Considering Vout vs. Vin a simple series RLC circuitry:
Vout/Vin = 1/(LCs^2+RCs+1) can be also written as (1/LC)/(s^2+R/L+1/LC)
(2) The relationship between current and input voltage then,
I/Vin = 1/(R+Ls+1/Cs)
OR
I/Vin = Cs/(CLs^2+CRs+1)
R = 100; % Ohm
L = 20; % H
C = 1e-6; % F
NUM1 = 1;
DEN1 = [L*C R*C 1];
TF1 = tf(NUM1, DEN1)
TF1 = 1 ------------------------ 2e-05 s^2 + 0.0001 s + 1 Continuous-time transfer function.
NUM2 = [C 0];
DEN2 = [C*L R*C 1];
TF2 = tf(NUM2, DEN2)
TF2 = 1e-06 s ------------------------ 2e-05 s^2 + 0.0001 s + 1 Continuous-time transfer function.
  댓글 수: 4
Sam Chak
Sam Chak 2023년 12월 29일
Now, if such an auto-modeling MATLAB function is available, how do you (as a user) validate the accuracy of the transfer function? Would 100% trust all results without any exceptions?
As an Electrical Design Engineer, I would prefer to have a function that can covert the circuits from LTspice, and Proteus to an equivalent Simscape block diagram.
Luai
Luai 2023년 12월 29일
편집: Luai 2023년 12월 29일
how? my major is electric engineering too but my knowledge in matlab is a little.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Circuits and Systems에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by