This is a MATLAB script for basic analysis of an LTI system up to the 5th order.
Script is very readable so you may easily expand it and adjust to your liking.
It features a command line input of symbolic transfer function or transfer function coefficients and GUI for choosing the plot type.
After selection of plot type it automatically saves the high resolution .png plot image file in your MATLAB working directory.
In Windows operating system is usually located in:
C:/Users/username/My Documents/MATLAB
or in case of MacOS in:
Macintosh/Users/username/Documents/MATLAB
- Stability of a system
- Natural frequency and damping ratio
- Impulse response
- Step response
- Bode plot with asymptotes
- Amplitude-phase plot in abs unit
- Amplitude-phase plot in dB unit
- Phase-frequency plot
- Margins
- Pole-zero plot
- Nyquist plot
- Root locus
This script requires the Control Systems Toolbox.
I have tested it and it is fully working on MATLAB R2017A on MacOS with Control Systems Toolbox installed, i cannot guarantee full functionality for older versions.
Unfortunately it doesn't work properly in GNU Octave because of missing equivalent functions in control package.