You are on page 1of 12

EME 3214 Homework Set 1 Out: Jan.

14, 2015
Due: Jan. 20,2015
Problem 1:
Identify three mechatronic devices in your daily life. Include a picture of your selected devices.
For each device, identify the mechanical, electrical, and computer systems. Be specific!

Printers

Mechanical: Axes, carcass, gears, thongs,


screws, etc.

Electrical: LEDs, screen, power source,


engine, wires, etc.

Computer: Network board, microcontroller,


registers, interface human-machine, etc.

Drones

Mechanical: Carcass, aerodynamics, axes,


screws, propellers, etc.

Electrical: Battery, wires, network board,


engines, sensors, etc.

Computer: Speed control, stability control,


altitude control, GPS.

Cars automatic pilot

Mechanical: Accelerator, break, dampers,


springs, steering wheel, etc.

Electrical: Sensors, actuators, cameras,


beepers, etc.

Computer: Speed control, distance control,


GPS, etc.
EME 3214 Homework Set 1 Out: Jan. 14, 2015
Due: Jan. 20,2015
Problem 2:

Consider a non-interacting two-tank system:

The working fluid enters the upper tank through the valve with flow rate . A second valve
connects the upper tank to the lower tank and has flow resistance and flow rate . The lower
tank empties through a third valve with flow resistance and flow rate .

Use the following steps to develop a Simulink model of this system with input and output 2 .

1. Create a MATLAB m-file to store the values of the constants. These are not particularly
realistic values!

m3
1 = 10
N/m
m3
2 = 10
N/m
N/m2
= 0.1 3
m /s
N/m2
= 0.5 3
m /s
= 1000 kg/m3
= 9.81 m/s2
= 5000 m3 /s

2. Create a new Simulink model. Save it with a name that is significant. For instance
your_name_hw1p1.

3. The fluid capacitance of each tank is related to the net flow rate by
EME 3214 Homework Set 1 Out: Jan. 14, 2015
Due: Jan. 20,2015

1 ( 0 ) =
1

2 ( 0 ) =
2
Define the differences in pressure between the bottom of the tanks and atmospheric as

10 = 1 0
20 = 2 0

Then our model of the tanks is given by

1
=
10 ( )
1

1
=
20 ( )
2

4. Use an Add block and a Gain block to write these equations in Simulink. Double
click each line between blocks to label it appropriately. Your diagram should look
something like the figure below. Note that Simulink reads left to right. The Add block
takes signals and and adds them to make the signal . The gain block
multiplies the signal by a constant value, 1/1.

and 20
5. Add an integrator block to the 10 signals to get 10 and 20 .

6. Consider the flow through the open valve. The fluid equivalent to Ohms law considers
the potential (pressure) difference on each side of the valve, the resistance of the valve
and the fluid flow through the valve

1 0 =
2 0 =

As we already have 10 and 20 in our Simulink model, rewrite these to solve for the
flow rates
EME 3214 Homework Set 1 Out: Jan. 14, 2015
Due: Jan. 20,2015
1
=
10
1
=
20

7. Use two gain blocks to connect the and signals to the 10 and 20 signals with the
valve equations in Simulink.

8. Choose the input, , to be a Step block. Double click on the block and set the final
value to Qi.

9. The height of fluid in each tank is a function of the pressure difference between the
bottom of the tank and ambient, the fluid density and gravity

1
1 =
10
1
2 =
20

Using a gain block and a Scope block, display the height of fluid in the second tank.

10. Your final model should look similar to the figure below.

11. Run the m-file with your parameter values and then run the model. Double click on the
Scope to get a display of the output. Include your m-file, Simulink model, and Scope
output with your solution.
EME 3214 Homework Set 1 Out: Jan. 14, 2015
Due: Jan. 20,2015

Figure 1 - System output

The output shows the system is stable. The second tank fluid level stabilizes in 0.25
meter approximately.
EME 3214 Homework Set 1 Out: Jan. 14, 2015
Due: Jan. 20,2015
Problem 3:
You have been hired as a mechatronics engineer at a Chef Boyardee Ravioli factory. On your
first day, you are told that they are having problems with the Pasta Magix Ravioli Rolling
Machine and you are expected to fix it. Management has determined that the problem is with the
estimate of the time delay between a change in the pneumatic thickness controller and the
thickness measurement that is used in the ravioli roller controller and has arranged to have data
supplied to you so you can come up with a better estimate of the time delay. A meeting has been
scheduled for next Wednesday where you will present your results.

You are expected to present:

An equation (model) for an estimated time delay

Explanation of how the model was developed

Conclusions about the suitability of your estimate

Sufficient graphics / statistics / analysis to support your conclusion

Recommendations

Ravioli Roller Motor

Temperature Thickness

Sensor Measuremen
Delay

Ravioli

Dough Ravioli
Thickness measurement
Rollers feeds back to the
Pneumatic controller.
Pneumatic

Controller
EME 3214 Homework Set 1 Out: Jan. 14, 2015
Due: Jan. 20,2015
The machine has a variable speed motor to drive the dough through the rollers and a pneumatic
controller on one roller that is used to control the thickness of the final product.

Specifications:

Motor Speed: 150 to 600 RPM

Pneumatic controller: 0 to 750 PSI

Temperature Sensor: 0 to 250 deg. F range

Thickness Measurement: 0 to 0.25 inches

Management instructed the machine operator to make a change to the position of the thickness
controller and measure the time between the commanded change and a change in the measured
thickness at various motor speeds and provide you with the results.

