Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 ENGG 1015 Tutorial Op Amps and Signals 19 Nov Learning Objectives  Analyze circuits with operational amplifiers  Convert between representations of.

Similar presentations


Presentation on theme: "1 ENGG 1015 Tutorial Op Amps and Signals 19 Nov Learning Objectives  Analyze circuits with operational amplifiers  Convert between representations of."— Presentation transcript:

1 1 ENGG 1015 Tutorial Op Amps and Signals 19 Nov Learning Objectives  Analyze circuits with operational amplifiers  Convert between representations of systems News  HW2 deadline (19 Nov 23:55)  Revision tutorial (TBD) Ack.: MIT OCW 6.01, 6.003

2 Simple Op Amps (1) Assume the op-amps are “ideal” Determine the current I x when V 1 =1V and V 2 =2V. Determine the voltage V A when V 1 =1V and 2 =2V. Determine a general expression for V A in terms of V 1 and V 2. 2

3 Simple Op Amps (2) 3 1 1 2 2 4

4 Non-inverting Amplifier Use a single op-amp and resistors to make a circuit that is equivalent to the following circuit. 4 VnVn

5 Voltage-controlled Current Source Use the ideal op-amp model (V + = V - ) to determine an expression for the output current I o in terms of the input voltage V i and resistors R 1 and R 2. 5 vxvx v i +v x

6 Op Amp Configurations (1) Fill in the values of R1 and R2 required to satisfy the equations in the left column of the following table. The values must be non-negative (i.e., in the range [0,∞]) 6 R1R2 V o = 2V 2 - 2V 1 V o = V 2 -V 1 V o = 4V 2 - 2V 1

7 Op Amp Configurations (2) 7 R1R2 V o =2V 2 -2V 1 20kΩ V o =V 2 -V 1 20kΩ V o =4V 2 -2V 1 Impossible

8 Unusual Op Amp Configurations What is V o ? 8 V o = 0 V o = V 1 – V 2

9 Motor Control (1) The following circuit is a proportional controller that regulates the current through a motor by setting the motor voltage V C to V C = K(I d − I o ) where K is the gain (notice that its dimensions are ohms), I d is the desired motor current, and I o is the actual current through the motor. 9

10 Motor Control (2) 10

11 Multiple Representations of Systems State machines: computationally efficient. Difference equations: mathematically compact. Signal flow graphs: illustrate signal flow paths. Operator representations / z-transforms: analyze systems as polynomials. 11

12 From Blocks to Equations (1) Determine the difference equation that relates x[·] and y[·]. 12

13 From Blocks to Equations (1) Assign names to all signals. Replace Delay with R. Express relations among signals algebraically. E = X +W ; Y = RE ; W = RY Solve: Y = RE = R(X +W) = R(X + RY )  RX = Y − R 2 Y Difference equation: y[n] = x[n − 1] + y[n − 2] 13

14 Operator Algebra (1) Start with X, subtract 2 times a right-shifted version of X, and add a double-right-shifted version of X 14

15 Operator Algebra (2) 15

16 Quick Checking How many of the following systems are equivalent? 16 3

17 Geometric Growth The value of p 0 determines the rate of growth.  p 0 > 1: magnitude diverges monotonically  0 < p 0 < 1: magnitude converges monotonically  −1 < p 0 < 0: magnitude converges, alternating sign  p 0 < −1: magnitude diverges, alternating sign 17

18 Computing Responses (1) A given linear, time-invariant system turns the unit pulse into the triangle: The system is given the following input signal: Sketch the output signal. 18

19 Computing Responses (2) Consider the system described by y[n] = x[n] + y[n − 1] + 2y[n − 2]. Assume that the system starts at rest and that the input x[n] is the unit-step signal u[n]. We can compute the response through the iterating the difference equation. 19

20 Analysis of a Simple System (1) Consider a system H which transforms an input signal X into an output signal Y Suppose the input signal is a unit sample: and for that input, the samples of the output response signal are: Block diagram: 20

21 Analysis of a Simple System (2) Consider the input Let y[n] be the output response to x[n], as given in part 1, above, and let y′[n] be the output response to input x′[n]. y′[n] = y[n] − 16y[n − 4]  y′[0] = 1  y′[1] = -2  y′[2] = 4  y′[3] = −8  y′[4] = 16 − 16 = 0 21

22 Difference Equation Construction (1) Newton’s law of cooling states that: The change in an object’s temperature from one time step to the next is proportional to the difference (on the earlier step) between the temperature of the object and the temperature of the environment, as well as to the length of the time step. Let o[n] be temperature of object, s[n] be temperature of environment, T be the duration of a time step, K be the constant of proportionality 22

23 Difference Equation Construction (2) The difference equation for Newton’s law of cooling  i) the difference (on the earlier step) between the temperature of the object and the temperature of the environment  ii) as well as to the length of the time step  Be sure the signs are such that the temperature of the object will eventually equilibrate with that of the environment. The system function corresponding to this equation 23

