Wednesday, February 29, 2012

Money Ball Analysis

"Changing the game" is tough. Some of you will have the chance to attempt the equivalent at some point in your careers. Simulating this type of experience via Billy Beane's story is a chance to reflect on the blend of "art" and "science" required to solve the intractable challenges you may come up against.

Use Internet research and class discussion to answer the following questions.

1) What was the “Moneyball”approach that Billy Beane and Peter Brandt applied to the Oakland Athletics 2002 season? Was it an “art” or a “science”? What single statistic did they boil their value consideration down to? (In class research/discussion)

The "Moneyball" approach that Billy Beane and Peter Brandt used was an analytical process where they used a science to determine who would be a part of the winning team. The single statistic they boiled their value consideration down to was the On-Base-Percentage.

2) What is the equation used to calculate OBP? (In class research/discussion)
OBP = \frac{H+BB+HBP}{AB+BB+HBP+SF}

OBP (on base percentage)
H (hits)
BB (bases on balls/walks)
HBP (hits by a pitch)
AB (at bats)
SF (sacrifice flies)

3) What is design? (In class research/discussion)

Design is the process of working as a team, solving the original problem, collaborating, coming up with ideas, modifying the design, and then working toward the solution that best fits the needs and rules of the problem you are working to solve.
4) Describe 3 situations where movie characters (intentionally or not) applied a step from the Project Lead the Way 12 Step Design Process. Explain both the (a) situation as well as (b) how the step is relevant:

1 - (a) When the guys at the beginning of the movie were discussing their picks for scouting were missing what the problem was, Billy Beane had to remind them to ask what the problem was. (b) They were losing their focus and need to be put on the correct track once again so they could achieve what they needed and not lose sight of the goal.


2 - (a) At the point in time where Peter was sharing his ideas with Billy Beane, he was collaborating and trying to get the more ideas for the final product in the process. (b) By collaborating, better ideas can come out of a mush pot of random ones that can help the final product be better than it would be without this step.


3 - (a) When the time came for Giambi to be traded to another team and the original plan did not work out too well, the necessary modification from the first attempt was made. (b) This step was crucial because it made room for the better team that was needed for the on base percentage the team was trying to achieve from their players.
5) What is “Leadership”? List the three aspects of leadership that we come up with in class. (In class research/discussion)

1 - Direction
2 - Alignment
3 - Commitment

6) Describe 3 circumstances from the story where a character exercised effective leadership:

1 - When Billy Beane had to tell the scouts to focus on what the problem was, he was providing direction to his team by dialing them back to remain on the right track.


2 - By the time the A's had won so many games they beat the national record for baseball, the scouts were starting to agree with the methods of Billy Beane more since the team was having more success at this point in the season and had done the unthinkable with such a low budget.


3 - At the time where Billy Beane turned down the offer for millions of dollars to join the Boston Red Socks as the chief scout, he was remaining committed to his team to achieve success with his scouts rather than leaving them to fend for themselves.

7) According to the movie, what was the A’s record at the start of their winning streak?

76 : 51 (roughly 75 : 50)

8) What does this ratio simplify to (roughly)?

1.5 : 1

9) How long was the A’s record setting winning streak?

20 games won.

10) Given the A’s win/loss ratio at the start of the streak (listed two questions above), what are the odds of winning 20 games in a row? Run the numbers. (In class research/discussion)

75 wins : 125 games
0.000037
1=(x)0.000037
27,000/162
Approximately 166.7 years for this to occur naturally.

11) Based on your calculation, do you think the A’s got lucky or was there something to the Moneyball approach?

The A's did not get lucky, there was something to their approach when they focused on the On-Base-Percentage.

12) Did Billy Beane strictly apply the “science” of Moneyball to his management approach? Was there an “art” to his efforts as well? Describe a circumstance where he broke from the Moneyball approach to make a positive change for the team.

