How STK and MATLAB may be co-simulated with Innoslate to refine design engineering results through operational scenario models.
1 Co-Simulate STK Models in Innoslate
Models created in STK were integrated in Innoslate through Action diagrams. Once simulated, the results produced in Innoslate provided a more detailed analysis of the lunar rover’s mission on the surface of the Moon. The following sections describe the processes conducted to integrate STK models into Innoslate simulations for the Lunar Rover project.
1.1 Create a Model in STK
A model was built in STK to represent the lunar mission environment. To do so, each aspect of the mission had to be instantiated as various objects in STK. The Moon was represented by declaring it as a central body in the STK application window. The NASA site locations, including the Extraction Plant, Excavation and Delivery Sites, were plotted using the lunar latitude and longitude coordinates provided by the Break the Ice Challenge. Communication satellites and infrastructure around the Moon were added as well to illustrate contact with mission control on Earth.
STK Satellite and Location Mapping
The fidelity of the STK model was increased by importing publicly available lunar terrain information for the South Pole. This data was obtained from the NASA Lunar Reconnaissance Orbiter (LRO) missions. By incorporating lunar terrain details, visuals for the terrain elevation, obstacles, and cratered regions were incorporated in the mission area of the STK model. The figure below is the resulting high fidelity STK model.
STK Lunar Environment Mapping
Viable travel routes for the lunar rover to follow while navigating between the mission sites were then visually plotted. This was done while considering the rover's terrain incline limitations; it was nominally determined to plot a route with inclines less than 30 degrees. The travel routes were verified using topography maps provided by the Break the Ice Challenge.
Break the Ice Challenge Topography Map
Lastly, a constant velocity was defined for the rover by declaring a STK Ground Vehicle object. This speed is later used to calculate the lunar rover’s travel time values.
1.2 Create an Operational Scenario in Innoslate
An operational scenario was created in Innoslate using Action diagrams. The model below describes the lunar rover’s mission on the lunar surface to excavate icy regolith and deliver extracted water for 365 days or until the mission goal of collecting 10,000 kg of water is reached. Each Action in the diagram represents a specific process or capability the rover will perform.
One Rover Asymmetrical Sequence Scenario
The operational scenario is described from the beginning of the mission when the rover is landed on the lunar surface to the end of the mission when the goal of collecting 10,000 kg of water is achieved, or 365 days have passed, whichever occurs first. In this model, there is one rover on the surface of the Moon that is responsible for excavating regolith, transporting regolith to extraction plant, and delivering the extracted water to the designated delivery site.
At the start of the scenario, the rover performs multiple cycles of excavating regolith. Once its storage container has reached maximum capacity, the rover then delivers the collect regolith to the NASA Water Extraction Plant. After the plant extracts water from the regolith, the second phase of operation begins. The rover collects the water from the Extraction Plant and transports it to the Delivery Site. If the rover’s battery does not need to be charged or the equipment warmed up, then the lunar rover will return to the Excavation Site and repeat these processes.
The rover system will continue these actions until the mission goal of delivering 10,000 kg of water has been met or 365 Earth days have passed on the Moon. At the end of the mission, the lunar rover deactivates and retires.
1.3 Use Innoslate/STK Integration API
These two models from STK and Innoslate were then combined to create a cohesive co-simulation of the mission events.
STK Initialization Action Entity
The figure below is a screenshot of the scripting used to calculate the duration components, e.g. start & end times in milliseconds. This data was extracted from the STK model, and it represents the time the rover takes to traverse the lunar rover route from the Excavation Site to the Water Extraction Plant to the Delivery Site. Duration values were then calculated from the duration components (i.e. subtracting start times from end times in milliseconds), and each were assigned to a unique global variable that can be recalled later on in the simulation.
Script to Enable Innoslate/STK Initialization
Additional scripting was then added to all the Action entities in the Innoslate operational scenario that refer to the rover travel time. This was done by manipulating the Innoslate scripting API to assign the time duration values to equal the global variables that were created for the STK duration components.
Shown below is an example of an Action entity that required additional scripting to enable realistic process times, "Travel Duration to Excavation Site".
"Travel Duration to Excavation Site" Action Entity
In the screenshot of the script, the Innoslate Simulator API was used to assign duration values derived from STK, via the Innoslate global variables, to the respective Action Entity.
Script to Enable STK Time Duration Values in Innoslate
Documentation for the Innoslate Simulator API is available in Innoslate's Help Center.
1.4 Interpret Innoslate/STK Co-Simulation Results
Before the operational scenario Action diagram was simulated, the following assumptions were defined:
- The Delivery Site holds up to 10,000 kg of water for long term storage.
- The rover travels the same route between the three mission sites for every excavation. (Excavation Site to Water Extraction Plant to Delivery Site back to Excavation Site)
- The rover has a maximum load capacity of 100 kg.
- The rover has an average velocity of 0.3 m/s.
- The rover has an excavation rate of 100 kg of regolith/ hr.
- The rover charges its battery at the Delivery Site.
- The rover can nominally perform 10 excavation cycles before having to recharge.
- The rover can nominally perform 20 delivery cycles before having to recharge.
- The rover has a charge timea of 4 hours.
- All unloading processes nominally take 15 minutes to complete.
- All loading processes nominally take 1 hour to complete
Once the Innoslate/STK API scripts were added to the Action diagram and assumptions stated, the operational scenario simulator was executed. The figure below displays the Innoslate/STK co-simulation results.
Innoslate-STK Co-simulation Results
From the co-simulation of the Innoslate Action diagram and STK model, it was calculated the mission will take a total time of 10.67 months to reach the mission goal of collecting 10,000 kg of water goal within 365 Earth days.
Resources over Time Simulation Results
By tracking the resources used throughout Innoslate’s model execution, see the ‘Resources Over Time’ panel, it was concluded a majority of the rover’s mission time will be dedicated to the excavation and extraction processes.
Resource Final Amounts Simulation Results
Looking at the final states of the resources, 10,000 kg of water was successfully extracted and delivered by the end of the mission. In addition, the total distance travelled by the rover. This value has great implications for rover performance, maintenance and reliability characteristics, especially since no rover has ever travelled this distance in the past.
These simulation results help determine early-on whether the lunar rover design is feasible to complete its mission given the constraints provided by the NASA Break the Ice Challenge.
2 Co-Simulate MATLAB Functions in Innoslate
Functions created in MATLAB were integrated in Innoslate through use of Action diagrams. Once simulated, the results produced in Innoslate provided a more detailed analysis of the lunar rover’s mission on the surface of the Moon. The sections following describe the processes conducted to integrate MATLAB functions into Innoslate simulations for the Lunar Rover project.
2.1 Create a Function in MATLAB
Once the two models created in Innoslate and STK were co-simulated, MATLAB was used to verify the calculations. Velocity vectors in the X, Y, and Z planes were retrieved from STK through Innoslate and used to calculate a magnitude value to represent the rover velocity.
The Figure below displays the function script written in MATLAB to compute the magnitude of velocity given the three input parameters, the velocity vectors in the X, Y, and Z planes.
MATLAB Function Script
2.2 Use Innoslate/MATLAB Integration API
After the function script was written in MATLAB, MATLAB integration APIs were then added in the Innoslate operational scenario previously created. This was done using scripting in another initialization Action entity, "Initialize MATLAB Variables", that was added to the beginning the Action diagram.
MATLAB Initialization Action Entity
Within the MATLAB initialization Action entity, the velocity vector components were extracted from the STK model in the X, Y, and Z planes relative to their central body, the Moon, at the initial start time. Then, they were used to calculate a velocity magnitude in MATLAB via a GET request. The distance value was calculated by multiplying the time duration by the velocity magnitude and assigned to a unique global variable for later use.
Script to Enable Innoslate/ MATLAB Initialization
Once the MATLAB scripts were added to the MATLAB initialization Action entity, additional scripting was also added to all the Action entities within the Action diagram that refer to rover travel durations. This is done to continuously record and update the total distance the rover has traveled on the surface of the Moon. A Resource entity, "Total Distance Travelled", served as a counter to compute the total distance the rover travels during its mission.
"Total Distance Travelled" Resource Entity
The figure below displays the script used for the Action entity "Travel Duration to Excavation Site". Within the script, the global variable containing the distance value is obtained and manually added to the Resource entity, "Total Distance Travelled", in order to update the current total distance travelled by the lunar rover.
Script to Enable Total Distance Travelled Computation
Once the MATLAB scripting was added, the final step was to enable the Innoslate/MATLAB integration by attaching the current location of the MATLAB Java Web Application (JWA) to the MATLAB Integration URL field (e.g. "http://localhost:8080/integrations/MatlabServlet") found in the Innoslate simulation settings, shown below. Without it, the simulation will not properly execute the Innoslate/MATLAB integration APIs.
2.3 Interpret Innoslate/ MATLAB Co-Simulation Results
After completing all necessary scripting and enabling the Innoslate/MATLAB integration APIs, the operational scenario Action diagram was executed in the simulator. During simulation, MATLAB calculated distance values with the help of Innoslate and STK, allowing for a realistic estimate of the total rover travel distance. The figure below is a screenshot of the Innoslate/MATLAB/STK co-simulation results and a screenshot of the real-time console output of the MATLAB calculations.
Innoslate Simulation Results - MATLAB
MATLAB Simulation Results Console
From the co-simulation of the Innoslate Action diagram and MATLAB function, it was calculated the mission will take a total time of 10.67 months to reach the mission goal of collecting 10,000 kg of water goal within 365 Earth days. These results verify the conclusions calculated during the Innoslate/STK co-simulation.
Resources Over Time Simulation Results
Resource Total Amounts Simulation Results
Observing the "Total Distance Travelled" Resource entity in the Resources Over Time and Resource Final Amounts graphs, it was concluded the total distance travelled amount reached roughly 3,500 km. This value has great implications for rover performance, maintenance and reliability characteristics, especially since no rover has ever travelled this distance in past missions.
These simulation results from MATLAB help consider potential expected and unexpected behaviors of the system during the mission, which can be used to further refine requirements, confirm system solutions, and aid risk management throughout the project.
3 Summarize Co-Simulation Results
To summarize the Innoslate/STK/MATLAB co-simulation results:
- STK provides accurate times the simulated rover travels to navigate between the various sites on the surface of the Moon.
- Innoslate's Action diagram adds additional processes such as communication, maintenance, operator-in-the-loop, and expected failure conditions.
- When the Innoslate Action diagram is simulated, global variables are used to retrieve data from the STK model, and they are traced throughout the diagram’s execution to calculate the time to collect 10,000 kg of water and the total distance traveled during that mission.
- Performance characteristics can be manipulated to run multiple scenarios using this co-simulation process. In the STK model, change the speed of the rover or modify the route the rover follows to complete its mission, then run the simulation again in Innoslate to determine the impact on mission results.