ltspice software beginner’s guide - fil...

25
L2EEA Electronique 2ème semestre v2017 LTSPICE SOFTWARE Beginner’s guide Preliminary calculations must be done before the practical session The time for this initiation must not exceed 45 minutes. LTSPICE is a freeware generally used for the modelling or analog electronic circuits. It is distributed by LinearTechnology © and can be freely downloaded for windows OS (link: http://www.linear.com/designtools/software). Two kinds of studies can be done with LTSPICE. Two kinds of studies can be performed for an electronic circuit by using LTSPICE: - Harmonic study , in the frequency space - Transient analysis, in the time space The software can also be used for parametric study by varying the numerical value of a component of the circuit (resistance, DC supply, capacitor etc..). For all the cases the modelling of an electronic circuit should be done following these three steps: 1 st step: Circuit diagram realization 2 nd step: definition of simulation parameters (harmonic or transient study) and use (or not) of a parametric study. 3 rd step: Run the simulation and visualization and analysis of the results. 1. Frequency behavior of a passive RC circuit Becoming familiar with the software by studying the frequency behavior of an RC circuit. The very first step is to create a new project with the software and to save it. For this, you have to click on the LTSPICE icon (on the desktop). Then, click on “File Menu” and on “New schematic”. Save your project in a folder named “your name” on the desktop by using the “save as” command. Aims: Perform a harmonic study with LTSPICE software Know how to plot a Bode plot with LTSPICE

Upload: others

Post on 18-Oct-2019

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

LTSPICE SOFTWARE Beginner’s guide

Preliminary calculations must be done before the practical session

The time for this initiation must not exceed 45 minutes.

LTSPICE is a freeware generally used for the modelling or analog electronic circuits. It is distributed by LinearTechnology © and can be freely downloaded for windows OS (link: http://www.linear.com/designtools/software).

Two kinds of studies can be done with LTSPICE.

Two kinds of studies can be performed for an electronic circuit by using LTSPICE:

- Harmonic study , in the frequency space - Transient analysis, in the time space

The software can also be used for parametric study by varying the numerical value of a component of the circuit (resistance, DC supply, capacitor etc..).

For all the cases the modelling of an electronic circuit should be done following these three steps:

1st step: Circuit diagram realization

2nd step: definition of simulation parameters (harmonic or transient study) and use (or not) of a parametric study.

3rd step: Run the simulation and visualization and analysis of the results.

1. Frequency behavior of a passive RC circuit

Becoming familiar with the software by studying the frequency behavior of an RC circuit.

The very first step is to create a new project with the software and to save it. For this, you have to click on the LTSPICE icon (on the desktop). Then, click on “File Menu” and on “New schematic”. Save your project in a folder named “your name” on the desktop by using the “save as” command.

Aims:

• Perform a harmonic study with LTSPICE software

• Know how to plot a Bode plot with LTSPICE

Page 2: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

Figure 1 : graphic interface of LTSPICE

First step: design of the circuit plan

The studied circuit is drawn in figure 2. It is made of a resistance and a capacitor in series, a voltage generator, some wires and a ground. As we want to realize a harmonic study of the circuit, the generator is a function generator delivering an alternating voltage (1V of amplitude).

Figure 2 : RC circuit

Your aim is to reproduce this circuit in the creation area of the software.

- Add a 10nF capacitor. Click on icon . Move the mask of the capacitor in the creation area, then click to create the capacitor. By default, the name of the capacitor is C1 and its value C. Just left click on the value C, and then give the value 10nF in the field.

N.B.: Several abbreviations are available for setting the values: k for kilo, m for milli, n for nano, meg for mega, u for micro. Be careful as LTSPICE should not differentiate between lower case and upper case letters. So, “m” and “M” both correspond to the milli abbreviation.

- Add a 2.5kΩ resistance. Click on icon . The mask of the resistance is vertical. To rotate

Page 3: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

it, press CTRL+r on the keyboard use icon . Choose the value of the resistance by a left click on “R”

- Add a generator supplying a 1V amplitude alternative voltage. Click on icon . This opens a window with a list of the available components for the software. Select “Voltage” component and add it in the creation area. For setting the supply voltage, left click on one of the terminals + or – of the generator. This opens a window. Click on “advanced” button. This opens a new window presented in figure 3. Several parameters can be set. The wave form of the voltage can be defined with specific functions (on the left of the window) or directly by setting some voltage values (right side). Write “1” in the “AC amplitude” field for setting the generator of a harmonic study.

NOTA BENE: If for example, you choose 1V for the DC value field (instead of 1V in the AC field) you will supply your circuit in DC. Then you can no longer perform a harmonic analysis of your circuit. Usually, the AC amplitude field must be filled only when we want to obtain the Bode plot of the circuit.

- Link all the components with wires. For this, click on icon .

- Add a ground using icon . Connect the mask of the ground directly to a wire. - Add two probes “Vin” and “Vout” for measuring input and output voltages. For this, use

icon and name the probes using the corresponding field. The final circuit diagram is presented in figure 4.

Figure 3: Settings for the generator

Page 4: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

Figure 4 : Circuit diagram in LTSPICE

2nd step: Settings of the simulation parameters

The aim is to obtain the harmonic behavior of the circuit for frequencies between 10Hz and 1 MHz. Once the circuit diagram is correctly defined, it is necessary to correctly configure the analysis

- Open the window for the simulation settings. Left click on the creation area and then click on “Edit Simulation Cmd”. Several tabs are available: Select « AC Analysis » tab for setting a harmonic simulation. Figure 5 presents the various possibilities.

Figure 5: Harmonic simulation settings

Page 5: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

- Settings of the parameters. The starting frequency is 10Hz, the end frequency is 1MHz. We choose that the frequency varies by decades with a sufficient number of points (200) to obtain usable results.

- Put the command line in the creation area. After validating the date (push OK button), put the mask of the command line near the circuit in the creation area.

The command should appear near the circuit diagram. We can see that all parameters can be written using a command line.

3rd step: running the simulation and post treatment.

With the settings of the simulation, you have to perform the following procedure to obtain the Bode plot of the circuit.

- Run the simulation. Click on icon . If the simulation runs as expected, a graph window will open. It contains an empty plot depending on the frequency. If any error appears, you should read the error message and correct the circuit or the simulation parameters.

- Set the curves to plot. Enlarge the window and add a new plot (use menu “Plot settings”/”add

trace” (CTRL+A with the keyboard of icon )). A list with the several calculated data (voltage and current) is suggested. For plotting the Bode plot, you have to plot the ratio of output voltage to input voltage (as indicated in figure 6)

Figure 6 :Add a new plot

Page 6: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

- Identify the curves. Two curves appear on the plot window. One corresponds to the Bode amplitude plot and the other to the Bode Phase plot. The scales of the two curves can be changed by using a left click on the axis.

Two cursors can be activated by using a left click on the title (at the top of the plot). They enable to obtain precise values of the gain and of the phase. For instance, the slope of the gain plot can be estimated as suggested in figure 7.

Figure 7 :Diagram plot and cursors

Questions:

- What is the theoretical cutoff frequency of the filter? With the cursors, evaluate the cutoff frequency obtained with the simulation and compare it to the theoretical one.

- What is the theoretical order of the filter? With the cursors, evaluate the gain slope of the filter. Does this value concur the theoretical order of the filter?

Page 7: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

TP 1: ACTIVE FILTER – LOW PASS- BAND PASS

1. Study of an active filter Consider the circuit diagram in figure 1.

Figure 1 : low pass filter

1.1 Preliminary study (to do before the practical course)

Using the tutorial exercise, study a plot the Bode straight lines of this filter (gain and phase). Using

R2 = 100 kΩ, determine the value of R1 in order that maximal gain is 20dB. Determine the capacitor C in order that the cutoff frequency (at -3dB) is 10 kHz

1.2 Simulation study (with LTSPICE):

1.2.1 DC study

The aim is to plot the variation of Uout with Uin in DC for values of Uin ∈ [-2; 2] V for the circuit of figure 1. You can find below some elements for using LTSPICE in this case.

Use of an Operational amplifier with LTSPICE : For all practical courses, you should use the LT1356 OA. It is available in the [Opamps] folder (in

components list ). An example is proposed in figure 1-bis for a non-inverting amplifier.

Objectives :

• Design an active filter.

• Plot the straight line bode plot of a filter – sizing.

• Measure voltage amplitude and calculation of a filter gain

• Measure phase shift of two signals.

• Determine the cutoff frequency(ies) of a filter

• Identification of the kind of active filter (low pass, high pass, band path, band rejection) and determination of its order.

Page 8: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

Figure 1-bis Circuit and supply of an operational amplifier in LTSPICE

As with the “real” circuit, a DC supply is necessary for the OA. This supply must deliver a symmetrical DC voltage of +15V and -15V.

To achieve with this, create a DC supply in the creation area. The +15V terminal must be linked to the“+” OA terminal and -15V to the “–” OA terminal. Be careful not to mistake these terminals for the inverting and non-inverting inputs of the OA. For the sake of clarity, as presented in figure 1-bis, you

can use available alias by clicking on icon . They create links between several parts of the circuit without using any wires. You will use “input” alias for input signals and “output” alias for output signals. In figure 1, input or output are differentiated by the direction of the arrows V+ and V-. You can also see the necessary ground for the OA supply plotted in figure 1-bis.

Consideration of a parametric DC input voltage source:

When we edit the simulation parameters, it is possible to use a variable voltage for V1. For this, you have to use the tab “DC Sweep” in the window “Edit Simulation Cmd” obtained from a right click on the creation area. The tab is presented in figure 1-ter. Choose the parameters in order that Uin varies linearly between -2V and 2V with a step of 0.1V.

Page 9: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

Figure 1-ter: Setup for a parametric voltage source

- Run the simulation. A new window will open. It contains an empty plot with input voltage as abscissa.

- Plot the output voltage with the input voltage. Add a curve V(Vs) on the plot (use icon

)

- What does the curve look like? What are the extreme values for the output voltage?

- Compare with the theory

1.2.2 Harmonic study

.

Use LTSPICE for studying the Bode plot (gain and phase). Determine the cutoff frequency fc.

1.3 Experimental study

a) Use the wave generator, for delivering a sinusoidal voltage as input. Verify that there is neither distortion nor saturation of the output voltage. Determine the closed-loop gain and the phase between output and input voltage. Compare the experimental and theoretical gain.

b) Determine the cutoff frequency fc at -3dB. Deduce the gain-band product of the circuit.

c) Measure the voltage gain and the phase between Uout and Uin for frequencies between 100Hz and 1MHz (you should not exceed 12 points of measurement). Explain why for these measurements, the digital oscilloscope is preferable to the digital multimeter?

d) Trace the complete Bode plot (gain in dB and phase)

e) Determine the gain slope for high frequencies. Conclude on the order of this filter.

2. Rauch structure 2.1. Preliminary study

Page 10: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

Various configurations of second order filters can be found: Rauch structure filters (Butterworth, Chebyschev, Bessel) ; Sallen-key filters… The configuration given in figure 2 corresponds to a Rauch structure and has been treated in tutorials.

Figure 2 : Rauch structure

The transfer function between input and output voltage is given by the following equation:

)()()(

4321543

31

YYYYYYY

YYfTjH

++++−==ω

Y1, Y2, Y3, Y4 et Y5 are the admittance of the several components (figure 2). For designing a low-pass filter, component 1, 3 and 4 are resistances, with the same value R and components 2 and 5 are capacitors with the same values C2 and C5. Draw the circuit diagram of the filter for the asymptotic case at very low frequencies. Deduce the gain expression and the bandwidth of the filter.

The transfer function )( fT can be written with a resonant pulsation 0ω and the quality factor Q :

( )20

2

0

jQ

11

1jT

ωω

ωω

ω−+

−=

with : a- 52

220 CCR

1=ω

b- 5

2

C

C3

Q

1 =

2.2. Study of the low-pass filter

Choose R = 10 kΩ and C2 = 10 nF and C5 = 2.2 nF.

a) Study the circuit with LTSPICE. Trace the transfer function in the Bode plot. b) Setup the experimental circuit of figure 2 with an input sinusoidal voltage.

Page 11: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

c) Measure the gain for a 100Hz input sinusoidal voltage. Compare with the theory. d) Measure the cutoff frequency at -3dB. Compare with the theoretical value (cf tutorials) and with

the LTSPICE simulation. e) Measure the gain in dB for frequencies between 50 kHz and 500 kHz. What is the slope of this

curve for high frequencies? Conclude.

2.3. Simulation of a pass band filter

For designing a pass-band filter, components 2, 3, and 4 are resistances with a same value R = 10 kΩ. The components 1 and 5 are capacitors with value C1 and C5.

a) Create the circuit with LTSPICE.

b) Measure the central frequency and the two cutoff frequencies (at –3dB) of the filters for the different values of the capacitors given in table 1

c) Deduce from these the quality factor defined as the ratio between the central frequency and the bandwidth at -3dB.

d) Calculate the theoretical central frequency f0 and the bandwidth ∆f and compare them with the simulation knowing that:

f0

= 1

2π R2 C1C

5

and 1RC2

3f

π∆ =

C1 10 nF 3.3 nF 10 nF

C2 10 nF 10 nF 22 nF

GdB

f0

fc1

fc2

Q

Table 1: Several data for band-pass filter Conclude.

Page 12: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

Page 13: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

Page 14: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

TP 2 - ACTIVE FILTER: BAND-REJECTION FILTER All calculations of the preliminary study must be done prior to the practical work session.

