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 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.

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.

Q1(ans.):For an inverting amplifier we have Vout equal to Vout = -A(Vin) => Vout / Vin = -A Where A is the gain of op-amp. And we know that H (s) = Vout / Vin In case impedence is real meaning that we have only resistors connected with our op-amp. A = -Rf / Rin Generically, it can be defined as A = -Z2 / Z1 So combining the above equations our formula become H (s) = Vout / Vin = -Z2 / Z1 Where our Z2 in the present case is Z2(s) = R2 / 1+R2C2s And our Z1 is Z1(s)= R1 / 1+R1C1s Putting the value of Z1(s) & Z2(s) in A our H(s) becomes H(s)=-R1R2C1s - R2 / R1R2C2s + R1 Writing the numerator and denominator of the above expression in the form of matrices we would get num=[-R1R2C1 R2] den=[R1R2C2 R1] 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 = 1

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 HT(s)=Hold(s) X Hnew(s) So our Hnew(s) would be Hnew(s)= -Rf / Rin= -R4 / R3

And our Hold(s) was Hold(s) =-R1R2C1s - R2 / R1R2C2s + R1 So putting these two in the above formula we have HT(s)=R1R2R4C1s + R2R4 / R1R2R3C2s + R1R3 Now writing the numerator and denominator in the form of a matrices num=[ R1R2R4C1 R2R4 ] den=[ R1R2R3C2 R1R3 ] 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= 1

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 =

Transfer function: s+1 ----s+1

z= [-1]

p= [-1]

k= 1

You might also like