# Even Non Engineers Can Learn Design Optimization!

For 10 years I studied worked in the Computational Aerodynamics Group at the University of Toronto Institute for Aerospace Studies. It's goal is researching into designing environmentally friendly aircraft. Specifically, I worked in the area of "aerodynamic shape optimization", where I used computer algorithms to design wings with the least amount of drag. While the group had undergraduate and graduate students, post-doctoral researchers, and even the occasional high-school interns working, the bulk of the research is done by the graduate students, because it requires a good understanding of aerodynamics—the physics of air flows around an aircraft, as well as a strong background in mathematics, especially in calculus and linear algebra. That said, like topics in many areas of engineering research, the underlying concept of optimization actually isn't particularly difficult to understand, and it can usually be explained to any lay person with a basic science background.

It goes like this. Engineers and mathematicians usually pose the optimization problem using this simple (but perhaps strange looking) expression:

The expression means "find a set of design variables $\mathcal{X}$ such that the objective function $\mathcal{J}$ is minimized, while satisfying $i$ constraints $C_i\leq 0$." Writing out the expression doesn't necessarily make things easier to understand, but we can strip away the math and just focus on the concept.

We start with the objective function $\mathcal{J}$. This function is very important, since we use this single number to describe what ultimately matters most. For example, in aircraft design, we may want to minimize drag on the surface of the wing $C_D$ because it directly impact fuel consumption, or maximize range $R$ (i.e. we'd minimize the inverse $1/R$), or maximize the payload weight $W_\mathrm{payload}$ (i.e. minimize $1/W_\mathrm{payload}$). If we're working on heating and cooling a confined space, the objective function may be to minimize the heat loss through the walls, or the minimum amount of energy to reduce the internal temperature by 1°C.

It's important to point out a crucial concept that's obvious to anyone working in numerical optimization, but difficult for others to grasp. If we optimize 3 airplanes based on the 3 objective functions I mentioned before (minimize drag, maximize range, maximize payload) then I'd get 3 very different airplanes. Which one is actually better? Well, I don't know! Because they're optimized with different objectives in mind, they're all "best" by their own definition. If you then use a different standard to measure their performances, then none of them are optimized. This is why a company CEO can't just tell an engineer, "give me the best design" without being very specific about what management actually wants.

During the optimization process, we allow the computer to change some "design variables" $\mathcal{X}$, which are parameters that define the shape. In my work in aircraft design, design variables can be the span of the wings, the location of the wings and horizontal stabilizers, the sweep or twist angles of the wings, the cross sectional shapes of the wings, the length and diameter of the fuselage etc. Even when we design just a wing, we have more than 100 variables specifying it's shape. The more variables we use, the more number crunching the computer needs to do. The conventional wisdom is that the more variables you use, the better the final design will be, i.e. lower objective functional value at the end, although my research showed that it's not usually the case.

The optimization process looks something like this:

1. Start with original non optimal design $\mathcal{X}_0$
2. Compute objective function $\mathcal{J}$
3. Compute a direction of improvement
4. If the design can be improved further, update $\mathcal{X}$, and go back to step 2.

Just remember that all the work is done on the computer and not by hand. For now we've ignored the constraints $C_i$, which are other design requirements that we must satisfy. That'll be the topic of another article...
{"found_math": true, "script_math_tex": 15, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 17, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "main.timleungjr.ca", "fetch_time": 1670073171000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2022-49/segments/1669446710931.81/warc/CC-MAIN-20221203111902-20221203141902-00067.warc.gz", "warc_record_offset": 34235779, "warc_record_length": 9631, "token_count": 862, "char_count": 4163, "score": 3.5625, "int_score": 4, "crawl": "CC-MAIN-2022-49", "snapshot_type": "longest", "language": "en", "language_score": 0.9255104064941406, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00013-of-00064.parquet"}