0% found this document useful (0 votes)
112 views

Assignment 02 Solutions

This document contains an assignment question regarding circuit analysis and control systems. It includes: 1) A mechanical system with a mass-spring-damper and its differential equation, transfer function, and response over time. 2) An RLC circuit with an initially charged capacitor, its differential equation, current and voltage over time. 3) An op-amp circuit and derivation of its transfer function in terms of resistor and capacitor values.

Uploaded by

Bugra AYAN
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views

Assignment 02 Solutions

This document contains an assignment question regarding circuit analysis and control systems. It includes: 1) A mechanical system with a mass-spring-damper and its differential equation, transfer function, and response over time. 2) An RLC circuit with an initially charged capacitor, its differential equation, current and voltage over time. 3) An op-amp circuit and derivation of its transfer function in terms of resistor and capacitor values.

Uploaded by

Bugra AYAN
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

The University of New Brunswick

Department of Electrical and Computer Engineering Fredericton, NB, E3B 5A3 Canada

EE3312 Systems and Control


Assignment 2- January 26, 2007 Due Date: February 5, 2007

Instructor: Ismail. H. Altas Question 1.

A mechanical system is given in Fig. Q1, where y, k, m and B are the position of the mass, the springs constant, the mass, and the friction coefficient, respectively. The initial conditions are y(0)=0 and y(1)(0)=2, where y(1)(0) is the term that appears in Laplace transform of a second order differential equation as s2Y(s)sy(0)-y(1)(0) when the initial conditions are considered. Assume that the applied force f(t)=u(t) is a unit step function.
a. b.

Fig. Q1.

Write differential equation for this system. Assume f(t) and y(t) as input and output, respectively and obtain the transfer function with all initial conditions are zero. c. Let m=1, B=3 and k=2, and determine the response y(t) using inverse Laplace transform. d. Develop a Matlab/Simulink simulation block diagram model for this system and simulate it. e. Compare the results from (c) and (d). Assume that B is the total friction constant from both sides.

SOLUTION (a). Differential Equations


From figure Q1, assuming B is the total friction coefficient and f is the total positive force including the effect of gravity;

d2y dy = f (t ) ky B 2 dt dt

PS: 1. If the gravity effect mg is included, then the total force becomes fT(t)=f(t)+mg 2. If B1 and B2 is used instead of B, then B=B1+B2

(b). Transfer Function (with zero initial conditions ) s 2Y ( s ) sy (0) y (1) (0) = F ( s ) kY ( s ) B [ sY ( s ) y (0) ]

s 2Y ( s ) + sBY ( s ) + kY ( s) = F ( s) + By (0) + sy (0) + y (1) (0)

