Module: forceAtSiteLTI
Executive Summary
The ForceAtSiteLTI module implements a three-input, three-output linear time-invariant force model by specializing LinearTimeInvariantSystem. It maps site-frame force vectors from ForceAtSiteMsgPayload into the LTI input and publishes filtered or shaped site-frame forces through the same payload type.
Module Description
The inherited LTI dynamics are
with fixed dimensions for this subclass:
input size: \(m=3\)
output size: \(p=3\)
The input mapping is
and output publication is
All quantities are expressed in the site frame \(S\), consistent with ForceAtSiteMsgPayload.
Message Interfaces
Msg Variable Name |
Msg Type |
Description |
|---|---|---|
inMsg |
Input 3D force vector in site frame. |
|
outMsg |
Output 3D force vector in site frame. |
Module Assumptions and Limitations
The model is strictly 3D (input/output dimensions are always 3).
The state dimension is inherited from the configured base-class matrices.
If no state is configured, output uses direct feedthrough from \(\mathbf{D}\) when available.
-
class ForceAtSiteLTI : public LinearTimeInvariantSystem
- #include <forceAtSiteLTI.h>
Linear 3D force model based on LinearTimeInvariantSystem.
This class implements a three input, three output LTI system where the input and output are carried through ForceAtSiteMsgPayload messages.
Input: u = [Fx, Fy, Fz]^T in the site S frame, read from inMsg().force_S.
Output: y = [Fx, Fy, Fz]^T in the site S frame, written to outMsg.force_S.
The internal dynamics are defined by the A, B, C, D matrices stored in the base class LinearTimeInvariantSystem.
Public Functions
-
ForceAtSiteLTI() = default
Default constructor.
The system matrices must be configured by the user before running the simulation, either by direct calls to setA, setB, setC, setD or through convenience configuration helpers.
-
inline virtual size_t getInputSize() const override
Get the dimension of the input vector.
This model is strictly 3D, so the input dimension is always 3.
- Returns:
Number of inputs (always 3).
-
inline virtual size_t getOutputSize() const override
Get the dimension of the output vector.
This model is strictly 3D, so the output dimension is always 3.
- Returns:
Number of outputs (always 3).
-
virtual Eigen::VectorXd readInput(uint64_t CurrentSimNanos) override
Read the current input vector from the subscribed input message.
This method constructs a 3 by 1 Eigen::VectorXd whose elements are taken from the force_S array of the ForceAtSiteMsgPayload read via inMsg().
- Parameters:
CurrentSimNanos – Current simulation time in nanoseconds. (Unused in this implementation.)
- Returns:
Input vector u of size 3.
-
virtual void writeOutput(uint64_t CurrentSimNanos, const Eigen::VectorXd &y) override
Write the current output vector to the output message.
The first three elements of the output vector y are written to the force_S array of the ForceAtSiteMsgPayload and sent on outMsg.
- Parameters:
CurrentSimNanos – Current simulation time in nanoseconds.
y – Output vector of size at least 3.
Public Members
-
Message<ForceAtSiteMsgPayload> outMsg
Output message carrying the 3D force command at the site.
The force_S array is populated from the first three elements of the output vector y computed by LinearTimeInvariantSystem.
-
ReadFunctor<ForceAtSiteMsgPayload> inMsg
Input message read functor providing the 3D force at the site.
The force_S array of the payload is mapped to the input vector u.
-
ForceAtSiteLTI() = default