ECE 2660

Labs for Module 5

Part A: RC Circuits with Rectangular Pulse Excitation

Overview

In this lab we explore a series resistor-capacitor circuit with a rectangular pulse excitation. We will see how superposition applies for signals, and explore different techniques for analysis.

Lab Procedures

The circuit for this exercise is shown in Figure 1.

Figure 1

  1. Be sure to capture screen images and ".csv" for all of your tests below.
  2. We will be testing this circuit with a constant "on" square pulse width of 400µS and varying the repetition rate. The function generator on the Virtual Bench is configured by specifying a frequency and percent pulse width. In order to keep the positive on time constant you will need to adjust both the frequency and duty cycle. We will work with the following frequencies and duty cycles.

a)500 HZ, 20%

b)1000HZ, 40%

c)2000 HZ 80%

  1. Scope Settings should be :

(a)10 X Probes and channel setting

(b)Acquisition : Average 8 X

(c)DC Coupling

(d)Trigger Rising Edge , FGEN start

(e)Channel 1 always connected to Function generator output

(f)Channel 2 is connected to the V_Capacitor node.

4. Function generator settings for amplitude.

a)V Pk-Pk 3.2 volts.

b)Offset of 1.6 volts.

c)Verify with the scope that your pulse now has an amplitude, and that the most negative part of the pulse is 0 volts.

  1. Test your circuit at each of the frequencies listed in Step 2. Make note of the peak and minimum capacitor voltages for each.

Part B: A Signals and System Perspective ofRC Circuits with Impulse and Rectangular Pulse Excitation

Overview

This lab is a continuation of Part A using the same circuit. We will emulate an impulse input and look at the resulting estimate of the impulse response. Then we will look at the response of the circuit to a rectangular pulse and compare it with the theoretical result when the captured input is convolved with the theoretical impulse response.

We will first capture the impulse and the impulse response using the virtual bench. The scope data will be saved as a .csv file. We will next use LabVIEW to read in the data file. The displayed data file will be used to generate the parameters for the theoretical analysis. LabVIEW will then run a MathScript node (using MatLab code) to calculate the shape of the theoretical impulse response. Finally a plot is generated showing the measured and theoretical responses.

Lab Procedures

Impulse Response

Figure 1

  1. Recreate the RC circuit from before in Figure 1; the capacitor is 25U 223M.
  2. Set the function generator to:
    200 Hz, 3.2 Vpp, 1.6 V DC offset, and 0.3% duty cycle.

a) The duty cycle will display 0% however you should be able to see a small sharp edge on the graph.

  1. Scope Settings should be :

a)10 X Probes and channel setting

b)Acquisition : Average 8 X

c)DC Coupling

d)Trigger Rising Edge , FGEN start

e)Channel 1 always connected to Function generator output

f)Channel 2 is connected to the V_Capacitor node.

  1. Channel 1 Probe on the function Generator:

a)Zoom in on Channel 1 and you will notice that it is a rectangular pulse. M

(Note: An ideal impulse is zero width but has an area of one. This area calculated is a scale factor to the ideal impulse which is used to scale the output.)

  1. Set the time axis on the scope so that one impulse response is displayed clearly across the screen.
  2. Notice now that at this time scale the input looks like an impulse with a very small width.
  3. Export the capture buffer of the oscilloscope to a CSV file.
  4. Run the LabVIEW vi (program) that is in the Lab Module 5 folder on Collab.
  5. Be sure to push the run (arrow) button to start the vi
  6. In the box labeled “VB CSV File), browse to your file created on the VB
  7. Push the button labeled “Open” to import the file
  8. You should now see a plot of the impulse and response data
  9. Use “select type” to select “RC” for this experiment
  10. Enter the values of R (ohms) and C (Farads) in the appropriate boxes
  11. Use the cursor on the plot to move to the start of the impulse and push the button to read the value into the program
  12. Use cursors similarly to read in values for end of the impulse, start of impulse response, amplitude of impulse, and end of impulse response.
  13. Push the “ok run Mathscript” button.
  14. You should see a plot of both measured and theoretical impulse responses.
  15. Run the script and compare the empirical impulse response with the theoretical ones
  16. Why might the empirical and theoretical results be a little different?

Rectangular Pulse Response Revisited

  1. Use the circuit from the last lab experiment which is displayed above.
  2. Set the function generator to:
    500 Hz, 3.2 Vpp, 1.6 V DC offset, and 20% duty cycle.
  1. Scope Settings should be :

g)10 X Probes and channel setting

h)Acquisition : Average 8 X

i)DC Coupling

j)Trigger Rising Edge , FGEN start

k)Channel 1 always connected to Function generator output

l)Channel 2 is connected to the V_Capacitor node.

  1. Export the capture buffer of the oscilloscope to a CSV file. Make sure that there is only one period on this captured signal
  2. Run the LabVIEW vi and import the data and plot the theory vs measurement plot as before except select “rect” as test type.
  3. Why might the empirical and theoretical results be a different?

Part C: RLC Circuits with Various Excitations

Overview

In this section of the lab we explore a series resistor-inductor-capacitor circuit with a rectangular pulse excitation. For the first part of the lab you will be testing this second order differential equation with a narrow pulse input to extract the impulse response. This impulse response of the physical system can be convolved with different input signals to understand what output would be obtained from the physical system. Different input signals are tested within the rest of the lab.

Lab Procedures

The circuit for this exercise is shown in Figure 1.

Figure 1

  1. Create the RLC circuit in Figure 1;

a)L1 and L2 are 68uH; this will look like a blue resistor with blue gray black (gold).

b)The capacitor is 0.001uF; this is the capacitor labeled 102.

c)Do not put R2 in yet, just create a short at the point in the circuit.

Part 1: Impulse Response

  1. Set the function generator to:

10kHz, 6.8 Vpp, 3.45 V DC offset, and 0.2% duty cycle. The duty cycle will display 0% however you should be able to see a small sharp edge on the graph.

  1. Scope Settings should be :

(g)10 X Probes and channel setting

(h)Acquisition : Average 8 X

(i)DC Coupling

(j)Trigger Rising Edge , FGEN start

(k)Channel 1 always connected to Function generator output

(l)Channel 2 is connected to the V_out node.

  1. Set the Channel 1 Probe on the function Generator:

b)Zoom in on Channel 1 and you will notice that it is a rectangular pulse. M

c)Export the CSV file for this impulse function

  1. Run the LabVIEW program as before using the “RLC” type and make sure to enter the correct values for R, L, and C for your circuit.

a)Run the Mathscript and see if calculated value corresponds to the real impulse response. Why might the empirical and theoretical results be a little different?

Part 2: RLC Circuit with R2 as 220ohms

  1. Set the function generator to:10kHz, 6.8 Vpp, 3.45 V DC offset, and 50% duty cycle.

b) Add in R2 as a 220ohm resistor

c)The scope settings will be the same as before

d)Take a screen shot of what the signal looks like

  1. Set the Channel 1 Probe on the function Generator:
  2. Export the CSV file for this impulse function and import it to Matlab as done in the previous labs.
  3. Run LabVIEW program as in the earlier parts of the lab.
  4. See if calculated value corresponds to the real impulse response. Why might the empirical and theoretical results be a little different?

Part 3: RLC/RC Circuit with R2 as 220ohms

  1. RC Circuit with R2 as 220 at 1kHz
  2. Short out the two inductors. This creates a 1st order circuit instead of the 2nd order circuit designed in part 2.
  3. The scope settings will be the same as before
  4. Take a screen shot
  1. RC Circuit with R2 as 220 at 1Mhz

e)Change the frequency to 1Mhz

f)The scope settings will be the same as before

g)Take a screen shot

  1. RLC Circuit with R2 as 220 at 1MHz

h)Add the inductors back in by removing the short.

i)The scope settings will be the same as before

j)Take a screen shot

  1. At this point you should have four screen shots. Discuss the differences between the 1st and 2nd order circuits and how frequency affects these characteristics. Why are these differences occurring? Make note of the peak to peak and other general characteristics of these signals

Part 4: RLC Circuit with R2 as 680ohms

  1. Change R2 to 680 ohms resistor
  1. Repeat Part 2 with the 680 ohm resistor for R2. Within the Matlab script change the resister value at the top to 730 to account for the 680 ohm resister and the 50 ohms of the function generator

Part 4: Other input signals – if time permits

  1. Change the wave type to be a sinusoidal. Set the function generator to 1V amplitude (2v peak to peak) with a frequency of 7kHz. Take a screen shot of this.
  1. Set the frequency to 1MHz. Take a screen shot of this. Make note of the peak and minimum capacitor voltages for each frequency.
  1. Change the wave type to be a Triangular. Set the function generator to 1V amplitude (2v peak to peak) with a frequency of 20kHz. Take a screen shot of this.
  1. Test your circuit at each of the frequencies listed in Step 2.

What you expect to see:

220 ohm resister

680ohm res

Page 1 of 9