• 大小: 2KB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2021-05-05
  • 语言: Matlab
  • 标签: EKF、SOC  

资源简介

一份基于simulink很实用的EKF估计soc程序,

资源截图

代码片段和文件信息

% THIS PROGRAM IS FOR IMPLEMENTATION OF DISCRETE TIME PROCESS EXTENDED KALMAN FILTER
% FOR GAUSSIAN AND LINEAR STOCHASTIC DIFFERENCE EQUATION.
% By (R.C.R.C.R)SPLABSMPL.
% (17 JULY 2005).
% Help by Aarthi Nadarajan is acknowledged.
% (drawback of EKF is when nonlinearity is high we can extend the
% approximation taking additional terms in Taylor‘s series).

clc;  close all; clear all;

Xint_v = [1; 0; 0; 0; 0];
wk = [1 0 0 0 0];
vk = [1 0 0 0 0];

for ii = 1:1:length(Xint_v)
    
    Ap(ii) = Xint_v(ii)*2;
    W(ii) = 0;
    H(ii) = -sin(Xint_v(ii));
    V(ii) = 0;
    Wk(ii) = 0;
    
end

Uk = randn(1200);
Qu = cov(Uk);
Vk = randn(1200);
Qv = cov(Vk);
C = [1 0 0 0 0];
n = 100;

[YY XX] = EKLMNFTR1(ApXint_vUkQuVkQvCnWkWV);

for it = 1:1:length(XX)
    MSE(it) = YY(it) - XX(it);
end

tt = 1:1:length(XX);

figure(1);   subplot(211);   plot(XX);   title(‘ORIGINAL SIGNAL‘);
subplot(212);   plot(YY);   title(‘ESTIMATED SIGNAL‘);

figure(2); plot(ttXXttYY); title(‘Combined plot‘); legend(‘original‘‘estimated‘);

figure(3);   plot(MSE.^2);   title(‘Mean square error‘);


web -browser http://www.ilovematlab.cn/thread-3268-1-1.html

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-11-21 21:08  EKF\
     文件        1207  2008-02-21 17:09  EKF\EKF1.m
     文件        2088  2008-02-21 17:12  EKF\EKLMNFTR1.m

评论

共有 条评论

相关资源