commit b15dc55b7abb589eb4e1246339cd0b2c97078915 Author: Anson Date: Sat Apr 23 01:08:01 2022 -0700 setting up quarto diff --git a/.prettierrc.toml b/.prettierrc.toml new file mode 100644 index 0000000..6304cb6 --- /dev/null +++ b/.prettierrc.toml @@ -0,0 +1,4 @@ +# .prettierrc.toml +printWidth = 100 +proseWrap = "always" + diff --git a/Figures/assembly.jpg b/Figures/assembly.jpg new file mode 100644 index 0000000..4703d31 Binary files /dev/null and b/Figures/assembly.jpg differ diff --git a/Figures/current_process.png b/Figures/current_process.png new file mode 100644 index 0000000..7ff1cff Binary files /dev/null and b/Figures/current_process.png differ diff --git a/Figures/inertia3d.png b/Figures/inertia3d.png new file mode 100644 index 0000000..6151b22 Binary files /dev/null and b/Figures/inertia3d.png differ diff --git a/Figures/kmeans.png b/Figures/kmeans.png new file mode 100644 index 0000000..7588f5a Binary files /dev/null and b/Figures/kmeans.png differ diff --git a/Figures/pca.png b/Figures/pca.png new file mode 100644 index 0000000..938bf34 Binary files /dev/null and b/Figures/pca.png differ diff --git a/citations.bib b/citations.bib new file mode 100644 index 0000000..4143b0a --- /dev/null +++ b/citations.bib @@ -0,0 +1,26 @@ +@misc{eberlyPolyhedralMassProperties2002, + title = {Polyhedral {{Mass Properties}} ({{Revisited}})}, + author = {Eberly, David}, + year = {2002}, + month = dec, + copyright = {CC BY 4.0}, + url = {https://www.geometrictools.com/Documentation/PolyhedralMassProperties.pdf} +} + + +@inproceedings{DebriSat2019, + title = {Analysis of the DebriSat Fragments and Comparison to the NASA Standard Satellite Breakup Model}, + author = {Murray, James and Cowardin, Heather and Liou, J-C and Sorge, Marlon and Fitz-Coy, Norman and Huynh, Tom}, + booktitle = {International Orbital Debris Conference (IOC)}, + number = {JSC-E-DAA-TN73918}, + year = {2019}, + url = {https://ntrs.nasa.gov/citations/20190034081} +} + + +@online{interfluo6UCubeSatModel, + title = {{{6U CubeSat}} Model | {{3D CAD Model Library}} | {{GrabCAD}}}, + author = {{Interfluo}}, + url = {https://grabcad.com/library/6u-cubesat-model-1}, + urldate = {2022-02-15} +} diff --git a/report.html b/report.html new file mode 100644 index 0000000..5618d7d --- /dev/null +++ b/report.html @@ -0,0 +1,2688 @@ + + + + + + + + + + +Characterization of Space Debris using Machine Learning Methods + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+

Characterization of Space Debris using Machine Learning Methods

+

Advanced processing of 3D meshes using Julia, and data science in Matlab.

+
+ + + + + +
+ +
+
Author
+
+

Anson Biggs

+
+
+ +
+
Published
+
+

4/30/2022

+
+
+ +
+ + +
+ +
+

Gathering Data

+

To get started on the project before any scans of the actual debris are made available, I opted to find 3D models online and process them as if they were data collected by my team. GrabCAD is an excellent source of high-quality 3D models, and all the models have, at worst, a non-commercial 1 license making them suitable for this study. The current dataset uses three separate satellite assemblies found on GrabCAD, below is an example of one of the satellites that was used.

+
+
+

+

+
+
+
+
+

Data Preparation

+

The models were processed in Blender, which quickly converted the assemblies to stl files, giving 108 unique parts to be processed. Since the expected final size of the dataset is expected to be in the magnitude of the thousands, an algorithm capable of getting the required properties of each part is the only feasible solution. From the analysis performed in Report 1, we know that the essential debris property is the moments of inertia which helped narrow down potential algorithms. Unfortunately, this is one of the more complicated things to calculate from a mesh, but thanks to a paper from (Eberly 2002) titled Polyhedral Mass Properties, his algorithm was implemented in the Julia programming language. The current implementation of the algorithm calculates a moment of inertia tensor, volume, center of gravity, characteristic length, and surface body dimensions in a few milliseconds per part. The library can be found here. The characteristic length is a value that is heavily used by the NASA DebriSat project (Murray et al. 2019) that is doing very similar work to this project. The characteristic length takes the maximum orthogonal dimension of a body, sums the dimensions then divides by 3 to produce a single scalar value that can be used to get an idea of thesize of a 3D object.

+
+Eberly, David. 2002. “Polyhedral Mass Properties (Revisited).” https://www.geometrictools.com/Documentation/PolyhedralMassProperties.pdf. +
+Murray, James, Heather Cowardin, J-C Liou, Marlon Sorge, Norman Fitz-Coy, and Tom Huynh. 2019. “Analysis of the DebriSat Fragments and Comparison to the NASA Standard Satellite Breakup Model.” In International Orbital Debris Conference (IOC). JSC-E-DAA-TN73918. https://ntrs.nasa.gov/citations/20190034081. +
+
+

+

+
+
+

The algorithm’s speed is critical not only for the eventual large number of debris pieces that have to be processed, but many of the data science algorithms we plan on performing on the compiled data need the data to be normalized. For the current dataset and properties, it makes the most sense to normalize the dataset based on volume. Volume was chosen for multiple reasons, namely because it was easy to implement an efficient algorithm to calculate volume, and currently, volume produces the least amount of variation out of the current set of properties calculated. Unfortunately, scaling a model to a specific volume is an iterative process, but can be done very efficiently using derivative-free numerical root-finding algorithms. The current implementation can scale and process all the properties using only 30% more time than getting the properties without first scaling.

+
 Row │ variable               mean      min        median     max
+─────┼───────────────────────────────────────────────────────────────────
+   1 │ surface_area           25.2002   5.60865     13.3338     159.406
+   2 │ characteristic_length  79.5481   0.158521    1.55816     1582.23
+   3 │ sbx                     1.40222  0.0417367   0.967078    10.0663
+   4 │ sby                     3.3367   0.0125824   2.68461     9.68361
+   5 │ sbz                     3.91184  0.29006     1.8185      14.7434
+   6 │ Ix                      1.58725  0.0311782   0.23401     11.1335
+   7 │ Iy                      3.74345  0.178598    1.01592     24.6735
+   8 │ Iz                      5.20207  0.178686    1.742       32.0083
+

Above is a summary of the current 108 part with scaling. Since all the volumes are the same it is left out of the dataset, the center of gravity is also left out of the dataset since it currently is just an artifact of the stl file format. There are many ways to determine the ‘center’ of a 3D mesh, but since only one is being implemented at the moment comparisons to other properties doesn’t make sense. The other notable part of the data is the model is rotated so that the magnitudes of Iz, Iy, and Ix are in descending order. This makes sure that the rotation of a model doesn’t matter for characterization. The dataset is available for download here:

+ +
+
+

Characterization

+

The first step toward characterization is to perform a principal component analysis to determine what properties of the data capture the most variation. PCA also requires that the data is scaled, so as discussed above the dataset that is scaled by volume will be used. PCA is implemented manually instead of the Matlab built-in function as shown below:

+
% covaraince matrix of data points
+S=cov(scaled_data);
+
+% eigenvalues of S
+eig_vals = eig(S);
+
+% sorting eigenvalues from largest to smallest
+[lambda, sort_index] = sort(eig_vals,'descend');
+
+
+lambda_ratio = cumsum(lambda) ./ sum(lambda)
+

Then plotting lambda_ratio, which is the cumsum/sum produces the following plot:

+
+
+

+

+
+
+

The current dataset can be described incredibly well just by looking at Iz, which again the models are rotated so that Iz is the largest moment of inertia. Then including Iy and Iz means that a 3D plot of the principle moments of inertia almost capture all the variation in the data.

+

The next step for characterization is to get only the inertia’s from the dataset. Since the current dataset is so small, the scaled dataset will be used for rest of the characterization process. Once more parts are added to the database it will make sense to start looking at the raw dataset. Now we can proceed to cluster the data using the k-means method of clustering. To properly use k-means a value of k, which is the number of clusters, needs to be determined. This can be done by creating an elbow plot using the following code:

+
for ii=1:20
+    [idx,~,sumd] = kmeans(inertia,ii);
+    J(ii)=norm(sumd);
+end
+

Which produces the following plot:

+
+
+

+

+
+
+

As can be seen in the above elbow plot, at 6 clusters there is an “elbow” which is where there is a large drop in the sum distance to the centroid of each cluster which means that it is the optimal number of clusters. The inertia’s can then be plotted using 6 k-means clusters produces the following plot:

+
+
+

+

+
+
+

From this plot it is immediately clear that there are clusters of outliers. These are due to the different shapes and the extreme values are slender rods or flat plates while the clusters closer to the center more closely resemble a sphere. As the dataset grows it should become more apparent what kind of clusters actually make up a satellite, and eventually space debris in general.

+
+
+

Next Steps

+

The current dataset needs to be grown in both the amount of data and the variety of data. The most glaring issue with the current dataset is the lack of any debris since the parts are straight from satellite assemblies. Getting accurate properties from the current scans we have is an entire research project in itself, so hopefully, getting pieces that are easier to scan can help bring the project back on track. The other and harder-to-fix issue is finding/deriving more data properties. Properties such as cross-sectional or aerodynamic drag would be very insightful but are likely to be difficult to implement in code and significantly more resource intensive than the current properties the code can derive.

+ +
+ + +

Footnotes

+ +
    +
  1. This is a test↩︎

  2. +
+
+ + +
+ + + + \ No newline at end of file diff --git a/report.log b/report.log new file mode 100644 index 0000000..3b4dee4 --- /dev/null +++ b/report.log @@ -0,0 +1,296 @@ +This is XeTeX, Version 3.141592653-2.6-0.999993 (MiKTeX 21.8) (preloaded format=xelatex 2021.10.31) 23 APR 2022 00:47 +entering extended mode +**./report.tex +(report.tex +LaTeX2e <2021-06-01> patch level 1 +L3 programming layer <2021-07-12> (C:\Users\albig\AppData\Roaming\MiKTeX\tex/la +tex/koma-script\scrartcl.cls +Document Class: scrartcl 2021/11/13 v3.35 KOMA-Script document class (article) +(C:\Users\albig\AppData\Roaming\MiKTeX\tex/latex/koma-script\scrkbase.sty +Package: scrkbase 2021/11/13 v3.35 KOMA-Script package (KOMA-Script-dependent b +asics and keyval usage) +(C:\Users\albig\AppData\Roaming\MiKTeX\tex/latex/koma-script\scrbase.sty +Package: scrbase 2021/11/13 v3.35 KOMA-Script package (KOMA-Script-independent +basics and keyval usage) +(C:\Users\albig\AppData\Roaming\MiKTeX\tex/latex/koma-script\scrlfile.sty +Package: scrlfile 2021/11/13 v3.35 KOMA-Script package (file load hooks) + +(C:\Users\albig\AppData\Roaming\MiKTeX\tex/latex/koma-script\scrlfile-hook-3.34 +.sty +Package: scrlfile-hook-3.34 2021/11/13 v3.35 KOMA-Script package (using LaTeX h +ooks) +(C:\Users\albig\AppData\Roaming\MiKTeX\tex/latex/koma-script\scrlogo.sty +Package: scrlogo 2021/11/13 v3.35 KOMA-Script package (logo) +))) (C:\Program Files\MiKTeX\tex/latex/graphics\keyval.sty +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks16 +) +Applying: [2021/05/01] Usage of raw or classic option list on input line 252. +Already applied: [0000/00/00] Usage of raw or classic option list on input line + 368. +)) (C:\Users\albig\AppData\Roaming\MiKTeX\tex/latex/koma-script\tocbasic.sty +Package: tocbasic 2021/11/13 v3.35 KOMA-Script package (handling toc-files) +\scr@dte@tocline@numberwidth=\skip47 +\scr@dte@tocline@numbox=\box50 +) +Package tocbasic Info: babel extension for `toc' omitted +(tocbasic) because of missing \bbl@set@language on input line 135. +Class scrartcl Info: You've used standard option `oneside'. +(scrartcl) This is correct! +(scrartcl) Internally I'm using `twoside=false'. +(scrartcl) If you'd like to set the option with \KOMAoptions, +(scrartcl) you'd have to use `twoside=false' there +(scrartcl) instead of `oneside', too. +Class scrartcl Info: File `scrsize11pt.clo' used instead of +(scrartcl) file `scrsize11.clo' to setup font sizes on input line 224 +2. +(C:\Users\albig\AppData\Roaming\MiKTeX\tex/latex/koma-script\scrsize11pt.clo +File: scrsize11pt.clo 2021/11/13 v3.35 KOMA-Script font size class option (11pt +) +) (C:\Users\albig\AppData\Roaming\MiKTeX\tex/latex/koma-script\typearea.sty +Package: typearea 2021/11/13 v3.35 KOMA-Script package (type area) +\ta@bcor=\skip48 +\ta@div=\count178 +Package typearea Info: You've used standard option `letterpaper'. +(typearea) This is correct! +(typearea) Internally I'm using `paper=letter'. +(typearea) If you'd like to set the option with \KOMAoptions, +(typearea) you'd have to use `paper=letter' there +(typearea) instead of `letterpaper', too. +Package typearea Info: You've used standard option `oneside'. +(typearea) This is correct! +(typearea) Internally I'm using `twoside=false'. +(typearea) If you'd like to set the option with \KOMAoptions, +(typearea) you'd have to use `twoside=false' there +(typearea) instead of `oneside', too. +\ta@hblk=\skip49 +\ta@vblk=\skip50 +\ta@temp=\skip51 +\footheight=\skip52 +Package typearea Info: These are the values describing the layout: +(typearea) DIV = 11 +(typearea) BCOR = 0.0pt +(typearea) \paperwidth = 614.295pt +(typearea) \textwidth = 446.76004pt +(typearea) DIV departure = -14% +(typearea) \evensidemargin = 11.49748pt +(typearea) \oddsidemargin = 11.49748pt +(typearea) \paperheight = 794.96999pt +(typearea) \textheight = 582.20026pt +(typearea) \topmargin = -37.40001pt +(typearea) \headheight = 17.0pt +(typearea) \headsep = 20.40001pt +(typearea) \topskip = 11.0pt +(typearea) \footskip = 47.6pt +(typearea) \baselineskip = 13.6pt +(typearea) on input line 1743. +) +\c@part=\count179 +\c@section=\count180 +\c@subsection=\count181 +\c@subsubsection=\count182 +\c@paragraph=\count183 +\c@subparagraph=\count184 +\scr@dte@section@maxnumwidth=\skip53 +Class scrartcl Info: using compatibility default `runin=bysign' +(scrartcl) for `\section on input line 4852. +Class scrartcl Info: using compatibility default `afterindent=bysign' +(scrartcl) for `\section on input line 4852. +\scr@dte@part@maxnumwidth=\skip54 +Class scrartcl Info: using compatibility default `afterindent=false' +(scrartcl) for `\part on input line 4860. +\scr@dte@subsection@maxnumwidth=\skip55 +Class scrartcl Info: using compatibility default `runin=bysign' +(scrartcl) for `\subsection on input line 4870. +Class scrartcl Info: using compatibility default `afterindent=bysign' +(scrartcl) for `\subsection on input line 4870. +\scr@dte@subsubsection@maxnumwidth=\skip56 +Class scrartcl Info: using compatibility default `runin=bysign' +(scrartcl) for `\subsubsection on input line 4880. +Class scrartcl Info: using compatibility default `afterindent=bysign' +(scrartcl) for `\subsubsection on input line 4880. +\scr@dte@paragraph@maxnumwidth=\skip57 +Class scrartcl Info: using compatibility default `runin=bysign' +(scrartcl) for `\paragraph on input line 4891. +Class scrartcl Info: using compatibility default `afterindent=bysign' +(scrartcl) for `\paragraph on input line 4891. +\scr@dte@subparagraph@maxnumwidth=\skip58 +Class scrartcl Info: using compatibility default `runin=bysign' +(scrartcl) for `\subparagraph on input line 4901. +Class scrartcl Info: using compatibility default `afterindent=bysign' +(scrartcl) for `\subparagraph on input line 4901. +\abovecaptionskip=\skip59 +\belowcaptionskip=\skip60 +\c@pti@nb@sid@b@x=\box51 +Package tocbasic Info: babel extension for `lof' omitted +(tocbasic) because of missing \bbl@set@language on input line 6076. + +\scr@dte@figure@maxnumwidth=\skip61 +\c@figure=\count185 +Package tocbasic Info: babel extension for `lot' omitted +(tocbasic) because of missing \bbl@set@language on input line 6091. + +\scr@dte@table@maxnumwidth=\skip62 +\c@table=\count186 +Class scrartcl Info: Redefining `\numberline' on input line 6258. +\bibindent=\dimen138 +) (C:\Program Files\MiKTeX\tex/latex/amsmath\amsmath.sty +Package: amsmath 2021/04/20 v2.17j AMS math features +\@mathmargin=\skip63 +For additional information on amsmath, use the `?' option. +(C:\Program Files\MiKTeX\tex/latex/amsmath\amstext.sty +Package: amstext 2000/06/29 v2.01 AMS text +(C:\Program Files\MiKTeX\tex/latex/amsmath\amsgen.sty +File: amsgen.sty 1999/11/30 v2.0 generic functions +\@emptytoks=\toks17 +\ex@=\dimen139 +)) (C:\Program Files\MiKTeX\tex/latex/amsmath\amsbsy.sty +Package: amsbsy 1999/11/29 v1.2d Bold Symbols +\pmbraise@=\dimen140 +) (C:\Program Files\MiKTeX\tex/latex/amsmath\amsopn.sty +Package: amsopn 2016/03/08 v2.02 operator names +) +\inf@bad=\count187 +LaTeX Info: Redefining \frac on input line 234. +\uproot@=\count188 +\leftroot@=\count189 +LaTeX Info: Redefining \overline on input line 399. +\classnum@=\count190 +\DOTSCASE@=\count191 +LaTeX Info: Redefining \ldots on input line 496. +LaTeX Info: Redefining \dots on input line 499. +LaTeX Info: Redefining \cdots on input line 620. +\Mathstrutbox@=\box52 +\strutbox@=\box53 +\big@size=\dimen141 +LaTeX Font Info: Redeclaring font encoding OML on input line 743. +LaTeX Font Info: Redeclaring font encoding OMS on input line 744. +\macc@depth=\count192 +\c@MaxMatrixCols=\count193 +\dotsspace@=\muskip16 +\c@parentequation=\count194 +\dspbrk@lvl=\count195 +\tag@help=\toks18 +\row@=\count196 +\column@=\count197 +\maxfields@=\count198 +\andhelp@=\toks19 +\eqnshift@=\dimen142 +\alignsep@=\dimen143 +\tagshift@=\dimen144 +\tagwidth@=\dimen145 +\totwidth@=\dimen146 +\lineht@=\dimen147 +\@envbody=\toks20 +\multlinegap=\skip64 +\multlinetaggap=\skip65 +\mathdisplay@stack=\toks21 +LaTeX Info: Redefining \[ on input line 2923. +LaTeX Info: Redefining \] on input line 2924. +) (C:\Program Files\MiKTeX\tex/latex/amsfonts\amssymb.sty +Package: amssymb 2013/01/14 v3.01 AMS font symbols +(C:\Program Files\MiKTeX\tex/latex/amsfonts\amsfonts.sty +Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support +\symAMSa=\mathgroup4 +\symAMSb=\mathgroup5 +LaTeX Font Info: Redeclaring math symbol \hbar on input line 98. +LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold' +(Font) U/euf/m/n --> U/euf/b/n on input line 106. +)) (C:\Program Files\MiKTeX\tex/latex/lm\lmodern.sty +Package: lmodern 2009/10/30 v1.6 Latin Modern Fonts +LaTeX Font Info: Overwriting symbol font `operators' in version `normal' +(Font) OT1/cmr/m/n --> OT1/lmr/m/n on input line 22. +LaTeX Font Info: Overwriting symbol font `letters' in version `normal' +(Font) OML/cmm/m/it --> OML/lmm/m/it on input line 23. +LaTeX Font Info: Overwriting symbol font `symbols' in version `normal' +(Font) OMS/cmsy/m/n --> OMS/lmsy/m/n on input line 24. +LaTeX Font Info: Overwriting symbol font `largesymbols' in version `normal' +(Font) OMX/cmex/m/n --> OMX/lmex/m/n on input line 25. +LaTeX Font Info: Overwriting symbol font `operators' in version `bold' +(Font) OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 26. +LaTeX Font Info: Overwriting symbol font `letters' in version `bold' +(Font) OML/cmm/b/it --> OML/lmm/b/it on input line 27. +LaTeX Font Info: Overwriting symbol font `symbols' in version `bold' +(Font) OMS/cmsy/b/n --> OMS/lmsy/b/n on input line 28. +LaTeX Font Info: Overwriting symbol font `largesymbols' in version `bold' +(Font) OMX/cmex/m/n --> OMX/lmex/m/n on input line 29. +LaTeX Font Info: Overwriting math alphabet `\mathbf' in version `normal' +(Font) OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 31. +LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `normal' +(Font) OT1/cmss/m/n --> OT1/lmss/m/n on input line 32. +LaTeX Font Info: Overwriting math alphabet `\mathit' in version `normal' +(Font) OT1/cmr/m/it --> OT1/lmr/m/it on input line 33. +LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `normal' +(Font) OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 34. +LaTeX Font Info: Overwriting math alphabet `\mathbf' in version `bold' +(Font) OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 35. +LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `bold' +(Font) OT1/cmss/bx/n --> OT1/lmss/bx/n on input line 36. +LaTeX Font Info: Overwriting math alphabet `\mathit' in version `bold' +(Font) OT1/cmr/bx/it --> OT1/lmr/bx/it on input line 37. +LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `bold' +(Font) OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 38. +) (C:\Program Files\MiKTeX\tex/generic/iftex\iftex.sty +Package: iftex 2020/03/06 v1.0d TeX engine tests +) (C:\Users\albig\AppData\Roaming\MiKTeX\tex/latex/unicode-math\unicode-math.st +y (C:\Program Files\MiKTeX\tex/latex/l3kernel\expl3.sty +Package: expl3 2021-07-12 L3 programming layer (loader) +(C:\Program Files\MiKTeX\tex/latex/l3backend\l3backend-xetex.def +File: l3backend-xetex.def 2021-08-04 L3 backend support: XeTeX +() +\c__kernel_sys_dvipdfmx_version_int=\count199 +\l__color_backend_stack_int=\count266 +\g__color_backend_stack_int=\count267 +\g__graphics_track_int=\count268 +\l__pdf_internal_box=\box54 +\g__pdf_backend_object_int=\count269 +\g__pdf_backend_annotation_int=\count270 +\g__pdf_backend_link_int=\count271 +)) +Package: unicode-math 2020/01/31 v0.8q Unicode maths in XeLaTeX and LuaLaTeX + +(C:\Users\albig\AppData\Roaming\MiKTeX\tex/latex/unicode-math\unicode-math-xete +x.sty +Package: unicode-math-xetex 2020/01/31 v0.8q Unicode maths in XeLaTeX and LuaLa +TeX +(C:\Program Files\MiKTeX\tex/latex/l3packages/xparse\xparse.sty +Package: xparse 2021-08-04 L3 Experimental document command parser +) (C:\Program Files\MiKTeX\tex/latex/l3packages/l3keys2e\l3keys2e.sty +Package: l3keys2e 2021-08-04 LaTeX2e option processing using LaTeX3 keys +) (C:\Program Files\MiKTeX\tex/latex/fontspec\fontspec.sty +Package: fontspec 2020/02/21 v2.7i Font selection for XeLaTeX and LuaLaTeX +(C:\Program Files\MiKTeX\tex/latex/fontspec\fontspec-xetex.sty +Package: fontspec-xetex 2020/02/21 v2.7i Font selection for XeLaTeX and LuaLaTe +X +\l__fontspec_script_int=\count272 +\l__fontspec_language_int=\count273 +\l__fontspec_strnum_int=\count274 +\l__fontspec_tmp_int=\count275 +\l__fontspec_tmpa_int=\count276 +\l__fontspec_tmpb_int=\count277 +\l__fontspec_tmpc_int=\count278 +\l__fontspec_em_int=\count279 +\l__fontspec_emdef_int=\count280 +\l__fontspec_strong_int=\count281 +\l__fontspec_strongdef_int=\count282 +\l__fontspec_tmpa_dim=\dimen148 +\l__fontspec_tmpb_dim=\dimen149 +\l__fontspec_tmpc_dim=\dimen150 +(C:\Program Files\MiKTeX\tex/latex/base\fontenc.sty +Package: fontenc 2021/04/29 v2.0v Standard LaTeX package +) +! Interruption. +\__keyval_trim:nN #1->\__keyval_trim_auxi:w #1 + \s__keyval_nil \s__keyval_mark... +l.3532 \newfontlanguage{Moksha}{MOK} + +Here is how much of TeX's memory you used: + 6387 strings out of 411276 + 157379 string characters out of 2833273 + 600564 words of memory out of 3000000 + 26830 multiletter control sequences out of 15000+600000 + 403438 words of font info for 28 fonts, out of 8000000 for 9000 + 1348 hyphenation exceptions out of 8191 + 108i,1n,108p,10631b,270s stack positions out of 5000i,500n,10000p,200000b,80000s + +No pages of output. diff --git a/report.qmd b/report.qmd new file mode 100644 index 0000000..4c6e419 --- /dev/null +++ b/report.qmd @@ -0,0 +1,151 @@ +--- +title: "Characterization of Space Debris using Machine Learning Methods" +subtitle: "Advanced processing of 3D meshes using Julia, and data science in Matlab." +author: Anson Biggs +date: "4/30/2022" +latex-auto-install: true +format: + html: + self-contained: true + pdf: default + +# reference-location: margin +citation-location: margin +bibliography: citations.bib +--- + +## Gathering Data + +To get started on the project before any scans of the actual debris are made available, I opted to +find 3D models online and process them as if they were data collected by my team. GrabCAD is an +excellent source of high-quality 3D models, and all the models have, at worst, a non-commercial +^[This is a test] license making them suitable for this study. The current dataset uses three +separate satellite assemblies found on GrabCAD, below is an example of one of the satellites that +was used. + +![Example CubeSat Used for Analysis](Figures/assembly.jpg) + +## Data Preparation + +The models were processed in Blender, which quickly converted the assemblies to `stl` files, giving +108 unique parts to be processed. Since the expected final size of the dataset is expected to be in +the magnitude of the thousands, an algorithm capable of getting the required properties of each part +is the only feasible solution. From the analysis performed in +[Report 1](https://gitlab.com/orbital-debris-research/directed-study/report-1/-/blob/main/README.md), +we know that the essential debris property is the moments of inertia which helped narrow down +potential algorithms. Unfortunately, this is one of the more complicated things to calculate from a +mesh, but thanks to a paper from [@eberlyPolyhedralMassProperties2002] titled +[Polyhedral Mass Properties](https://www.geometrictools.com/Documentation/PolyhedralMassProperties.pdf), +his algorithm was implemented in the Julia programming language. The current implementation of the +algorithm calculates a moment of inertia tensor, volume, center of gravity, characteristic length, +and surface body dimensions in a few milliseconds per part. The library can be found +[here.](https://gitlab.com/MisterBiggs/stl-process) The characteristic length is a value that is +heavily used by the NASA DebriSat project [@DebriSat2019] that is doing very similar work to this +project. The characteristic length takes the maximum orthogonal dimension of a body, sums the +dimensions then divides by 3 to produce a single scalar value that can be used to get an idea of +thesize of a 3D object. + +![Current mesh processing pipeline](Figures/current_process.png) + +The algorithm's speed is critical not only for the eventual large number of debris pieces that have +to be processed, but many of the data science algorithms we plan on performing on the compiled data +need the data to be normalized. For the current dataset and properties, it makes the most sense to +normalize the dataset based on volume. Volume was chosen for multiple reasons, namely because it was +easy to implement an efficient algorithm to calculate volume, and currently, volume produces the +least amount of variation out of the current set of properties calculated. Unfortunately, scaling a +model to a specific volume is an iterative process, but can be done very efficiently using +derivative-free numerical root-finding algorithms. The current implementation can scale and process +all the properties using only 30% more time than getting the properties without first scaling. + +```txt + Row │ variable mean min median max +─────┼─────────────────────────────────────────────────────────────────── + 1 │ surface_area 25.2002 5.60865 13.3338 159.406 + 2 │ characteristic_length 79.5481 0.158521 1.55816 1582.23 + 3 │ sbx 1.40222 0.0417367 0.967078 10.0663 + 4 │ sby 3.3367 0.0125824 2.68461 9.68361 + 5 │ sbz 3.91184 0.29006 1.8185 14.7434 + 6 │ Ix 1.58725 0.0311782 0.23401 11.1335 + 7 │ Iy 3.74345 0.178598 1.01592 24.6735 + 8 │ Iz 5.20207 0.178686 1.742 32.0083 +``` + +Above is a summary of the current 108 part with scaling. Since all the volumes are the same it is +left out of the dataset, the center of gravity is also left out of the dataset since it currently is +just an artifact of the `stl` file format. There are many ways to determine the 'center' of a 3D +mesh, but since only one is being implemented at the moment comparisons to other properties doesn't +make sense. The other notable part of the data is the model is rotated so that the magnitudes of +`Iz`, `Iy`, and `Ix` are in descending order. This makes sure that the rotation of a model doesn't +matter for characterization. The dataset is available for download here: + +- [scaled_dataset.csv](https://gitlab.com/orbital-debris-research/directed-study/report-3/-/blob/main/scaled_dataset.csv) + +## Characterization + +The first step toward characterization is to perform a principal component analysis to determine +what properties of the data capture the most variation. `PCA` also requires that the data is scaled, +so as discussed above the dataset that is scaled by `volume` will be used. `PCA` is implemented +manually instead of the Matlab built-in function as shown below: + +```matlab +% covaraince matrix of data points +S=cov(scaled_data); + +% eigenvalues of S +eig_vals = eig(S); + +% sorting eigenvalues from largest to smallest +[lambda, sort_index] = sort(eig_vals,'descend'); + + +lambda_ratio = cumsum(lambda) ./ sum(lambda) +``` + +Then plotting `lambda_ratio`, which is the `cumsum`/`sum` produces the following plot: + +![PCA Plot](Figures/pca.png) + +The current dataset can be described incredibly well just by looking at `Iz`, which again the models +are rotated so that `Iz` is the largest moment of inertia. Then including `Iy` and `Iz` means that a +3D plot of the principle moments of inertia almost capture all the variation in the data. + +The next step for characterization is to get only the inertia's from the dataset. Since the current +dataset is so small, the scaled dataset will be used for rest of the characterization process. Once +more parts are added to the database it will make sense to start looking at the raw dataset. Now we +can proceed to cluster the data using the k-means method of clustering. To properly use k-means a +value of k, which is the number of clusters, needs to be determined. This can be done by creating an +elbow plot using the following code: + +```matlab +for ii=1:20 + [idx,~,sumd] = kmeans(inertia,ii); + J(ii)=norm(sumd); +end +``` + +Which produces the following plot: + +![Elbow method to determine the required number of clusters.](Figures/kmeans.png) + +As can be seen in the above elbow plot, at 6 clusters there is an "elbow" which is where there is a +large drop in the sum distance to the centroid of each cluster which means that it is the optimal +number of clusters. The inertia's can then be plotted using 6 k-means clusters produces the +following plot: + +![Moments of Inertia plotted with 6 clusters.](Figures/inertia3d.png) + +From this plot it is immediately clear that there are clusters of outliers. These are due to the +different shapes and the extreme values are slender rods or flat plates while the clusters closer to +the center more closely resemble a sphere. As the dataset grows it should become more apparent what +kind of clusters actually make up a satellite, and eventually space debris in general. + +## Next Steps + +The current dataset needs to be grown in both the amount of data and the variety of data. The most +glaring issue with the current dataset is the lack of any debris since the parts are straight from +satellite assemblies. Getting accurate properties from the current scans we have is an entire +research project in itself, so hopefully, getting pieces that are easier to scan can help bring the +project back on track. The other and harder-to-fix issue is finding/deriving more data properties. +Properties such as cross-sectional or aerodynamic drag would be very insightful but are likely to be +difficult to implement in code and significantly more resource intensive than the current properties +the code can derive. diff --git a/report.tex b/report.tex new file mode 100644 index 0000000..f7eddfe --- /dev/null +++ b/report.tex @@ -0,0 +1,460 @@ +% Options for packages loaded elsewhere +\PassOptionsToPackage{unicode}{hyperref} +\PassOptionsToPackage{hyphens}{url} +\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor} +% +\documentclass[ + letterpaper, + DIV=11, + numbers=noendperiod, + oneside]{scrartcl} +\usepackage{amsmath,amssymb} +\usepackage{lmodern} +\usepackage{iftex} +\ifPDFTeX + \usepackage[T1]{fontenc} + \usepackage[utf8]{inputenc} + \usepackage{textcomp} % provide euro and other symbols +\else % if luatex or xetex + \usepackage{unicode-math} + \defaultfontfeatures{Scale=MatchLowercase} + \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} +\fi +% Use upquote if available, for straight quotes in verbatim environments +\IfFileExists{upquote.sty}{\usepackage{upquote}}{} +\IfFileExists{microtype.sty}{% use microtype if available + \usepackage[]{microtype} + \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts +}{} +\makeatletter +\@ifundefined{KOMAClassName}{% if non-KOMA class + \IfFileExists{parskip.sty}{% + \usepackage{parskip} + }{% else + \setlength{\parindent}{0pt} + \setlength{\parskip}{6pt plus 2pt minus 1pt}} +}{% if KOMA class + \KOMAoptions{parskip=half}} +\makeatother +\usepackage{xcolor} +\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available +\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}} +\hypersetup{ + pdftitle={Characterization of Space Debris using Machine Learning Methods}, + pdfauthor={Anson Biggs}, + colorlinks=true, + linkcolor={blue}, + filecolor={Maroon}, + citecolor={Blue}, + urlcolor={Blue}, + pdfcreator={LaTeX via pandoc}} +\urlstyle{same} % disable monospaced font for URLs +\usepackage[left=1in,marginparwidth=2.0666666666667in,textwidth=4.1333333333333in,marginparsep=0.3in]{geometry} +\setlength{\emergencystretch}{3em} % prevent overfull lines +\setcounter{secnumdepth}{-\maxdimen} % remove section numbering +% Make \paragraph and \subparagraph free-standing +\ifx\paragraph\undefined\else + \let\oldparagraph\paragraph + \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} +\fi +\ifx\subparagraph\undefined\else + \let\oldsubparagraph\subparagraph + \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} +\fi + +\usepackage{color} +\usepackage{fancyvrb} +\newcommand{\VerbBar}{|} +\newcommand{\VERB}{\Verb[commandchars=\\\{\}]} +\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}} +% Add ',fontsize=\small' for more characters per line +\usepackage{framed} +\definecolor{shadecolor}{RGB}{241,243,245} +\newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}} +\newcommand{\AlertTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} +\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} +\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.40,0.45,0.13}{#1}} +\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} +\newcommand{\BuiltInTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} +\newcommand{\CharTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} +\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} +\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}} +\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{#1}} +\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} +\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} +\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} +\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}} +\newcommand{\ErrorTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} +\newcommand{\ExtensionTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} +\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} +\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.28,0.35,0.67}{#1}} +\newcommand{\ImportTok}[1]{\textcolor[rgb]{0.00,0.46,0.62}{#1}} +\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} +\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} +\newcommand{\NormalTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} +\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} +\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} +\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} +\newcommand{\RegionMarkerTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} +\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} +\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} +\newcommand{\StringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} +\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.07,0.07,0.07}{#1}} +\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} +\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}} + +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}\usepackage{longtable,booktabs,array} +\usepackage{calc} % for calculating minipage widths +% Correct order of tables after \paragraph or \subparagraph +\usepackage{etoolbox} +\makeatletter +\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{} +\makeatother +% Allow footnotes in longtable head/foot +\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}} +\makesavenoteenv{longtable} +\usepackage{graphicx} +\makeatletter +\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} +\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} +\makeatother +% Scale images if necessary, so that they will not overflow the page +% margins by default, and it is still possible to overwrite the defaults +% using explicit options in \includegraphics[width, height, ...]{} +\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} +% Set default figure placement to htbp +\makeatletter +\def\fps@figure{htbp} +\makeatother +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newlength{\csllabelwidth} +\setlength{\csllabelwidth}{3em} +\newlength{\cslentryspacingunit} % times entry-spacing +\setlength{\cslentryspacingunit}{\parskip} +\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing + {% don't indent paragraphs + \setlength{\parindent}{0pt} + % turn on hanging indent if param 1 is 1 + \ifodd #1 + \let\oldpar\par + \def\par{\hangindent=\cslhangindent\oldpar} + \fi + % set entry spacing + \setlength{\parskip}{#2\cslentryspacingunit} + }% + {} +\usepackage{calc} +\newcommand{\CSLBlock}[1]{#1\hfill\break} +\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}} +\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break} +\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} + +\KOMAoption{captions}{tableheading} +\makeatletter +\makeatother +\makeatletter +\@ifpackageloaded{caption}{}{\usepackage{caption}} +\AtBeginDocument{% +\ifdefined\contentsname + \renewcommand*\contentsname{Table of contents} +\else + \newcommand\contentsname{Table of contents} +\fi +\ifdefined\listfigurename + \renewcommand*\listfigurename{List of Figures} +\else + \newcommand\listfigurename{List of Figures} +\fi +\ifdefined\listtablename + \renewcommand*\listtablename{List of Tables} +\else + \newcommand\listtablename{List of Tables} +\fi +\ifdefined\figurename + \renewcommand*\figurename{Figure} +\else + \newcommand\figurename{Figure} +\fi +\ifdefined\tablename + \renewcommand*\tablename{Table} +\else + \newcommand\tablename{Table} +\fi +} +\@ifpackageloaded{float}{}{\usepackage{float}} +\floatstyle{ruled} +\@ifundefined{c@chapter}{\newfloat{codelisting}{h}{lop}}{\newfloat{codelisting}{h}{lop}[chapter]} +\floatname{codelisting}{Listing} +\newcommand*\listoflistings{\listof{codelisting}{List of Listings}} +\makeatother +\makeatletter +\@ifpackageloaded{caption}{}{\usepackage{caption}} +\@ifpackageloaded{subcaption}{}{\usepackage{subcaption}} +\makeatother +\makeatletter +\@ifpackageloaded{tcolorbox}{}{\usepackage[many]{tcolorbox}} +\makeatother +\makeatletter +\@ifundefined{shadecolor}{\definecolor{shadecolor}{rgb}{.97, .97, .97}} +\makeatother +\makeatletter +\@ifpackageloaded{sidenotes}{}{\usepackage{sidenotes}} +\@ifpackageloaded{marginnote}{}{\usepackage{marginnote}} +\makeatother +\makeatletter +\makeatother +\ifLuaTeX + \usepackage{selnolig} % disable illegal ligatures +\fi + +\title{Characterization of Space Debris using Machine Learning Methods} +\usepackage{etoolbox} +\makeatletter +\providecommand{\subtitle}[1]{% add subtitle to \maketitle + \apptocmd{\@title}{\par {\large #1 \par}}{}{} +} +\makeatother +\subtitle{Advanced processing of 3D meshes using Julia, and data science +in Matlab.} +\author{Anson Biggs} +\date{4/30/2022} + +\begin{document} +\maketitle + +\ifdefined\Shaded\renewenvironment{Shaded}{\begin{tcolorbox}[interior hidden, borderline west={3pt}{0pt}{shadecolor}, boxrule=0pt, enhanced, breakable, sharp corners, frame hidden]}{\end{tcolorbox}}\fi + +\hypertarget{gathering-data}{% +\subsection{Gathering Data}\label{gathering-data}} + +To get started on the project before any scans of the actual debris are +made available, I opted to find 3D models online and process them as if +they were data collected by my team. GrabCAD is an excellent source of +high-quality 3D models, and all the models have, at worst, a +non-commercial license making them suitable for this study. The current +dataset uses three separate satellite assemblies found on GrabCAD, below +is an example of one of the satellites that was used. + +\begin{figure} + +{\centering \includegraphics{Figures/assembly.jpg} + +} + +\caption{Example CubeSat Used for Analysis} + +\end{figure} + +\hypertarget{data-preparation}{% +\subsection{Data Preparation}\label{data-preparation}} + +The models were processed in Blender, which quickly converted the +assemblies to \texttt{stl} files, giving 108 unique parts to be +processed. Since the expected final size of the dataset is expected to +be in the magnitude of the thousands, an algorithm capable of getting +the required properties of each part is the only feasible solution. From +the analysis performed in +\href{https://gitlab.com/orbital-debris-research/directed-study/report-1/-/blob/main/README.md}{Report +1}, we know that the essential debris property is the moments of inertia +which helped narrow down potential algorithms. Unfortunately, this is +one of the more complicated things to calculate from a mesh, but thanks +to a paper from (Eberly +2002)\marginpar{\begin{footnotesize}\leavevmode\vadjust pre{\protect\hypertarget{ref-eberlyPolyhedralMassProperties2002}{}}% +Eberly, David. 2002. {``Polyhedral {Mass Properties} ({Revisited}).''} +\url{https://www.geometrictools.com/Documentation/PolyhedralMassProperties.pdf}.\vspace{2mm}\par\end{footnotesize}} +titled +\href{https://www.geometrictools.com/Documentation/PolyhedralMassProperties.pdf}{Polyhedral +Mass Properties}, his algorithm was implemented in the Julia programming +language. The current implementation of the algorithm calculates a +moment of inertia tensor, volume, center of gravity, characteristic +length, and surface body dimensions in a few milliseconds per part. The +library can be found +\href{https://gitlab.com/MisterBiggs/stl-process}{here.} The +characteristic length is a value that is heavily used by the NASA +DebriSat project (Murray et al. +2019)\marginpar{\begin{footnotesize}\leavevmode\vadjust pre{\protect\hypertarget{ref-DebriSat2019}{}}% +Murray, James, Heather Cowardin, J-C Liou, Marlon Sorge, Norman +Fitz-Coy, and Tom Huynh. 2019. {``Analysis of the DebriSat Fragments and +Comparison to the NASA Standard Satellite Breakup Model.''} In +\emph{International Orbital Debris Conference (IOC)}. JSC-E-DAA-TN73918. +\url{https://ntrs.nasa.gov/citations/20190034081}.\vspace{2mm}\par\end{footnotesize}} +that is doing very similar work to this project. The characteristic +length takes the maximum orthogonal dimension of a body, sums the +dimensions then divides by 3 to produce a single scalar value that can +be used to get an idea of thesize of a 3D object. + +\begin{figure} + +{\centering \includegraphics{Figures/current_process.pdf} + +} + +\caption{Current mesh processing pipeline} + +\end{figure} + +The algorithm's speed is critical not only for the eventual large number +of debris pieces that have to be processed, but many of the data science +algorithms we plan on performing on the compiled data need the data to +be normalized. For the current dataset and properties, it makes the most +sense to normalize the dataset based on volume. Volume was chosen for +multiple reasons, namely because it was easy to implement an efficient +algorithm to calculate volume, and currently, volume produces the least +amount of variation out of the current set of properties calculated. +Unfortunately, scaling a model to a specific volume is an iterative +process, but can be done very efficiently using derivative-free +numerical root-finding algorithms. The current implementation can scale +and process all the properties using only 30\% more time than getting +the properties without first scaling. + +\begin{Shaded} +\begin{Highlighting}[] +\NormalTok{ Row │ variable mean min median max} +\NormalTok{─────┼───────────────────────────────────────────────────────────────────} +\NormalTok{ 1 │ surface\_area 25.2002 5.60865 13.3338 159.406} +\NormalTok{ 2 │ characteristic\_length 79.5481 0.158521 1.55816 1582.23} +\NormalTok{ 3 │ sbx 1.40222 0.0417367 0.967078 10.0663} +\NormalTok{ 4 │ sby 3.3367 0.0125824 2.68461 9.68361} +\NormalTok{ 5 │ sbz 3.91184 0.29006 1.8185 14.7434} +\NormalTok{ 6 │ Ix 1.58725 0.0311782 0.23401 11.1335} +\NormalTok{ 7 │ Iy 3.74345 0.178598 1.01592 24.6735} +\NormalTok{ 8 │ Iz 5.20207 0.178686 1.742 32.0083} +\end{Highlighting} +\end{Shaded} + +Above is a summary of the current 108 part with scaling. Since all the +volumes are the same it is left out of the dataset, the center of +gravity is also left out of the dataset since it currently is just an +artifact of the \texttt{stl} file format. There are many ways to +determine the `center' of a 3D mesh, but since only one is being +implemented at the moment comparisons to other properties doesn't make +sense. The other notable part of the data is the model is rotated so +that the magnitudes of \texttt{Iz}, \texttt{Iy}, and \texttt{Ix} are in +descending order. This makes sure that the rotation of a model doesn't +matter for characterization. The dataset is available for download here: + +\begin{itemize} +\tightlist +\item + \href{https://gitlab.com/orbital-debris-research/directed-study/report-3/-/blob/main/scaled_dataset.csv}{scaled\_dataset.csv} +\end{itemize} + +\hypertarget{characterization}{% +\subsection{Characterization}\label{characterization}} + +The first step toward characterization is to perform a principal +component analysis to determine what properties of the data capture the +most variation. \texttt{PCA} also requires that the data is scaled, so +as discussed above the dataset that is scaled by \texttt{volume} will be +used. \texttt{PCA} is implemented manually instead of the Matlab +built-in function as shown below: + +\begin{Shaded} +\begin{Highlighting}[] +\CommentTok{\% covaraince matrix of data points} +\VariableTok{S}\OperatorTok{=}\VariableTok{cov}\NormalTok{(}\VariableTok{scaled\_data}\NormalTok{)}\OperatorTok{;} + +\CommentTok{\% eigenvalues of S} +\VariableTok{eig\_vals} \OperatorTok{=} \VariableTok{eig}\NormalTok{(}\VariableTok{S}\NormalTok{)}\OperatorTok{;} + +\CommentTok{\% sorting eigenvalues from largest to smallest} +\NormalTok{[}\VariableTok{lambda}\OperatorTok{,} \VariableTok{sort\_index}\NormalTok{] }\OperatorTok{=} \VariableTok{sort}\NormalTok{(}\VariableTok{eig\_vals}\OperatorTok{,}\SpecialStringTok{\textquotesingle{}descend\textquotesingle{}}\NormalTok{)}\OperatorTok{;} + + +\VariableTok{lambda\_ratio} \OperatorTok{=} \VariableTok{cumsum}\NormalTok{(}\VariableTok{lambda}\NormalTok{) }\OperatorTok{./} \VariableTok{sum}\NormalTok{(}\VariableTok{lambda}\NormalTok{)} +\end{Highlighting} +\end{Shaded} + +Then plotting \texttt{lambda\_ratio}, which is the +\texttt{cumsum}/\texttt{sum} produces the following plot: + +\begin{figure} + +{\centering \includegraphics{Figures/pca.png} + +} + +\caption{PCA Plot} + +\end{figure} + +The current dataset can be described incredibly well just by looking at +\texttt{Iz}, which again the models are rotated so that \texttt{Iz} is +the largest moment of inertia. Then including \texttt{Iy} and +\texttt{Iz} means that a 3D plot of the principle moments of inertia +almost capture all the variation in the data. + +The next step for characterization is to get only the inertia's from the +dataset. Since the current dataset is so small, the scaled dataset will +be used for rest of the characterization process. Once more parts are +added to the database it will make sense to start looking at the raw +dataset. Now we can proceed to cluster the data using the k-means method +of clustering. To properly use k-means a value of k, which is the number +of clusters, needs to be determined. This can be done by creating an +elbow plot using the following code: + +\begin{Shaded} +\begin{Highlighting}[] +\KeywordTok{for} \VariableTok{ii}\OperatorTok{=}\FloatTok{1}\OperatorTok{:}\FloatTok{20} +\NormalTok{ [}\VariableTok{idx}\OperatorTok{,\textasciitilde{},}\VariableTok{sumd}\NormalTok{] }\OperatorTok{=} \VariableTok{kmeans}\NormalTok{(}\VariableTok{inertia}\OperatorTok{,}\VariableTok{ii}\NormalTok{)}\OperatorTok{;} + \VariableTok{J}\NormalTok{(}\VariableTok{ii}\NormalTok{)}\OperatorTok{=}\VariableTok{norm}\NormalTok{(}\VariableTok{sumd}\NormalTok{)}\OperatorTok{;} +\KeywordTok{end} +\end{Highlighting} +\end{Shaded} + +Which produces the following plot: + +\begin{figure} + +{\centering \includegraphics{Figures/kmeans.png} + +} + +\caption{Elbow method to determine the required number of clusters.} + +\end{figure} + +As can be seen in the above elbow plot, at 6 clusters there is an +``elbow'' which is where there is a large drop in the sum distance to +the centroid of each cluster which means that it is the optimal number +of clusters. The inertia's can then be plotted using 6 k-means clusters +produces the following plot: + +\begin{figure} + +{\centering \includegraphics{Figures/inertia3d.png} + +} + +\caption{Moments of Inertia plotted with 6 clusters.} + +\end{figure} + +From this plot it is immediately clear that there are clusters of +outliers. These are due to the different shapes and the extreme values +are slender rods or flat plates while the clusters closer to the center +more closely resemble a sphere. As the dataset grows it should become +more apparent what kind of clusters actually make up a satellite, and +eventually space debris in general. + +\hypertarget{next-steps}{% +\subsection{Next Steps}\label{next-steps}} + +The current dataset needs to be grown in both the amount of data and the +variety of data. The most glaring issue with the current dataset is the +lack of any debris since the parts are straight from satellite +assemblies. Getting accurate properties from the current scans we have +is an entire research project in itself, so hopefully, getting pieces +that are easier to scan can help bring the project back on track. The +other and harder-to-fix issue is finding/deriving more data properties. +Properties such as cross-sectional or aerodynamic drag would be very +insightful but are likely to be difficult to implement in code and +significantly more resource intensive than the current properties the +code can derive. + + + + +\end{document}