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

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

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

[复制链接]

该用户从未签到

尚未签到

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

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

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

×
1.png 2.png 最近在做电流预测控制算法,在本论坛找到了这个模型,想研究一下,有些问题需要大家给予解释一下,在此谢谢大家了!!!!!我把预测控制器的代码给贴在下面,谁能给我解释一下?
0 j7 G: e: M4 Z! K%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/ }% z" J0 c1 ~3 b% This function contains the algorithm for the predictive current control
+ q6 U# ?0 D5 g* e$ i( U  @% of a two-level voltage source inverter.
+ \' E7 o) C, n- e# p% Inputs:% S( C7 [. L$ u- g9 Z
%   I_ref   := Two-element vector containing the reference current in , h8 `) k, j3 t/ C' }# k' [  e3 o
%              alpha-beta coordinates.
0 R$ w) }- ?+ z%   I_meas  := Two-element vector containing the measured current in
! C# B( l. z2 r, i2 e%              alpha-beta coordinates.0 B# X  D8 R0 B# H. C5 k
% Parameters (defined in the file parameters.m):* x4 ~1 \" p+ s2 I! _
%   R       := Load resistance# o6 f/ x: A5 {* r" i
%   L       := Load inductance7 E% i: c, @$ T7 t
%   Ts      := Sampling time
# T& o) E/ y; x3 \4 a1 a' l0 k%   v       := Eight-element vector containing the voltage vectors that can
3 @+ v/ ?: \' O" [6 a2 T" ~%              be generated by the inverter, in alpha-beta coordinates.   [2 V; v7 }; m& K2 g: q& Z* X5 M+ X
%   states  := Eight-by-three array containing the switching states for ) d: I# B7 f! S' }6 L  u# l9 F
%              each voltage vector.
" Y  k/ N. I4 c8 ~% Outputs:  R5 `: X9 P9 t. g0 I
%   [Sa, Sb, Sc] := switching state corresponding to the optimum vector to ; W% ]0 y6 `/ {+ u3 G% ]
%                   be applied in the next sampling period.
' Z* G; q. p( H0 f# K%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9 w& L, ~* Y; w- k9 L2 n# y- w$ l" M
function [Sa,Sb,Sc] = control(I_ref,I_meas,R,L,Ts,v,states)
$ K; I% k" i' P) r0 N% Optimum vector and measured current at instant k-1* w  K0 ^1 g4 d1 _0 C, t+ N% y
persistent x_old i_old
5 W: K7 F8 C1 D7 w% Initialize values3 M3 z  b  @0 {
if isempty(x_old), x_old = 1; end
( F- u; \5 [, o# [if isempty(i_old), i_old = 0+1j*0; end
+ C% }* N* G# Og = zeros(1,8);
0 r. Y9 w& `" J: Y6 a+ B( z% Read current reference inputs at sampling instant k6 S, m* T' [; D7 d
ik_ref = I_ref(1) + 1j*I_ref(2);& s0 `3 P5 N7 z3 }
% Read current measurements at sampling instant k! F6 v5 k3 K0 C
ik = I_meas(1) + 1j*I_meas(2);& U% K, j8 R  k; u( g% L) m8 s
% Back-EMF estimate
; ]1 N, |- B; J# V% p1 je = v(x_old) - L/Ts*ik - (R - L/Ts)*i_old;* O% o/ s- e  t8 T1 u% U& A' ?6 Q
% Store the measured current for the next iteration+ F9 Q" i  z8 [: p" f. U7 q
i_old = ik;" G. y  @0 E8 z
for i = 1:8
# C- c" {9 e5 c% z/ _- h+ j" ^7 [. K    % i-th voltage vector for current prediction
, L; ?  ?) [- X1 g$ o    v_o1 = v(i);
  u+ Y$ z. @- m) R+ w6 l: ~    % Current prediction at instant k+1, h+ \6 L' ~- m1 A9 G
    ik1 = (1 - R*Ts/L)*ik + Ts/L*(v_o1 - e);
1 O* x; H- V: |8 A6 L" |    % Cost function
8 J& R8 A+ W8 x    g(i) = abs(real(ik_ref - ik1)) + abs(imag(ik_ref - ik1));
. ]+ _$ H6 Y- g5 Iend
, P7 u. p) K0 z' v8 J  K% Optimization% m4 A/ z- y1 W. s- b
[~,x_opt] = min(g);$ S! o8 u8 p: G) U
% Store the present value of x_opt2 j" I/ e9 m# k+ V8 |
x_old = x_opt;
1 ^) b% q% S; m7 t% Output switching states: e; W1 E1 [/ G8 w3 b1 Z, ?
Sa = states(x_opt,1);
$ x5 G* L6 O: c9 O9 hSb = states(x_opt,2);0 s6 r$ w2 L% k
Sc = states(x_opt,3);
楼主热帖
帖文化:【文明发帖 和谐互动】 社区精神:【创新、交流、互助、共享】
您需要登录后才可以回帖 登录 | 立即加入

本版积分规则

招聘斑竹

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

GMT+8, 2026-3-23 06:39

Powered by Discuz! X3.5 Licensed

© 2001-2025 Discuz! Team.

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