A Kalman filter requires an exact knowledge of the process noise covariance matrix

and the measurement noise covariance matrix

. Here we consider the case in which the true values of

and

are unknown. The system is assumed to be constant, and the random inputs are stationary. First, a correlation test is given which checks whether a particular Kalman filter is working optimally or not. If the filter is suboptimal, a technique is given to obtain asymptotically normal, unbiased, and consistent estimates of

and

. This technique works only for the case in which the form of

is known and the number of unknown elements in

is less than

where

is the dimension of the state vector and

is the dimension of the measurement vector. For other cases, the optimal steady-state gain K
opis obtained directly by an iterative procedure without identifying

. As a corollary, it is shown that the steady-state optimal Kalman filter gain K
opdepends only on

linear functionals of

. The results are first derived for discrete systems. They are then extended to continuous systems. A numerical example is given to show the usefulness of the approach.