You are on page 1of 8
COMSATS-Lancaster Dual Degree Programme Names:-Ali Nawaz Ranjha Muhammad Anas Younas Usman Naseer Registeration # DDP-FA10-BTE-008 DDP-FA10-BTE-030

COMSATS-Lancaster Dual Degree Programme

COMSATS-Lancaster Dual Degree Programme Names:-Ali Nawaz Ranjha Muhammad Anas Younas Usman Naseer Registeration # DDP-FA10-BTE-008 DDP-FA10-BTE-030

Names:-Ali Nawaz Ranjha Muhammad Anas Younas Usman Naseer

Registeration # DDP-FA10-BTE-008

DDP-FA10-BTE-030

DDP-FA10-BTE-053

Control Systems Lab

Lab Session 2:-

Q1. Develop mathematical model of the following lead-lag network. Represent this model in both transfer function form and pole-zero-gain form.

Lab Session 2:- Q1 . Develop mathematical model of the following lead-lag network. Represent this model

Q2. The output of the above network is inverted. This is normally rectified by cascading an inverting amplifier at the output of the lead-lag network as shown below. Find the overall transfer function of two cascaded system.

Lab Session 2:- Q1 . Develop mathematical model of the following lead-lag network. Represent this model

Q1(ans.):-

For an inverting amplifier we have V out equal to

V out

= -A(V in ) => V out / V in = -A

Where A is the gain of op-amp. And we know that H (s) = V out / V in In case impedence is real meaning that we have only resistors connected with our op-amp. A = -R f / R in Generically, it can be defined as A = -Z 2 / Z 1 So combining the above equations our formula become H (s) = V out / V in = -Z 2 / Z 1 Where our Z 2 in the present case is Z 2 (s) = R 2 / 1+R 2 C 2 s And our Z1 is Z 1 (s)= R 1 / 1+R 1 C 1 s Putting the value of Z 1 (s) & Z 2 (s) in A our H(s) becomes H(s)=-R 1 R 2 C 1 s - R 2 / R 1 R 2 C 2 s + R 1 Writing the numerator and denominator of the above expression in the form of matrices we would get num=[-R 1 R 2 C 1 R 2 ] den=[R 1 R 2 C 2 R 1 ]

Matlab code:-

%----------------------------

% Question#1

%----------------------------

fprintf('Lead-Lag circuit in form of Transfer function and also Pole Zero Gain form\n') R1=input('Enter the value of R1 in ohms=\n') R2=input('Enter the value of R2 in ohms=\n') C1=input('Enter the value of C1 in farads=\n') C2=input('Enter the value of C2 in farads=\n') num=[-R1*R2*C1 -R2];

den=[ R1*R2*C2

R1];

sys=tf(num,den) [z,p,k] = zpkdata(sys)

Results:-

Lead-Lag circuit in form of Transfer function and also Pole

Zero Gain form Enter the value of R1 in ohms=

1

R1 =

1

Enter the value of R2 in ohms=

1

R2 =

1

Enter the value of C1 in farads=

1

C1 =

1

Enter the value of C2 in farads=

1

C2 =

Transfer function:

-s - 1

------

s + 1

z =

[-1]

p =

[-1]

k =

-1

Q2(ans.):-

Now we have just cascaded another op-amp with our previous op-amp configuration the result would be that our total transfer function would be Transfer function of the previous op-amp configuration multiplied with the transfer function of our new op-amp which is in series with the previous op-amp H T (s)=H old (s) X H new (s) So our H new (s) would be H new (s)= -R f / R in = -R 4 / R 3

And our H old (s) was H old (s) =-R 1 R 2 C 1 s - R 2 / R 1 R 2 C 2 s + R 1 So putting these two in the above formula we have H T (s)=R 1 R 2 R 4 C 1 s + R 2 R 4 / R 1 R 2 R 3 C 2 s + R 1 R 3 Now writing the numerator and denominator in the form of a matrices num=[ R 1 R 2 R 4 C 1 R 2 R 4 ] den=[ R 1 R 2 R 3 C 2 R 1 R 3 ]

Matlab code:-

%----------------------------

% Question#2

%----------------------------

fprintf('Transfer function of system having an op-amp in series with Lead-Lag circuit\n')

R1=input('Enter the value of R1 in ohms=\n') R2=input('Enter the value of R2 in ohms=\n') R3=input('Enter the value of R3 in ohms=\n') R4=input('Enter the value of R4 in ohms=\n') C1=input('Enter the value of C1 in farads=\n') C2=input('Enter the value of C2 in farads=\n') num=[R1*R2*R4*C1 R2*R4]; den=[R1*R2*R3*C2 R1*R3]; sys=tf(num,den) [z,p,k] = zpkdata(sys)

Results:-

Transfer function of system having an op-amp in series with Lead-Lag circuit Enter the value of R1 in ohms=

1

R1 =

1

Enter the value of R2 in ohms=

R2 =

1

Enter the value of R3 in ohms=

1

R3 =

1

Enter the value of R4 in ohms=

1

R4 =

1

Enter the value of C1 in farads=

1

C1 =

1

Enter the value of C2 in farads=

1

C2 =

1

Transfer function:

s + 1

-----

s + 1

z =

[-1]

p =

[-1]

k =

1