defaultGrid.m 443 Bytes
Newer Older
Kristian Soltesz's avatar
Kristian Soltesz committed
1
2
3
4
5
6
7
8
9
10
11
12
13
function w = defaultGrid(P)
% Get default angular frequency grid based on process dynamics.
%
% P   - LTI process model.
%
% Downloaded from git@gitlab.control.lth.se:kristian/PIDopt.git
% See the git repo for further documentation.

N = 5e2; % Number of grid points
[~,~,w]=bode(P); % Grequenies Matlab considers interesting
wMax = w(end);
wMin = min(w(1),wMax/100); % ensure to include low frequencies
w=logspace(log10(wMin),log10(wMax),N)';