Model and Simulate CubeSats
To create models, use the CubeSat Vehicle blocks, model template, and project. Explore the spacecraft example modeling multiple spacecraft. The CubeSat Vehicle block propagates one satellite at a time. To propagate multiple satellites simultaneously, use the Orbit Propagator block. To calculate shortest quaternion rotation, use the Attitude Profile block.
To help you get started modeling and simulating spacecraft, Aerospace Blockset™ provides a project and model on the Simulink® Start Page.
CubeSat Vehicle Model template — A model template (
CubeSat Simulation Project
) that illustrates how to propagate and visualize CubeSat trajectories using the CubeSat Vehicle block. The Spherical Harmonic Gravity Model block is used as the gravitational potential source for orbit propagation. The preconfigured pointing modes set in the CubeSat Vehicle block control the attitude.CubeSat Simulation Project — A ready-to-simulate project (
CubeSat Simulation Project
) that illustrates how to create a detailed CubeSat system design in Simulink by adding in detailed vehicle components to the provided framework.CubeSat Model-Based System Engineering Project — A ready-to-simulate project (
CubeSat Model-based System Engineering Project
) that shows how to model a space mission architecture in Simulink with System Composer™ and Aerospace Blockset for a 1U CubeSat in low Earth orbit (LEO).
CubeSat Vehicle Model Template
The template model is a ready-to-simulate example that contains a CubeSat Vehicle block with visualization using Simulink 3D Animation™.
For a project that illustrates the use of the Vehicle Model block in place of the CubeSat Vehicle Model block, see CubeSat Simulation Project.
Start the CubeSat Vehicle Model template.
Click Create Model.
The CubeSat Vehicle block models a simple CubeSat vehicle that you can use as is, with the CubeSat Vehicle block configured to use the initial orbital state as a set of Keplerian orbital elements.
The model uses the Spherical Harmonic Gravity Model block to provide the vehicle gravity for the CubeSat.
To familiarize yourself with CubeSats, experiment with the CubeSat Vehicle block settings.
On the CubeSat Orbit tab of the block, you can optionally use the Input method parameter to change the initial orbital state as a set of:
Position and velocity state vectors in Earth-centered inertial axes
Position and velocity state vectors in Earth-centered Earth-fixed axes
Latitude, longitude, altitude, and velocity of the body with respect to ECEF, expressed in the NED frame
On the CubeSat Attitude tab, you can specify the alignment and constraint vectors to define the CubeSat attitude control.
The CubeSat vehicle first aligns the primary alignment vector with the primary constraint vector. The CubeSat vehicle then attempts to align the secondary alignment vector with the secondary constraint vector as closely as possible without affecting primary alignment.
The CubeSat Altitude tab also lets you choose between preconfigured Earth (Nadir) Earth Pointing (default) and Sun Tracking attitude control modes.
On the Earth Orientation Parameters tab, you can direct the block to include higher order earth orientation parameters in transformations between the ECI and ECEF coordinate systems.
Run and simulate the model.
To view the output signals from the CubeSat, double-click the Scopes subsystem and open the multiple scopes.
If you have a valid Simulink 3D Animation license, you can also visualize the orbit in the CubeSat Orbit Animation window.
Save a copy of the orbit propagation model. You can use this model for the mission analysis live script.
The CubeSat Vehicle Model template CubeSat Vehicle block uses simple preconfigured orbit and attitude control modes. To model and simulate CubeSat vehicles using your own detailed components, consider the CubeSat Simulation Project from the Simulink Start Page. For more information, see CubeSat Simulation Project
CubeSat Simulation Project
The project is a ready-to-simulate example with visualization using Simulink 3D Animation. This example uses a Vehicle Model subsystem in place of a CubeSat Vehicle block.
For a model that also models a space mission architecture with System Composer, see CubeSat Model-Based System Engineering Project.
Start the CubeSat Simulation Project.
Click Create Project and follow the instructions.
The Vehicle Model subsystem models a CubeSat vehicle that you can use as is.
To create your own more sophisticated satellite models, experiment with the Vehicle Model framework. For example, you can replace the perfect thruster model included by default in the actuator subsystem with your own more realistic thruster or reaction wheel model.
To change the orbit trajectory and attitude of the CubeSat, in the Mission Configuration section, double-click the Edit Initial Orbit and Attitude block. These parameters have the same intent as the corresponding parameters as the CubeSat Vehicle block.
Run and simulate the model.
To view the output signals from the CubeSat, double-click the Scopes subsystem and open the multiple scopes.
If you have a license for Simulink 3D Animation, you can also visualize the orbit in an animation window. Double-click the Visualization subsystem and click the Open Simulink 3D Animation window button.
The CubeSat Orbit Animation window opens.
CubeSat Model-Based System Engineering Project
The CubeSat Model-Based System Engineering (MBSE) Project is a simulation-ready example that shows how to model a space mission architecture with System Composer and Aerospace Blockset. The project references the CubeSat Simulation Project to reuse subsystem models, then adds a System Composer architecture layer, links system requirements to components in the architecture, and verifies the top-level mission requirement with Simulink Test™. The project visualizes results using Simulink 3D Animation, Aerospace Toolbox satellite scenarios, and Mapping Toolbox™.
Open the CubeSat Model-Based System Engineering Project, click Create Project, and follow the instructions.
From the Projects Shortcut tab in the MATLAB® Command Window, click MBSE Template Overview.
The template overview describes the project and how to model a space mission architecture.
Use the overview to explore the
asbCubeSatArchModel
architecture and learn how to extend the architecture using System Composer.The project helps define an architecture within System Composer. The architecture in this example is based on CubeSat Reference Model (CRM) developed by the International Council on Systems Engineering (INCOSE) Space Systems Working Group (SSWG).
To view the underlying parts of a component, double-click the component. For example, to view the architecture model for the mission, double-click
CubeSat Mission Enterprise
.This model consists of System Composer components that model the mission enterprise.
Use the MBSE Template Overview to navigate the project and learn how to use System Composer elements to model the space mission architecture.
With System Composer:
Extend architecture elements by adding domain-specific metadata to the element using stereotypes. Apply stereotypes to components, connectors, ports, and other architecture elements to provide these elements with a common set of properties. To view, edit, or add new stereotypes to a profile, on the Modeling tab, click Profile Editor and select a stereotype profile. For this example, open the
CubeSatProfile.xml
profile.You can modify a profile, add new profiles, and apply new profiles to a component.
Define the kind of information that flows through a port using interfaces. To view, edit, or add new interfaces to a port, on the Modeling tab, click Interface Editor and select an interface. For example, select asbCubeSatModelData.sldd > ACSOutBus.
Visualize the system with an Architecture view by clicking Views > Architecture Views and selecting a view, for example, CubeSat MBSE Demo.
To establish traceability, link system requirements by allocating functional requirements to components. In the Apps tab of the model, select Requirements Manager.
For more information on working with this project, such as connecting the architecture to design models or simulating the architecture, see the MBSE Template Overview.
To validate the top-level mission requirement, use Simulink Test.
To understand how to perform a mission analysis of the CubeSat using the satellite scenario tools, from the Projects Shortcut tab in the MATLAB Command Window, click Analyze with Satellite Scenario.
Utility Functions
Aerospace Toolbox provides utility functions for coordinate transformations. You can use these functions to go between the various initial condition modes of the CubeSat Vehicle block.
Action | Function |
---|---|
Calculate position and velocity vectors in Earth-centered inertial mean-equator mean-equinox | |
Calculate position, velocity, and acceleration vectors in Earth-centered Earth-fixed (ECEF) coordinate system | |
Calculate Greenwich mean and apparent sidereal times | |
Calculate Keplerian orbit elements using geocentric equatorial position and velocity vectors | |
Calculate position and velocity vectors in geocentric equatorial coordinate system using Keplerian orbit elements |
References
[1] Vallado, D. A. Fundamentals of Astrodynamics and Applications. New York: McGraw-Hill, 1997.
See Also
Blocks
- Attitude Profile (Nadir Pointing) | CubeSat Vehicle Earth (Nadir) Pointing | Orbit Propagator Kepler (unperturbed)