In order to "tune" these matrices you have to characterize the stochastic behavior of your sensors (those used as inputs in your dynamic system and also those used as measurements). For example in an integrated INS/GPS navigation algorithm your process noise covariance matrix will contain the noise variance of the accelerometers and gyroscopes. There is different ways to obtain these parameters and the most popular one is to do an Allan Variance analysis on the sensor measurements. If properly done, this analysis will give you the real parameters of the Gaussian white noise process contaminating your measurements.
hey there is no need to tune the Q,R matrix. you can follow some advance technique to calculate Q,R matrix. you can follow these papers.
Schneider, René, and Christos Georgakis. "How To NOT Make the Extended Kalman Filter Fail." Industrial & Engineering Chemistry Research 52.9 (2013): 3354-3362.
Bavdekar, Vinay A., Anjali P. Deshpande, and Sachin C. Patwardhan. "Identification of process and measurement noise covariance for state and parameter estimation using extended Kalman filter." Journal of Process Control 21.4 (2011): 585-601.