I would like to take the inverse laplace transform of a transfer function.

33 vues (au cours des 30 derniers jours)
I got a transfer function using MATLAB's tf command.
I need to take the inverse laplace transform of said transfer function but I can't seem to get it.
My code looks like this
%-Element values
R(1) = 100000;
R(2) = R(1);
L = 4.7*10^-3;
C = 0.001*10^-9;
for i = 1:2
G(i) = 1/R1;
end
%-Define constants
a = G(i)*G(i)/C;
b = (G(i)+G(i));
e = L*C;
c = (G(i)*G(i)*L+C)/(e);
d = G(i)/e;
f = 0
numerator = [a f];
denominator = [b c d];
transfer_function = tf(numerator, denominator)
transfer_function= F;
syms s t
g = ilaplace(F)
[response , time] = step(transfer_function);
plot(time, response)
xlabel('Time(s)');
ylabel('Magnitude(V)');
axis([time(1) time(end) min(response) 1.05*max(response)]);
grid;
grid minor;
I get the following error "Check for incorrect argument data type or missing argument in call to function 'ilaplace'.
Error in ME330Assignment2 (line 27)
g = ilaplace(F)"
Any guidance is appreciated. Thank you!

Réponse acceptée

Star Strider
Star Strider le 24 Avr 2022
The Control System Toolbox tf objects cannot directly be used as symbolic objects. So it has to be re-defined as a symbolic fraction.
There were a few other problems that I corrected.
%-Element values
R(1) = 100000;
R(2) = R(1);
L = 4.7E-3;
C = 0.001E-9;
for i = 1:2
G(i) = 1/R(i);
end
%-Define constants
a = G(i)*G(i)/C;
b = (G(i)+G(i));
e = L*C;
c = (G(i)*G(i)*L+C)/(e);
d = G(i)/e;
f = 0
f = 0
numerator = [a f];
denominator = [b c d];
transfer_function = tf(numerator, denominator)
transfer_function = 100 s ------------------------------ 2e-05 s^2 + 312.8 s + 2.128e09 Continuous-time transfer function.
% F = transfer_function;
syms s t
F = poly2sym([a f],s) / poly2sym([b c d],s)
F = 
F = simplifyFraction(F)
F = 
g = ilaplace(F)
g = 
g = simplifyFraction(g)
g = 
gstep = ilaplace(F * laplace(heaviside(t))) % Provide An Input
gstep = 
gstep = simplifyFraction(gstep)
gstep = 
figure
fplot(gstep, [0 1E-6])
grid
[response , time] = step(transfer_function);
figure
plot(time, response)
xlabel('Time(s)');
ylabel('Magnitude(V)');
axis([time(1) time(end) min(response) 1.05*max(response)]);
grid;
grid minor;
.

Plus de réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by