You are on page 1of 4

EEE244 EE Numerical Methods and Apps.

Final Exam

Derivatives

1. Explore how Matlab function diff can be amployed to differentiate the function

f (x) = 0.2 + 25x − 200x2 + 675x3 − 900x4 + 400x5 (1)

from x=0 to x=0.8. Compare your results with the exact solution and plot both on the same graph.What
can you conclude? .
2. Use gradient function to differentiate the same function you analyzed in previous problem (with diff
function). Plot all three solutions: exact, gradient and diff on the same graph. What can you conclude?
3. Two dimensional function is given:

z = y − x − 2x2 − 2xy − y 2 (2)

Plot this function in 3D using mesh function in matlab. Then use gradient function to find the 2D
derivative from x=-2 to 2 and y=1 to 3. Gradient syntax for 2d field is as follows

[f x, f y] = gradient(z, 0.25) (3)

Plot the derivative in x-y plane by using quiver function, then superimpose the contours of the function
on the same plot. Syntax of these two functions are given as

cs = contour(x, y, z); (4)


clabel(cs); (5)
holdon; (6)
quiver(x, y, −f x, −f y); (7)
holdof f (8)
0
4. Employ the classecal fourth-order RK method to integrate y = 4e0.8t − 0.5y from t=0 to t=1 using a
step size of 1 with y(0)=2. See page 734 old book or 496 new book.

Integration and Differentiation Review

1. Current through an inductor is given as i(t) = sin(ω1 t) + sin(ω2 t). Find the voltage across the inductor
as a function of time, if L=1 nH, ω1 =0.99 GHz, ω2 =1.01 GHz.
2. For the previous problem, plot the current, voltage in the time domain, Then plot the current and
voltage in the frequency domain.
3. Assume that the inductor is slightly nonlinear, due to magnetic materials used in it, and that the
1
inductance is a function of current. L = 1 + 1+i(t) nH. Find the voltage across the inductor as a function
of time now. Use Faraday’s Law to derive new voltage. v = d(L∗i)
dt . Plot the current and the voltage in
both time and frequency domains. How is the voltage different now?

Optimization Review

1. Problems 7.27 and 7.28 from the book.

1
2. An amplifier is represented with its Thevenin equivalent resistance Rth and Thevenin voltage Vth . The
amplifier is connected to a load RL . Find the resistance Rth for the following cases:
(a) Maximum power has to be transfered to the load. The power dissipated in the load can be found
as:

 2
Vth
p = RL (9)
Rth + RL

Subsequently, find the maximum power.


(b) Maximum voltage has to be transferred to the load. Voltage at the load can be written as:

RL
VL = Vth (10)
RL + Rth
What kind of amplifier would have such resistance?

Regression, Interpolation Review

1. You measured a resistor in the lab. The data is shown in the table below. The data doesn’t indicate a
linear relationship. Quantify the i-v relationship using both regression and interpolation. Which is more
appropriate to use? What is the order of the polinomial you got? Plot the i-v curve for 1000 points (or
so) between (-2V, 2V)
I [mA] V [V]
1 1.2
2 2.3
3 3.4
4 4.5
2. An output connector in your circuit will be subjected to high output power. All components in your
circuit experience stress (voltage, current, power and temperature). Components have maximum and
average power ratings. Average power rating of a component depends on temperature, standing-wave
ratio, altitude, frequency, etc. The manufacturer has given you the voltage and current derating curves.
By operating the connector below the derating curves, you will extend the life of the component greatly,
and improve the reliability and MTTF (mean-time to failure) or MTBF (mean-time between failures)
of your circuit. Voltage derating is function of the maximum electric field in the dielectric material used
in the connector, and the current derating is a function of heating of connector’s conductive materials.
The manufacutrer has given power derating curves in a form of a table shown in Table2. Find the
percentage of power derating at 42degC.
T degC P %
-20 100
-10 100
0 100
10 100
20 100
30 90
40 80
50 70
60 50
70 40
80 10
90 5
100 0

2
3. As an engineer in a power-electric company you have to monitor population in your county to plan the
increase in power consumption. Assume you live and work in the same county. Use the information
below:
http://www.census.gov/population/cencounts/ca190090.txt
to plot the population change year-by year from 1960-1990.

Note that you are estimating the trend of population increase or decrease.
Matrices Review

1. The following system of equations is generated using the mesh current method

10ia + 8ib = 40 (11)


−8ia + 20ib − 6ic = 0 (12)
−6ib − 10ic = −20 (13)
(14)

Find the currents ia , ib , ic using Matlab.


2. Download S-parameters of a two-port small-signal Mini-Circuits amplifier from here
http://gaia.ecs.csus.edu/~milica/EEE244/minicircuits.txt
Write a Matlab code to find the Z-parameters using the following transformations

(1 + S11 )(1 − S22 ) + S12 S21


Z11 = Z0 (15)
(1 + S11 )(1 − S22 ) − S12 S21
2S12
Z21 = Z0 (16)
(1 + S11 )(1 − S22 ) − S12 S21
2S21
Z12 = Z0 (17)
(1 + S11 )(1 − S22 ) − S12 S21
(1 − S11 )(1 + S22 ) + S12 S21
Z22 = Z0 (18)
(1 + S11 )(1 − S22 ) − S12 S21
(19)

Then, find the input impedance of the circuit at different frequencies using the following equation:
Z12 Z21
Zin = Z11 − (20)
Z22 + ZL
The impedance attached to the port two is ZL =50 Ω.

Roots of Equations Review

1. Page 164, problem 6.23


2. Find the expression for the impedance of a series and parallel resonant circuit. If R=50 ω, C=1 pF and
L=1 nH, write a Matlab code to find at which frequencies will the real part of the input impedance be
equal to 75 ω? What will be the imaginary part of the impedance? Plot all real and imaginary parts of
the impedance as a function of frequency.

Conclusion
For each of the problems, write short conclusion. For extra credit confirm your results with hand calculations
if appropriate, or results from other CAD.

3
Project At the end of EVERY week submit the status of your project, any codes, writeups and power-point
presentations you generated during that week. Each week you will get 0-10pts for progress. Look for more
specific instructions in WebCT.

Due Date
Submit the code in SacCT by the end of the semester. Do not bring previous lab writeup for the next Lab
session.

You might also like