Long Report Control System

34
LAB 2: TRANSFER FUNCTION SEMESTER 1 (2013/2014) BETT 1 NAME : Saravanan A/L Sukumaran MATRIX NUMBER : B071210044 SUBJECT : Control Principles (BTKE 2364) INSTRUCTOR : EN.SAIFULLAH BIN SALAM

description

control system

Transcript of Long Report Control System

Page 1: Long Report Control System

LAB 2: TRANSFER FUNCTION

SEMESTER 1 (2013/2014)

BETT 1

NAME : Saravanan A/L Sukumaran

MATRIX NUMBER : B071210044

SUBJECT : Control Principles (BTKE 2364)

INSTRUCTOR : EN.SAIFULLAH BIN SALAM PN. IZADORA BINTI MUSTAFA

Page 2: Long Report Control System

OBJECTIVES

To find a mathematical model, called a transfer function, for a linear time-invariant system (Mechanical & Electrical system).

To implement and analyze the system response for the control system obtained.

EQUIPMENT/COMPONENTS

i) Computerii) MATLAB Software

THEORY

Transfer function

A Transfer Function is the ratio of the output of a system to the input of a system, in the

Laplace domain considering its initial conditions and equilibrium point to be zero. If we have

an input function of X(s), and an output function Y(s), we define the transfer function H(s) to

be:

The Transfer Function fully describes a control system. The Order, Type and Frequency

response can all be taken from this specific function. Bode plots can be drawn from the open

loop Transfer Function. These plots show the stability of the system when the loop is closed.

Using the denominator of the transfer function, called the characteristic equation the roots of

the system can be derived.

Page 3: Long Report Control System

We can separate out our numerator and denominator polynomials as such:

num = [79 916 1000];den = [1 30 300 1000 0];sys = tf(num, den);

Now, we can get our step response from the step function, and plot it for time from 1 to 10 seconds:

T = 1:0.001:10;step(sys, T);

Electrical network transfer function

Equivalent circuits for the electric networks that we work with first consist of three passive

linear components: resistors, capacitors, and inductors." Table 1 summarizes the components

and the relationships between voltage and current and between voltage and charge under zero

initial conditions. We now combine electrical components into circuits, decide on the input

and output, and find the transfer function. Our guiding principles are Kirchhoff s laws. We

sum voltages around loops or sum currents at nodes, depending on which technique involves

the least effort in algebraic manipulation, and then equate the result to zero. From these

relationships we can write the differential equations for the circuit. Then we can take the

Laplace transforms of the differential equations and finally solve for the transfer function.

Table 1 : Voltage-current, voltage-charge,and impedence relationships for capacitor,resistor and inductor.

Translational mechanical system transfer function

Page 4: Long Report Control System

Mechanical systems parallel electrical networks to such an extent that there are analogies

between electrical and mechanical components and variables. Mechanical systems, like

electrical networks, have three passive, linear components. Two of them, the spring and the

mass, are energy-storage elements; one of them, the viscous damper, dissipates energy. The

two energy-storage elements are analogous to the two electrical energy-storage elements, the

inductor and capacitor. The energy dissipator is analogous to electrical resistance.

Table 2 : Torque-angular velocity, Torque- angular displacement, impedence relationship

PROCEDURE

PART 1: Mechanical System

Page 5: Long Report Control System

Figure 1

x1 & x2 : output displacement for Cart 1 Cart 2.M1, M2: mass of Cart 1 and Cart 2.K1, K2 : spring constant for spring which attached to Cart 1 and Cart 2fv1 , fv3: coefficient of friction for Cart 1 & Cart 2 (towards floor)fv2 : damper coefficientf(t) : Force applied to the mechanical system.

1) The equivalent transfer function of and mechanical system is found from the figure 1. All the given variables used in the calculation.

2) The unit step response is generated for the obtained transfer function G1(s) & G2(s). The system parameter set as below :

a. M1, M2 = 1 kgb. K1, K2 = 1 N/mc. fv1 = 2N-s/m d. fv2 ,fv3= 1N-s/m

3) The related graph of the system response is produced for each transfer function.

PART 2: Electrical System

Page 6: Long Report Control System

Figure 2

1) The equivalent transfer function is found from an electrical network given as shown in Figure 2,. The input is v(t) and the output is vL(t)is given.

2) The unit step response generated for the obtained transfer function. The parameter set as below (Set Parameter 4) :

R1 = 1 C1 = 1 F R2 = 1 C2 = 1F R3 = 1 L = 1H

3) The unit step response found using MATLAB program as stated in section A above.4) The parameter varied by using below set of value and their unit step response plotted :

Set no.R1

()C1

(F)R2

()C2

(F)R3

()L

(H)

Set parameter 5 1 2 1 0.5 1 2

Set parameter 6 2 1 0.5 1 2 1

