**Calculus in Robotics!**

PID Controller

Integral Control

**Structure:**

use the integral to find sum of these errors

multiply integral value by constant, iGain (determined experimentally)

Motor Speed = (iGain)(Integral value)

Topics We Will Be Covering:

Fourier Series/Transform

Vectors

PID Controller

Fourier Transform

Introduction

**Vectors!**

Remember...

Some Review

What is the integral for?

Calculus plays a significant role in many aspects of robotics and machinery, whether it be through motion control, signal processing, or programming

Our goal for today is to introduce several topics of calculus that hold important applications in the field of robotics

By Karen Malacon & Janice Lee

Proportional Control

Basic, Easy to Use

Difference between setpoint and process variable is error.

Motor Speed=(pGain)(error)

Proportional Gain determined experimentally

Proportional Control

pGain=0.3

error=setpoint-process variable

While(error not negligible)(error=setpoint-processVariable

motorspeed=error*pGain)

The Fourier Transform is a tool that breaks a waveform (function or signal) into an alternate representation, characterized by sine and cosine graphs.

Shows that any waveform can be rewritten as the sum of sinusoidal functions

One of the Fundamental Secrets of the Universe

: All waveforms, no matter what you scribble or observe in the universe, are actually just the sum of simple sinusoids of different frequencies.

Applications

Used in MRI (Magnetic Resonance Imaging) to determine what the frequencies and amplitudes are of the signals measured from the object being imaged.

Audio Compression: Take a sound, expand its fourier series, but converges quickly; MP3 Format

Fourier Series

Way to represent a wave-like function using a combination of simple sine waves.

It decomposes any periodic function or period signal into the sum of a set of simple oscillating functions.

magnitude and direction

cartesian coordinates (x,y)

polar coordinates (magnitude and angle)

Example

Find the fourier series of the function

Formulas We Need to Know:

Fourier Series Notation

Euler-Fourier Formulas

http://www.sosmath.com/fourier/fourier1/fourier1.html

Solution

Since f(x) is odd, then an = 0, for n greater than or equal to 0. We turn our attention to the coefficients bn. For any n greater than or equal to 1, we have

We deduce

Therefore

Proportional

Integral

Derivative

PID Elements

Process box changes the speed of the motor

Pseudo Code

Offset

Derivative Control

What is Derivative?

Hopefully all of you know the answer to this one.

The Derivative will measure how fast the robot arm changes position or how fast the error increases and decreases.

Time

Error

Motor Speed=(dGain)( e)

Derivative Gain

PID Control

Pseudo Code

pGain=0.3

iGain=0.2

dGain=0.1

error=setPoint-processVariable

While(error NOT negligible){

error=setPoint-processVariable

error=errorSum+error

calculate e

motorSpeed=(error*pGain)+(errorSum*iGain)+( e*dGain)}

Vector calculus useful for control of omnidirecional/holonomic robot

Can move sideways and rotate, not just forward backward

Area under the curve in a graph that measures TIME (x) by ERROR (y)

Error = difference between current and final position

Error decreases

as

time increases

(robot arm moves closer to final position as time passes)

pGain = 0.3;

iGain = 0.2;

errorSum = 0;

while(error not negligible)

{

error = setPoint - processVariable;

errorSum = errorSum + error;

motorSpeed = error*pGain + errorSum*iGain;

}