1 Introduction to the sysFreq Class
In Stochastic Controls there are essentially two parts to a frequency domain analysis. First, the disturbance and noise PSDs causing system error. Second, the system response. The system response is typically represented using a transfer function or state-space model.
In order to do a frequency domain analysis you must construct a frequency domain model (using transfer functions or state-space equations) to represent the system components. These components typically include
- the plant or system to be controlled,
- the feedback sensors, and
- the controller or compensator.
These component models must then be connected to form the
- open loop,
- closed loop, and
- disturbance rejection system models.
Then a standard disturbance PSD is applied to disturbance rejection model in order to determine residual error based on the disturbance at the plant's output. The influence of the noise PSD must be determined using the closed loop model. The 2 results are then RSS'd together determine the residual system error. This is fairly straight forward (if a little tedious) for simple SISO systems.
Even for simple SISO systems there are a few implementation issues to be aware of:
- The frequency vector of the PSD must be in the same units as the frequency vector of the system model.
- The elements of both the PSD and system model frequency vectors must be identical and the vectors must be the same size.
- The system model magnitude must be a raw magnitude for system response (to PSD) calculation - not in dB.
- MATLAB's bode command requires all frequency vector arguments be in rad/sec not Hz.
There are other implementation issues as well as these. All of the implementation issues are fiarly simple and straight forward to correct. However, it gets tedious fixing these issues for every analysis of every system since most real world systems are MIMO not SISO. Often the MIMO can be broken up into multiple decoupled SISO systems but then you have to add code or calls to helper function for each of these SISO models generated form the original MIMO.
The sysFreq class object is built in MATLAB 2009a. The purpose of the class is to encapsulate a number of useful functions and lessons learned when dealing with LTI objects as it relates to Control Systems. For controls we need to be able to plot the systemitself and against other systems, get the magnitude and phase response of the system, and finally get the system's response to an input PSD (provided using the psdData class). Additional useful features of the sysFreq class are:
- Automatic unit conversion handling
- 1 line plotting of the LTI object over the interested frequency range with annotation legends, titles, axes labels
- 1 line access to nicely formatted response data
1.1 Additional sysFreq Class Information
- sysFreq Class Example
- sysFreq Class Properties
- sysFreq Class Methods
- sysFreq Class Instantiation
- sysFreq Class Coding Notes
2 Download Here
- This class requires the Controls System Toolbox