Download Lab #2 - Wright State University

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Perceived visual angle wikipedia , lookup

Trigonometric functions wikipedia , lookup

Transcript
EGR 101
LABORATORY 2
APPLICATION OF TRIGONOMETRY IN ENGINEERING
Wright State University
OBJECTIVE: The objective of this laboratory is to learn basic trigonometric functions,
conversion from rectangular form to polar form and vice-versa.
EDUCATIONAL OBJECTIVES:
After performing this experiment, students should be able to:
1.
2.
3.
4.
Understand the basic trigonometric functions.
Understand the concept of unit circle and four quadrants.
Understand the concept of the reference angle.
Be able to perform the polar to rectangular and rectangular to polar coordinate
conversion.
5. Prove few of the basic trigonometric identities.
BACKGROUND:
Reference Angle: For any given angle, its reference angle is the corresponding acute
version of that angle. The reference angle is the smallest angle between the terminal side
and the X-axis. Figure 1 shows the concept of a reference angle.
Terminal
side
θ
Reference
Angle for θ
X-axis
Figure 1: Concept of Reference angle.
Law of cosines:
L1
L2
Ө
x2 + y2
Figure 2: Law of cosines.
The squares of the side opposite to the angle is equal to the sum of the squares of the sides
adjacent to the angle minus twice the product of the sides adjacent to the angle and the
cosine of the angle.
( x 2 + y 2 ) 2 = l1 + l 2 − 2 * l1 * l 2 * cos θ
2
2
2
− ( x 2 + y 2 ) + l1 + l 2
∴ cos θ =
2 * l1 * l 2
2
Law of sines:
C
b
a
A
B
c
Figure 2: Law of sines.
By the law of sines, we have:
a
b
c
=
=
sin( A) sin( B) sin(C )
Note: To convert a value in radians to degrees the multiplying factor is 180/pi.
PROCEDURE:
One-Link Robot
I. The unit circle is shown in Figure 3. Consider the vector P of ‘length l’ and ‘angle Ө'. P
is called a Vector as it has both Direction (given by the angle Ө) and a Magnitude (given by
l).
(X,Y)=(0,l)
1st Quadrant
Y
2nd Quadrant
P (X,Y)=(lcosӨ,lsinӨ)
l
Ө
X
(X,Y)=(-l,0)
3rd Quadrant
4th Quadrant
(X,Y)=(0,-l)
Figure 3: Unit Circle.
(X,Y)=(l,0)
1. Measure the X and the Y coordinates for the corresponding angles given in the
Table 1.
2. Find the quadrant in which the point lies.
Table 1: Convert from polar to rectangular form and find the reference angle for one link robot.
No
Angle[Ө](deg)
1.
2.
3.
4.
5.
6.
7.
30
45
90
135
180
225
270
Measured
magnitude
of X
Quadrant
Measured
magnitude
of Y
Sign
of X
Sign
of Y
Reference
angle
The X and Y values in Table 1 can be written in the form of complex numbers. A complex
number is any number that can be written as x + j*y. This is the rectangular form of the
complex number.
Table 2: Represent the position (X, Y) as a complex number.
No.
1.
2.
3.
4.
5.
6.
7.
The position (X,Y) in Table 1 written as a complex number
Find the values of angle (Ө) and length ‘l’ using the formulas
l=
X 2 + Y 2 ………….(a)
Y
X
θ = tan −1 ( ) ……… ….(b)
Table 3: Calculate the length and angle of the one-link robot.
No
(X,Y)
1.
2.
3.
4.
5.
6.
(85,50)
(70,70)
(0,100)
(-70,70)
(-100,0)
(-70,-70)
Quadrant
Angle(Ө)
(deg)
Calculated ‘l’
Reference
Angle
The l and Ө values found in the Table 3 can be represented in the Polar form as P = l ∠θ
(length, angle from positive x-axis).
No.
1.
2.
3.
4.
5.
6.
Table 4: Represent the complex number in the polar form.
polar form of the position (l and Ө values) found in Table 3
II. An identity is a relationship that is true for all permissible values of the variable(s).
Verify basic Trigonometric identities given below:
1. Take the calculated value of ‘l’ from the Table 3.
2. Find the value of sin θ , cos θ , tan θ and sec θ .
3. Verify the identities.
4. Show the results using a MATLAB program. Example program is given at the end
of the lab handout.
tan θ =
sin θ
cosθ
………………(i)
sin 2 θ + cos 2 θ = 1 ……………(ii)
1 + tan 2 θ = sec 2 θ …………..(iii)
Table 5: To verify the trigonometric identities. (Use the l and Ө values from Table3)
Calculated
Y
X
sin θ =
Cos θ =
No
(X,Y)
Tan θ
Sec θ
‘l’
l
l
1.
2.
3.
4.
5.
6.
(85,50)
(70,70)
(0,100)
(-70,70)
(-100,0)
(-70,-70)
Identities
(iii)
(i)
tan θ =
sin θ
cosθ
(ii) sin 2 θ + cos 2 θ
LHS
RHS
1 + tan 2 θ
sec 2 θ
Two-links robot:
Now consider a two-links planar robot shown in Figure 5. The robot has two joints
(shoulder and elbow) and moves in the x-y plane by two motors as shown in Figure 5.
I. Similar to the one link robot, find the position of the tip of the robot, P(X, Y) of the twolink robot.
Wrist
Motor
P (X,Y)
L2
Θ2
L1
Elbow
Motor
Θ1
X
Motor
Shoulder
Figure 5: Two-link Planar Robot.
Y
P(X, Y)
L2
Y2
Θ2
Θ1
L1
Y1
Y1
Θ1
O
X1
X2
X
Figure 6: Tip of the two-link robot represented in the X-Y plane.
1. Align the link 2 (L2) to angle Θ2 and then link 1 (L1) to angle Θ1 in accordance with
the angles given in the Table 6.
2. Measure, X1, Y1, X2, Y2, X and Y.
3. Using the formulas calculate the values of X and Y for the two links robot shown in
Figure 6 in MATLAB.
X 1 = L1 cos θ1
X 2 = L2 cos(θ1 + θ 2 )
Y 1 = L1sin θ 1
Y 2 = L 2 sin(θ 1 + θ 2 )
X = X1 + X 2
Y = Y1 + Y 2
∴ X = L1 cosθ 1 + L 2 cos(θ 1 + θ 2 )
Y = L1sin θ 1 + L 2 sin(θ 1 + θ 2 )
Table 6: Calculate the coordinates of P for a two link planar robot.
Angle(Ө1)
Angle (Ө2)
(deg)
(deg)
0
0
30
30
180
270
360
0
90
45
60
0
30
90
No
1.
2.
3.
4.
5.
6.
7.
Measured X
Measured Y
X1
Y1
X2
Y2
Measured
Values
X
Y
Calculated
Values
X
Verify the law of cosines and the law of sine:
Y-axis
P(X,Y) Tip
B
x2 + y2
L2
180- Ө2
O
Y
A
α
Ө1 β
Ө2
L1
X
X-axis
Figure 7: Triangle formed by joining the origin O and the tip of the two-link robot.
Considering the two-link robot (L1=L2=50mm) shown in Figure 7.
Verify the law of cosine and the law of sine for the given values of X and Y in Table 7.
Solve for Ө2 and Ө1 using the law of cosines and law of sine.
Y
Table 7: To verify the law of cosines and law of sines.
No.
1.
2.
Calculated X and Y
X
55
75
Value of
Value of
Ө2
β
Y
75
60
Lab Report:
1. Submit the completed Table 1 through 7.
2. Show calculations.
Value of
α
Value of
Ө1
APPENDIX
Example of the MATLAB program for part I:
clear all
clc
disp('To verify the Trigonometric Identities')
%for loop starts
for i=1:1:7
% to input the X and Y values.
x(i)=input('Enter the value of X coordinate: ');
y(i)=input('Enter the value of Y coordinate: ');
%to find the value of r
r(i)=sqrt(x(i)^2+y(i)^2)
% to find sine value
sin(i)=(y(i)/r(i))
%to find cosine value
cos(i)=(x(i)/r(i))
%to find tangent value
tan(i)=y(i)/x(i)
%to find the secant value)
sec(i)=1/cos(i)
%to display on the screen
disp('To verify the identities');
%identity 1
disp('Identity 1: tan(theta)=sin(theta)/cos(theta)');
identity_1(i)=sin(i)/cos(i)
%identity 2
disp('Identity 2: sin(theta)^2 + cos(theta)^2 = 1');
identity_2(i)=sin(i)^2+cos(i)^2
%identity 3
disp('Identity 3: 1 + tan(theta)^2 = sec(theta)^2');
identity_3_LHS(i)=1+tan(i)^2
identity_3_RHS(i)=sec(i)^2
%for loop ends
end