5) The related graph of the system response produced for each of the simulation.6) The result of system response for set parameter 4~6 compared . The discussion wrote

based on the results found.

Result

Transfer function :

Page 7: Long Report Control System

Part 1 : Mechanical system

M1S2X1(s)K2X2(s)

(K1 +K2)X1(s)

(fv1+fv2)sX(s) fv2sX2(s)

M1s2X1(s) +(fv1+ fv2)s X(s) +(K1 +K2) X1(s) = (K2+fv2s) X2(s)M1s2X1(s) +(fv1+ fv2)s X(s) +(K1 +K2) X1(s) - (K2+fv2s) X2(s) =0s2X1(s) +3sX1(s) +2X1(s)-(1+s) X2(s) =0(s2 +3s+2)X1(s) -(1+s) X2(s) =0 equation 1

M2s2X2(s) F(s)

K2X2(s) K2X1(s)

(fv2+fv3) sX(s) fv2sX1(s)

M2s2X2(s) + (fv2 +fv3)s X2(s) + K2X2(s) =F(s) +K2X1(s)+ fv2sX1(s)

M2s2X2(s) + (fv2 +fv3)s X2(s) + K2X2(s) -F(s) -K2X1(s)- fv2sX1(s) =0s2X2(s) + 2sX2(s) + X2(s) -F(s) -X1(s) -sX1(s) =0(s2 +2s +1) X2(s) -(1+s) X1(s) =F(s) equation 2

G1(s) =X 1(S )F(s)

M1

M2

Page 8: Long Report Control System

(s2 +3s+2) X1(s) - (1+s)X2(s) = 0-(1+s) X1(s) +(s2 +2s +1) X2(s) = F(s)

X1(s) = 0 −(1+S)

F (s ) s2+2 s+1 ▲

X1(s) = F ( s)(s+1)

(s2+3 s+2 ) (s2+2 s+1 )−(s+1)2

X 1(s )F(s) =

s+1

(s2+3 s+2 ) (s2+2 s+1 )−(s+1)2

= s+1

(s+1)2[s2+3 s+2−1]

= 1

(s+1)[s2+3 s+1]

G1(s) = 1

s3+4 s2+4 s+1

Command MATLAB G1(s)

Page 9: Long Report Control System

Unit Step Response G1(s)

G2(s) =X 2(S )F(s)

Page 10: Long Report Control System

(s2 +3s+2) X1(s) - (1+s)X2(s) = 0-(1+s) X1(s) +(s2 +2s +1) X2(s) = F(s)

X2(s) = s3+3 s+2 0−(s+1) F (s)

X2(s) = F (s )(s2+3 s+2)

(s2+3 s+2 ) (s2+2 s+1 )−(s+1)2

X 2(s )F (s) =

s2+3 s+2(s2+3 s+2 ) (s2+2 s+1 )−(s+1)2

= ( s+1 )(s+2)

(s+1)2[s2+3 s+2−1]

= s+2

(s+1)[s2+3 s+1]

G2(s) = s+2

s3+4 s2+4 s+1

Command MATLAB G2(s)

Page 11: Long Report Control System

Unit Step Response G2(S)

Page 12: Long Report Control System

Part 2 : Electrical system

Parameter 4

Loop 1

R1I1 +1

C 1(S) I1 + R2[ I1- I2] + 1

C 2(S)[I1 -I2] = V(s)

R1I1 +1

C 1(S) I1 + R2I1-+ 1

C 2(S)I1 + [-R2I1]+¿ I2] = V(s)

I1[ R1 +1

C 1(S) + R2 + 1

C 2(S) ] - I2 [ R2 +1

C 2(S) ] =V(s)

I1[ 1 +1s

+ 1 + 1s

] - I2 [ 1 +1s

] =V(s)

I1[ 2+ 2s

] - I2 [s+1

s ] =V(s)

I1[2 s+2

s ] - I2 [

s+1s

] =V(s) ........................................................EQ 1

Loop 2

R3I2 + LsI2 + R2(I1-I2) + 1

C 2(S) (I2-I1) = 0

R3I2 + LsI2 + R2I2 + 1

C 2(S) I2 +[-R2I1] + 1

C 2(S) (-I1) = 0

I2 [ R3 +Ls +R2 + 1

C 2(S) ] + I1 [-R2 -1

C 2(S)] =0

I2 [ 1 +s +1 + 1S

] + I1 [-1 -1S

] = 0

I2 [ 2 +s + 1S

] + I1 [−s−1

S] = 0

I2 [s2+2 s+1

S ] + I1 [

−s−1S

] = 0 ...........................................EQ 2

Page 13: Long Report Control System

I2(s) =

2 s+2s

V (s)

−(S+1

S) 0

= V(s) (S+1

S)

( 2 s+2

s ) ( s2+2 s+1

S ) - (

S+1S

)2

