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

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

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

[复制链接]

该用户从未签到

尚未签到

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

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

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

×
1.png 2.png 最近在做电流预测控制算法,在本论坛找到了这个模型,想研究一下,有些问题需要大家给予解释一下,在此谢谢大家了!!!!!我把预测控制器的代码给贴在下面,谁能给我解释一下?
$ G3 E1 P  f2 G6 Q! T  H%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%. m$ C4 b5 u  T: p
% This function contains the algorithm for the predictive current control " i  ?9 }) r/ p1 T
% of a two-level voltage source inverter.
8 a9 [3 a$ f( n" M# `/ W$ C; v% Inputs:3 |* T) I4 o9 B, i1 j% \/ k
%   I_ref   := Two-element vector containing the reference current in % T0 D9 `' D; }, w
%              alpha-beta coordinates.) `1 @3 w4 f; E4 ?' \1 j+ W3 o- D
%   I_meas  := Two-element vector containing the measured current in 8 U3 z0 l7 n( k, e* T
%              alpha-beta coordinates.5 v  ?# _% t9 O
% Parameters (defined in the file parameters.m):
0 B: F7 F$ O7 Z%   R       := Load resistance$ T7 J0 Y5 Y1 C7 E8 a, e/ ?% l; u
%   L       := Load inductance8 ], e0 l: o, P7 ~9 s
%   Ts      := Sampling time
& Q& B* C7 l6 V: `: b: g6 L  }%   v       := Eight-element vector containing the voltage vectors that can! `5 s& t8 @+ n2 n
%              be generated by the inverter, in alpha-beta coordinates. + N5 k0 f( n. D$ y, t2 H  ^- v
%   states  := Eight-by-three array containing the switching states for ; n3 q0 }- x& J0 q$ t9 d# X6 S" Q# d) O
%              each voltage vector.
0 M& J; z. W4 W+ _. V% Outputs:# n, ?, x9 Q0 ?! N2 e2 m
%   [Sa, Sb, Sc] := switching state corresponding to the optimum vector to
! J* q! |1 z) K* o! R+ |%                   be applied in the next sampling period./ b6 n/ ^; z  A
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%. T- N5 U9 _- L$ c
, ^, T1 G! W0 _# G0 {1 @
function [Sa,Sb,Sc] = control(I_ref,I_meas,R,L,Ts,v,states)2 D: G: y' h5 Z1 v, q
% Optimum vector and measured current at instant k-1
( w* M% x9 v3 }persistent x_old i_old
# E; m- L; f  G4 h9 v3 K% Initialize values- E! f$ G4 a8 h, l' P2 m2 U
if isempty(x_old), x_old = 1; end5 M! t% c$ f" }" n. W$ c: {
if isempty(i_old), i_old = 0+1j*0; end) L, d3 _- j9 V+ n2 `
g = zeros(1,8);
3 f8 a8 @1 \, j- c( E- _% Read current reference inputs at sampling instant k
' B$ z( @9 Y4 p' mik_ref = I_ref(1) + 1j*I_ref(2);( }; F, d, c9 |4 ]8 c7 D; Q0 k5 Y; B
% Read current measurements at sampling instant k' G: c( D5 y- Y
ik = I_meas(1) + 1j*I_meas(2);* a0 v/ O7 V7 ?  }5 D
% Back-EMF estimate
3 L; X- v- U0 L# me = v(x_old) - L/Ts*ik - (R - L/Ts)*i_old;
' M+ G1 {) E3 L; c6 ^: I% Store the measured current for the next iteration7 f& f: D) i$ Z2 p+ O% B( e
i_old = ik;
# d: U* d; c$ Z: R" g0 H0 p8 ffor i = 1:87 _7 o2 @2 \1 t5 _
    % i-th voltage vector for current prediction1 p0 W1 ~8 A# g9 u
    v_o1 = v(i);
% e# o+ ^2 H$ x% r    % Current prediction at instant k+1
$ w+ P5 f% l, b2 S) w' ^    ik1 = (1 - R*Ts/L)*ik + Ts/L*(v_o1 - e);* U( r& [& i/ s
    % Cost function7 Z6 ?  u) k2 x6 L( s
    g(i) = abs(real(ik_ref - ik1)) + abs(imag(ik_ref - ik1));6 q6 k, P1 @1 [5 ~: {
end
+ l7 G# X2 [% b, \. L# X) v1 ^& t! N- N% Optimization- Q% U; j, e2 w' ^* D) C
[~,x_opt] = min(g);
( J( F5 j3 L3 e& _. c8 O/ j% Store the present value of x_opt. u( d0 J3 |& }/ F3 {$ o
x_old = x_opt;7 x: S) I! q0 [$ n% T( K. ]
% Output switching states
, e3 {$ o& @' k  D8 @6 ^' Y1 XSa = states(x_opt,1);0 s9 B- ], m& Y, ]  u5 F
Sb = states(x_opt,2);
( k" m! w  \* z$ V4 @Sc = states(x_opt,3);
帖文化:【文明发帖 和谐互动】 社区精神:【创新、交流、互助、共享】
您需要登录后才可以回帖 登录 | 立即加入

本版积分规则

招聘斑竹

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

GMT+8, 2025-2-23 17:03

Powered by Discuz! X3.5 Licensed

© 2001-2025 Discuz! Team.

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