Top Banner
Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University of Jerusalem
54

Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Jan 20, 2016

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Design of Curves and Surfaces by Multi Objective

OptimizationRony GoldenthalMichel Bercovier

School of Computer Science and EngineeringThe Hebrew University of Jerusalem

Page 2: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Introduction

This work is about curves and surfaces:

Fitting – finding surfaces (curves) as close as possible to a given set of points.

Design/Fairing – generate a surface achieving certain quality measures – design objective (minimal length, minimal curvature,…).

Page 3: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Introduction – cont.

Fitting alone is not sufficient, a certain quality of the resulting surface must be ensured.

Design alone is not sufficient, the surface must relate to some real world geometry – fitting is required.

How to optimize several functions at once ?

Page 4: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Multiple Objective Functions

Suppose we want to incorporate several design objectives into a single optimization process:• Approximation error under L2 or Linf

• Elastic energy• Length/Area• Class A criterions

How to optimize several functions at once ?

Page 5: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Previous work

M. Alhanaty, M. Bercovier; R. Goldenthal, M. Bercovier:

Optimal Control in CAGD:• Decouple fitting from design • For each knot/parametrization

configuration: Solve the state equation (fitting) Evaluate the cost function

• Minimize the cost function (design objective)

Page 6: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Standard Approach :Weighted Sum of Objective Functions

Limitations: Result depends on weights. Some solutions cannot be reached. Multiple runs of the algorithm are

required in order to get the “whole picture”.

Difficult to select weights – cost functions may be in different scales.

Page 7: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

ANSWER: Multi Objective Optimization

Multi objective solution does not have a single optimal solution, but an optimal solution set.

Possibility to implement a decision tool.

Natural set up for Genetic Algorithms.

Page 8: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Genetic algorithms for the single objective problem

The control variables: knot vector, parametrization and NURBS weights modeled as chromosomes.

Motivation for choosing single objective GA:• Highly non-linear behavior of knot vector

modification• Support splines of any order (degree)• Support highly non linear cost functions• Support non-derivable cost functions• Elegant handling of constrains and singular

conditions

Page 9: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Single Objective Genetic Algorithm (SOGA) - outline

1. [Start] Generate random population of n individuals.

2. [Fitness] Evaluate the f(x) of all x in the population.

3. [New population] Create a new population from the old population.

4. [Replace] the old population with the new one. 5. [Test] for end condition, stop, and return the best

solution in current population. 6. [Loop] Go to step 2.

Page 10: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Single Objective Genetic Algorithm (SOGA) - outline

1. [Start] Generate random population of n individuals.

2. [Fitness] Evaluate the f(x) of all x in the population. 3. [New population] Create a new population by these steps (n

times):1. [Selection] Select two parents from the population

according to their fitness.2. [Crossover] performed with a crossover probability.3. [Mutation] performed with a mutation probability.4. [Accepting] Place new offspring in the new population.

4. [Replace] the old population with the new one. 5. [Test] for end condition, stop, and return the best solution in current

population 6. [Loop] Go to step 2.

Page 11: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

GA - Example

The parents:t0 = {0,0,0,0,0.14,0.29,0.43,0.57,0.71,0.86,1,1,1,1}t1 = {0,0,0,0,0.22,0.34,0.45,0.55,0.66,0.78,1,1,1,1}

Their encoding:et0 = {0.14,0.14,0.14,0.14,0.14,0.14,0.14}et1 = {0.22,0.12,0.11,0.10,0.11,0.12,0.22}

One Point crossover with split point = 4:ec0= {0.14,0.14,0.14,0.14,0.14,0.12,0.22}

Normalization:ec0= {0.14,0.14,0.14,0.14,0.14,0.11,0.21}

Page 12: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

GA – Example – cont.

Mutation:• Before:

ec0 = {0.14,0.14,0.14,0.14,0.14,0.11,0.21}• After:

ec0 = {0.14,0.13,0.13,0.15,0.14,0.11,0.21}

Page 13: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

The Parents

Page 14: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Crossover

Page 15: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Mutation

Page 16: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Multi Objective Genetic Algorithm

Multi objective optimization has an optimal solution set.

The main advantage of GA for MOO is that GA keeps a population and not a single solution.

The main difference between SOGA and MOGA is in the selection process.

Page 17: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

MOGA - Selection Better than and worse than

relationships no longer hold.

Relationship among individuals is defined as “domination” relationship.

Page 18: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Domination

For any two solutions x1 and x2

x1 is said to dominate x2 if these conditions hold:• x1 is not worse than x2 in all objectives.• x1 is strictly better than x2 in at least one

objective. If one of the above conditions does not hold x1

does not dominate x2.

Page 19: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Pareto Optimal Set

Non-dominated set: the set of all solutions which are not dominated by any other solution in the sampled search space.

Global Pareto optimal set: there exist no other solution in the entire search space which dominates any member of the set.

Page 20: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Multi Objective Genetic Algorithm – cont.

In each generation the non-dominated set is maintained, fitness is adjusted according to the domination of each individual.

In order to encourage diversity in the population fitness is reduced for similar solutions.

Page 21: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Curve

