0% found this document useful (0 votes)
33 views11 pages

Assignment 2 Qs.3: N (1 4) D (1 2 2 4) G TFNNDD) G

The document contains solutions to assignment questions on control systems. Question 1 provides the transfer function of a continuous-time system and plots its step response. Question 2 converts a transfer function to state-space form and plots the step response. The document contains solutions to stability analysis, controllability, eigen analysis and zero-pole-gain problems.

Uploaded by

Ashutosh B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views11 pages

Assignment 2 Qs.3: N (1 4) D (1 2 2 4) G TFNNDD) G

The document contains solutions to assignment questions on control systems. Question 1 provides the transfer function of a continuous-time system and plots its step response. Question 2 converts a transfer function to state-space form and plots the step response. The document contains solutions to stability analysis, controllability, eigen analysis and zero-pole-gain problems.

Uploaded by

Ashutosh B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Assignment 2

Qs.3
>> n=[1 4];

>> d=[ 1 2 2 4];

>> G=tfnndd)

G=

s+4

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

s^3 + 2 s^2 + 2 s + 4

Contnnuonus-tme transfer fnuncton.

>> t=0:.1:10;

>> nu=expf-t*.5d);

>> x0=0;

>> lsimfGnnuntnx0d)

>>

Linear Simulation Results


1.5

0.5
Amplitude

-0.5

-1
0 1 2 3 4 5 6 7 8 9 10
Time (seconds)
Qs.4
>> n=[1 4];

>> d=[1 2 2 4];

>> [AnBnCnD]=t2ssfnndd)

A=

-2 -2 -4

1 0 0

0 1 0

B=

C=

0 1 4

D=

>> G=ssfAnBnCnDd)

G=

A=

x1 x2 x3

x1 -2 -2 -4

x2 1 0 0

x3 0 1 0

B=

nu1

x1 1

x2 0

x3 0
C=

x1 x2 x3

y1 0 1 4

D=

nu1

y1 0

Contnnuonus-tme state-space model.

>> lsimfGnnuntd)

>> >> nu=1+t.^2;

Linear Simulation Results


120

100

80
Amplitude

60

40

20

0
0 1 2 3 4 5 6 7 8 9 10
Time (seconds)
Assignment 3 .

Qs.1 a

>> n=[1];

>> d=[1 10 20];

>> [AnBnCnD]=t2ssfnndd)

A=

-10 -20

1 0

B=

C=

0 1

D=

>> eigfAd)

ans =

-7.2361

-2.7639 system is stable


1.b/c
A=inpnutf'enter matrixA='d)
iffeigfAd)<0d)
dispf'system is stable'd);
else
dispf'system is nunstable'd);
end

onutpnut:
enter matrixA=[0 1;-1 -1]

A=

0 1
-1 -1

system is stable
>> control
enter matrixA=[0 1 0;0 0 1;-6 -11 -6]

A=

0 1 0
0 0 1
-6 -11 -6

system is stable

Assignment 3. Q.2

A=input('enter the matrix A=');


B=input('enter the matrix B=');
Co=ctrb(A,B);
disp('controllable matrix=');
disp(Co);
a=rank(Co);
b=rank(A);
if(a==b)
disp('system is controllable');
else
disp('system is uncontrollable')
end
onutpnut

2. enter the matrix A=[-2 1;1 -2]

enter the matrix B=[1;0]

controllable matrix=

1 -2

0 1

System is controllable

onutpnut:

3. enter the matrix A=[1 4;1 -2]

enter the matrix B=[1 -1;1 -1]

controllable matrix=

1 -1 5 -5

1 -1 -1 1

system is controllable

assignment3 Q.4

A =[4 1 -2;1 0 2;1 -1 3];

>> eigfAd);

>> [VnDnW]=eigfAd)

V =right eigen vectors

-0.5774 + 0.0000i -0.5774 + 0.0000i 0.0000 + 0.0000i

