Vous êtes sur la page 1sur 5

FREQUENCY DOMAIN ANALYSIS:BODE PLOT:1)to plot a bode plot use command:- bode(a) where a is any transfer funcn.

Eg.:tf([1 0 1],[1 0 1 1])


ans =
s^2 + 1
----------s^3 + s + 1
Continuous-time transfer function.
>> bode(ans)
>>
**if the gain is unstable then we can not use this type of transfer funcn.
2)now but if we want to define the log(freq.) range by ourselves then use comman
d:- bode(ans,{0.1,10}) ..
0.1-10 is range.
3)if we want to show bodeplot within some specific values of freq. then use coma
nd:- w= logspace(1,5,10);
now to show your bodeplot:>> bode(a,w);
4) to plot multiple t.f. simultaneously we sue :- Eg.:a =
s^2 + 1
----------s^3 + s + 1
Continuous-time transfer function.
>> b=tf([1 1],[1 5 3])
b =
s + 1
------------s^2 + 5 s + 3
Continuous-time transfer function.
>> bode(a,b)
5) to get numerical value of the plots then:- [gain,mag,freq]=bode(a);
NYQUIST PLOT:to analyse freq. response between two points .we use nyquist.
command is:-

nyquist(sys)
nyquist(sys,w)

where sys is transfer funcn.


w= freq or freq range in matrix

nyquist(sys1,sys2,sys3......);
to watch it numerically:[real,imag,real direcn,img direcn.] =nyquist(sys)
NICHOLAS PLOT:to get gain vs phase plot ina system we use nicholas plot.
we use command:-

nichols(sys)
nichols(sys,w)
nichols(sy1,sys2,sys3......)
to get it numerically:[mag,phase]=nichols(sys)

TIME DOMAIN ANALYSIS:to find step response:step(sys)


step(sys,t) where t is time within which you want o get step response.
step(sys1,sys2,sys3......);
to get numerical values:[amplitude,time]=step(sys)
we can also find response of sttae space:p=[-.05572 -0.782; -.781 0];
>> q=[1 -1;0 2]
q =
1
0

-1
2

>> c=[1.9696,6.443];
>> d=0;
>> g=ss(p,q,c,d)
g =
a =
x1
x1 -0.05572
x2
-0.781
b =

x2
-0.782
0

x1
x2

u1 u2
1 -1
0 2

c =
y1

x1
x2
1.97 6.443

d =
u1 u2

y1

Continuous-time state-space model.


>> step(g)
IMPULSE RESPONSE :impulse(sys)
impulse(sys1,sys2,sys3,sys4.......)
to get numerica;l value;[amplitude,time]=impulse(sys);
we can also find impulse response of state space analysis like above we did.;impulse(ss);
TO FIND RISE TIME,PEAK TIME AND SETTLING TIME:stepinfo(sys)
Eg<:b=tf([1 1],[1 5 3])
b =
s + 1
------------s^2 + 5 s + 3
Continuous-time transfer function.
>> stepinfo(b)
ans =
RiseTime:
SettlingTime:
SettlingMin:
SettlingMax:
Overshoot:
Undershoot:
Peak:
PeakTime:

1.8098
4.1508
0.3004
0.3333
0
0
0.3333
14.534

ROOT LOCUS:to analysis of system componnents like poles and zeros and caharacteristics ro
ot then go for a root locus.
use command:-

rlocus(sys);
rlocus(sys1,sys2,sys3......);

TO FIND FEEDBACK OF THE SYSTEM: use command:-

feedback(sys1,sys2)

** it will be -ve feedback.


Eg.:feedback(a,b)
ans =
s^4 + 5 s^3 + 4 s^2 + 5 s + 3
------------------------------------s^5 + 5 s^4 + 5 s^3 + 7 s^2 + 9 s + 4
Continuous-time transfer function.
to find +ve feedback theb use command:- feedback(sys1,sys2,+1)
Eg.:feedback(a,b,+1)
ans =
s^4 + 5 s^3 + 4 s^2 + 5 s + 3
------------------------------------s^5 + 5 s^4 + 3 s^3 + 5 s^2 + 7 s + 2
Continuous-time transfer function.
TO GIVE UNIT FEEDBACK IN A SYSTEM:use command:- feedback(sys,1) or
t feedback
Eg>> feedback(a,1)
ans =
s^2 + 1
----------------s^3 + s^2 + s + 2
Continuous-time transfer function.
or by this
Eg.:ans =
s^3 + s + 1
----------------s^3 + s^2 + s + 2
Continuous-time transfer function.
MODEL CONVERSION:to convert discret to continous
to convert continous to discrete
to convert discret to discrete.
1)CONTINOUS TO DISCRETE:command is :-

c2d(sys,ts)

feedback(1,sys) , where 1 denotes uni

c2d(sys,ts,'method')
METHOD

DESCRIPTION

a)'zoh'
zero order hold (assume the control in put are pie
cewise constant over the sampling period)
b)'foh'
first order hold
c)'moh'
modified first order hold (transit hold) (asume the
contro linput are piecewise linear over the sample period)
d)'impulse'
impulse invariant discretization
e)'tustin'
by linear method(Tustin method)
f)'matched'
zeros-poles matching method

Vous aimerez peut-être aussi