0% found this document useful (0 votes)
55 views29 pages

Advanced Control: Modeling Problem by Using MATLAB

This document presents the solution to several modeling problems using Laplace transforms, MATLAB, and SIMULINK. It also covers derivative of logarithmic decrement, steady state error, and Nyquist plotting problems. The key points are: 1) Three cases are solved using Laplace transforms and partial fractions to model systems and plot displacement vs time in MATLAB. 2) Three cases are modeled in SIMULINK to plot displacement vs time. 3) A pneumatic system is modeled in SIMULINK. 4) The derivative of logarithmic decrement is derived. 5) A steady state error problem is solved to find system parameters. 6) A Nyquist plot is drawn and used to

Uploaded by

willys8
Copyright
© Attribution Non-Commercial (BY-NC)
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)
55 views29 pages

Advanced Control: Modeling Problem by Using MATLAB

This document presents the solution to several modeling problems using Laplace transforms, MATLAB, and SIMULINK. It also covers derivative of logarithmic decrement, steady state error, and Nyquist plotting problems. The key points are: 1) Three cases are solved using Laplace transforms and partial fractions to model systems and plot displacement vs time in MATLAB. 2) Three cases are modeled in SIMULINK to plot displacement vs time. 3) A pneumatic system is modeled in SIMULINK. 4) The derivative of logarithmic decrement is derived. 5) A steady state error problem is solved to find system parameters. 6) A Nyquist plot is drawn and used to

Uploaded by

willys8
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 29

Benha University Faculty of Engineering Shoubra Mechanical Design & Production Department

Advanced Control
Modeling Problem by Using MATLAB

Solved By Abdulrahman Yossri Mahmoud Presented To Ass. Prof. Dr. Saber M Abdrabbo

Assignment #1
Modeling Problem by Using Laplace Transforms Plotting Graph bet. Displacement & Time

Case1:
Due to F.B.D = + + = ( )=[ =[ + C=2

By using Laplace transform + ] ( ) K=1 F=1 1 ( + 1)

Assume that; M=1

By using partial fraction ( )= +

+ 2 + 1] ( ) 1 ( )= = [ + 2 + 1] +1 + ( + 1)

By using Inverse Laplace ( )=1

Sub S = 0 Sub S = -1 Sub S = 1 1 ( )=

1 = ( + 1)

( + 1) + ( + 1) + ( + 1) A=1 C = -1 B = -1

1 1 + 1 ( + 1)

Solving Using MATLAB

>> syms x s >> x = 1/(s*((s^2)+ (2*s)+1)); >> ilaplace (x) ans = 1+(-1-t)*exp(-t)

Then plot a graph between X and t Using MATLAB


>> t = 0:0.1:exp(2); >> x = 1+(-1-t).*exp(-t); >> Plot (t,x)

Case2:
Due to F.B.D = + + = ( )=[ + C=7

By using Laplace transform + ] ( ) K = 12 F=1

Assume that; M=1

By using partial fraction A B C X(s) = + + S ( S + 3) ( S + 4) 1 S( S + 3)( S + 4) A( S + 3)( S + 4) + BS( S + 4) + CS( S + 3) = S( S + 3)( S + 4) Sub S = 0 Sub S = -3 A= B= Sub S = -4 C= 1 1 1 1 1 1 X(s) = + 12 S 3 S + 3 4 S + 4

= [S + 7S + 12] X(s) 1 X(s) = S [S + 7S + 12] 1 = S( S + 3)( S + 4)

By using Inverse Laplace 1 1 1 X(t) = e + e 12 3 4

Solving Using MATLAB


