• PUDN用户
    了解作者
  • matlab
    开发工具
  • 1KB
    文件大小
  • zip
    文件格式
  • 1
    收藏次数
  • 1 积分
    下载积分
  • 150
    下载次数
  • 2010-04-13 23:58
    上传日期
sliding mode observer for a Simple Noisy measurements
KFILSMOB.zip
  • KFILSMOB.M
    3.9KB
内容介绍
% Experiments : sliding mode observer % For a Simple Noisy measurements % Date : 4/3/98 ****** D:\mat386\mra22.m !del plkf.met nr = 500; rand('seed',657399); kk=1; % rand('normal'); rand('normal'); for npn=1:1:1; for ntest =12:1:12; for i=1:nr; xmean(i)=0.0; xsd(i)=0.0; end; for nrun=1:1:kk; for i=1:nr; std(i)=0.1; x(i) = 1+rand(1)*std(i); y(i) = i; end; if(npn==1)q=0.01;end; if(npn>=2)q=10^(2-npn);end; r1=0.01; if(ntest == 9 )mean(1) = 1.; p0=0.01 ;end; if(ntest == 10 )mean(1) = 1.; p0=0.033 ;end; if(ntest == 11 )mean(1) = 1.; p0=0.067 ;end; if(ntest == 12 )mean(1) = 10.; p0=0.01 ;end; if(ntest == 13 )mean(1) = 1.; p0=0.4 ;end; if(ntest == 14 )mean(1) = 1.; p0=0.7 ;end; if(ntest == 15 )mean(1) = 1.; p0=1.0; end; kg(1) = 0.0; if(ntest>=9) p = p0; end; ss = 1:nr; clear err; te(1) = std(1); terr(1) = (1.0 - mean(1)); err(1) = abs(1.0 - mean(1)); inn(1) = 0.; if(ntest>=9) unc(1) = p0; upb(1) = sqrt(p0+std(1)*std(1)); end; mse(1) = err(1)*err(1); %unc(1) = p0; ste(1) = std(1)*std(1); kgs(1)=0.0; sval(1)=1.; for i=2:nr; pv(i-1)=p; p = p + q; kg(i) = p/(p+r1); kgs(i)=0.001; %sval(i)=1.0-exp(-(mean(i-1)/std(i))); %sval(i)=-erf(mean(i-1)/std(i)); sval(i)=1.0-exp(-0.5*(mean(i-1)/std(i))*(mean(i-1)/std(i))); %sval(i)=1-exp(-1/(i)); merr=sign(x(i)-mean(i-1)); mean(i) = mean(i-1) + kg(i).* (x(i) - mean(i-1))+kgs(i).*merr.*sval(i); qq(i)=q; inn(i) = x(i) - mean(i-1); err(i) = abs(1.0 -mean(i)); err1(i)= abs(mean(i-1)-mean(i)); terr(i) = (1.0 -mean(i)); %mse(i) = sum(err.*err)/i; te(i) = std(i) / sqrt(i); ste(i) = te(i)*te(i); if(ntest>=9) p = p*(1-kg(i)); unc(i) = p; end; if(ntest>=9) upb(i) = sqrt(p+std(i)*std(i)); end; end; pv(nr)=p; sval(nr); %mse(nr), rerr = err(nr:-1:1); ccc = cumsum(err.*err)./ss; msqe1 = cumsum((x - mean(nr)).*(x - mean(nr)))/nr; msqe2 = cumsum((x - mean(nr)).*(x - mean(nr)))./ss; cinn = cumsum(inn.*inn)./ss; for i=1:nr; xmean(i)=xmean(i)+mean(i); xsd(i)=xsd(i)+mean(i)*mean(i); end; end; if(kk~=1) xmean=xmean/kk; for i=1:nr; axsd(i)=sqrt(xsd(i)/kk-xmean(i)*xmean(i)); end; subplot(111); subplot(211); loglog(y,xmean,'-');grid; xlabel('No of measurements'); ylabel('Mean from 25 simulations'); loglog(y,axsd,'-',y,0.1./sqrt(y),'-.');grid; xlabel('No of measurements'); ylabel('SD(-), SIG/n**0.5 from 25 simulations'); subplot(111); title(['p=',num2str(p0),' r=',num2str(r1),' q=',num2str(q)]); meta plkf; !copy plkf.met plkfnew.met; end; end; end; subplot(111); %ntest,q,p0,kg(nr),pause; %test,mean(nr),p,msqe2(nr),cinn(nr),pause; rccct = cumsum(rerr.*rerr)./ss; rccc = rccct(nr:-1:1); %ccc(nr), subplot(111); subplot(221); plot(y,x);grid;xlabel('No. of measurements');ylabel('Observations'); subplot(222); loglog(y,err,'-.',y,te,'-g');grid; xlabel('No of measurements'); ylabel('Error(-.),SD(-)'); innv = x - mean; rinnv = innv(nr:-1:1); m = nr/4; for j = 1:m; zz(j)=j; xx = innv(1:m/2); yy = innv( j:((m/2)+j-1)); r = corrcoef(xx,yy); cor(j) = r(1,2); end for j = 1:m; xx = rinnv(1:m/2); yy = rinnv( j:((m/2)+j-1)); r = corrcoef(xx,yy); cor1(j) = r(1,2); end subplot(223); plot(zz,cor,'-',zz,cor1,'-.');grid; xlabel('Lag '); ylabel('ACF from begin(-), end(-.)'); subplot(224); loglog(y,pv,'*',y,kg,'-',y,qq,'+',y,std,'.');grid;xlabel('No. of Measurements');ylabel('P(*),Q(+),R(.),Gain(-)'); subplot(111); title(['p=',num2str(p0),' r=',num2str(r1),' q=',num2str(q)]); meta plkf; pause; subplot(111); subplot(221); semilogy(y,msqe1,'-'); grid; xlabel('No of measurements');ylabel('MSE(-)'); subplot(222); loglog(y,err1,'-',y,innv,'*g');grid;xlabel('No of measurements');ylabel('Residues(-),INNV(*)'); subplot(223); plot(y,mean,'-');grid;xlabel('No of measurements');ylabel('Estimate'); subplot(224); loglog(y,kgs,'-',y,sval,'-.'); grid; xlabel('No of measurements'); ylabel('smode g(-), S Fn(-.)'); meta plkf; !copy plkf.met plkfsm4.met pause; mean(nr) %te(nr) msqe1(nr) ste(nr)
评论
    相关推荐
    • Sliding-Mode-Control.rar
      系统论述了滑模变结构控制的基本理论、基本方法和应用技术,并全部给出了MATLAB仿真分析。全书内容涵盖了滑模变结构控制发展综述、连续系统滑模控制、自适应鲁棒滑模控制、欠驱动系统滑模控制、反演及动态面滑模控制...
    • Improved-sliding-mode-observer-model.zip
      改进的滑模观测器模型,实现永磁同步电机反电动势的估算。
    • observer.zip
      This package includes the simulation of "A class ofproportional-integral sliding mode control with application to active suspension system" that is a paper published in System&Control Lecture Journal...
    • sliding mode observer for sensorless.rar
      2016--New variable gain super-twisting sliding mode observer for sensorless
    • Sliding-Mode-Observers.zip
      Oscillation Mitigation for Sliding-Mode Observers in Sensorless Control of IPMSMs
    • sliding mode control of TPMLM.rar
      该文提出一种基于不匹配干扰观测器的新型滑模控制策略。该策略在滑模面中引入扰动观测器,采用该扰动观测器观测不匹配扰动,确保TPMLM 系统对不匹配干扰和匹配干扰具有鲁棒性;将反馈q 轴电流融入速度控制器中,实现...
    • commande mode glissant.zip
      commande par mode glissant
    • Combining-the-Principles-of-Sliding-Mode--Direct.
      Combining the Principles of Sliding Mode, Direct Torque Control, and Space-Vector Modulation in a High-Performance Sensorless AC Drive
    • sliding mode.rar
      Paper about sliding mode for autonomous
    • 2008_Sliding mode observers - a survey.rar
      2008_Sliding mode observers - a survey