scilabtec 2015 - noesis solutions

37
Using an Evolutionary Optimization approach to tune a PID controlled robotic arm Taylor Newill – Noesis Solutions, NA Technical Services Silvia Poles – Noesis Solutions, Engineering Manager

Upload: scilab-enterprises

Post on 29-Jul-2015

94 views

Category:

Presentations & Public Speaking


2 download

TRANSCRIPT

Using an Evolutionary Optimization approach to tune a PID controlled robotic arm

Taylor Newill – Noesis Solutions, NA Technical Services

Silvia Poles – Noesis Solutions, Engineering Manager

AgendaOptimus Overview

Integrating Scilab

Genetic optimization of a PID

1

2

3Future Development4

AgendaOptimus Overview

Integrating Scilab

Genetic optimization of a PID

1

2

3Future Development4

Optimus: A Technology Connection Platform

Creating a repeatable, automated process: • Multi code, • Multi CPU, • Synced

Rapid identification of key design variables: • Histograms• Sobol indices, ANOVA• Taguchi

Process Integration Design of Experiments

• Create surrogate models from any dataset

• Multiple approaches are tried and the best one can be used

Response surface modelsOptimization• Gradient• Evolutionary• HybridRobust Design• Design for Six Sigma• Taguchi• FORM• FOSM

Optimization & Robust Design

Optimus: An Open Platform

• Can drive any CLI• Embedded as a UCI/UCA• Externally through generic

Interfaces

• External algorithms can be used with ‘User Optimization’

• Driven from simple XML script• Any code can be used, python, C,

scilab, etc.

Connect any Software Apply any Algorithm

• Java based GUI• ‘One click’ connection with

queuing systems

Drive from any Environment

All functionality available through python API

Full API

Noesis Solutions - Solutions for Engineering Optimization

… more than 100+ person-years experience in PIDO

… sales offices across Europe, US and Asia realizing double digit profitable growth for 18+ years.

A leading software & services provider

A strong worldwide presence

… Optimus is our only product and focus, and we partner with all major CAE and mathematical modeling vendors

An independent innovation partner

Noesis Solutions

Noesis SolutionsMost extensively deployed software of its kind…

A few default interfaces

Automated

Multi code

Multi CPU

Repeatable

CFD

20 Design parameters

FEA

Post-Processing

Integrating Scilab in Optimus

1

Should I Automate? (XKCD 1319)

Mouse over Text:

‘Automating’ comes from the

roots ‘auto-’ meaning ‘self-’ and

‘mating’, meaning ‘screwing’

Is it worth the time? (XKCD 1205)

Integrating Scilab scripts in Otimus• User Customizable Interface

• The UCI is easily configured with XML-files, respecting a very simple syntax

• Drag and drop functionality for easy multiple disciplines

Scilab UCI

The SCE file is updated with every experiment, the xcos file is imported, then the results are extracted and then calculations are done on the resultant curves

Evolutionary Optimization of a PID Controlled Robotic Arm

2

Robotic Arm• Programmable mechanical arm

• The links of of the robot are connected by joints allowing

– rotational (angular) displacement– translational (linear) displacement

• The links of the robot form a kinematic chain

• The terminus of the kinematic chain is the end effector

PID Control (Wikipedia)• When the robotic arm is given a target, a

PID loop is used to control the movement of the arm relative to the target

• PID is a proportional-integral-derivative controller

• It is a control loop feedback mechanisms

• A PID controller calculates an error value as the difference between a measured process variable and a desired target

• The controller attempts to minimize the error by adjusting the process through use of a manipulated variable.

The Challenge• Typically, robotic arms are tuned by tuning one

PID loop at a time and cycling through the loops until the overall behavior is satisfactory.

• This process can be time consuming and is not guaranteed to converge to the best overall tuning.

• In this example we will automate the tuning of 1 PID, multiple PID’s have since been added

Robotic Tools for Scilab/Xcos• From the ‘Scilab Ninja’

– Dr. Varodom Toochinda

• Beta Version– Kinematics– Dynamics– Path generation– Control

Evolutionary Optimization• Start with a population

covering the design space

• Make slight changes to input variables of the best performing experiments

• Make a new population based on the best performing experiments

Scilab/XCOS Setup

Parametric Usage of the Toolbox

• Optimus will detect any controllable inputs

• Outputs can be extracted– From memory

– From output files

– From response variables

Process Integration

Automation

Optimization Strategy

DOE

RSM

GLOBAL

OPTIMIZATIONLOCAL

OPTIMIZATION

GOAL

Design of Experiments• Individual runs took about 30

seconds

• Wanted to adequately cover the design space– 3 inputs, 3 responses– 81 experiments tested

• Latin Hypercube DOE was used

Response Surface Model• 18 different RSM’s

were tested, RBF was selected

• Lowest error, created quickly, easily exported

Response Surface Model

Evolutionary Optimization• Multiple strategies

will be compared• All run on RSM• Results validated with

simulation• Objective is to reduce

PID error and reduce experiment count

• Single Objective Optimization Algorithms Tested– Differential– Self adaptive– Simulated Annealing– CMA-ES– Particle Swarm

Comparison of Optimization Strategies

Baseline vs. Optimal

Performance ImpactStrategy Experiments Normalized

PID ErrorValidated Difference

from Nominal

Nominal 0 892553

Differential 256 660291 659332 26.1%

Self Adaptive 333 660575 660027 26.05%

Annealing 153 660100 659301 26.13%

Particle Swarm 664 660085 658948 26.17%

CMA-ES 233 661889 661149 25.92%

Resource ImpactTask Time w/o

OptimusTime with Optimus

Total Time Saved

Create Robotic arm model 120 min 120 min 0

Create workflow 0 5 min -5 min

Test each PID setting (3) 2 min 0 6 min

Tune entire PID (3) 60 min 0 180 min

Simulate arm movement 2 min 2 min 0

Run Optimization (253 simulations)

506 CPU min 200 CPU min 306 CPU min

Is it worth the time?

• Workflow development took 10 minutes

• For one tuning routine Optimus saved

– 3 hours of human time

– 5 CPU hours

With Scilab and Optimus you can

Conclusion

Save Time Consolidate Knowledge

• Drive Scilab and combine with other tools

• Automate Repetitive Tasks

• Maximize efficient use of your simulation resources

• Simplify your design work by focusing on key parameters

• Automate parametric studies

• Intelligent optimization methods

• Create fast and accurate meta models

• Share model data through Excel, etc…

Improve Performance

Questions & Answers

www.noesissolutions.com

[email protected]

[email protected]

Web

E-mail