Date post: | 28-Apr-2015 |
Category: |
Documents |
Upload: | abdullah-yahya |
View: | 38 times |
Download: | 0 times |
King Fahd University of Petroleum &Minerals
Electrical Engineering Department Control Engineering ,Term Project, semester: 112
Elephant Clock Modeling & Simulating
Prepared for : Dr. Ahmad Masoud By :
Fares Ali Yahya Al-‐Amri (Section: 3) -‐ ID# 200845960 Abdullah Jaber Yahya (Section: 1) -‐ ID# 200816940
Submitted:14/05/2012
King Fahd University of Petroleum &Minerals
Electrical Engineering Department
Control Engineering, Term Project, semester: 112
2 | P a g e
Introduction:
During this course, we appreciated the use of MATLAB as an important tool in electrical engineering in general and in control engineering precisely. This program allows a full platform of simulating different theories & aspects. In these papers, we will implement molding & simulation on an ancient clock called "Elephant Clock" with applying the knowledge we had from this course.
King Fahd University of Petroleum &Minerals
Electrical Engineering Department
Control Engineering, Term Project, semester: 112
3 | P a g e
Brief overview:
The elephant clock was an Islamic invention by al-Jazari, consisting of a weight powered water clock in the form of an elephant. The various elements of the clock are in the housing on top of the elephant. They were designed to move and make a sound each half hour.
All details are specified on the presentation
Figure 1: Elephant clock
King Fahd University of Petroleum &Minerals
Electrical Engineering Department
Control Engineering, Term Project, semester: 112
4 | P a g e
The modeling of the clock: The input of the system: Water
The output of the system: Time Process used to achieve the output:
A-‐ Tank-‐string system.
figure2: Tank-‐string System
B-‐ Ball blocking system.
figure3: Ball -‐blocking System
C-‐ Ball transferring system.
figure4: Ball-‐transferring System
D-‐ Notification system.
figure5: Notification System
King Fahd University of Petroleum &Minerals
Electrical Engineering Department
Control Engineering, Term Project, semester: 112
5 | P a g e
E-‐ Repeat.
figure6: Repeat System
So, we connected these processes into the following block diagram:
Figure 7: Elephant clock block diagram
King Fahd University of Petroleum &Minerals
Electrical Engineering Department
Control Engineering, Term Project, semester: 112
6 | P a g e
Analysis:
We need to analyze each system in detail:
A-‐ Tank-‐string system The purpose of the system is to pull the string if the Bucket [in the tank] is full of
water. The process will be as the follow: the water enters the clock at a specific flow rate. The flow rate of the water = 1000 cm3/min. So, we need to find the volume of the water after each half an hour:
𝑉𝑜𝑙𝑢𝑚𝑒 = 𝐹𝑙𝑜𝑤 𝑅𝑎𝑡𝑒 ∗ 𝑇𝑖𝑚𝑒
= 1000 𝑐𝑚!
𝑚𝑖𝑛 ∗ 30 𝑚𝑖𝑛
= 30,000 𝑐𝑚! = 0.03 𝑚! = 30 𝑘𝑔
As you can see from the previous result, we found the expected water weight after
each-‐half hour. So, now we need to use a string that has a maximum tension force of:
𝐹 = 𝑚 𝑔 = 30 𝑘𝑔 ∗ 9.8𝑚𝑠!= 294 𝑁
Therefore, each half-‐hour, the bucket will be filled. Then the weight of the bucket will exceed the maximum tension force of the string. So, the string will be pulled. Thus, the process will continue into the next phase.
King Fahd University of Petroleum &Minerals
Electrical Engineering Department
Control Engineering, Term Project, semester: 112
7 | P a g e
B-‐ Ball blocking system
After the string is pulled, the ball will be released. This ball will go to the tip of the
see-‐saw in the top of the elephant. This ball will pull the solid string that is attached to the water bucket. Therefore this ball will pull the bucket out of the water. Then the system will go to next phase.
C-‐ Ball transferring system
The ball will be transferred back to its original place. Obviously, that is because of the
"see-‐saw mechanism" that exists in the top of the elephant. When the ball fall to the tip of the see-‐saw system, it will go back to the original place.
Meanwhile, the process of returning the ball back will lead in pulling another string. D-‐ Notification system
That string will pull the hand of the Mahout (machine-‐man), so he will hit the drum.
This drum is considered to be the time notification, which means that a half-‐hour has passed. And this is our desired output.
E-‐ Repeat
The whole system will be automatically repeated. The bucket is empty because of
the whole under it, so it will wait for another 30 minutes to be filled. Therefore, the pervious processes will be repeated over and over again.
King Fahd University of Petroleum &Minerals
Electrical Engineering Department
Control Engineering, Term Project, semester: 112
8 | P a g e
Simulation: But before that, we need to convert our system into a "mathematical model" .So:
The input: it is clear from the analysis of this system is that the input is water. And we have said that the input can be determined by the following equation:
= 𝐹𝑙𝑜𝑤 𝑅𝑎𝑡𝑒 ∗ 𝑇𝑖𝑚𝑒 = 𝑓𝑟 ∗ 𝑡
The output: We said that the output of our system is a time notification each 30 minutes. So, we let the output increase by 1 each 30 minutes. Which means that if the output changed by 1, that means the water bucket has been pulled out from the water. Which means 30 minutes passed. The Processes: We can simplify all of the systems into one block. So how can we find its function? Well, since we have the output and the input, we can draw its own block diagram as seen in Figure 8.
Figure 8: Input-‐output block diagram
As you can see from figure 2, we can find the function of all of the process by seeing how the output and the input behave. So, our function is:
= 𝑥 − 𝑦 = 𝑓𝑟 ∗ 𝑡 − 𝑦
King Fahd University of Petroleum &Minerals
Electrical Engineering Department
Control Engineering, Term Project, semester: 112
9 | P a g e
So now we can simulate it.
We used the MATLAB to simulate our system. MATLAB code:
These are the results:
%Choose the time you want (in minutes) t=0:0.1:75; %The input, which is flow rate of the water =1000 cm^3/min, which is the input fr=1000; %The output of the system: y= round((t*fr/(30*1000))-0.5); %processes: u=(t*fr/(30*1000))-y; figure(1) plot(t,u) title('Tank String System') grid figure(2) plot(t,y) title('The output of the system') grid
King Fahd University of Petroleum &Minerals
Electrical Engineering Department
Control Engineering, Term Project, semester: 112
10 | P a g e
0 10 20 30 40 50 60 70 80-1
-0.5
0
0.5
1
1.5
2The output of the system
King Fahd University of Petroleum &Minerals
Electrical Engineering Department
Control Engineering, Term Project, semester: 112
11 | P a g e
0 10 20 30 40 50 60 70 800
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1Tank String System
King Fahd University of Petroleum &Minerals
Electrical Engineering Department
Control Engineering, Term Project, semester: 112
12 | P a g e
Conclusion: In this project the implementation was performed via MATLAB. The elephant clock may consider as a closed system and its behavior is continuous with the help of the automaton. As you can see from the previous graphs:
In the first graph, the output of the system [which is the time notification] will only occur after every half-hour. Please notice that the output will increase by 1 every 30 minutes.
Whereas in the second graph, the inside system [with the feedback effect] will be repeated after each half-hour. Which means the bucket is empty at t = 0, and it starts to take the water until its full after 30 minutes. Then the system will be repeated, and it will make a time notification as an output. Then the system will be repeated over and over again.