我一直在为运动系统设计一个控制器。该控制器由增益、比例积分器(PI)和超前滤波器串联而成。我手动调整了控制器的增益,以获得所需的带宽(交叉频率)。铅和PI的频率基于经验法则(对于铅,分子中的带宽/3,分母中的带宽*3,以及积分器的带宽/5)。我如何确定控制器的增益,以便仅通过提及期望带宽即可自动获得。有什么经验法则可以遵循吗?它如何随着采样频率的变化而变化?
发布于 2016-03-04 18:42:53
PID控制器的设计是一个固有的难题。你不能通过简单的事情来做到这一点,除非你的系统允许你因为简单而派生出某些表达式。
要做到这一点,一种方法是求助于非凸非光滑优化算法,例如Matlab自己的systune或HIFOO或其他一些工具,这些工具求解"a“解,而不是"the”解。
文档中有关于循环整形和带宽限制的示例。
发布于 2016-03-07 08:18:19
好吧,你可以简单地使用你的经验法则,关于i操作和lead过滤器。然后,您只需检查开环的bode图。在您想要带宽的频率上检查系统的大小。然后,您可以简单地计算需要应用多少增益才能将点向上移动到0 dB,即带宽。
此外,经验法则假设采样频率足够高。但是,一般来说,如果采样频率变低,您的增益也会降低,但是I动作和前导滤波器的频率也会改变。
-编辑-
我为你写了一个小剧本。脚本是不言自明的。
同样的方法也可以应用于离散域。此外,我不会在离散域中设计控制器,而是在连续时域中设计控制器。接下来,我将使用离散化方法将控制器从连续时间转换为离散时间,例如Bilinear transform。http://nl.mathworks.com/help/control/ref/c2d.html提供了如何在Matlab中执行此操作的信息。
此外,我想向您推荐这个工具,http://cstwiki.wtb.tue.nl/index.php?title=Home_of_ShapeIt
clear all;
close all;
clc;
%% Initialize parameters
s = tf('s');
% Mass of plant
m = 10;
% Desired bandwidth
BW = 10;
%% Define plant
P = 1/(m*s^2);
%% Define filters
% Lead lag filter
f1 = (1/(2*pi*BW/3)*s + 1)/(1/(2*pi*BW*3)*s + 1);
% Integrator
f2 = (s + 2*pi*BW/5)/s;
% define Controller
C = f1*f2;
%% Determine gain
% Open loop
OL = C*P;
% Evaluate at bandwidth and get magnitude
mag = abs(evalfr(OL,2*pi*BW));
% Desired gain is 1/mag
C = 1/mag*C;
% Recalculate open loop
OL = C*P;
% Evaluate at bandwidth, magnitude should be 1
sprintf('Magnitude at bandwidth: %f\n',abs(evalfr(OL,2*pi*BW)));
%% Compute other stuff
% Sensnitivity
SS = 1/(1 + OL);
% Closed loop, complementary sensitivity
CL = OL*SS;
% Process sensitivity
PS = P*SS;
% Controller sensitivity
CS = C*SS;
%% Create some plots
% Open loop
figure(1);
bode(OL);
title('Open loop');
% Nyquist
figure(2);
nyquist(OL);
% Other sensitivities
figure(3);
subplot(2,2,1);
bodemag(CL);
title('Closed loop');
subplot(2,2,2);
bodemag(SS);
title('Sensitivity');
subplot(2,2,3);
bodemag(PS);
title('Process sensitivity');
subplot(2,2,4);
bodemag(CS);
title('Controller sensitivity');
% Step
figure(4);
step(CL);
title('Step response');https://stackoverflow.com/questions/35793264
复制相似问题