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

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

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

[复制链接]

该用户从未签到

尚未签到

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

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

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

×
1.png 2.png 最近在做电流预测控制算法,在本论坛找到了这个模型,想研究一下,有些问题需要大家给予解释一下,在此谢谢大家了!!!!!我把预测控制器的代码给贴在下面,谁能给我解释一下?
; Y* e) ]! K7 D3 H) C# p%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
' S& @: P% o1 Q2 J% This function contains the algorithm for the predictive current control / F2 {) g( A9 R9 l# Z% q& |5 i: z
% of a two-level voltage source inverter.
; A$ G8 E9 q0 q+ l: l0 j! F% Inputs:
7 N1 c, a4 h, G& E%   I_ref   := Two-element vector containing the reference current in 5 p8 \. ^+ O3 |0 Y6 x
%              alpha-beta coordinates.  [% U5 S* T" f4 Q) f! |
%   I_meas  := Two-element vector containing the measured current in
/ V, D" k% j8 R1 r% A' g% @* `* O3 U%              alpha-beta coordinates.
# @) Y/ F' K1 s* ^* q3 n6 }% Parameters (defined in the file parameters.m):
; H/ d9 i$ h* n$ k( e( Y. S%   R       := Load resistance. X3 }" l8 S$ ^6 q2 w- ?/ |
%   L       := Load inductance
" k& I9 z* w; j4 Z. g%   Ts      := Sampling time  E0 z) r* I! ]
%   v       := Eight-element vector containing the voltage vectors that can
  G1 L- a% Q+ k# V: }%              be generated by the inverter, in alpha-beta coordinates.
+ W5 G0 r$ d% j  H4 T* h%   states  := Eight-by-three array containing the switching states for ) s# z0 M2 O7 {. T- t$ S/ o2 X) }
%              each voltage vector.* V1 z' n6 A$ F7 F
% Outputs:% P6 w6 |! O: N/ `0 F/ b- j
%   [Sa, Sb, Sc] := switching state corresponding to the optimum vector to 0 ^, M0 H6 a3 g/ R
%                   be applied in the next sampling period.5 p6 m, n3 ~2 m5 a2 h# J# Z
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%/ s- C0 y+ N3 d; B% `
2 T/ a3 P7 \9 z8 R5 [- F: T9 r
function [Sa,Sb,Sc] = control(I_ref,I_meas,R,L,Ts,v,states)  S4 W; ]1 h$ d: |3 E0 Z# y4 w
% Optimum vector and measured current at instant k-1
( r6 k) V* k5 a7 v1 lpersistent x_old i_old 0 D! C8 ^  [! o/ p& @1 h
% Initialize values; Y% t4 f( m% @; p0 Z8 k9 y  L
if isempty(x_old), x_old = 1; end" m# Q! X/ e/ J/ B* ~) i
if isempty(i_old), i_old = 0+1j*0; end
- @* L6 M8 O2 `0 B) O7 {- V9 U! k# ]: Zg = zeros(1,8);2 I1 t9 j4 ?/ z! U; Y$ a
% Read current reference inputs at sampling instant k) @1 |1 z. t. }7 Z: S; ]# x) S
ik_ref = I_ref(1) + 1j*I_ref(2);
8 e; o; x3 b2 o. M, c, [& x) f% Read current measurements at sampling instant k$ L7 p/ n+ Z* E$ K9 b; z2 K
ik = I_meas(1) + 1j*I_meas(2);+ c) n! j# S3 H& {# u
% Back-EMF estimate6 O" w" Z$ ^- c* y) k+ W; w
e = v(x_old) - L/Ts*ik - (R - L/Ts)*i_old;4 y' Y; u8 n7 C; c8 v
% Store the measured current for the next iteration
3 m5 ?; H: y! R6 f8 l, zi_old = ik;$ u5 k* j2 }; o7 v. R, U( M, {
for i = 1:8+ _' |" ]  Y$ |8 i' q
    % i-th voltage vector for current prediction
+ B8 U* h5 _) R+ ]% W    v_o1 = v(i);
( l4 h5 w* ^) h7 A6 s; h    % Current prediction at instant k+1
: ~9 L, e& U- X/ y    ik1 = (1 - R*Ts/L)*ik + Ts/L*(v_o1 - e);
4 y' Z& ~/ u! Z, k; n# @! N, u    % Cost function
' t0 L  K3 z0 F% c$ n    g(i) = abs(real(ik_ref - ik1)) + abs(imag(ik_ref - ik1));
* o# ?4 q3 t1 ]2 ^end) H  A2 h+ g, T5 B* A% I, Z
% Optimization
+ z3 X5 k7 p; s5 i4 M# C[~,x_opt] = min(g);& N, w; `' M* [
% Store the present value of x_opt
8 q  X) O$ F' {4 o( d0 ]( k% Rx_old = x_opt;
2 X) E& L* R# M& E& ]( {% Output switching states" y( L$ G, ]8 q# z2 Y
Sa = states(x_opt,1);
1 j" \9 T) ^* c/ GSb = states(x_opt,2);/ C( x& `9 s' v# V5 R
Sc = states(x_opt,3);
帖文化:【文明发帖 和谐互动】 社区精神:【创新、交流、互助、共享】
您需要登录后才可以回帖 登录 | 立即加入

本版积分规则

招聘斑竹

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

GMT+8, 2024-5-4 15:23

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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