Zibb

Design Idea

MathCAD functions perform log interpolation

Edited by Bill Travis

James Bach, Delphi Delco Electronics Systems, Kokomo, IN -- EDN, 10/30/2003

MathCAD provides a number of interpolation and curve-fitting functions, so that, given a set of X-Y data points, you can estimate the Y value for any given X coordinate. Unfortunately, these functions work poorly with data that is to be displayed in a nonlinear (logarithmic) manner. Examples of these functions are:

  • Log-Lin: phase/magnitude-versus-frequency (Bode plots);
  • Log-Log: impedance-versus-frequency (reactance plots); and
  • Lin-Log: impedance-versus-temperature (thermistor data).

Using the built-in "linterp" function, MathCAD estimates and plots the data (Figure 1). As you can see, at X coordinates between the original data points, the "linterp" function creates a "bulging" effect. The following trio of simple interpolation functions allows the correct interpolation of nonlinear data on its appropriate scale. These routines function by prewarping the incoming-data matrices before feeding them into the existing "linterp" function; for logarithmic Y-axis functions, you raise 10 to the result of the "linterp" function to restore the values to the proper decade:

Using the newly created LogLogInterp function, the straight-line data is displayed (Figure 2).



Reed Business Information Resource Center

Featured Company


Most Recent Resources

ADVERTISEMENT

ADVERTISEMENT

Feedback Loop


Post a CommentPost a Comment

There are no comments posted for this article.

Related Content

 

By This Author

There are no additional articles written by this author.


ADVERTISEMENT

Knowledge Center



Technology Quick Links

EDN Marketplace


©1997-2009 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy

Please visit these other Reed Business sites