1 - Penn State University

advertisement
EE 350
Problem Set 1 Cover Sheet
Fall 2016
Last Name (Print):
First Name (Print):
ID number (Last 4 digits):
Section:
Submission deadlines:
• Turn in the written solutions by 4:00 pm on Tuesday September 6 in the homework slot outside 121 EE East.
Problem Weight
1
25
2
25
3
25
4
25
Total
100
Score
The solution submitted for grading represents my own analysis of the problem, and not that of another student.
Signature:
Neatly print the name(s) of the students you collaborated with on this assignment.
Reading assignment: Lathi Chapter 1 and Background, Sections B.2 and B
Problems 1 through 3 review EE 210 material. Problem 5 introduces MATLAB commands for constructing and
labeling plots.
Problem 1:(25 points)
Consider the RL circuit in Figure 1. You may assume that the switch has been in position A long enough for the
voltages and currents to reach steady-state values. At time t = 0 the switch moved to position B.
Figure 1: The switch in the RL circuit is moved from position A to B at time 0.
1. (6 points) Find the voltage v(0− ) and the current i(0− ) just before the switch is opened.
2. (6 points) Find the voltage v(0+ ) and the current i(0+ ) immediately after the switch is opened.
3. (3 points) Find the voltage v(∞) and the current i(∞) after the switch has been opened for a very long time.
Justify your answer in one or two sentences.
4. (10 points) Find a differential equation that describes the response of the voltage v(t) for t ≥ 0.
Problem 2:(25 points)
Consider the RC circuit in Figure 2. You may assume that the switch has been closed long enough for the voltages
and currents to reach steady-state values. At time t = 0 the switch is opened.
Figure 2: The switch in the RC circuit is opened at time t = 0.
1. (6 points) Find the voltage v(0− ) and the current i(0− ) just before the switch is opened.
2. (6 points) Find the voltage v(0+ ) and the current i(0+ ) immediately after the switch is opened.
3. (3 points) Find the voltage v(∞) and the current i(∞) after the switch has been closed for a very long time.
Justify your answer in one or two sentences.
4. (10 points) Find a differential equation that describes the response of the current i(t) for t ≥ 0.
Problem 3: (25 points)
Consider the RLC circuit in Figure 3. You may assume that the switch has been closed long enough for the voltages
and currents to reach steady-state values. At time t = 0 the switch is opened.
Figure 3: The switch in the RLC circuit is opened at time t = 0.
1. (10 points) Determine the initial conditions
(a) (3 points) i(0+ )
(b) (7 points) di dt t=0+
2. (3 point) What is the final value of i(t)? Justify your answer in one or two sentences.
3. (12 points) Obtain a second-order differential equation in the current i(t) for t ≥ 0.
Problem 4: (25 points)
MATLAB is an important tool that is widely used in industry to analyze dynamic systems. Each problem set will
contain an exercise that introduces various features of MATLAB. You can access MATLAB in the EE computer
laboratory or purchase a license through the university. When using MATLAB, you can learn about a specific
MATLAB function by typing help followed by the MATLAB function name. Typing help by itself will display a
long list of topics for which help is available.
Start MATLAB and set the Current Folder to your working directory. Select New Script under the File tab and save
the following MATLAB m-file as go.m in your directory. Execute the m-file by typing go at the command prompt,
alternatively, press F5 when the cursor is positioned in the MATLAB editor window containing the file go.m.
% Example m-file
% Plot the sinc(x) function, where sinc(t) = sin(t) / t
t = linspace(-20,20,500);
% generate a time vector
y1 = sin(t) ./ t;
figure(1)
clf
plot(t,y1,’-k’)
xlabel(’Time (sec)’)
ylabel(’Amplitude’)
% Now plot an exponentially weighted sinusoid
y2 = exp(-abs(t/4)) .* cos(t);
hold on
plot(t,y2,’--r’)
title(’EE 350 Problem Set 1 Problem 4 Example’)
xlabel(’Time (sec)’)
ylabel(’Amplitude’)
legend(’sinc(t) = sin(t)/t’, ’e^{-|t|/3} cos(t)’)
1. (2 points) Three of the lines in the m-file end with a semicolon. What is the function of the semicolon in
MATLAB?
2. (2 points) What are the dimensions of the vectors t, y1, and y2 generated by the example m-file? {Hint: Use
the MATLAB command whos or size.}
3. (2 points) Why must we use the operator .* in calculating the signals y1 and y2?
4. (2 points) What happens if the command hold on is removed from the m-file?
5. (2 points) What do the commands figure(1) and clf accomplish?
6. (15 points) Type help subplot at the MATLAB command line to learn about the function subplot. Add
code to the example m-file so it that plots the sinusoids
y =
x =
3e−t/2 sin(2π t)
3e−t/2 cos(2π t)
in the upper subplot of figure 2, and in the lower subplot of figure 2, plots y versus x for 0 ≤ t ≤ 5. Use a time
vector that contains 500 uniformly spaced points. For the upper subplot, show y as a solid blue curve and x as
a dashdot green curve using a single plot command line. Label the two curves in the upper subplot using the
legend command. For the lower subplot, use a solid red curve and follow the plot command by the command
line axis equal. Why benefit does the command axis equal provide?
To receive credit
• Turn in figures 1 and 2 along with a copy of your m-file. To print a MATLAB figure, select file and then
Print, or simply type Ctrl+P.
• Include your name and section at the top of the m-file as comment lines.
• Use the MATLAB command gtext to place your name and section number within each figure.
• Make sure that you appropriately label the x and y axes; no credit is given for MATLAB plots whose axes
are unlabeled.
• Use the legend command to distinguish multiple curves in a single plot.
• Add an appropriate title to each figure.
Download