No BSD License  

Highlights from
Time-Domain to Magnitude and Phase

4.0

4.0 | 1 rating Rate this file 29 Downloads (last 30 days) File Size: 275.26 KB File ID: #3021
image thumbnail

Time-Domain to Magnitude and Phase

by Marc Compere

 

14 Feb 2003 (Updated 18 Feb 2003)

Numerical inference of magnitude and phase information of streaming time domain input and output wav

| Watch this File

File Information
Description

This s-function captures a sample of two (ideally oscillatory) signals and, using a FFT, computed the amplitude ratio and phase difference between the two signals during a simulation.

This is intended to provide a way to numerically generate nonlinear equivalents of Bode plots for either linear or nonlinear systems. By choosing a frequency of interest (e.g. an input frequency you select), you can compute the amplitude and phase of another signal, like the output of a nonlinear control system, with respect to the input. Bode plots are defined and available only for steady-state linear systems with transfer functions. This function allows you to numerically generate similar plots (after your system reaches dynamic steady state) for linerr or nonlinear systems.

Required Products Simulink
MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
09 Feb 2005 Srikar Vulli

Hi,
 How did you guys solve the problem of 'Time-Scale' getting crushed in your case as well as MATLAB 'specgram' function ? (If you take a signal of length 'x', the final plots would be of 'x minus half the length of window'. I tried zero-padding the signal at the begining and the end. It seems, this idea is generating some erros at the begining and at the end when I tested a perfect 'Sine' wave using a window of length of 'one-cycle'. Any help please!!!

Srikar

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
spectral analysis Marc Compere 22 Oct 2008 06:56:48
time domain Marc Compere 22 Oct 2008 06:56:48
input Marc Compere 22 Oct 2008 06:56:48
output Marc Compere 22 Oct 2008 06:56:48
magnitude Marc Compere 22 Oct 2008 06:56:48
phase Marc Compere 22 Oct 2008 06:56:48
bode Marc Compere 22 Oct 2008 06:56:48
amplitude Marc Compere 22 Oct 2008 06:56:48
fun Marc Compere 22 Oct 2008 06:56:48

Contact us at files@mathworks.com