Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask MATLAB Expert

Consider the planar linkage shown below. The crank (link with length R) will turn counter-clockwise with constant angular velocity. The slider will experience a force of 100 N directed to the left. Your task is to write a program that calculates the required input torque and the magnitude of the pin reaction forces for two revolutions of the input link. You will then use your program to determine how changing the dimension H changes the average magnitude of the pin reaction forces at pins A, B and C (refer to the free-body diagram for the location of these pins).

866_Newtons method.png

The first task is to determine the coordinates Φ, s given θ. The constraint equations that must be satisfied are:

2472_Newtons method1.png

You are required to solve these equations using Newton's method. The next task is to solve for the time derivatives of Φ, given θ(constant). Equations (1) and (2) may be differentiated to obtain the following linear systems of equation in the unknowns. You may use the MATLAB "\" operator to solve these.

540_Newtons method2.png

897_Newtons method3.png

The next step is to draw the free-body diagrams and write the corresponding dynamic equations. Following is the free-body diagram. Note that we are neglecting friction on the slider.

1220_Newtons method4.png

The resulting dynamics equations may be cast in matrix form as

127_Newtons method5.png

where m1 = 10 kg, m2 = 25 kg, m3 = 10 kg and I2 = m2 L2/12

1344_Newtons method6.png

929_Newtons method7.png

You may use the MATLAB cross function to obtain the above cross products. Note that the accelerations are known functions of the derivatives of the three coordinates.

Turn in a brief report containing the following:

(i) title page
(ii) introduction and objectives
(iii) program design (choices for functions)
(iv) results including plots (labeled) of simulation results for the base case

105_Newtons method8.png

(v) include a plot displaying the average value of the magnitude of the pin reaction forces over the complete cycle vs. H for the range -0.7≤H≤0.7
(vi) discussion of results including conclusion for part (v)

Code:

m.file for kinemt
function [x,v,a] = kinemt(R,L,H,theta,xo,omega,alpha)
phi = xo(1);
s = xo(2);
% constraint equations
f(1) = R*cos(theta)+L*cos(phi)-s;
f(2) = R*sin(theta)+L*sin(phi)-H;
while f*f'>1.0e-8
Jac = [-L*sin(phi) -1;
L*cos(phi) 0];
dx = -Jac\f';
phi = phi+dx(1);
s = s+dx(2);
f(1) = R*cos(theta)+L*cos(phi)-s;
f(2) = R*sin(theta)+L*sin(phi)-H;
end
x = [phi,s]';
Jac = [-L*sin(phi) -1;
L*cos(phi) 0];
rhsv = [R*sin(theta)*omega -R*cos(theta)*omega]';
v = Jac\rhsv;
rhsa = [R*cos(theta)*omega^2+L*cos(phi)*v(1)^2;
R*sin(theta)*omega^2+L*sin(phi)*v(1)^2];
a = Jac\rhsa;
m.file for loader
function [system, rhs] = loader(R,L,H,theta,x,omega,alpha,v,a,PoA);
m1 = 10;
m2 = m1*L/R;
m3 = m1;
I2 = m2*L^2/12;
g = 10;
R1 = 0.5*R*[cos(theta) sin(theta) 0]';
omega1 = [0 0 omega]';
temp1 = cross(omega1, R1);
a1 = cross(omega1, temp1);
R2 = 0.5*L*[cos(x(1)) sin(x(1)) 0]';
omega2 = [0 0 v(1)]';
alpha2 = [0 0 a(1)]';
temp2 = cross(omega2,R2);
a2 = cross(omega2,temp2)+cross(alpha2,R2)+2*a1;
a3 = [a(2) 0 0]';
system = zeros(7);
rhs = zeros(7,1);
system(1,1) = 1;
system(1,3) = 1;
rhs(1) = m1*a1(1);
system(2,2) = 1;
system(2,4) = 1;
rhs(2) = m1*(a1(2)+g);
system(3,1) = 0.5*R*sin(theta);
system(3,2) = -0.5*R*cos(theta);
system(3,3) = -system(3,1);
system(3,4) = -system(3,2);
system(3,7) = 1;
system(4,3) = -1;
system(4,5) = 1;
rhs(4) = m2*a2(1);
system(5,4) = -1;
system(5,6) = 1;
rhs(5) = m2*(a2(2)+g);
system(6,3) = -0.5*L*sin(x(1));
system(6,4) = 0.5*L*cos(x(1));
system(6,5) = system(6,3);
system(6,6) = system(6,4);
rhs(6) = I2*a(1);
system(7,5) = -1;
rhs(7) = PoA+m3*a3(1);
main m.file for project
R = 0.5;
L = 1.25;
H = 0.25;
omega = 25;
alpha = 0;
PoA = 1000;
index = 0;
for H = -0.7:0.05:0.7
H
for k = 1:721
theta(k) = (k-1)*2*pi/360;
if k == 1
xo = [0 L+R]';
else
xo = [phi(k-1) s(k-1)]';
end
[x,v,a] = kinemt(R,L,H,theta(k),xo,omega,alpha);
phi(k) = x(1);
s(k) = x(2);
phid(k) = v(1);
sd(k) = v(2);
phidd(k) = a(1);
sdd(k) = a(2);
[system,rhs] = loader(R,L,H,theta(k),x,omega,alpha,v,a,PoA);
forces = system\rhs;
torq(k) = forces(7);
pin1(k) = sqrt(forces(1)^2+forces(2)^2);
pin2(k) = sqrt(forces(3)^2+forces(4)^2);
pin3(k) = sqrt(forces(5)^2+forces(6)^2);
end
index = index+1;
HH(index) = H
p1m(index) = max(abs(pin1));
p2m(index) = max(abs(pin2));
p3m(index) = max(abs(pin3));
p1a(index) = max(abs(pin1));
p2a(index) = max(abs(pin2));
p3a(index) = max(abs(pin3));
end
plot(HH,p1m,'r',HH,p2m,'g',HH,p3m,'b')
pause
plot(HH,p1a,'r',HH,p2a,'g',HH,p3a,'b')
pause
subplot(211)
plot(theta,phi)
subplot(212)

