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

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

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

[复制链接]

该用户从未签到

尚未签到

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

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

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

×
1.png 2.png 最近在做电流预测控制算法,在本论坛找到了这个模型,想研究一下,有些问题需要大家给予解释一下,在此谢谢大家了!!!!!我把预测控制器的代码给贴在下面,谁能给我解释一下?2 {5 p. t4 Y* k2 f; E1 g- ]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7 c# d. F! x6 K8 w3 C* l) p9 P6 k% This function contains the algorithm for the predictive current control
- U6 u6 \& v& `: I/ ]5 X: |) S% of a two-level voltage source inverter.
- Z/ W' T  p% L9 i% Inputs:6 O$ A* E4 ?' H/ P8 i7 s
%   I_ref   := Two-element vector containing the reference current in & j! o: [& S1 H2 H% P
%              alpha-beta coordinates.! m. v- N: K  o$ Z: U0 k
%   I_meas  := Two-element vector containing the measured current in " T: e2 e' `! x8 |  R
%              alpha-beta coordinates.8 n' G2 p0 }2 P3 J2 R  ?* @
% Parameters (defined in the file parameters.m):3 ^0 `9 S1 }( J' @( a& E
%   R       := Load resistance
% K2 ?# J2 U1 f% S8 J%   L       := Load inductance
6 y6 T7 a, r7 e; r; F%   Ts      := Sampling time
, b' L6 \) s* E  Z" A+ I%   v       := Eight-element vector containing the voltage vectors that can
- J% k' B' K# Z: l+ E- ?$ ^5 K%              be generated by the inverter, in alpha-beta coordinates.
& m4 |, z0 g5 k) O% `( ~( l" `%   states  := Eight-by-three array containing the switching states for
+ r& `1 t1 e8 [6 T& v%              each voltage vector.
- k( _1 r( n' e- K" W- h; Y5 z3 E% M% Outputs:# w9 T; b+ `+ \7 s/ b. J, }5 R: i
%   [Sa, Sb, Sc] := switching state corresponding to the optimum vector to * y( }. {. {" x  L6 \. t
%                   be applied in the next sampling period.6 Z) V9 G/ K6 h" D0 K- i, S+ Z
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
( g( ]0 I" c+ n  Q/ M
/ _& Z$ [; T" T0 E1 f# Rfunction [Sa,Sb,Sc] = control(I_ref,I_meas,R,L,Ts,v,states)$ t" h5 ~% d0 J$ q$ X
% Optimum vector and measured current at instant k-11 h) O2 N7 T4 e& w
persistent x_old i_old 1 v- T  C: M0 y
% Initialize values& F, N( i# b/ l# k9 n
if isempty(x_old), x_old = 1; end
2 V9 H; H: E+ q* \if isempty(i_old), i_old = 0+1j*0; end2 ~9 p: T$ W6 `$ ~- l
g = zeros(1,8);
' R! m# s) w3 t! f8 {% Read current reference inputs at sampling instant k
2 }6 J1 K  T1 A) f/ Bik_ref = I_ref(1) + 1j*I_ref(2);
$ _; X  _# t8 f$ X0 ]# K% Read current measurements at sampling instant k: k) N2 _0 R% b
ik = I_meas(1) + 1j*I_meas(2);% T, t1 \, j# q% M3 n' Q
% Back-EMF estimate
3 q" Z, v. e( U4 S  c& ]e = v(x_old) - L/Ts*ik - (R - L/Ts)*i_old;
0 K6 F7 F6 v5 @& M$ [% a6 S# ?9 s% Store the measured current for the next iteration2 O% E$ n. h% u. s
i_old = ik;" E( R2 \( `" _1 }( |2 m: ~# Q
for i = 1:8; y& Y8 V, y: l; r0 f8 v
    % i-th voltage vector for current prediction
6 C( C* |# E$ `) i    v_o1 = v(i);& u+ p& L; F+ f, O# ?! R
    % Current prediction at instant k+17 p5 t7 K8 [. _& C
    ik1 = (1 - R*Ts/L)*ik + Ts/L*(v_o1 - e);
# M2 V5 B% c& u7 U! B7 l5 e; \    % Cost function0 |/ L6 X/ ?- E  E# R
    g(i) = abs(real(ik_ref - ik1)) + abs(imag(ik_ref - ik1));1 v* r# S. U& `; K! M4 i9 }
end6 K- e8 O0 B$ r. d& j+ k; |! `
% Optimization' o0 F1 s2 x9 \1 O
[~,x_opt] = min(g);
: W8 V& O6 H: h& @/ P. Y7 z' s% Store the present value of x_opt
& H- j: z) I8 ]/ _/ H- _x_old = x_opt;( ]2 p, I% H6 Z3 |$ e4 m4 n
% Output switching states0 f3 e% k" d+ L9 F) m
Sa = states(x_opt,1);' l, h0 ?0 p* ~/ b# h$ W/ r/ Q
Sb = states(x_opt,2);
# S3 t; t8 y2 A7 l5 JSc = states(x_opt,3);
帖文化:【文明发帖 和谐互动】 社区精神:【创新、交流、互助、共享】
您需要登录后才可以回帖 登录 | 立即加入

本版积分规则

招聘斑竹

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

GMT+8, 2026-10-15 03:09

Powered by Discuz! X3.5 Licensed

© 2001-2026 Discuz! Team.

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