如何计算所需带宽的控制器增益?

时间:2016-03-04 10:10:48

标签: frequency phase control-theory transfer-function magnitude

我一直在为运动系统设计控制器。控制器包含增益,比例积分器(PI)和串联的超前滤波器。我手动调整了控制器的增益,以获得所需的带宽(交叉频率)。引线和PI的频率基于经验法则(对于引线,分子中的带宽/ 3,分母中的带宽* 3以及积分器的带宽/ 5)。 如何通过提及所需带宽来自动决定控制器的增益。是否有任何经验法则?它如何根据采样频率而变化?

2 个答案:

答案 0 :(得分:0)

PID控制器设计本质上是困难的问题。除非您的系统允许您因简单性而导出某些表达式,否则您无法通过简单的事情来完成。

一种方法是采用非凸的非光滑优化算法,例如Matlab自己的systune或HIFOO或其他一些解决“a”解决方案但不解决“解决方案”的工具。

有关于文档的循环整形和带宽限制的示例。

答案 1 :(得分:0)

那么你可以简单地使用关于I动作和引导过滤器的经验法则。然后,您只需检查开环的波特图。以您想要带宽的频率检查系统的大小。然后,您可以简单地计算需要多少增益来将点向上移动到0 dB(带宽)。

此外,经验法则假定采样频率足够高。但是,一般来说,如果采样频率变低,你的增益也会降低,但I动作和引线滤波器的频率也会发生变化。

-edit -

我为你做了一个小脚本。该脚本是自我解释。

可以在离散域中应用相同的方法。此外,我不会在离散域中设计控制器,而是在连续时域中设计控制器。接下来,我将使用离散化方法将控制器从连续时间转换为离散时间,例如Bilinear transformhttp://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');