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

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

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

[复制链接]

该用户从未签到

尚未签到

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

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

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

×
1.png 2.png 最近在做电流预测控制算法,在本论坛找到了这个模型,想研究一下,有些问题需要大家给予解释一下,在此谢谢大家了!!!!!我把预测控制器的代码给贴在下面,谁能给我解释一下?
9 l1 M( ]. |( _$ p6 c9 @4 S  W%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%: C% P+ N: N6 {; g, I
% This function contains the algorithm for the predictive current control # W& M3 ]/ P# k' O" N6 x, x
% of a two-level voltage source inverter.
8 M) t* J' b7 P% Inputs:
; \: F! _8 j9 `7 G+ B%   I_ref   := Two-element vector containing the reference current in
- E0 W  y+ S  P3 `  ]. ?%              alpha-beta coordinates.3 a* O# h6 \' z* h; U
%   I_meas  := Two-element vector containing the measured current in
/ J( @4 L6 t/ e* D5 ^* i5 _7 u%              alpha-beta coordinates.
! M5 ?- y+ C  i( \" b; b9 |% Parameters (defined in the file parameters.m):3 v7 n; Z. [7 X0 l7 p% V8 o
%   R       := Load resistance! S0 k7 Y, C0 s% W+ \; P
%   L       := Load inductance  K4 a( d$ F3 r; H+ w
%   Ts      := Sampling time
0 y! b# C! ?* a2 l1 v7 M0 A+ A8 M%   v       := Eight-element vector containing the voltage vectors that can
4 ]: G' P% G7 Y, p  y' g%              be generated by the inverter, in alpha-beta coordinates.
! J; r1 H/ p6 N% \%   states  := Eight-by-three array containing the switching states for
9 m$ T- T8 }  X7 O" h8 g$ D%              each voltage vector.
4 \/ r  p( l# `3 M/ w7 v. R% Outputs:
! C, c% {1 x5 R+ A2 o' y5 S+ M%   [Sa, Sb, Sc] := switching state corresponding to the optimum vector to ; q5 `& l0 B5 z2 G- e6 \
%                   be applied in the next sampling period.
9 w6 m- k+ _, m# n; U' Z1 S4 Y%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Q3 b+ {* E. W' ?: H+ h. T, f( w: |$ E1 q) p: A/ B
function [Sa,Sb,Sc] = control(I_ref,I_meas,R,L,Ts,v,states)
+ k5 W3 _5 z+ a& z% Optimum vector and measured current at instant k-1
- i% H! ~  k0 Kpersistent x_old i_old
0 N- D; g" D3 O0 r5 Z5 `; H- b% Initialize values# }( C8 t( r1 Q3 {
if isempty(x_old), x_old = 1; end
8 e9 I% M/ ?- R4 n  xif isempty(i_old), i_old = 0+1j*0; end% C$ E/ K, N4 U( }. `; H
g = zeros(1,8);9 e  M0 m. I: x5 m
% Read current reference inputs at sampling instant k
$ i, y- Q: V* Q5 l, S3 n. bik_ref = I_ref(1) + 1j*I_ref(2);! G. e6 b3 R$ @; T
% Read current measurements at sampling instant k
+ b& L; B* l. b* {* Y" Lik = I_meas(1) + 1j*I_meas(2);# o3 v# a1 S. }4 X
% Back-EMF estimate
3 M2 P! Z; ?8 Je = v(x_old) - L/Ts*ik - (R - L/Ts)*i_old;
" M: l  O4 r2 C1 K% Store the measured current for the next iteration  F5 V  u4 a! Q1 d" Q$ j* y
i_old = ik;
. q! {7 @/ O0 s( p' c# qfor i = 1:8) D! O0 X. l* m7 x9 B
    % i-th voltage vector for current prediction9 P$ [, f2 e3 l3 l& Z
    v_o1 = v(i);, m0 i" p# e# W, A+ K3 A' L
    % Current prediction at instant k+1" P' |8 L: T  a4 l8 O7 r
    ik1 = (1 - R*Ts/L)*ik + Ts/L*(v_o1 - e);
, t2 ~# |/ o7 k% x; R' B    % Cost function2 ~' s4 ~8 A- t% K/ W/ n$ G
    g(i) = abs(real(ik_ref - ik1)) + abs(imag(ik_ref - ik1));6 c2 A( e9 \( P- p! w2 _$ b) w
end* D  e9 f) ^: q/ J+ l. p
% Optimization
3 o# r( l/ }4 E( ~" T' y[~,x_opt] = min(g);4 c& p4 L' @4 e- _- p7 C
% Store the present value of x_opt
, ]& m; n# l. R/ C* |x_old = x_opt;! {1 f" [( M5 L$ n) G
% Output switching states& u, b9 ^$ o7 w+ q9 L* Z. S
Sa = states(x_opt,1);& ]9 s% }9 O/ l$ y" I2 g
Sb = states(x_opt,2);% l% O, Q& |7 E# `0 r2 T
Sc = states(x_opt,3);
帖文化:【文明发帖 和谐互动】 社区精神:【创新、交流、互助、共享】
您需要登录后才可以回帖 登录 | 立即加入

本版积分规则

招聘斑竹

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

GMT+8, 2025-9-6 04:56

Powered by Discuz! X3.5 Licensed

© 2001-2025 Discuz! Team.

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