Solutions to EE 321 Homework #2: Circuits and Systems, Assignments of Electrical and Electronics Engineering

The solutions to problem 1.15 and problem 1.42-1.43 from the ee 321 fall 2002 homework #2. The problems involve calculating output voltages and analyzing transfer functions for electrical circuits using matlab.

Typology: Assignments

Pre 2010

Uploaded on 08/08/2009

koofers-user-moq
koofers-user-moq 🇺🇸

10 documents

1 / 17

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
EE 321
Fall 2002
Homework #2
Solutions
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Solutions to EE 321 Homework #2: Circuits and Systems and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

EE 321

Fall 2002

Homework

Solutions

p1_15.m Page 1

% PROBELM 1. % % Using algebra, found the following values: vI_min = 2; vI_max = 3.138; % Make vector for input voltage with 1 mV spacing vI = vI_min:0.001:vI_max; % Calculate output voltage vO = 10 - 5 ***** (vI - 2) .^ 2; % Plot vO vs. vI plot(vI,vO); axis([2 3.2 0 10]) grid title('Plot of v_O = 10 - 5(v_I - 2)^2') xlabel('v_I (V)') ylabel('v_O (V)') % From plot or algebra, find vO = 5V when vI = 3V VI = 3; VO = 5; % Plot Q point on vO vs. vI plot hold on plot(VI,VO,'o') print

Plot of vO = 10 - 5(vI - 2)^2

vI (V)

vO

(V)

p1_42.m Page 1

% PROBLEM 1. % % Want f to go from 10^1 to 10^7 on log scale % Make vector for this f = logspace(1,7,10000); % Calculate Av Av = 100 ./ ((1 + j ***** f / 10 ^ 4) .* (1 + 10 ^ 2 ./ (j ***** f))); Av_dB = 20 *log10 ( abs (Av)); semilogx(f,Av_dB); grid title('Plot of |A_v| for Problem 1.42') xlabel('f (Hz)'); ylabel('|A_v| (dB)') print % From plot can easily see gain at 10, 10^3, 10^5, 10^6, 10^7 Hz % gain at 10,000 Hz is 37 dB

% Zoom in on region between 30 dB and 40 dB to find gain at 100 Hz and % 10000 Hz axis([10 10 ^ 5 30 40]) print % From plot can easily see gain at 100 Hz is 37 dB, % gain at 10,000 Hz is 37 dB

1 10

2 10

3 10

4 10

5

Plot of |Av | for Problem 1.

f (Hz)

|A

| (dB)v

p1_43.m Page 1

% PROBLEM 1. % % Values from book R1 = 1e6; R2 = 10e3; R3 = 20e3; C1 = 10e-12; C2 = 100e-9; Gm = 0.1;

% From work, find corner frequencies are 53 Hz and 16 kHz % Make vector for frequencies covering a little more than this range f = logspace(1,5,10000);

% Transfer function is in terms of s = j w, where w = 2 pi f w = 2 ***** pi ***** f;

s = j ***** w;

T = (1 ./ (1 + R1 ***** C1 ***** s)) .* (s ***** Gm ***** (R2 ***** R3 / (R2 + R3)) ./ (s + 1 / ((R2 + R3) ***** C2))); T_dB = 20 *log10 ( abs (T)); semilogx(f,T_dB); grid title('Plot of |T(\omega)| for Problem 1.43') xlabel('f (Hz)'); ylabel('|T(\omega)| (dB)') print

1 10

2 10

3 10

4 10

5

Plot of |T(ω)| for Problem 1.

f (Hz)

|T(

ω

)| (dB)