Lab 3 - Intro To Multisim - Revised - 07202009

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

INTERNATIONAL UNIVERSITY

BIOMEDICAL ENGINEERING DEPARTMENT (BME)

BME CAPSTONE DESIGN LAB

Lab 1

Introduction to
Multisim

Full name: ……………………………………………


Student number: …………………………………….
Class: ………………………………………………....
Date: ………………………………………………….

BME Capstone Design Lab Page 1 of 16


INTERNATIONAL UNIVERSITY
BIOMEDICAL ENGINEERING DEPARTMENT (BME)

I. Objectives
In this laboratory, you will be introduced the basic functions involved in creating a circuit,
in simulating and in testing an analog circuit.
II. Prelab
Read following document carefully. However, you do not have to submit prelab report.

III. Multisim Electronics Workbench


1. Introduction
Figure 1 shows the opening screen of Workbench. To use the program you choose a set of
components from the Parts Bin toolbar located on the left side of the screen and place them on the
screen. The components are connected by using the cursor to drag "wires" between the parts.
When the circuit is complete, you choose some type of measuring instrument from the Instruments
toolbar on the right side of the screen. For example, you might connect an oscilloscope to the
output of your circuit. This done, you can simulate your circuit and observe the output on the
instruments you connected.

Figure 1 - The Multisim opening screen

Figure 2 lists the commonly used icons from the toolbars.

Parts Bin Instruments


Source components. Includes dependent and
Multi-meter. Amps, volts, or Ohms.
independent sources and grounds

Basic components. Resistors, capacitors, inductors Function generator. Sine, square, and triangular
and variations waveforms

Diodes. Includes LED's and bridge networks Wattmeter.

Bipolar and MOS transistors Oscilloscope (2-Channel)

BME Capstone Design Lab Page 2 of 16


INTERNATIONAL UNIVERSITY
BIOMEDICAL ENGINEERING DEPARTMENT (BME)

Analog components. Includes op amps and other


Bode plotter. Does both magnitude and phase
amplifiers

TTL. A wide selection of 74 and 74LS packages Logic Analyzer

CMOS. 4xxx and 74HC components Mode and Simulation

Component mode button. Click this to add


Miscellaneous digital including VHDL and Verilog
components

Mixed analog/digital including converters and 555 Component editor to modify component
timer parameters.

Indicators. voltmeter and ammeter, indicator


Instruments. Click this to add an instrument.
lamps, and displays

Miscellaneous components including a vacuum Simulate button. Alternatively, push F5 to


tube and a motor toggle start/stop and F6 to pause.

Control system components such as summers, Analysis. Transient, AC, DC, and Fourier
multipliers, etc. included.

RF components VHDL and Verilog simulation.

Electromechanical including a coil, transformer,


Report. Click this to generate a report.
and a relay.

Figure 2 - The principle icons on the three main tool bars of Workbench.

2. Experiment
(a) Experiment # 1: A simplest circuit
1
V1

1V R1
1kHz 10.0
0Deg
0

Figure 3
Begin by placing a 10Ω resistor (tolerance = 1%), an AC voltage source, and an analog
ground as shown in Figure 3. Use the cursor to draw in the connecting wires. Note that there are
two types of resistors in the parts bin. One type is a "real world" resistor that has a value that you
can purchase. The second type is a "virtual" resistor that is idealized and can have any value you

BME Capstone Design Lab Page 3 of 16


INTERNATIONAL UNIVERSITY
BIOMEDICAL ENGINEERING DEPARTMENT (BME)

