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.

Consider the circuit below R_{1}=1Ω, R_{2}=2Ω, L=3H

a) If e_{in}(t) is a unit step input find τ, e_{out}(0^{+}), and e_{out}(∞)

b) Find the step response for t≥0.

For the circuit shown, determine the impulse response. R_{1}=1Ω, R_{2}=2Ω, L=3H

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

a) Show that it is described by the differential equation

where f(t)=e_{in}(t), and y(t)=e_{out}(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.

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.

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

a) Show that it is described by the differential equation

where f(t)=e_{in}(t), and y(t)=e_{out}(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.

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

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?)