001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.commons.math4.legacy.filter; 018 019import org.apache.commons.math4.legacy.linear.RealMatrix; 020import org.apache.commons.math4.legacy.linear.RealVector; 021 022/** 023 * Defines the process dynamics model for the use with a {@link KalmanFilter}. 024 * 025 * @since 3.0 026 */ 027public interface ProcessModel { 028 /** 029 * Returns the state transition matrix. 030 * 031 * @return the state transition matrix 032 */ 033 RealMatrix getStateTransitionMatrix(); 034 035 /** 036 * Returns the control matrix. 037 * 038 * @return the control matrix 039 */ 040 RealMatrix getControlMatrix(); 041 042 /** 043 * Returns the process noise matrix. This method is called by the {@link KalmanFilter} every 044 * prediction step, so implementations of this interface may return a modified process noise 045 * depending on the current iteration step. 046 * 047 * @return the process noise matrix 048 * @see KalmanFilter#predict() 049 * @see KalmanFilter#predict(double[]) 050 * @see KalmanFilter#predict(RealVector) 051 */ 052 RealMatrix getProcessNoise(); 053 054 /** 055 * Returns the initial state estimation vector. 056 * <p> 057 * <b>Note:</b> if the return value is zero, the Kalman filter will initialize the 058 * state estimation with a zero vector. 059 * 060 * @return the initial state estimation vector 061 */ 062 RealVector getInitialStateEstimate(); 063 064 /** 065 * Returns the initial error covariance matrix. 066 * <p> 067 * <b>Note:</b> if the return value is zero, the Kalman filter will initialize the 068 * error covariance with the process noise matrix. 069 * 070 * @return the initial error covariance matrix 071 */ 072 RealMatrix getInitialErrorCovariance(); 073}