Feeds:
Posts
Comments

Matlab has very good plotting capabilities, but the required command syntax is somewhat awkward.

Here is a hopefully user-friendly GUI for plotting XY curves from array data. The data must have two columns. Typical applications would be for a time history or frequency response function.

plot_two_curves.m
plot_two_curves.fig

The original goal was to write a GUI for superimposing two curves on the same plot, but the GUI works just as well for plotting a single curve.

This is version 1.0. So please check back for further revisions.

- Tom Irvine

drop_d


Gnuplot
is a portable command-line driven graphing utility for Linux, OS/2, MS Windows, OSX, VMS, and many other platforms. The source code is copyrighted but freely distributed (i.e., you don’t have to pay for it). It was originally created to allow scientists and students to visualize mathematical functions and data interactively, but has grown to support many non-interactive uses such as web scripting

Gnuplot can be downloaded from previous link or from: softpedia gnuplot

* * *

Here is an example for plotting the time history shown above using the following files:

Gnuplot command file:  plot_drop.plt

Time history:  drop.txt

* * *

Here is an example for generating a graph with two subplots using the multiplot command.

Gnuplot command file:  plot_drop_multiplot.plt

Time histories:  drop.txt  &  drop_velox.txt

Here is an alternate example that plots the two curves in separate windows:  plot_drop_2.plt

* * *

The follow command is then entered into the gnuplot window:

gnuplot>load “plot_drop.plt”

* * *

The drop_plot.plt file also generates a corresponding png file as shown at the beginning of this post.

The  above plot was made using Gnuplot Version 4.6 patchlevel 3.

The png file can be accessed by other applications but may require the following command first depending on the application, operating system, etc.

gnuplot>clear

* * *

Here is an example for plotting a power spectral density in log-log format, with some manually added tics.

Data file: plate.psd

Gnuplot file: plot_psd.plt

gnuplot>load “plot_psd.plt”

* * *

Here is an example for plotting a shock response spectrum with two curves and a legend.

Data file:  half_sine_srs.txt

Gnuplot file:  plot_srs.plt

gnuplot> load “plot_srs.plt”

* * *

Here is an example for calling gnuplot from within a Fortran program running in Ubuntu:  fortran_gnuplot_demo.f

The key code line is:

CALL SYSTEM(‘gnuplot gnuplot_demo.plt -persist’)

* * *

See also:  Python & Gnuplot

* * *

- Tom Irvine

Alas, the water drainage pipes in my home have developed a singing sound with a frequency of 400 Hz.  This is slightly above a G note on the musical scale.  The singing occurs when someone has finished taking a shower on the second floor.

Here is a sound recording: pipes_singing.mp3

We have a plumber coming to fix the problem tomorrow.  He said that the pressure-reducing valve may need adjustment.

- Tom Irvine

Here is a project that my NASA colleagues have been working on:  FSC_damper.pdf

The original goal of the project was to use the Ares I second stage as a LOX damper to mitigate the first stage  thrust oscillation.

See also:

http://blogs.nasa.gov/cm/blog/Constellation.blog/posts/post_1239311627391.html

- Tom Irvine

The Craig-Bampton method is method for reducing the size of a finite element model, particularly where two or more subsystems are connected. It combines the motion of boundary points with modes of the subsystem assuming the boundary points are held fixed.

Here is a tutorial paper.

Craig-Bampton Method for a Two Component System: CB_two_component.pdf

See also:

Assembly of subsystem matrices: assembly_subsystem_matrices.pdf

Component Mode Synthesis, Fixed Interface Model:  component_mode_synthesis.pdf

Mass Condensation, Guyan Reduction:  mass_condensation.pdf

* * *

Here are Matlab scripts used for the examples in the paper.

This script sets up the initial mass and stiffness matrices for each system: spring_mass_series.m

This script and its supporting function perform the Craig-Bampton transformation on the subsystem mass and stiffness matrices:

Craig_Bampton.m
CB_partition.m

This script is used to assemble the Craig-Bampton transformed mass and stiffness matrices and then calculated the natural frequencies and modes shapes: mass_stiffness_assembly.m

Here is a supporting function used by the scripts:  Generalized_Eigen.m

* * *

See also:

Structural Dynamics – Finite Element Method Page

* * *

- Tom Irvine

Doppler Shift

doppler_effect

Here is a Matlab script for Doppler shift calculations: doppler.m

Here is a related Newsletter article and sound files: June2003_NL.pdf

K5LA.wav

cno_wav

* * *

See also:  Vibrationdata Acoustics Page

* * *

- Tom Irvine

Here is a Matlab script and its supporting function for identifying the frequencies and amplitudes for one or more sine functions.

sinefind.m
sfa_engine.m

Trial-and-error curve-fitting is used with some convergence techniques.

Here is measured accelerometer data from a channel beam excited by an impulse force. channel.txt

The data has two columns: time(sec) & accel(G)

The response is largely free vibration.

The data shows a beat frequency effect with two superimposed sine functions, which can be identified using the sinefind.m script. The resulting frequencies are natural frequencies.

* * *

Here is a similar script for curve-fitting a time history with one or more damped sine functions

sinefdam.m
sf_engine.m

Here is a measured acceleration time history to practise with. Try the curve-fit over the time segment 0.4 to 4.5 seconds.

drop.txt

* * *

See also:

A Time Domain, Curve-Fitting Method for Accelerometer Data Analysis: AIAA_7667_slide.ppt

* * *

If you have any questions on how to use these scripts, please send your data sample via Email to: tom@vibrationdata.com

* * *

- Tom Irvine

Follow

Get every new post delivered to your Inbox.

Join 82 other followers

%d bloggers like this: