multiplication to produce a step response in the symbolic code. Now added, with comment. plotting transfer function / time domain version
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi guys,
I am trying to plot a Laplace domain function I have, however when I use fplot or step() the graph shows nothing at all. How do I fix this?
Code Below:
clear
clc
P = [8.925*10^-20 11.925*10^-15 17.995*10^-10 6.625 10^5];
poles = roots(P);
poles = poles';
Q = [2.25*10^-20 5.25*10^-15 1.5*10^-5 3*10^-5];
zeros = roots(Q);
zeros = zeros';
FT = tf(zeros,poles);
syms s t z
snum = poly2sym(zeros,s);
sden = poly2sym(poles,s);
step(FT);
FT_time_domain = ilaplace(snum/sden);
FT_time_domain = simplify(FT_time_domain,'Steps',10);
FT_time_domain = collect(FT_time_domain, exp(-t))
0 Kommentare
Antworten (2)
Star Strider
am 17 Apr. 2023
Bearbeitet: Star Strider
am 17 Apr. 2023
I’m assuming here that ‘Q’ is the numerator polynomial and ‘P’ is the denominator poplynomial. (If that is not correct, it is easy to switch them.)
Try something like this —
P = [8.925*10^-20 11.925*10^-15 17.995*10^-10 6.625 10^5];
poles = roots(P);
poles = poles';
Q = [2.25*10^-20 5.25*10^-15 1.5*10^-5 3*10^-5];
zeros = roots(Q);
zeros = zeros';
FT = tf(Q,P)
syms s t z
snum = poly2sym(Q,s);
sden = poly2sym(P,s);
FTsym = vpa(snum / sden, 5)
step(FT);
FT_time_domain = ilaplace(snum/(sden*s)); % Step Response Requires: snum/sden*(1/s)
FT_time_domain = simplify(FT_time_domain,'Steps',10);
FT_time_domain = collect(FT_time_domain, exp(-t))
figure
fplot(FT_time_domain, [0 1.5E-5])
xlabel('Time (s)')
ylabel('Amplitude (units)')
The system appears to be unstable.
EDIT — (17 Apr 2023 at 13:02)
Initially forgot the
multiplication to produce a step response in the symbolic code. Now added, with comment.
multiplication to produce a step response in the symbolic code. Now added, with comment. .
0 Kommentare
Sam Chak
am 17 Apr. 2023
Hi @Miller
In your case, it can descibed by a transfer function model in the s-domain.
Q = [2.250e-20 5.250e-15 1.500e-5 3e-5];
P = [8.925e-20 11.925e-15 17.995e-10 6.625 10^5];
G = tf(Q, P)
step(G)
p = pole(G) % two of the poles have positive real parts, thus the system is unstable.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Calculus finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