To assist you in your analysis some useful examples of MATLAB scripts have been provided:

poly_curve_fit.m

Example of using the polyfit and polyval commands to determine the coefficients of a
polynomial that best fits the supplied independent / dependent data.

Type: help polyfit and help polyfit to get help on these functions at the Matlab prompt

Regression_Example.m

Example of using the backslash ( \ ) operator (Matrix left divide) to determine the
coefficients of an arbitrary set of independent variables (states) that best fit the dependent
data.

Type help mldivide to get help on this function

r_squared.m

Function called by the above functions to calculate the R Squared statistic a measure of
how much of the variation in the dependent variable is explained by the regression. This
function needs to be unzipped and in the same directory as the above functions for them
to work properly.
EME 3214 Homework Set 1 Out: Jan. 14, 2015
Due: Jan. 20,2015
Problem 3 Solution Steps:
1. What are the inputs to this system? What is the output of this system?

The input of the system are the motor speed and temperature because they change the output
when they vary. The output is the delay between the pneumatic thickness controller and the
thickness measurement.

2. Are motor speed and delay correlated? What about temperature and delay? What about
time and delay? What about temperature and motor speed? In light of these changing
inputs, is this a good experimental design?

The motor speed and delay are inversely proportional. How faster the motor speed is lower is the
delay time. This occur because the distance between the pneumatic thickness controller and the
thickness measurement is constant and the dough velocity is proportional to motor speed. The
temperature variation can modify the dough viscosity what can vary the load applied to the
motor axes and consequently alter the motor speed. Altering the motor speed, you alter the delay
time. So temperature is correlated with motor speed and delay time. The time has no influence in
delay time. This is a good experimental design, but the data collected isnt so good. The data
collected varied both inputs all the time and because this we cant analyze the influence of each
input at delay time. There is some noise in the data, what can be observed by the little peaks at
the curves.

Figure 2 - Output related to inputs


EME 3214 Homework Set 1 Out: Jan. 14, 2015
Due: Jan. 20,2015
3. Assume that only motor speed and delay are important. Using MATLAB, perform a
linear regression relating motor speed (input) to delay (output). Determine the R2 value
for the regression. Hint: modify the polyfit.m example.

Performed a linear regression relating motor speed to delay, we have this model:

() = 0.0174 + 10.15

Where vel is the motor speed. The R2 value for this regression is 0.9270.

4. Using MATLAB, plot the actual data points and the regression. Include a legend. Label
your axes, including units. The following MATLAB commands will be useful: plot,
xlabel, ylabel, legend.

Figure 3 Linear regression

5. Using your results from 3 and 4, is this a good fit to the data? Consider the entire
operating range! What are the estimated time delays at the maximum and minimum
motor speeds? What recommendations can you make based on this linear regression?

This linear regression fits to the data intercepting the data curve in two points, what isnt so
good. For the minimum speed the regression has a delay smaller than the real delay. There are
fails in the model for high velocities. The model presents negatives delay values, what is
impossible. The recommendations are try to use a fit with a bigger order, reduce the range of
EME 3214 Homework Set 1 Out: Jan. 14, 2015
Due: Jan. 20,2015
motor speed operation or divide the range in two or more parts and try to make a model for each
part.

6. Repeat 3, 4, and 5 with a 2nd order polynomial. Based on the operating conditions, is this
a good fit? What are the estimated time delays at the maximum and minimum motor
speeds? Is this an improvement over a linear fit within the operating conditions?

Figure 4 2nd order regression

This is a good fit for the interval of the data. For the data interval, the 2nd order fit shows an
improvement in relation of the linear regression. When the velocity is higher than 430 rpm,
approximately, the model is not valid because the delay time starts to increase.

Performed a 2nd order regression relating motor speed to delay, we have this model:

() = 6.22 05 2 0.054 + 15.063

Where vel is the motor speed. The R2 value for this regression is 0.9927.

7. Given that the distance between the rollers and sensor is constant, write a mathematical
expression that relates velocity and time required for the dough to travel between the
rollers and sensor. Use this to relate delay to motor speed using unknown (to be
determined) constants.
EME 3214 Homework Set 1 Out: Jan. 14, 2015
Due: Jan. 20,2015
The roller linear velocity will be:

2 1
=
60 2 3

Where:

vroller Roller linear velocity [m/sec];

vmotor Motor angular velocity [rpm];

rs1 Motor sheave radius[m];

rs2 Internal roller sheave radius[m];

rs3 External roller sheave radius[m];

The time of delay will be:


= +

Where:

delay The resulting delay time for each velocity[sec],

d Distance between the pneumatic thickness controller and the thickness


measurement[m];

delaydevice The delay time that the device take to process the information[sec];

Constant values:

rs1 = 0.1 m;

rs2 = 0.3 m;

rs3 = 0.4 m;

d = 1.5 m;

delaydevice = 0.6 sec;

8. Repeat 3, 4 and 5 for your model from 7. Based on the operating conditions, is this a
good fit? What are the estimated time delays at the maximum and minimum motor
speeds? Is this an improvement over a linear fit within the operating conditions?
EME 3214 Homework Set 1 Out: Jan. 14, 2015
Due: Jan. 20,2015

Figure 5 Mathematical model

This is the best model to describe the relation between the motor speed and the delay time. The
model fits very well to the system data. For the limits of the range, the model presents consistent
values. At the minimum speed the model curve follows the data curve and at the maximum speed
the model presents the smaller delay. The maximum delay time is 8.5 seconds and the minimum
delay time is around 2.7 seconds.

You might also like