• 大小: 217KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2022-06-11
  • 语言: Matlab
  • 标签: matlab  pcc  

资源简介

自己根据书上搭的一个简单的两电平电流预测simulink仿真模型,可以用,最基础的模型,有需要的朋友可以自己下载学习

资源截图

代码片段和文件信息

 function [SaSbSc] = control(I_refI_meas)
 % Variables defined in the parameters file
  Vdc = 520; % DC-link voltage [V]
 v0 = 0;
 v1 = 2/3*Vdc;
 v2 = 1/3*Vdc + 1j*sqrt(3)/3*Vdc;
 v3 = -1/3*Vdc + 1j*sqrt(3)/3*Vdc;
 v4 = -2/3*Vdc;
 v5 = -1/3*Vdc - 1j*sqrt(3)/3*Vdc;
 v6 = 1/3*Vdc - 1j*sqrt(3)/3*Vdc;
 v7 = 0;
 persistent Ts R L v states
 if isempty(Ts) Ts =25e-6; end
 if isempty(R) R = 10; end
 if isempty(L) L = 10e-3; end
 if isempty(v) v = [v0 v1 v2 v3 v4 v5 v6 v7]; end
  if isempty(states) states = [0 0 0;1 0 0;1 1 0;0 1 0;0 1 1;0 0 1;1 0 1;1 1 1]; end
 % Optimum vector and measured current at instant k-1
 persistent x_old i_old
 % Initialize values
 if isempty(x_old) x_old = 1; end
 if isempty(i_old) i_old = 0+1j*0; end
 g_opt = 1e10;
 x_opt = 1;
 % Read current reference inputs at sampling instant k
 ik_ref = I_ref(1) + 1j*I_ref(2);
 % Read current measurements at sampling instant k
 ik = I_meas(1) + 1j*I_meas(2);
 % Back-EMF estimate
 e = v(x_old) - L/Ts*ik - (R - L/Ts)*i_old;
 % Store the measured current for the next iteration
 i_old = ik;
 for i = 1:8
     % i-th voltage vector for current prediction
     v_o1 = v(i);
 % Current prediction at instant k+1
 ik1 = (1 - R*Ts/L)*ik + Ts/L*(v_o1 - e);
 % Cost function
 g = abs(real(ik_ref - ik1)) + abs(imag(ik_ref - ik1));
 % Selection of the optimal value
 if (g g_opt = g;
 x_opt = i;
 end
 end
 % Store the present value of x_opt
 x_old = x_opt;
 % Output switching states
 Sa = states(x_opt1);
 Sb = states(x_opt2);
 Sc = states(x_opt3);

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-12-25 11:35  control of invertersd\
     文件        1583  2012-11-28 18:28  control of invertersd\control.m
     文件         780  2012-11-29 12:14  control of invertersd\parameters.m
     文件       79302  2018-12-19 15:59  control of invertersd\PCCINVERTER.mdl
     文件       62741  2012-11-28 19:16  control of invertersd\PCCINVERTER.mdl.r2010b
     文件      229376  2012-11-29 12:14  control of invertersd\PCC_INVERTER_sfun.mexw32
     目录           0  2018-12-25 11:35  control of invertersd\slprj\
     目录           0  2018-12-25 11:35  control of invertersd\slprj\_sfprj\
     目录           0  2018-12-25 11:35  control of invertersd\slprj\_sfprj\PCC_INVERTER\
     目录           0  2018-12-25 11:35  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\
     目录           0  2018-12-25 11:35  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\
     目录           0  2018-12-25 11:35  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\html\
     目录           0  2012-11-29 12:14  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\html\chart2_71lqHliWOgW53eESPCyPfD\
     目录           0  2018-12-25 11:35  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\info\
     文件        1173  2012-11-29 12:14  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\info\binfo.mat
     文件        6175  2012-11-29 12:14  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\info\chart2_71lqHliWOgW53eESPCyPfD.mat
     目录           0  2018-12-25 11:35  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\src\
     文件       71348  2012-11-29 12:14  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\src\c2_PCC_INVERTER.c
     文件        1400  2012-11-29 12:14  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\src\c2_PCC_INVERTER.h
     文件       58741  2012-11-29 12:14  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\src\c2_PCC_INVERTER.obj
     文件        2499  2012-11-28 19:11  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\src\mexopts.bat
     文件          52  2012-11-29 12:14  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\src\PCC_INVERTER_sfun.bat
     文件        6140  2012-11-29 12:14  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\src\PCC_INVERTER_sfun.c
     文件         614  2012-11-29 12:14  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\src\PCC_INVERTER_sfun.exp
     文件         917  2012-11-29 12:14  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\src\PCC_INVERTER_sfun.h
     文件        2094  2012-11-29 12:14  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\src\PCC_INVERTER_sfun.lib
     文件        3456  2012-11-29 12:14  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\src\PCC_INVERTER_sfun.mak
     文件      151474  2012-11-29 12:14  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\src\PCC_INVERTER_sfun.map
     文件          76  2012-11-29 12:14  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\src\PCC_INVERTER_sfun.mol
     文件        4180  2012-11-29 12:14  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\src\PCC_INVERTER_sfun.obj
     文件       17400  2012-11-29 12:14  control of invertersd\slprj\_sfprj\PCC_INVERTER\_self\sfun\src\PCC_INVERTER_sfun_debug_macros.h
............此处省略4个文件信息

评论

共有 条评论