MATLAB, Engineering

  • Category:- MATLAB
  • Reference No.:- M9744478
  • Price:- $50

Priced at Now at $50, Verified Solution

Have any Question?


Related Questions in MATLAB

Question - verify the attached paper with matlab and get

Question - Verify the attached paper with matlab and get all the results in the paper and explain step by step the matlab code. Paper - Improving Massive MIMO Belief Propagation Detector with Deep Neural Network. Attachm ...

Assignment details -need to write a code for connecting

Assignment Details - Need to write a code for connecting segments (Lines) a special case of TSP. The problem is to connect lines in 2d/ 3d space with path obstructions. Can you help me write the code for this? Hope you m ...

Assignmentq1 find the laplace transforms of the following

Assignment Q.1 Find the Laplace transforms of the following functions: (a) t 2 + at + b and (b) sin(2nΠt/T) Q.2 Find f (t) for the following F(s) = α[ f (t)]. (i) 5/(s + 3), (ii) 1/s 2 + 25, (iii) 1/s(s+1) Q.3 Find the L ...

Lab assignment - matlab matrix relationallogical operators

Lab Assignment - MATLAB Matrix, Relational/Logical Operators and Plotting This laboratory exercise/assignment will involve you 1) practicing multiplication operators in MATLAB; 2) practicing relational and logical operat ...

Suppose that you have used some concept learning algorithm

Suppose that you have used some concept learning algorithm to learn a hypothesis h1 from some training data. You are interested in knowing the accuracy that the hypothesis can be expected to achieve on the underlying pop ...

Discrete optimisation- solve the following two problems

Discrete Optimisation - Solve the following two problems with both exhaustive enumeration and branch and bound - Problem 1 is a mixed integer linear optimisation problem (the problem has both discrete and continuous vari ...

Assignment - matlab programmingusing appropriate matlab

Assignment - MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Assignment -data is given on which want to do computational

Assignment - Data is given on which want to do computational production planning using Metaheuristic MATLAB Programming: 1) Ant Colony Algorithm on both Partial and Total Flexible Problem. 2) Bee Algorithm on both Partia ...

Prepare a 3 - 10 pages long reportprepare a presentation

Prepare a 3 - 10 pages long report Prepare a presentation with 5 - 9 slides. The slides will include introduction (need and similar work), theoretical background (tested neural networks), Data, Results (Comparison of the ...

What comparison of means test was used to answer the

What comparison of means test was used to answer the question

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As