In this work, we aim to study an active filter called “band-rejection” characterized by:

The center frequency (f0) of the rejected band

The width (∆f0) of the rejected band at -3dB The amplification factor without load (Av0) within the two band-pass The order (n) of the filter

Figure 1: Band-rejection filter

1- Preliminary study A so-called “wide bandwidth” rejection active filter is represented in Figure 1. The first step is to determine the transfer function of the filter in order to establish theoretically its characteristics. Starting from these mathematical expressions, the values of the passive components in figure 1 will be dimensioned in order to fit the following specifications:

A central frequency f0=1,6kHz

A rejected band width ∆f0 which will depend of f0 An amplification factor without load Av0=1

Ue

Us

R

R/ 2

2C

C C

R1

R2

R

A

B

D

Main Objectives:

- To measure a signal magnitude and to calculate the gain of an electronic circuit.

- To determine the -3dB cut-off frequency of a circuit by a measurement.

- To represent the voltage gain of an amplifier by the mean of the Bode plot.

- To find out the order of the filter.

Page 15: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

a) Calculate the transfer function H ( jω) =U

s

Ue

and write it by using the following canonical form:

H ( jω) = T0

1− ωω

0

2

1− ωω

0

2

+ 4 jωω

0

b) Give the expressions of T0 and ω0

c) Recall the expression of the two cut-off -3dB frequencies ωC1 et ωC2 of this filter.

d) If C=10nF and R1=1kΩ, determine the numerical values of all components in figure 1.

2- Simulation

a) Build the electrical circuit with LTSPICE.

b) Draw the corresponding Bode plot.

c) Determine the central frequency fo and the -3 dB cut-off frequencies. Compare to theory.

3- Practical work

a) Build the electrical circuit in figure 1. Call a supervisor to verify.

b) Measure the -3dB cut-off frequencies. Deduce from these measurements the width of the rejected band. Compare to theory.

c) Find out the central frequency f0 for which the voltage gain is minimal.

d) Measure the voltage gain and the phase shift of the circuit for a set of roughly twenty different frequencies carefully chosen between 80Hz and 1MHz. Draw the variations of both the voltage gain (dB) and phase shift versus frequency (Bode plot) on a semi-log paper.

e) Deduce the order of the filter from the Bode plot by measuring the slope of the asymptote of the rejected band. Compare experimental results and theoretical ones. Discuss.

Page 16: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

Page 17: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

Page 18: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

TP 3 : OPERATIONAL AMPLIFIERS IN SATURATION MODE

1. Simple comparator The output voltage of a simple comparator using an Operational Amplifier can only be either Usat+ (high level) or U sat- (low level) depending on the sign of the differential input voltage (Ue+ - Ue-). Figure 1 shows the non-inverting simple comparator to be studied.

Figure 1: Simple comparator

1.1. LTSPICE simulation

a) Using LTSPICE, recreate the same circuit as on figure 1. Use a sinusoidal signal as Ue.

b) Draw the time-related variations of Us and Ue. Comment. 1.2. Experimental measurements Realize the circuit of figure 1. The reference voltage applied to the inverting input will be provided by an adjustable continuous supply. The sinusoidal input voltage (Ue) will be provided by the function generator.

a) Observe the time-related variations of Us and Ue on the oscilloscope.

b) In the XY mode, observe the curve showing Us vs Ue. Then, measure the switching voltage and compare it to Uref.

c) What is the main default of simple comparators ?

2. Hysteresis comparator A hysteresis comparator is a comparator for which the switching voltage from high to low level is different from the switching voltage from low to high level. So, there are two switching voltages. As a consequence, the value of the input voltage does not always allow to know the output level which

Ue(t) Us(t)

Objectives :

- To understand and study the Operational Amplifier in saturation mode

- To simulate and measure the characteristics of simple and hysteresis comparators

- To simulate and study a relaxation oscillator: the astable multivibrator