( S+1S

)

I 2Vs

=

( 2 s+2

s ) ( s2+2 s+1

S ) - (

S+1S

)2

(S+1

S)

=

(S+1

S) [2 ( s2+2 s+1

S ) - (

S+1S

) ]

1 =

(2 s2+4 s+2−s−1S

)

I 2Vs

= s

2s2 + 3s +1

V(L) = I2 x Ls

I2 = V (L)

Ls

Page 14: Long Report Control System

= s / ( 2s2 + 3s +1 )

V(L) = s2 / (2s2 + 3s +1 )

VLVs

= s2 / (2s2 + 3s +1 )

Command MATLAB Parameter 4

Unit Step Response Parameter 4

Page 15: Long Report Control System

Parameter 5

Loop 1

R1I1 +1

C 1(S) I1 + R2[ I1- I2] + 1

C 2(S)[I1 -I2] = V(s)

R1I1 +1

C 1(S) I1 + R2I1-+ 1

C 2(S)I1 + [-R2I2]+¿ I2] = V(s)

I1[ R1 +1

C 1(S) + R2 + 1

C 2(S) ] - I2 [ R2 +1

C 2(S) ] =V(s)

I1[ 1 +1

2 s + 1 +

2s

] - I2 [ 1 +2s

] =V(s)

I1[ 2+ 2s

] - I2 [s+1

s ] =V(s)

I1[4 s+2

2 s ] - I2 [

s+2s

] =V(s) ........................................................EQ 1

Loop 2

R3I2 + LsI2 + R2(I1-I2) + 1

C 2(S) (I2-I1) = 0

R3I2 + LsI2 + R2I2 + 1

C 2(S) I2 +[-R2I1] + 1

C 2(S) (-I1) = 0

I2 [ R3 +Ls +R2 + 1

C 2(S) ] + I1 [-R2 -1

C 2(S)] =0

I2 [ 1 +2s +1 + 2S

] + I1 [-1 -2S

] = 0

Page 16: Long Report Control System

I2 [2 s2+2 s+3

S ] + I1 [

s+2S

] = 0 ...........................................EQ 2

I2 =

4 s+5s

V (s )

(S+2

S) 0

= V(s) (S+2

S)

( 4 s+5

2 s ) (2 s2+2 s+2

S ) - (

S+2S

)2

( S+2S

)

¿

(8 s3+8 S2+8 S+10 S2+10 S+10−2 S2+4 S+4

2 S2 )

2s(s+2) = 8 s3+16 S2+16 S+2

I 2Vs

= 2s2+4 s

8 s3+16 S2+10 S+2

V(L) = I2 x Ls

I2 = V (L)

Ls

Page 17: Long Report Control System

= 2s(2s3+4 S ¿ / ( 8s3 + 16s2 +10s +2 )

VLVs

= 2s3 +4s2 / (4s3 + 8s2 +s+1 )

Command MATLAB Parameter 5

Page 18: Long Report Control System

Unit Step Response Parameter 5

Parameter 6

Loop 1

R1I1 +1

C 1(S) I1 + R2[ I1- I2] + 1

C 2(S)[I1 -I2] = V(s)

R1I1 +1

C 1(S) I1 + R2I1-+ 1

C 2(S)I1 + [-R2I2]+¿ I2] = V(s)

Page 19: Long Report Control System

I1[ R1 +1

C 1(S) + R2 + 1

C 2(S) ] - I2 [ R2 +1

C 2(S) ] =V(s)

I1[ 2 +1s

+ 12

+ 1s

] - I2 [ 12

+1s

] =V(s)

I1[4 s+2+s+2

2 s ] - I2 [

s+22 s

] =V(s)

I1[5 s+4

2 s ] - I2 [

s+22 s

] =V(s) ........................................................EQ 1

Loop 2

R3I2 + LsI2 + R2(I1-I2) + 1

C 2(S) (I2-I1) = 0

R3I2 + LsI2 + R2I2 + 1

C 2(S) I2 +[-R2I1] + 1

C 2(S) (-I1) = 0

I2 [ R3 +Ls +R2 + 1

C 2(S) ] + I1 [-R2 -1

C 2(S)] =0

I2 [ 2 +s +12

+ 1S

] + I1 [12

+1S

] = 0

I2 [2 s2+4 s+2+S

2 S ] + I1 [

s+22 S

] = 0 ...........................................EQ 2

Page 20: Long Report Control System

I2 =

5 s+42 s

V (s)

−(S+22 S

) 0

= V(s) (S+22 S

)

( 5 s+4

2 s ) (2 s2+5 s+2

2 S ) - (

S+22 S

)2

( S+22 S

)

I 2VS

=¿

( 5 s+4

2 s ) (2 s2+5 s+2

2 S ) - (

S+22 S

)2

