ESE 406 - SPRING 2010 - HOMEWORK #1
Introduction to MATLAB / SIMULINK
DUE 20-Jan-2010
In this homework, we will use Matlab and Simulink to conduct simulations of the “Ping Pong Poise” in class
demonstration.
We will start with “Case 2” which is the nominal PID controller we discussed in class.
Take a
moment to watch the video “Case2.wmv”, which shows a capture sequence.
The following graph shows the
captured position measurements (in counts from the analog to digital converter) for this event:
KD=$A0 : KP = $30 : KI = $A0
0
50
100
150
200
250
600
650
700
750
800
850
900
950
1000
Time [38-ms Frames]
Ball Position [Counts]
Note that initially, the ball is to the left (in the video) of the center, which is outside of the active sensor range.
The
ball comes into range between frames 650 and 700.
The target position is 127.
Go through the steps below to get some experience working with Matlab andeven more experience with Simulink.
The last page has some suggestions for what you might submit to complete the homework.
1.
Launch Matlab
(From a Penn PC, Start
Æ
Programs
Æ
Mathematics
Æ
MatlabR2009b).
2.
Using the “Current Directory” tab of the Matlab window, set the current directory to some convenient folder on
the computer.
I strongly recommend that you create a separate folder for each of homework assignment and
save your work for the duration of the semester for reference.
Place the
PingPongPoise.mdl
and
PingPongPoiseParameters.m
files that you download from Blackboard in the working directory you
have chosen.
We will use these files later.
3.
In the Matlab Command Window, enter
simulink
.
Hereafter, commands entered in the Matlab command
Window will be specified with “>>”, as
>> simulink

This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*