mirror of
https://gitlab.com/orbital-debris-research/directed-study/report-1.git
synced 2025-06-15 14:36:46 +00:00
final submission
This commit is contained in:
parent
7fe5680a67
commit
dca83fe9cf
57
README.md
57
README.md
@ -1,27 +1,26 @@
|
||||
---
|
||||
title: "Machine Learning Methods for Orbital Debris Characterization: Report 1"
|
||||
# description: |
|
||||
# A short description of the post.
|
||||
author: Anson Biggs
|
||||
# author:
|
||||
# - name: Anson Biggs
|
||||
# url: https://ansonbiggs.com
|
||||
description: |
|
||||
A short description of the post.
|
||||
author:
|
||||
- name: Anson Biggs
|
||||
url: https://ansonbiggs.com
|
||||
date: 2022-02-14
|
||||
# output:
|
||||
# distill::distill_article:
|
||||
# self_contained: false
|
||||
# draft: true
|
||||
output:
|
||||
distill::distill_article:
|
||||
self_contained: false
|
||||
draft: true
|
||||
---
|
||||
|
||||
## Gathering Data
|
||||
|
||||
To get started on the project before any scans of the real debris are made available I opted to find similar 3D models online and to process them as if they were data collected by my team. GrabCad is an excellent source of high quality 3D models and all of the models have at worst a non-commercial license making them suitable for this study. To start I downloaded a high quality model of a 6U CubeSat, which coincidentally enough was designed for detection of orbital debris. This model consists of 48 individual parts most of which are unique.
|
||||
To get started on the project before any scans of the actual debris are made available, I opted to find similar 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 of the models have at worst a non-commercial license making them suitable for this study. To start, I downloaded a high-quality model of a 6U CubeSat, which coincidentally enough was designed to detect orbital debris. This model consists of 48 individual parts, most of which are unique.
|
||||
|
||||

|
||||
|
||||
## Data Preparation
|
||||
|
||||
To begin analysis of the pieces of the satellite key properties from each piece needed to be gathered. The most accessible CAD software for me at the moment is Fusion 360, but most any CAD software is capable of giving properties for a model. The only way to export the properties is to the clipboard of my computer and required clicking on each individual part of the CubeSats assembly. This task was easily automated using an autohotkey script to automatically push my computers clipboard to a file. Below is an example of what each file looks like, but only a portion of the file for brevity. The text file is generated in a way that makes it difficult to parse so a separate piece of code was used to collect all of the data from all of the part files and then turn it into a `.csv` file for easy import into Matlab.
|
||||
To begin analysis of the satellite, fundamental properties from each piece needed to be derived. The most accessible CAD software for me is Fusion 360, but almost any CAD software can give properties for a model. The only way to export the properties from fusion is to my computer's clipboard. This creates a long process that requires clicking on each part of the CubeSats assembly, then creating a text file and pasting my clipboard to the file. This task was easily automated using an AutoHotkey script to automatically push my computer's clipboard to a file. Below is an example of each file's contents, but only a portion of the file for brevity. The text file is generated in a way that makes it difficult to parse, so a separate piece of code was used to collect all of the data from all of the part files and then turn it into a `.csv` file for easy import into Matlab.
|
||||
|
||||
```txt
|
||||
...
|
||||
@ -35,23 +34,30 @@ Physical
|
||||
...
|
||||
```
|
||||
|
||||
The full file of the compiled parts properties from Fusion 360 can be seen [here.](https://gitlab.com/orbital-debris-research/fusion-properties/-/blob/main/compiled.csv) This method gave 22 columns of data but most of the columns are unsuitable for characterization of 3D geometry. Its important that the only properties considered are scalars that are independent of a models orientation of position in space. Part of the data provided was a moment of inertia tensor. This was computed down to $I_x$, $I_y$, and $I_z$, which was then used to compute an $\bar{I}$. Then bounding box length, width, and height were used to compute a total volume that the object takes up. In the end the only properties used in the analysis of the parts were: mass, volume, density, area,bounding box volume, $\bar{I}$. Some parts also had to be removed due to being outliers to the final dataset is 44 rows and 6 columns. Below is a splom plot which is a great way to visualize data of high dimensions. As you can see most of the properties correlate with one another.
|
||||
The entire file of the compiled parts properties from Fusion 360 can be seen [here.](https://gitlab.com/orbital-debris-research/fusion-properties/-/blob/main/compiled.csv) This method gave 22 columns of data, but most of the columns are unsuitable for the characterization of 3D geometry. The only properties considered must be scalars independent of a model's position orientation in space. Part of the data provided was a moment of inertia tensor. The tensor was processed down to $I_x$, $I_y$, and $I_z$, which was then used to calculate an $\bar{I}$. Then bounding box length, width, and height were used to compute the total volume that the object takes up. In the end, the only properties used in the analysis of the parts were: mass, volume, density, area, bounding box volume, $\bar{I}$, and material. Some parts also had to be removed because the final dataset is 44 rows and 7 columns. Below is a _Splom_ plot which is a great way to visualize data of high dimensions. As you can see, most of the properties correlate with one another.
|
||||
|
||||

|
||||
:::l-body-outset
|
||||
<embed
|
||||
type="text/html"
|
||||
src="prepped.html"
|
||||
width="100%"
|
||||
style="height: 40vh"
|
||||
/>
|
||||
:::
|
||||
|
||||
Now that the data is processed and clean characterization in Matlab can begin. The original idea was to perform _PCA_, but the method had difficulties producing meaninful results. This is likely due the dataset being very small for machine learning, and that the variation in the data is high. Application of _PCA_ will be visited again once the dataset grows. The first step for characterization is importing our data into Matlab.
|
||||
Now that the data is processed and clean, characterization in Matlab can begin. The original idea was to perform _PCA_, but the method had difficulties producing meaningful results. This is likely because the current dataset is tiny for machine learning and the variation in the data is high. The application of _PCA_ will be revisited once the dataset grows. The first step for characterization is importing our data into Matlab.
|
||||
|
||||
```m
|
||||
data = readmatrix('prepped.csv');
|
||||
```
|
||||
|
||||
Next _k-means_ will be used to cluster the data. Since it is hard to represent data in higher dimensions than two only two columns of data will be provided for the clustering. For now I think it makes most intuitive sense to treat volume and mass as the most important columns, and the volume vs mass plot shows 3 fairly distinct groups.
|
||||
Next _k-means_ will be used to cluster the data. Since it is hard to represent data in higher dimensions than two, only two columns of data will be provided for the clustering. For now, I think it makes most intuitive sense to treat volume and mass as the most critical columns since the volume vs. mass plot shows 3 reasonably distinct groups.
|
||||
|
||||
```m
|
||||
[idx,C] = kmeans(data(:,1:2),3);
|
||||
```
|
||||
|
||||
We can look at the distribution of parts in each cluster to ensure that the each cluster has a good amount of data. Since _k-means_ is an iterative method, relies on a user guess, and randomness its important to make sure that the clusters make some sense.
|
||||
We can look at the distribution of parts in each cluster to ensure that each cluster has at least a few data points. Since _k-means_ is an iterative method that relies on a user guess and randomness, it's essential to ensure that the clusters make some sense.
|
||||
|
||||
```m
|
||||
histcounts(idx) =
|
||||
@ -59,16 +65,23 @@ histcounts(idx) =
|
||||
22 13 9
|
||||
```
|
||||
|
||||
Then we plotting Volume vs. Mass using our clusters we get the following plot. These make intuitive sense, but it is clear that the dataset needs much more data for <strong style="color:#00ff00;">Cluster 3</strong>.
|
||||
Then plotting Volume vs. Mass using our clusters produces the following plot. These make intuitive sense, but it is clear that the dataset needs much more data for <strong style="color:#00ff00;">Cluster 3</strong>.
|
||||
|
||||

|
||||
|
||||
Below is all of the data clustered. Since the _k-means_ only used Mass and Volume to come up with its clusters some of the properties do not cluster well against eachother. This is also a powerful cursory glance at what properties are correlated.
|
||||
Below is another _Splom_, but with the clusters found above. Since the _k-means_ only used Mass and Volume to develop its clusters, some of the properties do not cluster well against each other. This is also a powerful cursory glance at what properties are correlated.
|
||||
|
||||

|
||||
:::l-body-outset
|
||||
<embed
|
||||
type="text/html"
|
||||
src="prepped_clustered.html"
|
||||
width="100%"
|
||||
style="height: 40vh"
|
||||
/>
|
||||
:::
|
||||
|
||||
## Next Steps
|
||||
|
||||
The current dataset needs to be grown in both the amount of data aswell ass the variety of data. The most glaring issue with the current dataset is that there are only two different material types. Modern satellites, and therefore their debris, are composed of dozens of unique materials. The other and harder to fix issue is finding more properties of the data. Properties such as cross sectional are or aerodynamic drag would be very insightful but at the moment there is no good way to collect that data. Thankfully with the 3D scanner methods to obtain more properties can be developed and then applied over the entire dataset.
|
||||
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 only two different material types. Modern satellites, and therefore their debris, is composed of dozens of unique materials. The other and harder to fix issue is finding/deriving more data properties. Properties such as cross-sectional are or aerodynamic drag would be very insightful, but there is no good way to collect that data. Thankfully, the 3D scanner methods to obtain more properties can be developed and applied over the entire dataset.
|
||||
|
||||
Once the dataset is grown more advanced analysis can begin. PCA is the current goal, and can hopefully be applied by the next report.
|
||||
Once the dataset is grown, more advanced analysis can begin. PCA is the current goal and can hopefully be applied by the next report.
|
||||
|
BIN
README.pdf
BIN
README.pdf
Binary file not shown.
@ -53,7 +53,7 @@ p1 = plot(df, dimensions = features, kind = "splom", Layout(title = "Raw Data"))
|
||||
|
||||
CSV.write("prepped.csv", df)
|
||||
|
||||
df.cluster = [1, 3, 2, 1, 2, 1, 1, 3, 1, 3, 2, 3, 1, 1, 2, 2, 1, 3, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 2, 2, 3, 3, 2, 2, 2, 1,] # From matlab kmeans idx
|
||||
df.cluster = "Cluster " .* ([1, 3, 2, 1, 2, 1, 1, 3, 1, 3, 2, 3, 1, 1, 2, 2, 1, 3, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 2, 2, 3, 3, 2, 2, 2, 1,] .|> string) # From matlab kmeans idx
|
||||
|
||||
|
||||
p2 = plot(df, dimensions = features, color = :cluster, kind = "splom", Layout(title = "Clustered Data"))
|
||||
@ -62,3 +62,10 @@ p2 = plot(df, dimensions = features, color = :cluster, kind = "splom", Layout(ti
|
||||
|
||||
savefig(p1, "prepped.svg", width = 1000, height = 1000)
|
||||
savefig(p2, "prepped_clustered.svg", width = 1000, height = 1000)
|
||||
|
||||
open("./prepped.html", "w") do io
|
||||
PlotlyBase.to_html(io, p1.plot)
|
||||
end
|
||||
open("./prepped_clustered.html", "w") do io
|
||||
PlotlyBase.to_html(io, p2.plot)
|
||||
end
|
34
prepped.html
Normal file
34
prepped.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 257 KiB After Width: | Height: | Size: 257 KiB |
34
prepped_clustered.html
Normal file
34
prepped_clustered.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 266 KiB After Width: | Height: | Size: 264 KiB |
Loading…
x
Reference in New Issue
Block a user