You are on page 1of 28

Kuwait University

College of Engineering and Petroleum


Mechanical Engineering Department
ME 311 Theory of Machines

Dr. Khaled Al-Ghanem

Project
Design of a Linkage Mechanism

Nayef Nazih Ftouni


206216827

Contents
List of Figures ................................................................................................................................................ 3
List of Tables ................................................................................................................................................. 4
Results ........................................................................................................................................................... 5
Discussion ..................................................................................................................................................... 9
Trails and results ......................................................................................................................................... 10
Appendix ..................................................................................................................................................... 15

List of Figures
Figure 1: Linkage mechanism ....................................................................................................................... 5
Figure 2: Distance x vs. angle theta ............................................................................................................. 6
Figure 3: Speed x' vs. angle theta ................................................................................................................ 6
Figure 4: Angle phi vs. angle theta............................................................................................................... 7
Figure 5: Angular velocity vs. angle theta ................................................................................................... 7
Figure 6: First iteration ............................................................................................................................... 10
Figure 7: Second iteration .......................................................................................................................... 10
Figure 8: Third iteration ............................................................................................................................. 11
Figure 9: Last iteration ............................................................................................................................... 13

List of Tables
Table 1: Results from Matlab ..................................................................................................................... 15

Results
Degree of freedom = 1
For:

= 5[. ]

= 20[. ]

= 30[. ]

= 1 [/]

Starting from initial position = 0

Initial angle = 50.4

Initial distance = 49.6 [. ]

Figure 1: Linkage mechanism

Displacement equations:

cos + cos ( + ) = 0
3

sin + sin ( + ) = 0
3
cos + cos + cos = 0
sin + sin sin = 0
Velocity equations:

sin sin ( + ) = 0
3

cos + cos ( + ) = 0
3
sin sin sin = 0
cos + cos cos = 0

Figure 2: Distance x vs. angle theta

Figure 3: Speed x' vs. angle theta

Figure 4: Angle phi vs. angle theta

Figure 5: Angular velocity vs. angle theta

The minimum length L for which the stroke of the slider in no less that 42 cm, and angle
is within 35 is L = 43.587 cm.
L to the nearest centimeter = 44 cm.

Discussion
The design specifications for length L are as follows:

Stroke of the slider no less than 42 cm.

The angle is within 35.

The minimum length L that meets the design specifications is L = 43.587 cm.
From figure (2), the maximum displacement = 79.006 cm. at angle theta = 330
And the displacement = 32.735 cm. at angle theta = 146
The stroke of the slider
= = 46.271 .

Theta forward equals to = 184 and the time ratio = 360


= 1.045

From figure (3) the slider speed equals to zero when the slider displacement reaches its
maximum and minimum value. The average forward speed of the slider
= 14.295 [/]
and the average backward speed of the slider
= 15.063 [/]

From figure (4) the maximum angle = 34.999 at angle theta = 210 and = 330
and the minimum angle = 13.263 at angle theta = 90

From figure (5) the angular velocity equals to zero when the angle reaches its maximum and
minimum value.

Trails and results


First of all I started to calculate the range of the minimum L that satisfy the design
specification by using Matlab with range of L starts from 1 to 50 with increment of 1 as shown
in figure

Figure 6: First iteration

And the results as follows


L=
44
45
46
47
48
49
50
As indication that range of minimum L is around 44 cm. Then I use the same code but
with more accurate results by shrinking the range of L between 40 and 45 with increment of 0.1
as shown in figure

Figure 7: Second iteration

10

L=
43.6
43.7
43.8
43.9
44
44.1
44.2
44.3
44.4
44.5
44.6
44.7
44.8
44.9
45
From the second results the minimum L that satisfy the design specifications changed
from 44 cm to 43.6. Starting from 40 till 45 with increment of 0.1 and the result was 43.6 thats
shrink the next iteration range between 43 and 44 with increment of 0.01 to obtain more accurate
results as shown in figure

Figure 8: Third iteration

11

L=
43.59
43.6
43.61
43.62
43.63
43.64
43.65
43.66
43.67
43.68
43.69
43.7
43.71
43.72
43.73
43.74
43.75
43.76
43.77
43.78
43.79
43.8
43.81
43.82
43.83
43.84
43.85
12

43.86
43.87
43.88
43.89
43.9
43.91
43.92
43.93
43.94
43.95
43.96
43.97
43.98
43.99
44

From the third iteration the result for minimum length of link L is 43.59 cm.
To obtain more accurate result again shrink the range between 43.58 and 43.59 with increment of
0.001 as shown in figure

Figure 9: Last iteration

13

The results were as follows


L=
43.587
43.588
43.589
43.59
So the minimum length of link L that satisfy the design specification is 43.587 cm.

14

Appendix
Table 1: Results from Matlab

Theta
()
[Deg]

Psi ()
[Deg]

Phi ()
[Deg]

Distance
x [cm]

Distance
y [cm]

Psi dot
[Rad/s]

Phi dot
[Rad/s]

Slider Speed
[cm/s]

Joint speed
inside the
slot [cm/s]

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

-50.406
-51.081
-51.755
-52.428
-53.099
-53.768
-54.435
-55.1
-55.763
-56.424
-57.082
-57.738
-58.392
-59.043
-59.691
-60.337
-60.979
-61.619
-62.255
-62.888
-63.517
-64.143
-64.765
-65.383
-65.998
-66.608
-67.214
-67.816
-68.413
-69.006
-69.594
-70.177
-70.755
-71.328

-32.031
-31.837
-31.637
-31.433
-31.224
-31.01
-30.792
-30.569
-30.341
-30.11
-29.874
-29.635
-29.392
-29.145
-28.895
-28.641
-28.384
-28.125
-27.863
-27.598
-27.33
-27.061
-26.789
-26.515
-26.24
-25.963
-25.685
-25.405
-25.124
-24.843
-24.561
-24.278
-23.995
-23.712

76.072
75.873
75.668
75.456
75.238
75.013
74.782
74.545
74.301
74.051
73.794
73.532
73.263
72.988
72.707
72.419
72.126
71.827
71.521
71.21
70.893
70.571
70.243
69.909
69.569
69.225
68.875
68.52
68.159
67.794
67.424
67.049
66.669
66.285

49.58
49.634
49.678
49.711
49.734
49.747
49.749
49.741
49.723
49.695
49.657
49.609
49.551
49.483
49.405
49.318
49.221
49.114
48.998
48.872
48.737
48.593
48.44
48.278
48.107
47.927
47.738
47.541
47.336
47.123
46.901
46.671
46.434
46.189

-0.67612
-0.67472
-0.67322
-0.67161
-0.6699
-0.66808
-0.66615
-0.66412
-0.66199
-0.65974
-0.65739
-0.65493
-0.65236
-0.64967
-0.64687
-0.64396
-0.64093
-0.63779
-0.63453
-0.63115
-0.62764
-0.62402
-0.62027
-0.61639
-0.61238
-0.60825
-0.60398
-0.59957
-0.59504
-0.59036
-0.58554
-0.58058
-0.57547
-0.57022

0.19139
0.19662
0.20172
0.20669
0.21153
0.21623
0.22078
0.2252
0.22947
0.23359
0.23756
0.24138
0.24504
0.24855
0.25189
0.25508
0.2581
0.26095
0.26364
0.26616
0.26851
0.27069
0.2727
0.27454
0.27619
0.27768
0.27898
0.28011
0.28106
0.28183
0.28241
0.28282
0.28304
0.28307

-11.206
-11.577
-11.948
-12.318
-12.687
-13.054
-13.421
-13.786
-14.149
-14.511
-14.871
-15.228
-15.584
-15.937
-16.287
-16.634
-16.979
-17.32
-17.657
-17.991
-18.321
-18.646
-18.967
-19.284
-19.595
-19.901
-20.202
-20.498
-20.787
-21.07
-21.347
-21.618
-21.881
-22.137

3.3806
2.7891
2.1982
1.6083
1.0198
0.43274
-0.15244
-0.73549
-1.3161
-1.8941
-2.4691
-3.0409
-3.6091
-4.1735
-4.7339
-5.29
-5.8414
-6.3879
-6.9293
-7.4653
-7.9955
-8.5198
-9.0379
-9.5495
-10.054
-10.552
-11.043
-11.526
-12.001
-12.469
-12.928
-13.378
-13.82
-14.253

15

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

-71.896
-72.458
-73.014
-73.565
-74.109
-74.648
-75.18
-75.706
-76.226
-76.738
-77.244
-77.742
-78.234
-78.718
-79.194
-79.662
-80.123
-80.575
-81.019
-81.454
-81.881
-82.299
-82.707
-83.107
-83.497
-83.877
-84.248
-84.608
-84.959
-85.299
-85.628
-85.947
-86.255
-86.552
-86.837
-87.111
-87.374
-87.625
-87.864
-88.091
-88.306

-23.429
-23.146
-22.864
-22.582
-22.301
-22.021
-21.743
-21.465
-21.189
-20.915
-20.643
-20.373
-20.105
-19.84
-19.577
-19.318
-19.061
-18.808
-18.558
-18.311
-18.069
-17.83
-17.596
-17.366
-17.141
-16.92
-16.704
-16.494
-16.288
-16.089
-15.894
-15.706
-15.523
-15.347
-15.176
-15.012
-14.855
-14.704
-14.561
-14.424
-14.294

65.897
65.504
65.107
64.706
64.301
63.892
63.48
63.065
62.646
62.224
61.799
61.372
60.942
60.509
60.075
59.638
59.199
58.759
58.317
57.874
57.43
56.985
56.54
56.093
55.647
55.201
54.754
54.309
53.863
53.419
52.975
52.532
52.091
51.652
51.214
50.779
50.345
49.914
49.486
49.06
48.637

45.936
45.677
45.41
45.136
44.855
44.568
44.274
43.974
43.668
43.356
43.038
42.715
42.387
42.053
41.715
41.372
41.025
40.673
40.317
39.958
39.595
39.228
38.859
38.486
38.111
37.733
37.353
36.971
36.588
36.203
35.816
35.428
35.04
34.651
34.261
33.871
33.481
33.091
32.702
32.314
31.926

-0.56482
-0.55927
-0.55356
-0.5477
-0.54168
-0.5355
-0.52916
-0.52265
-0.51598
-0.50914
-0.50213
-0.49495
-0.48759
-0.48005
-0.47234
-0.46445
-0.45638
-0.44813
-0.4397
-0.43108
-0.42228
-0.41329
-0.40412
-0.39476
-0.38522
-0.3755
-0.36559
-0.35549
-0.34522
-0.33477
-0.32414
-0.31333
-0.30235
-0.2912
-0.27988
-0.2684
-0.25676
-0.24497
-0.23303
-0.22094
-0.20871
16

0.28293
0.28259
0.28208
0.28137
0.28048
0.2794
0.27813
0.27668
0.27503
0.2732
0.27117
0.26896
0.26655
0.26396
0.26118
0.25821
0.25504
0.25169
0.24816
0.24443
0.24052
0.23642
0.23214
0.22768
0.22303
0.21821
0.2132
0.20803
0.20267
0.19715
0.19146
0.18561
0.17959
0.17342
0.16709
0.16061
0.15399
0.14722
0.14032
0.13329
0.12613

-22.386
-22.628
-22.861
-23.086
-23.303
-23.512
-23.712
-23.902
-24.084
-24.256
-24.418
-24.571
-24.713
-24.846
-24.967
-25.079
-25.179
-25.269
-25.347
-25.414
-25.47
-25.515
-25.547
-25.569
-25.578
-25.576
-25.562
-25.536
-25.498
-25.448
-25.386
-25.313
-25.227
-25.13
-25.021
-24.9
-24.768
-24.624
-24.469
-24.303
-24.127

-14.677
-15.091
-15.495
-15.89
-16.275
-16.649
-17.013
-17.366
-17.708
-18.039
-18.359
-18.667
-18.964
-19.249
-19.522
-19.782
-20.031
-20.268
-20.491
-20.703
-20.902
-21.088
-21.261
-21.421
-21.569
-21.703
-21.825
-21.933
-22.029
-22.112
-22.182
-22.239
-22.283
-22.315
-22.334
-22.341
-22.336
-22.318
-22.288
-22.247
-22.194

75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115

-88.508
-88.698
-88.876
-89.041
-89.193
-89.332
-89.458
-89.572
-89.672
-89.759
-89.832
-89.893
-89.94
-89.973
-89.993
-90
-89.993
-89.973
-89.94
-89.893
-89.832
-89.759
-89.672
-89.572
-89.458
-89.332
-89.193
-89.041
-88.876
-88.698
-88.508
-88.306
-88.091
-87.864
-87.625
-87.374
-87.111
-86.837
-86.552
-86.255
-85.947

-14.172
-14.056
-13.949
-13.849
-13.756
-13.671
-13.594
-13.525
-13.464
-13.411
-13.366
-13.329
-13.3
-13.28
-13.267
-13.263
-13.267
-13.28
-13.3
-13.329
-13.366
-13.411
-13.464
-13.525
-13.594
-13.671
-13.756
-13.849
-13.949
-14.056
-14.172
-14.294
-14.424
-14.561
-14.704
-14.855
-15.012
-15.176
-15.347
-15.523
-15.706

48.218
47.802
47.389
46.98
46.576
46.175
45.778
45.386
44.998
44.615
44.237
43.864
43.496
43.134
42.776
42.424
42.078
41.738
41.403
41.074
40.751
40.434
40.124
39.819
39.521
39.229
38.943
38.664
38.391
38.125
37.865
37.612
37.365
37.125
36.891
36.664
36.444
36.23
36.023
35.822
35.628

31.539
31.153
30.769
30.386
30.006
29.627
29.25
28.876
28.504
28.134
27.768
27.404
27.043
26.686
26.332
25.981
25.633
25.29
24.95
24.614
24.281
23.953
23.629
23.309
22.993
22.681
22.373
22.07
21.771
21.476
21.186
20.9
20.619
20.341
20.069
19.8
19.536
19.277
19.021
18.77
18.524

-0.19635
-0.18387
-0.17126
-0.15854
-0.14571
-0.13279
-0.11978
-0.10668
-0.093507
-0.080272
-0.06698
-0.053641
-0.040264
-0.026858
-0.013434
1.39E-16
0.013434
0.026858
0.040264
0.053641
0.06698
0.080272
0.093507
0.10668
0.11978
0.13279
0.14571
0.15854
0.17126
0.18387
0.19635
0.20871
0.22094
0.23303
0.24497
0.25676
0.2684
0.27988
0.2912
0.30235
0.31333
17

0.11886
0.11147
0.10397
0.096375
0.088684
0.080906
0.073048
0.065117
0.057121
0.049068
0.040966
0.032823
0.024646
0.016445
0.0082266
5.17E-25
-0.0082266
-0.016445
-0.024646
-0.032823
-0.040966
-0.049068
-0.057121
-0.065117
-0.073048
-0.080906
-0.088684
-0.096375
-0.10397
-0.11147
-0.11886
-0.12613
-0.13329
-0.14032
-0.14722
-0.15399
-0.16061
-0.16709
-0.17342
-0.17959
-0.18561

-23.939
-23.74
-23.532
-23.313
-23.084
-22.846
-22.598
-22.342
-22.076
-21.803
-21.52
-21.231
-20.933
-20.629
-20.318
-20
-19.676
-19.347
-19.012
-18.672
-18.327
-17.978
-17.625
-17.269
-16.909
-16.546
-16.181
-15.813
-15.443
-15.071
-14.698
-14.324
-13.949
-13.573
-13.196
-12.82
-12.443
-12.067
-11.69
-11.315
-10.94

-22.13
-22.055
-21.969
-21.872
-21.765
-21.648
-21.521
-21.385
-21.24
-21.086
-20.923
-20.753
-20.575
-20.39
-20.198
-20
-19.795
-19.585
-19.37
-19.149
-18.924
-18.695
-18.462
-18.226
-17.987
-17.745
-17.5
-17.254
-17.006
-16.757
-16.507
-16.256
-16.005
-15.754
-15.503
-15.252
-15.002
-14.753
-14.505
-14.258
-14.013

116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156

-85.628
-85.299
-84.959
-84.608
-84.248
-83.877
-83.497
-83.107
-82.707
-82.299
-81.881
-81.454
-81.019
-80.575
-80.123
-79.662
-79.194
-78.718
-78.234
-77.742
-77.244
-76.738
-76.226
-75.706
-75.18
-74.648
-74.109
-73.565
-73.014
-72.458
-71.896
-71.328
-70.755
-70.177
-69.594
-69.006
-68.413
-67.816
-67.214
-66.608
-65.998

-15.894
-16.089
-16.288
-16.494
-16.704
-16.92
-17.141
-17.366
-17.596
-17.83
-18.069
-18.311
-18.558
-18.808
-19.061
-19.318
-19.577
-19.84
-20.105
-20.373
-20.643
-20.915
-21.189
-21.465
-21.743
-22.021
-22.301
-22.582
-22.864
-23.146
-23.429
-23.712
-23.995
-24.278
-24.561
-24.843
-25.124
-25.405
-25.685
-25.963
-26.24

35.44
35.259
35.084
34.916
34.754
34.599
34.45
34.308
34.172
34.042
33.919
33.802
33.691
33.586
33.488
33.395
33.309
33.229
33.155
33.088
33.026
32.97
32.92
32.876
32.839
32.807
32.781
32.76
32.746
32.738
32.735
32.738
32.747
32.762
32.783
32.809
32.841
32.879
32.923
32.972
33.028

18.281
18.043
17.809
17.579
17.353
17.132
16.914
16.7
16.491
16.285
16.083
15.885
15.691
15.5
15.313
15.13
14.95
14.773
14.6
14.431
14.265
14.102
13.942
13.786
13.632
13.482
13.335
13.19
13.049
12.911
12.775
12.642
12.512
12.385
12.26
12.138
12.018
11.901
11.787
11.675
11.565

0.32414
0.33477
0.34522
0.35549
0.36559
0.3755
0.38522
0.39476
0.40412
0.41329
0.42228
0.43108
0.4397
0.44813
0.45638
0.46445
0.47234
0.48005
0.48759
0.49495
0.50213
0.50914
0.51598
0.52265
0.52916
0.5355
0.54168
0.5477
0.55356
0.55927
0.56482
0.57022
0.57547
0.58058
0.58554
0.59036
0.59504
0.59957
0.60398
0.60825
0.61238
18

-0.19146
-0.19715
-0.20267
-0.20803
-0.2132
-0.21821
-0.22303
-0.22768
-0.23214
-0.23642
-0.24052
-0.24443
-0.24816
-0.25169
-0.25504
-0.25821
-0.26118
-0.26396
-0.26655
-0.26896
-0.27117
-0.2732
-0.27503
-0.27668
-0.27813
-0.2794
-0.28048
-0.28137
-0.28208
-0.28259
-0.28293
-0.28307
-0.28304
-0.28282
-0.28241
-0.28183
-0.28106
-0.28011
-0.27898
-0.27768
-0.27619

-10.566
-10.192
-9.8201
-9.449
-9.0793
-8.7108
-8.3438
-7.9782
-7.6141
-7.2515
-6.8906
-6.5312
-6.1734
-5.8173
-5.4627
-5.1098
-4.7584
-4.4086
-4.0602
-3.7134
-3.368
-3.024
-2.6813
-2.3399
-1.9998
-1.6608
-1.323
-0.9862
-0.6504
-0.31552
0.018498
0.35172
0.68422
1.0161
1.3473
1.678
2.0082
2.338
2.6675
2.9967
3.3256

-13.77
-13.528
-13.289
-13.051
-12.816
-12.584
-12.353
-12.126
-11.901
-11.679
-11.459
-11.243
-11.029
-10.818
-10.611
-10.406
-10.204
-10.006
-9.8099
-9.6173
-9.4276
-9.241
-9.0573
-8.8766
-8.6988
-8.5239
-8.3518
-8.1825
-8.016
-7.8522
-7.6911
-7.5326
-7.3767
-7.2232
-7.0723
-6.9238
-6.7776
-6.6337
-6.492
-6.3525
-6.2151

157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197

-65.383
-64.765
-64.143
-63.517
-62.888
-62.255
-61.619
-60.979
-60.337
-59.691
-59.043
-58.392
-57.738
-57.082
-56.424
-55.763
-55.1
-54.435
-53.768
-53.099
-52.428
-51.755
-51.081
-50.406
-49.729
-49.051
-48.372
-47.692
-47.011
-46.329
-45.646
-44.963
-44.279
-43.595
-42.91
-42.225
-41.541
-40.856
-40.171
-39.487
-38.803

-26.515
-26.789
-27.061
-27.33
-27.598
-27.863
-28.125
-28.384
-28.641
-28.895
-29.145
-29.392
-29.635
-29.874
-30.11
-30.341
-30.569
-30.792
-31.01
-31.224
-31.433
-31.637
-31.837
-32.031
-32.219
-32.403
-32.581
-32.753
-32.919
-33.08
-33.234
-33.383
-33.525
-33.661
-33.791
-33.915
-34.032
-34.142
-34.246
-34.343
-34.434

33.089
33.155
33.228
33.306
33.389
33.479
33.574
33.675
33.782
33.895
34.013
34.137
34.267
34.402
34.543
34.69
34.843
35.001
35.165
35.335
35.511
35.692
35.879
36.072
36.27
36.474
36.684
36.9
37.121
37.347
37.58
37.817
38.061
38.31
38.564
38.824
39.089
39.36
39.635
39.916
40.203

11.458
11.353
11.25
11.15
11.052
10.956
10.862
10.77
10.681
10.594
10.508
10.425
10.344
10.265
10.188
10.113
10.039
9.9681
9.8988
9.8313
9.7658
9.7021
9.6403
9.5804
9.5223
9.4661
9.4117
9.3592
9.3085
9.2596
9.2125
9.1673
9.124
9.0825
9.0428
9.005
8.969
8.935
8.9028
8.8725
8.8441

0.61639
0.62027
0.62402
0.62764
0.63115
0.63453
0.63779
0.64093
0.64396
0.64687
0.64967
0.65236
0.65493
0.65739
0.65974
0.66199
0.66412
0.66615
0.66808
0.6699
0.67161
0.67322
0.67472
0.67612
0.67742
0.67861
0.6797
0.68069
0.68157
0.68235
0.68302
0.68359
0.68405
0.6844
0.68465
0.68479
0.68482
0.68473
0.68454
0.68423
0.6838
19

-0.27454
-0.2727
-0.27069
-0.26851
-0.26616
-0.26364
-0.26095
-0.2581
-0.25508
-0.25189
-0.24855
-0.24504
-0.24138
-0.23756
-0.23359
-0.22947
-0.2252
-0.22078
-0.21623
-0.21153
-0.20669
-0.20172
-0.19662
-0.19139
-0.18604
-0.18057
-0.17499
-0.16929
-0.16349
-0.15758
-0.15158
-0.14548
-0.13929
-0.13303
-0.12668
-0.12027
-0.11379
-0.10724
-0.10065
-0.094008
-0.087325

3.6543
3.9829
4.3113
4.6397
4.9681
5.2964
5.6248
5.9532
6.2816
6.6102
6.9388
7.2674
7.5961
7.9249
8.2536
8.5824
8.911
9.2396
9.5681
9.8963
10.224
10.552
10.879
11.206
11.532
11.857
12.181
12.505
12.827
13.148
13.468
13.786
14.102
14.417
14.729
15.04
15.347
15.653
15.955
16.254
16.55

-6.0797
-5.9463
-5.8149
-5.6853
-5.5575
-5.4314
-5.3069
-5.1841
-5.0628
-4.9429
-4.8245
-4.7074
-4.5915
-4.4768
-4.3633
-4.2508
-4.1393
-4.0287
-3.919
-3.81
-3.7018
-3.5942
-3.4872
-3.3806
-3.2745
-3.1687
-3.0633
-2.958
-2.8528
-2.7477
-2.6425
-2.5372
-2.4317
-2.326
-2.2198
-2.1132
-2.0061
-1.8983
-1.7897
-1.6804
-1.5701

198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238

-38.119
-37.436
-36.754
-36.073
-35.392
-34.713
-34.035
-33.358
-32.683
-32.009
-31.338
-30.668
-30
-29.334
-28.671
-28.011
-27.353
-26.698
-26.046
-25.398
-24.753
-24.111
-23.474
-22.84
-22.211
-21.587
-20.967
-20.352
-19.742
-19.138
-18.54
-17.948
-17.362
-16.783
-16.211
-15.646
-15.089
-14.539
-13.998
-13.466
-12.943

-34.518
-34.595
-34.666
-34.73
-34.786
-34.837
-34.88
-34.917
-34.946
-34.97
-34.986
-34.996
-34.999
-34.996
-34.986
-34.97
-34.948
-34.919
-34.885
-34.844
-34.798
-34.746
-34.688
-34.625
-34.556
-34.483
-34.404
-34.321
-34.233
-34.141
-34.045
-33.945
-33.841
-33.734
-33.623
-33.51
-33.394
-33.275
-33.154
-33.032
-32.908

40.494
40.791
41.092
41.399
41.71
42.026
42.347
42.672
43.002
43.336
43.675
44.018
44.365
44.716
45.071
45.43
45.792
46.158
46.527
46.9
47.276
47.655
48.036
48.421
48.808
49.197
49.589
49.983
50.379
50.777
51.177
51.578
51.98
52.384
52.789
53.195
53.601
54.008
54.416
54.824
55.233

8.8177
8.7932
8.7707
8.7502
8.7317
8.7153
8.7009
8.6887
8.6785
8.6706
8.6649
8.6614
8.6603
8.6614
8.665
8.671
8.6795
8.6906
8.7043
8.7207
8.7398
8.7618
8.7866
8.8144
8.8453
8.8793
8.9166
8.9572
9.0012
9.0488
9.0999
9.1549
9.2137
9.2765
9.3435
9.4147
9.4903
9.5705
9.6553
9.745
9.8397

0.68326
0.6826
0.68181
0.6809
0.67987
0.6787
0.67741
0.67598
0.67441
0.67269
0.67084
0.66883
0.66667
0.66435
0.66187
0.65922
0.6564
0.6534
0.65021
0.64684
0.64327
0.6395
0.63552
0.63133
0.62691
0.62226
0.61737
0.61223
0.60684
0.60118
0.59524
0.58903
0.58251
0.5757
0.56856
0.56111
0.55331
0.54517
0.53667
0.52781
0.51856
20

-0.080609
-0.073865
-0.067102
-0.060325
-0.053543
-0.046762
-0.039991
-0.033237
-0.026507
-0.019811
-0.013156
-0.0065491
-2.39E-10
0.0064834
0.012893
0.019219
0.025455
0.03159
0.037617
0.043527
0.04931
0.054959
0.060463
0.065814
0.071004
0.076023
0.080862
0.085511
0.089963
0.094208
0.098237
0.10204
0.10561
0.10894
0.11201
0.11483
0.11738
0.11964
0.12163
0.12331
0.1247

16.843
17.131
17.416
17.697
17.973
18.245
18.512
18.774
19.031
19.282
19.527
19.767
20
20.227
20.447
20.661
20.867
21.067
21.259
21.443
21.62
21.789
21.95
22.103
22.248
22.384
22.512
22.631
22.742
22.845
22.938
23.023
23.099
23.167
23.226
23.276
23.317
23.35
23.375
23.391
23.398

-1.4587
-1.3463
-1.2325
-1.1174
-1.0009
-0.88271
-0.76283
-0.64111
-0.5174
-0.39158
-0.2635
-0.13303
9.83E-09
0.13574
0.27434
0.41599
0.56084
0.70909
0.86092
1.0165
1.1761
1.3399
1.508
1.6808
1.8584
2.0411
2.2291
2.4227
2.6222
2.8277
3.0396
3.2582
3.4837
3.7164
3.9567
4.2048
4.461
4.7256
4.9989
5.2812
5.5729

239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279

-12.429
-11.925
-11.432
-10.949
-10.477
-10.016
-9.5678
-9.1317
-8.7086
-8.2988
-7.9028
-7.5212
-7.1543
-6.8026
-6.4666
-6.1469
-5.8437
-5.5577
-5.2892
-5.0386
-4.8065
-4.5931
-4.3988
-4.224
-4.0689
-3.934
-3.8194
-3.7253
-3.6519
-3.5994
-3.5678
-3.5573
-3.5678
-3.5994
-3.6519
-3.7253
-3.8194
-3.934
-4.0689
-4.224
-4.3988

-32.783
-32.656
-32.53
-32.403
-32.276
-32.149
-32.023
-31.898
-31.775
-31.654
-31.534
-31.418
-31.304
-31.193
-31.086
-30.982
-30.884
-30.789
-30.7
-30.616
-30.537
-30.464
-30.397
-30.337
-30.283
-30.236
-30.196
-30.162
-30.137
-30.118
-30.107
-30.103
-30.107
-30.118
-30.137
-30.162
-30.196
-30.236
-30.283
-30.337
-30.397

55.641
56.049
56.457
56.865
57.272
57.679
58.085
58.49
58.894
59.297
59.698
60.098
60.497
60.894
61.289
61.683
62.075
62.464
62.852
63.237
63.62
64
64.378
64.754
65.126
65.496
65.863
66.227
66.588
66.945
67.3
67.65
67.998
68.341
68.681
69.017
69.349
69.677
70.001
70.321
70.636

9.9396
10.045
10.156
10.272
10.394
10.523
10.657
10.798
10.946
11.101
11.262
11.431
11.608
11.791
11.983
12.183
12.391
12.607
12.832
13.066
13.308
13.559
13.82
14.089
14.368
14.657
14.954
15.261
15.578
15.903
16.239
16.583
16.937
17.299
17.671
18.051
18.44
18.838
19.243
19.656
20.077

0.50892
0.49888
0.48843
0.47756
0.46625
0.4545
0.44231
0.42966
0.41654
0.40296
0.3889
0.37437
0.35937
0.34389
0.32794
0.31153
0.29466
0.27734
0.25959
0.24142
0.22285
0.2039
0.1846
0.16497
0.14503
0.12483
0.1044
0.08376
0.062963
0.042044
0.021043
0
-0.021043
-0.042044
-0.062963
-0.08376
-0.1044
-0.12483
-0.14503
-0.16497
-0.1846
21

0.12578
0.12654
0.12697
0.12708
0.12684
0.12627
0.12535
0.12408
0.12246
0.12048
0.11814
0.11544
0.11239
0.10899
0.10524
0.10114
0.096706
0.091945
0.086866
0.081482
0.075807
0.069857
0.063651
0.057208
0.050549
0.043698
0.036678
0.029517
0.02224
0.014875
0.0074524
0
-0.0074524
-0.014875
-0.02224
-0.029517
-0.036678
-0.043698
-0.050549
-0.057208
-0.063651

23.398
23.389
23.373
23.348
23.316
23.276
23.229
23.174
23.113
23.044
22.969
22.887
22.798
22.704
22.602
22.495
22.382
22.263
22.138
22.008
21.872
21.73
21.582
21.429
21.271
21.106
20.937
20.761
20.58
20.392
20.199
20
19.795
19.583
19.366
19.142
18.911
18.674
18.431
18.181
17.925

5.8741
6.1852
6.5064
6.838
7.1802
7.5333
7.8973
8.2724
8.6589
9.0566
9.4657
9.8861
10.318
10.76
11.214
11.678
12.153
12.637
13.131
13.633
14.143
14.661
15.184
15.713
16.247
16.783
17.322
17.861
18.4
18.937
19.471
20
20.523
21.038
21.545
22.041
22.526
22.998
23.455
23.897
24.323

280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320

-4.5931
-4.8065
-5.0386
-5.2892
-5.5577
-5.8437
-6.1469
-6.4666
-6.8026
-7.1543
-7.5212
-7.9028
-8.2988
-8.7086
-9.1317
-9.5678
-10.016
-10.477
-10.949
-11.432
-11.925
-12.429
-12.943
-13.466
-13.998
-14.539
-15.089
-15.646
-16.211
-16.783
-17.362
-17.948
-18.54
-19.138
-19.742
-20.352
-20.967
-21.587
-22.211
-22.84
-23.474

-30.464
-30.537
-30.616
-30.7
-30.789
-30.884
-30.982
-31.086
-31.193
-31.304
-31.418
-31.534
-31.654
-31.775
-31.898
-32.023
-32.149
-32.276
-32.403
-32.53
-32.656
-32.783
-32.908
-33.032
-33.154
-33.275
-33.394
-33.51
-33.623
-33.734
-33.841
-33.945
-34.045
-34.141
-34.233
-34.321
-34.404
-34.483
-34.556
-34.625
-34.688

70.946
71.252
71.553
71.85
72.141
72.427
72.708
72.984
73.255
73.52
73.779
74.033
74.281
74.523
74.759
74.99
75.214
75.432
75.644
75.85
76.049
76.243
76.429
76.61
76.784
76.952
77.113
77.267
77.415
77.557
77.692
77.82
77.942
78.057
78.166
78.267
78.363
78.452
78.534
78.609
78.678

20.505
20.94
21.382
21.83
22.284
22.744
23.208
23.678
24.152
24.63
25.112
25.597
26.085
26.575
27.068
27.562
28.058
28.554
29.051
29.548
30.045
30.541
31.036
31.531
32.023
32.514
33.002
33.487
33.97
34.449
34.925
35.397
35.865
36.329
36.788
37.241
37.69
38.133
38.571
39.003
39.428

-0.2039
-0.22285
-0.24142
-0.25959
-0.27734
-0.29466
-0.31153
-0.32794
-0.34389
-0.35937
-0.37437
-0.3889
-0.40296
-0.41654
-0.42966
-0.44231
-0.4545
-0.46625
-0.47756
-0.48843
-0.49888
-0.50892
-0.51856
-0.52781
-0.53667
-0.54517
-0.55331
-0.56111
-0.56856
-0.5757
-0.58251
-0.58903
-0.59524
-0.60118
-0.60684
-0.61223
-0.61737
-0.62226
-0.62691
-0.63133
-0.63552
22

-0.069857
-0.075807
-0.081482
-0.086866
-0.091945
-0.096706
-0.10114
-0.10524
-0.10899
-0.11239
-0.11544
-0.11814
-0.12048
-0.12246
-0.12408
-0.12535
-0.12627
-0.12684
-0.12708
-0.12697
-0.12654
-0.12578
-0.1247
-0.12331
-0.12163
-0.11964
-0.11738
-0.11483
-0.11201
-0.10894
-0.10561
-0.10204
-0.098237
-0.094208
-0.089963
-0.085511
-0.080862
-0.076023
-0.071004
-0.065814
-0.060463

17.663
17.394
17.118
16.836
16.549
16.255
15.955
15.65
15.339
15.022
14.701
14.374
14.043
13.707
13.367
13.023
12.676
12.324
11.97
11.612
11.252
10.889
10.524
10.156
9.7869
9.4159
9.0435
8.6697
8.2949
7.9191
7.5425
7.1654
6.7877
6.4096
6.0313
5.6529
5.2744
4.896
4.5176
4.1395
3.7615

24.732
25.122
25.493
25.844
26.175
26.484
26.772
27.038
27.282
27.503
27.702
27.878
28.031
28.161
28.269
28.355
28.418
28.46
28.48
28.478
28.456
28.413
28.349
28.266
28.163
28.04
27.9
27.741
27.564
27.369
27.158
26.93
26.686
26.426
26.151
25.862
25.557
25.239
24.907
24.562
24.204

321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360

-24.111
-24.753
-25.398
-26.046
-26.698
-27.353
-28.011
-28.671
-29.334
-30
-30.668
-31.338
-32.009
-32.683
-33.358
-34.035
-34.713
-35.392
-36.073
-36.754
-37.436
-38.119
-38.803
-39.487
-40.171
-40.856
-41.541
-42.225
-42.91
-43.595
-44.279
-44.963
-45.646
-46.329
-47.011
-47.692
-48.372
-49.051
-49.729
-50.406

-34.746
-34.798
-34.844
-34.885
-34.919
-34.948
-34.97
-34.986
-34.996
-34.999
-34.996
-34.986
-34.97
-34.946
-34.917
-34.88
-34.837
-34.786
-34.73
-34.666
-34.595
-34.518
-34.434
-34.343
-34.246
-34.142
-34.032
-33.915
-33.791
-33.661
-33.525
-33.383
-33.234
-33.08
-32.919
-32.753
-32.581
-32.403
-32.219
-32.031

78.741
78.796
78.846
78.888
78.924
78.954
78.977
78.993
79.003
79.006
79.003
78.993
78.977
78.954
78.924
78.888
78.846
78.797
78.742
78.68
78.611
78.536
78.455
78.367
78.272
78.171
78.064
77.95
77.829
77.702
77.568
77.428
77.281
77.128
76.968
76.802
76.629
76.45
76.264
76.072

39.848
40.26
40.666
41.065
41.457
41.841
42.218
42.587
42.948
43.301
43.646
43.983
44.311
44.63
44.941
45.243
45.535
45.819
46.093
46.358
46.614
46.86
47.096
47.323
47.54
47.747
47.944
48.131
48.308
48.475
48.632
48.778
48.914
49.04
49.156
49.262
49.357
49.442
49.516
49.58

-0.6395
-0.64327
-0.64684
-0.65021
-0.6534
-0.6564
-0.65922
-0.66187
-0.66435
-0.66667
-0.66883
-0.67084
-0.67269
-0.67441
-0.67598
-0.67741
-0.6787
-0.67987
-0.6809
-0.68181
-0.6826
-0.68326
-0.6838
-0.68423
-0.68454
-0.68473
-0.68482
-0.68479
-0.68465
-0.6844
-0.68405
-0.68359
-0.68302
-0.68235
-0.68157
-0.68069
-0.6797
-0.67861
-0.67742
-0.67612

23

-0.054959
-0.04931
-0.043527
-0.037617
-0.03159
-0.025455
-0.019219
-0.012893
-0.0064834
2.56E-10
0.0065491
0.013156
0.019811
0.026507
0.033237
0.039991
0.046762
0.053543
0.060325
0.067102
0.073865
0.080609
0.087325
0.094008
0.10065
0.10724
0.11379
0.12027
0.12668
0.13303
0.13929
0.14548
0.15158
0.15758
0.16349
0.16929
0.17499
0.18057
0.18604
0.19139

3.3839
3.0065
2.6295
2.2528
1.8764
1.5005
1.1248
0.74957
0.37463
1.12E-09
-0.37434
-0.74842
-1.1223
-1.4959
-1.8694
-2.2428
-2.616
-2.9892
-3.3624
-3.7355
-4.1087
-4.4819
-4.8552
-5.2286
-5.6021
-5.9757
-6.3494
-6.7232
-7.0971
-7.4711
-7.8451
-8.2191
-8.5932
-8.9671
-9.3409
-9.7146
-10.088
-10.461
-10.834
-11.206

