设为首页收藏本站|繁體中文 快速切换版块

 找回密码
 立即加入
搜索
查看: 555|回复: 0

电流预测控制simulink仿真,帮忙解释一下!!!!

[复制链接]

该用户从未签到

尚未签到

发表于 2014-11-28 15:47:52 | 显示全部楼层 |阅读模式
新人Show
论坛注册会员名: xueshoudaoke
研究方向/专业工种: 自动控制
课题项目/专业特长: 控制、检测、测试
兴趣爱好: 篮球
居住地: 郑州

马上加入,结交更多好友,共享更多资料,让你轻松玩转电力研学社区!

您需要 登录 才可以下载或查看,没有账号?立即加入

×
1.png 2.png 最近在做电流预测控制算法,在本论坛找到了这个模型,想研究一下,有些问题需要大家给予解释一下,在此谢谢大家了!!!!!我把预测控制器的代码给贴在下面,谁能给我解释一下?
' |" L% w/ e( ~$ w5 q6 K+ f" e9 B+ e) m6 W%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0 G) F$ W! q- }. H# w- S: N% This function contains the algorithm for the predictive current control
# ]: a& [9 {  ?- f% of a two-level voltage source inverter.
3 U( s4 K4 g4 X; Y# V, t9 }% i% Inputs:
4 R3 ~5 l* H; @- n3 Q( `%   I_ref   := Two-element vector containing the reference current in
1 z# c3 ]4 n* n%              alpha-beta coordinates.
, f( r# v" J) x! B; H# s& R( i%   I_meas  := Two-element vector containing the measured current in ' H; Q/ C! S  j4 d
%              alpha-beta coordinates.
. O: v. T4 ?& _% Parameters (defined in the file parameters.m):
; q% C% Y2 L- ~5 _+ I' k%   R       := Load resistance7 O. _1 ?$ w4 W8 A. f$ I
%   L       := Load inductance
) e1 y8 E7 X, e6 U# n; L; C8 R%   Ts      := Sampling time; d/ s% Q  V8 }- a
%   v       := Eight-element vector containing the voltage vectors that can
( a/ K% \' ~. t. ?& A%              be generated by the inverter, in alpha-beta coordinates.
% Z+ t/ T$ w4 p" P' K9 j& X7 J' V%   states  := Eight-by-three array containing the switching states for + t2 L. h  v6 b* x6 H
%              each voltage vector.
( r, L4 I9 ?7 \+ f2 d1 B  D% Outputs:3 }. c/ {3 }$ e. M5 H6 Z& [& |4 d7 i
%   [Sa, Sb, Sc] := switching state corresponding to the optimum vector to
5 Z4 H1 p& }) |8 x# d1 T%                   be applied in the next sampling period.2 c. ?  K9 c/ h. F0 u
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%! M" O! w- ~$ _; a, P4 ^8 t

) o7 r) P  z6 t! J" x- gfunction [Sa,Sb,Sc] = control(I_ref,I_meas,R,L,Ts,v,states)* P5 k; ?; O6 m) O8 t! ]- r
% Optimum vector and measured current at instant k-1, ]. w' Z& T3 [
persistent x_old i_old
( t& u5 I' b5 w) G7 N% Initialize values5 @7 X0 b" v) l( T
if isempty(x_old), x_old = 1; end
5 _! s1 J+ B& p+ qif isempty(i_old), i_old = 0+1j*0; end
$ @% v9 B5 u% r- s' Xg = zeros(1,8);0 O) q, i/ O9 U5 K5 [
% Read current reference inputs at sampling instant k; c1 J# h  c& [5 V; @
ik_ref = I_ref(1) + 1j*I_ref(2);
2 e* z9 t: G8 G2 V; M% Read current measurements at sampling instant k! C# B+ [. ]& a* D1 B4 s1 w
ik = I_meas(1) + 1j*I_meas(2);
0 ~  m/ S; J; Z. c# V% Back-EMF estimate
( N/ o$ H/ u  S" Ie = v(x_old) - L/Ts*ik - (R - L/Ts)*i_old;
- |. n/ L# [( i- B1 }4 y7 t: F( k# a% Store the measured current for the next iteration
3 Y: n( F  N$ mi_old = ik;7 {+ W: v1 C/ _6 S
for i = 1:8. X, {' F: N4 A# [2 }
    % i-th voltage vector for current prediction$ f( R: W; K% E
    v_o1 = v(i);& I# T; x) u7 ]9 d
    % Current prediction at instant k+1
7 {; P# g7 O" G( O1 e3 a: ?8 ?. d9 N    ik1 = (1 - R*Ts/L)*ik + Ts/L*(v_o1 - e);
. Q/ i0 S+ S9 ]    % Cost function
0 x- z- z8 X# s3 H. O1 C    g(i) = abs(real(ik_ref - ik1)) + abs(imag(ik_ref - ik1));
* K" ^! @! o" O9 hend
/ x. k1 K: r/ p8 w1 n" l6 @% Optimization
4 k" S' b% f' H! \' A: d[~,x_opt] = min(g);3 Y* i: R9 p; r8 ]4 ^
% Store the present value of x_opt
: G; T" N  c; p0 t9 hx_old = x_opt;
9 B; \6 M4 Z/ `/ ]: l% Output switching states- {, O5 K% b5 A6 J9 c. x
Sa = states(x_opt,1);7 H1 O, t! t$ c/ s' P
Sb = states(x_opt,2);
+ o8 |/ j8 z8 w' z3 ~; ]Sc = states(x_opt,3);
帖文化:【文明发帖 和谐互动】 社区精神:【创新、交流、互助、共享】
您需要登录后才可以回帖 登录 | 立即加入

本版积分规则

招聘斑竹

小黑屋|手机版|APP下载(beta)|Archiver|电力研学网 ( 赣ICP备12000811号-1|赣公网安备36040302000210号 )|网站地图

GMT+8, 2025-4-10 14:11

Powered by Discuz! X3.5 Licensed

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表