Vega DF Lab1
Vega DF Lab1
Siervo, Jamaica C.
C/Y/S: MEXE-3101
Objectives:
● Learn about the circuit analysis software we will use as our primary simulation tool.
Most circuit simulator software grew out of a public domain program called SPICE (Simulation Program
with Integrated Circuit Emphasis) developed at UC Berkeley in the 1970s. The original SPICE program operated
in a batch mode and was text based. That is, the user created a text file which described the circuit using a special
circuit netlist syntax. This file also included simulation directives which told the software what type of
simulation is to be performed. The SPICE program read the input file, performed the appropriate analyses, and
produced a text output file that contained the results. Graphs of output functions were drawn using text
Over time EDA companies began adding graphical “back-ends” that could produce better looking graphs
and plots of the simulation results. A next obvious step was to add a graphical interface for building the circuit
(GUI). This had the dual benefit of both describing the circuit for the simulation engine (generating the SPICE
netlist) and allowing to produce publication quality schematic diagrams. Some of the early popular graphical
versions included PSpice and ElectronicsWorkbench (EW being the precursor to Multisim).
Eventually, functionality to create printed circuit board layouts from the schematics was added, along with
supporting features such as electrical and design rule checking and Bill of Materials (BOM, basically a
components list).
LTspice is a high-performance SPICE simulation software, schematic capture and waveform viewer with
enhancements and models for easing the simulation of analog circuits. Included in the download of LTspice are
macromodels for most Analog Devices switching regulators, amplifiers, as well as a library of devices for
general circuit simulation.
In addition to the material on the LTspice home page, this slide deck is available for either self-guided learning
or presentation in a classroom setting. It is provided as a companion to this exercise and can be used to help in
presenting this material in classroom, lab setting, or in hands-on workshops.
Tools used:
Lab Procedures:
The software we will be using to simulate the operation of lab circuits in this lab course is called LTspice
which uses information on a circuit in the form of a schematic and analyzes how it will behave. When placing
parts in the circuit, resistors, capacitors, inductors, diodes, and wires all have their own symbols in the menu. All
other parts are accessed through the “Place Components” button. See figure 1. Once the parts are placed, their
In this part of the experiment, we will draw the simple circuit we have been studying, a combination of
resistors and a sinusoidal voltage source representing a resistive divider.
It will open with no schematic or simulation loaded. Click on the File pull-down menu and select New
Schematic. You will name your project when you save it. You should also decide where you want to save
schematics. You will have to choose a directory when you save your work.
Drawing a Circuit
Figure 3 is the LTspice main screen with the circuit we will be drawing. In the circuit shown in figure 3,
we have some resistors, a sinusoidal voltage source, a ground, and some wires. To create this diagram, we will
use the command buttons. For the resistors we will click on the button that looks like a resistor. You can also do
this by using the Edit menu or by hitting the R key. You should see a resistor symbol that you are free to place
anywhere in the schematic. The Edit menu also shows you what name goes with every symbol. For the ground,
select the ground button, use the Edit menu, or hit the G key. For the voltage source and most other components,
you must use the component button (which can also be selected from the Edit menu) and then pick Voltage from
the many options offered.
After you have changed all the resistor values and moved them to neat and readable positions, you must
set up the voltage source. In LTspice, voltage sources are DC by default. To specify the source as sinusoidal,
right click on the voltage source symbol and select the Advanced button. The window in figure 5 will appear.
Select SINE and then set the values shown for offset, amplitude, and frequency. Once the symbol is labeled as
SINE, these parameters can be changed by right clicking on the symbol. The values are used to label the voltage
source as shown in figure 3.
After all the components are defined, wired up and their values are set appropriately, you are ready to run
a simulation. Find the Simulation drop-down menu and click and select Edit Simulation Cmd. You will get the
window shown in Figure 6. Select the tab for the type of analysis you wish to perform. In this case it is Transient
since we are interested in output that is vs time like a scope. The simulation will begin at time t = 0, but we can
choose to start saving data after that. Thus, we specify the Stop Time (the end time of the simulation), the Time
to Start Saving Data, and the Maximum Timestep (the resolution of our simulation). Here we choose, 5ms, 0 and
Transient Analysis
You are now ready to run the simulation. Click on the Run button. Here, a waveform viewer will prompt. A set
of axes with no signals shown will appear. You can now add voltages wherever you wish by left clicking with
your mouse. You will see that whenever you hover over a wire in the schematic with your mouse, a symbol like a
voltage probe will appear. Click on the wire you want to know the voltage. If you want to plot current, hover
over a device symbol and your mouse symbol will change to a current probe. If you click on a device, the current
through it will appear on the plot. In the plot shown in Figure 7, the input and output voltages for the voltage
divider are displayed. Note that the ratio between the two is what you should expect for this simple circuit.
You should get something like (but maybe not identical to) the window shown in figure 7. The voltage divider
expression we used in the voltage division activity can be applied to sinusoidal signals as well. For sinusoidal
signals, the amplitude of the sine wave changes based on the voltage divider ratio. We can then perform the same
comparison between source voltage amplitude and resistor voltage amplitude as we did where we compared the
source DC voltage and the resistor DC voltage. For the 1 kΩ voltage divider circuit, do we see the same ratio of
voltage amplitudes as seen for DC voltages?
It is also useful to know how to copy plots and paste them into a word processor. Under the Tools menu, click on
“Write image to .emf file”. Now there is a .emf file saved that you could insert into a word processor. Open your
word processor and paste the image somewhere. Save this file or print the output plot for the 1k voltage divider
directly. You should see a plot like the one shown in figure 8. If you get the schematic instead, click your mouse
on the voltage plot window to select it and try again.
The “Copy bitmap to clipboard” and “Write image to .emf file” options under the Tools menu can be
used to capture either the schematic drawing or waveform plots. By default, the waveform lines on the plot can
be a bit thin and hard to read. You can change the data display on the plots generated by selecting Control Panel
from the Tools menu and then selecting Waveforms. Select Plot data with thick lines. They will be much easier
to see.
Change the values of the resistors in the voltage divider to 1 Meg and rerun the simulation. Save or print
this plot as well. Both plots should have two traces: the source voltage, and the voltage across the resistor closest
to ground. For the 1 MegΩ voltage divider circuit with the 1 MegΩ probe resistor, do we see the same ratio of
voltage amplitudes as seen for DC voltages? Try varying the frequency, amplitude and offset of the V1 SINE
source one at a time and rerun the analysis. What happens to your signal? Is the amplitude ratio still the same?
Does it make sense based on your knowledge of sine waves and voltage dividers?
For this and other activities in this course, you must explain:
For most of our simulation activities, we will be applying a pulse (or series of pulses) to as input/s to digital
Pulse minimum voltage, maximum voltage, delay before the pulse start, rise time and fall time, on time
and period can be set in the above dialog box (3) and shown on the schematic as below equation (See Table 1 for
description of each argument):
An illustrated version of a 2-cycle pulse signal with initial amplitude of 0, time delay of 40usec, rise time and
fall time of 100nsec, pulse width or on time of 100usec and a period of 200usec of is shown in Figure 10 below:
The rise time and fall times can be visualized and measured by either setting up the transient simulation
to a stop time of 1000nsec or zooming on the output window and using the attach cursor function on the
waveform viewer on LTspice (click and drag). A more advanced and accurate way is to include a spice directive
of .meas on the schematic window. Replicate the schematic on Figure 9 and explore both the cursor function and
the .meas directive to calculate the rise time and fall times from 0.5 to 4.V and 4.5V to 0.5V, respectively. Fill-in
your measured values on table 2 below:
The figures given below are the steps or methods and discussions that the experimenter undertakes in
order to accomplish the Lab01 activity about Getting Up and Running with LTspice Simulation Tool. More so,
LTspice is a high-performance SPICE simulation program app, schematic capture, and waveform viewer with
enhancements and models for easing the simulation of analog circuits.
The diagram above depicts a circuit with a voltage source, three resistors of varying resistance values,
and a voltage source.
When the simulation was completed, a waveform window displayed, displaying the outcome or result of
the simulated circuit diagram.
This section of the activity's main goal is to educate students how to utilize certain commands in LTspice
and how to read a circuit's waveform diagram. Drawing a schematic, specifically a voltage divider circuit, is the
first simulation from the lab activity. A DC voltage source, three resistors, and a ground make up the circuit.
Following the simulation, the students were given two waveform tables containing data on the circuit, namely
the voltage. When the simulation begins, the wave's amplitude reaches 0.4 V, as seen in the diagram below
Figure 1B: The result of a Schematic representation and Simulation Result of a Voltage Divider Circuit
The picture above depicts a change in the value of the resistors connected in series from 1k to 1Meg
ohms, resulting in a new waveform window result.
The figure above shows the measured value of fall time using a cursor which is equal to 790.34029
nanoseconds.
The picture above shows the measured value of rise time using .meas which is equal to nanoseconds.
The picture above shows the measured value of fall time using .meas which is equal to nanoseconds.
Additional Simulation:
Using LTSpice, simulate the following circuits and provide the required information. Provide your
observation for each item.
1. Before performing this task, using hand calculation, determine the voltages across and currents through
each resistor in the circuit of Figure 11. Include your calculations in your laboratory report. Record all your
calculated results in Table 3 for later comparison with LTspice.
Figure 11A. Resistive Network for Hand Analysis and LTspice Simulation
Hand 20V 28.5714 33.3333 80V 71.42857 66.66666 20mA 14.2857 11.1111
Calculated 2858V 3333V 145V 666V 1429mA 11 mA
Value
LTspice 20V 28.5714 33.3333 80V 71.4286 66.66667 20mA 14.2857 11.1111
Result V V V V mA mA
100𝑉
= 1000Ω + 4000Ω
𝐼1 = 0.02A or 20mA
𝑉𝑠
● 𝐼2 = 𝑅2+𝑅5
100𝑉
= 2000Ω + 5000Ω
𝐼2 = 0.01428571429A or 14.28571429mA
100𝑉
= 3000Ω + 6000Ω
𝐼1 = 0.01111111111A or 11.111111mA
Finding the Voltage of the Resistors (𝑉1, 𝑉2, 𝑉3, 𝑉4, 𝑉5, 𝑉6)
● 𝑉1 = 𝐼1𝑅1 ● 𝑉4 = 𝐼1𝑅4
● 𝑉2 = 𝐼2𝑅2 ● 𝑉5 = 𝐼2𝑅5
● 𝑉3 = 𝐼3𝑅3 ● 𝑉6 = 𝐼3𝑅6
ANALYSIS:
In this part, we can see that the obtained data that we get from the simulation and in the hand calculation
was almost the same. The discrepancy between them is not likely far away from each other. The data obtained
for both voltages and current from both methods of the given circuit through experimental and theoretical
measurement was recorded and tabled for a better understanding and observation as well as their percentage
error. It only proves that the software is a reliable way if we want to find a value that we want in any circuit that
will be given to us.
To understand how such variation might affect your measurements of current and voltage in an actual
circuit, use LTspice to calculate the currents and voltages if the resistors were at some of their extreme values, as
indicated in the table below:
ANALYSIS:
After solving the given problem in two different ways; simulation and hand calculation, we can see that
the result is most likely the same. Although the result that we got is not exactly the same but the difference is
very little it will not totally affect the whole process. The result that we got in hand calculation is .1 lower than
the simulation. The data obtained is tabulated to compare and for better understanding. This will prove that the
simulation software is reliable and can be used for further experiments.
3. Perform transient circuit simulation for an RC (R=1k, C=1uF) circuit shown in Figure 13 to determine
4. From your knowledge of basic diode rectifier design, perform transient simulation of a single-phase
half-wave, center-tapped full-wave, and bridge type rectifier circuit. Capture and show the important parameters
such as rms and average output voltage and current, output frequency, ripple factor, transformer utilization factor,
and rectification factor.
Figure 14.1 Schematic Figure and Transient Analysis of Single Phase Half Wave
The term "half wave rectifier" refers to a particular kind of rectifier that only permits one half-cycle of an
AC voltage waveform to pass while blocking the other half-cycle. To convert AC voltage to DC voltage,
half-wave rectifiers are employed. They may be built using just one diode. As you can see in the figure, the
result of the transient simulation proves that this simple circuit performs successfully. Only one diode is required
to construct a half-wave rectifier. In essence, this is all that the half-wave rectifier is doing. In addition to this,
The working of a half wave rectifier takes advantage of the fact that diodes only allow current to flow in one
direction.
Figure 14.3 Schematic Figure and Transient Analysis of Center-Tapped Full-Wave Rectifier
The full wave rectifier converts both halves of each waveform cycle into pulsating DC signal using four
rectification diodes. In a Full Wave Rectifier circuit two diodes are now used, one for each half of the cycle. A
multiple winding transformer is used whose secondary winding is split equally into two halves with a common
center tapped connection, (C). In the figure shown above, The full wave rectifier circuit consists of two power
Figure 14.5 Schematic Figure and Transient Analysis of Bridge Type Rectifier
To power different electronic fundamental components from the available AC mains supply, many
electronic circuits need a rectified DC power source. An AC power is transformed into a DC power using
rectifiers. The bridge rectifier is the most effective rectifier circuit available. Bridge rectifiers are a particular
kind of full-wave rectifier that effectively converts alternating (AC) current to direct (DC) current by employing
four or more diodes in a bridge circuit design. This figure in this section shows how bridge type rectifiers circuit
works. It is made up of 4 diodes and a load resistor. The four diodes are connected in a closed-loop configuration
to efficiently convert the alternating current (AC) into Direct Current (DC). The main advantage of this
configuration is the absence of the expensive center-tapped transformer. Therefore, the size and cost are reduced.
5. For the following periodic signals, use LTSpice to solve and capture (and show) the maximum,
minimum, peak-to-peak values, frequency, period, and average and rms values. (Hint: You may use .meas (.meas
and .step functions in LTSpice) to perform these measurements)
a. Sine wave
Figure 15.1 Schematic Figure and Transient Analysis of a Periodic Table of a Sine Wave
Figure 15.2 Schematic Figure and Transient Analysis of a Periodic Table of a Cosine Wave
As you can see in the figure, the waveform of a cosine wave repeats at regular time intervals but the
former is shifted by a distance of π/2 to the left on the x-axis.. Cosine wave of a periodic signal can also be
described as a sinusoidal wave because the pattern keeps on repeating after one wavelength. As shown in the
figure, it only proves that the simulation explains how a cosine wave acts in our circuit and it indicates the cosine
function, a single pulse, and a pulse train in their respective time and frequency domain representations.
Figure 15.3 Schematic Figure and Transient Analysis of a Periodic Table of a DC Signal
A periodic signal has a DC offset component if it is not centered about the x-axis. As shown in the figure,
it is not in a form of wave because the DC does not mean permanent current, its value can vary in time, however
the direction never changes. So under that understanding, if we have periodic positive pulses, the fundamental
frequency would be f=1/T, where T is a period of pulses. The simulation proves that it is periodic in the reason
that the frequency spectrum will show a peak at 0 frequency. Hence it is a signal with 0 frequency. And
according to the simulation, it is repeating itself so it is periodic.
Figure 15.4 Schematic Figure and Transient Analysis of a Periodic Table of a Triangular Waveform
The waveform in the illustration above displays the rising and falling edge in which the wave level rises
linearly and lowers linearly, both ramps falling at the same pace. This may create a triangular wave by utilizing a
rise and fall time that is ½ the period of the pulse function. The frequency of the waveform will then determine
the average voltage level of the wave for any given voltage amplitude. Because of this, the average level will be
lower for a slow rise and slow decay time of the slope than for a faster rise and decay time of the slope.
Figure 15.5 Schematic Figure and Transient Analysis of a Periodic Table of a Sawtooth Waveform
The figure above depicts the sawtoothed waveforms that can either have a slow-rising but highly steep
decay or an extremely steep, almost vertical rise and slow-decay, unlike the triangular wave. A sine wave's
pattern, which consists of a succession of alternating high and low voltages, is followed by a sawtooth wave. The
distinction is that the magnitude of a sawtooth wave gradually increases to a maximum before abruptly
decreasing to zero. In this scenario, it can be set the rising time to the period and the fall time to zero to produce
sawtooth function. The signal can be gently charged with continuous source, then suddenly discharged by
shorting it out to create a sawtooth.
Figure 16.1 Schematic Figure and Transient Analysis of a PWM with Specified Duty Cycle (BASIS)
Figure 16.2 Schematic Figure and Transient Analysis of a Digital Signal with Duty Cycle of 10%
As you can see, it is just a simple circuit with a load resistor and voltage. In this figure, the given duty
cycle is 10%. This is a presentation of a digital signal where we put each specified value depending on the
percentage of the duty cycle that is needed. In observing the behavior of the signal the distance between them
was too narrow and also the length and width of the signal. You can also see the important parameters of the
simulation that are needed.
Figure 16.3 Schematic Figure and Transient Analysis of a Digital Signal with Duty Cycle of 25%
In this part, I used the same circuit diagram. It is a straightforward circuit with a load resistor and
voltage, as you can see. But as you can observe, the transient command that I used is different from the first
one. The duty cycle in this figure is 25%. This is a representation of a digital signal where each defined value is
placed in accordance with the required duty cycle percentage. The distance between them, as well as the signal's
length and width, were not that close together to see the signal's behavior compared to the duty cycle of 10%.
Here, you can also see the important parameters of the simulation that are needed.
Figure 16.4 Schematic Figure and Transient Analysis of a Digital Signal with Duty Cycle of 50%
As shown in the figure, you can observe that I used the same circuit diagram. It also provides the
important parameters that we need. But as you can see, the parameters that we used are far too different from the
first two. That’s why we achieved that pwm that we want. In this, a digital signal spends half of the time on and
the other half off, we would say the digital signal has a duty cycle of 50% and resembles an ideal square wave. If
the percentage is higher than 50%, the digital signal spends more time in the high state than the low state and
vice versa if the duty cycle is less than 50%.
Figure 16.5 Schematic Figure and Transient Analysis of a Digital Signal with Duty Cycle of 50%
Here, you can see that we utilized the identical circuit diagram, as it is depicted in the image.
Additionally, it offers the crucial parameters we require. Nevertheless, as you can see, the parameters we picked
diverge too far from the previous three. That is why we were able to attain our desired pwm. A digital signal
that spends three-quarters of the time in an ON-state and one-quarter of the time in an OFF-state will have a
duty cycle of 75%.
Figure 16.6 Schematic Figure and Transient Analysis of a Digital Signal with Duty Cycle of 100%
And now, for the digital signal with a duty cycle of 100%, you can see that we used the same circuit
schematic that is shown in the picture. It also provides the essential parameters we need. But as you can see, the
parameters we chose deviate too far from the first four duty cycles since it is in the percentage of 100. In this
kind of duty cycle, it explains that 100% duty cycle would be the same as setting the voltage to 5 Volts (high).
0% duty cycle would be the same as grounding the signal.
CONCLUSION:
This laboratory experiment used the most common software LTSpice that shows different electronic circuit
designs. This simulation creates transient analysis and also generates a custom digital pulse waveform. The
waveform form from simulation undergoes thorough analysis from the input files. It allows the student to
determine the difference between the result from hand calculations and simulation software. Upon doing both
methods we can conclude that the discrepancy between them is not likely far away from each other.
This laboratory proved that LTspice is a highly potent simulation tool created to satisfy the circuit
REFERENCES:
WEBSITES:
● https://www.analog.com/en/design-center/design-tools-and-calculators/ltspice-simulator.h tml
● https://www.analog.com/media/en/analog-dialogue/volume-53/number-4/get-up-and-runn
ing-with-ltspice.pdf
● https://www.power-and-beyond.com/what-are-diodes-and-rectifiers-a-909411/#:~:text=A%20rectifier%2
0is%20a%20special,making%20it%20simple%20to%20control.
● https://www.electrical4u.com/half-wave-rectifiers/#:~:text=Half%20Wave%20Rectifier-,What%20is%20
a%20Half%20Wave%20Rectifier%3F,a%20single%20diode%20to%20construct.
● https://www.electronics-tutorials.ws/diode/diode_6.html
● Gray, R. (2018, Summer). Get Up and Running with LTspice | Analog Devices. Lt Spice.
https://www.analog.com/en/analog-dialogue/articles/get-up-and-running-with-ltspice.htm
l%20#:~:text=LTspice®%20is%20Analog%20Devices,you%20learn%20some%20basic%20com mands.
https://www.filehorse.com/download-ltspice/
● Jordan, D. (2016, December 1). Sparkfun.
https://learn.sparkfun.com/tutorials/pulse-width-modulation/duty-cycle#:~:text=Duty%20cycle%20is%20measu
red%20in,the%20frequency%20of%20the%20waveform.&text=100%25%20duty%20cycle%20would%20be,to
%205%20Volts%20(high).
VIDEOS:
● https://youtu.be/kKuHvwSdzh4
● https://youtu.be/RhHzxAE0Msg
● https://youtu.be/kKuHvwSdzh4