Input points: 28 Control points: 20 Order: 6 Cost Functions:

• L2 approximation error

• Curve Length• Curvature

Page 22: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Curve

Approximation Error: 1.12Curve Length: 3.322Curvature: 2,082

Page 23: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Curve

Approximation Error: 0.36Curve Length: 3.46Curvature: 191.48

Page 24: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Curve

Approximation Error: 0.075Curve Length: 3.69Curvature: 419.32

Page 25: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Curve

Approximation Error: 0.0258Curve Length: 3.707Curvature: 2467.4

Page 26: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Surface I

Order: 4,4 Input points: 8,8 Control Points: 8,8 Cost functions:

• Surface Area• Surface Curvature

Page 27: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Surface

Surface Area: 174Surface Curvature: 4.9e-29

Page 28: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Surface

Surface Area: 155.77Surface Curvature: 0.099

Page 29: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Surface

Surface Area: 155.16Surface Curvature: 0.04

Page 30: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Surface

Surface Area: 154.72Surface Curvature: 0.12

Page 31: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Surface II

Order: 4,4 Input points: 16,16 Control Points: 5,5 Cost functions:

• Approximation Error• Surface Curvature

Page 32: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Surface

Approximation Error: 5.807Surface Curvature: 3.39

Page 33: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Surface

Approximation Error: 5.19Surface Curvature: 3.56

Page 34: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Surface

Approximation Error: 2.46Surface Curvature: 5.23

Page 35: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Surface

Approximation Error: 1.348Surface Curvature: 9.95

Page 36: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Surface

Approximation Error: 1.256Surface Curvature: 11.51

Page 37: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Surface

Approximation Error: 0.937Surface Curvature: 20.84

Page 38: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Summary

Decision tool for approximation and design. Use of Multi Objective Genetic algorithm. Result is a set of non-dominated solutions. Implementation supports: NURBS curves

and surfaces of arbitrary order. Optimization variables:

• Knot vector• Parameterization• NURBS weights

Page 39: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Summary

Support for various design objective: Curves:

• Length• Curvature• Approximation Error L2/Linf

Surfaces:• Curvature• Wilmore surfaces• Surface Area• Approximation error L2,Linf

Page 40: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Thank You!

[email protected]://www.cs.huji.ac.il/~ronygold

Page 41: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Extra slides

Page 42: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Applications

Surface fitting and design has numerous applications mainly in theses areas:• Industrial design.• Computer graphics.• Statistics.

Page 43: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Genetic Algorithms in CAD

Genetic algorithms in CAD, G. Renner and A. Ekárt

Data fitting with a spline using a real-coded genetic algorithm,F. Yoshimoto, T. Harada and Y. Yoshimoto

Genetic algorithms in free form curve design,A. Márkus, G. Renner and A.J. Váncza

Page 44: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

GA - Encoding

Each individual contains 3 chromosomes:• One for Parametrization s.• One for Knot vector t.• One for the NURBS weights w.

Each chromosome is encoded by real valued numbers.

Intervals between two adjacent vector entries are actually stored (for s and t).

Page 45: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

GA – Initial Population

The initial population was generated randomly while respecting validity constrains:• Positive NURBS weights.• Monotonically increasing parametrization and

knot vector.• Sum of all intervals in parametrization and

knot vector equals curve’s length.

Population size proportional to #(d.o.f).

Page 46: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

GA – Fitness Evaluation

Interpolation/approximation must be performed prior to fitness evaluation.

For each individual in the population the fitness is evaluated.

Violation of Schoenberg-Whitney condition is penalized by the fitness evaluation.

Page 47: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

GA - Crossover

Modified one point crossover used – for each chromosome with the following modification:• The sum of all the intervals that make the

knot vector and the parametrization must remain fixed.

Page 48: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

GA - Mutation

The mutation must respect these constrains:• All intervals must be positive.• Sum of all intervals must remain constant.

The mutation process (identical for all chromosomes):• Randomly select 2 intervals: i,j.• Randomly select x s.t. x < min(v(i),v(j)).• update: v(i) = v(i) + x;

v(j) = v(j) – x;

Page 49: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

GA - Selection In SOGA selecting two parents is done is

done randomly, when the probability of each individual to be a parent is proportional to its fitness.

Tournament, based on the above principle was used.

Page 50: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Curve

Approximation Error: 1.08Curve Length: 3.328Curvature: 926.1

Page 51: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Curve

Approximation Error: 0.4Curve Length: 3.42Curvature: 206.53

Page 52: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Curve

Approximation Error: 0.004961Curve Length: 3.61Curvature: 11,733.6

Page 53: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

NURBS Curve

Approximation Error: 0.07Curve Length: 62,101Curvature: 144.42

Page 54: Design of Curves and Surfaces by Multi Objective Optimization Rony Goldenthal Michel Bercovier School of Computer Science and Engineering The Hebrew University.

Previous works

P. Laurent-Gengoux, M. Mekhilef, “Optimization of a NURBS representation”

J. Loos, G. Greiner, H-P Seidel, “Modeling of surfaces with fair reflection line pattern”

G. Brunnet, J. Keifer, “Inerpolation with minimal-energy splines”