1

= (10 s2+5 s+8 S+42 S

- S+22 S

)

I 2Vs

= 2S

10 S2+12 S+2

V(L) = I2 x Ls

I2 = V (L)

Ls

VLVs

= 2s2 / (5s2 +6s+1 )

Page 21: Long Report Control System

Command MATLAB Parameter 6

Unit Step Response Parameter 6

Page 22: Long Report Control System

Discussion

In this lab, entitled control system we were instructed to find the transfer function by using

the model figure given. This experiment contains two parts, for first part we were found the

transfer function for the mechanical system models, and for the second part we found transfer

function for the electrical network models.

For part 1, firstly we observed the model figure for the system, which contains

output displacement for Cart 1 Cart 2, mass of cart 1 and cart 2, spring constant for spring

which attached to cart 1 and cart 2, coefficient of friction for cart 1, cart 2 and damper

coefficient and force applied to the mechanical system. Then, we draw a diagram for both

mass 1 and mass 2 in order to simplify the equation of force act on both masses. The system

has two degrees of freedom, since each mass can be moved in the horizontal direction while

the other is held still. Thus, two simultaneous equations of motion will be required to

describe the system. The two equations come from free-body diagrams of each mass.

Superposition is used to draw the free- body diagrams. For example, the forces on M1 are due

to (1) its own motion and (2) the motion of M1 transmitted to M through the system. We will

consider these two sources separate. If we hold Mi still and move M2 to the right, we see the

forces If we hold M1 still and move M1 to the right, we see the forces. The total force on M2

is the superposition, or sum, of the forces just discussed.. For Mi, we proceed in a similar

fashion: First we move M1 to the right while holding M2 still; then we move M2 to the right

and hold M1 still. For each case we evaluate the forces on M1,We obtained the equation of

transfer function as below :-

G1(s) = 1

s3+4 s2+4 s+1

G2(s) = s+2

s3+4 s2+4 s+1

For transfer function G1(s) and G2(s) ,we generated unit step response by set the system

parameter based on the values given. In order to get unit step response, we using the software

Page 23: Long Report Control System

called MATLAB. We input the value of numerator and denominator in the MATLAB

command. The output graph for both G1 and G2 a bit similar in shape, but for G2 the shape

of curve greater compared to G1.

Unit Step response G1 Unit Step response G2

For part 2, we were instructed to find the equivalent transfer function for the electrical

network system. The first step in the solution is to convert the network into Laplace

transforms for impedances and circuit variables, assuming zero initial conditions. We did

mesh analysis in order to solve the circuit. The circuit with which we are dealing requires two

simultaneous equations to solve for the transfer function. These equations can be found by

summing voltages around each mesh through which the assumed currents, I1(s) and I2(s),

flow. Around Mesh 1, where Ii(s) flows,. Before we modeled the transfer function, the

pattern illustrated by the circuit is:

Recognizing the form will help us write such equations rapidly; for example, mechanical equations of motion have same form.

Page 24: Long Report Control System

Then, we substitute the values of parameters into the equation. We used the crammer rule in order to solve the equation. The equation obtained as below:-

For Parameter 4 : VLVs

= s2 / (2s2 + 3s +1 )

Then, we input the values of numerator and denominator into MATLAB command to get step response graph.

Unit Step response graph for parameter 4.

We repeated the experiment electrical network for two times by changing the value of parameters. The equation and step response of parameter 5 and parameter 6.

For Parameter 5 : VLVs

= 2s3 +4s2 / (4s3 + 8s2 +s+1 )

Unit Step response of parameter 5

Page 25: Long Report Control System

For Parameter 6 : VLVs

= 2s2 / (5s2 +6s+1 )

Unit Step Response of Parameter 6

Page 26: Long Report Control System

Conclusion

After completing this lab and lab report, we were able to draw several important conclusions.

Firstly, we were clearly understand what is transfer function. Transfer function is a

mathematical model, for a linear time-invariant system for mechanical and electrical system.

Then, we learned how to use the crammer rule in control system such as mechanical and

electrical network in order to simplify the equation. In addition, we also learned how to find

step response using MATLAB software especially in transfer function equation. Moreover,

we also know to implement and analyze the system response for the control system obtained.

Page 27: Long Report Control System

References

Norman S.Nise(2011). CONTROL SYSTEMS ENGINEERING Sixth Edition, Pg 33-67.

Ghosh (2004).Control Systems: Theory And Applications , pg 10 -15.

U.A.Bakshi, V.U.Bakshi(2008). Control System Engineering, pg 32-65.

Branislav Kisačanin, Gyan C. Agarwal(2001). Linear Control Systems: With Solved Problems and Matlab Examples,pg 10-17.

Rao V. Dukkipati (2006).Analysis and Design of Control Systems Using MATLAB, pg 35-39.