Page 19: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

depends on the input levels and also on their previous levels. This defines a hysteresis phenomenon also called the memory effect. The inverting hysteresis comparator (or inverting trigger) of figure 2 has to be studied.

Figure 2: Hysteresis comparator (or Schmitt’s trigger)

2.1. LTSPICE simulation Using LTSPICE, recreate the same circuit as on figure 2.

Set as follows: R1 = 1 kΩ, R2 = 3.3 kΩ, Em = 10 V, Uref = 0 V, f = 50 Hz, Val+ = 15 V, Val- = -15V

a) Draw the time-related variations of Ue and Us.

b) Draw the transfer graph Us = f(Ue) for this comparator. Justify the name « hysteresis comparator » given to this circuit.

c) Measure the switching voltages of this comparator. Do these values confirm the theory studied during tutorials ?

2.2. Experimental measurements Realize the circuit on figure 2.

a) Observe the voltages Ue and Us on the oscilloscope. Repeat the process in XY mode.

b) Recreate the observed cycle and determine the running direction (use a frequency signal low enough to make the spot visible on the oscilloscope).

c) If the inverting and non-inverting inputs had been swapped, what kind of circuit would have been created ?

3. Astable multivibrator An astable circuit is a standalone generator with a periodic rectangular output signal. It consists of a two-threshold comparators and an energy tank which fills up and empties out over time. The astable circuit of figure 3 will be studied. The input generator is replaced by a capacitor. The previously studied comparator is now supplied by a Ue(t) voltage which is the pseudo-integral of the output signal Us(t) generated by the RC passive integrator circuit (see tutorials).

Ue(t) Us(t) R1

R2

Uref

Page 20: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

Figure 3: Astable multivibrator

3.1. LTSPICE simulation Recreate the circuit on figure 3 as follows:

R1 = 1 kΩ, R2 = 3.3 kΩ, R = 10 kΩ, C = 100 nF, Val+ = 15 V, Val- = - 15 V

a) Draw the time-related variations of Ue (UC) and Us. Comment.

b) Measure the period of the output signal. Is this value concur with the theoretical value ? 3.2. Experimental measurements

a) Observe simultaneously the voltages Ue and Us on the oscilloscope. Comment on the obtained curves.

b) Measure the frequency of the oscillations and compare it to the theoretical value.

c) The influence of the maximal scanning speed of the Op. Amp. has to be studied. On the

previous astable multivibrator, now set C as follows: C = 10 nF et R = 100 Ω.

- Observe the shape of Us(t) and note how triangular is this signal is, due to the fact that the output of the Op. Amp. can not change from Usat+ to Usat- instantly. This maximum Op. Amp. scanning speed is called « slew rate » and is written S.

- With the help of this circuit, estimate the order of magnitude of S for the used Op. Amp.

(typical values range from 0.5 to 2 V/µs).

Ue(t) Us(t) R1

R2

R

C

Us(t)

Page 21: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

TP 4 : OSCILLATORS

The preliminary calculations must be finished before the practical works.

This practical session is dedicated to the study of oscillators built from Operational Amplifiers circuits.

1. Negative resistance oscillator

1.1. Study of a negative resistance.

Figure 1 : Characterization circuit of R’

Consider the set-up in figure 1, which allows characterizing the negative resistance as R'=Uab/Iab.

Set the protection resistor to Rp=1k and the others to R1=1k, R2=100k and R3=10k

a) Determine theoretically the value of this resistance as a function of R1, R2 et R.

b) Design the circuit in LTSPICE software and plot the UAB changes versus IAB.

c) Make an experimental set-up using a milliammeter, a voltmeter, a variable resistor and a DC voltage source of 1.5V, which allows to plot the AB dipole characteristic – To be checked by the teacher.

d) Plot the whole characteristic UAB=f(IAB) (for I>0 and I<0) of the AB dipole and compare it to the simulated one in LTSPICE.

Objectives :

To understand the behaviour of a negative resistance oscillator.

To understand the behaviour of a feedback loop oscillator.

To use the FFT function of a numerical oscilloscope.

Page 22: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

e) Compare the experimental value of R' to the theoretical one. Indicate the operating range for the negative resistance.

1.2. Oscillations of an LC circuit.

The current i in an LC circuit obeys to the following differential equation:

Figure 2a : LC circuit

C and L are ideal capacitor and coil, respectively. Any pulse induces, in this circuit, sinusoidal

oscillations at a frequencyLC

