You are on page 1of 6

Solutia in domeniul timp

>> sol=dsolve('D2y+5*Dy+4*y=1','y(0)=0,Dy(0)=0')

>>sol =exp(-4*t)/12 - exp(-t)/3 + ¼


Grafic
>> t=0:1:20;
>> y=exp(-4*t)/12- exp(-t)/3 + 1/4;
>> plot(t,y)
>>grid on

0.25

0.2

0.15

0.1

0.05

0
0 2 4 6 8 10 12 14 16 18 20

Transformata Laplace

>> syms t s

>> laplace(1/4+exp(-4*t)/12-exp(-t)/3)

ans =

1/(12*(s + 4)) - 1/(3*(s + 1)) + 1/(4*s)


>> ilaplace(ans)

ans =

exp(-4*t)/12 - exp(-t)/3 + ¼

Solutia domeniul Laplace(raspunsul step)

>> num=[0 1];

>> den=[1 5 4];

>> G=tf(num,den)

G=

-------------

s^2 + 5 s + 4

Continuous-time transfer function.

>> step(G)

>> grid on
Step Response
0.25

0.2

0.15
Amplitude

0.1

0.05

0
0 1 2 3 4 5 6
Time (seconds)

Raspunsul impulse

Impulse Response
0.16

0.14

0.12

0.1
Amplitude

0.08

0.06

0.04

0.02

0
0 1 2 3 4 5 6 7
Time (seconds)
Reprezentare in spatial starilor

In M file:

%reprezentarea cu functia de transfer


num=[0 1];
den=[1 5 4];
G=tf(num,den)
%determin reprezentarea ss cand stiu tf
[A,B,C,D]=tf2ss(num,den)

In matlab:

>> Untitled2

G=

-------------

s^2 + 5 s + 4

Continuous-time transfer function.

A=

-5 -4

1 0

B=

C=

0 1

0
5. Discutii stabilitate

b) Locul radacinilor

Root Locus
2.5
0.86 0.76 0.64 0.5 0.34 0.16
2

0.94
1.5

1
Imaginary Axis (seconds -1)

0.985
0.5

4.5 4 3.5 3 2.5 2 1.5 1 0.5


0

-0.5
0.985
-1

-1.5
0.94

-2
0.86 0.76 0.64 0.5 0.34 0.16
-2.5
-4.5 -4 -3.5 -3 -2.5 -2 -1.5 -1 -0.5 0 0.5
-1
Real Axis (seconds )

>> num=[0 1];

>> den=[1 5 4];

>> G=tf(num,den)

G=

-------------

s^2 + 5 s + 4
Continuous-time transfer function.

>> roots(den)

ans =

-4

-1

rlocus(tf(num,den));

>> rlocus(G)

>> grid on

You might also like