The ability to specify an arbitrary accuracy is not available in Control System Toolbox 8.3 (R2009a). Currently, for transfer function (TF) and zero pole gain (ZPK) models, a fast search algorithm is used to determine the crossover frequency, which has a 1e-3 relative accuracy target. This means that the crossover frequency is determined with only 0.1% accuracy, which in turn means that the gain at this frequency won't be exactly -3dB. For example, for the same fifth order system 'sysd' (defined in the Summary section above), the relative accuracy can be computed as follows:
The relative accuracy is equal to 8.0727e-004, which is less than 0.1%.
As a workaround, if higher accuracy is desired, you can modify the "rtol" parameter in the BANDWIDTH function as follows.
NOTE: Making the modification mentioned in the workaround below may affect the behavior of the BANDWIDTH function itself, and any built-in functions or custom functions that make use of it. Please make sure that you retain a copy of the file being modified before you modify it so that you may be able to revert to it when necessary.
1. Execute the following command to open the BANDWIDTH function for LTI models:
edit(fullfile(matlabroot, '\toolbox\control\control\+ltipack\@ltidata\bandwidth.m'))
where 'matlabroot' is to be replaced by the path returned by executing the command 'matlabroot' at the MATLAB prompt.
2. Navigate to line 8 in the file, and set the parameter "rtol" to a value such as 1e-6, and then save it.
Best Answer