Convert from transfer function to time domain

How can I convert from transfer function to time domain?
R0=0.000605797;
Qr=147964.8608;
R1=0.000856205;
C1=0.049823238;
% X=[SOC;Vrc];
A=[0 0;0 -1/R1*C1];
B=[1/Qr;1/C1];
C=[1 1];
D= R0;
% u=Il;
% Equations: X dot= AX+Bu & y= CX+Du+bo
sys= ss(A,B,C,D);
[b,a] = ss2tf(A,B,C,D) ;

 Accepted Answer

Probably the easiest way is to just simulate it.
R0=0.000605797;
Qr=147964.8608;
R1=0.000856205;
C1=0.049823238;
% X=[SOC;Vrc];
A=[0 0;0 -1/R1*C1];
B=[1/Qr;1/C1];
C=[1 1];
D= R0;
% u=Il;
% Equations: X dot= AX+Bu & y= CX+Du+bo
sys= ss(A,B,C,D);
figure
impulse(sys)
figure
step(sys)
There is no reason to create a transfer function from it.
.

4 Comments

I just have a state space function, my plan is to convert it to s domain then to time domain because I need it in time domain
I do not understand what you mean by ‘needing it in the time domain’.
Guessing here —
R0=0.000605797;
Qr=147964.8608;
R1=0.000856205;
C1=0.049823238;
% X=[SOC;Vrc];
A=[0 0;0 -1/R1*C1];
B=[1/Qr;1/C1];
C=[1 1];
D= R0;
% u=Il;
% Equations: X dot= AX+Bu & y= CX+Du+bo
sys= ss(A,B,C,D);
tfsys = tf(sys)
tfsys = 0.0006058 s^2 + 20.11 s + 0.0003933 ----------------------------------- s^2 + 58.19 s Continuous-time transfer function.
n = tfsys.Numerator;
d = tfsys.Denominator;
syms s t
H(s) = poly2sym(n,s) / poly2sym(d,s)
H(s) = 
H = vpa(H, 5)
H(s) = 
h(t) = ilaplace(H)
h(t) = 
h = vpa(h, 5)
h(t) = 
figure
fplot(h)
grid
axis([0 0.1 0 20])
This creates the transfer function as a Laplace polynomial fraction, then inverts it. Note that the result is the same as the impulse result in my original post.
.
I understood, Thank you very much
As always, my pleasure!

Sign in to comment.

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Products

Release

R2019b

Community Treasure Hunt

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

Start Hunting!