choose to assign to it. You can rotate a resistor by right clicking on it and choosing one of the
rotation options.
With the components in place you are ready to connect the wires. Workbench has no wire
mode. You connect wires by moving the cursor to a component wire end, click on it, go to a second
component and click on its wire end. Workbench will then fill in a wire between those two
components. If you get a wire wrong, simply click on the wire and push delete to get rid of it.
It may be tempting to place components close enough together so that their terminals touch
and thereby avoid having to connect them together with a wire. But this doesn't work in
Workbench. Components must be connected together by wires.
On occasion you may want to connect the end of one wire to a component. You cannot
begin a new wire from an old one unless you place a junction on the wire first. You can do this
from the Place menu at the top of the screen.
Sometimes Workbench does not choose a very good path between two points and the wire
makes the circuit appear cluttered or unnecessarily complicated or the wire path passes through text.
You can choose the path for any wire by clicking on intermediate points on the screen to form
corners or junctions. You do this by first clicking on a component wire end, clicking on one or
more intermediate points, and finally clicking on the component wire end of the second component.
The wire path will then go from the first component through each intermediate point to the second
component.
The circuit in this example is ready for simulation except that we have no way to see the
output. The simulator in Workbench outputs only to instruments which you connect to the circuit
diagram. For this example we will connect a voltmeter across R1 which we will take as the output.
Select the multi-meter from the Instruments toolbar on the right side of the screen. Place the
multi-meter near the R1 resistor and connect the plus terminal to the top of R1 and the minus
terminal to the bottom of R1 as shown in Figure 4. Double click on the multi-meter and verify that
it is set up as an AC voltmeter. Let the multi-meter set up screen open so that you can view the
results of the simulation.
XMM1

1
V1

1V R1
1kHz 10.0
0Deg
0

Figure 4 - The complete circuit with all of the components and wires in place.
You can start the simulation by pushing the F5 function key or by selecting run from the
Simulate  menu at the top of the screen. The result of the simulation will be shown on the multi-
meter.
Question:
- Now you use an extra Multi-meter to measure the current of R1.
- Compare the simulated results with the theoretical results, explain?

BME Capstone Design Lab Page 4 of 16


INTERNATIONAL UNIVERSITY
BIOMEDICAL ENGINEERING DEPARTMENT (BME)

Figure 5 - The multi-meter showing the results of the simulation

(b) Experiment # 2: An RC network using the oscilloscope and Bode plotter


In this experiment we use the oscilloscope and the Bode plotter in an RC circuit that has an
AC source. The circuit which we will construct is shown in Figure 6

Figure 6 - The complete circuit showing the oscilloscope and Bode plotter.

Begin by placing a 10KΩ resistor, a 1.0uF capacitor, a 100Ω resistor, an AC voltage source,
and an analog ground as shown in Figure 7. Use the cursor to draw in the connecting wires. If you
are unfamiliar with placing components and connecting wires refer to Experiment # 1.

Figure 7
The basic RC circuit with all components in place. Note that you will have to change the
default value of the AC voltage source to 10 Volts by double clicking on the source and
setting the value on the pop-up menu.

For this circuit we will take the input to be the 10 volt AC source and the output to be the
voltage across the series combination of C1 and R2. Select the oscilloscope from the Instruments
toolbar and connect the A channel to the top of V1 and the B channel to the top of C1. It's not
necessary to connect the oscilloscope ground. Your circuit should look like that shown in Figure 6.

BME Capstone Design Lab Page 5 of 16


INTERNATIONAL UNIVERSITY
BIOMEDICAL ENGINEERING DEPARTMENT (BME)

Double click on the oscilloscope to open the oscilloscope control window and set the values as
shown in the figure.

Figure 8
The circuit with the oscilloscope connected. The time base is set to 200µsec/div. Set
channel A to 10 V/Div and channel B to 200 mv/Div. Set the y-position of channel A to
+1.4 volts and the y-position of channel B to -1.6 volts.

Push the F5 function key to run the simulation (or push the rocker switch at the top right of
the Workbench screen). The oscilloscope display will look like that shown in Figure 6.

Figure 9 - The oscilloscope showing the simulation.


The oscilloscope display has two arrows in red and blue near the top of the display. Use the
cursor to move the red arrow to a peak of the channel A display and move the blue arrow to the
peak in the channel B display. The display will then show the difference in time as T2-T1 about
equal to 160 µsec. Note that the input voltage source is at 1 KHz so the phase shift between the two
o o
is (160/1000) x 360 = 57.6 .
Note that the oscilloscope has a Save button. This allows you to save the data collected and
displayed by the scope into an ASCII file. The file can then be read by other program such as
Matlab or Excel for reports or graphs.
The Bode plotter is an instrument that allows you to look at the frequency response of your
circuit. Select the Bode plotter from the Instruments tool bar on the right side of the screen. The
Bode plotter has both input and output terminals and has the additional requirement that your circuit

BME Capstone Design Lab Page 6 of 16


INTERNATIONAL UNIVERSITY
BIOMEDICAL ENGINEERING DEPARTMENT (BME)

must have at least one AC source as a circuit element. For our example connect the input terminals
of the Bode plotter directly across the AC source and the output terminals across the series
combination of C1 and R2. This is shown in Figure 10 where a ground is used as a common
connection.
In use, the Bode plotter disables the AC source so that it has no real effect on the Bode plot.
The plotter applies a series of sinusoids to the input and monitors the sinusoids on the output to
determine the gain and the phase shift produced by the circuit.
Double click on the Bode plotter to get the control and output screen for the instrument. By
tradition, a Bode plot is logarithmic plot of gain magnitude and phase vs. frequency. On
Workbench you can alter the vertical and horizontal scales to be either linear or logarithmic. For
this example we will leave the traditional log plot in place. Change the horizontal frequency scale
so that the starting frequency (in window marked I) is at 10Hz and the ending frequency (in the
window marked F) is at 100 KHz. Run the simulation to get the Bode plot similar to that shown in
Figure 10 below.

Figure 10
The Bode plot simulation showing the magnitude function. Note that you can move the red arrow
horizontally and read out values in the window. The window above shows that the gain is at -20.442DB at a
frequency of 165.059Hz.
Click on the Phase button to see the phase curve. If you move the horizontal arrow to
1000Hz you will see the display shown in Figure 11.

Figure 11
o
The phase curve with the marker set to about 1KHz. The phase is -55.207 which agrees
with the phase measurement taken on the oscilloscope.

BME Capstone Design Lab Page 7 of 16


INTERNATIONAL UNIVERSITY
BIOMEDICAL ENGINEERING DEPARTMENT (BME)

Like the oscilloscope, the Bode plotter also has a Save option which allows you to save the
data taken by the plotter as an ASCII file. The first part of the Bode data file is shown in Figure 12.
You can read the data file directly into Excel and make a prettier plot or you can strip off the header
information and read the data into MATLAB.

Bode data for

column 1 Frequency (Hz)


column 2 Gain (dB)
column 3 Gain (Linear)
column 4 Phase (Deg)
trace name: Bode Result

Frequency Gain (dB) Gain Phase


-------------------------------------------------------
1.00000e+001 -1.46954e+000 8.44351e-001 -3.20393e+001
1.02329e+001 -1.52790e+000 8.38697e-001 -3.26306e+001
1.04713e+001 -1.58818e+000 8.32897e-001 -3.32275e+001
1.07152e+001 -1.65042e+000 8.26950e-001 -3.38295e+001
1.09648e+001 -1.71465e+000 8.20857e-001 -3.44365e+001
1.12202e+001 -1.78090e+000 8.14620e-001 -3.50483e+001
1.14815e+001 -1.84921e+000 8.08239e-001 -3.56645e+001
1.17490e+001 -1.91960e+000 8.01715e-001 -3.62850e+001
1.20226e+001 -1.99211e+000 7.95050e-001 -3.69093e+001
1.23027e+001 -2.06676e+000 7.88246e-001 -3.75374e+001
...
Figure 12
The first portion of the text file created by the Bode plotter. Click on the Save button to
create this file.

To get the Matlab plot, open the Bode plot data file in a word processor such as Word or
Notepad, strip off all of the information above the raw data appearing in the 4 columns, and save the
resulting file in a txt format. In Matlab you can plot the magnitude data using the following
commands:
s = load('BodeData.txt');
semilogx(s(:,1),s(:,2));

It is interesting and you can try it at home!

(c) Experiment #3: Transient and AC Analysis

Figure 13 - An RC circuit with a Bode plotter and an AC source for use in doing the analysis options.

BME Capstone Design Lab Page 8 of 16


INTERNATIONAL UNIVERSITY
BIOMEDICAL ENGINEERING DEPARTMENT (BME)

For this example we will look at the analysis options under the simulate menu. Begin by
constructing the circuit shown in Figure 13.
Note that in this circuit we have changed the AC voltage source from the default 10 volts to
1 volt. You might be tempted to use the function generator in place of the AC voltage source but
the function generator will not work with AC Analysis. Workbench requires at least one AC
voltage source in the circuit. We have also numbered the nodes since it is necessary to know the
node numbers for the analysis. You can number the nodes in your circuit by choosing
Options→Preferences and checking the Show node names box. The output node is number 3.

Figure 14 - The Bode plotter set up and result.


