E12 Assignment 01

Description: 

Problems: 
1. Various Forms of the Sifting Integral

In class we showed that

by arguing that the only value of the function f() that matters in the integral is when the argument of the impulse is zero. Using the same idea, evaluate the following integrals.

2. First Order Step Response, No Discontinuity, Time Domain

Consider the circuit below R1=1Ω, R2=2Ω, L=3H

a) If ein(t) is a unit step input find τ, eout(0+), and eout(∞)

b) Find the step response for t≥0.

3. First Order Impulse Response, No Discontinuity, Time Domain

For the circuit shown, determine the impulse response. R1=1Ω, R2=2Ω, L=3H

4. 2nd Order Step Response, Guess and Check

Consider the circuit below C=0.25F, L=1H, R=5Ω

a) Show that it is described by the differential equation

 

where f(t)=ein(t), and y(t)=eout(t).  A dot above a function denotes differentiation, 2 dots denotes a second derivative...

b) Show that the unit step response (f(t)=γ(t)) is given by

(remember that the unit step response has zero initial conditions at t=0-, i.e., it is a zero state response).

c) The following MATLAB code plots the step response.  Add comments to the code and then turn in the code and the resulting plot.  You will be graded on the quality of your comments.  The file is at e12AsnStepPlot.m.  Note: the MATLAB code "t>=0" will be equal to 0 when t is less than 0 and equal to 1 for t greater than or equal to zero.

5. Second Order, Impulse, Time, No discontinuity

For the previous problem

a) Find an expression for the unit impulse response.

b) Use Matlab to plot it - turn in well commented Matlab code and the resulting plot (you will be graded partly on the quality of your comments).  Use the same time scale as before. 

6. First Order Circuit with Discontinuity in Step Response, Time Domain Solution

Consider the circuit below L=1H, R=5Ω

a) Show that it is described by the differential equation

where f(t)=ein(t), and y(t)=eout(t).

b) Show that the unit step response is given by

(remember that the unit step response has zero initial conditions at t=0-, i.e., it is a zero state response).

c) Plot the result for 2 seconds.  Turn in Matlab code (well commented) and the plot.

7. First Order, Impulse, Time, Discontinuity

For the previous problem

a) Find an expression for the unit impulse response.

b) Use Matlab to plot the impulse response for the first 2 seconds - turn in well commented Matlab code and plot.  Use the same time scale as before.  (you will be graded partly on the quality of your comments). 

You may find this useful: the following code plots an "impulse" with height of 1.5 at a location of -0.5 on the x-axis.  Note: Don't worry that the tip of the arrow extends slightly above 1.5.  This is because the "plot" command centers  the triangular marker used for the arrowhead at the specified location ( (x,y)=(-0.5,1.5) in this example).

plot([-0.5 -0.5],[0 1.5],'r:');   %plot a red vertical line at x=-0.5 from y=0 to y=1.5
plot(-0.5,1.5,'r^','MarkerFaceColor','r');  %put a red triangle at top of line
8. A look at some lab data

Start MATLAB and move the file "HiRes.mat" into that directory (you should see the file in the directory pane of the MATLAB interface).

Enter the following commands:

load HiRes        % Load data from the HiRes.mat file
e_in=data{1};     % Get input data (voltages)
e_out=data{2};    % Get output 
subplot(211);  plot(t,e_in);    % Plot input voltage
xlabel('Time (S)'); ylabel('e_{in}(t) (V)'); 
title('Input Voltage vs time');
subplot(212);  plot(t,e_out);    % Plot input voltage
xlabel('Time (S)'); ylabel('e_{out}(t) (V)'); 
title('Output Voltage vs time');

The voltages plotted above are the input and output voltages (taken from an actual circuit using an oscilloscope) for the circuit below:

Look up what the "diff" command does (>>doc diff at MATLAB prompt). Run the following code.

e_in_diff = diff(e_in)./diff(t);
e_out_diff = diff(e_out)./diff(t);
tnew = t(1:end-1);

subplot(211);  plot(tnew,e_in_diff);   xlabel('Time (S)');
subplot(212);  plot(tnew,e_out_diff);  xlabel('Time (S)');

a) Add comments to the code and finish adding labels to the graphs (i.e., titles, and y-axis labels).

b) Explain the basic shapes of the resulting graphs (a lot of detail is not necessary). Don't worry about the "noisy" nature of the signals.

Note: Numerical differentiation tends to produce results that look "noisy" - as it does in this case. (To think about, but not answer here: why would numerical differentiation be noisy?)