Application of Algebra in Engineering: The One-Loop Circuit

Application of Algebra in Engineering: The
One-Loop Circuit
1.1 Laboratory Objective
The objective of this laboratory is to illustrate linear and quadratic applications utilized in engineering.
Supplementary information includes basic MATLAB commands and functions.
1.2 Educational Objectives
After performing this experiment, students should be able to:
1. Perform basic algebraic manipulations with linear equations.
2. Perform basic algebraic manipulations with quadratic equations.
3. Measure and understand the relationship between voltage, current, and resistance.
4. Apply basic functions in MATLAB toward the solution of engineering equations using the command
window.
5. Use MATLAB for plotting data.
1.3 Background
It is essential all engineers have an understanding of the fundamental laws of electricity. Ohm’s Law and
Kirchhoff’s Voltage Law are two such laws that are presented in this lab. In addition, knowledge of the
equipment and instrumentation that employ these laws is comparably important. Some of these include
ammeters, voltmeters, watt-meters, breadboards, and circuitry components such as resistors. The imple-
mentation of these instruments are introduced in this lab.
4
Laboratory 1 Application of Algebra in Engineering: The One-Loop Circuit
1.3.1 Ohm’s Law
+
−
V S
I
R
+
−
V R
Figure 1.1: An Electrical Circuit Consisting of a Voltage Source V S and Resistive Element R
Ohm’s Law is a linear equation stating the voltage across a resistor is equal to the current flowing through
that resistor multiplied by the value of that resistor. The following equation relates to Figure 1.1:
V R = IR (1.1)
The value V R is the voltage across the resistor in volts (V), I is the current flowing through the resistor in
amperes (A), and R is the resistance in ohms (Ω).
1.3.2 Kirchhoff’s Voltage Law
Kirchhoff’s Voltage Law states that the sum of the voltage rises is equal to the sum of the voltage drops in a
circuit.
ΣVoltage Rises=ΣVoltage Drops
Therefore, for the circuit shown in Figure 1.1:
V S =V R = IR (1.2)
1.3.3 Equipment
A breadboard and resistors are two electrical components presented in this lab. The function of breadboards
along with identification of resistor values will be reviewed. In addition, three types of measuring devices
are introduced in this lab. These include an ammeter, voltmeter, and watt-meter. Lastly, multiple power
supplies will be utilized in the circuit construction.
5
Laboratory 1 Application of Algebra in Engineering: The One-Loop Circuit
1.3.3.1 Breadboard
A breadboard is a medium to prototype a circuit. Circuit components are attached to the breadboard by
inserting wires or leads into the small holes arranged in grids on the board. Since these components are not
soldered in place, the pieces can be removed and the circuit easily changed. A standard breadboard is shown
in Figure 1.2.
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
rs
Figure 1.2: A Standard Breadboard Layout
Inside the breadboard are metal contacts that connect the holes. These metal contacts join clusters of five
holes together and are connected per the arrows shown in Figure 1.2. These clusters of five holes can be
considered as one node.
1.3.3.2 Resistors
Resistors are electrical components that dissipate power by consuming current. This enables engineers to
regulate the amount of current allowed to flow into succeeding components in the circuit. All resistors have
6
Laboratory 1 Application of Algebra in Engineering: The One-Loop Circuit
a maximum power limit. The tiny resistors used in lab are quarter watt resistors and the larger ones are ten
watt resistors. Because of physical size limitations for printing, a standard for defining resistor values has
been developed. For the larger resistors, the value is printed right on the casing. This standard uses color
coded bands that in conjunction with a chart, yield the resistor value. Figure 1.3 shows an example of a
typical resistor defined by colored bands.
Figure 1.3: A 1000Ω Resistor
The colored bands of this resistor correspond to Table 1.1 and Table 1.2. Reading from left to right, the first
two bands give the first two digits of the resistor value. The third colored band is the multiplier. This value
tells to what power of ten we multiply the first two digits. The resistor value in Figure 1.3 is found using
Tables 1.1 and 1.2 as follows:
• The Brown band corresponds to a 1.
• The Black band corresponds to a 0.
• The Red band indicates multiplying by 10 2 .
• The next Red band indicates a tolerance of ±2%.
The value of this resistor is 10 times 10 2 resulting in 1000Ω with a tolerance of ±2%.
Table 1.1 Resistor Color Band Values
Number 0 1 2 3 4 5 6 7 8 9
Color Black Brown Red Orange Yellow Green Blue Violet Grey White
Table 1.2 Resistor Tolerance Color Band Values
Tolerance ±1% ±2% ±5% ±10%
Color Brown Red Gold Silver
1.3.3.3 Ammeter
An ammeter is a device that measures the current flowing in a circuit. Because it measures a quantity moving
through the circuit it must be connected in series as shown in Figure 1.4.
7
Laboratory 1 Application of Algebra in Engineering: The One-Loop Circuit
Ammeter
+
−
Voltage
Source
R
Figure 1.4: Placement of an Ammeter in a Circuit
1.3.3.4 Voltmeter
A voltmeter is a device that measures the voltage potential across an electrical component. Because of this,
it is placed in parallel with the component whose voltage drop is being measured. A voltmeter is used to
measure the voltage drop across the resistor in Figure 1.5.
+
−
Voltage
Source
R V Voltmeter
Figure 1.5: Placement of a Voltmeter in a Circuit
1.3.3.5 Watt-meter
A watt-meter is a device that measures the power used by an electrical component. The power delivered or
absorbed is given by some basic equations related by Ohm’s Law:
P =VI = I 2 R =
V 2
R
(1.3)
A watt-meter functions by simultaneously measuring the current passing through, and the voltage drop
across, the component. In practice, this requires four connections to a circuit. The current nodes will be
connected in series while the voltage nodes will be connected in parallel. The watt-meter that is connected
in Figure 1.6 is set up to measure the power dissipated by the resistor R.
8
Laboratory 1 Application of Algebra in Engineering: The One-Loop Circuit
+
−
Voltage
Source
R
Wattmeter
+ −
V − +
Figure 1.6: Placement of a Wattmeter in a Circuit
1.4 Procedure
Follow the steps outlined below after the Lab Teaching Assistant has explained how to use the laboratory
equipment.
1.4.1 Circuit Number 1
1. The value of the resistor in Figure 1.7 is unknown. Construct the circuit with a quarter watt resistor
and use the laboratory equipment to find this value. Complete Table 1.3 and record the current value
measured on the ammeter.
Ammeter
+
−
V S
R
Figure 1.7: Circuit for Section 1.4.1
9
Laboratory 1 Application of Algebra in Engineering: The One-Loop Circuit
Table 1.3 Circuit 1 Measurements
Voltage V S (volts) Measured Current I (amps) Calculated Resistance R (Ω)
0 0 0
5
12
15
18
2. Calculate the resistance R in the last column using Ohm’s Law. (Pay close attention to units!)
R =
V S
I
3. Attach these hand calculations at the end of the lab.
4. Plot V S vs. I using MATLAB.
NOTE: Standard notation is y vs. x. Place V S on the y-axis and I on the x-axis.
NOTE: Use the MATLAB syntax that is given in Section 1.5.
5. Using MATLAB’s Basic Fitting tool, find the slope of the graph.
6. Print the graph.
1.4.2 Circuit Number 2
1. The value of the quarter watt resistor in Figure 1.8 below is unknown. Construct the circuit and use
the laboratory equipment to find this value. Complete Table 1.4 and record the current value measured
on the ammeter.
+ − V
Additional Voltage Source V
Ammeter
+
−
V S
R
Figure 1.8: Circuit for Section 1.4.2
10
Laboratory 1 Application of Algebra in Engineering: The One-Loop Circuit
Table 1.4 Circuit 2 Measurements
Voltage V S (volts) Add. Voltage V (volts) Measured Current I (amps) Calculated Resistance R (Ω)
0 6
5 6
7 6
9 6
2. Calculate the resistance R in the last column using Ohm’s Law. (Pay close attention to UNITS!)
R =
V S +V
I
3. Attach these hand calculations at the end of the lab.
4. Plot V S vs. I in MATLAB using the syntax in Section 1.5.
5. Using MATLAB’s Basic Fitting tool, find the slope and y-intercept of the graph.
6. Print the graph.
1.4.3 Circuit Number 3
1. The value of the current flowing through the circuit in Figure 1.9 is unknown. Construct the circuit
using ten watt resistors and use the laboratory equipment to find it. Complete Table 1.5 and record
the power and current from the watt-meter.
+
−
V S
10Ω 20Ω
Wattmeter
*
− V −
+ +
Figure 1.9: Circuit for Section 1.4.3
11
Laboratory 1 Application of Algebra in Engineering: The One-Loop Circuit
Table 1.5 Circuit Three Measurements
Voltage V S (volts) Power P (watts) Measured Current I (amps) Calculated Current I calc (amps)
7
9
11
2. Use the following quadratic equation to calculate the theoretical current and record that value in the
last column in Table 1.5. (Pay close attention to UNITS!)
RI 2
calc −V S I calc +P = 0
NOTE: The value for R in this equation is 10, not 20. P in this equation is the power dissipated by the
20Ω resistor.
3. Attach these hand calculations at the end of the lab.
12
Laboratory 1 Application of Algebra in Engineering: The One-Loop Circuit
1.5 MATLAB Commands
x = [ ]; This command defines a row vector x. Place real numbers within the square brackets separated by
spaces or commas.
plot (x , y , ’o’) This command plots the data in vectors x and y and does not connect lines between each
point.
To fit a curve to the data:
1. On the figure, go to the “Tools” drop down menu.
2. Highlight “Basic Fitting”.
3. Check the “Linear” box.
4. Check the “Show Equations” box.
This will fit a linear curve to the data and place the equation of that line on the plot.
13
Laboratory 1 Application of Algebra in Engineering: The One-Loop Circuit
1.6 Lab Requirements
1. Complete Tables 1.3, 1.4, and 1.5. (2 points each)
2. Write an abstract for this lab and submit to Turnitin.com. (Writing grade: 10%)
3. Show hand calculations for all three tables. Insert after this page. (2 points each)
4. Insert both plots after this page. (Don’t forget axis labels and title!) (2 points each)
5. Answer the following questions.
a) To what component of circuit one does the slope of plot one correspond? (2 points)
b) To what component of circuit two does the y-intercept of plot two correspond? (2 points)
c) Refer to circuits one and two for the following questions:
i. For circuits one and two, the calculated R should be relatively close to what value? (2
points)
ii. By how much do these values differ from the theoretical resistance as a percentage (calcu-
late for the maximum voltage case of circuits #1 and #2)? Show work. (2 points)
iii. Is this within the tolerance of the resistor? (2 points)
d) How do the values for the measured current and calculated current from circuit three compare?
What are some reasons for this? (2 points)
14
Laboratory 2
Trigonometric Relationships: One and
Two-Link Planar Robots
2.1 Laboratory Objective
The objective of this laboratory is to learn basic trigonometric functions, conversion from rectangular to
polar form, and vice-versa.
2.2 Educational Objectives
After performing this experiment, students should be able to:
1. Understand the basic trigonometric functions.
2. Understand the concept of a unit circle and four quadrants.
3. Understand the concept of a reference angle.
4. Be able to perform the polar to rectangular and rectangular to polar coordinate conversion.
5. Prove a few of the basic trigonometric identities.
2.3 Background
Trigonometry is a tool that mathematically forms geometrical relationships. The understanding and applica-
tion of these relationships are vital for all engineering disciplines. Relevant applications include automotive,
aerospace, robotics, and building design. This lab will outline a few common, but useful, trigonometric
relationships.
15
Laboratory 2 Trigonometric Relationships: One and Two-Link Planar Robots
2.3.1 Reference Angle
A reference angle is an acute angle (less than 90 ◦ ) that may be used to compute the trigonometric functions
of the corresponding obtuse angle (greater than 90 ◦ ). Figure 2.1 shows the reference angle φ with respect to
the angle θ .
θ
φ
x
y
(a) φ = 180 ◦ − θ
θ
φ
x
y
(b) φ = θ −180 ◦
θ
φ
x
y
(c) φ = 360 ◦ − θ
Figure 2.1: Reference Angle Calculations in Different Quadrants
Thereference angle φ is calculated using the formulas shown inthe captions ofeach corresponding subfigure
of Figure 2.1.
2.3.2 Law of Cosines
The law of cosines is a method that helps to solve triangles. Equations 2.1 relates the sides and interior
angles of Figure 2.2.
a 2 = b 2 +c 2 −2bccos(A)
b 2 = a 2 +c 2 −2accos(B) (2.1)
c 2 = a 2 +b 2 −2abcos(C)
c
a
b
A
B
C
Figure 2.2: Law of Cosines Triangle
16
Laboratory 2 Trigonometric Relationships: One and Two-Link Planar Robots
2.3.3 Law of Sines
The Law of Sines is another method that helps to solve triangles. Using the triangle of Figure 2.2, Equation
2.2 relates the sides to the interior angles.
a
sin(A)
=
b
sin(B)
=
c
sin(C)
(2.2)
2.4 Procedure
Follow the steps outlined below after the Lab Teaching Assistant has explained how to use the laboratory
equipment.
2.4.1 One Link Robot
1. Using the boards in the lab, fill in Table 2.1. Pay close attention to the sign of your answer for all
values.
NOTE: To convert a value in degrees to radians, the multiplying factor is
π
180 .
2. Use Equations 2.3 to find the Calculated x and y values.
x = lcos( θ ) (2.3)
y = lsin( θ )
Table 2.1 Polar to Rectangular Conversion
Angle
θ ( ◦ )
Measured
x (mm)
Measured
y (mm)
Vector
Form
x ˆ i+y ˆ j
l
(mm)
Reference
Angle ( ◦ )
Reference
Angle
(radians)
Calculated
x (mm)
Calculated
y (mm)
30 100
45 100
90 100
135 100
180 100
225 100
270 100
3. Using the boards in the lab, fill in Table 2.2.
4. Use Equations 2.4 to find the Calculated θ and l.
θ = tan −1 (y/x) (2.4)
17
Laboratory 2 Trigonometric Relationships: One and Two-Link Planar Robots
l =
p
x 2 +y 2
Table 2.2 Rectangular to Polar Conversion
(x,y)
Measured
θ ( ◦ )
Reference
Angle ( ◦ )
Reference
Angle
(radians)
Calculated
θ ( ◦ )
Calculated
l (mm)
Polar
Form l∡ θ
(85,50)
(70,70)
(0,100)
(−70,70)
(−100,0)
(−70,−70)
2.4.2 Identity Verification
An identity is a trigonometric relationship that is true for all permissible values of the variable(s). Many
times, trigonometric identities are used to simplify more complex problems.
1. Using MATLAB, fill in Tables 2.3 and 2.4.
a) The first column of Table 2.3 comes from Table 2.2.
b) Define this column as a vector in MATLAB and perform element by element calculations on it
to get the other columns.
NOTE: All calculations should be done with MATLAB. No calculator use!
Table 2.3
Calculated
θ from
Table 2.2
( ◦ )
sin( θ ) cos( θ ) tan( θ ) sec( θ )
18
Laboratory 2 Trigonometric Relationships: One and Two-Link Planar Robots
Table 2.4
sin( θ )
cos( θ )
sin 2 ( θ )+cos 2 ( θ ) 1+tan 2 ( θ ) sec 2 ( θ )
2.4.3 Two Link Robot
1. Using the boards in the lab, fill in the Measured Values of Table 2.5.
2. Write a MATLAB code to calculate x and y by adding the components of each link. Recall the
following equations from class.
x 1 = l 1 cos( θ 1 )
y 1 = l 1 sin( θ 1 )
x 2 = l 2 cos( θ 1 + θ 2 )
y 2 = l 2 sin( θ 1 + θ 2 )
X = x 1 +x 2
Y = y 1 +y 2
Table 2.5
Measured Values Calculated Values
θ 1 ( ◦ ) θ 2 ( ◦ ) x 1 y 1 x 2 y 2 X = x 1 +x 2 Y = y 1 +y 2 X Y
0 0
0 90
30 45
30 60
180 0
270 30
360 90
19
Laboratory 2 Trigonometric Relationships: One and Two-Link Planar Robots
2.4.4 Solve a Triangle Using Law of Cosines and Law of Sines
In some cases, the laws of sines and cosines must both be used to solve a triangle. Figure 2.3 is one such
case where the lengths l 1 and l 2 along with the final ending point P of the two links are known and the θ
values are not. Both laws are needed to solve this triangle.
x-axis
y-axis
l 1
l 2
r
y
x
P(x,y)
β
θ 2
θ 1
α
180− θ 2
Figure 2.3: General Two Link Robot
1. The radius r is found by:
r =
p
x 2 +y 2 (2.5)
2. Using the Law of Cosines, θ 2 is found by the following equation:
r 2 = l 2
1 +l
2
2 −2l 1 l 2 cos(180− θ 2 )
θ 2 = 180−cos −1
? r 2
−l 2
1 −l 2 2
−2l 1 l 2
?
(2.6)
3. Using the Law of Sines, α is found by the following equation:
r
sin( θ 2 )
=
l 2
sin( α )
α = sin −1
? l
2 sin( θ 2 )
r
?
(2.7)
4. θ 1 is now found by the equation:
β = tan −1
? y
x
?
(2.8)
θ 1 = β − α (2.9)
20
Laboratory 2 Trigonometric Relationships: One and Two-Link Planar Robots
5. Using Equations 2.5, 2.6, 2.7, 2.8, and 2.9, write a MATLAB code to fill in Table 2.6.
NOTE: l 1 = l 2 = 50mm.
NOTE: Define x and y as vectors containing all points below.
Table 2.6 Application of Sine and Cosine Laws
P(x,y) θ 2 ( ◦ ) α ( ◦ ) β ( ◦ ) θ 1 ( ◦ )
(55,75)
(75,60)
(15,63)
(32,14)
(71,70)
21
Laboratory 2 Trigonometric Relationships: One and Two-Link Planar Robots
2.5 Lab Requirements
1. Complete Tables 2.1, 2.2, 2.3, 2.4, 2.5, and 2.6. (2 points each)
2. Write an abstract for this lab and submit to Turnitin.com. (Writing grade: 10%)
3. Show hand calculations for Tables 2.1 and 2.2. Insert after this page. (2 points each)
4. MATLAB for Tables 2.3 and 2.4. (2 points each)
a) m-file
b) output
5. MATLAB for Table 2.5. (2 points)
a) m-file
b) output
6. MATLAB for Table 2.6. (2 points)
a) m-file
b) output
7. Answer the following questions.
a) Based on your results for Tables 2.3 and 2.4, write down the three trigonometric identities that
were verified. (2 points)
22
Laboratory 3
Sinusoids in Engineering: Measurement and
Analysis of Harmonic Signals
3.1 Laboratory Objective
Theobjective of this laboratory isto understand the basic properties ofsinusoids and sinusoid measurements.
3.2 Educational Objectives
After performing this experiment, students should be able to:
1. Understand the properties of sinusoids.
2. Understand sinusoidal addition.
3. Obtain measurements using an oscilloscope.
3.3 Background
Sinusoids are sine or cosine waveforms that can describe many engineering phenomena. Any oscillatory
motion can be described using sinusoids. Many types of electrical signals such as square, triangle, and saw-
tooth waves are modeled using sinusoids. Their manipulation incurs the understanding of certain quantities
that describe sinusoidal behavior. These quantities are described below.
3.3.1 Sinusoid Characteristics
Amplitude The amplitude A of a sine wave describes the height of the hills and valleys of a sinusoid. It
carries the physical units of what the sinusoid is describing (volts, amps, meters, etc.).
23
Laboratory 3 Sinusoids in Engineering: Measurement and Analysis of Harmonic Signals
Frequency There are two types of frequencies that can describe a sinusoid. The normal frequency f is
how many times the sinusoid repeats per unit time. It has units of cycles per second or Hertz (Hz).
The angular frequency ω is how many radians pass per second. Consequently, ω has units of radians
per second.
Period The period T is how long a sinusoid takes to repeat one complete cycle. The period is measured in
seconds.
Phase The phase φ of a sinusoid causes a horizontal shift along the t-axis. The phase has units of radians.
TimeShift The time shift t s of a sinusoid is a horizontal shift along the t-axis and is a time measurement of
the phase. The time shift has units of seconds.
NOTE: A sine wave and a cosine wave only differ by a phase shift of 90 ◦ or
π
2
radians. In reality, they are
the same waveform but with a different φ value.
3.3.2 Sinusoidal Relationships
t, seconds
x ✭ t ✮
A
T
Figure 3.1: Sinusoid Figure 3.1: Sinusoid.
The general equation of a sinusoid is given below and refers to Figure 3.1.
x(t) = Asin( ω t + φ ) (3.1)
The angular frequency is related to the normal frequency by Equation 3.2.
ω = 2 π f (3.2)
The angular frequency is also related to the period by Equation 3.3.
ω =
2 π
T
(3.3)
24
Laboratory 3 Sinusoids in Engineering: Measurement and Analysis of Harmonic Signals
By inspection, the normal frequency is related to the period by Equation 3.4.
f =
1
T
(3.4)
The time shift is related to the phase (radians) and the frequency by Equation 3.5.
t S = −
φ
2 π f
(3.5)
3.3.3 Sinusoidal Measurements
1. Connect the output channel of the Function Generator to channel one of the Oscilloscope with a 50Ω
resistor bridging the positive and negative connectors as seen in Figure ??.
Figure 3.2: Measuring Sinusoids
2. Complete Table 3.1 using the given values for voltage and frequency. Attach hand calculations at the
end of the lab.
Table 3.1 Sinusoid Measurements
Function Generator Oscilloscope (Measured) Calculated
Voltage (V p−p ) Frequency (Hz) A (V p−p ) f (Hz) T (sec) ω (rad/sec) T (sec)
2.5 1000
3 5000
3. Using an Oscilloscope, make measurements across the two separate resistors and complete Table 3.2.
Use f=2652.5 Hz.
a) Connect Channel 1 of the oscilloscope as shown in Fig. 3.3 and measure the amplitude, period,
and frequency of the resistor signal that is in series with the capacitor. (NOTE: Polarity of the
alligator clip connections is important. All the negative alligator clips should be hooked together
when making measurements.)
25
Laboratory 3 Sinusoids in Engineering: Measurement and Analysis of Harmonic Signals
Table 3.2 Sinusoid Amplitude Measurements
Signal V p−p (Volts)
V S 2 @ 2652.4 Hz
V C
V L
b) Move Channel 1 of the oscilloscope as shown in Fig. 3.3 and measure the amplitude, period,
and frequency of the resistor signal that is in series with the inductor.
fg red
fg black
Ch1 red
Ch1 black
1.2 uF
3 mH
50 ohms
50 ohms
fg red
fg black
Ch1 black
Ch1 red
1.2 uF
3 mH
50 ohms
50 ohms
Figure 3.3: Voltage Measurements
4. Using an Oscilloscope, make measurements across the two separate resistors relative to the function
generator and complete Table 3.3.
Table 3.3 Sinusoid Measurements
Signal t s (sec) φ (rad) φ (degrees)
V C
V L
a) Leaving Channel 1 connected, connect Channel 2 of the oscilloscope across the voltage source
(function generator) as shown in Fig. 3.4. Compare the two signals on the oscilloscope relative
to the time scale and measure the time shift (t s ). Convert the time shift t s with the following
equation:
φ = 2 π ft s .
26
Laboratory 3 Sinusoids in Engineering: Measurement and Analysis of Harmonic Signals
fg red
Ch2 red
fg black
Ch2 black
Ch1 black
Ch1 red
1.2 uF
3 mH
50 ohms
50 ohms
fg red
Ch2 red
fg black
Ch2 black
Ch1 black
Ch1 red
1.2 uF
3 mH
50 ohms
50 ohms
Figure 3.4: Signals Compared to the Function Generator
b) Leaving Channel 2 connected, move Channel 1 of the oscilloscope across the resistor in series
with the capacitor as shown in Fig. 3.4. Compare the two signals on the oscilloscope relative to
the time scale and measure the time shift (t s ).
5. Attach hand calculations for Tables 3.2 and 3.3 at the end of the lab.
6. Using values from the calculations made in Tables 3.1 and 3.3, plot the V C (t), V L (t), and V S (t) sinu-
soidal equations on the same graph using MATLAB.
27
Laboratory 3 Sinusoids in Engineering: Measurement and Analysis of Harmonic Signals
3.4 Lab Requirements
1. Complete Tables 3.1, 3.2, and 3.3. (2 points each, 6 total)
2. Write an abstract for this lab and submit to Turnitin.com. (Writing grade: 10%)
3. Show hand calculations for Tables 3.1 and 3.3. Insert after this page. (2 points each, 4 total)
4. Draw the sinusoids by hand from Table 3.1. Label amplitude and period. Insert after this page. (2
points)
5. Generate MATLAB plots of V C (t), V L (t), and V S (t) (all three on the same graph) for the calculated
values and insert after this page. (2 points each, 4 total)
6. Write out the equations of the sinusoids using Tables 3.2 and 3.3. (2 points each, 4 total)
a) V C (t) =
V C
2
cos(16666t + φ C )
b) V L (t) =
V L
2
cos(16666t + φ L )
7. Through circuit analysis, V S (t) =V C (t)+V L (t). Verify this by adding the sinusoid equations together.
(Assume thatV C =V L =
√ 2,
φ C =45 ◦ , and φ L =−45 ◦ V S (t)=
V S p−p
2
cos( ω t+ φ )=1.0cos(16,666t +
0 o )V.) (4 points)
8. Are the values measured the same as those calculated? If they are different, list a few reasons why. (2
points)
28
Laboratory 4
Systems of Equations in Engineering: The
Two-Loop Circuit
4.1 Laboratory Objective
The objective of this laboratory is to learn the basics of systems of equations and matrices and their appli-
cation in engineering.
4.2 Educational Objective
After performing this experiment, students should be able to:
1. Solve for the unknowns by use of a matrix inverse, Cramer’s Rule, substitution, and MATLAB.
4.3 Background
Simultaneous equation solving is a key skill in many engineering applications. For example, software in
finite element modeling and thermodynamics solve multiple equations with multiple variables. MATLAB
is one such piece of software that can solve simultaneous equations. The following methods will solve
relatively small problems easily and can provide an answer quickly, however with larger systems, hand
calculations can be exhaustive and software becomes the more intelligent route to the solution.
4.3.1 Problem Statement
A system of equations can be written as Ax=b, where A is the coefficient matrix,
− →
x is a vector of unknowns,
and
− →
b is a vector of the right hand sides of the equations. For illustration, the following matrices will be
used for explaining the methods.
A =
”
a b
c d
#
29
Laboratory 4 Systems of Equations in Engineering: The Two-Loop Circuit
− →
x =
”
x
y
#
− →
b =
”
m
n
#
4.3.2 Matrix Inverse Method
− →
x = A −1 − → b
A −1 =
1
?
?
?
a b
c d
?
?
?
”
d −b
−c a
#
(4.1)
4.3.3 Cramer’s Rule
x =
?
?
?
m b
n d
?
?
?
?
?
?
a b
c d
?
?
?
y =
?
?
?
a m
c n
?
?
?
?
?
?
?
a b
c d
?
?
?
?
4.3.4 Substitution
The system A − → x =
− →
b can be written as two equations.
ax+by = m (4.2)
cx+dy = n (4.3)
Solve for x in Equation 4.3 and substitute into Equation 4.2.
a( n−dy
c
)+by = m
y =
m−
an
c
b−
ad
c
Once y is known, substitute back into either Equation 4.2 or 4.3, and solve for x.
30
Laboratory 4 Systems of Equations in Engineering: The Two-Loop Circuit
4.3.5 MATLAB
MATLAB will solve the problem A − → x =
− →
b by two methods.
− →
x = A −1 − → b
− →
x = A\
− →
b
NOTE: The second method is pronounced “A left division b” and is much more efficient for larger matrices
than method one.
4.4 Procedure
1. The currents flowing through loop 1 and loop 2 in the circuit below are unknown. Construct the circuit
and use the lab equipment to find these currents. Complete Table 4.1.
NOTE: R 1 = R 2 = 100Ω and R 3 = R 4 = 200Ω.
R 1 R 3
+
−
V S R 2
R 4
Ammeter Loop 1 Loop 2
Figure 4.1: A Two-Loop Circuit
Table 4.1 Two-Loop Circuit
V S (Volts) I 1 (Amps) I 2 (Amps)
5
7
31
Laboratory 4 Systems of Equations in Engineering: The Two-Loop Circuit
4.5 Lab Requirements
1. Complete Table 4.1. (2 points)
2. Write an abstract for this lab and submit to Turnitin.com. (Writing grade: 10%)
3. By hand, calculate the unknown currents, I 1 and I 2 using the three methods below and attach after this
sheet. (2 points each)
a) Inverse Matrix Method
b) Cramer’s Rule
c) Substitution
NOTE: Use the following matrix setup (TakeV S to be 7):
”
(R 1 +R 2 ) −R 2
−R 2 (R 2 +R 3 +R 4 )
#”
I 1
I 2
#
=
”
V S
0
#
4. Write a MATLAB code implementing the Inverse Matrix Method. Have the user input values for all
resistors and the voltage source. Check your answer with “Left Division”. Attach after this sheet: (4
points) ( both cases where V S = 5and 7 V)
a) m-file
b) output
5. Compare your calculated values for I 1 and I 2 with the measured values. Why are they different? (2
points)
32
Laboratory 5
Derivatives in Engineering: Velocity and
Acceleration in Free-Fall
5.1 Laboratory Objective
The objective of this laboratory is to illustrate the application of a derivative with a freefall exercise.
5.2 Educational Objective
After performing this experiment, students should be able to:
1. Understand the relationship between position, velocity, and acceleration.
2. Identify the key parameters of freefall.
3. Use MATLAB symbolics to calculate derivatives.
5.3 Background
The derivative is a tool that describes the rate of change of a quantity with respect to the change in another.
Geometrically this is equivalent to slope.
5.3.1 Position, Velocity, and Acceleration
Given a function y(t) that represents position with respect to time, one can derive the expressions for the
velocity v(t) and the acceleration a(t). Velocity is simply the derivative of y(t) with respect to time and
acceleration is the second derivative of y(t) with respect to time.
v(t) =
dy
dt
a(t) =
d 2 y
dt 2
=
dv
dt
33
Laboratory 5 Derivatives in Engineering: Velocity and Acceleration in Free-Fall
Velocity can also be calculated using
∆y
∆t , or
v(t) =
y 2 −y 1
t 2 −t 1
Similarly, acceleration can be calculated using
∆v
∆t , or
a(t) =
v 2 −v 1
t 2 −t 1
The freefall apparatus used in this lab consists of a free fall device, an ultrasound sensor which is mounted
to fixed position, and a computer to record the data.
5.4 Procedure
Follow the steps outlined below after the Lab Teaching Assistant has explained how to use the laboratory
equipment.
1. Open Data Studio and click the Setup icon.
2. Set the sample rate to 20 Hz. (ie. ∆t = 1/20sec)
3. Close the setup window.
4. Start data collection and drop device.
5. Press stop after the object hits the ground.
6. Copy data into Microsoft Excel by dragging a box around the data and then copy/pasting.
7. Construct Table 5.1 in Excel and plot the measured position, velocity, and acceleration vs. time.
Table 5.1 Position, Velocity, and Acceleration
y i (m) t i (s) ∆y = y i+1 −y i (m) ∆t = t i+1 −t i (s) v i =
∆y
∆t
( m
s )
∆v = v i+1 −v i ( m
s )
a i =
∆v
∆t
( m
s 2 )
0 0 – – 0 – 0
y 1 t 1 y 1 −y 0 t 1 −t 0 v 1 v 1 −v 0 a 1
y 2 t 2 y 2 −y 1 t 2 −t 1 v 2 v 2 −v 1 a 2
etc. etc. etc. etc. etc. etc. etc.
8. Repeat this procedure for 40 Hz and 50 Hz sparks.
34
Laboratory 5 Derivatives in Engineering: Velocity and Acceleration in Free-Fall
5.5 Lab Requirements
1. Write an abstract for this lab and submit to Turnitin.com. (Writing grade: 10%)
2. Insert all three Tables after this page. (2 points each)
a) 20 Hz
b) 40 Hz
c) 50 Hz
3. Insert the measured position, velocity, and acceleration plots for the best ( where acceleration is closest
to 9.81 m/s 2 case after this page. (Don’t forget to properly label the graphs!) (2 points each)
4. Write a MATLAB script that will plot the theoretical (calculated) position, velocity, and acceleration
vs. time. Use MATLAB symbolics and subplot commands. (2 points each)
NOTE: For freefall, y(t) = y 0 +v 0 t +
1
2 at
2 (m).
5. Answer the following questions:
a) In freefall what physical quantity does the acceleration represent? (2 points)
b) What is the mathematical relationship between position, velocity, and acceleration? (2 points)
35
Laboratory 6
Integrals in Engineering: Work and Stored
Energy in a Spring
6.1 Laboratory Objective
The objective of this laboratory is to illustrate the application of an integral with an exercise with spring
work.
6.2 Educational Objective
After performing this experiment, students should be able to:
1. Understand that geometrically, an integral calculates area under a curve.
2. Understand the work done on a spring.
6.3 Background
Work is a fundamental concept of many physical systems. In general, the sum of all forces over a given
distance is work.
W =
Z
x
0
F(x)dx (6.1)
A spring has work done on it when it is stretched. Thespring force is linearly related to the distance stretched
by a constant k.
F(x) = kx (6.2)
The work done on a spring by a mass can be found by substituting Equation 6.2 into Equation 6.1.
W =
Z
x
0
kxdx (6.3)
36
Laboratory 6 Integrals in Engineering: Work and Stored Energy in a Spring
Figure 6.1 below shows the setup that will be used in the lab.
Spring
Masses
Figure 6.1: Spring & Mass System
6.4 Procedure
Follow the steps outlined below after the Lab Teaching Assistant has explained how to use the laboratory
equipment.
1. Attach the spring to the stand and suspend the mass hanger from the other end. Record the measure-
ment from the scale. This is your reference value x o .
2. Complete Tables 6.1, 6.2, and 6.3.
a) Add mass as shown in each table and record the measurement from the scale.
b) Calculate the force on the spring in Newtons. (g = 9.81m/s 2 )
F = mg
c) Calculate ∆x due to each added mass.
NOTE:Remember to take the absolute value of your answers in column four if they are negative.
Table 6.1
Mass (kg) Scale (m) F (N) ∆x = |x i −x 0 | (m) base = |x i −x i−1 |
0 x 0 = 0 – –
0.08 x 1 =
0.16 x 2 =
37
Laboratory 6 Integrals in Engineering: Work and Stored Energy in a Spring
Table 6.2
Mass (kg) Scale (m) Force (N) ∆x = |x i −x 0 | (m) base = |x i −x i−1 |
0 x 0 = 0 – –
0.04 x 1 =
0.08 x 2 =
0.12 x 3 =
0.16 x 4 =
Table 6.3
Mass (kg) Scale (m) Force (N) ∆x = |x i −x 0 | (m) base = |x i −x i−1 |
0 x 0 = 0 – –
0.02 x 1 =
0.04 x 2 =
0.06 x 3 =
0.08 x 4 =
0.1 x 5 =
0.12 x 6 =
0.14 x 7 =
0.16 x 8 =
3. Plot Force vs. ∆x in MATLAB for all three Tables.
4. Using MATLAB’s Basic Fitting tool, find the slope and y-intercept of the graphs.
5. Plot a bar graph of Force vs. ∆x in MATLAB for all three Tables.
NOTE: MATLAB syntax is given in Section 6.6.
38
Laboratory 6 Integrals in Engineering: Work and Stored Energy in a Spring
6.5 Lab Requirements
1. Complete Tables 6.1, 6.2, and 6.3. (2 points each)
2. Write an abstract for this lab and submit to Turnitin.com. (Writing grade: 10%)
3. Insert 3 linear plots after this page. (2 points each)
4. Insert 3 bar graphs after this page. (2 points each)
5. Write a MATLAB script that calculates the area of the bar graphs. Insert after this page. (2 points
each)
a) m-file
b) output
6. Write a MATLAB script that will calculate the integral of Equation 6.3. Use MATLAB symbolics. (2
points each)
NOTE: Use the value of k that was found from Table 6.3 in the equation. The limits of integration are
0 to ∆x = |x 8 −x 0 | from Table 6.3.
a) m-file
b) output
7. Calculate this integral by hand. (2 points)
NOTE: Use the value of k that was found from Table 6.3 in the equation. The limits of integration are
0 to ∆x = |x 8 −x 0 | from Table 6.3.
W =
Z
∆x
0
kxdx
8. Answer the following questions:
a) What does the slope of the linear plots physically represent? (2 points)
b) What are the units of the spring constant k? (2 points)
39
Laboratory 6 Integrals in Engineering: Work and Stored Energy in a Spring
c) What do the areas of the bar graphs physically represent? (2 points)
d) How do the areas of the bar graphs compare to your answer for Question 6?
40
Laboratory 6 Integrals in Engineering: Work and Stored Energy in a Spring
6.6 MATLAB Commands
bar(x,y,1) Draws a bar graph with x values at the midpoint of each rectangle.
41
Laboratory 7
Differential Equations in Engineering: The
Leaking Bucket
7.1 Laboratory Objective
The objective of this laboratory is to learn about first order differential equation and its application to a
leaking bucket.
7.2 Educational Objectives
After performing this experiment, students should be able to:
1. Understand the modeling of a leaking bucket dynamic system.
2. Measure the key parameters of a leaking bucket dynamic system.
3. Validate a mathematical model of the leaking bucket with observed data.
7.3 Background
Differential equations are an integral part of engineering. Almost all system response can be described by a
differential equation. Knowledge of how to solve these problems is key to an engineer’s success. This lab
looks at one classification of a differential equation; first order, constant coefficient, and homogeneous.
7.3.1 The Leaking Bucket
The system shown in Figure 7.1 can be described by investigating the behavior of the water.
The following equation describes the volumetric flow rate, Q of the system.
Q in −Q out −Q stored = 0
42
Laboratory 7 Differential Equations in Engineering: The Leaking Bucket
A tank
h(t)
Q out
A straw
Figure 7.1: Leaking Bucket
There will not be any water flowing into our system, therefore Q in = 0.
Q stored = −Q out
The volumetric flow rate is found by multiplying the velocity by the area.
A tank ˙ h = −A straw v
From fluids, the velocity of the water coming out of the straw is
√ 2gh.
A tank ˙ h = −A straw
p
2gh
Rearranging terms and writing all constants as one:
A tank ˙ h+A straw p 2g √ h = 0
A tank ˙ h+K √ h = 0
The above equation cannot be solved using the methods of this class because the h on the second term of the
equation is under a square root. To accommodate this, the governing equation that will be solved in this lab
will be approximated without the square root:
A tank ˙ h+Kh = 0
The solution to the governing equation is:
h(t) = Ce −(K/A tank )t (7.1)
43
Laboratory 7 Differential Equations in Engineering: The Leaking Bucket
Where C is the initial height of the water and the system time constant is defined as τ = A tank /K.
7.4 Procedure
Follow the steps outlined below after the Lab Teaching Assistant has explained how to use the laboratory
equipment.
1. Using the hot glue gun in the lab, glue the straw into the two liter pop bottle near the base.
NOTE: The straw must be horizontal.
2. Place a piece of tape axially along the bottle from the straw to where the bottle starts to curve near the
top.
3. Fill the bottle with water up to where the bottle starts to curve while blocking the straw so that water
does not leak out.
4. Place a mark on the tape to indicate the initial height of the water.
5. Release the straw and allow the water to flow out into a drain pan.
6. On the tape, mark the height of the water level every five seconds until water drips from the straw.
7. Remove tape and complete Table 7.1.
Table 7.1
Full Straw Half Straw
Time t (sec) Height h (m) ln(h) Time t (sec) Height h (m) ln(h)
0 h 1 ln(h 1 ) 0 h 1 ln(h 1 )
5 h 2 ln(h 2 ) 5 h 2 ln(h 2 )
10 h 3 ln(h 3 ) 10 h 3 ln(h 3 )
etc. etc. etc. etc. etc. etc.
8. Using Microsoft Excel, plot h vs. t for both straws.
9. Using Microsoft Excel, plot ln(h) vs. t for both straws.
a) Fit a line to the data and place the equation on the plot.
NOTE: The slope of this straight line is −K/A tank . The time constant τ is simply the negative inverse
of the slope.
44
Laboratory 7 Differential Equations in Engineering: The Leaking Bucket
7.5 Lab Requirements
1. Write an abstract for this lab and submit to Turnitin.com. (Writing grade: 10%)
2. Complete Table 7.1 and insert after this page. (2 points)
3. Insert two plots of h vs. t after this page. (2 points each)
4. Insert two plots of ln(h) vs. t after this page. (2 points each)
5. Derive by hand the equation of the straight line for the “ln plot” in terms ofC, K, and A tank . (2 points)
HINT: Start by taking the natural log of both sides of Equation 7.1 and algebraically simplify
6. Answer the following questions:
a) What is the time constant for the full straw? (Don’t forget units.) (2 points)
b) What is the time constant for the half straw? (Don’t forget units.) (2 points)
c) What type of energy is stored in the water? (2 points)
45
Laboratory 8
Differential Equations in Engineering:
Spring-Mass Vibration
8.1 Laboratory Objective
The objective of this laboratory is to model spring-mass behavior with a second order differential equation.
8.2 Educational Objective
After performing this experiment,students should be able to:
1. Apply principles of modeling and analysis to a spring-mass system.
2. Identify and measure the key parameters of a spring-mass system.
3. Validate a mathematical model (differential equation) with measured data.
8.3 Background
Another class of differential equations are second order applications. These equations contain a second
derivative of variable in question. In the case of a spring-mass system, the displacement as a function of
time is the unknown quantity.
46
Laboratory 8 Differential Equations in Engineering: Spring-Mass Vibration
8.3.1 The Spring-Mass System
K
M y(t)
Figure 8.1: Spring-Mass System
The spring-mass system shown in Figure 8.1 has kinetic energy associated with the mass moving up and
down and potential energy stored in the spring. This energy is passed back and forth as the spring oscillates.
The free body diagram (FBD) in Figure 8.2 shows all forces acting on the mass.
ky
mg
Figure 8.2: Free Body Diagram of Spring-Mass System
From equilibrium of forces in the y-direction,
k δ = mg,
which gives
δ =
mg
k
.
This represents the static deflection of the spring. Once the mass is displaced from the equilibrium position
47
Laboratory 8 Differential Equations in Engineering: Spring-Mass Vibration
and allowed to vibrate, the mass-spring system is no longer in equilibrium. Applying Newtons Second Law
and simplifying:
ΣF = ma
mg−k[ δ +y(t)] = m¨ y(t)
mg−k δ −ky(t) = m¨ y(t)
mg−k
? mg
k
?
−ky(t) = m¨ y(t) (8.1)
m¨ y(t)+ky(t) = 0 (8.2)
Equation 8.1 is the governing equation of a frictionless spring-mass system.
The solution to this equation is:
y total (t) = Acos
r
k
m t
!
The mass will oscillate as a cosine wave with amplitude A and angular frequency
q
k
m .
8.4 Procedure
Follow the steps outlined below after the Lab Teaching Assistant has explained how to use the laboratory
equipment.
1. Attach the spring to the stand and suspend the mass hanger from the other end. Record the measure-
ment from the scale. This is your reference value.
2. Complete Table 8.1 using one spring and two springs in series.
NOTE: Use two of the same springs for the Double Spring measurements.
Table 8.1
Single Spring Double Spring
Mass (kg) y i (m) Mass (kg) y i (m)
0 0
0.25 0.25
k 1 = k 2 =
3. Calculate the spring constants k 1 and k 2 with the following equation.
k i =
?
?
g(m 1 −m 2 )
y 1 −y 2
?
?
48
Laboratory 8 Differential Equations in Engineering: Spring-Mass Vibration
4. Place amass onthe hanger, displace it, and measure the time,t ittakes tocomplete 20 cycles according
to Table 8.2.
5. Calculate the period of oscillation T measured using Equation 8.3.
T measured =
t 20
20
(8.3)
Table 8.2
One Spring Two Springs One Spring Two Springs
m = 0.15 kg m = 0.25 kg
t 20 (sec) T measured (sec) t 20 (sec) T measured (sec) t 20 (sec) T measured (sec) t 20 (sec) T measured (sec)
6. The theoretical period T calc can be calculated by Equation 8.4. Find the calculated period for all cases
by completing Table 8.3.
T calc = 2 π
r
m
k
(8.4)
Table 8.3
k 1 k 2 k 1 k 2
m = 0.15 kg m = 0.25 kg
T calc T calc T calc T calc
49
Laboratory 8 Differential Equations in Engineering: Spring-Mass Vibration
8.5 Lab Requirements
1. Complete Tables 8.1, 8.2, and 8.3. (2 points each)
2. Write an abstract for this lab and submit to Turnitin.com. (Writing grade: 10%)
3. Show calculations for all tables and insert after this page. (2 points each)
4. Answer the following question:
a) Compare T measured with T calc . Why are they different? (2 points)
50

Latest Assignments