Main Content

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 project and model on 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.

  1. Start the CubeSat Vehicle Model template.

    CubeSat Vehicle Model template.

  2. Click Create Model.

  3. 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.

  4. Run and simulate the model.

  5. To view the output signals from the CubeSat, double-click the Scopes subsystem and open the multiple scopes.

  6. If you have a valid Simulink 3D Animation license, you can also visualize the orbit in the CubeSat Orbit Animation window.

  7. 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.

  1. Start the CubeSat Simulation Project.

    CubeSat Simulation Project.

  2. Click Create Project and follow the instructions.

    CubeSat simulation project model.

  3. 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.

  4. 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.

  5. Run and simulate the model.

  6. To view the output signals from the CubeSat, double-click the Scopes subsystem and open the multiple scopes.

    Scopes subsystem with various inputs.

  7. 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™.

  1. Open the CubeSat Model-Based System Engineering Project, click Create Project, and follow the instructions.

    CubeSat Model-Based System Engineering Project.

  2. 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.

  3. Use the overview to explore the asbCubeSatArchModel architecture and learn how to extend the architecture using System Composer.

    CubeSat Model-Based System Engineering Project System Composer architecture model.

    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) (https://www.incose.org/communities/working-groups-initiatives/space-systems).

  4. 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.

    CubeSat mission enterprise component for CubeSat Model-Based System Engineering Project System Composer model.

    This model consists of System Composer components that model the mission enterprise.

  5. 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:

    1. 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.

      System Composer Profile Editor with BaseSComponent profile selected.

      You can modify a profile, add new profiles, and apply new profiles to a component.

    2. 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.

      System Composer Interface Editor with asbCubeSatModelData.sld > ACSOutBus selected.

    3. Visualize the system with an Architecture view by clicking Views > Architecture Views and selecting a view, for example, CubeSat MBSE Demo.

      Architecture view with CubeSat MBSE Demo selected.

    4. To establish traceability, link system requirements by allocating functional requirements to components. In the Apps tab of the model, select Requirements Manager.

      Requirements Manager for CubeSat MBSE.

    5. 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.

  6. To validate the top-level mission requirement, use Simulink Test.

  7. 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.

    Satellite scenario output from simulation of Analyze with Satellite Scenario example.

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.

ActionFunction

Calculate position and velocity vectors in Earth-centered inertial mean-equator mean-equinox

ecef2eci

Calculate position, velocity, and acceleration vectors in Earth-centered Earth-fixed (ECEF) coordinate system

eci2ecef

Calculate Greenwich mean and apparent sidereal times

siderealTime

Calculate Keplerian orbit elements using geocentric equatorial position and velocity vectors

ijk2keplerian

Calculate position and velocity vectors in geocentric equatorial coordinate system using Keplerian orbit elements

keplerian2ijk

References

[1] Vallado, D. A. Fundamentals of Astrodynamics and Applications. New York: McGraw-Hill, 1997.

See Also

| | | | | | |

Related Topics