PsdData Class

From ControlTheoryPro.com

Jump to: navigation, search
Symbol.gif
PsdData Class
Green carrot left.gif
psdData Class Example psdData Class Instantiation
Green carrot.jpg
In order to prevent spam, users must register before they can edit or create articles.


1 Introduction to psdData Class

In Stochastic Controls Power Spectral Densities (PSDs) are often used to represent or define disturbance and noise environments. However, there are several implementation issues that must be dealt with when using PSDs.

The basics of a PSD are as follows:

  1. The PSD is represented in MATLAB by a vector of frequencies and magnitudes at those frequencies.
  2. PSDs typically (but not always) have units of magnitude squared (^2) over Hz.
  3. The primary metric used to compare one PSD to another is the Root Mean Square (RMS).
    • As with most metrics the RMS does not tell you everything.
    • Particularly important is where in the frequency range does most of the PSD energy resides. More specifically, "Is the energy in the low, mid, or high frequency range by comparison to your designed rejection and performance requirements?"

Some of the PSD implementation issues are:

  1. PSD measurements are often very coarse particularly in the low frequencies. The result of this is that low frequency measurements might be at 0.01 Hz, 0.1 Hz, 1 Hz, 2 Hz, 5 Hz, 10 Hz, ... For noise PSDs this is not usually an issue. However, disturbance PSDs are often dominated by low frequency content. The RMS is an integration under the curve and coarse measurements often lead to inaccurate RMS calculations.
  2. Addition and subtraction of PSDs must occur at the same frequency and this often dictates the use of an interpolated PSD.
  3. Measured data comes in the form that is easiest to capture with the least noise. This often leads to measurements in rate (from good MEMS gyros) or acceleration (from good MEMS accelerometers). While the measurements are in rate or acceleration the disturbances that need to be in any simulation may need to be integrated to a position PSD.

The psdData 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 PSD as it relates to Control Systems. For controls we need to be able to plot the PSD, plot the RMS (forward and backward sums), and return the maximum RMS. Additional useful features of the psdData class are:

  1. Automatic conversion of Time Series data to a PSD
  2. 1 line plotting of the PSD or the Time Series with annotation legends and proper units
  3. Overloaded methods for plus and minus
  4. Methods for integration and differentiation of the PSD (change a rate PSD to a position PSD or vice versa)
  5. Access to both the PSD and Time Series data in a single object

1.1 Additional psdData Class Information

2 Download Here

Download.png (Coming Soon)

3 Notes

  • psdData assumes that any PSD provided to it is 1-sided
  • psdData creates 1-sided PSDs from Time Series Data
  • The integrate, differentiate, plus, and minus methods will provide results based on the PSD meaning that Time Series data is not present in the resulting psdData object (it will still be present in the original objects though)
  • Calculation of the PSD from time series data requires the pwelch function and pwelch is part of the Signal Processing Toolbox.