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

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

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

[复制链接]

该用户从未签到

尚未签到

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

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

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

×
1.png 2.png 最近在做电流预测控制算法,在本论坛找到了这个模型,想研究一下,有些问题需要大家给予解释一下,在此谢谢大家了!!!!!我把预测控制器的代码给贴在下面,谁能给我解释一下?
0 h, f% |) T2 E3 s%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
; l+ k2 `6 }6 a& b# c) H% This function contains the algorithm for the predictive current control
$ y$ Z& k; ]; H% S% of a two-level voltage source inverter.# X& N- Z% M# p, @- z/ K
% Inputs:
6 G7 i- F) y0 a: v, w& }7 @; i%   I_ref   := Two-element vector containing the reference current in % v6 g/ `3 f1 y' V
%              alpha-beta coordinates.2 F1 B, n% }+ J) l5 Y% g/ h  U
%   I_meas  := Two-element vector containing the measured current in
2 [. c. B- P' Q%              alpha-beta coordinates.
' f( K4 x: T% n, S( b% Parameters (defined in the file parameters.m):3 z( m  N3 y8 s7 \. p3 y" ^+ A
%   R       := Load resistance' ^6 Y: _+ k; W9 `2 K$ R$ [
%   L       := Load inductance. f7 C$ F' \: P9 b) E1 w
%   Ts      := Sampling time
. s. k6 f( f  Z' k/ |%   v       := Eight-element vector containing the voltage vectors that can
- _1 ]4 j- x: u7 T% B; Z%              be generated by the inverter, in alpha-beta coordinates. 6 ?" H2 \+ w; D' N
%   states  := Eight-by-three array containing the switching states for
2 S* i" E1 j9 w9 ^( s: |%              each voltage vector.
- o! K5 e" x) g5 l% Outputs:
( f3 B( z7 D! V; }, r0 n$ K! Z  s%   [Sa, Sb, Sc] := switching state corresponding to the optimum vector to
# `! p0 c: |" }; S%                   be applied in the next sampling period.! g" |: x% b, \
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
; D& l; A6 G9 H0 m2 C
( m' V3 ~- j/ G0 P7 Qfunction [Sa,Sb,Sc] = control(I_ref,I_meas,R,L,Ts,v,states)
* h) r$ O; z5 }& ~$ K* }% Optimum vector and measured current at instant k-1. \, N! P7 `/ G+ n; C, c7 u
persistent x_old i_old
1 }6 w0 c. |& p3 x1 V5 y" c: B% Initialize values" s+ [( `. u9 p8 ?9 H
if isempty(x_old), x_old = 1; end& U- Z* a2 A' b$ Z% _
if isempty(i_old), i_old = 0+1j*0; end, l5 ]& S, @# ]; [1 m& U$ V9 @2 C
g = zeros(1,8);  R6 I8 o; J% q9 b: @& v
% Read current reference inputs at sampling instant k$ f# b  u3 z$ S3 S- }6 D! b8 @- f
ik_ref = I_ref(1) + 1j*I_ref(2);9 s( a+ `& \$ x1 ]
% Read current measurements at sampling instant k
3 Z2 I: q8 |- `" ^  Bik = I_meas(1) + 1j*I_meas(2);5 ~8 I; h: ~% m/ T
% Back-EMF estimate
3 w8 F4 g, ~9 @: d# r0 Fe = v(x_old) - L/Ts*ik - (R - L/Ts)*i_old;
# R- s. a+ p9 C' G/ _' O$ J' T% Store the measured current for the next iteration% E; x% z4 S# w9 W
i_old = ik;
7 j, V/ o2 w0 E' Xfor i = 1:8
) k5 O  s0 E* D3 V. f4 T1 o    % i-th voltage vector for current prediction: ?% @9 R; b. |% U( Y* g$ D3 ~: k
    v_o1 = v(i);
5 w6 h; r3 V$ @* I* ^# ?  V& W    % Current prediction at instant k+13 B; Z; [! Q& E% O4 i1 ?$ d' h
    ik1 = (1 - R*Ts/L)*ik + Ts/L*(v_o1 - e);
. X9 O" p( U  Q$ V  P  b    % Cost function4 _% z9 G3 F0 I4 s( O
    g(i) = abs(real(ik_ref - ik1)) + abs(imag(ik_ref - ik1));& o" d1 m* @! _/ I1 A) N
end
) ]+ U( I) S+ \( ^: M( Q4 [+ k% Optimization
  K5 ^, y8 @# F1 o[~,x_opt] = min(g);
& H- g: i: e1 `3 a- P' K% Store the present value of x_opt- v" g" y: S; x# ~
x_old = x_opt;& t7 f5 B# W8 K5 m) {
% Output switching states
, G( X2 J8 S4 {; ?/ ], xSa = states(x_opt,1);; T/ |/ c0 o  M6 |! H' v
Sb = states(x_opt,2);
0 q7 _, t4 y! `3 B' H/ dSc = states(x_opt,3);
帖文化:【文明发帖 和谐互动】 社区精神:【创新、交流、互助、共享】
您需要登录后才可以回帖 登录 | 立即加入

本版积分规则

招聘斑竹

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

GMT+8, 2026-11-4 18:44

Powered by Discuz! X3.5 Licensed

© 2001-2026 Discuz! Team.

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