14
Rapid Prototyping of Dynamic Robots - Nick Morozovsky - Oct 4, 2016 - Engineering Tomorrow’s Robots and Drones Today Rapid Prototyping of Dynamic Robots Nick Morozovsky, PhD Co-Founder, Accel Robotics @DrNickMo October 4, 2016 1

Rapid Prototyping of Dynamic Robots

Embed Size (px)

Citation preview

Page 1: Rapid Prototyping of Dynamic Robots

Rapid Prototyping of Dynamic Robots - Nick Morozovsky - Oct 4, 2016 -

Engineering Tomorrow’s Robots and Drones Today

Rapid Prototyping of Dynamic RobotsNick Morozovsky, PhDCo-Founder, Accel Robotics

@DrNickMoOctober 4, 2016

1

Page 2: Rapid Prototyping of Dynamic Robots

Rapid Prototyping of Dynamic Robots - Nick Morozovsky - Oct 4, 2016 -

Outline

• Introduction

• Tools for Rapid Prototyping

• Sensors

• Simulation Case Study

• Conclusions

2

Page 3: Rapid Prototyping of Dynamic Robots

Rapid Prototyping of Dynamic Robots - Nick Morozovsky - Oct 4, 2016 -

Introduction Robotics Challenges

MobilityPerception

Manipulation“Go get me a beer

from the fridge”

Stairs

Openinga door

Sand, eggs, clothes

Unstructuredterrain

Where tograsp object

LocalizationMapping

3

Page 4: Rapid Prototyping of Dynamic Robots

Rapid Prototyping of Dynamic Robots - Nick Morozovsky - Oct 4, 2016 -

Introduction Robotics Landscape

Cost ($)

Func

tiona

lity

Toys

Service

102 106103 104

Cleaners

101

MedicalManufacturing

Military

Consumer Commercial Industrial

4

105

Page 5: Rapid Prototyping of Dynamic Robots

Rapid Prototyping of Dynamic Robots - Nick Morozovsky - Oct 4, 2016 -

Tools for Rapid Prototyping Paradigm Shift

• Digitally fabricated custom mechanical structure

• Ecosystem of off-the-shelf single board computers and sensors

• Powerful open-source software available

• Trade-off between optimizing for rapid prototyping and production

• Trend: 3D printing for production, niche/custom parts that aren’t cost-effective to tool up

5

racewaredirect.co

Page 6: Rapid Prototyping of Dynamic Robots

Rapid Prototyping of Dynamic Robots - Nick Morozovsky - Oct 4, 2016 -

Tools for Rapid Prototyping 3D Printer vs. Laser Cutter

6

3D Printer Laser Cutter

Speed Slow Fast

Dimensions 3D 2D

Material Selection Limited, but growing Diverse

Limitations Anisotropic, Surface Finish Flat

Design Tips Print Orientation Selection, Captive Nuts

Tab & Slot, T-Slot, Living Hinge, Kerf

Cost $300+ $3,000+

Page 7: Rapid Prototyping of Dynamic Robots

Rapid Prototyping of Dynamic Robots - Nick Morozovsky - Oct 4, 2016 -

Sensors

• Cost reduction driven by smartphone development

• Accelerometers, gyroscopes, magnetometers, light sensors, cameras, GPS, WiFi, Bluetooth, etc.

• Be smarter than the sensor

• Filters: low-pass, high-pass, moving average, median

• Calibration: use estimator (Kalman filter) for bias and drift

• Redundancy: decrease noise, add robustness

7

Page 8: Rapid Prototyping of Dynamic Robots

Rapid Prototyping of Dynamic Robots - Nick Morozovsky - Oct 4, 2016 -

Sensors Complementary Filter

• MEMS accelerometer can measure absolute angle of gravity vector

• Susceptible to high frequency noise and body accelerations

• MEMS gyroscope can be integrated to measure incremental angle

• Susceptible to thermal drift and integration error

• Use complementary filter to combine accelerometer and gyroscope measurements

atan2

1/s

Low Pass

High Pass

s

Accelerometer

Gyroscope

Encoder

++

++

++ �̇

✓̇

µGHP =1/!c

1/!c + h, µALP =

h

1/!c + h

θ

LC

r

mC

mW x

8

Page 9: Rapid Prototyping of Dynamic Robots

Rapid Prototyping of Dynamic Robots - Nick Morozovsky - Oct 4, 2016 -

Sensors Encoder Velocity Estimation

• Limited by encoder and clock resolution

• Quadrature sub-periods are not equal

• Measure four separate periods

• Average multiple periods when possible (M ≥ 2)

• Bound low speed by time since last edge (M < 1)

• Mount encoder before gearbox for increased resolution

A

ARF

B

AFR

BFR BRF

AR BR BR AF AF BF BF AR

ARR

BFF

M =2!hCPR

9

Page 10: Rapid Prototyping of Dynamic Robots

Rapid Prototyping of Dynamic Robots - Nick Morozovsky - Oct 4, 2016 -

Simulation Case Study Switchblade UGV

• Tread assemblies can pivot w.r.t. the central chassis

• Significantly changes the center of mass

• Different modes of locomotion

• Applications: search & rescue, border patrol, mine exploration, toy/entertainment

• Patent pending

10

Page 11: Rapid Prototyping of Dynamic Robots

Rapid Prototyping of Dynamic Robots - Nick Morozovsky - Oct 4, 2016 -

Simulation Case Study Backlash Modeling

• Backlash can be modeled as a switched system

• Derive coupled and uncoupled dynamics and conditions for coupling and uncoupling

if coupledOld == 0 % uncoupled % if gap is >= backlash and relative speed is same sign as gap, couple if (abs(gap) >= delta) && (sign(relVelocity) == sign(gap)) % +'ve or -'ve engagement coupled = sign(gap); resetVel = ( J2*x(6) + Jg*x(7) )/(Jg+J2); resetPos = [x(1); x(3)+sign(gap)*delta; x(3); x(4); x(5); resetVel; resetVel; x(8)]; else % stay uncoupled coupled = 0; endelse % coupled % if relative acceleration is opposite sign as gap, uncouple if sign(relativeAcceleration) == -sign(gap) % accelerating to open gap, uncouple coupled = 0; else % stay coupled coupled = coupledOld; endend

Motor Load

γ α

11

Page 12: Rapid Prototyping of Dynamic Robots

Rapid Prototyping of Dynamic Robots - Nick Morozovsky - Oct 4, 2016 -

θ

αϕ

x

Simulation Case Study Results: Simulation vs. Experiment

0 1 2 3 4 5 6−500

0

500

t(s)

φ (d

eg.)

0 1 2 3 4 5 6−50

0

50

100

t(s)

α (d

eg.)

SimulationExperimental

0 1 2 3 4 5 6−50

0

50

t(s)θ

(deg

.)

B =

2

664

0 0

1 0

0 1

�1 �1

3

775 .

We next impose a no-slip constraint between the treadsprocket and the ground, which will be shown also achievesa coordinate reduction, via

x+ r� = 0, (2)

or equivalently

Aq̇ = 0, A =

�1 r 0 0

�.

In this system, A is not dependent on q. We append (1)with the inner product of the constraint matrix A with �, theLagrange multiplier:

M(q)q̈ + F (q, q̇) = B⌧ +A

T�. (3)

A basis for the null space of A is given by

S =

2

664

�r 0 0

1 0 0

0 1 0

0 0 1

3

775 . (4)

Given that q̇ is in this space, we define ⌫ accordingly as

q̇ = S⌫, ⌫ =

�˙

� ↵̇

˙

�T. (5)

Premultiplying by S

T and using (5), we can rewrite (3) as

S

TM(q)S⌫̇ + S

TF (q, q̇) = S

TB⌧. (6)

Noting that the dynamics of x and � are directly coupledby (2), we can choose a reduced coordinate set qr =�� ↵ ✓

�T . Likewise truncating the top row of (4),Sr = I3⇥3 and we see that q̇r = ⌫ directly from (5).

Finally, we model the torque output ⌧ from each motorlinearly as

⌧ = su� b!, s =

k�V

R

, b =

(k�)

2

R

, (7)

where s is the stall torque, u is the control input (limitedto [�1, 1]), b is the damping coefficient of the motor, ! isthe speed of the motor shaft relative to the motor body, k isthe motor constant, � is the gear ratio of the transmission,V is the nominal voltage applied across the terminals, andR is the terminal resistance. Substituting the motor model,we can rewrite (6) using Rayleigh’s dissipation function

S

TM(q)S⌫̇ + S

TF (q, q̇) = S

TB[su�D(q̇)], (8)

s =

✓sS 0

0 sT

◆, D(q̇) =

✓bS(

˙

�� ˙

✓)

bT (↵̇� ˙

✓)

◆.

Concatenating qr and ⌫ yields a complete state vector x.Rewriting (8), we see that this nonlinear system is affine inthe inputs:

x =

✓qr

◆,

˙

x = f(x) + g(x)u,

f(x) =

✓⌫

�[S

TM(q)S]

�1S

T[F (q, q̇) +BD(q̇)]

◆,

g(x) =

✓03⇥2⇥

S

TM(q)S

⇤�1S

TBs

◆.

IV. CONTROLLER DESIGN

A. Linearization and LQRWe begin by linearizing the system about the desired

operating point, the unstable equilibrium with all states andcontrol inputs equal to zero.

˙

x = Ax+Bu, A =

�f

�x

���x=0

, B = g(x)

���x=0

. (9)

A state feedback gain matrix Kc is found using the linearquadratic regulator (LQR) method. The weighting matricesare determined by Bryson’s method:

Qc = diag

✓1

(3⇡)

2

1

(1/8)

2

1

(1/8)

2

1

(8⇡)

2

1

(7/2)

2

1

(7/2)

2

�◆

Rc = diag

✓1

(1/4)

2

1

(1/2)

2

�◆, Nc = 06⇥2.

As noted, the motor model in (7) is valid for a boundedcontrol input u, so each element from u = Kcx is saturatedat unity magnitude.

An important finding is that simply running the con-troller from certain statically stable positions (e.g. the treadassembly horizontal ↵ = 90

� and the chassis just pastvertical ✓ = �15

�) is sufficient to upright and stabilizethe robot, see Fig. 4. Given these initial conditions, thecenter of mass is near the end of the treads by the chassis(Fig. 4a), and the control law derived from LQR will drivethe treads backwards (Fig. 4b), which will cause the robotto tip forwards leaving only the tread sprocket in contactwith the ground (Fig. 4c). Simultaneously, the V-angle isreduced by actuation of the motors between the chassis andtread assemblies (Fig. 4d) and the treads are driven until thesprocket is back in the original position (Fig. 4e).

(a) (b) (c)

(d) (e)

Fig. 4: Maneuver for uprighting into V-balance mode withLQR control with center of mass indicated.

B. DiscretizationSince the control will be implemented with digital elec-

tronics, we must discretize the system; we choose a sampletime of h = 0.01s. We convert our continuous-time systemfrom (9) using the matrix exponential:

12

Page 13: Rapid Prototyping of Dynamic Robots

Rapid Prototyping of Dynamic Robots - Nick Morozovsky - Oct 4, 2016 - 13

Page 14: Rapid Prototyping of Dynamic Robots

Rapid Prototyping of Dynamic Robots - Nick Morozovsky - Oct 4, 2016 -

Conclusions Rules of Robotics

1. Never disassemble a working robot.

2. If it works the first time, you’re testing it wrong.

3. When in doubt, lubricate.

4. Never underestimate the estimation problem.

5. If specs for a part are listed differently in two places, they’re both wrong.

6. Glue, tape, and zip-ties are not engineering solutions (though they might work in a pinch).

7. Do not leave lithium polymer batteries charging unattended.

8. Always have a complete CAD model, including screws and fasteners, before constructing your robot.

9. Avoid using slip rings if at all possible.

10.Clamping collars are always better than set screws. If you have to use set screws (e.g. for cost reasons), use a driving flat and an appropriate thread-locking agent.

11.Always check polarity before plugging a component into a power source.

14