LinearEvolution.java

  1. /*
  2.  * Licensed to the Hipparchus project under one or more
  3.  * contributor license agreements.  See the NOTICE file distributed with
  4.  * this work for additional information regarding copyright ownership.
  5.  * The Hipparchus project licenses this file to You under the Apache License, Version 2.0
  6.  * (the "License"); you may not use this file except in compliance with
  7.  * the License.  You may obtain a copy of the License at
  8.  *
  9.  *      https://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */

  17. package org.hipparchus.filtering.kalman.linear;

  18. import org.hipparchus.linear.RealMatrix;
  19. import org.hipparchus.linear.RealVector;

  20. /**
  21.  * Container for {@link LinearProcess linear process} evolution data.
  22.  * @see LinearProcess
  23.  * @since 1.3
  24.  */
  25. public class LinearEvolution {

  26.     /** State transition matrix A<sub>k-1</sub>. */
  27.     private final RealMatrix stateTransitionMatrix;

  28.     /** Control matrix B<sub>k-1</sub> (can be null if the process is not controlled). */
  29.     private final RealMatrix controlMatrix;

  30.     /** Command u<sub>k-1</sub>. (can be null if the process is not controlled). */
  31.     private final RealVector command;

  32.     /** Process noise matrix Q<sub>k-1</sub>. */
  33.     private final RealMatrix processNoiseMatrix;

  34.     /** Jacobian of the measurement with respect to the state (may be null). */
  35.     private final RealMatrix measurementJacobian;

  36.     /** Simple constructor.
  37.      * @param stateTransitionMatrix state transition matrix A<sub>k-1</sub>
  38.      * @param controlMatrix control matrix B<sub>k-1</sub> (can be null if the process is not controlled)
  39.      * @param command u<sub>k-1</sub>. (can be null if the process is not controlled)
  40.      * @param processNoiseMatrix process noise matrix Q<sub>k-1</sub>
  41.      * @param measurementJacobian Jacobian of the measurement with respect to the state
  42.      * (may be null if measurement should be ignored)
  43.      */
  44.     public LinearEvolution(final RealMatrix stateTransitionMatrix,
  45.                            final RealMatrix controlMatrix, final RealVector command,
  46.                            final RealMatrix processNoiseMatrix,
  47.                            final RealMatrix measurementJacobian) {
  48.         this.stateTransitionMatrix = stateTransitionMatrix;
  49.         this.controlMatrix         = controlMatrix;
  50.         this.command               = command;
  51.         this.processNoiseMatrix    = processNoiseMatrix;
  52.         this.measurementJacobian   = measurementJacobian;
  53.     }

  54.     /** Get the state transition matrix A<sub>k-1</sub>.
  55.      * @return state transition matrix A<sub>k-1</sub>
  56.      */
  57.     public RealMatrix getStateTransitionMatrix() {
  58.         return stateTransitionMatrix;
  59.     }

  60.     /** Get the control matrix B<sub>k-1</sub>.
  61.      * @return control matrix B<sub>k-1</sub> (can be null if there is no control)
  62.      */
  63.     public RealMatrix getControlMatrix() {
  64.         return controlMatrix;
  65.     }

  66.     /** Get the command u<sub>k-1</sub>.
  67.      * @return command vector u<sub>k-1</sub> (can be null if there is no control)
  68.      */
  69.     public RealVector getCommand() {
  70.         return command;
  71.     }

  72.     /** Get the process noise matrix Q<sub>k-1</sub>.
  73.      * @return process noise matrix<sub>k-1</sub>
  74.      */
  75.     public RealMatrix getProcessNoiseMatrix() {
  76.         return processNoiseMatrix;
  77.     }

  78.     /** Get measurement Jacobian.
  79.      * @return Jacobian of the measurement with respect to the state
  80.      * (may be null if measurement should be ignored)
  81.      */
  82.     public RealMatrix getMeasurementJacobian() {
  83.         return measurementJacobian;
  84.     }

  85. }