1. Math
2. Advanced Math
3. matlab question computer science mathematical computing in the engineering...

# Question: matlab question computer science mathematical computing in the engineering...

###### Question details

MATLAB QUESTION

(COMPUTER SCIENCE / MATHEMATICAL COMPUTING)

In the engineering industry, a four-bar linkage is often used in pump-jacks, foot-operated machines i.e. lathe machines, gear shift linkages and steam engines and locomotives. The mechanism consists of four links connected in a loop by four joints. A diagram of the mechanism is shown below. The first link, π, is the input link (crank). The second link, π, is a coupler link. The third link, π is the output link. The fourth link, π, is the fixed link (ground).

The angular position of the output link (π4) of a four-bar linkage corresponding to the angular position

of the input link (π2) can be computed using the Freudensteinβs equation:

The length of the links are as follow: π = 1 unit, π = 2 units, π = 4 units, and π = 5 units. The following parameters can be used for root finding:
π₯π = 120Β°, π₯πβ1 = 110Β°, πΏ = 0.01, ππππππ πππ = 0.001

PART A

Find the value of π½π for π½π = ππΒ° using any open root finding method.
Subsequently, create a stick figure image of the four-bar linkage when π2 = 60Β° with the following specifications:

• - Link π

• - Link π

• - Link π

Line specification: Blue solid line with thickness of 8. Line specification: Green solid line with thickness of 8. Line specification: Red solid line with thickness of 8.

Axes ranges should be set to the same axes ranges shown in the picture below. Ensure that the grid is turned on.

PART B

Find the values of π4 for π2 = 0: 1: 360Β° using any open root finding method of your choice. You can monitor the outputs of all iterations to help you choose a suitable root finding method. In a new figure, plot a graph of output angle versus input angle using red asterisks.

PART C

Animate the stick figure created in Part A In a new figure window, use the calculated values of π4 from Q1b to show an animation of one complete revolution (for π2 = 0 to 360Β°). Ensure that all links are moving in a logical manner where the length of π, π and π are constant and cannot be changed. Axes ranges should be set to the same axes ranges in Q1a. Ensure that the grid is turned on. The current π½π value should be stated in the title.

The following MATLAB functions: plot() and pause() will need to be used.

To achieve an animation effect, the coordinates of links quickly will need to be updated quickly. A pause of 0.01 seconds is recommended.
The stick figure animation should look like the following (at the respective instances):