>> syms x s >> x = 1/(s*((s^2)+ (7*s)+12); >> ilaplace (x) ans = 1/4*exp(-4*t)+1/12-1/3*exp(-3*t)

Then plot a graph between X and t Using MATLAB


>> t = 0:0.1:exp(2_; >> x = 1/4*exp(-4*t)+1/12-1/3*exp(-3*t)); >> Plot (t,x)

Case3:
Due to F.B.D + = ( )=[ +

By using Laplace transform + C=1 + ] ( ) K=2 F=1 X(s) =


[ ]

Assume that; M=1

Solving Using MATLAB

= [S + S + 2] X(s)

>> syms x s >> x = 1/(s*((s^2)+ (s)+2)); >> ilaplace (x) ans = -1/2*exp(-1/2*t)*cos(1/2*7^(1/2)*t)1/14*7^(1/2)*exp(-1/2*t)*sin(1/2*7^(1/2)*t)+1/2

Then plot a graph between X and t Using MATLAB


>> t = 0:0.1:exp(3); >> x = -1/2.*exp(-1/2.*t).*cos(1/2*7^(1/2).*t)1/14*7^(1/2).*exp(-1/2.*t).*sin(1/2*7^(1/2).*t)+1/2; >> Plot (t,x)

Assignment #2
Modeling Problem by Using SIMULINK Plotting Graph bet. Displacement & Time

Case1:
Assuming: R=1 L=1 J=2 C=7 Km=1.5 Ka=1.5

The block diagram given by:

The simulation will be:

Case2 (using T.F):


Assuming: R=1 L=2 J=2 C=7 Km=1.5 Ka=1.5

The block diagram given by:

The simulation will be:

10

Case3:
Assuming: R=2 L=1 J=2 C=5 Km=0.5 Ka=3

The block diagram given by:

The simulation will be:

11

Assignment #3
Modeling Problem of a Pneumatic System Getting Response by Using SIMULINK

12

Pneumatic Modeling Problem

System Analysis System Equations = + Laplace Transform ( )= ( )= + ( )

( )=

= = )

=(

( )=( ( ) ( )=

( )=(

( )=(

( )=

( )

( )

+ 1) ( ) ( ))

( )

( )

+ 1) ( ) ( )

13

The Block Diagram Given By

Assuming That a=2 b=5 k =3 A=6 C=4 R1=R2=9

By Using SIMULINLK, The Block Diagram Given By

The Time response of The System

14

Assignment #4
Derivative of LOGARITHMIC DECREMENT

15

From the general equaon o f 2 nd order system ( ) = ( ) +2 ( )= So, ( )= ( )= + + 1 + 2 ( ) +

Assume Impulse Input

( )=1 +2

+ + 1

By using partial fraction ( ) =

Inverse Laplace ( )= But,

= =

+ 1

= =

( )=

16

From trigonometric sin ( )= = 1 = 2 sin( )

So,

Where

To get the LOGARITHMIC DECREMENT()

Let the response equation be =


(

Since the sin may be equal for tiny increase (d) so, sin( ( + )) sin(
17

sin( ) ) sin( ( +

sin(

) ))

= ln ln = ln = ln

( (

) )

But, from the graph of response = ln = ln 2

ln

= ln = = =

= 2

1 1 2

The relation between the logarithmic decrement and damping factor is given by: = 4 +

18

Assignment #5
Solving a STEADY STATE ERROR problem

19

Problem

For the shown system and corresponding response graph find: M, C and K Given Mp = 0.095 Solution From the given data, the maximum peak = 0.095 = 0.095 = Tp = 5 sec F = 2N

= ln 0.095 1

ln 0.095 =

= 1.33

1 = 2.78
20

= 1.33

So, the damping factor is = 0.599 = 1

By substituting at the peak time =5= 5=

So, the natural frequency is = 0.784

51 0.599

1 0.599

= 0.784

From the mechanical motion of the system Due to F.B.D = + + = By using Laplace transform ( )=[ But + + + ] ( ) + ]

( ) = ( ) [

So, the transfer function given by ( )= [

( )=

( )=2

2 +
21

+ ]

From the final value theorem () = lim

So,

lim ( ) = lim

( ) = 2

But

( )=

2 +

+ ]

0.1 =

() = 0.1 2 = 20

From The general Formula of 2nd order response equation +2 = +

2 So, = =2

And

20 = 32.5 0.784

= 2 32.5 0.599 0.784 = 30.56

22

Assignment #6
Solving a NYQUIST PLOTTING problem

23

Problem: = ( + )( + )

Draw the Nyquist diagram, then: 1) Find value of K for stability. 2) For K = 4 the phase margin and gain margin. 3) Find K at phase margin = 30. 4) Find K at gain margin =10 dB. Solution: Assume K = 1, So 1 ( + 1)( + 2) Along C1, convert from S-domain to frequency domain substitute with S j 1 ( ) ( )= ( + 1)( + 2) ( ) ( )= The amplitude M is given by: 1 = ( + 1)( The angle is given by: + 4) 1 tan 2

