我的任务是比较MPU数据的互补滤波器和卡尔曼滤波器之间的性能。
我正在使用MSE,SNR和PSNR来计算性能,但是我得到的mse结果是> 1,我认为这是错误的结果
这是我写的代码:
for j in range(len(namedfile)):
dataset = pd.read_csv("data_pasien/cf_berdiri/" + str(namedfile[j]))
print("SNR , PSNR , MSE values:","\n\n")
#SNR for acX
roll_max = dataset['roll'].max()
roll_min = dataset['roll'].min()
#MSE for acX
roll_std = dataset['roll'].std()
print("MSE of roll = ",roll_std)
#SNR for acX
roll_snr=20*math.log10((roll_max-roll_min)/roll_std)
print("SNR of roll = " , roll_snr)
#PSNR for acX
roll_psnr = roll_max/roll_std;
print("PSNR of roll = ", roll_psnr,"\n")