(s

+ sB + k Y ( s ) = F ( s ) + By (0) + sy (0) + y (1) (0)


F ( s) By (0) + sy (0) + y (1) (0) + s 2 + sB + k s 2 + sB + k

Y ( s) =

or another solution may be: F ( s) Mg ( s ) By (0) + sy (0) + y (1) (0) Y (s) = 2 + 2 + s + s ( B1 + B2 ) + k s + sB + k s 2 + sB + k


For zero initial conditions the transfer function becomes;

Y ( s) 1 = 2 F ( s ) s + sB + k

or if mg is consitered the output can be written as a function of two inputs.

Y (s) =

F (s) Mg ( s ) + 2 s + sB + k s + sB + k
2

The University of New Brunswick


Department of Electrical and Computer Engineering Fredericton, NB, E3B 5A3 Canada

EE3312 Systems and Control


Assignment 2- January 26, 2007 Due Date: February 5, 2007

Instructor: Ismail. H. Altas

(c). The response of y(t) using inverse Laplace transform for m=1, B=3 and k=2, and f(t)=u(t)=1.
Y ( s) = F ( s) By (0) + sy (0) + y (1) (0) + s 2 + sB + k s 2 + sB + k

Using the particular values given for m, k, B, and f(t),

Y (s) =

sy (0) + y (1) (0) + 3 y (0)

(s

+ 3s + 2

s s + 3s + 2
2

Y (s) =

(s

0+2+0
2

+ 3s + 2

) s (s

1
2

+ 3s + 2

Y (s) =

(s

2
2

+ 3s + 2

) s (s

1
2

+ 3s + 2

Using partial fraction expansion;


Y (s) =

2 2 1 2 1 12 2 1 or Y ( s ) = + s +1 s + 2 + s s +1 + s + 2 ( s + 1)( s + 2) s ( s + 1)( s + 2)

Then,

1 1 y (t ) = 2et 2e 2t + e t + e 2t 2 2

y (t ) =

1 t 3 2 t +e e 2 2

% Assignment 2 % Answer 1 clear; clf % -------------------t=0:0.1:10; y1=1/2; y2=exp(-t)-(3/2)*exp(-2*t); y=y1+y2; plot(t,y) xlabel('Time (sec.)') ylabel('y') grid

PS:
1. If the gravity effect mg is included, then the total force becomes fT(t)=f(t)+mg=1+9.8=10.8 2. If B1 and B2 is used instead of B, then B=B1+B2=3+3=6.

The shape of the response does not change. However the graph may be shifted up.

The University of New Brunswick


Department of Electrical and Computer Engineering Fredericton, NB, E3B 5A3 Canada

EE3312 Systems and Control


Assignment 2- January 26, 2007 Due Date: February 5, 2007

Instructor: Ismail. H. Altas

(d). Matlab/Simulink simulation block diagram model


Let us use the output equation that includes the initial condition.
Y ( s) = F ( s) By (0) + sy (0) + y (1) (0) + s 2 + sB + k s 2 + sB + k Y ( s) = F (s) y (1) (0) + 2 s 2 + sB + k s + sB + k

Y ( s ) s 2 + sB + k = F ( s) + y (1) (0)
s 2Y ( s ) + sBY ( s ) + kY ( s ) = F ( s ) + y (1) (0) s 2Y ( s) = sBY ( s ) kY ( s ) + F ( s) + y (1) (0)

Caution:
It should not be forgotten that the initial condition is present only at the beginning of the simulation. After the first sampling, it is replaced by the new values of y(t). Therefore after the first sampling, the input signal for y(0) should be zero. Therefore a step input with initial value 2 and final value 0 after 1 sec is used to represent y(0). Do not forget that there may be many different types block diagrams to represent the same system. The shape of the block diagram may be different but the resultant graph should be the same or similar.

(e). Comparison of the results from (c) and (d).


The analytic solution of part (c) is the actual solution. The overshoot is caused by the initial value of y(t). The value of the overshot is determined mainly by the sampling period dt, which is used in t as t(k+1)=t(k)+dt. dt is equal to 0.1 for the solution I used. It may be different for others. For part (d), the initial condition was kept in present for 1 sec. instead of 0.1 sec. Therefore the overshoot is higher. For both cases the steady-state value is 0.5.

The University of New Brunswick


Department of Electrical and Computer Engineering Fredericton, NB, E3B 5A3 Canada

EE3312 Systems and Control


Assignment 2- January 26, 2007 Due Date: February 5, 2007

Instructor: Ismail. H. Altas

Question 2.
An RLC circuit is given in Fig. Q2. The capacitor C is initially charged at 10 V and the switch S closes at t=0. The other circuit parameters are; L=5 H and the resistor R=20 Ohm, and C=0.05 F. Assume VC as input and VR as the output.
a. b. c.

Fig. Q2.

Write differential equation for this circuit. Obtain the current I(s) and voltage VR(s) in s-domain. Obtain analytical solutions for i(t) and vR(t) using inverse Laplace transform and plot it for 10 seconds. d. Develop a Matlab/Simulink block diagram model and simulate the system. e. Compare the results from (c) and (d).

Solution 2.
(a). Differential equation
Applying Kirchhoffs voltage law:

di 1 + Ri + idt = 0 dt C

di 1 = Ri idt dt C

(b). I(s) and VR(s) Applying Laplace transform; 1 I ( s ) i ( 1) (0) + L [ sI ( s ) i (0) ] + RI ( s ) + = 0 Or C s s


1 i ( 1) (0) 1 i ( 1) (0) Ls + R + I ( s ) = Li (0) Ls + R + I ( s ) = Li (0) Cs Cs Cs Cs Replacing the values for the circuit parameters and the initial conditions as; i ( 1) (0) vc(0) = = 10 V and i(0)=0 A. C

20 10 20 10 then 5s + 20 + I ( s ) = + 5s + 20 + s I ( s ) = 0 s s s Solving for I(s); 10 10 200 s s VR ( s ) = RI ( s ) = 20 I (s) = = 20 20 20 5s + 20 + s s 5s + 20 + s 5s + 20 + s

The University of New Brunswick


Department of Electrical and Computer Engineering Fredericton, NB, E3B 5A3 Canada

EE3312 Systems and Control


Assignment 2- January 26, 2007 Due Date: February 5, 2007

Instructor: Ismail. H. Altas

(c). i(t) and vR(t)


I ( s) = 10 5s 2 + 20 s + 20 I ( s) = 2 s 2 + 4s + 4

I ( s) =

( s + 2 )2
i (t ) = 2te 2t

getting Inverse laplace; 2 = 2te2t i (t ) = L1 [ I ( s ) ] = L1 2 ( s + 2)

The voltage across the resistor will be; vR (t ) = 20i (t ) = 40te 2t V.


% Answer 2 t=0:0.1:10; ib=2*t.*exp(-2*t); vR=40*ib; subplot(211) plot(t,ib) xlabel('Time (sec.)') ylabel('Current (A)') grid subplot(212) plot(t,vR) xlabel('Time (sec.)') ylabel('Voltage (V)') grid

vR (t ) = 40te 2t V.

(d). Matlab/Simulink block diagram model Using the equation obtained in part (b).

20 10 5s + 20 + s I ( s ) = + s

5sI ( s ) =

10 20 20 I ( s ) s s

The University of New Brunswick


Department of Electrical and Computer Engineering Fredericton, NB, E3B 5A3 Canada

EE3312 Systems and Control


Assignment 2- January 26, 2007 Due Date: February 5, 2007

Instructor: Ismail. H. Altas

(e). Comparison of the results from (c) and (d).


Since the circuit does not have a source that is on at all time, the capacitor will be discharged over the resistor and inductor. Therefore the capacitor voltage will drop to zero after some transient time. The current flowing in the circuit due to the initially charged voltage of the capacitor will be zero too when the capacitor is fully discharged. Since the resistor voltage is a function of the current, its variation will be similar to the current except the peak magnitude.

Caution:
It should not be forgotten that the initial condition is present only at the beginning of the simulation. After the first sampling, it is replaced by the new values of vc(t). Initial condition may be treated as in the first question. Or you may come up with a different block that compensates the initial condition in time. Do not forget that there may be many different types block diagrams to represent the same system. The shape of the block diagram may be different but the resultant graph should be the same or similar.

The University of New Brunswick


Department of Electrical and Computer Engineering Fredericton, NB, E3B 5A3 Canada

EE3312 Systems and Control


Assignment 2- January 26, 2007 Due Date: February 5, 2007
R1

Instructor: Ismail. H. Altas

Question 3
R2 C2 Vo

An OP-AMP circuit is given in the Fig. Q3. a. Obtain the transfer function of this circuit as Vi is the input and V0 is the output. Assume that the transfer function is in the form of Vo ( s ) a s 2 + a1s + 1 = 2 Vi ( s ) b1s Obtain parameters a2, a1 and b1 in terms of R1, R2, C1 and C2.

Vi C1

+
Fig. Q3.

Solution 3:
Zi = R1 1 = + C1s 1 + R1C1s

1 R1

Z f = R2 +

R C s +1 1 = 2 2 C2 s C2 s

I - =0

I i =I f =I Vi =IZ i -V0 =IZ f

V+ =V- =0

V0 ( R C s+1)( R 2 C 2s+1) = - R 1R 2 C1C 2s 2 + ( R 1C1 +R 2 C 2 ) s + 1 Z =- f =- 1 1 Vi Zi R 1C 2 s R 1C 2 s


R 1R 2 C1C 2 s 2 + ( R 1C1 +R 2 C 2 ) s + 1 V0 =Vi R 1C 2 s

a 2 =R 1R 2 C1C a1 =R 1C1 +R 2 C 2 b1 = R 1C 2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy