Você está na página 1de 25

MAPÚA UNIVERSITY

SCHOOL OF MECHANICAL AND MANUFACTURING ENGINEERING

ME153P/E01

CONTROL SYSTEMS ENGINEERING

WRITTEN REPORT ON

GRAPHICAL USER INTERFACE

EXERCISE 1 TO 5

SUBMITTED BY:

LAPITAN, JOHN PAUL V.

2014151749

SUBMITTED TO:

ENGR. JULIAN ALBERT NOHAY

MARCH 5, 2019
ABSTRACT
For exercise 1-5 we are asked to create a GUI using MATLAB. In this exercise using
MATLAB we able to apply our knowledge in our past Math and Physics subject. For example, in
experiment 1 we asked to convert common temperature scale. In exercise 2, we are asked to create
a program regarding vibration of spring mass system. In exercise 3, we are asked to create a
program about parametric equation. In exercise 4, we are asked to create a program about pump
performance curve. For the exercise 5, we are asked to create a program that can solve 9 unknowns
in Nodal temperature that a flat plate experiencing heat transfer through conduction.

GENERAL OBJECTIVES

1. To create GUIs in order to solve specific engineering problems using MATLAB. (Lopena
n.d.)
2. To be familiar with some basic GUI programming commands. (Lopena n.d.)

3. To apply concepts in mathematics and engineering in creating GUIs. (Lopena n.d.)

ii
TABLE OF CONTENTS
TITLE PAGE i

ABSTRACT ii
GENERAL OBJECTIVES ii

TABLE OF CONTENTS iii


EXERCISE NO. 1: (TEMPERATURE CONVERSION) 1

Problem Statement 1
Objective 1

Solution 1
Discussion 2

Conclusion 2
EXERCISE NO. 2: (VIBRATION OF SPRING-MASS SYSTEM) 3
Problem Statement 3

Objective 3
Solution 3

Discussion 9
Conclusion 10

EXERCISE NO. 3: (PARAMETRIC EQUATION OF MOTION) 10


Problem Statement 10

Objective 10
Solution 10

Discussion 14
Conclusion 15
EXERCISE NO. 4: (PUMP PERFORMANCE CURVE) 15

Problem Statement 15
Objective 15

Solution 15

iii
Discussion 16
Conclusion 17

EXERCISE NO. 5: (NODAL TEMPERATURES) 17


Problem Statement 17

Objective 17
Solution 17

Discussion 19
Conclusion 19

PRELIMINARY DATA SHEET 20


REFERENCES 21

iv
EXERCISE NO. 1: (Temperature Conversion) (Lopena n.d.)

Problem Statement
In engineering field conversion of SI to English units takes so much in solving different
problems, one of which is the temperature conversion. Converting temperature scales such as
Celsius, Fahrenheit, Kelvin and Rankine these temperature scales are the common temperature
units but when you do convert it manually it can be time consuming. In Exercise 1 the students
were asked to create a MATLAB GUI that can convert common temperature scales.

Objective
For this exercise the goal is for students to create their own MATLAB GUI that can convert
Celsius into Fahrenheit and the two absolute scales namely Kelvin and Rankine.

Solution

1
Discussion

Figure 1: GUI Design


x - input value
y - push button
z – output value

In this exercise it is only composed of three parts, it contains the input text box (x), the push
button (y) and the output text (z). For the input text box (x) this is where you put your desired
temperature in degree Celsius. After you input the value the push button (y) act as the trigger for
the codes to run. Lastly, the output text this is where the results will show up.

Conclusion
After performing the exercise 1, at first it is hard for us to use the MATLAB but after the
discussion of our professor, we able to get it correctly also we able to obtain the objective of this
experiment. As an engineering student I was amazed that using MATLAB we can make a GUI
that convert temperature scales and we are able to know the basics in programming MATLAB.

2
EXERCISE No. 2: (Vibration of Spring-Mass System) (Lopena n.d.)

Problem Statement

In this exercise a graph of a vibrating system is required it is usually the graph of displacement
versus time. The nature of the graph of the vibration of the spring mass system is sinusoidal.
Making a GUI using MATLAB that can graph the vibration of the spring mass system will be a
great help for the students to solve their problem easier regarding spring mass system problems
because graphing and plotting points can be tedious.

Objective

The goal of exercise 2 is to create a GUI that can graph vibration of the spring mass system
based on the data that the user inputted.

Solution

3
4
5
6
7
8
Discussion

