💥💥💥💞💞💞欢迎来到本博客❤️❤️❤️💥💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
目录
💥1 概述
用于计算比例积分微分 (PID) 鲁棒控制器和电流反馈增益的代码,以确保不间断电源 (UPS) 的稳定性和性能。PID和电流增益通过在LMI区域中的鲁棒极点放置进行调谐。无需图形环境电路即可绘制输出,这使得研究应用变得容易。
【温馨提示】保证对载荷变化(内界)的鲁棒性。跟踪误差最小化,但未消除。考虑使用参考系变换或 PMR 控制器以获得更好的响应。
记得先安装Matlab优化包喔:
📚2 运行结果
部分代码:
clc; clear; close all;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% design parameters (ex: sig = 125)
sig = input('poles real part constraint: ');
sel = input('select controller: [P]/[PI]/[PD]/[PID]: ','s');
p = sig*20; % derivative high-frequency pole
% UPS reference
V = 127; % reference RMS voltage
f = 50; % reference frequency
% non-linear load model
R_L = 6.58; % resistor
[ nld ] = load_model( V,R_L ); % harmonics of current (open to edit load)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESIGN %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% import UPS uncertain model, PID and build augmented model x_a = [ x' x_c' ]'
[ ups ] = unc_ups_model( R_L );
[ pid ] = pid_model( p, sel );
[ agm ] = unc_agm_model( ups, pid );
% compute state-feedback matrix K for regional pole placement
[ K ] = lmi_regional( agm, sig, p );
% PID controller and closed-loop transfer functions
[ pid_tf, cl_tf, cl_tf_nl, id_tf, k_f ] = unc_get_tf( pid, agm, K, f );
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RESULTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PID, feedback (k_a) and feedforward (k_f) gains
gains
% simulate
results;
% plot
plot_res;
🎉3 参考文献
[1]Guilherme Keiel (2022). UPS PID Robust Controller Design.
🌈4 Matlab代码实现