controls lab manual
-
Upload
raghavendra-m-bhat -
Category
Documents
-
view
214 -
download
0
description
Transcript of controls lab manual
![Page 1: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/1.jpg)
Second order system
CODE zeta=input('input the value of zeta ='); t=input('input the vlaue of time constant chosen='); wn=1/(zeta*t) num=[wn*wn] den=[1 2*zeta*wn wn*wn] sys=tf(num,den); figure(2); pzmap(sys) f=input('press any key for the step response'); step(sys)
![Page 2: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/2.jpg)
Procedure
Open matlab, open the editor and type the above code.
Save the code and run it. Go to the command window and and
enter the value of zeta and t. The pole zero plot is shown. Enter any key to get the step response
![Page 3: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/3.jpg)
input the value of zeta =2 input the vlaue of time constant chosen=5
wn =
0.1000
num =
0.0100
den =
1.0000 0.4000 0.0100
![Page 4: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/4.jpg)
Transfer function = .001 s^2+0.4s+.001
![Page 5: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/5.jpg)
Pole zero plot
![Page 6: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/6.jpg)
Step response
![Page 7: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/7.jpg)
secondor input the value of zeta =0.1 input the vlaue of time constant chosen=5
wn =
2
num =
4
den =
1.0000 0.4000 4.0000
![Page 8: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/8.jpg)
Pole zero
![Page 9: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/9.jpg)
Step response
![Page 10: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/10.jpg)
input the value of zeta =1 input the vlaue of time constant chosen=5
wn =
0.2000
num =
0.0400
den =
1.0000 0.4000 0.0400
![Page 11: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/11.jpg)
Pole zero
![Page 12: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/12.jpg)
Step response
![Page 13: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/13.jpg)
Lead network Code phi_deg=input('input the given value of phi in degrees=') phi_rad=pi*phi_deg/180 wm=input('input the given value of frequency in radians per second=') alpha=(1-sin(phi_rad))/(1+sin(phi_rad)) T=1/(sqrt(alpha)*wm) f1=1/(2*pi*T) fm=wm/(2*pi); f2i=(pi*T*alpha)/2 C=0.11e-06 R1=T/C R2=alpha*R1/(1-alpha) numg=[1 1/T] deng=[1 1/(alpha*T)] sys=tf(numg,deng) figure(2); pzmap(sys) f=input('Press any key to observe the plot') bode(sys)
![Page 14: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/14.jpg)
Procedure
input the given value of phi in degrees=54.9
phi_deg =
54.9000
phi_rad =
0.9582
input the given value of frequency in radians per second=2010
wm =
2010
![Page 15: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/15.jpg)
alpha =
0.1000
T =
0.0016
f1 =
101.1715
f2i =
2.4715e-04
![Page 16: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/16.jpg)
C =
1.1000e-07
R1 =
1.4301e+04
R2 =
1.5894e+03
numg =
1.0000 635.6795
![Page 17: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/17.jpg)
deng =
1.0e+03 *
0.0010 6.3556
sys = s + 635.7 --------- s + 6356 Continuous-time transfer function.
Press any key to observe the plot
![Page 18: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/18.jpg)
Pole zero
![Page 19: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/19.jpg)
Bode plot
![Page 20: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/20.jpg)
Lag network
phi_deg=input('input the given value of phi in degrees=')
phi_rad=pi*phi_deg/180 wm=input('input the given value of
frequency in radians per second =') beta=(1-sin(phi_rad))/(1+sin(phi_rad)) T=1/(sqrt(beta)*wm) f1=1/(2*pi*beta*T) fm=wm/(2*pi); f2=1/(2*pi*T)
![Page 21: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/21.jpg)
C=1.0e-06 R2=T/C R1=(beta-1)/R2 numg=[1 1/T] deng=[beta*T 1] sys=tf(numg,deng) figure(2); pzmap(sys) f=input('Press any key to observe the plot') figure(3); bode(sys)
![Page 22: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/22.jpg)
Procedure
input the given value of phi in degrees=-54.8
phi_deg =
-54.8000
phi_rad =
-0.9564
input the given value of frequency in radians per second =198.8
wm =
![Page 23: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/23.jpg)
198.8000
beta =
9.9376
T =
0.0016
f1 =
10.0368
![Page 24: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/24.jpg)
f2 =
99.7419
C =
1.0000e-06
R2 =
1.5957e+03
R1 =
0.0056
![Page 25: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/25.jpg)
numg =
1.0000 626.6970
deng =
0.0159 1.0000
sys = s + 626.7
![Page 26: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/26.jpg)
------------- 0.01586 s + 1 Continuous-time transfer function.
Press any key to observe the plot
f =
[]
>>
![Page 27: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/27.jpg)
Bode plot
![Page 28: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/28.jpg)
Pole zero
![Page 29: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/29.jpg)
num=[1] den=conv(conv([1 0],[.2 1]),[.05 1]) sys=tf(num,den) figure(1); bode(sys) [mag,phase,w]=bode(sys) margin(sys) f=input('press any key to uose the rltool') figure(2); rltool(sys)
![Page 30: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/30.jpg)
num =
1
den =
0.0100 0.2500 1.0000 0
sys = 1 ----------------------- 0.01 s^3 + 0.25 s^2 + s Continuous-time transfer function.
![Page 31: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/31.jpg)
procedure
The transfer function is shown. Press any key to get the bode plot The magnitude and phase value of w is
shown. Press any key to get the root locus of the
transfer function.
![Page 32: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/32.jpg)
![Page 33: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/33.jpg)
![Page 34: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/34.jpg)
![Page 35: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/35.jpg)
![Page 36: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/36.jpg)
![Page 37: controls lab manual](https://reader033.fdocuments.us/reader033/viewer/2022051623/5695d1a91a28ab9b02976d82/html5/thumbnails/37.jpg)