Figure 2: GUI Design


- input value
- push button
- Output graph

In exercise 2 it is consisting of three parts: input text box, push button and the output graph.
The input text box is where you put the data of the spring mass system it is the time that the
program will gather the information in graphing it at the output graph. The push button is the one
that trigger the codes to be able to graph the given data. Lastly the output graph or the results box
is where you can see a sinusoidal wave representing the input data by the user.

9
Conclusion
For this exercise we able to know that MATLAB can also graph or plot points. This exercise
can be helpful us because it will be easier for us to see the and have a visual understanding on how
the vibration of the spring mass system behaves.

EXERCISE No. 3: (Parametric Equation of Motion) (Lopena n.d.)

Problem Statement
In exercise 3 for us to see the position of a particle moving in a curvilinear motion we need
to graph it and manually graphing can be tedious and will eat so much of our time especially in
solving word problems. We know that MATLAB can graph parametric equations such as the
function of y=f(x).

Objective:
To create a GUI that can plot points based on the given equation.

Solution:

10
11
12
13
Discussion:

Figure 3: GUI Design


- Input Value
- Push Button
- Graph output

14
In this exercise it consists of three parts: input text box, push button, and the output graph
(results). The GUI will display three graphs based on different parametric equations, the input
text box will store the data and when the push button will trigger the codes to run and place it
where the “handle” command of the MATLAB is programmed. The output graph based on
different parametric equation will be shown in the GUI.
Conclusion
Upon performing this exercise, we are amazed that MATLAB can also graph different
components and show in simultaneously, able to create a GUI for parametric equation of motion
will aid us in solving certain problems regarding motion problems. In successfully performing
this exercise we able to display the position of each component.

EXERCISE NO. 4: (PUMP PERFORMANCE CURVE) (Lopena n.d.)

Problem Statement
Manually plotting points on the pump curve and solve for the pump head power, efficiency
and NPSHR can be time consuming and inconvenient. Creating a GUI that can solve those data
can be a great help in solving pumps problem.

Objective

To be able to create a GUI that can solve pump head power, efficiency and NPSHR that the
inputted value by the user is the flowrate in cubic meter per hour.

Solution

15
Discussion

Figure 4: GUI Design

16
In exercise 4 it is consisting of four parts: the input text box, push button 1 (ENTER), the
output text and another push button (VIEW). In our laboratory manual the formula for solving the
necessary data were given so in our we just need to create the GUI and then just copy the formula
given on the laboratory manual. The only problem we need to do is to create a parameter that can
accept a certain value otherwise the GUI will show (N/A). The input text box is the one who store
the data given by the user. For the push button 1 will just verify whether the input data is within
the range or not and it will show it in the GUI, when the given is within the range the codes for the
formula will proceed and then the other push button will show the results in the GUI.

Conclusion
We were able to use the formula given in our laboratory manual and with the help our
professor we were able to create a GUI that can solve pump head power, efficiency and NPSHR
accurately compare in just looking at the pump curve.

EXERCISE NO. 5: (NODAL TEMPERATURES) (Lopena n.d.)

Problem Statement

Solving for Nodal temperature is a very tedious work to do it is commonly use in the
analysis of two-dimensional plate for heat transfer that use too much interpolation work therefore
if we able to create a GUI regarding Nodal Temperature it will be less hassle for the students.
Objective

To be able to create a GUI that can solve 9 unknowns which are specified nodes in a flat
plate in two dimensions. The flat plate is experiencing heat transfer through conduction.
Solution

17
18
Discussion

Figure 5: GUI Design


In this exercise the formula in creating the GUI were given in our laboratory manual. This
exercise consists of four parts: the input text box, push button 1 (ENTER), the output text, and
another push button (VIEW). The input text box will store five different values provided by the
user the data for the point (a, b, c, d) and the other value is for the thermal conductivity (k).
After the user put the necessary data the push button 1 will verify whether the use input correctly
values, and the GUI let the user double check his/her data. The other push button will be
responsible in triggering the codes and let the user see the results display in the GUI.

Conclusion

Using the formula provided in our laboratory manual and with the help of our professor we
able to create a GUI that can solve a tedious problem in heat transfer. Our group were able to
create a program that can solve nine unknown using linear equation that experiencing heat transfer
through conduction.

19
PRELIMINARY DATA SHEET

20
REFERENCES

Lopena, Jerome D. n.d. ME153P Control System Engineering Laboratory Manual.

21

Você também pode gostar