Part A: Texas A&M University MEEN 683 Multidisciplinary System Design Optimization (MSADO) Spring 2021 Assignment 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

TEXAS A&M UNIVERSITY

MEEN 683 Multidisciplinary System Design Optimization (MSADO)


Spring 2021

Assignment 2
You are expected to solve Part (a) individually and Part (b) in your project team. Each person
must submit their own Part (a) but you should submit Part (b) as a group. Please indicate the
name(s) of your teammate(s).

Part A
(P1) Gradient-Based Optimization. Consider the function, f (x) = 23 x12 + 2x1 x2 + 3x22 + 2x1 − 8x2 .
Starting from the point, x0 = [1, 1]T , take two optimal steps of the steepest descent algorithm.
Note, this is descent, not ascent being asked for, and optimal here means optimal step size as dis-
cussed in Lecture 5 and Lecture 6. Report out the gradient and the new x location for each step.
Are the directions of each step orthogonal? You may complete this problem in many ways, such as
using the methods of Lecture 5 with calculus, Lecture 6 with linear algebra, or numerically on the
computer. For determining whether or not the two step directions were orthogonal, you can plot
the steps, appeal to linear algebra (check the inner product), or use other geometric means. If you
choose to do this problem computationally, all code must be turned in.

(P2) Constrained Optimization with a Penalty Method. Consider the optimization problem

1
f ∗ = max − x2 + x
x 2
Subject to: x ≤ −1

Using a quadratic penalty function (see slide 21 of Lecture 7), write the penalized objective as a
function of x and c, where c is the coefficient of the penalty term. Write an expression for the
derivative of the penalized objective function as a function of x and c. Setting this derivative equal
to 0, solve for x as a function of c. What is the value of x as c → ∞? Does this make sense?

(P3) Constrained Optimization with a Barrier Method Consider the optimization problem

f ∗ = min 2x12 + 9x2


x
Subject to: x1 + x2 ≥ 4

Write the barrier method equivalent of this problem (see Slide 24 of Lecture 7). Set the gradient
equal to zero and solve for x as a function of r. What is the value of x as r → 0? Does this make
sense?
(P4) Solving a Coupled System with Fixed Point Iteration. In this problem, we will use a fixed-
point iteration approach to resolve two coupled, nonlinear equations. This situation is common
when you have feedback coupling between two disciplines. Using fixed point iteration is often one
method you could choose to use to deal with the coupling. Lecture 8 included a “tearing” approach
using extra variables as an alternative. For this problem, consider the system of equations:
1
x1 − (cos x1 − sin x2 ) = 0 (1)
4
1
(x1 − x2 ) − sin x2 = 0 (2)
4
Fixed point iteration works in the following manner. We first rewrite our functions in the form

x1 = g1 (x1 , x2 ) (3)
x2 = g2 (x1 , x2 ) (4)

Do this and report your new system of equations. Next, we initialize x1 and x2 , which we will
do here with x1 = 0 and x2 = 0. In a ‘while-loop’, we then store the old values of x1 and x2 ,
update x1 using x1 = g1 (x1old , x2old ), and then x2 = g1 (x1 , x2old ). We can compute an error using
error = (x1 − x1old )2 + (x2 − x2old )2 . Using this error, exit the while-loop once the error is less than a
specified tolerance, which for this problem we will set as tol = 1e − 8.

Your task. Using software of your choosing, create code (script file) that will perform the fixed-
point iteration as described above. Report out the final values of x1 and x2 , as well as the amount
of time the while-loop is active. If each iteration through the while-loop actually takes 1 minute of
clock time, how long would this fixed-point iteration have taken?

(P5) Design of Experiments. Consider the following L9 (34 ) orthogonal array with results given
in the last column.

Expt. No. x1 x2 x3 x4 f (x)


1 -5 -2 0 10 5.68
2 -5 0 5 25 -12.50
3 -5 2 10 40 -30.68
4 0 -2 5 40 -31.82
5 0 0 10 10 -50.00
6 0 2 0 25 6.82
7 5 -2 10 25 -44.32
8 5 0 0 40 12.50
9 5 2 5 10 -5.68

The table reveals the variable settings for variables x1 , x2 , x3 and x4 , as well as the output for those
settings, f (x). In this case, the experiment is a computer experiment on a “black-box” function,
for which we can only pass inputs and get back outputs (we do not know what is going on inside
the box). This is very common when working with disciplinary codes you did not write and is also
common for those circumstances where you can “see in the box” but the equations/code are too
complicated to for analysis by hand. For this experiment, compute the overall mean (µ), and the
means for each variable level (µx1 ,L1 , etc.). From this information, for each variable, compute
3
1
var( f (x)|xi ) ≈
3 ∑ (µ − µxi,L j )2. (5)
j=1

This quantity is like a sensitivity index for the design of experiments that tells us the importance of
the variable xi . Given these values for each variable, which variable appears to be the most impor-
tant? Do you think you can fix any of the variables to a nominal value without having much impact
on f (x)? Note, these questions are important and are the sort of thing you and your teammates
should be asking yourselves when you apply a design of experiments to your project in preparation
for optimization later.

(P6) Interior Optima. A water canal with a fixed cross-sectional area must be designed so that
its discharge capacity (flow rate) is maximized. The canal cross-section geometry is shown in
Figure 1. The design variables are the height d, the width of the base b, and the angle of the sides
φ . It can be shown that the flow rate is proportional to the inverse of the wetted parameter, p, which
is given by p = b + (2d/ sin φ ). The area of the canal is A = db + d 2 cot φ . The area is to be set at
100ft2 . To maximize the flow rate subject to the area constraint, we could consider the problem:

Figure 1: Cross-Section of Water Canal

K
max (6)
b,d,φ p(b, d, φ )
Subject to: 100 = db + d 2 cot φ . (7)
However, it is generally best to write a problem as a minimization problem if possible for the
purposes of analysis and the potential use of software. Thus, we can also consider the equivalent
problem:
min K · p(b, d, φ ) (8)
b,d,φ

Subject to: 100 = db + d 2 cot φ . (9)


By solving first for b in terms of d and φ from the constraint, rewrite the optimization problem,
where now there is no constraint since it will be satisfied automatically by substituting in the
expression you just derived for b. Now, using these potential substitutions:

φ 2t 1 − t2
t = tan , sin φ = , cos φ = ,
2 1 + t2 1 + t2
show that the optimization problem can now be written as:

1 − t2 1 + t2
 
100
min K −d +d . (10)
d,t d 2t t

For this problem, find the optimal design and prove that it is globally optimal.
Part (b)
We will begin the numerical implementation of your design project.

(b1) Simulation Implementation


Numerically implement your system model with all of its disciplinary modules. Demonstrate that
the system can be executed in analysis mode, i.e., provide a design vector x and show that your
simulation returns the correct values of the objective functions J and constraints, g, h. Describe
how you validated your analysis routines.

(b2) Feasibility
Describe the initial design vector that you have available. Is this initial guess feasible?

(b3) DOE
Carry out an initial exploration of the design space using a DOE technique of your choice (recall
Lecture 9). Describe your choice of factors, levels, and experiments. What design variable (factor)
and level shows the largest effect? Based on this analysis what initial start point x0 do you recom-
mend for numerical optimization? You don’t have to actually carry out this optimization (yet).

Note: This assignment is aimed at getting you to complete the problem description and implement
the simulation code. Do not panic if you attempt any optimization and the result is a dismal failure
— in practice, MDO codes seldom get things right the first time. Throughout the semester you will
have a chance to improve your formulation and implementation.

You might also like