Presentation is loading. Please wait.

Presentation is loading. Please wait.

PLTW CALIFORNIA STATE CONFERENCE CENTENNIAL HIGH SCHOOL

Similar presentations


Presentation on theme: "PLTW CALIFORNIA STATE CONFERENCE CENTENNIAL HIGH SCHOOL"— Presentation transcript:

1 PLTW CALIFORNIA STATE CONFERENCE CENTENNIAL HIGH SCHOOL
Taking RobotC Programming to the Next Level PLTW CALIFORNIA STATE CONFERENCE January 26, 2016 COLIN SMITH CENTENNIAL HIGH SCHOOL BAKERSFIELD, CA

2 Motivation Allow more advanced programmers to explore further options
Differentiated Instruction for Machine Control unit in Principles of Engineering More variety in Project 3.3.1 Increase 'pool' of potential VRC students Allow increased training for VRC students

3 Outline vexNet and VEX remote Multitasking Motor Speed calculation
PID Control Loops

4

5

6

7 vexNET Requires pairing of cortex with a remote
Can use a usb or the vexNET wireless keys Adds 8 channels with 12 digital buttons and 4 'analog' inputs Includes a built in accelerometer Allows additional user input to control robot function Can be used just like any other inputs

8 Pairing

9

10 Sensor vs. Remote

11

12 Example: ClawBot

13 Multi-Tasking Limitations of Linear programming
Users must be careful with what control structures are being used. Adding tasks to control different motors/sensors Sensors can be shared, motors shouldn't

14 Implementing Multitasking
Works like function declaration Task can be started or stopped within main() using the StartTask or StopTask functions.

15 continued Finally, the task must be defined

16 Use of Multi-tasking Materials sorter Emergency shutoff
Allows multiple actions to occur ‘simultaneously’ Materials sorter Emergency shutoff StopAllTasks function

17 Proportional Control Use variables for iterative control of motor speeds Sensors are required for continuous input A target value is set and is used to control the speed of the motor(s)

18 Error Inside a loop, the ‘distance’ to the target is used to determine the speed of the motor. This distance to target is often referred to as the error

19 Proportionality Instead of a 1:1 ratio between the error and the motor speed, there is often a proportionality constant used to ‘tune’ the response of the motor.

20 Tuning the Proportionality constant

21 Integral Sometimes tuning the Proportional term makes it so you do not reach your target, but have an offset. The integral term allows you to adjust the value to reach the specified target. The error is summed (integrated).

22 Proportional Integrated Control
The motorspeed is determined by the proportional and integrated terms. Because the error is generally large at first, the integrated constant is much smaller.

23 Derivative To control how quickly the control loop reacts to change, you can look at how much the error is changing (derivative).

24 PID Control The three terms can all be added together to create a responsive standard of motor control

25 Velocity Calculation

26 PID Velocity Control

27 Putting it Together

28 Additional Resources www.vexforum.com

29 PLTW CALIFORNIA STATE CONFERENCE CENTENNIAL HIGH SCHOOL
Taking RobotC Programming to the Next Level PLTW CALIFORNIA STATE CONFERENCE January 26, 2016 COLIN SMITH CENTENNIAL HIGH SCHOOL BAKERSFIELD, CA


Download ppt "PLTW CALIFORNIA STATE CONFERENCE CENTENNIAL HIGH SCHOOL"

Similar presentations


Ads by Google