Get your software working before putting it on the robot!

Slides:



Advertisements
Similar presentations
Ch 8 Energy Notes ENERGY.
Advertisements

Teacher Professional Development Spring, 2002
Add and Use a Sensor & Autonomous For FIRST Robotics
Do Now If you are sitting still in your seat on a bus that is traveling 100 km/h on a highway, is your body at rest or in motion? Explain your answer.
Newton’s Three Laws of Motion Physics We’ll discuss the following in this lesson: Newton’s First Law Newton’s Second Law Newton’s Third Law.
How to be sure your robot will turn. My Name: Chris Hibner Mentor FRC 51 - Wings of Fire chiefdelphi.com: “Chris Hibner”
Gears, Gears and More Gears
ProCSI Day 1 – Mechanical Engineering Simulation Based Engineering Lab University of Wisconsin – Madison Prepared by: Justin Madsen.
Falling Objects and Gravity. Air Resistance When an object falls, gravity pulls it down. Air resistance works opposite of gravity and opposes the motion.
Chapter 9: Linear Momentum. THE COURSE THEME: NEWTON’S LAWS OF MOTION! Chs. 4 & 5: Motion analysis with Forces. Ch. 6: Alternative analysis with Work.
Using the “Clicker” If you have a clicker now, and did not do this last time, please enter your ID in your clicker. First, turn on your clicker by sliding.
1Notes  Demetri Terzopoulos talk: Thursday, 4pm Dempster 310.
 Background  Problem Statement  Solution  Mechanical › Azimuth › Elevation › Concepts › Static and Dynamics of System  Software › SatPC32 › Interpolation.
