Matlab Transfer function multiple single s terms
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Aaron Frost
am 20 Feb. 2023
Kommentiert: Paul
am 22 Feb. 2023
How can modify this script in order to get the transfer function shown in the picutre. Thanks.
C1 = 0.000000000150;
C2 = 0.000000000470;
R1 = 10000;
R2 = 180000;
R3 = 2700;
R4 = 56000;
A = 1/(C1*R2);
B = 1/(C2*R2);
C = (1/(C1*R1))*(1-G);
D = 1/(C1*C2*R1*R2);
G = (R3+R4)/R3;
%{
Numerator = {[G 0 0] };
Denominator = {[1 0] [A] [B] [C] [0 D]};
T = tf(Numerator, Denominator)
%}
T = tf([G 0 0], {[1] [A] [B] [C] [0 D]})
0 Kommentare
Akzeptierte Antwort
Sulaymon Eshkabilov
am 20 Feb. 2023
Here it is:
C1 = 0.000000000150;
C2 = 0.000000000470;
R1 = 10000;
R2 = 180000;
R3 = 2700;
R4 = 56000;
G = (R3+R4)/R3;
A = 1/(C1*R2);
B = 1/(C2*R2);
C = (1/(C1*R1))*(1-G);
D = 1/(C1*C2*R1*R2);
%{
Numerator = {[G 0 0] };
Denominator = {[1 0] [A] [B] [C] [0 D]};
T = tf(Numerator, Denominator)
%}
T = tf([G 0 0], [1 (A+B+C) -D])
0 Kommentare
Weitere Antworten (1)
Walter Roberson
am 20 Feb. 2023
syms G C_1 R_2 C_2 R_1 s R_3 R_4
G = (R_3 + R_4)/R_3
vratio = G*s^2/ ( s^2 + s * (1/(C_1*R_2) + 1/(C_2*R_2) + 1/(C_1*R_1)*(1-G)) + 1/(C_1*C_2*R_1*R_2) )
vex = expand(vratio);
[N, D] = numden(vex)
Nc = collect(N, s);
Dc = collect(D, s);
vpretty = Nc/Dc
NCs = coeffs(Nc, s, 'all')
DCs = coeffs(Dc, s, 'all')
C1 = 0.000000000150;
C2 = 0.000000000470;
R1 = 10000;
R2 = 180000;
R3 = 2700;
R4 = 56000;
NC = double(subs(NCs, [C_1, C_2, R_1, R_2, R_3, R_4], [C1, C2, R1, R2, R3, R4]));
DC = double(subs(DCs, [C_1, C_2, R_1, R_2, R_3, R_4], [C1, C2, R1, R2, R3, R4]));
leading = DC(1);
NC = NC ./ leading;
DC = DC ./ leading;
sys = tf(NC, DC)
2 Kommentare
Paul
am 22 Feb. 2023
But the CST can handle this directly without too much complication, even if the desire is to have a general expression
s = tf('s');
G = @(R_3,R_4) ((R_3 + R_4)/R_3);
vratio = @(C_1,C_2,R_1,R_2,R_3,R_4) G(R_3,R_4)*s^2/ ( s^2 + s * (1/(C_1*R_2) + 1/(C_2*R_2) + 1/(C_1*R_1)*(1-G(R_3,R_4))) + 1/(C_1*C_2*R_1*R_2) );
C1 = 0.000000000150;
C2 = 0.000000000470;
R1 = 10000;
R2 = 180000;
R3 = 2700;
R4 = 56000;
vratio(C1,C2,R1,R2,R3,R4)
Unrelated comment, but I have my suspicions about the expression for vratio in the question. I thought that circuits composed of just (positive) resistors and (positive) capacitors can't be unstable, whereas vratio clearly is.
Siehe auch
Kategorien
Find more on Stability Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!