You are on page 1of 6

1)CONTROL SYSTEM:Continous:- s-domain :- fourier,laplace:- frquency or time

Discrete :- z-domain :- z-transform,hlbert transform.:- freq. or time domain


**if there is more variations in t domain then in freq. domain variations will b
e lesser.
to generate a transfer funcn we use command:- tf(numerator,denominator)
eg>:tf([1,1],[1 1 1]);
a=[1 1] and b=[1 1 1]
tf(a,b)
Eg. SISO Type:-

>> tf([1 1],[1 1 1])

ans =
s + 1
----------s^2 + s + 1
Continuous-time transfer function.
>> tf([2 5 0],[5 0 3 1])
ans =
2 s^2 + 5 s
--------------5 s^3 + 3 s + 1

TO GENERATE MIMO TYPE T.F.:a=tf([1 2],[1 1 10]);


>> b=tf([0 1],[5 2 0]);
>> mimo=[a;b]
mimo =
From input to output...
s + 2
1: -----------s^2 + s + 10
1
2: ----------5 s^2 + 2 s
Continuous-time transfer function.
OTHER WAY FOR MIMO:num={[1,2];[0 1]};
>> dem={[1,1,10];[5,0,0,2,0]};
>> tf(num,dem)

ans =
From input to output...
s + 2
1: -----------s^2 + s + 10
1
2: ----------5 s^4 + 2 s
Continuous-time transfer function.
TO PLOT CONTINOUS TO DISCRETE TIME:>> tf(num,dem,0.2)

where 0.2 is sampling time 'ts'.

ans =
From input to output...
z + 2
1: -----------z^2 + z + 10
1
2: ----------5 z^4 + 2 z
Sample time: 0.2 seconds
Discrete-time transfer function.

WHEN T.F. IS OF IN ZEROS AND POLES FORM:(Z. P. K. FORMAT);command is:-

zpk(zeros,poles,gain);

>> zpk([-2 3],[-4 6],1)


ans =
(s+2) (s-3)
----------(s+4) (s-6)
Continuous-time zero/pole/gain model.
Eg>:
>> z=zpk([],[-2 3],1)
z =
1
----------(s+2) (s-3)
Continuous-time zero/pole/gain model.
>> p=zpk([0],[6 -7],2)

p =
2 s
----------(s-6) (s+7)
Continuous-time zero/pole/gain model.
>> tf=[z;p]
tf =
From input to output...
1
1: ----------(s+2) (s-3)
2 s
2: ----------(s-6) (s+7)
bode plot, nyquist plot,step response,impulse response,root locus,rise time,peak
time,settling time,undershoot,overshoot,damping,damping ratio,crossover freq,sp
ecified gain
STATE SPACE ANALYSIS:when you dont know final and initial value of states but know everything other
possoble states then we use state space analysis.
COMMAND IS:- ss(a,b,c,d)
eg>:>> ss(a,c,b,d)
ans =
a =
x1
x2

x1 x2
3 4
4 5

b =
x1
x2

u1
2
4

c =
y1

x1 x2
2 4

d =
y1

u1
6

Continuous-time state-space model.


where a=nxn
b=nx1
c=1xn

d=1x1
1)every controller has a compensated formula:for PID COntroller:c=kp + ki/s + kds/(tfs+1)
where, kp= proportional gain
ki= integral gain
kd=derivative gain
tf=first order derivative time constant
command is:- pid(kp,kv,kd,tf)
Eg.:pid(1,4,7,2)
ans =
1
s
Kp + Ki * --- + Kd * -------s
Tf*s+1
with Kp = 1, Ki = 4, Kd = 7, Tf = 2
Continuous-time PIDF controller in parallel form.
how to know type of controller:- (the type depends upon th evalue of the control
ler);
use command:-

getType(ans);

to generate random state space:- use command:er states and it will give o/p states.
rss(4)
ans =
a =
x1
x2
x3
x4
x1 -1.158 0.01607 -0.5121 -0.1164
x2 0.01607 -0.954 -0.1244 0.1954
x3 -0.5121 -0.1244 -1.739 0.05443
x4 -0.1164 0.1954 0.05443 -2.012
b =
u1
x1 -1.069
x2
0
x3
0
x4 1.438
c =
y1

x1
x2
0.3252 -0.7549

d =
y1

u1
0

x3
1.37

x4
-1.712

rss(n)

will generate nth ord

Continuous-time state-space model.


when we know pure sytem random states:- rss(4,2)
order will be 4
Eg.:rss(4,2)

(generate two o/p y1,y2) and

ans =
a =
x1
x2
x3
x4

x1
-2.476
-0.9504
2.185
3.519

x2
x3
3.375 -0.02252
-2.147
-2.105
1.079
-3.482
2.382
1.243

x4
-2.581
-3.592
-0.1983
-1.651

b =
u1
x1 0.2916
x2 0.1978
x3
1.588
x4 -0.8045
c =
y1
y2

x1
x2
0.6966 -0.2437
0 0.2157

x3
-1.166
-1.148

x4
0.1049
0.7223

d =
y1
y2

u1
0
0

Continuous-time state-space model.


now if we know op ip and order then:- rss(4,2,3) 4th order with 2 o/p and 3 i/p.
Eg.:rss(4,2,3)
ans =
a =
x1
x2
x3
x4

x1
-1.588
-1.569
-8.34
3.512

x2
3.05
-1.298
6.661
-2.151

x3
x4
7.711 -3.947
-6.942
2.767
-1.943 -1.796
3.082 -0.7082

b =
x1
x2
x3
x4

u1
-0.262
-1.75
0
-0.8314

u2
u3
-0.9792
0.9642
-1.156
0.5201
-0.5336 -0.02003
-2.003 -0.03477

c =
x1
x2
x3
x4
y1 -0.7982 -0.1332
1.351
0
y2
1.019 -0.7145 -0.2248 -0.2938
d =

y1
y2

u1
0
0

u2
u3
2.526 0.3075
1.655 -1.257

Continuous-time state-space model.


TO GENERATE DISCRETE TIME STATE SPACE MODEL :drss(n)
drss(n,2)
drss(n,2,4)

:- nth order
:- nth order, with 2 o/p
:- nth order with 2 o/p and 4 inputs

specify the discrete t.funcn in a digital signal processing format:use command:- filt(num,dim);
filt(num,dim,ts);
Eg.:> filt([1],[1 2])
ans =
1
---------1 + 2 z^-1
Sample time: unspecified
Discrete-time transfer function.
>> filt([1],[1 2],0.2)
ans =
1
---------1 + 2 z^-1
Sample time: 0.2 seconds
Discrete-time transfer function.

You might also like