LAB 2_instruction
pdf
keyboard_arrow_up
School
Drexel University *
*We aren’t endorsed by this school
Course
455
Subject
Mechanical Engineering
Date
Dec 6, 2023
Type
Pages
5
Uploaded by Ostree
LAB 2 _ Trajectory Planning of 3R manipulator
Professor: Euisun Kim
Spring 2022
Lab Objectives
1.
Understand Forward Kinematics and Inverse Kinematics
2.
Familiarize yourself with MATLAB Simscape Multibody
3.
Create Forward and Inverse Kinematics using MATLAB Simscape 3R manipulator model
%%This lab requires completed code from LAB1%%
Part A: Create Inverse Kinematic Function
Open
IK.m
matlab function file. You will complete this function
IK.m
so that this function
calculates inverse kinematic solutions for 3R manipulator. This function takes end effector
position & orientation (
࠵?
!
, ࠵?
!
, ࠵?
!
)
and manipulator link lengths (
࠵?
"
, ࠵?
#
, ࠵?
$
) as inputs and results
in joint angles
࠵? = [࠵?
"
, ࠵?
#
, ࠵?
$
]
as outputs.
Copy & paste a portion of your
LAB01_planar3Rrobot_inversekinematics.m
into
IK.m
so that this function calculates joint angles (
࠵? = [࠵?
"
, ࠵?
#
, ࠵?
$
]
) from given information
(
࠵?
!
, ࠵?
!
, ࠵?
!
, ࠵?
"
, ࠵?
#
, ࠵?
$
).
% Make sure you are using the same variable names for input and output as written in the
matlab code
(
xe,ye,phie, L1, L2, L3, q
)
% For simplicity, choose
elbow minus
solution.
Part B: Create Function that Plots Manipulator’s Trajectory
Open
plotManipulator.m
matlab function file. You will complete this function so that this
plots the Manipulator’s Trajectory with given joint angles. This function takes joint angles (
࠵? =
[࠵?
"
, ࠵?
#
, ࠵?
$
]
) and manipulator link lengths (
࠵?
"
, ࠵?
#
, ࠵?
$
) as inputs and plots the manipulator’s
trajectory.
Copy & paste a portion of your
LAB01_planar3Rrobot_inversekinematics.m
into
plotManipulator.m
so that this function plots the 3R manipulator configuration given
information (
࠵?, ࠵?
"
, ࠵?
#
, ࠵?
$
).
Part C: End Effector Trajectory Planning - Arc
Now you will make the 3R manipulator’s end effector follow a 90 degree arc with the center of
the circle
(࠵?
%
, ࠵?
%
) = (0.1, 0.2)
and the radius
࠵? = 0.25
.
-
Open ‘LAB02_ArcTrajectory.m’
-
Fill out the blank portion of the code to complete the code.
-
If your code runs successfully, following two figures below will be appeared. Left one is
manipulator configuration trajectory and the right one is joint angles changes during the
simulation time(0-2s)
Part D: Simscape Model Modification and Simulation
-Open ‘Lab02_planar3Rrobot.slx’ file. This file is the same one as the ‘Lab01_plana3Rrobot.slx’,
just a different name.
- Now we will replace inputs to three joint angles with ‘from workspace’ block by searching it
from the Library Browser.
- Search ‘from workspace’ and click and drag the block to ‘LAB02_planar3Rrobot’. Connect each
to joint angles and rename them to ‘theta1dsim’, ‘theta2dsim’ and ‘theta3dsim’.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
- The result would be look like this below. Now this Simscape model refers to joint angles from
the ‘theta1dsim’, ‘theta2dsim’ and ‘theta3dsim’ in the workspace for simulation.
- Run ‘LAB02_ArcTrajectory’ first and make sure ‘theta1dsim’, ‘theta2dsim’ and ‘theta3dsim’ are
in the workspace. Then run ‘LAB02_planar3Rrobot.slx’
- Use the tools highlighted in red box to adjust your simulation model so that you can clearly
observe the motion of the end effector and also the whole manipulator.
- Check if the end effector follows the arc as we planned. If it follows the arc, click the ‘record’
button on the far right and save the simulation video.
Part E. Create another trajectory that makes the end effector follow straight line that you
determine.
-
Repeat Part C & Part D with this new trajectory
Submission
1)
IK.m
matlab function from Part A
2)
plotmanipulator.m
matlab function from Part B
3) Two plots (manipulator trajectory, joint angles) from Part C
4)
LAB02_ArcTrajectory.m
matlab script from Part C
5)
LAB02_planar3Rrobot.slx
from Part D
6) Simulation video from Part D
7) Simulation video from Part E
Related Questions
I want to run the SGP4 propagator for the ISS (ID = 25544) I got from spacetrack.org in MATLAB. I don't know where to get the inputs of the function. Where do I get the inFile and outFile that is mentioned in the following function.
% Purpose:
% This program shows how a Matlab program can call the Astrodynamic Standard libraries to propagate
% satellites to the requested time using SGP4 method.
%
% The program reads in user's input and output files. The program generates an
% ephemeris of position and velocity for each satellite read in. In addition, the program
% also generates other sets of orbital elements such as osculating Keplerian elements,
% mean Keplerian elements, latitude/longitude/height/pos, and nodal period/apogee/perigee/pos.
% Totally, the program prints results to five different output files.
%
%
% Usage: Sgp4Prop(inFile, outFile)
% inFile : File contains TLEs and 6P-Card (which controls start, stop times and step size)
% outFile : Base name for five output files
%…
arrow_forward
Look up the Arduino Mega 2560. Document the steps how to work with the Arduino in Matlab and Simulink. Make a simulink program turning on the LED on the board for 10sec. Explain your program, comment on your findings and explain how to test it on the actual hardware.
arrow_forward
permanent-magnet (pm) genera x
Bb Blackboard Learn
L STAND-ALONE.mp4 - Google Dri x
O Google Drive: ülwgjuó jc lis u
O ME526-WindEnergy-L25-Shuja.p x
O File | C:/Users/Administrator/Desktop/KFUPM%20Term%232/ME526/ME526-WindEnergy-L25-Shuja.pdf
(D Page view
A Read aloud
T) Add text
V Draw
Y Highlight
O Erase
17
of 26
Wind Farms
Consider the arrangement of three wind turbines in the following schematic in which wind
turbine C is in the wakes of turbines A and B.
Given the following:
- Uo = 12 m/s
A
-XẠC = 500 m
-XBC = 200 m
- z = 60 m
- Zo = 0.3 m
U.
-r, = 20 m
B
- CT = 0.88
Compute the total velocity deficit, udef(C) and the velocity at wind turbine C, namely Vc.
Activate Windows
Go to Settings to activate Windows.
Wind Farms (Example Answer)
5:43 PM
A 4)) ENG
5/3/2022
I!
arrow_forward
Problem 3 (40 points) (CCOs 1 & 3)/MatlabGrader
On Canvas, you will find a Matlab function file process.p that takes as input the variable x and returns as output the result of
a complicated process g (x). Copy the file into your working directory and use it as any other Matlab .m file or build-in intrinsic
Matlab function (just call it using its name process). The only difference between a .p and a .m file is that the source code of the .p
file is not visible.
Find all roots of g(x) in the interval 0 ≤ x ≤ 10 to a tolerance in function of at least 10-10 using mySecant from problem 2.
Recall that any .m or .p function file can be passed as an argument into another function by prefacing the function name by a
@, e.g., @process can be passed as an argument into any Matlab function that uses a function as an input argument, for example
fplot(@process,...) for plotting a function.
Store all found unique roots in a column vector root, the corresponding tolerances in function in a column…
arrow_forward
Create one Simulink embedded function model to simulate the bungee jumper’s distance (x)
vs. t, the velocity (x’) vs. t and acceleration (x’’) vs. t for the first 500 seconds of the jump.
arrow_forward
HW Matlab 1) Create a variable ftemp to store a temperature in degrees Fahrenheit (F). Write m-file to convert this to degrees Celsius and store the result in a variable ctemp. The conversion factor is C = (F —32) * 5/9. 2) Write m-file to generate a matrix of random integers of size 100 by 100 their values between 15 to 80. 3) Free fall of objects is given by y =5mgt? where a is the acceleration, v is the velocity, y is the distance, m is the mass of the object, g is the gravitational acceleration. Plot the distance and velocity of the object for 15 seconds after its fall from rest (y = 0). Take m = 0.2 kg.
arrow_forward
use LMTD for part a and b
arrow_forward
mylabmastering.pearson.com
Chapter 12 - Lecture Notes.pptx: (MAE 272-01) (SP25) DY...
P Pearson MyLab and Mastering
Scores
arrow_forward
Please follow the instructions and the requirements according to the pictures above and I kinda need the solution quickly. The language of the code is in Matlab, thank you in advance.
arrow_forward
K
mylabmastering.pearson.com
Chapter 12 - Lecture Notes.pptx: (MAE 272-01) (SP25) DY...
P Pearson MyLab and Mastering
Mastering Engineering
Back to my courses
Course Home
Scores
Course Home
arrow_forward
Assist with MATLAB coding for part c
arrow_forward
Is there any built in functions in MATLAB that transform a given Direction Cosine Matrix (DCM) to Principal Rotation Paramters (PRP)? For example, If I have a DCM, the function would give the axis, lambda, and the angle, theta.
Also, is there any built in functions that would transform a Direction Cosine Matrix to Euler Parameters (EP) and Modified Rodrigiues Parameters and Classical Rodriguess Parameters?
If I had the DCM given in the image, what would the code in MATLAB to transform it to PRP, EP, MRP, CRP look like?
arrow_forward
Hello I'm having trouble with this assignment, I don't understand how the plot function works for ordered pairs. I undertand that the points of the line would be the origin(0,0) and (x = cos(theta) . y = sin(theta)).
arrow_forward
Consider the following Initial Value Problem (IVP) dy /at = -t * sin (y); y(t = 0) =1
Solve for y(t=0.5) using
a) Forward Euler method with At = 0.25. (Solve by hand)
Develop a Matlab script that solves for y (t = 5) using Forward Euler method. Use
the time step levels given below and plot t vs y in the same plot. Include the plot
with the right format (axis labels, legends, ...) in your solution sheet and include
your Matlab script in the solution as well.
i) At = 0.25
ii) At = 0.125
b) Backward Euler method with At = 0.25 (Solve by hand)
arrow_forward
INSTRUCTIONS: Solve the following problem by manually applying the finite element method, following these steps:
Pre-processing:
Geometry identification.
Material properties identification.
Load identification.
Boundary condition identification.
Development of the connectivity matrix for nodes and elements.
Processing:
Calculation of local stiffness matrices.
Assembly of the global stiffness matrix.
Assembly of the global force matrix (if required).
Application of boundary conditions.
Resolution of the system of equations.
Derivation of the complete displacement vector (u).
Post-processing:
Reaction forces calculation.
Stress analysis.
Problem Statement: the truss nodes and elements (in parentheses) are already numbered. The areas (are in cm^2 ) are underlined. members are made of structural steel, modulus of elasticity is (E) of 20×10^6 N/cm^2 . the lengths are given in cm.
arrow_forward
Please solve the following by hand and without the use of AI. Thank you!
arrow_forward
Problem 1 (15 points) (Core Course Outcome 5)/MatlabGrader
Write a function mySecond Derivative Order 3 that calculates the second derivative d²y/dx² of a data set (x, y) with at least
third order accuracy at each data point. The data is equidistant in x with spacing h.
The function input shall be
⚫y: one-dimensional column vector of y values
⚫h: scalar value of spacing h
The function output shall be
• d2y: column vector of the same size as y containing d²y/dx²
Calculate d²y/dx² using only the following formulas that use the nomenclature of Table 8-1 and the lecture notes, but are different
from the formulas listed there:
f" (xi) 164f(xi) — 465f(xi+1) + 460ƒ (xi+2) − 170ƒ (xi+3) + 11f (xi+5) + O(h³)
=
60h2
56f(xi−1) − 105f(xi) +40f(xi+1) + 10f(xi+2) − f(x+4) + O(h³)
60h²
−5f(xi−2) +80f(xi−1) − 150f(xi) + 80f(xi+1) − 5ƒ(xi+2)
(1)
f"(xi)
=
(2)
f"(xi)
=
+0(h)
(3)
60h2
f"(xi)
-2f(x-4)+5f(xi-3)+50f(xi-1) — 110f(xi) +57f(xi+1)
=
+0(h³)
(4)
60h²
f"(xi) =
57f(x-5) 230f(xi-4) + 290 f (xi-3)-235…
arrow_forward
MATLAB...Hand written plzzzz asap....FAST PLZZZZZZZZZZZ
arrow_forward
Solve the following problems using MATLAB. Ensure answers are accurate and well explained so that I may learn how to solve the problems. Dont use AI please. Thank You!
arrow_forward
Please do not rely too much on chatgpt, because its answer may be wrong. Please consider it carefully and give your own answer. You can borrow ideas from gpt, but please do not believe its answer.Very very grateful!
Please do not copy other's work,i will be very very grateful!!
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you

Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press

Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON

Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education

Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY

Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning

Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY
Related Questions
- I want to run the SGP4 propagator for the ISS (ID = 25544) I got from spacetrack.org in MATLAB. I don't know where to get the inputs of the function. Where do I get the inFile and outFile that is mentioned in the following function. % Purpose: % This program shows how a Matlab program can call the Astrodynamic Standard libraries to propagate % satellites to the requested time using SGP4 method. % % The program reads in user's input and output files. The program generates an % ephemeris of position and velocity for each satellite read in. In addition, the program % also generates other sets of orbital elements such as osculating Keplerian elements, % mean Keplerian elements, latitude/longitude/height/pos, and nodal period/apogee/perigee/pos. % Totally, the program prints results to five different output files. % % % Usage: Sgp4Prop(inFile, outFile) % inFile : File contains TLEs and 6P-Card (which controls start, stop times and step size) % outFile : Base name for five output files %…arrow_forwardLook up the Arduino Mega 2560. Document the steps how to work with the Arduino in Matlab and Simulink. Make a simulink program turning on the LED on the board for 10sec. Explain your program, comment on your findings and explain how to test it on the actual hardware.arrow_forwardpermanent-magnet (pm) genera x Bb Blackboard Learn L STAND-ALONE.mp4 - Google Dri x O Google Drive: ülwgjuó jc lis u O ME526-WindEnergy-L25-Shuja.p x O File | C:/Users/Administrator/Desktop/KFUPM%20Term%232/ME526/ME526-WindEnergy-L25-Shuja.pdf (D Page view A Read aloud T) Add text V Draw Y Highlight O Erase 17 of 26 Wind Farms Consider the arrangement of three wind turbines in the following schematic in which wind turbine C is in the wakes of turbines A and B. Given the following: - Uo = 12 m/s A -XẠC = 500 m -XBC = 200 m - z = 60 m - Zo = 0.3 m U. -r, = 20 m B - CT = 0.88 Compute the total velocity deficit, udef(C) and the velocity at wind turbine C, namely Vc. Activate Windows Go to Settings to activate Windows. Wind Farms (Example Answer) 5:43 PM A 4)) ENG 5/3/2022 I!arrow_forward
- Problem 3 (40 points) (CCOs 1 & 3)/MatlabGrader On Canvas, you will find a Matlab function file process.p that takes as input the variable x and returns as output the result of a complicated process g (x). Copy the file into your working directory and use it as any other Matlab .m file or build-in intrinsic Matlab function (just call it using its name process). The only difference between a .p and a .m file is that the source code of the .p file is not visible. Find all roots of g(x) in the interval 0 ≤ x ≤ 10 to a tolerance in function of at least 10-10 using mySecant from problem 2. Recall that any .m or .p function file can be passed as an argument into another function by prefacing the function name by a @, e.g., @process can be passed as an argument into any Matlab function that uses a function as an input argument, for example fplot(@process,...) for plotting a function. Store all found unique roots in a column vector root, the corresponding tolerances in function in a column…arrow_forwardCreate one Simulink embedded function model to simulate the bungee jumper’s distance (x) vs. t, the velocity (x’) vs. t and acceleration (x’’) vs. t for the first 500 seconds of the jump.arrow_forwardHW Matlab 1) Create a variable ftemp to store a temperature in degrees Fahrenheit (F). Write m-file to convert this to degrees Celsius and store the result in a variable ctemp. The conversion factor is C = (F —32) * 5/9. 2) Write m-file to generate a matrix of random integers of size 100 by 100 their values between 15 to 80. 3) Free fall of objects is given by y =5mgt? where a is the acceleration, v is the velocity, y is the distance, m is the mass of the object, g is the gravitational acceleration. Plot the distance and velocity of the object for 15 seconds after its fall from rest (y = 0). Take m = 0.2 kg.arrow_forward
- use LMTD for part a and barrow_forwardmylabmastering.pearson.com Chapter 12 - Lecture Notes.pptx: (MAE 272-01) (SP25) DY... P Pearson MyLab and Mastering Scoresarrow_forwardPlease follow the instructions and the requirements according to the pictures above and I kinda need the solution quickly. The language of the code is in Matlab, thank you in advance.arrow_forward
- K mylabmastering.pearson.com Chapter 12 - Lecture Notes.pptx: (MAE 272-01) (SP25) DY... P Pearson MyLab and Mastering Mastering Engineering Back to my courses Course Home Scores Course Homearrow_forwardAssist with MATLAB coding for part carrow_forwardIs there any built in functions in MATLAB that transform a given Direction Cosine Matrix (DCM) to Principal Rotation Paramters (PRP)? For example, If I have a DCM, the function would give the axis, lambda, and the angle, theta. Also, is there any built in functions that would transform a Direction Cosine Matrix to Euler Parameters (EP) and Modified Rodrigiues Parameters and Classical Rodriguess Parameters? If I had the DCM given in the image, what would the code in MATLAB to transform it to PRP, EP, MRP, CRP look like?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY

Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press

Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON

Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education

Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY

Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning

Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY