Skip to content

dsstutts/EQCIRC3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This program calculates the equivalent circuit parameters from frequency-impedance magnitude magnitude data stored in the standard HP4294A Impedance Analyser output data format.

An image of the equivalent circuit may be found here: http://web.mst.edu/~stutts/piezoequivcircuit0.png

The program first calculates the approximate equivalent circuit parameters for a single resonance-antiresonance frequency pair. It then uses the Levenberg-Marquardt (LM) nonlinear least squares algorithm to optimize the model in the least squares sense. The LM algorithm is invoked via a call to leastsq(rez, z0, args=(yy, xx), full_output=1) from the scipy.optimize library.

See: http://docs.scipy.org/doc/scipy-0.14.0/ reference/generated/scipy.optimize.leastsq.html for more information.

eqcirc3.py calculates the following outputs stdout:

(1) fr (the resonance frequency) (2) fa (the anti-resonance frequency) (3) C0 (the parallel capacitance) (4) R1 (the motional resistance) (5) L1 (the motional inductance) (6) C1 (the motional capacitance) (7) Q (the series R1L1C1 resonance quality factor = 1/2zeta) (8) RMS Deviation

A graph of the data and model is also produced.

Example call: python eqcirc3.py inputdatafile.txt

The graph may be saved in PNG format, and the text may be redirected from stdout to a file like so:

python eqcirc3.py inputdatafile.txt > outdata.txt

This code is copyrighted by the author, but released under the MIT

license:

Copyright (c) 2016 eqcirc3.py

S&T and the University of Missouri Board of Curators license to you the right to use, modify, copy, and distribute this code subject to the MIT license:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The author kindly requests that any publications benefitting from the use of this software include the following citation:

@Misc{eqcirc1_2016, author = {Stutts, D. S.}, title = {{eqcirc3.py}: {Equivalent Circuit Parameter Estimator for Piezoelectric Structures.}}, howpublished = {\url{https://github.com/MSTESG/EQCIRC3.git}}, year = {2016}}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages