How to understand Kalman gain intuitively? The Kalman filter algorithm works as follows


  Initialize $ \hat{\textbf{x}}_{0|0}$ and $\textbf{P}_{0|0}$.
  
  At each iteration $k=1,\dots,n$
  
  Predict
  
  Predicted (a priori) state estimate    $$ \hat{\textbf{x}}_{k|k-1} =
 \textbf{F}_{k}\hat{\textbf{x}}_{k-1|k-1} + \textbf{B}_{k}
 \textbf{u}_{k} $$ 
    Predicted (a priori) estimate covariance $$ 
 \textbf{P}_{k|k-1} = \textbf{F}_{k} \textbf{P}_{k-1|k-1}
 \textbf{F}_{k}^{\text{T}} + \textbf{Q}_{k}$$
  Update
  
  Innovation or measurement residual     $$ \tilde{\textbf{y}}_k =
 \textbf{z}_k - \textbf{H}_k\hat{\textbf{x}}_{k|k-1}$$ Innovation (or
  residual) covariance   $$\textbf{S}_k = \textbf{H}_k
 \textbf{P}_{k|k-1} \textbf{H}_k^\text{T} + \textbf{R}_k$$ Optimal
  Kalman gain      $$\textbf{K}_k =
 \textbf{P}_{k|k-1}\textbf{H}_k^\text{T}\textbf{S}_k^{-1}$$ 
    Updated (a posteriori) state estimate      $$\hat{\textbf{x}}_{k|k} =
 \hat{\textbf{x}}_{k|k-1} + \textbf{K}_k\tilde{\textbf{y}}_k$$ 
    Updated (a posteriori) estimate covariance     $$\textbf{P}_{k|k} = (I -
 \textbf{K}_k \textbf{H}_k) \textbf{P}_{k|k-1}$$


The Kalman gain $K_k$ represents the relative importance of the error $\tilde{\textbf{y}}_k$ with respect to the prior estimate $\hat{\textbf{x}}_{k|k-1}$.

I wonder how to understand the formula for the Kalman gain $K_k$ intuitively? Consider the case when the states and outputs being scalar, why is the gain bigger, when


$\textbf{P}_{k|k-1}$ is bigger
$\textbf{H}_k$ is bigger
$\textbf{S}_k$ is smaller? 


Thanks and regards!
I found a good way of thinking intuitively of Kalman Gain $K$. If you write $K$ this way

$\displaystyle \quad\ \bf{K_k} = \bf{P_k^-\, H_k^{\rm T} (H_k P_k^-\, H_k^{\rm T} + R_k)^{-1}}
  = \bf{\frac {P_k^-\, H_k^{\rm T}}{H_k P_k^-\, H_k^{\rm T} + R_k}}$

you will realize that the relative magnitudes of matrices ($R_k$) and ($P_k$) control a relation between the filter's use of predicted state estimate ($x_{k}⁻$) and measurement ($ỹ_k$).

$\displaystyle \quad\
  \lim\limits_{\bf{R_k \to 0}} \bf{{P_k^-\, H_k^{\rm T}} \over\
  {H_k P_k^-\, H_k^{\rm T} + R_k}}\
    = \bf{H_k^{-1}}$

$\displaystyle \quad\
  \lim\limits_{\bf{P_k \to 0}} \bf{{P_k^-\, H_k^{\rm T}} \over\
  {H_k P_k^-\, H_k^{\rm T} + R_k}}\
   = \bf 0$

Substituting the first limit into the measurement update equation 

$\displaystyle \quad\
  \bf{\hat x_k} = \bf{x_k^-} + \bf{K_k}(\bf{\tilde y_k}-\bf{H_k}\bf{x_k^-})$

suggests that when the magnitude of $R$ is small, meaning that the measurements are accurate, the state estimate depends mostly on the measurements.

When the state is known accurately, then $H P^⁻ H^T$ is small compared to $R$, and the filter mostly ignores the measurements relying instead on the prediction derived from the previous state ($x_k⁻$).