Double click on the Bode plotter and set the frequency range to run from 100Hz to 1MHz.
(Note that in the Bode plot set up mHz stands for milli-Hertz and MHz stands for MegaHertz.)
Run the simulation by pushing F5 and you will get he Bode plot shown in Figure 14.
AC Analysis
The first analysis that we will run on this circuit will be an AC analysis. From the menu
select Simulate→Analysis→AC Analysis. This will give you a menu screen similar to that shown
in Figure 15. Choose the starting and ending frequency range to run from 100Hz to 1MHz and set
the sweep type to linear with 100 points and a logarithmic vertical scale.

Figure 15 - Choose Simulate→Analysis→AC Analysis and set up the frequency parameters as shown.
Next choose the Output variables tab from the top of the menu, select node 3 from the left
side of the page and click on the arrow to move it to the right side.

BME Capstone Design Lab Page 9 of 16


INTERNATIONAL UNIVERSITY
BIOMEDICAL ENGINEERING DEPARTMENT (BME)

Figure 16
The output variables screen for AC Analysis. Select node from the left and click on the
"Plot during simulation" button to move it to the right.

Click on Simulate to complete the AC Analysis simulation. The results will appear in a new
window called "Analysis Graphs" as shown in Figure 17. Note that the Bode plot which we did
before also appears in this window under its own tab. The AC analysis and the Bode plot both
show the same information but they are plotted with different scales. The Bode plot has a
logarithmic frequency scale and we chose a linear frequency scale for the AC analysis.

Figure 17
The AC Analysis. Note that this graph provides the same information as does the Bode
plotter but the scales are different.

BME Capstone Design Lab Page 10 of 16


INTERNATIONAL UNIVERSITY
BIOMEDICAL ENGINEERING DEPARTMENT (BME)

Transient Analysis
In some books the term "Transient Analysis" refers to the step and impulse response of a
given circuit. For Workbench the term simply means the analysis of the circuit beginning at time 0
and running for a user specified time. The input is not limited to a step or impulse.
To do a transient analysis chooses Simulate→Analysis→Transient from the menu. This
will produce an options screen similar to that shown in Figure 18. Change the end time (TSTOP) to
0.01 seconds. Click on the Output variables tab and verify that node 3 is the output variable. Click
on the simulate button to get the results of the simulation. This is shown in Figure 18. Since we
have an AC source as the input the transient analysis shows the sinusoidal start up at the output.
The transient start up rapidly dies away within a couple of cycles and settles to the steady state
response of the circuit.

Figure 18
The Transient Analysis menu options. Change the value of TSTOP to 0.01 seconds.

Figure 19 - The transient analysis results showing the sinusoidal start up at time 0.
To get a step response we would need to change the input voltage source to a Pulse Voltage
Source and set the frequency and duty cycle such that the circuit settles out during each cycle. For
this particular example, delete the AC Voltage source by clicking on it one time and pushing delete.
Select a Pulse Voltage Source from the Parts Bin and connect it in place of the AC source. Double
click on the pulse source and set the voltage pulse to go from 0 to 1 volt, set the delay time to 0, the
rise and fall times to 1 nsec, and pulse width to 10 msec with a period of 20 msec. Choose simulate
to see the results shown in Figure 20.

BME Capstone Design Lab Page 11 of 16


INTERNATIONAL UNIVERSITY
BIOMEDICAL ENGINEERING DEPARTMENT (BME)

Figure 20 - The step response of the circuit.

(d) Experiment # 4: A resistor network with a dependent voltage controlled current source

Figure 21 - A resistor network with a dependent current source.

The circuit which we will simulate has a dependent voltage controlled current source, four
resistors, a battery, and a meter to measure the output. The finished circuit is shown in Figure 21.
To begin click on the Source Components icon on the Parts Bin tool bar. This produces a
selection of parts including various sources. Select a battery source from the menu by clicking on
it. Click once more on the blank screen to place the battery. Figure 22 shows the result.
After placing the battery on the screen, double click on it to get a menu to set the battery
values. Change the battery value to 10 volts.
With the battery in place the next item to chose will be the voltage dependent current source.
Choose this from the Source Components in the Parts Bin. A voltage dependent current source has
a value in mhos or amps/volt. Set this value to 0.001 mhos. The circuit also has a ground on either
side of the dependent source. Select a ground symbol from the Source Components and place them
on the diagram. Your circuit should look something like that shown in Figure 21.
There are four resistors to be added to the circuit and we are done with the sources menu.
You can close the source menu and open the Basic Components menu on the Parts Bin tool bar.
Choose a 1KΩ resistor and place it on the circuit diagram between the battery and dependent
source. Similarly choose a 2KΩ resistor and place it immediately to the left of the dependent
source. You can rotate a resistor by right clicking on it and choosing one of the rotation options.
Choose another 1KΩ and 2KΩ resistor and place them to the right of the dependent source. Rotate
the resistors as needed so that your circuit looks like that shown in Figure 21.

