Control Assignment

Embed Size (px)

DESCRIPTION

assignment

Citation preview

QUESTION NO.1

Root Locus Using MATLAB:num=[0 0 1];p_1=3;p_2=-11;p_3=-18;poles=[p_1,p_2,p_3];den=poly(poles)k=[0:1:5000];r=rlocus(num,den,k)plot(r,'-')

Interesting Values of K:K=0K=594K=3480K=724.6258Checking for interesting values of K using MATLAB

[K,pole_loc]=rlocfind(sys,3)[K,pole_loc]=rlocfind(sys,0)[K,pole_loc]=rlocfind(sys,-2.4932)[K,pole_loc]=rlocfind(sys,10.53j)

K =

1.3056e-13

pole_loc =

-18.0000 -11.0000 3.0000

K =

594.0000

pole_loc =

0 -20.6158 -5.3842

K =

724.6258

pole_loc =

-21.0135 -2.4933 -2.4932

K =

3.4769e+03

pole_loc =

-25.9961 + 0.0000i -0.0020 +10.5308i -0.0020 -10.5308i

For we choose closed loop poles as: Then we use [K,pole_loc]=rlocfind(sys,-3.2323+4.8234j)=>K=1.1194e+03

Using this value of K in Simulink model,

Now we gooto command window and use the following code to confirm the value of load y_outt=ans(1,:);y=ans(2,:);plot(t,y)y_max=max(y);y_ss=y(59);os_per=(y_max-y_ss)/y_ss;damp=sqrt((log(os_per)^2)/(pi^2+(log(os_per)^2)))=>damp =0.4118ts=3omega_n=4/(damp*ts)omega_n =3.2378 DNA ANALYSIS

K=0Unstable0