15
PART-1 First declare the data in the command box as follows. K = sym('K'); S = sym('S'); Ks = 1; K1 = 10; K2 = 0.5; Kt = 0; Ra = 5; Ki = 9; Kb = 0.0636; Jm = 0.0001; Jl = 0.01; Bm = 0.005; Bl = 1.0; N = 0.1; Jt = Jm + (N^2)*Jl; Bt = Bm + (N^2)*Bl; We know that G(S) = Ks K 1KiKN S(( Ra Jt +K 1K 2Jt )S+ K 1K 2Bt+ Ra Bt +KiKb +KK 1KiKt )

Control Assingment

Embed Size (px)

DESCRIPTION

Wow

Citation preview

PART-1First declare the data in the command box as follows.K = sym('K');S = sym('S');Ks = 1;K1 = 10;K2 = 0.5;Kt = 0;Ra = 5;Ki = 9;Kb = 0.0636;Jm = 0.0001;Jl = 0.01;Bm = 0.005;Bl = 1.0;N = 0.1;Jt = Jm + (N^2)*Jl;Bt = Bm + (N^2)*Bl;

We know that G(S) =

a) .Using MATLAB we get >> G(S) =(Ks*K1*Ki*K*N)/(S*((Ra*Jt+K1*K2*Jt)*S+K1*K2*Bt+Ra*Bt+Ki*Kb+K*K1*Ki*Kt) )G(S) = (9*K)/(S*(S/500 + 903/1250))If we express G(S) asG(S) = We get a = 4500 b = 361.2b) This part is done using MATLAB Let the Closed Loop Transfer Function = H(s) = = If

Unit step response (Obtained Manually)

1. K = 7.248

Now considerBy solving this equation, we get

Finding the A, B, C coefficients,Take S = 0 Then,Let S = -180 Let S = -181.2

Therefore,

2. When K=14.5

Now considering

Therefore,

Let S = 0,

Let

Let

There for now,

3. When K=181.17

Consider

Therefore,

Let S = 0,

Let

Let S =

There for now,

c) Obtaining partial fractions using MATLABWhen K = 7.248 = >> num = [];>> den = [1 361.2 32616 0];>> [r, p , k] = residue(num, den)

r =

150.0000 -151.0000 1.0000

p =

-181.2000 -180.0000 0

k =

[]

Therefore= - +

When K = 14.5

=

>> num = [];>> den = [1 0];>> [r, p , k] = residue(num, den)

r = -0.5000 + 0.4999i -0.5000 - 0.4999i 1.0000 p = 1.0e+02 * -1.8060 + 1.8065i -1.8060 - 1.8065i 0 k = []Therefore= + +

When K = 181.17

= >> num = [817650];>> den = [1 361.2 817650 0];>> [r, p , k] = residue(num, den)

r = -0.5000 + 0.1019i -0.5000 - 0.1019i 1.0000 p = 1.0e+02 * -1.8060 + 8.8602i -1.8060 - 8.8602i 0 k = []Therefore= + +

d) When K = 7.248

= 1 - 151 * exp(-180 * t) + 150 * exp(-180.2 * t)

When K = 14.5

= 1 - exp(-180.6 * t) * cos(180.6 * t) 0.9997 * exp(-180.6 * t) * sin(180.6 * t)

When K = 181.17

= 1 - exp(-180.6 * t) * cos(884.7 * t) 0.2041 * exp(-180.6 * t) * sin(884.7 * t)

Using MATLAB we can plot above 3 output responses. The codes are given below.>> t = 0:0.000001:0.05;>> G1 = 1 - 151*exp(-180*t) + 150*exp(-180.2*t);>> G2 = 1 - exp(-180.6*t).*cos(180.6*t) - 0.9997*exp(-180.6*t).*sin(180.6*t);>> G3 = 1 - exp(-180.6*t).*cos(884.7*t) - 0.2041*exp(-180.6*t).*sin(884.7*t);>> plot (t,G1,t,G2,t,G3),grid on;

According to the plot K=14.5 gives a better response. Its rise time is between the rise time of other 2 responses and after about 0.04s it stabilizes at unity without any steady state errors. Also it has a very low overshoot compared to the plot obtained when K= 181.7. Also when we think about the response time of a human it is about 0.215 s the time taken for the plotted response is negligible.K=181.7 has a very high overshoot. Also the response oscillates very badly.K= 7.248 has no overshoot. It has the largest rise time, which is not a desirable property. PART-2

= 1 - exp (-180.6 * t) * cos(180.6 * t) - 0.9997 * exp(-180.6 * t) * sin(180.6 * t)MATLAB CODE>> t = 0:0.000001:0.05;>> G2 = 1 - exp(-180.6*t).*cos(180.6*t) - 0.9997.*exp(-180.6*t).*sin(180.6*t);>> plot (t,G2),grid on;Using the data cursor Rise time= 0.01305 s

Now let us differentiate Then we get

= 180.6 * (exp(-180.6 * t) * cos(180.6 * t) + exp(-180.6 * t) * sin(180.6 * t)) -0.9997 * 180.6 * (-exp(-180.6 * t) * sin(180.6 * t) + exp(-180.6 * t) * cos(180.6 * t))

= 180.6 * (0 .0003 * exp(-180.6 * t) * cos(180.6 * t) + 1.9997 * exp(-180.6 * t) * sin(180.6 * t))

= 0.05418* exp(-180.6 * t) .* cos(180.6 * t) +361.1458 * exp(-180.6 * t) .* sin(180.6 * t)Using MATLAB>> t = 0:0.000001:0.05;>> G2 = 0.05418* exp(-180.6 * t) .* cos(180.6 * t) +361.1458 * exp(-180.6 * t) .* sin(180.6 * t)>> plot (t,G2),grid on;

When =0 we get a maximum point for .

According to this graph the maximum peak value occurs at t= 0.01739 s.

Percentage overshoot maximum= 100(-1)%

According to the above given graph =(1.043-1) x 100% = 4.3%

PART-3Y(s) = When K = 14,Y(s) =>> t = 0:0.0000001:0.05;>> NUM = [63000];>> DEN = [1 361.2 63000];>> step (NUM,DEN,t),grid on;According to the graph,Rise time= 0.136 s Maximum overshoot = 4% Settling time= 0.0321 s