BME Capstone Design Lab Page 12 of 16


INTERNATIONAL UNIVERSITY
BIOMEDICAL ENGINEERING DEPARTMENT (BME)

Figure 22 - Select a battery voltage source and place it on the blank screen.

Figure 23 - A battery and a voltage dependent current source have been placed.
With the components in place you are ready to connect the wires. You connect wires by
moving the cursor to a component wire end, click on it, go to a second component and click on its
wire end. Workbench will then fill in a wire between those two components. If you get a wire
wrong, simply click on the wire and push delete to get rid of it.

BME Capstone Design Lab Page 13 of 16


INTERNATIONAL UNIVERSITY
BIOMEDICAL ENGINEERING DEPARTMENT (BME)

Figure 24
The circuit with all of the components in place. Note that resistors can be rotated by right clicking on them
and choosing one of the rotation options.

After connecting the wires in the example your circuit should look like that shown in Figure
25.

Figure 25
The complete circuit with all of the components and wires in place.

Select the multi-meter from the Instruments toolbar on the right side of the screen. Place the
Multi-meter near the R3 resistor and connect the plus terminal to the top of R3 and the minus
terminal to the bottom of R3 as shown in Figure 26. Double click on the multi-meter and verify that
it is set up as a DC voltmeter. Let the multi-meter set up screen open so that you can view the
results of the simulation.

Figure 26
Connect a Multi-meter across R3. The voltage across R3 is taken as the output voltage. Double click on the
Multi-meter to open the meter's setup and view screen.

BME Capstone Design Lab Page 14 of 16


INTERNATIONAL UNIVERSITY
BIOMEDICAL ENGINEERING DEPARTMENT (BME)

You can start the simulation by pushing the F5 function key, or by selecting run from the
Simulation menu at the top of the screen. The result of the simulation will be shown on the Multi-
meter.

Figure 27
The Multi-meter showing the results of the simulation.

The Multi-meter also allow can be used as an ammeter or an ohmmeter and, by clicking on
the Set... button you can manually set the impedance of the meters to conform to real world
instruments.
Workbench also has a voltmeter and an ammeter in the Indicators section of the Parts Bin.

3. Exercises
(a) Exercise 1: Find the current through each voltage source and the voltage across the current
source.
1

R1 I1 R3
1k 10mA 3k

2 3 4

V1 R2 V2
12 V 330 6V

Figure 28 – DC circuit with mixed sources


(b) Exercise 2: Measure the voltage across each circuit element. Is the Kirchhoff Voltage Law
obeyed?
1 R1 2
V1
1k
120 V C1
60 Hz 50uF
0Deg

Figure 29 – Driven RC Circuit

BME Capstone Design Lab Page 15 of 16


INTERNATIONAL UNIVERSITY
BIOMEDICAL ENGINEERING DEPARTMENT (BME)

(c) Exercise 3
Bring the circuit into resonance by adding an inductor of the appropriate value in series with
the elements of Exercise 2. Note the current in the circuit and the voltage across each element as
well as the voltage across the capacitor-inductor pair as resonance is achieved.
Vary the resistor from 1000 ohm to 100 ohm to 10 ohm, noting the changes in the circuit
quantities as the resistance is decreased. What is the value of the quality factor Q in each case?
1
R1 2

V1 1k
C1
50uF
120 V
60 Hz 3

0Deg L1
0

Figure 30 – RLC series circuit - Resonance


(d) Exercise 4
The inductor-resistor pair in the following circuit represents the induction motor. Determine
the current through the source.
1
R1 2

V1 139

118 V L1
60 Hz 326mH
0Deg

Figure 31 - Model of Induction Motor


Add a capacitor in parallel with the motor to minimize the current through the source.
Determine its value. Does the current through the motor change?
1

V1 R1
139
118 V C1
2
60 Hz
0Deg L1
326mH

Figure 32 – Reduction of Source Current

BME Capstone Design Lab Page 16 of 16

You might also like