Upload
others
View
13
Download
0
Embed Size (px)
Citation preview
Introduction to Multisim
Prepared by: Mohamad Eid,
Updated by: David Modisette
Fall 2020
The purpose of this document is to introduce the many features of Multisim. Begin by first
opening up Multisim. For Windows users the default location can be found by clicking: Start
->All Programs -> National Instruments -> Circuit Design Suite ## -> Multisim [Version
Number] Be sure to note the version number you are using in your report in the Equipment
section. You should see a screen similar to Figure 1 below. This is called as a “Capture and
Simulate” environment because you “Capture” your schematic by drawing it in Multisim and
then you “Simulate” it.
Figure 1 shows the different parts of the Multisim workspace. Note that the location of the
toolbars on your Multisim window may be different slightly.
Figure 1. The most important components in the Multisim workspace
If you don’t see the toolbars shown above, Left-click on the View tool item and go to Toolbars.
Make sure the toolbars shown in figure 1 are checked as shown in figure 2.
Figure 2. Viewing the toolbars
Please familiarize yourselves with the location of each toolbar as it appears in your Multisim
window. We will be repeatedly referring to the toolbars throughout this document (using the
color codes from Figure 1, example: the Virtual Toolbar).
Example 1: Simple DC Analysis in Multisim
Let’s construct the simple circuit shown in figure 4.
Figure 3. A simple series circuit constructed in MultSim
Constructing this circuit in Multisim is easy:
1. Left-Click on the Power Source Family in the Virtual Toolbar.
2. The Power Source Components will pop up.
3. Left-Click on the DC Power Source icon and drag a battery onto the circuit workspace.
Figure 5 shows the result.
Figure 4. A DC power source in Multisim
If you want to change the value of the power source, Double-click the battery. This opens up
the Power Sources dialog box shown below.
Figure 5. Power Sources Dialog box. Use this to change the value of the battery voltage.
Let’s add the resistor and the potentiometer. Left-Click the Basic Components Family in the
Virtual Toolbar.
5. The Basic Components will pop up.
6. Left-Click on the Virtual Resistor tool and drag a resistor onto the workspace. As in the case
of the battery, you can Double-click the resistor to change component values.
7. Lets complete the circuit by placing the potentiometer. Left-Click on the Potentiometer Tool
and drag a potentiometer onto the workspace. You can increase (decrease) the resistance on the
potentiometer by pressing the “A” (Shift+A) key. Note: The increase and decrease refers to the
resistance between the middle leg and the bottom leg of the potentiometer. Double-click the
potentiometer to change the total resistance of the potentiometer and the increment or
decrement in the resistor value.
Figure 7 shows the circuit components placed on your workspace. The “50%” next to the
potentiometer means that the resistance between the middle leg and bottom leg is 50% of 1 kΩ:
500 Ω. If you press A, you will notice that resistance will increase by 5% (the resistance
between the middle leg and the top leg will decrease by 5%). Again, Double-click the
potentiometer to change the increment percentage.
Figure 6. The circuit components are in place.
8. The final component to place is the ground. You cannot simulate the circuit without a
ground. The reason for this is SPICE (the underlying simulation engine) uses nodal analysis to
solve circuits. The first step in nodal analysis is to pick a ground node. It does not matter where
we ground the circuit, for consistency let’s pick the node at the negative terminal of the power
supply at the bottom of the circuit as ground. See Figure 5 where we can get the ground.
Left-click the Ground tool in the Power Source Components menu. Drag the ground to the
bottom of the circuit, the result is shown in figure 7. Circuit is ready for wiring
9. To wire the circuit, simply Left-click at the starting node, drag the wire to the ending node
and Left-click again. Figure 8 shows the results of wiring the 12 V source to the 1 kΩ resistor.
Note the curser is a dot in cross-hairs when wiring. Complete the wiring as shown in figure 8.
Make sure you connect to the wiper of the potentiometer.
Figure 7. The circuit is complete
Remark: To make debugging easier in larger circuits, it would be instructive to change the wire
colors. To do so, Left-click on the wire to select it and then Right-click to choose Wire color.
Figure 9 shows the result. You should try to stick to electronics wire color conventions. For
example: RED for power and BLACK for ground.
Figure 8. Wire Color Selected.
Before we can simulate the circuit, we need to add instruments so we can make measurements.
One of the neat things about Multisim is that it comes with a bunch of standard instruments.
These instruments are the same (except for the scope) as on your lab bench. Hence your
simulation environment is a step closer to your real lab environment.
Let’s measure the voltage drop across the potentiometer. This will make an interesting exercise
since you can see the voltage across the potentiometer change as you vary the potentiometer
resistance.
10. Left-click the Agilent Multimeter from the Instruments Toolbar and drag the multimeter
onto your workspace. Figure 10 shows the result.
Now, Double-click on the multimeter to open up the instrument’s front panel.
Figure 9. The Agilent 34401A Simulated Multimeter front panel
Notice how the simulated multimeter is the same as the one on your workbench! Left-click the
Power button to turn on the instrument. You will be measuring DC voltage, so Left-click the
DC V button on the instrument. Figure 10 shows what you should get.
All that is left is to wire the multimeter terminals. Complete the wiring as shown in figure 10.
Connect to the wires to the multimeter on the workspace. As you make the connections,
Multisim highlights the terminals on the frontpanel.
11. To simulate the circuit, Left-click the “Simulate” button in the Simulation Toolbar. Figure
10 shows the result.
One of the most powerful features of Multisim is its interactive nature. Change the resistance of
the potentiometer by moving the wiper position. Pressing “A” or Shift+A and note how the
multimeter readings change (you may need to wait a couple of seconds for the multimeter to
register the change). Change the potentiometer resistance all the way to 1 kΩ. (100%). What is
the output voltage? Does this agree with your intuition and circuit properties? Hint: Think about
what the voltage divider formula when R1 = R2.
Assignment:
Simulate the following circuits a) and b): Determine the Loop Currents and the Component
Voltages for each circuit.
The Loop Current or Mesh Current Method solves circuits by writing Kirchhoff's Voltage
Law for currents flowing in the loops of a circuit.
See: https://www.khanacademy.org/science/electrical-engineering/ee-circuit-analysis-topic/ee-dc-circuit-analysis/a/ee-mesh-current-method
This will allow you to calculate the currents flowing through each component and with Ohm’s
Law, V = I x R, (Voltage equals Current times Resistance) and knowing the currents, you can
the voltage on each component.
Short explanation of electrical circuit analysis
(For the students just beginning electrical studying)
There are two types of electrical charge. They are called Positive and Negative.
Electric Charge, or just charge, is the physical property of matter that causes it to experience a
force when placed near another electric charge. If the charges are alike, two positive or two
negative, then there is a force between them that forces them away from each other. If the
charges are opposite, a positive and a negative, then there is a force to draw then together.
This force is called the Electromotive Force, EMF, and it is measured in Volts so it is usual
to use the term Voltage synonymous with EMF.
Electric Current, or just current, is the flow (rate) of electric electrical charge.
If the EMF or Voltage is greater than the force holding the charge in place then the charge will
move or flow and produce a current. If the EMF or Voltage is not greater then there is Voltage
but no current (flow).
The impediment to the flow of charge is called Resistance since it resists the flow of the
charge.
The study of electricity concerns the electric charge and how it moves. Its movement is
determined by the relationship among three main characteristic of the electricity’s path:
Resistance, Voltage, and Current.
Ohm’s Law is the Voltage(V) = Current (I) times Resistance (R),
V = IxR => V/R = I => V/I = R
To determine one of these characteristics one must know the other two. When several
components are connected together to form the path or Circuit for the electrical charge to
move through, then Ohm’s law can be applied to each component to determine the voltage
across the component and/or the current through the component. There are two other laws used
to help determine the voltage and current across circuit components: Kirchhoff’s Voltage Law
and Kirchhoff’s Current Law.
Kirchhoff’s Voltage Law, KVL, states that if the voltages of the components that form a full
loop or circle in the circuit are added together then the sum must be zero. Another way to think
of this is: When I get back to where I started around the loop, I must be back to the same
voltage. If I go up 5 V then to get back where I started I must go down 5 V.
A more formal/mathematical expression of KVL is the sum of the Voltages, positive and
negative, around any closed loop in an electrical circuit is zero.
Kirchhoff’s Current Law, KCL states that charge cannot be stored at a junction between
electrical components. This means that if current flows into a junction it must flow out of the
junction. Now there may be more than one path into and out of a junction but all the current
flowing in must equal all the current flowing out. A more formal/mathematical expression of
the KCL is the sum of the positive and negative currents flowing into a node of an
electrical circuit must equal zero.
Now KVL and KCL are true only under a certain condition. Electrical waves move at or near
the speed of light. As a matter of fact, light is electromagnetic waves that our eyes can detect,
just as our ears detect the pressure waves in the air that is sound.
We can vary how quickly the wave changes from positive to negative and back to positive.
This is the frequency with which the wave changes. In electrical engineering we have agreed to
name the number of times this change or cycling from positive to negative and back to positive
that happen in 1 second the frequency of the wave. Now the frequency of the wave is in the
number of cycles in 1 second. If we divide the 1 second by the number of cycles we get the
time of 1 cycle called the Period. Knowing the time in one cycle and the speed of the wave in
distance/time, we can calculate the distance traveled by one cycle of the wave. This distance
is called the wavelength of that frequency.
Now for KVL and KCL to be valid, the components’, of the circuit, physical sizes must be
much smaller than the frequency’s, that is applied to the circuit, wavelength. Otherwise, the
components will act like radio antennas and allow energy to escape the circuit and be lost.
Another needed bit of information for this lab is:
Resistors impedance to the flow AC current is just its resistance, R.
A capacitor’s impedance to the flow of AC current is dependent on the frequency of the AC
current. The formula for the magnitude of the capacitor impedance is Xc = 1/(2 fC), where
Xc is called the reactance of the capacitor and is in Ohms, f is the frequency in
Hertz(cycles/sec), and C is the capacitance in Farrads.
For more explanations see:
Electric current: https://en.wikipedia.org/wiki/Electric_current
Electric resistance: https://en.wikipedia.org/wiki/Electrical_resistivity_and_conductivity
EMF (Voltage): https://en.wikipedia.org/wiki/Electromotive_force
Comments on doing the lab and report:
The lab report is to convey to others what was done, how it was done, what was expected, what
the results were, and how the results compare to what was expected. It is best if the report is
accurate, clear, concise and complete. It should be written such that another EE/CE student
could repeat exactly what you did and get exactly the results you obtained. Review the
Laboratory Report Format example and try to follow the format as closely as possible while
adapting it to particular experiment being done.
To inform the lab report reviewer what was done, the Procedure section of the report should
explicitly reference this procedure document by title and URL. If you deviate from the
instructions for some reason, this should be noted in the report. Describe the deviation and the
reason. Any information you feel should be restated to improve the understanding of the report
should also be included. An item that must always be included in the report is the schematic of
any circuit that is discussed or has measurements presented. This allows the reader to know
what and where a characteristic of the circuit is discussed or presented.
When doing simulations and measurements we need to know what value we expect the
measurements to be before doing the measurements. This allows us to confirm the experiment
was correctly configured, correctly performed, and correctly measured. If our results are
considerably different from expected, then there is at least one error somewhere and it must be
found and corrected. You should never have large errors. If you have large errors and can’t
find out why, then contact the TA or me for help. You shouldn’t have a report with incorrect
results.
While performing the experiment and making measurements, a detailed listing of the actions
should be kept in a laboratory notebook. The notebook should contain the schematics,
summary of the procedure, components’ and voltage sources’ measured values, expected results
calculations, and measurement results. The information in this notebook will document what
was done and can be used in court to support claims of inventorship. It will also assist when
writing the formal lab report and can be used in the exams for this course.
Therefore, to determine the results we expect, we must calculate by hand, these expected
results. So the readers of our report know and can check our work, we need to include these
calculations in the report. The more detail we can provide, the easier it will be to find the cause
of the error(s). Therefore, every lab report should have the assumptions stated and the detailed
calculations included in the Theoretical Analysis section of the report.
When the measurements are made, the results should be compared with the expectation to
determine if the desired results were obtained. This comparison should be included as a table
or tables in the lab report’s Verification Results section. The table should have a table number
and a meaningful, descriptive title. As described in the Laboratory Report Format, the table
should have a row for each measurement and the columns, in order, will be
The name of the measurement (such as VR1, the voltage across resistor R1), the expected value
with units (such as 10 V), the obtained results with units (such as 9.853 V), the difference
between expected and obtained results (such as 0.147 V), the percentage difference between
expected and obtained results (such as 1.47% from the calculation 0.147/10 x 100%), and last a
comment if the % error is significant enough to merit a comment. So the table for this single
measurement would be:
Name Expected Measured Error % Error Comment
VR1 10V 9.853V 0.147V 1.47% Error within tolerance
The results should not be adjusted or changed in any way. They should be report exactly as
they were produced. If the meter output was inf, then enter inf and do not change it to infinite.
The Discussion section of the report is where you can interrupt your results. This is where you
can describe how you view your results. This is where you explain the significance of what
you did and how it fits into past work and possible future work. You can discuss difficulties
and provide guidance on parts that need particular care.
Last, any documents, graphs, pictures or other evidence you want to include should be placed in
an Attachments section.
Now you should be ready to being:
a) and b) are the electronic circuits to simulate:
Figure 10: Circuits to Simulate for Lab Exercise
This second electrical circuit (b) has an AC, Alternating Current, Voltage source. This means
the electrical current first flows one direction then reverses and flows the opposite direction,
thus the current alternates.
In the resistors, the current and the voltage are in phase. That is, if the current is increasing
the voltage is increasing and if the current is decreasing the voltage is decreasing.
But the voltage current relationship is different on a capacitor, C1. The current and the
voltage are 90 degrees out of phase. This means that when the current is at its positive peak
value the voltages on the resistors are at their peak positive values. However, the capacitor
voltage is not at its peak value until ¼ of the period later, after the current has passed
through its peak. This phase shift is why the impedance of the capacitor cannot be just added
to the resistance of the resistors but it has to be vector summed with the resistances of the
resistors: .
See below for help with the analysis of the two circuits:
Figure 10: Mesh Analysis of Current Source Resistive Network
In circuit a) there are two loops. Loop 1, with loop current IL1, is formed by the loop
components Resistor R3 and the current source I1. Loop 2, with loop current IL2, is formed by
the loop components the Resistors, R1, R2, and R3. The loop current can be found by
determining the current of a loop component that is only part of the loop of interest. That is, it
is not part of more than one loop. These components are R1, R2, and I1. R3 is shared by both
loops. Since the current source I1 is only in Loop 1 then its current, 4A, is Loop 1’s current,
IL1.
Note: The direction for positive current is arbitrarily selected but convention has it usually
flowing clockwise in the loop. If the calculation determines the current is negative, this means
the current is flowing in the opposite direction.
Now to find Loop 2’s current we must use KVL on Loop 2. The Voltages around the loop must
sum to zero. Therefore (Equation 1)
VR1 + VR2 + VR3 = 0.
From Ohm’s Law, V = I x R:
R1 and R2 has Loop 2 current flowing through them:
VR1 = I x R1 and VR2 = I x R2 where I = IL2,
but R3 has two loop currents, IL1 and IL2 flowing in it and they are in opposite directions. The
net or resulting current magnitude is the difference between the two loop currents IL2 – IL1.
VR3 = (IL2 – IL1) x R3.
Putting this into equation 1 yields:
IL2 x R1 + IL2 x R2 + (IL2– IL1) x R3 = 0. => IL2 (R1 + R2 + R3) = 4 x R3
We know that Loop 1’s current, I L1 is 4A and R1 = 4 Ohm, R2 = 1 Ohm, and R3 = 5 Ohms
Substituting into the equations:
IL2 ( 4 + 1 + 5) = 4 x 5
Now we can solve for IL2. With IL1 and IL2 we can solve for the voltages on each component.
The to check our results we can sum the voltages around the loops and see that they sum to
zero.
For circuit b)
Figure 11 AC Voltage Source and Resistive – Capacitive Circuit.
Circuit b) has an AC voltage source. It is assumed that the voltage source can provide as much
current as needed by the circuit so the voltage is what is stated by the source. We must
determine this current to calculate the components’ voltages. Since the circuit is a series
circuit, all the components are serially connected together, the current for each component is the
same and is the loop current for this circuit. To determine the current, the impedance of the
entire circuit must be calculated and then divided into the voltage from the source. From Ohms
Law: I = V/Z, where Z is the “AC resistance (R)” of the circuit.
The impedance of the resistors, R1 & R2, are just their resistance, 10 kOhms and 100 Ohms
and there is no phase shift.
The impedance of the capacitor has a magnitude dependent on the frequency of the source and a
delay between the current and voltage reaching their peak values with the current being ahead
of the voltage. This is a 90 degree phase shift (1/4 of its period) between the capacitor voltage
and current. The magnitude of the phase shift (called the reactance Xc) is Xc = 1/(2 fC)
where in this case, f = 1000 Hz and C = 0.1 x 10-6
Farrads.
We must combine the two impedances to determine Z, but the resistors with zero phase shift
reach peak voltage when the current is at peak and the capacitor reaches peak voltage after the
current has reached peak. This means we can’t just numerically sum the resistors with the
capacitor impedance. There must be an adjustment made for the capacitor’s 90 degree phase
shift. This is adjusted by doing a vector sum where the capacitor impedance is at a right angle
to the resistor’s impedance.
Figure 12 Resistor – Capacitor Circuit Phasor Diagram
Since the Current and both the Resistors’ voltages are in phase they both lie on the X-axis in the
complex plane and the two resistor values can be numerically summed. The Voltage on the
capacitor lags the current by 90 degrees, so the capacitor lies on the negative Y-axis. The
resultant impedance of combining the resistors’ impedances with that of the capacitor
impedance is the vector Z. Its magnitude, |Z|, is given by the equations .
The current can be found by dividing the source voltage by this impedance.
Knowing the current we can find the voltage on each of the components.
Notice that these voltages around the loop do not sum to zero. This is because the
measurements are based on the peak voltages and the peak voltage for the capacitor occurs at a
different time from the resistors’ peak voltages. If the voltages of all the components are
measured at exactly the same instant in time, then these voltages will sum to zero and KVL
does still hold true.
Good luck and if you have trouble contact the TA or the instructor.