The Basics of Physics.
Single Point of Contact Manipulation of Unknown Objects Stuart Anderson Advisor: Reid Simmons School of Computer Science Carnegie Mellon University.
Algebra Problems… Solutions
CS 4730 Physical Simulation CS 4730 – Computer Game Design.
Unit 01 “Forces and the Laws of Motion” Introduction to Forces
C. Newton’s Laws & Forces AP Physics
Linear Motion with constant acceleration Physics 6A Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB.
Chapter 1 Computing Tools Analytic and Algorithmic Solutions Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Lecture 6 Newton’s Laws and Forces Sir Issac Newton ( )
Newton’s Laws of Motion 1. If the sum of all external forces on an object is zero, then its speed and direction will not change. Inertia 2. If a nonzero.
1 Newton’s Laws Isaac Newton born: Dec 25, st. Law of motion: The Law of Inertia (Actually, this is not Newton's idea, it is a restatement of.
Teacher Reference Page This powerpoint is a presentation of Forces and Newton’s Laws. It probably goes through more than is necessary for students to know.
Forces & Motion The Force of Friction. Frictional Forces Frictional forces arise from complex interactions between the surfaces of objects. Even very.
Feedback Control Systems (FCS) Dr. Imtiaz Hussain URL :
Forces and the Laws of Motion
Robot sensors MVRT 2010 – 2011 season. Analog versus Digital Analog Goes from 0 to 254 Numerous values Similar to making waves because there are not sudden.
Important situations in circular motion. When accelerating, the feeling you have is opposite the acceleration This is why it feels like there is centrifugal.
Conservation of Angular Momentum 8.01 W11D2 Fall 2006.
Circular Motion. PhET Lady Bug Motion Think about this Click “Show Both” at the top, and “Circular” at the bottom Watch the following and comment: Which.
Notes on Motion VI Free Fall A Special type of uniform acceleration.
TAKS Objective 5 Motion, Forces and Energy Motion can be described as a change in an object’s position Average velocity (speed) is the change of position.
Advanced Computer Graphics Rigid Body Simulation Spring 2002 Professor Brogan.
Equilibrium & Newton’s 2nd Law of Motion
ME451 Kinematics and Dynamics of Machine Systems Introduction to Dynamics 6.1 October 09, 2013 Radu Serban University of Wisconsin-Madison.
In Unit 5: Speed, Power, Torque, and DC Motors, you build a VEX test stand winch that enables you to learn key engineering concepts and principles so.
Chapter 2 Forces and Motion Dr. Gluck. Forces and Motion Laws of Motion 2.1 Newton's First Law 2.2 Acceleration and Newton's Second Law 2.3 Gravity and.
Stuff you asked about: I thought I understood the concepts in the pre-lecture until they went over the three examples. I felt that it moved too fast especially.
Unit 5: Motion, Forces & Simple Machines. Section 1: What is Motion? Objectives:  Define motion  Calculate speed, velocity, and acceleration Assessment.
by Richard J. Terwilliger Arrrgh Mate! That Pirate Ship won’t get my booty.
TAKS Objective 5 Force and Motion Day 13 Forces and Motion Forces can create changes in motion. Acceleration Deceleration What happens if I put force.
ME451 Kinematics and Dynamics of Machine Systems Dynamics of Planar Systems December 6, 2011 Equilibrium Analysis & Inverse Dynamics Analysis ME451 Wrap.
FORCES OF MOTION Georgia Shared Resources. STANDARDS.
Motion, Forces and Energy
By Droids Robotics INTERMEDIATE PROGRAMMIN G LESSON COLOR LINE FOLLOWER MY BLOCK WITH INPUTS: MOVE FOR DISTANCE.
Mass – the amount of matter in an object Will not change according to location Weight – measures the gravitational pull on an object Depends on gravity,
Motion and simple machines Unit 33 Dr. Hatem Elaydi Engineering Technical English Islamic University of Gaza March 28, 2016.
Creating Flexible, Script-Controlled Autonomous Software Example Explanation.
Creating Flexible, Script-Controlled Autonomous Software.
Get your software working before putting it on the robot! Example Explanation.
Feedback Control Systems (FCS)
Linear Motion with constant acceleration
ME 114 Computer Assignment #1
Control Loops Nick Schatz FRC 3184.
8th Grade Physical Science
8th Grade Physical Science
Newton’s Laws of Motion
Object at rest stays at rest,
INTERMEDIATE PROGRAMMING LESSON
Object at rest stays at rest,
INTERMEDIATE PROGRAMMING LESSON
Ch. 4 Forces and Motion PS2.
Using the “Clicker” If you have a clicker now, and did not do this last time, please enter your ID in your clicker. First, turn on your clicker by sliding.
Advanced LabVIEW
Newton’s 2nd Law: Relating Force, Mass, and Acceleration
Force and Motion (H) Newton's second law. Inertia. Weight.
The Man’s Jeopardy.
Journal Entry 9 Newton’s Laws of Motion
Presentation transcript:

Get your software working before putting it on the robot!

My name: Chris Hibner Mentor FRC 51 - Wings of Fire  Control Systems Engineer  Involved with FIRST for a LONG time  Plenty of industry experience  Cool Degrees (Go Blue!) chiefdelphi.com: “Chris Hibner”

 Motivation: why learn this stuff?  Simple Logic Simulation  Modelling: 1 st order models  Modelling: Physics equation models  Simulating some example software  Moving between simulation and the robot  Where to go from here...

Why should I care about this? 1. Good for complex control code: state machines, feedback loops, automated sequences, etc. 2. Time crunch: You don’t get much time with the robot to test and debug. 3. Safety!!: Software bugs can damage your robot or people. 4. Makes debugging much easier: not only can you pause the software – you can pause the motion too. 5. Allows programming students a “safe” environment to experiment and learn.

Complicated example: 2010 Kicker Control

1. Create your control software  Make your software a portable unit LabVIEW: create a vi Java/C++: create a class 2. Create a simulation environment 3. Create a mathematical model  What’s a model?  How accurate does it need to be?  Model Inputs? Motor commands  Model Outputs? Sensor outputs, position, speed, etc.

Simulation Environment

 A “First Order” model uses a simple filter to simulate speed changes.  Why?  Most objects controlled by a DC motor: the “step response” very closely follows a filtered version of the step. time Step Input

 What does the step response of a motor look like? time 1 2 3

Step Response – Actual Physics

Step Response – First Order Filter

 How to get the filter to match the physics?  Need to know two things: 1. The top speed multiply the filter output by the top speed (simple) 2. How long it takes to reach the top speed set “time constant” according to how much time it takes to get to the top speed.  “Eyeballing” is usually good enough  Let’s eyeball the motor step response and see how close we come.

Step Response – Actual Physics ~3.23 ~1.7 sec

Step Response –Physics vs. Filter

 Elevator without gravity  LabVIEW example of elevator speed

 We modelled speed in the last example, but we need position...  Acceleration, Velocity, Distance:  you only need to know one – the other two can be calculated Acceleration Velocity Distance integral derivative

 Back to our example  We knew velocity  Let’s add distance and acceleration

 How to add external forces, like gravity or springs?  Use “equivalent motor command” method  How to add travel limits (like for an elevator)? 1. Set output of filter to 0 speed (stop it moving) 2. Stop motor command like you would with a limit switch You need to add a little logic

 Elevator model with gravity  How do you add gravity to an arm?

 Let’s add some control software  What do you want it to do?

 You rarely need to go to a physics model.  If you find yourself making a physics model, ask yourself if you really need it.  You probably won’t need it for software testing, but maybe the mechanical team needs to see if their gearing will operate the arm.

 Newton’s 2 nd Law is everything Linear Motion: F = m*a Rotational Motion: T = I * alpha  Solve for the acceleration: a = F / m or alpha = T / I  Important: F is the SUM of ALL forces

 Acceleration, Velocity, Distance  You only need to know one – the other two can be calculated Acceleration Velocity Distance integral derivative

 Ignore what is insignificant!  For robot drive system, just calculate forces at the wheels  Ignore wheel inertia since mass of the robot is MUCH larger  For arm model, ignore inertia of motors and gears – just use the arm inertia.

 Are they important?  It depends.  Does the sensor dynamics affect your control?  Encoder model

 Sensor noise – especially if using D control. Sensor value Sensor value with noise

 Software from a team

 Since you made your code as a unit (right?), just put the code in the project and “hook it up”  Use the same FILE in your robot project as you used in your simulation.  That way, if you make future changes and want to test them in simulation, you don’t have to maintain two copies of the code.  IMPORTANT: Before running on the real robot, check that 1) motors go in expected direction, 2) sensor polarity is correct.

If you didn’t notice this on the last slide, I’ll say it again:  IMPORTANT: Before running on the real robot, check that 1) motors go in expected direction, 2) sensor polarity is correct.  What happens if a sensor or motor goes in the opposite direction of what you expect?  Let’s check the simulation

 Demonstration

 Why? Get the bugs out of your complex control code BEFORE putting it on the robot.  How: Create your software.  Create a simulation environment.  Create a model (if necessary).  Use the simplest model possible!  Use a little calculus

 LabVIEW  Microsoft Visual Studio Express (free!)

 Presentation material and sample software will be posted on chiefdelphi.com in CD media whitepapers area.  Feel free to send me a PM on chiefdelphi.com: “Chris Hibner