20200721 RT-BOX plant和controller 采样时间选择

boost_converter_1rtbox.plecs
在这里插入图片描述
初始化中,说1e-6是两台box的,2e-6是一台box的

%input parameters
Vin = 480;
Vinmax = 800;
Vout = 950;

fc = 20e3;
Ts_fpga = 7.5e-9;
prd = round(1/(fc * Ts_fpga));

f = 1/(Ts_fpga*prd); %Switching frequency
ftoggle = 50; %was f/400 ~50 Hz for two box configuration.

Tsw = 1/f;
RL = 15e-3;
dIL = 5;
dUL = 10;
P = 52e3;
Iout = P/Vout;
ILrefmax = P/Vin;
ILrefmin = P/Vinmax;

% Boost Converter design
D = 1 - Vin/Vout;
Rload = Vout/Iout;
L = Vin * D / dIL / f;
C = Iout * D / dUL / f;

% Initial conditions
IL0 = P/Vin;
VC0 = Vout;

% HIL simulation
Tdisc.Plant = 2e-6; %%was 1e-6 for two box configuration.
Tdisc.Controller = Tsw;

% Controller parameters
Tsig = 3/2*Tdisc.Controller;
K1 = 1/RL;
Tn = L/RL;
Ti = 2*K1*Tsig;
Kp = Tn/Ti;
Ki = 1/Ti;
Kbc = Ki/Kp;

% Scaling
Vout_scl = 4/Vout;
Vin_scl = 4/Vinmax;
IL_scl = 4/ILrefmax;

注意其中的代码:先设定好fc,然后根据FPGA的主频频率,通过取余得到 PWM_OUT所需要的频率值,因此不是完全绝对的值,而是一个近似值。。。。。。

fc = 20e3;
Ts_fpga = 7.5e-9;
prd = round(1/(fc * Ts_fpga));

f = 1/(Ts_fpga*prd); %Switching frequency

2e-6;;;小步长达不到,dspace比较多,,开关管的个数,,,130个开关元器件,,电容电感,,12个,,最多MMC,,,5电平,,,1个产品 ,,,5电平,,7电平估计也要级联了,,主要限制是步长,,步长
在这里插入图片描述
通过PWM OUT来设定开关频率

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值