=f2π

10 .

In a real circuit, losses are always present particularly due to the ohmic resistance R of the coil. If we consider the circuit in figure 2b, the system is described by this new equation:

and its solution is given by :

+ωttR

i=ti 0 cos 2L

exp

with

24Q

110ω=ω ; LC=ω 10 ; Q=Lω0 RT .

i0 and the phase angle depend on initial conditions. The oscillation magnitude with an angular

frequency follows two exponential decays. The introduction of a variable negative resistance in series R' into the circuit allows to progressively balance the losses. If we balance R'=R, thus a sinusoidal

oscillator is created with an angular frequency LC

=ω1

0 .

C L

i(t)

C

i(t)

R

L

d2i t( )dt2

+i t( )LC

= 0

d2i t( )dt2

+R

L

di t( )dt

+i t( )LC

= 0

Page 23: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

Figure 2b : RLC circuit

1.3. Experiments

Lets make, using a variable negative resistance, an LC oscillator able to work in the largest voltage range based on the circuit in figure 3.

To avoid the O.A. current limitation, we choose R1=1k. At our disposal, we have variable resistors.

To obtain a resistance variation R' by steps of 0.1 supplied by the active set-up, we choose

R2=100k.

Figure 3 : negative resistance oscillator

A. Measure of the different voltages

a) Take C=1F. Observe on the oscilloscope the voltage across the capacitor C on channel 1 and across the negative resistance on channel 2 (this latter measurement corresponds to an image of the current). By subtracting the voltages between channel 1 Y1 and channel 2 Y2 one can observe the voltage across the coil.

b) Increase the resistance R from 0 up to the starting point of the circuit oscillations . Deduce R' .

B. Operation of the oscillator

To prevent the oscilloscope from interfering with the operation of the set-up, it is connected to the output S of the O.A.

¥

R1

R2

R

A

B

Résistance négative R’

C

Y2 L

Y1

Page 24: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

a) Vary C from 1 to 10F. For each value of C, note the threshold value of R' from which permanent oscillations occur and measure their period T.

b) Plot on Log-Log sheet , the changes T=f(C).

c) Calculate the self-inductance value L of the coil.

e) For a chosen capacitance value C, observe the frequency spectrum of the output signal using the FFT function of the oscilloscope. What is the « purity » of the signal? Are there harmonics over the fundamental frequency ?

C. Observation of the damping of the LC circuit

Place a function generator in square signal mode between the capacitor and the ground.

a) Observe the damped oscillations for R=0.

b) Decrease the damping of the circuit by increasing R up to the point where oscillations occur.

2. Wien bridge oscillator

Lets now consider the following diagram of the oscillator :

Figure 4 : Wien bridge oscillator

2.1. Transfer function of the positive feedback loop (Wien filter only)

¥ S

C

R1 R2

Us

C

R

R

Chaîne directe (CD)

Chaîne de retour (CR)

Entrée CR

Sortie CR

Page 25: LTSPICE SOFTWARE Beginner’s guide - Fil d'informationsl2-eea-meca-gc.ups-tlse.fr/Licence/Semestre4/Specialite/ElectroniqueS4... · Using the tutorial exercise, study a plot the

L2EEA Electronique 2ème semestre v2017

Figure 5: Feedback loop

Take R = 10k, C = 10nF.

a) Using LTSPICE, study the transfer function (ratio Us/Ue) of the feedback loop depicted in figure 5.

b) Determine the filter type.

c) Determine the characteristic angular frequency 0 of this filter. What is the phase shift at 0?

2.2. Transfer function of the inverting amplifier (amplifier only)

a) Determine the transfer function of the inverting amplifier only.

b) Considering the Barkhausen condition on the phase, only the angular frequency 0 is selected. In this case, give the condition the transfer function of the inverting amplifier must satisfy to induce oscillations?

2.3. Experiments

a) Make/Design the circuit shown in figure 4 taking R = 10k, C = 10nF, R1 = 10k, and R2 as a variable resistance.

b) Observe the voltages Us and Ue on the oscilloscope.

Start from R2 < R1 and increase R2 up to the point oscillations occur. Compare the R2 experimental value to the theoretical one.

c) Measure the phase shift between Ue and Us ?

d) Measure the oscillation frequency and compare with the theoretical value.

e) Perform a Fast Fourier Transform of the pseudosinusoidal signal and characterize its "purity".

C

C

R

R

Entrée CR Sortie CR