Billy Beane did not strictly apply the "science" of Moneyball to his management approach, there was an art in his approach as well. When he got rid of Giambi, he had to consider the human element (the morale) of the rest of the team (at the end of the day, it's about the people.

Bonus Question (look into this if you’ve finished ahead of the class):
Money Ball was originally a book. What author wrote the book? What other books has this author written? Is there a theme to his writing?

Michael Lewis originally wrote the book. The author has also written "The Blind Side" and "Coach: Lessons on the Game of Life." The theme to his writing goes beyond the obvious commonality of sports, but more about the aspect of leadership and the human element in terms of the titles of the books.

Friday, February 17, 2012

Project 3.1.7 Machine Control Design

Team Members: Isabel, Daniel, Carley

Problem 1: Start / Finish Line (Hardware Level 1 | Software Level 4)
The Olympic committee would like your team to invent a control system for use with track and field running events. They want this device to automatically record the time and beep when the first runner crosses the start / finish line.

FINAL PHYSICAL SOLUTION

The final structural design for the timer at the Olympics. Includes the two photo-
cells, two lamps, ten wire connections and wires, one interface, one power supply,
one USB cord, eleven 30 mm blocks, and nine 15 mm blocks, and one buzzer. The
track is symbolized as being the square and the space for people to run between
the photo-cells and lamps to set off the buzzer for the run.

[INSERT IMAGE OF TWO POTENTIAL PHYSICAL SKETCHES]
[INSERT IMAGE OF TWO POTENTIAL PROGRAM SKETCHES]
[INSERT IMAGE OF FINAL PHYSICAL SKETCH]
[INSERT IMAGE OF FINAL PROGRAM SKETCH]

 

FINAL PROGRAM SOLUTION

The final program design for the functions of the physical solution shown
above. Included are loops, start, end, variables, motor outputs (modified),
photoresistor decision blocks, and analog blocks. (NOTE: we had to modify
the values as the photocell was also affected by the sunlight values, which
change as the day goes on.
  CONCLUSION QUESTIONS

1. What was the most difficult part of the problem?

The most difficult part of the problem was wiring the switches to coincide perfectly and properly with the program already set in place - the mix up and the innumerable pieces of wire were really hard to operate around as well, and figuring out and keeping track of the inputs and outputs made things even more difficult. We also had to change the values manually because the sun was affected the reading from the photocells, and the changes between a couple of minutes were significant enough the change the program as a whole and cause it to function badly.

2. List and describe two features that were not part of the design problem that could be added to improve your design.

Better sensors would have been nice - perhaps color sensors pre-programmed to sense the colors of the contestants in the Olympics to differentiate and provide proper statistics for the record. When we went to record the time on the program, it would have also been more convenient to have it continue going, but stop as each person crossed the line. However, given the time limit, such a feat could not be achieved. Sheilding the photocells from the sun somehow would have been good since we had to manually change the values based on readings, and if the runners take too long, then we would have to modify it just before they reach the finish line. That, or we could set the program to automatically change the values based upon the readings taken from the sun's light.


Problem 2: Soccer Goal Light (Hardware Level 2 | Software Level 3)
Your team has been asked to design a control system for teh local soccer field that can detect when the ball has entered the goal. A light must blink for 10 seconds after a goal is scored. Remember, the goalie and others will also be crossing the goal frequently. You may need to modify the ball so that your device can differentiate between the soccer ball and other objects.

[INSERT IMAGE OF TWO POTENTIAL PHYSICAL SKETCHES]
[INSERT IMAGE OF TWO POTENTIAL PROGRAM SKETCHES]
[INSERT IMAGE OF FINAL PHYSICAL SKETCH]
[INSERT IMAGE OF FINAL PROGRAM SKETCH]

CONCLUSION QUESTIONS

1. What was the most difficult part of the problem?

The most difficult part of the problem was getting the magnetic piece worked out correctly. Plus, it seemed a little unrealistic to use a high powered magnet because of safety issues, but that was the decision, and we stuck with it to get to the end.

2. List and describe two features that were not part of the design problem that could be added to improve your design.

Different and more advanced sensors like the ultrasonic sensor could have been utilized to measure distances and get more specific readings such as rate of travel and size (good for distinguishing between player and ball). The pieces we used could have been smaller and easier to distinguish from a square with an empty space in the middle to an actual goal in a soccer game. The magnet we used was unrealistic for the situation at hand, and there could have been better solutions.

Thursday, February 16, 2012

Activity 3.1.6 Open and Closed Loop Systems

INTRODUCTION

Many devices function without ever knowing whether they are doing the job that they were programmed to do.

EQUIPMENT

- RoboPro software
- fishertechnik components:
   - Interface, power supply, USB cable
   - 5 wires
   - Motor
   - 2 lamps
   - Photocell
   - Phototransistor
   - 2 mini switches
   - 9 building blocks (30 mm)
   - 8 building blocks (15 mm) (1 pin)
   - 3 rack and pinion (60 mm)
   - Motor rack gearbox

PROCEDURE

In this activity

1. Buld the support system pictured below.

2. Add the motor and gearbox as shown below, and then wire the motor to M1 on the interface. Slightly loosen the gearbox from the motor so that you can feely adjust the motor. beofe

3.

4.

5. Is this an open loop or a closed loop system?

This is an open loop system because there is no feedback from the device.

6. Where do you think the gearbox would have come to rest had you set the program to cycle 120 times?

The gearbox would have probably come to rest at the farther end of the track (relative to the starting end).

7. What problems and inefficiencies might this process cause if it were used in an assembly mechanism designed to run 24 hours per day for several days?

The device would have to "calibrate" it's starting point in a sense. That would take at least one other sensor and a little bit more time that would add to the overall time it would take without this extra step for days and days, making the process of building the days quota take a little longer than normal.


9. Is this an open loop or closed loop system?

This is an open loop system because the system is using the feedback to direct the programming from there.

10. How precise would this device be if it were designed to cycle 500 times?

This device would be very precise, because the feedback doesn't change and neither does the programming to shuttle it back and forth between the two switches.

CONCLUSION

1. Describe an open loop system that has not already been given as an example. Could the system benefit from feedback? Justify your answer.

A conveyor belt that just runs and runs on and on until the cows come home is an open loop system. This system could benefit from feedback if there were sensors placed around a room and there was a malfunction on the track, it could stop and proceed with the necessary reaction to fix the problem. That way humans would not have to manually fix the problem and the system would be more efficient in general.

2. Describe a closed loop system that has not already been given as an example. Describe the feedback utilized, and describe why that type of feedback is utilized.

A closed loop system that has not already been given as an example would be something like a light switch. The feedback comes from the flip of the switch indicated to the light to turn on or off. That type of feedback is utilized because it makes the use of the appliance easier for humans in general. Clapping and sound sensors in a room also sometimes generate light from lamps and other bulbs and things in a room (in some very rare cases)

Wednesday, February 8, 2012

Activity 3.1.5 Variable Functions

INTRODUCTION

A program can accomplish a given task in any number of ways. Therefore programs can quickly grow to an unmanagable size. One of the learning tasks in programming is to develop an understanding of loops and variables. In this way, we can limit the size of the program. Loops allow programs to repeat a set of functions for a specified number of times. Variables provide the ability to assign and monitor values. The use of variables allows for complex control of a system.

EQUIPMENT

- RoboPro software
- fishertechnik components:
   - Interface, power supply, and USB Cable
   - 1 complete wire
   - 1 lamp

PROCEDURE

In this activity you will create a program that controls the number of times a light turns on and off.

The ability to use variables in your program is a powerful feature. Variables are intermediate storage spots for specific information. At specific spots in your program, you can query the variable and instruct the program to act on this information. This information can be whether a particular switch  has been pressed, whether a predetermined number has been reached, or how often a specific event has occurred.

The variable expression can represent anything that has a value. The variable can equal another variable, an analog input, or a number. We can manipulate the variables to produce the output we desire.

Increase Available Function Blocks

1. Open a new file in RoboPro. Choose Level 5 Objects from the Menu Bar. This will make available the function blocks needed to complete this activity.

2. Expand Program Elements. This will allow you to view the full list of available element subgroups.

3. Select Basic elements. This will allow you to utilized common programming element blocks such as start and end program.

4. Create the program below. Three new function blocks are utilized. The Plus function block can be located in the program elements subgroup Commands. The Variable function block can be located in the program elements subgroup Variables, Timers. The Branch (with Data Input) function block can be located in the program elements subgroup Branch, Wait.


5. Wire a lamp to M1.

Plus Function Block

Every time a program passes through the Plus function block, it adds a value to the block connected to the node on the right.

6. Right click on the Plus function block to bring up additional information. Four different areas can be manipulated.

Command: Identifies the mathematical operation that the function block will perform.

Value: Identifies a numeric value to be manipulated by the mathematical command.

Description of Value: This text will be viewable on the function block in the program.

Data Input for Command Value: If this box is checked, a node will appear on the left, which allows a starting value to be designated.

7. Change the command element Value to "2".

Variable Function Block

A Variable keeps track of a value. RoboPro function blocks that are orange communicate values or information. They do not represent ports or control any physical components. They contain or provide information for the function blocks that must make Branch decisions.

8. Right click on the Variable function block. Three different items can be manipulated.

Name: Identifies the variable, not the value of the variable. It is helpful to name the variable something that describes its function. Also, the variable may be used in multiple places.

Initial Value: Identifiies the starting numeric value of the variable. Depending on your program design, the numeric value of the variable may need to be set at a specific value other than the default 0.

Variable Type: Local variables are only valid in the subprogram in which they are defined. Global variables with the same name are valid throughout the main program and all subprograms. Object variables are only valid for specific variable instances.

9. Change both variable function blocks names from "var" to "Count". Make sure that "Count" is spelled the same for both blocks. "Count" and "count" are two different variables.

Branch (with Data Input) Function Block

A branch (with Data Input) is much like the Analog Branch. Both possess yes and no nodes based upon a defined condition. The important difference is that Analog Branches retrieve information from an analog input device, while a Branch (with Data Input) retrieves information from whatever value is provided through the infromation node on the left side of the function block. It is common for this information to come from a Variable function block.

10. Right click on the Branch to bring up additional information. Two different items can be manipulated.

Condition: Identifies the condition that will be considered true.

Swap Y/N Branches: Choosing this selection causes the 1 and 0 nodes to trade places on the function block.

11. Change the Branch block condition to greater than 8.

12. Create descriptions next to each function block to describe what you believe will happen at each one.

13. Run the program and adjust any descriptions that may have performed differently that you predicted. Demonstrate the successful program for your instructor.

14. For how many seconds was the light on?

5 seconds.

15. Write a program that repeats the following sequence three times before ending: The lamp turns on for four seconds and turns off for four seconds. Insert text next to each function block to explain what is happening. Demonstrate the successful program to your instructor.



CONCLUSION

16. Describe how you might modify the Plus command so that it can reset a variable block to 0 within a program.



17. What might an industrial or manufacturing engineer need to count or keep track of? Describe one example.












Friday, February 3, 2012

Activity 3.1.4 Branch Functions

INTRODUCTION

One of the powerful attributes of a computer program is its ability to make decisions. Although it can be argued that only humans are capable of decision making, computers are able to make decisions using criteria. They are able to compare two values and determine whether one is larger than the other. They can determine whether a statement is true of false, based on empirical data.

EQUIPMENT

- RoboPro software
- fisthertechnik components:
   - Interface, power supply, USB cable
   - 3 complete wires
   - 1 lamp
   - 2 mini switches
   - 1 potentiometer

PROCEDURE

In this activity you will create programs that control a lamp based on the input from digital and analog inputs.

Digital Branch Functions Block
The Digital Branch function block can be used to represent a mini switch in your program. As the program flows into the tope node of the switch, it can leave in two different ways. If the circuit in the switch is closed, the flow will continue out the node labeled 1. If the circuit is open, the flow will leave through the node labeled 0.

1. If the mini switch is not being pushed and it is wired normally open, through which node with the program continue?

The program will continue through the normally open node 0.
2. Create the program below, wire the lamp to M1, and wire a mini switch normally open to I1.


3. If I1 is wired normally open, describe what will happen if the mini-switch is never pushed.

If the mini switch is never pushed, then the status of the lamp will not change until an intervention is committed. Basically, the program will continue to loop until there is a hiatus in the never ending loop of the program created - it doesn't stop until the switch is pressed, with which the program ends.

4. Right click on the Digital Branch block to bring up additional information. You can manipulate four specific areas: the Digital Input, Interface/Extension, Image, and Swap 1/0 Branches.

Digital Input
Make sure that the Digital Branch identified matches the correct component.

Interface/Extension
Identifies the interface on which the component and port are located. IF1 is teh default control interface. You will not need to change this unless you add extension modules to the interface.

Image
Identifies the image represented on the function block. Selecting the component you have connected to the output port on the interface allows for easy visualization during programming.

Swap 1/0 Branches
This causes the 1 and 0 nodes to trade places on the function block.

5. Run the program.

6. Wire a second mini switch  normally closed to input I2. Create a program that will turn on a lamp when the switch connected to I2 is pressed. Insert text next to each function block to explain what is happening. Demonstrate the properly functioning program for your instructor.

Analog Branch Function Block
The Analog Branch function block can be used to make a decision based on an analog value. All possible combinations less than, greater than, or equal to can be paired with a value. If the condition is true, then the flow will exit through the node labeled Y. If the condition is not true, then the flow will exit through the node labeled N.
7. Create the program below, wire the lamp to M1, and wire a potentiometer to analog input AX. Turn the actual potentiometer ccw until it stops.

8. Right click on the Analog Branch to bring up additional information. You can manipulate four specific areas.

Analog Input
Make sure that the Analog Branch identified matches the correct component. There are also options to measure the voltage and distance with other components using the Analog Branch.

Interface/Extension
Identifies the interface on which the component and port are located. IF1 is the default control interface. You will not need to change this unless you add extension modules to the interface.

Condition
The condition that will be considered true is entered here. For this activity, change this to less than 300.

Swap Y/N Branches
Choosing this selection causes the 1 and 0 nodes to trade places on the function block.

9. Set the Analog Branch condition to >100.

10. Start the program and slowly turn the potentiometer until the lamp turns off.

11. Modify the program so that the light turns on when the potentiometer is turned. Insert text next to each function block to explain what is happening. Demonstrate the properly functioning program for your instructor.

CONCLUSION

1. Describe why it is important to include branches in programs.

Branches in programs allow multiple things to happen at once, taking the complexity out of it a little bit.

2. Describe an everyday application of a normally open switch that has not been given as an example.

The keys on a keyboard are all just switches normally open with a different function.

3. Describe an everyday application of a normally closed switch that has not been given as an example.

A doorbell in a house is another application, but is normally a closed switch.

Thursday, February 2, 2012

Activity 3.1.3 Basic Programming

ITRODUCTION

Computer programmers often use code to create software and web pages. You have probably heard of hypertext Markup Language (HTML), a common language for creating web pages. Many designers use HTML, but most people utilize software that converts designs to HTML. If you wish to view the original code from a web page, most Internet browsers will allow you to right click in the page and choose View Source.

EQUIPMENT

- RoboPro software
- fishertechnik components:
     - Interface, power supply, USB cable
     - 4 complete wires
     - motor

PROCEDURE

In this activity, you will construct a flowchart that will turn a motor on or off. You will also check the system to see if your flowchart perfroms as written. You will be introduced to four Function Blocks: Start, Motor, Time Delay, and End.

1. Connect the interface to the computer and power supply, and then connect a motor to connection M1.

2. Open RoboPro and ensure that you are properly connected using Test Interface.

3. Click New on the toolbar and choose File --> New form the Menu Bar. You should recognize the shapes of function blocks in the element window on the left as common flowchart shapes. If you do not see shapes on the left, click Level from the Menu Bar and choose Level 1.

You will use the following function blocks to complete this activity.

CREATING A PROGRAM

4. To insert program blocks into the function window, left click on the program block then left click in the function window where the block is to be placed.

5. Insert a Start block into the Function window.

6. Insert a Motor output block into the function window and position if just under Start. If you touch the top node of the Motor output block to the node on the Start block, it will automatically connect. You can also manually connect blocks by left-clicking on one node and then left-clicking on the second node. Right click on the Motor icon to bring up the block information dialog box. You will notice that you can manipulate five specific areas.

Motor Output: identifies current programming function block output port. Your motor is currently attached to M1, so M1 must be selected in order to be controlled through programming.

Image: identifies the image represented on the function block. Selecting the component you have connected to the output port on the interface allows for easy vizualization during programming.

Interface / Extension: identifies the interface on which the component and port are located. IF1 is the default control interface. You will not need to change this unless you add extension modules to the interface.

Action: identifies the action you want the function block to perform when reahed within the program flowchart. If Motor is selected under Image, selecting cw or ccw will send power to a motor. Switching between cw and ccw will change the rotational direction of the motor. Stop removes power from the output. If you change the image from a motor to any other component, these options will change to On and Off.

Speed: controls output voltage from interface port. The higher the number, the greater the voltage output.

7. Insert a Time Delay block into the Function window and position it just under the Motor output block. Right click on the Time Delay block and change the time delay to 3 seconds.

8. Insesrt a Motor output block into the Function window and position it under the Time Delay block. Right click on the Motot output block. Under Action, select stop.
9. Insert an End block into the Function window and position it under the Stop Motor block.

10. Add labels to describe what is happening at each programming step. Select the Drawing Function block, located at the bottom of the Element Window, and click in the function window where you want the text to appear. If you need to edit your text, select the text box, click Draw from the Menu Bar, and choose Edit.

When programs become larger and the function blocks represent actual components, labels are invaluable for planning, troubleshooting, and communicating your process to others.

11. Choose Start from the Toolbar. Watch the function window as the program runs. The function blocks will change color as the program flows. This will be important later when you try to identify where certain functions occur when you run a program.

NOTE: if you need to delete function blocks or drawing objects, highlight the item(s) and click Delete on the keyboard. You may also select Delete from the Toolbar and click on the items that you wish to delete. You can also delete or copy several  objects by left clicking and dragging a large box around them.

12. Modify your program to run a motor for two seconds, off for two seconds, on for two seconds, and finally turn off before the program ends. Insert text next to each function block to explain what is happening. Demonstrate this for your instructor once the program runs successfully.

CONCLUSION

1. What is the best way to make sure that all of your devices are in the correct ports of the interface and have been wired correctly?

The best way to do this is to test it and you can do that by using the test window on your toolbar. If it is not wired correctly, there will either be a notification window or you will see no result in the values (which are supposed to be changing when you run a test).

2. Explain the importance of labeling block functions within a flowchart.

By doing this, you can communicate your ideas to others and make things easier to see for other people attempting to help.

Program 1:


Program 2:

Wednesday, February 1, 2012

Activity 3.1.2 Flowcharting

INTRODUCTION

Flowcharting for engineers and other proffessionals is an important part of planning a process. It is a way to think through a problem and document a solution. When video game developers design games, they must contemplate how the game will react to the many decisions made by players. Every time a player moves a remote or pushes a button, the processor in the game system must react immediately based upon the data provided by the game. Imagine how large a flowchart would be for even a simple video game.

EQUIPMENT

- PowerPoint or Word
- Activity 3.1.2a


(CLICK TO ENLARGE ANY OF THE ABOVE IMAGES)

Activity 3.1.1 Inputs and Outputs

5. In the test interface window, what is the condition of I1 when you are NOT pressing the switch?

Checked or unchecked? unchecked

One or zero? zero

Is voltage present or not present? not present

6. In the test interface window, what is the condition of I1 when you are pressing the switch?

Checked or unchecked? checked

One or zero? one

Is voltage present or not present? present

7. Move the wire in connection 3 on the mini switch to connection 2. Repeat the testing process in steps 5 and 6. What has changed about the behavior of the switch?

It works backwards where step 5 replaces step 6 in properties. So it would look like:

Checked or unchecked? checked

One or zero? one

Is voltage present or not present? present

9. Record the numeric value range of the potentiometer. 53 to 5000

10. Connect the NTC Resistor to the AY analog input. It is not polarity sensitive.

11. Record the value of the NTC resistor. 1832

12. Place the NTC Resistor between your fingers to warm it for 10 seconds. Record the new value. 1690

14. Describe how you can change the direction the motor shaft rotates without switching between cw and ccw.

Switch to 01 and 02 (M1 Mode) and toggle the values.

15. When touching, the value decreases to the absolute minimum, and when 3 inches and farther away, the values are the highest.

16. Normally open (0)

18. The photoresistor's values increase the farther away the activated lamp is.

19. The photoresistor's values increase the closer the lamp is to the pad.

20. The phototransistor can be utilized as a normally open digital input if you apply the light to it.

21. The phototransistor can be utilized as a normally closed digital input by connecting it normally to the circuit and activating it with the light rays.

1. The diagram indicates that ports 1 and 2 are connected in a circuit and are normally open; put with ports 1 and 3, they are normally closed.

2. Computers translate the signals into numerical values to be read on a scale.

3. Because the thermal energy in the metal conducts the electricity more than if the metal is cold.