24 Signals and Feedback Control (1) X : Desired temperature T set Y : Actual hot water temperature T HW The sensor reads T HW with gain k s, but has a unit delay. The valve also takes a unit delay to respond, and has some persistence about its motion, characterized by k v. The proportional controller, with setting k, converts the temperature difference between T set and the sensed temperature to a signal input to the valve. 24

25 Signals and Feedback Control (2) The difference equation: y[n] = k a x[n − 1] − k v y[n − 1] − k s k a y[n − 2] Assume the system starts at rest, and the input is a unit sample signal x[n] (i.e. x[n] = [1,0,0,0,…]), suppose k v = 0.9 and k a = 0.5 When k s = 0  y[0] = 0  y[1] = 0.5 (1) – 0.9 (0) – 0 = 0.5  y[2] = 0.5 (0) – 0.9 (0.5) – 0 = – 0.45  y[3] = 0.5 (0) – 0.9 (– 0.45) – 0 = 0.405  y[4] = 0.5 (0) – 0.9 (0.405) – 0 = – 0.3645 25

26 Signal and Feedback Control (3) When k s = – 0.35  y[0] = 0  y[1] = 0.5 (1) – 0.9 (0) – (– 0.35)(0.5) (0) = 0.5  y[2] = 0.5 (0) – 0.9 (0.5) – (– 0.35)(0.5) (0) = – 0.45  y[3] = 0.5 (0) – 0.9 (– 0.45) – (– 0.35)(0.5) (0.5) = 0.4925  y[4] = 0.5 (0) – 0.9 (0.4925) – (– 0.35)(0.5) (– 0.45) = – 0.522 When k s = 1.5  y[0] = 0  y[1] = 0.5 (1) – 0.9 (0) – (1.5)(0.5) (0) = 0.5  y[2] = 0.5 (0) – 0.9 (0.5) – (1.5)(0.5) (0) = – 0.45  y[3] = 0.5 (0) – 0.9 (– 0.45) – (1.5)(0.5) (0.5) = 0.03  y[4] = 0.5 (0) – 0.9 (0.03) – (1.5)(0.5) (– 0.45) = 0.3105 26 y[n] = 0.5 x[n − 1] − 0.9 y[n − 1] − 0.5 k s y[n − 2]

27 Grow, baby, grow (1) In each time period, every cell in the bioreactor divides to yield itself and one new daughter cell. However, due to aging, half of the cells die after reproducing. Po : The number of cells at each time step.  P o [n] = 2P o [n−1] − 0.5P o [n−2] Suppose that P o [0]= 10 and P o [n]= 0 if n<0. P o [0] = 10 P o [1] = 2P o [0] − 0.5P o [-1] = 20 + 0 = 20 P o [2] = 2P o [1] − 0.5P o [0] = 40 − 5 = 35 P o [3] = 2P o [2] − 0.5P o [1] = 70 − 10 = 60 27

28 Grow, baby, grow (2) Your goal is to create a constant population of cells, that is, to keep P o constant at some desired level P d. You are to design a proportional controller that can add or remove cells as a function of the difference between the actual and desired number of cells. Assume that any additions/deletions at time n are based on the measured number of cells at time n−1. Denote the number of cells added or removed at each step P inp. The difference equations P o [n] = 2P o [n − 1] − 0.5P o [n − 2] + P inp [n] P inp [n] = k(P d [n] − P o [n − 1]) 28

29 Grow, baby, grow (3) Draw a block diagram that represents the system P o [n] = 2P o [n − 1] − 0.5P o [n − 2] + P inp [n] P inp [n] = k(P d [n] − P o [n − 1]) Delays + Adders + Gains 29

30 Stepping Up and Down (1) Use a small number of delays, gains, and 2-input adders (and no other types of elements) to implement a system whose response (starting at rest) to a unit-step signal is Draw a block diagram of your system. 30 [1,1,1,…] [1,2,3,1,2,3,1,…]

31 Stepping Up and Down (3) First find a system whose unit-sample response is the desired sequence. The periodicity of 3 suggests that y[n] depends on y[n − 3]. The resulting difference equation is y[n] = y[n − 3] + w[n] + 2w[n − 1] + 3w[n − 2]. 31 [1,0,0,…] [1,2,3,1,2,3,1,…]

32 Stepping Up and Down (3) Next compute w[n] which is the first difference of x[n]: w[n] = x[n] − x[n − 1]. The result is the cascade of the first difference and the previous result. 32 [1,1,1,…] [1,0,0,…] [1,2,3,1,2,3,1,…]

33 Summary Response Difference equations Signal flow graphs Operator representations Signal flow graphs  Difference equations Operator representations  Signal flow graphs 33

34 Appendix: Partial Fractions 34

35 Appendix: Complex Numbers (1) Complex number z = x (Real) + yi (Imaginary) Complex conjugate of z = x + yi is defined to be x − yi 35

36 Appendix: Complex Numbers (2) Polar expressions  Argument φ and Modulus/magnitude/absolute value r The argument or phase of z is the angle of the radius OP with the positive real axis 36


Download ppt "1 ENGG 1015 Tutorial Op Amps and Signals 19 Nov Learning Objectives  Analyze circuits with operational amplifiers  Convert between representations of."

Similar presentations


Ads by Google