Table of Contents

Introduction & Problem Statement
While trebuchets are fairly common, the principles behind them are more complex than most people would think, particular when you include the sling. The sling is being treated as a rigid member, with the projectile acting as a downward force at the end of the link. The counterweight is acting as a downward force at the other end of the throwing arm. When the sling is included in free swinging motion, it becomes a two degree of freedom problem, and therefore a less trivial case. It also results in more beneficial data since trebuchets are basically never fired without some sort of sling to hold the projectile and allow you to impart more energy before releasing it.
The system has two cases. The first case is one in which the projectile is still sliding along the platform of the trebuchet. In this case it is a single degree of freedom system. The projectile acts as a slider, allowing a closed loop vector equation to be derived. The input in this system is the angular acceleration of the vector going from the pivot point of the throwing arm to the counterweight (theta2a_ddot). The method of one unknown length and one unknown angle is employed to solve for the unknowns in the position. As the sling moves outwards, at a certain point it will leave the chute and begin swinging freely. When the vector loop closure fails to have a solution any more, the second case comes into play.
The second case is an open system drawing its initial conditions from the last iteration of the last case. A vector position equation is drawn from ground to the projectile allowing you to solve for the velocity and acceleration of the projectile which can be very useful data when designing such a device. The angular acceleration of the sling (theta3_ddot) becomes the second input, and the matrix method is again utilized to solve for the forces and inputs. Euler numerical integration is used in both cases to advance the input or inputs through the range of motion depending on the case at a given point in time.
Vector Loop Solution Function Code
function [theta3,r1b,flag]=uk_1ang_1len_hw(r1a,r2b,r3,theta1a,theta2b,theta1b,branch)
dtr = pi/180;
c2b = cos(theta2b); s2b = sin(theta2b);
c1a = cos(theta1a); s1a = sin(theta1a);
c1b = cos(theta1b); s1b = sin(theta1b);
c3 = cos(theta3); s3 = sin(theta3);
% step1(combine known)
rkx = (r1a*c1a + r2b*c2b);
rky = (r1a*s1a + r2b*s2b);
% rk_vec = rkx + i*rky;
rk_mag = sqrt(rkx^2 + rky^2);
thetak = atan2(rky, rkx);
ck = cos(thetak); sk = sin(thetak);
% step2
a = 1;
b = 2*rk_mag*(ck*c1b + sk*s1b);
c = rk_mag^2  r3^2;
if (b^24*a*c) >= 0
% step 3
r1b = (b + branch*sqrt(b^2  4*a*c) )/(2*a);
% Step 5:
theta3 = atan2((rk_mag*sk  r1b*s1b)/r3, (rk_mag*ck  r1b*c1b)/r3);
flag=0;
else
flag=1;
theta3=NaN;r1b=NaN;
end
return;
Kinematic Equations
Vector Loop Equation
In the initial case, a vector loop equation can be written
(1)where,
(2)Taking the derivative and writing in terms of x and y
(3)Taking a second derivative and again writing in terms of x and y
(6)Vector Chain Equation from Ground to Counterweight
For both cases, a vector chain can be written from ground out to the counterweight, to find the acceleration of that mass
(9)Taking the derivative and writing in terms of x and y
(10)Taking a second derivative and again writing in terms of x and y
(13)Vector Chain Equation from Ground to Projectile
For both cases, a vector chain can be written from ground out to the projectile, to find the acceleration of that mass
(16)Taking the derivative and writing in terms of x and y
(17)Taking a second derivative and again writing in terms of x and y
(20)A constraint equation exists since there are two vectors on the fixed throwing arm
(23)Matrix Version of equations:
Case 1:
Velocity:
A1 = [r2b*s2b r3*s3 c1b 0 0 0 0;
r2b*c2b r3*c3 s1b 0 0 0 0;
0 0 0 1 0 0 0;
0 0 0 0 1 0 0;
r2b*s2b r3*s3 0 0 0 1 0;
r2b*c2b r3*c3 0 0 0 0 1;
1 0 0 0 0 0 0];
b1 = [ 0;
0;
r2a*theta2a_dot*s2a;
r2a*theta2a_dot*c2a;
0;
0;
theta2a_dot];
v1 = inv(A1)*b1;
theta2b_dot = v1(1); theta3_dot = v1(2); r1b_dot = v1(3); vm4x = v1(4); vm4y = v1(5); vmpx = v1(6); vmpy = v1(7);
Acceleration:
Since at the point of solving for the acceleration, the input or inputs are still unknown, so the coefficients are acquired so that it can be used in the force equations
A2 = [r2b*s2b r3*s3 c1b 0 0 0 0;
r2b*c2b r3*c3 s1b 0 0 0 0;
0 0 0 1 0 0 0;
0 0 0 0 1 0 0;
r2b*s2b r3*s3 0 0 0 1 0;
r2b*c2b r3*c3 0 0 0 0 1;
1 0 0 0 0 0 0];
b1 = [0;0;r2a*c2a;r2a*s2a;0;0;0]*(theta2a_dot^2);
b2 = [r2b*c2b;r2b*s2b;0;0;r2b*c2b;r2b*s2b;0]*(theta2b_dot^2);
b3 = [r3*c3;r3*s3;0;0;r3*c3;r3*s3;0]*(theta3_dot^2);
b4 = b1+b2+b3;
b5 = [0;0;r2a*s2a;r2a*c2a;0;0;1];%*theta2a_ddot;
acc_p = inv(A2)*b4;
acc_pp = inv(A2)*b5;
theta2b_ddot_p = acc_p(1); theta2b_ddot_pp = acc_pp(1);
theta3_ddot_p = acc_p(2); theta3_ddot_pp = acc_pp(2);
r1b_ddot_p = acc_p(3); r1b_ddot_pp = acc_pp(3);
am4x_p = acc_p(4); am4x_pp = acc_pp(4);
am4y_p = acc_p(5); am4y_pp = acc_pp(5);
ampx_p = acc_p(6); ampx_pp = acc_pp(6);
ampy_p = acc_p(7); ampy_pp = acc_pp(7);
Case 2:
Velocity:
A1 = [ 0 1 0 0 0;
0 0 1 0 0;
r2b*s2b 0 0 1 0;
r2b*c2b 0 0 0 1;
1 0 0 0 0];
b1 = [r2a*theta2a_dot*s2a;
r2a*theta2a_dot*c2a;
r3*theta3_dot*s3;
r3*theta3_dot*c3;
theta2a_dot];
v1 = inv(A1)*b1;
theta2b_dot = v1(1);
vm4x = v1(2);vm4y = v1(3);vmpx = v1(4);vmpy = v1(5);
Acceleration:
Since at the point of solving for the acceleration, the input or inputs are still unknown, so the coefficients are acquired so that it can be used in the force equations
A2 = [ 0 1 0 0 0;
0 0 1 0 0;
r2b*s2b 0 0 1 0;
r2b*c2b 0 0 0 1;
1 0 0 0 0];
b1 = [r2a*c2a;r2a*s2a;0;0;0]*(theta2a_dot^2);
b2 = [0;0;r2b*c2b;r2b*s2b;0]*(theta2b_dot^2);
b3 = [0;0;r3*c3;r3*s3;0]*(theta3_dot^2);
b4 = b1+b2+b3;
b5 = [r2a*s2a;r2a*c2a;0;0;1];%*theta2a_ddot
b6 = [0;0;r3*s3;r3*c3;0];%*theta3_ddot
acc_p = inv(A2)*b4; acc_pp = inv(A2)*b5; acc_ppp = inv(A2)*b6;
theta2b_ddot_p = acc_p(1); theta2b_ddot_pp = acc_pp(1); theta2b_ddot_ppp = acc_ppp(1);
am4x_p = acc_p(2); am4x_pp = acc_pp(2); am4x_ppp = acc_ppp(2);
am4y_p = acc_p(3); am4y_pp = acc_pp(3); am4y_ppp = acc_ppp(3);
ampx_p = acc_p(4); ampx_pp = acc_pp(4); ampx_ppp = acc_ppp(4);
ampy_p = acc_p(5); ampy_pp = acc_pp(5); ampy_ppp = acc_ppp(5);
Free Body Diagrams: Case 1:
Body 3:
sling and projectile (assumed as a point mass at the projectile with a massless sling)
(26)which simplifies to
(29)Body 2:
Throwing Arm (assumed to be massless with the counterweight treated as a point mass)
(30)which simplifies to
(33)Matrix Version of equations:
Case 1:
Force Equation:
A3 = [ 0 0 1 0 0 0 mp*ampx_pp 0;
0 0 0 1 0 0 mp*ampy_pp 1;
0 0 r3y r3x 0 0 0 0;
1 0 0 0 1 0 m4*am4x_pp 0;
0 1 0 0 0 1 m4*am4y_pp 0;
r2ay r2ax 0 0 r2ayr2by r2bxr2ax 0 0;
0 0 1 0 1 0 0 0;
0 0 0 1 0 1 0 0];
b1 = [mp*ampx_p;
mp*(ampy_p+g);
0;
m4*am4x_p;
m4*(am4y_p+g);
0;
0;
0];
z1 = inv(A3)*b1;
F12x = z1(1); F12y = z1(2); F23x = z1(3); F23y = z1(4); F32x = z1(5); F32y = z1(6); theta2a_ddot = z1(7); F1 = z1(8);
Free Body Diagrams: Case 2:
Equations are the same as case 1 aside from the reaction force on the projectile
Body 3:
sling and projectile (assumed as a point mass at the projectile with a massless sling)
(34)which simplifies to
(37)Body 2:
Throwing Arm (assumed to be massless with the counterweight treated as a point mass)
(38)which simplifies to
(41)Matrix Version of equations:
Case 2:
Force Equation:
A3 = [ 0 0 1 0 0 0 mp*ampx_pp mp*ampx_ppp;
0 0 0 1 0 0 mp*ampy_pp mp*ampy_ppp;
0 0 r3y r3x 0 0 0 0;
1 0 0 0 1 0 m4*am4x_pp m4*am4x_ppp;
0 1 0 0 0 1 m4*am4y_pp m4*am4y_ppp;
r2ay r2ax 0 0 r2ayr2by r2bxr2ax 0 0;
0 0 1 0 1 0 0 0;
0 0 0 1 0 1 0 0];
b1 = [ mp*ampx_p;
mp*(ampy_p+g);
0;
m4*am4x_p;
m4*(am4y_p+g);
0;
0;
0];
z1 = inv(A3)*b1;
F12x = z1(1); F12y = z1(2); F23x = z1(3); F23y = z1(4); F32x = z1(5); F32y = z1(6); theta2a_ddot = z1(7); theta3_ddot = z1(8);
Problems Encountered
The MATLAB code that I have has some issue with the acceleration. The reaction forces start out correct, but the reaction force F1 of the projectile slider on the chute decreases too fast resulting in it negatively affecting the rest of the mechanism once the reaction force has swung greatly negative.