constructing covariance matrix for velocity