资源简介
自己根据书上搭的一个简单的两电平电流预测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个文件信息
- 上一篇:船舶横摇运动matlab仿真
- 下一篇:配电网潮流计算程序matlab
相关资源
- 配电网潮流计算程序matlab
- 船舶横摇运动matlab仿真
- 数学建模:层次分析法一致性检验M
- matlab实现逻辑回归
- matlab GUI教学视频
- MATLAB车辆工程应用实战 [余胜威编著
- 精通图像处理经典算法MATLAB版
- matlab中的Kriging KG工具箱,dace工具箱
- 音乐合成实验报告
- 数字调制解调技术的MATLAB与FPGA实现
- MATLAB小波分析与应用30个案例分析源代
- 可靠性方法:改进一次二阶矩法+Rac
- 解线性方程组的共轭梯度算法(Matl
- matlab图像复原、视频图像处理、运动
- MATLAB滤波程序
- MATLAB的43个案例分析书+代码+数据
- Image Processing ToolBox
- matlab帧差法物体检测
- MATLAB版数字图像处理 冈萨雷斯+中文高
- MATLAB微分方程高效解法:谱方法原理
- 现代永磁同步电机控制原理及MATLAB仿
- 《MATLAB神经网络43个案例分析》高清完
- 控制系统计算机辅助设计——MATLAB语
- MIMO-OFDM无线通信技术及MATLAB实现(中
- 数字图像处理MATLAB版冈萨雷斯 中文版
- 《MATLAB智能算法30个案例分析》第二版
- 量化投资__以MATLAB为工具
- Matlab各种常见算法代码总结
- MATLAB机器视觉工具箱
- 包含了ekfSLAM 1.0版本和2.0版本的MATLA
评论
共有 条评论