For any assumed get and M 0 0.1 0.25 0.5 1 2 5 10

= 0 90 tan M 4.966 1.924 0.867 0.316 0.079 0.007 0.001 0

-90 -98.57 -111.1 -130.6 -161.5 -198.4 -236.8 -252.9 -270

24

Along C2 is the mirror of C1 around X-axis Along C3 tends to be zero = lim

Along C4 is given by:

=0

So, = 2 lim

= lim

But

lim

So, it is an arc of radius and ploe d from 9 0 -90. Then draw a polar plot of Nyquist criterion.

+1 = =

lim

1 2 lim

1 lim 2

+1

1 lim 2

+1 =1

+1

25

The problem may plotted by using MATLAB as following


>> >> >> >> Num = [1]; Dum = [1 3 2 0]; T = tf(Num,Dum); Nyquist(T)

1) To get the value of K for stability, find the intersection at = -180 = 0 90 tan 1 tan 2 = 180

By using trail and error method, we get = 1.415 The stability occurred at M = 1. So, = (

= 1 1.415 (1.415 + 1)(1.415 + 4) =6

+ 1)(

+ 1)(

+ 4)

+ 4)

26

2) The gain margin at K = 4, subst ut e in the e quaon of p h as e an gl e at condition of = -180 = 0 90 tan 1 tan 2 = 180

So, as result before using trail and error method = 1.415

Subst ut e a t K = 4 to g et the a m p l itude o f the g ai n m a r gi n 4 = = 0.67 1.415 (1.415 + 1)(1.415 + 4) The gain margin is given by 1 = 3.48 0.67 The phase margin at K = 4, subst ut e in the e quaon of am pl i tu de at condition of M = 1 4 = =1 ( + 1)( + 4) . = 20 log So, ( ( + 1)( + 1)( + 4) = 16 + 4) = 4 . = 20 log 1

Using trail and error method

Subst ut e a t K = 4 to g et the a ngl e o f the p hase m a r gi n 1.145 1.145 = 0 90 tan tan = 168.65 1 2 The phase margin is given by
.

= 1.145

= 168.65 180 = 348.65


.

180

= 11.35

27

3) To get K at phase margin = 30= -330 180 . = 330 = = 150

180

The corresponding frequency is given by

Using trail and error method

= 150 = 0 90 tan = 0.79

tan

Substitute in the equation of amplitude at condition of M = 1 = ( + 1)( + 4) =1

= 1 0.79 (. 079 + 1)(0.79 + 4) 4) To get K at gain margin = 10 dB . = 2.16 1

10 1 = log 20 1 = 3.18

= 20 log

So,

The corresponding frequency is given by

0.314 1 tan 2

Using trail and error method

= 180 = 0 90 tan = 1.415


28

Substitute in the equation of amplitude at condition of = -180 = 0.314 = ( + 1)( + 4)

So,

= 0.314 1.415 (1.415 + 1)(1.415 + 4) = 1.88

1.415 (1.415 + 1)(1.415 + 4)

29

You might also like