% BOD - MATLAB Digital Controller Optimization Toolbox 
% Version 3.1  05-October-2023
%
% introduction  >>>https://wwwpub.zih.tu-dresden.de/~geitner/ae_1_0e.htm<<<
% m-Files     >>>https://wwwpub.zih.tu-dresden.de/~geitner/ae_1_0_2e.htm<<<
%
% Z-transformation
%   trans       - Z-transformation with choice of measuring (instantaneous 
%                 or mean value) and coupling (sampler or sample&hold), 
%                 optionally control vector driven or menu driven, 
%                 optionally modified Z-transformation,
%                 optionally LTI system or transfer function syntax;
%
% Controller calculation
%   bod         - Discontinuous Magnitude Optimum=BetragsOptimumDigital=BOD
%                 optionally menu or control vector driven, current fsolve 
%                 calling syntax(PID only), arguments optionally LTI system
%                 or transfer function syntax;
%   bod_2       - same as bod, but obsolete fsolve calling syntax;
%   bod_gen     - Discontinuous Magnitude Optimum=BetragsOptimumDigital=BOD
%                 generally use of fsolve and general BOD equation system,
%                 optionally menu-driven or control vector, controller 
%                 selection: vector orders and switches or first and second
%                 order Lead / Lag controller;
%   bod_rst     - Discontinuous Magnitude Optimum=BetragsOptimumDigital=BOD
%                 single RST-structure control loop by Landau, no internal
%                 pole compensation, integral part switch, LTI arguments,
%                 optionally: menu-driven, initial values, options;
%   bod_prefi_opt - Pre-filter optimization: e.g. reference system designed
%                   for undelayed inputs, system to be optimized designed 
%                   for delayed inputs, thus the resulting system is hybrid
%                   this means a controller effects delayed input behaviour
%                   but the pre-filter effects undelayed input behaviour
%   eez         - Finite Time Settling (EndlicheEinstellZeit=EEZ),
%                 arguments: LTI system or transfer function syntax,
%                 optionally menu driven or control vector driven;
%   eez_gen     - differences to eez are: exclusively delayed inputs, step 
%                 response assumed, no zero compensation, 1 integral part,
%                 suboptimal design: choice 3 approaches, related to y_max,
%                 check conditions:  applied for controller and pre-filter,
%                 optional: digital behaviour illustration via dstep;
%   kmatrix     - calculation of BOD optimization equation system factors;
%   bodg        - supporting function - call via bod.m useful only,
%                 please do NOT put in directory private!
%   bod_gen_eq  - supporting function - call via bod_gen.m useful only,
%                 please do NOT put in directory private!
%
%Parameter conversion and running phase shift consideration
%   urlaz       - conversion of controller parameters between Laplace and 
%                 Z-domain,
%                 optionally menu driven or control vector driven, choice: 
%                 conversion direction, structures in Laplace or Z-domain,
%                 approximation methods;
%   urlaz2      - similar as urlaz, but restricted to PID controllers with
%                 damped derivative part, i.e. 4 controller PID parameters,
%                 choice: approximation method, display command switch;
%   gmt         - determination of general weighted mean dead times (GMT) 
%                 for bus data transfer inside single control loops;
%
%Control structure
%   kaskade     - cascade structure optimization with discontinuous control
%                 and pre-filter, optionally 2 or 3 control loops, options:
%                 LTI or transfer function syntax, control vector driven,
%                 optimization method choice: bod, eez or adapted syntax;
%   zust_au1    - exemplarily digital state control structure optimization,
%                 automatic calculation of 3 coefficients, BOD application,
%                 -> Discontinuous Magnitude Optimum, reference specified;
%   zust_aug1   - supporting function for z-domain structure, 
%                 call via zust_au1.m only;
%   zust_aup1   - same as zust_au1.m but variation of plant time constants: 
%                 motor, spring and load time constant;
%   zust_aut1   - same as zust_au1 but variation of sampling time and time
%                 constant of the closed loop current control model;
%   zust_...2   - obsolete fsolve calling syntax in contrast to zust_...1;
%   zust_bran_2.m   - same plant for a state control structure as zust_au1
%                     but changed control structure: using 4 coefficients,
%   zust_bran_2gl.m - supporting function - call via zust_bran_2.m only;
%                     control structure in z-domain - similar as zust_aug1;
%
%Analysis and check
%   guete       - step response quality calculation criteria using SIMULINK
%                 simulation results of a closed loop; optionally choice:
%                 overshoot, undershoot including point in time, rise time,
%                 transient time, 5 different sampling integral criteria;
%   simu        - step response simulation and optionally calculation of 
%                 quality criteria of a single control loop;
%
%Subdirectories
%DEMO           - 16 application examples, partly interactive, 
%                 see directory: 'TB_V31/DEMO'
%SYMDEF	        - add-on: easy symbolic BOD calculations
%                         (template with definition and 12 examples)
%SYMDEF\privat-for-comparison
%               - call and simulation of function kaskade, readily prepared
%                 for 3-loop cascade structure (example KASKADE_struc000),
%                 for comparison of both solutions;
%                 Readme3e.txt: table summarizing SYMDEF examples;
%                 sist_nili: example solution for nonlinearity by Algöwer;

% Copyright (c) 1997-2023 Dr. G.-H. Geitner, TU Dresden.
% All Rights Reserved.
% Last change: 2023/10/06.