23.833
23.45
23.056
22.65
22.234
21.807
21.37
20.922
20.466
20
19.525
19.042
18.551
18.052
17.546
17.032
16.512
15.985
15.452
14.913
14.369
13.819
13.265
12.706
12.142
11.575
11.004
10.43
9.8522
9.2719
8.6891
8.1041
7.5173
6.9288
6.339
5.7482
5.1567
4.5647
3.9726
3.3806

24

%
%
%
%

Nayef Nazih Ftouni


206216827
ME-311 Theory of Machines
Project

clear all
close all
clc
format short g
d = 30;
r = 20;
S = 42;
h = 5;
w1 = 1;
j = 0;
%
%
%
%
%
%
%
%

x(1)
x(2)
x(3)
x(4)
w(1)
w(2)
w(3)
w(4)

is
is
is
is
is
is
is
is

psi
phi
x
y
psi dot
phi dot
x dot
y dot

for L0=43.58:0.001:43.59
i = 0;
clear A
x0 = [-50.4 -15 60 49.6];
for theta = 0:1:360
i=i+1;
k = @(x)[r*cosd(theta)+d*cosd(x(1)+60)-x(4)
r*sind(theta)+d*sind(x(1)+60)-h
r*cosd(theta)+d*cosd(x(1))+L0*cosd(x(2))-x(3)
r*sind(theta)+d*sind(x(1))-L0*sind(x(2))];
b =
psi
phi
x =
y =

fsolve(k,x0);
= b(1);
= b(2);
b(3);
b(4);

T = [-d*sind(psi+60) 0 0 -1
d*cosd(psi+60) 0 0 0
-d*sind(psi) -L0*sind(phi) -1 0
d*cosd(psi) -L0*cosd(phi) 0 0];
M = [r*w1*sind(theta)
-r*w1*cosd(theta)
r*w1*sind(theta)
-r*w1*cosd(theta)];

25

w = inv(T)*M;
w = w';
A(i,:) = [theta psi phi x y w(1) w(2) w(3) w(4)];
x0 = b;
end
xmax = max(A(:,4));
xmin = min(A(:,4));
phimax = max(abs(A(:,3)));
if xmax-xmin >=S & phimax <=35
j=j+1;
L(j,1)=L0;
end
end
L0 = min(L)
clear
clear
clear
clear
clear
clear
clear

A
w
T
M
k
x0
b

x0 = [-50.4 0 0 49.6];
i=0;
for theta = 0:1:360
i=i+1;
k = @(x)[r*cosd(theta)+d*cosd(x(1)+60)-x(4)
r*sind(theta)+d*sind(x(1)+60)-h
r*cosd(theta)+d*cosd(x(1))+L0*cosd(x(2))-x(3)
r*sind(theta)+d*sind(x(1))-L0*sind(x(2))];
b =
psi
phi
x =
y =

fsolve(k,x0);
= b(1);
= b(2);
b(3);
b(4);

T = [-d*sind(psi+60) 0 0 -1
d*cosd(psi+60) 0 0 0
-d*sind(psi) -L0*sind(phi) -1 0
d*cosd(psi) -L0*cosd(phi) 0 0];
M = [r*w1*sind(theta)
-r*w1*cosd(theta)

26

r*w1*sind(theta)
-r*w1*cosd(theta)];
w = inv(T)*M;
w = w';
A(i,:) = [theta psi phi x y w(1) w(2) w(3) w(4)];
x0 = b;
end
L
A
max(A(:,3))
min(A(:,3))
A(:,9)
p=0;
for i = 146:1:330
p=p+1;
vf(p)=abs(A(i,8));
end
vf_avg = sum(vf)/(p)
p=0;
for i = 330:1:360
p=p+1;
vb(p)=abs(A(i,8));
end
for i = 1:1:145
p=p+1;
vb(p)=abs(A(i,8));
end
vb_avg = sum(vb)/(p)
figure
subplot(211);plot(A(:,1),A(:,4),'Linewidth',2)
grid on
xlabel('\Theta [deg]','FontSize',13)
ylabel('Distance x [cm.]','FontSize',13)
subplot(212);plot(A(:,1),A(:,8),'Linewidth',2)
grid on
xlabel('\Theta [deg]','FontSize',13)
ylabel('x''[cm/s]','FontSize',13)

figure
subplot(211);plot(A(:,1),A(:,3),'Linewidth',2)
xlabel('\Theta [deg]','FontSize',13)
ylabel('\Phi [deg]','FontSize',13)
grid on

27

subplot(212);plot(A(:,1),A(:,7),'Linewidth',2)
xlabel('\Theta [deg]','FontSize',13)
ylabel('\phi'' [rad/s]','FontSize',13)
grid on
figure
plot(A(:,1),A(:,4),'Linewidth',2)
grid on
xlabel('\Theta [deg]','FontSize',13)
ylabel('Distance x [cm.]','FontSize',13)
figure
plot(A(:,1),A(:,8),'Linewidth',2)
grid on
xlabel('\Theta [deg]','FontSize',13)
ylabel('x''[cm/s]','FontSize',13)
figure
plot(A(:,1),A(:,3),'Linewidth',2)
xlabel('\Theta [deg]','FontSize',13)
ylabel('\Phi [deg]','FontSize',13)
grid on
figure
plot(A(:,1),A(:,7),'Linewidth',2)
xlabel('\Theta [deg]','FontSize',13)
ylabel('\phi'' [rad/s]','FontSize',13)
grid on

28

You might also like