We can model a trebuchet as a simple system of three masses on two linkages as...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
We can model a trebuchet as a simple system of three masses on two linkages as shown in the sche- matic below. We will assume that the Trebuchet is already built and has a throwing arm ₁ that is 15 Im long, and a 3 m counterweight arm (13). It has a 10,000 Kg counterweight, and the effective arm mass m₁ is 100 Kg. The initial throwing arm angle is 0₁ (t = 0) = -20° that is, the throwing arm is 20° off from being full vertical. You first have to tune the trebuchet for throwing a 50 Kg projectile. You can change the sling length, 12, and the initial sling gle, 0₂(t = 0), which can be between 0° and 180°. You can also set the trigger angle 0* = 02-0₁ at which the sling releases the projectile. 1 The function must be called trebuchetSim It must take 4 input arguments: m₂, l2, 0₂ (t = 0), and 8*, in that order and in units of kilograms, meters, and degrees (not radians). • It must output the horizontal and vertical position of the projectile relative to the axle of the throwing arm when the sling is released (u2x U2y), and the projectile's horizontal and vertical velocity, (v2x.Vzy) at this instant. These should be combined in a single array containing y = [Uzx, Uzy, v2x, V2y]. It must use ode 23 to perform the simulation. • It must use default model parameters of: m₁ = 100 Kg, m3 = 10,000 Kg. ₁ = 15 m, ₁ = 3 m, g = 9.8 m/s², and initial values for the state of the state of trebuchet of 8₁ (t = 0) = -20°, w₁(t = 0) = 0, and w₂(t = 0) = 0. It must use ode 23 to perform the simulation. It must use default model parameters of: m₁ = 100 Kg, m3 = 10,000 Kg. ₁ = 15 m, 4₁ = 3 m, g = 9.8 m/s², and initial values for the state of the state of trebuchet of 8₁ (t = 0) = -20°, w₁(t = 0) = 0, and w₂(t = 0) = 0. • It must call ode 23 with a simulation timespan of 3 s, but it must use the odeset command to set an events function that stops the simulation at the point that the sling angle relative to the throwing arm reaches its release angle, i.e. when 0₂-0₁ = 0. • It must the odeset command to set ODE solver's MaxStep option to 0.01 s. Step 2: Build a MATLAB function called projectileSim to simulate the flight of the projectile until it hits the ground. This function should use ode 23 to follow the projectile in flight until it hits the ground and then return the horizontal distance from the trebuchet's axle to where the projectile landed. We will use the trebuchet's axle as the origin of our coordinate system as the tebuchet Sim function returns the location of the projectile relative to the axle when it is released. We will also assume that ground level is 20 m below the axle. This will use the same equation of motion as used for the football simulation in Lab 8. See the bonus video that I recorded for help on how to write the projectileSim function and the accompanying lecture code. The function must have the following attributes: The function must be called projectileSim. • It must take 5 required input arguments: (1) the initial position and velocity of the projectile when it is released from the trebuchet as a single array [uzx, Uzy, Vzx. Vzy] in units of meters and meters per second, (2) the mass of the projectile m₂ in kilograms, (3) the drag coeffi- cient d in N.s²/m², (4) the gravitational acceleration g in m/s², and (5) the height of the ground relative to the axle of the trebuchet's throwing arm, h in meters. • The code must return a single output: the horizontal distance in meters from the axle to where the projectile lands. The MaxStep option of the ODE solver must be set to 0.01 s. • • The function should use odeset to set an event function to terminate the simulation when the projectile strikes the ground. • If either of the initial velocity components, 2x and v2y are negative the function should re- turn a distance of zero. If the projectile has not hit the ground after 1 minute of flight, also have the simulation stop and return zero. Step 3: Write a MATLAB function called computeRange that uses trebuchet Sim to compute the location and velocity of the projectile when it is released from the trebuchet and feeds these conditions into projectileSim to compute the distance the projectile travels. • The function must be called computeRange. • The function must take four input arguments: m₂, l₂, 0₂(t = 0), and the sling release angle * in units of kilograms, meters and degrees. The function must return a single argument: the distance in meters that the projectile travels. If either computeRange or trebuchetSim return an error, computeRange must return a distance value of zero. • • • The function must use default model parameters of: h= -20 m (the ground is 20 m below the trebuchet axle), g = 9.8 m/s², and drag parameter of d = 0.01 N.s²/m². Step 4: Write a MATLAB function called optimizeTrebuchet that optimizes 1₂. 0₂(0), and 0. for a given projectile mass m₂ to maximize the range for a given projectile mass. Your function should use MATLAB's fminsearch command, to minimize the negative of the range computed by computeRange. You should watch the plots of the trebuchet motion that are generated as fminsearch calls computeRange to see what it is doing as it explores the trebuchet design- space. Your function should have the following attributes: The function must be called optimizeTrebuchet. • The function must take wo input arguments: (1) The projectile mass m₂ in kilograms, and (2) an array containing an initial guess for [12, 02(0), 0*] in units of meters and degrees. The function must return two output arguments: (1) The maximum range, and (2) an array containing the values of [1₂, 8₂(0), 0] that achieve this range. • You should try running your optimization code starting from different initial values of [1₂, 0₂(0), 0]. Does the code always find the same optimal solution? Once you can optimize the trebuchet for a 50 Kg projectile, try changing the mass and see how that affects the optimal trebuchet setup [12. 02(0), 0]. You can also see how sensitive the range it small changes in [12, 02(0), 0*]. We can model a trebuchet as a simple system of three masses on two linkages as shown in the sche- matic below. We will assume that the Trebuchet is already built and has a throwing arm ₁ that is 15 Im long, and a 3 m counterweight arm (13). It has a 10,000 Kg counterweight, and the effective arm mass m₁ is 100 Kg. The initial throwing arm angle is 0₁ (t = 0) = -20° that is, the throwing arm is 20° off from being full vertical. You first have to tune the trebuchet for throwing a 50 Kg projectile. You can change the sling length, 12, and the initial sling gle, 0₂(t = 0), which can be between 0° and 180°. You can also set the trigger angle 0* = 02-0₁ at which the sling releases the projectile. 1 The function must be called trebuchetSim It must take 4 input arguments: m₂, l2, 0₂ (t = 0), and 8*, in that order and in units of kilograms, meters, and degrees (not radians). • It must output the horizontal and vertical position of the projectile relative to the axle of the throwing arm when the sling is released (u2x U2y), and the projectile's horizontal and vertical velocity, (v2x.Vzy) at this instant. These should be combined in a single array containing y = [Uzx, Uzy, v2x, V2y]. It must use ode 23 to perform the simulation. • It must use default model parameters of: m₁ = 100 Kg, m3 = 10,000 Kg. ₁ = 15 m, ₁ = 3 m, g = 9.8 m/s², and initial values for the state of the state of trebuchet of 8₁ (t = 0) = -20°, w₁(t = 0) = 0, and w₂(t = 0) = 0. It must use ode 23 to perform the simulation. It must use default model parameters of: m₁ = 100 Kg, m3 = 10,000 Kg. ₁ = 15 m, 4₁ = 3 m, g = 9.8 m/s², and initial values for the state of the state of trebuchet of 8₁ (t = 0) = -20°, w₁(t = 0) = 0, and w₂(t = 0) = 0. • It must call ode 23 with a simulation timespan of 3 s, but it must use the odeset command to set an events function that stops the simulation at the point that the sling angle relative to the throwing arm reaches its release angle, i.e. when 0₂-0₁ = 0. • It must the odeset command to set ODE solver's MaxStep option to 0.01 s. Step 2: Build a MATLAB function called projectileSim to simulate the flight of the projectile until it hits the ground. This function should use ode 23 to follow the projectile in flight until it hits the ground and then return the horizontal distance from the trebuchet's axle to where the projectile landed. We will use the trebuchet's axle as the origin of our coordinate system as the tebuchet Sim function returns the location of the projectile relative to the axle when it is released. We will also assume that ground level is 20 m below the axle. This will use the same equation of motion as used for the football simulation in Lab 8. See the bonus video that I recorded for help on how to write the projectileSim function and the accompanying lecture code. The function must have the following attributes: The function must be called projectileSim. • It must take 5 required input arguments: (1) the initial position and velocity of the projectile when it is released from the trebuchet as a single array [uzx, Uzy, Vzx. Vzy] in units of meters and meters per second, (2) the mass of the projectile m₂ in kilograms, (3) the drag coeffi- cient d in N.s²/m², (4) the gravitational acceleration g in m/s², and (5) the height of the ground relative to the axle of the trebuchet's throwing arm, h in meters. • The code must return a single output: the horizontal distance in meters from the axle to where the projectile lands. The MaxStep option of the ODE solver must be set to 0.01 s. • • The function should use odeset to set an event function to terminate the simulation when the projectile strikes the ground. • If either of the initial velocity components, 2x and v2y are negative the function should re- turn a distance of zero. If the projectile has not hit the ground after 1 minute of flight, also have the simulation stop and return zero. Step 3: Write a MATLAB function called computeRange that uses trebuchet Sim to compute the location and velocity of the projectile when it is released from the trebuchet and feeds these conditions into projectileSim to compute the distance the projectile travels. • The function must be called computeRange. • The function must take four input arguments: m₂, l₂, 0₂(t = 0), and the sling release angle * in units of kilograms, meters and degrees. The function must return a single argument: the distance in meters that the projectile travels. If either computeRange or trebuchetSim return an error, computeRange must return a distance value of zero. • • • The function must use default model parameters of: h= -20 m (the ground is 20 m below the trebuchet axle), g = 9.8 m/s², and drag parameter of d = 0.01 N.s²/m². Step 4: Write a MATLAB function called optimizeTrebuchet that optimizes 1₂. 0₂(0), and 0. for a given projectile mass m₂ to maximize the range for a given projectile mass. Your function should use MATLAB's fminsearch command, to minimize the negative of the range computed by computeRange. You should watch the plots of the trebuchet motion that are generated as fminsearch calls computeRange to see what it is doing as it explores the trebuchet design- space. Your function should have the following attributes: The function must be called optimizeTrebuchet. • The function must take wo input arguments: (1) The projectile mass m₂ in kilograms, and (2) an array containing an initial guess for [12, 02(0), 0*] in units of meters and degrees. The function must return two output arguments: (1) The maximum range, and (2) an array containing the values of [1₂, 8₂(0), 0] that achieve this range. • You should try running your optimization code starting from different initial values of [1₂, 0₂(0), 0]. Does the code always find the same optimal solution? Once you can optimize the trebuchet for a 50 Kg projectile, try changing the mass and see how that affects the optimal trebuchet setup [12. 02(0), 0]. You can also see how sensitive the range it small changes in [12, 02(0), 0*].
Expert Answer:
Answer rating: 100% (QA)
To accomplish the tasks outlined we will follow a stepbystep approach writing MATLAB functions as described in the problem statement Lets break down e... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these finance questions
-
The Crazy Eddie fraud may appear smaller and gentler than the massive billion-dollar frauds exposed in recent times, such as Bernie Madoffs Ponzi scheme, frauds in the subprime mortgage market, the...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
A gaseous mixture consists of 80.0 mole percent N2 and 20.0 mole percent O2 (the approximate composition of air). Suppose water is saturated with the gas mixture at 25C and 1.00 atm total pressure,...
-
How can water be brought to a boil without heating it?
-
What should be used to ensure that users understand what they can and cannot do on systems within the network? A. Acceptable use banner B. Data range checks C. Rules of behavior D. Audit trails
-
The dryer section of a paper mill consists of 30 hot, 1.5-m-diameter cylindrical rollers of length \(3 \mathrm{~m}\). A \(225^{\circ}\) arc of each roller is in contact with the moist paper sheet,...
-
For the year ended December 31, 2012, Radar Company reports the following summary payroll data. Radar Company?s payroll taxes are: FICA 8%, state unemployment 2.5% (due to a stable employment...
-
Vail Inc. manufacturers towels that are sells sold to hotels and resorts. Currently, the company has capacity to produce 600,000 towels per year; however, actual production is 520,000. Vail Inc....
-
Transfer Pricing Case AMP Industries is a multi-national firm built around batteries and the use of batteries in the automotive industry. AMP Industries is made up of two divisions, a Battery...
-
Covid 19 previously hit this local restaurant in your neighbourhood in the last two years, but this past summer people are now fully going back to food outlets and it is getting competitive!. This...
-
How many times a customer purchases will impact M&J's bottom line. Increasing the average purchases per year to 5 from 4 under this scenario increases the cumulative net present value of a customer...
-
Which of the statements is most correct regarding proper donning and doffing of PPE? Providers are expected to know how to use PPE properly prior to being hired Donning of all PPE should meet the...
-
Multiple Choice Question Based on the table, which field is likely to have the highest MRP? What Does Your Major Pay? Major Median Starting Salary Major Median Starting Salary Chemical engineering...
-
n the computation of basic earnings per share, a company will use the Blank______. Multiple choice question. year-end common shares outstanding beginning-year common shares outstanding...
-
One of the general Medicaid income and asset guidelines states that only a portion of Blank______ income from Social Security benefits, Supplemental Security Income (SSI), and veterans' benefits and...
-
What is the biggest challenge facing the book publishing industry today?
-
In Problems 1522, find the principal needed now to get each amount; that is, find the present value. To get $750 after 2 years at 2.5% compounded quarterly.
-
For each of the following situations, indicate whether the taxpayer(s) is (are) required to file a tax return for 2012. Explain your answer. a. Helen is a single taxpayer with interest income in 2012...
-
Kathy Kennedy (age 44) is a single taxpayer and she lives at 212 North Pine Way, Payson, AZ 85541. Her Social Security number is 467-98-9784. Kathy's earnings and income tax withholding as the...
-
Amy is a calendar-year taxpayer reporting on the cash basis. Please indicate how she should treat the following items for 2012: a. She makes a deductible contribution to an IRA on April 15,...
-
When managers use offers of rewards and threats of punishments to try to get others to do what they want them to do, they are using which type of power? (a) formal authority (b) position (c) referent...
-
In the research on leader behaviors, which style of leadership describes the preferred high-high combination? (a) transformational (b) transactional (c) laissez-faire (d) democratic
-
How is a person with an authoritarian personality expected to act? (a) Strong tendency to obey orders. (b) Challenges the authority of others. (c) Tries to play down status differences. (d) Always...
Study smarter with the SolutionInn App