# Presentation: 086075

## Special Topic:Graph State Variables

- NOTICE: The Adaptable State Based Control System is patented (US 6,745,089) to the California Institute of Technology (Caltech). Should you be interested in implementing and using the system, methods associated with implementing the system, or in obtaining software tools or code to implement the system or method, you should obtain a license from the Office of Technology Transfer at the Caltech. The distribution of this training material does not constitute a license to practice the patent or to use any tools or software code.
- The information contained in this document has been designated by the California Institute of Technology (Caltech) as Technology and Software Publicly Available (TSPA). Copyright 2005. The copyrights and patents related to this technology are owned by Caltech. United States Government sponsorship acknowledged.

## Outline

- Absolute vs. Relative States
- Graph State Variables: Nodes and Direct Relationships
- Basis and Proxy GSVs
- How to Derive Relative States
- Multiple Derivations
- Dynamic Topologies
- State Discovery Process for GSVs
- Conclusions

## Absolute States

- Many states are expressed most naturally without reference to anything else
- For example:
- Electrical current
- Whether a switch is open or closed
- Whether an instrument is powered on or off
- Propellant volume
- Etc.

## Relative States

- One particularly common use of Derived SVs should be highlighted...
- Some states are naturally expressed in terms of frames of reference, e.g.:
- Translations for trajectories, planetary surface locations, articulated elements, etc.
- Rotations between coordinate frames
- Directions or force vectors in terms of coordinate frames

**	****	****	****	****	****	****	****	****	****	****Rover Arm Example**
- 						        _*Reference Frames (embedded coordinate frames) *_
- 											**A**.	Rover Body
- 											**B**.	Upper Arm
- 											**C**.	Fore Arm
- 											**D**.	End Effector
- 											**E**.	Target Rock

## Derived Relative States

_*Direct Relationships:*_
- End Effector *wrt* Rock (**D** *wrt* **E**)
- Fore Arm *wrt* Upper Arm (**C** *wrt* **B**)
- Upper Arm *wrt* Rover Body (**B** *wrt* **A**)
- Rock *wrt* Rover Body (**E** *wrt* **A**)
- End Effector *wrt* Fore Arm (**D** *wrt* **C**)

- _Derived Relationship:_
- End Effector *wrt* Rover Body (i.e. **D** *wrt* **A**) = (**D** wrt **C**)** ******** **(**C** wrt **B**) ****** **(**B** wrt **A**)

- common reference frames

- Each relative state relationship between frames of reference in the system can be thought of as a directed edge on a graph, with a node for each reference frame.
- Define a set of independent relationships which can be directly estimated, from which others may be derived:

## Example

## Graph State Variables

- A Basis Graph State Variable (GSV) is a group of direct relationships that are estimated locally.
- A Proxy GSV is a group of direct relationships that have been received from a remote deployment where they were estimated.

**Ephemeris state info. is generally estimated on the ground, so this GSV is proxied onboard the spacecraft**

**BGSV2 contains relationships that are estimated using camera images and wheel motion**

**BGSV4 contains relationships that are estimated from articulation measurements and inverse kinematics**

## How to Derive Relative States

**How to Derive Relative States**

- A GSV computes the relationship of one of its nodes *wrt* to another by combining the direct relationships along the path between the two nodes.
_*Definition*_: A **derivation** is a path in the graph between two nodes.
_*Rover Arm Example*_
- BGSV4 can compute the transformation between any two of its reference frames **A**, **B**, **C**, and **D** because there’s a path between them.
- “6-DOF transformation of the end effector w.r.t. the rover body” = BGSV4.getRelationship (**A**, **D**) = Evaluation of derivation **A**  **B**  **C**  **D **= **(D** *wrt* **C)**** ******** ****(C** *wrt* **B)**** ******** ****(B** *wrt* **A)**

## Multiple Derivations

*	**	**	**	**	**	**	**	**	**	**	**	**	**	**	*_*Derivations of “End Effector wrt Rock”:*_
- 															**• **Estimated from end effector sensor
**	****	****	****	****	****	****	****	****	****	****	****	****	****	****	****	****	****	****	****	**(**D** *wrt* **E**) = **d**
**	****	****	****	****	****	****	****	****	****	****	****	****	****	****	****• **Estimated from joint angles & rock images
- 																		**(D** *wrt* **C) ******** (C** *wrt* **B) ******
**	****	****	****	****	****	****	****	****	****	****	****	****	****	****	****	****	****	****(B** *wrt* **A) ******** (E** *wrt* **A)****-1**
**	****	****	****	****	****	****	****	****	****	****	****	****	****	****	**

*Selection Criteria: Use most accurate derivation*
- 		1.	Use end effector sensor when close to rock, *otherwise*
- 		2.	Use joint angles and images of rock from rover body
*Alternative: Use weighted combination of both derivations*

**Multiple Derivations**

- A relative state may have more than one selectable derivation.

## Dynamic Topologies

_*At launch*_

- Earth location
*wrt* Sun

- Spacecraft location *wrt *Earth

- Earth location *wrt* Sun
- Mars location *wrt* Sun
- Spacecraft location *wrt* Earth

- Mars location *wrt* Sun

**Dynamic Topologies**

_*Reference Frames*_
**Mars**
**Earth**
**Sun**
**Spacecraft**

- A graph state variable’s topology may be changed over time by adding or deleting nodes or direct relationships.

## Dynamic Topologies

- Mars location *wrt* Sun

- Earth location *wrt* Sun

_*Interplanetary Cruise*_

- Earth location *wrt* Sun
- Mars location *wrt* Sun

- Spacecraft Location *wrt *Sun

- Spacecraft location *wrt *Sun

- Earth location *wrt* Sun
- Mars location *wrt* Sun

**Dynamic Topologies**

- A graph state variable’s topology may be changed over time by adding or deleting nodes or direct relationships.

_*Reference Frames*_
**Mars**
**Earth**
**Sun**
**Spacecraft**

## Dynamic Topologies

- Mars location wrt Sun

- Earth location wrt Sun

- Spacecraft
- location wrt Mars

_*At Mars*_

- Earth location *wrt* Sun
- Mars location *wrt* Sun

- Spacecraft location *wrt *Mars

- Earth location *wrt* Sun
- Mars location *wrt* Sun

- Earth location *wrt* Sun
- Mars location *wrt* Sun

**Dynamic Topologies**

- A graph state variable’s topology may be changed over time by adding or deleting nodes or direct relationships.

_*Reference Frames*_
**Mars**
**Earth**
**Sun**
**Spacecraft**

## State Discovery Process for GSVs

*Yes.*

- What do you want to achieve?
*Move rover to rock.*

***Etc.***

- Systems engineers follow a disciplined “state analysis”, asking & answering questions such as these:

**State Discovery Process for GSVs**

- What’s the state to be controlled?
*Rover position and orientation relative to rock.*

- What are the reference frames?
*Rover and rock frames*
*(coordinate frames embedded in the objects).*

- What is the relationship between the nodes?
*6 Degree of Freedom Transformations*
*(position and orientation).*

- ...

## Graph State Variables: Summary

- GSV frameworks provide a mechanism for explicitly modeling relative states.
- GSVs provide a common reusable framework for attitude control, navigation, and robotics.
- A software framework for GSV representation and manipulation has been developed, along with a process for reliable software implementation of GSVs.
- This framework leverages a powerful state-of-the-art GN&C library (MONTE).

## DRAFT

*DRAFT*