10
Simulation and Measurement of an RLC Circuit Revision: 10/22/2012 1300 NE Henley Court, Suite 3 Pullman, WA 99163 (509) 334 6306 Voice | (509) 334 6300 Fax page 1 of 10 Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners. Introduction This project demonstrates how to compare TINA Design Suite™ RLC circuit simulation results with the real characteristics of RLC circuits as measured using the Analog Discovery™ board. Overview An RLC circuit (or LCR circuit) is an electrical circuit consisting of a resistor, an inductor, and a capacitor that are connected in series or in parallel. The circuit forms a harmonic oscillator with a resistor to ensure that any oscillation induced in the circuit dies away over time if it is not maintained by a source. The instructions in Experiment Steps utilize a series topology and simulate the RLC circuit with Design Soft Inc. TINA software. “The Student Version of TINA is a powerful yet affordable software package for electronics students to simulate and analyze electronic circuits. It works with linear and nonlinear analog circuits as well as with digital and mixed circuits.” (Quote from http://www.tina.com ) You can employ transient analysis to plot the transient response of analog and mixed analog/digital circuits. These steps demonstrate how to perform both a transient and an AC analysis, and then compare each outcome with their actual result. Experiment Steps Time simulations and measurements 1. Open the TINA Students Version software 2. Place the components needed for this experiment in the schematic editor. (See Figure 3) The locations for each component are in the libraries: - The resistor, inductor, capacitor, voltage generator, and ground are in the Basic library - The Voltage pin is located in the Meters library 3. Save the schematic as RLC_Analog_Discovery.tsc to use it later. 4. Configure and run a transient analysis on the circuit you previously created from the Analysis Menu -> Transient option and configure the settings exactly like Figure 1. Make sure to set the Start display and End display, select Calculate operating point, and check Draw excitation.

Simulation and Measurement of an RLC Circuit · 2012-12-07 · Title: Microsoft Word - Tina Simulation and Measurement with Analog Discovery.docx Author: jpederso Created Date: 10/22/2012

Embed Size (px)

Citation preview

Simulation and Measurement of an RLC Circuit

Revision: 10/22/2012 1300 NE Henley Court, Suite 3

Pullman, WA 99163

(509) 334 6306 Voice | (509) 334 6300 Fax

page 1 of 10

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.

Introduction This project demonstrates how to compare TINA Design Suite™ RLC circuit simulation results with the real characteristics of RLC circuits as measured using the Analog Discovery™ board.

Overview An RLC circuit (or LCR circuit) is an electrical circuit consisting of a resistor, an inductor, and a capacitor that are connected in series or in parallel. The circuit forms a harmonic oscillator with a resistor to ensure that any oscillation induced in the circuit dies away over time if it is not maintained by a source. The instructions in Experiment Steps utilize a series topology and simulate the RLC circuit with Design Soft Inc. TINA software. “The Student Version of TINA is a powerful yet affordable software package for electronics students to simulate and analyze electronic circuits. It works with linear and nonlinear analog circuits as well as with digital and mixed circuits.” (Quote from http://www.tina.com ) You can employ transient analysis to plot the transient response of analog and mixed analog/digital circuits. These steps demonstrate how to perform both a transient and an AC analysis, and then compare each outcome with their actual result.

Experiment Steps Time simulations and measurements

1. Open the TINA Students Version software 2. Place the components needed for this experiment in the schematic editor. (See

Figure 3)

The locations for each component are in the libraries:

- The resistor, inductor, capacitor, voltage generator, and ground are in the Basic library - The Voltage pin is located in the Meters library

3. Save the schematic as RLC_Analog_Discovery.tsc to use it later.

4. Configure and run a transient analysis on the circuit you previously created from the Analysis Menu

-> Transient option and configure the settings exactly like Figure 1. Make sure to set the Start display and End display, select Calculate operating point, and check Draw excitation.

Simulation and measurement of an RLC circuit Digilent, Inc.

www.digilentinc.com page 2 of 10

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.

Figure 1. Transient Analysis

Figure 2 demonstrates the simulation results. In Figure 2 the Vin is the input signal and excitation for the circuit, while the Vout is the output signal set as voltage in this case.

Figure 2. Transient simulation of the RLC circuit

5. Build the circuit from Figure 3, preferably on your solderless breadboard, and connect the waveform generator 1 output

(W1), the ground ↓ (GND) of the Analog Discovery and the two oscilloscope channels (1+, 1-, 2+, 2-) to the RLC circuit.

Simulation and measurement of an RLC circuit Digilent, Inc.

www.digilentinc.com page 3 of 10

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.

Figure 3. Connections between the circuit and the Analog Discovery board

6. Open the Waveforms™ software.

7. Start up the WaveGen instrument. In the AWG1 window, set the input signal for the low pass filter circuit according to the following guidelines:

Shape = Square Frequency = 1 kHz Amplitude = 1V Offset = 0V Phase = 0 Click Run All or Run AWG1

8. Start the Scope instrument and adjust the settings according to the guidelines below to correctly

visualize the signals on the screen (See Figure 4):

Trigger Mode = Auto Trigger Source = Channel 1 Trigger Cond. = Rising Trigger Level = 0V Time Base = 200us/div Channel 1 and Channel 2 Offset = 0V Range = 1V/div. Click Run

+

Vin

R 200

C 10n

L 8.2m

2+

W1

1+

GND

1- 2-

Simulation and measurement of an RLC circuit Digilent, Inc.

www.digilentinc.com page 4 of 10

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.

Figure 4. Scope time visualization

9. Click on the Stop button, go to the File menu, and select the Export feature. (See Figure 5) Make sure to select the Headers and Comments options and then save the results as a .csv file.

Figure 5. Export Option

10. Import the measured data from the .csv file into TINA. Select the Tools menu -> Diagram Window (if not already opened) -> File -> Import and select the file to be imported. (See Figure 6) Skip five

Simulation and measurement of an RLC circuit Digilent, Inc.

www.digilentinc.com page 5 of 10

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.

rows and set the Field Separator to Comma. The skipped rows contain information about the device, software and instruments recording your saved data. (See Figure 7)

Figure 6. TINA Diagram Editor for Import File

Figure 7. TINA import file

11. Upon importing a file, another tab in the simulation window containing the imported data will automatically open. To compare the simulated and measured data they must be on the same plot. Select the imported tab and copy the measured data to the clipboard with Ctrl+C. Select the tab with your simulation data and press Ctrl+V to paste the measured data with your simulated data. This will ensure that TINA plots both curves on the same graph for a better comparison.

Simulation and measurement of an RLC circuit Digilent, Inc.

www.digilentinc.com page 6 of 10

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.

You can change the color of any curve by double clicking on it. The graph in Figure 8 represents a zoomed area of the compared signals.

Figure 8. Time comparison Frequency simulations and measurements

12. Figure 9 demonstrates the steps necessary to see the simulated transfer characteristic of the circuit in TINA. Set only the 2+ Voltage pin as the output and set the rest of the Voltage pins to none. In the Analysis menu select the AC Analysis -> AC Transfer Characteristic. You must set the Frequency range from 5 kHz to 50 kHz, select sweep type linear and the change the number of points to 100. The result will appear in a new tab of the Diagram Window. (See Figure 10) Double click on the frequency values from the axes and uncheck the Round axis scale option. The Round axis scale option comes checked by default and does not allow you to set 5 kHz start frequency.

Simulation and measurement of an RLC circuit Digilent, Inc.

www.digilentinc.com page 7 of 10

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.

Figure 9. AC Analysis

Figure 10. TINA frequency analysis

Simulation and measurement of an RLC circuit Digilent, Inc.

www.digilentinc.com page 8 of 10

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.

13. Go to the main window of Waveforms under the “More Instruments” tab. Start the Network Analyzer instrument and run the following settings:

Start Frequency = 5 kHz End Frequency to 50 kHz Amplitude = 500 mV Steps = 100 Max gain = 2X Press the Run button

Figure 11. Analog Discovery Frequency Analysis

14. Perform at least one analysis and then stop the instrument. (See Figure 11) After stopping your instrument go to the File menu and select the Export option. Make sure to check the Save comments and Save header options and then Save the results as an .csv file.

15. Import the measured data from the .csv file into TINA. Select the Tools menu -> Diagram Window (if not already opened) -> File -> Import and select the file to be imported. Skip five rows and set the Field Separator to Comma. The skipped rows contain information about the device, software and the instruments producing the saved data. (See Figure 12)

Simulation and measurement of an RLC circuit Digilent, Inc.

www.digilentinc.com page 9 of 10

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.

Figure 12. Frequency import file

16. Compare the simulated and measured data. Select the imported curves and copy then paste them onto the calculated data similar to step number 10.

The slight dissimilarity between measured and simulated curves in Figure 13 is primarily due to component tolerances. Also, notice that you can place text and arrows to document and comment on your results.

Simulation and measurement of an RLC circuit Digilent, Inc.

www.digilentinc.com page 10 of 10

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.

Figure 13. Frequency comparison