-0.5774 + 0.0000i -0.5774 - 0.0000i -0.8944 + 0.0000i

-0.5774 + 0.0000i -0.5774 - 0.0000i -0.4472 + 0.0000i

D =diagonal valnue of eigen vectors

3.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i

0.0000 + 0.0000i 3.0000 - 0.0000i 0.0000 + 0.0000i

0.0000 + 0.0000i 0.0000 + 0.0000i 1.0000 + 0.0000i


W = lef eigen vectors

-0.4082 + 0.0000i -0.4082 - 0.0000i 0.0000 + 0.0000i

-0.4082 + 0.0000i -0.4082 - 0.0000i -0.7071 + 0.0000i

0.8165 + 0.0000i 0.8165 + 0.0000i 0.7071 + 0.0000i

>> eigfAd)

ans =

3.0000 + 0.0000i

3.0000 - 0.0000i

1.0000 + 0.0000i

>> A =[4 1 -2;1 0 2;1 -1 3];

>> J=jordanfAd)

J=1 0 0

0 3 1

0 0 3

Assignment4..Q1

a.

>> syms z n

>> ztransf1/f4^nd)d)

ans =

z/fz - 1/4d)

b.

>> ztransf1/f16^nd)d)

ans =

z/fz - 1/16d)

c.

>> ztransf.5^nd)

ans =

z/fz - 1/2d)
Q2.

a.

>> syms z

>> iztransff2*zd)/f2*z-1d)d)

ans =

f1/2d)^n

b.

>> iztransff3*zd)/fz+1d)d)

ans =

3*f-1d)^n

c.

>> iztransff18*z.^3d)/f18*z.^3+3*z.^2-4*z-1d)d)

ans =

f9*f1/2d)^nd)/25 + f26*f-1/3d)^nd)/25 + f2*f-1/3d)^n*fn - 1d)d)/5

Q3.

>> n=[18 0 0 0];

>> d=[18 3 -4 -1];

>> [r p k]=residnuezfnndd)

r=

0.3600

0.2400

0.4000

p=

0.5000

-0.3333

-0.3333

k=

0
Q4.1

>> n=[1 1];

>> d=[1 -2 3];

>> poles=rootsfdd)

poles =

1.0000 + 1.4142i

1.0000 - 1.4142i

>> zeroes=rootsfnd)

zeroes =

-1

>> zplanefnndd)

>> grid on

1.5

0.5
Imaginary Part

-0.5

-1

-1.5
-1.5 -1 -0.5 0 0.5 1 1.5
Real Part

Q4.2

>> n=[2 16 44 56 32];

>> d=[3 3 -15 18 -12];

>> poles=rootsfdd);

>> poles=rootsfdd)
poles =

-3.2361 + 0.0000i

1.2361 + 0.0000i

0.5000 + 0.8660i

0.5000 - 0.8660i

>> zeroes=rootsfnd)

zeroes =

-4.0000 + 0.0000i

-2.0000 + 0.0000i

-1.0000 + 1.0000i

-1.0000 - 1.0000i

>> zplanefnndd)

>> grid on

1.5

0.5
Imaginary Part

-0.5

-1

-1.5
-4 -3.5 -3 -2.5 -2 -1.5 -1 -0.5 0 0.5 1
Real Part
Assignment 2

Qs.1

>> nnum=[16];

>> den=[1 2 16];

>> [AnBnCnD]=t2ssfnnumndend)

A = -2 -16

1 0

B= 1

C = 0 16

D =0

>> g=ssfAnBnCnDd);

>> stepfgd)

>>

Step Response
1.5

System: g
Peak amplitude: 1.44
Overshoot (%): 44.3
At time (seconds): 0.829

System: g
System: g
Final value: 1
Settling time (seconds): 3.53
1 System: g
Rise time (seconds): 0.317
Amplitude

0.5

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

You might also like