SINIDE - Parameter identification of a sine-wave from a measured signal (2024)

You are now following this Submission

  • You will see updates in your followed content feed
  • You may receive emails, depending on your communication preferences

Version 1.7.0.0 (1.11 MB) by Miroslav Balda

Frequency, amplitude, phase shift and mean value of the best sinus fit to a sampled signal.

Follow

1.3K Downloads

Updated 15 Jun 2015

View License

License

  • Share
  • Open in MATLAB Online

  • Download

  • Overview
  • Functions
  • Version History
  • Reviews (1)
  • Discussions (8)

The function sinide is a robust replacement of the function sinfapm (FEX IDE 19902), which is rather sensitive to an initial guess of sine parameters. Results of all tested tasks were acceptable until Will Wehner supplied me two mat-files, which have shown that the sinide v.2.0 again does not supply right results. This was a reason why the atgorithm of the function has been completely rebuilt.

Now, the script sinidetest.m that comes with sinide.m has two branches. The first one starts with the prompt 'Load file'. The user may accept it by pressing ENTER key and then answer the second promt by entering the name of a file with an extension. Permitted extensions are .mat, .m, or any of text file extensions (.txt, .csv, .asc, ...). If extension is omitted, it is assumed that the program should load the mat-file of the given name, say 'y' or 'z', what means that files 'y.mat' or 'z.mat', which are included, be loaded and processed. Alternatively the user may enter any other name of mat-file supplied by him|her. The user's data file should provide a sampling frequency in variable fs, and vector of samples in variable y.

If the user refuses the offer from the first prompt by pressing any other key than ENTER, say 'n', the testing branch of the algorithm is entered. The user may accept offers of testing sine parameters by pressing ENTER keys, or some of them modify from a keyboard. The precise sine-wave is disturbed by a random noise, the intensity of which controls a parameter ra.
Results of such runs are presented in the upper figure. The function sinide does not need any guess of parameter values, and is very fast and stable. It needs the function 'extr' from FEX at www.mathworks.com/matlabcentral/fileexchange/10272, and the function LMFnlsq from www.mathworks.com/matlabcentral/fileexchange/17534 to perform nonlinear least squares fit after a thorough initial parameter estimation from the given vectors of samples of the dependent variable, a dependent (measured) variable and sampling frequency. The solution shows how good is the identification from a strongly noisy data.
The demo program sinidetest exploids other functions from FEX, what is described in a help part of the program. No optimization Toolbox is required.

Cite As

Miroslav Balda (2024). SINIDE - Parameter identification of a sine-wave from a measured signal (https://www.mathworks.com/matlabcentral/fileexchange/45567-sinide-parameter-identification-of-a-sine-wave-from-a-measured-signal), MATLAB Central File Exchange. Retrieved .

Requires

The test script sinidetest.m requires the functions inp.m (FEX ID 9033) and fig.m (FEX ID 9035).The function sinide.m needs the functions extr.m (FEX ID 10272), and LMFnlsq.m (FEX ID 17534).

MATLAB Release Compatibility

Created with R2006b

Compatible with any release

Platform Compatibility

Windows macOS Linux

Categories
  • Control Systems > System Identification Toolbox > Linear Model Identification >

Find more on Linear Model Identification in Help Center and MATLAB Answers

Tags Add Tags

harmonic process parameter identif... signal processing

Acknowledgements

Inspired by: inp.m, Figure window placement - fig.m, Frequency, amplitude, phase and mean value of sine wave

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor

  • sinide(y,fs,ipr,varargin)
  • sinidetest.m
  • vib.m
Version Published Release Notes
1.7.0.0

The errors found by Dan and repaired by Werner are removed now.

Download

1.6.0.0

Chnages in function sinide served for better description. Function driver sinidetest has been much improved in its ability to process data takem from arbitrary kinds of files.

Download

1.5.0.0

Improved description of requirements (function extr.m for finding all extremes).

Download

1.4.0.0

Replaced initial figure of this leave.

Download

1.3.0.0

Replaced initial figure of this leave.

Download

1.2.0.0

The algorithm of the function has been improved in the part of estimating initial guess of parameters.

Download

1.1.0.0

There were modified outputs of the function and the testing script, and repaired description of the function.

Download

1.0.0.0

Download

SINIDE - Parameter identification of a sine-wave from a measured signal (2)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom(English)

Asia Pacific

Contact your local office

SINIDE - Parameter identification of a sine-wave from a measured signal (2024)
Top Articles
Latest Posts
Article information

Author: Greg Kuvalis

Last Updated:

Views: 5866

Rating: 4.4 / 5 (55 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Greg Kuvalis

Birthday: 1996-12-20

Address: 53157 Trantow Inlet, Townemouth, FL 92564-0267

Phone: +68218650356656

Job: IT Representative

Hobby: Knitting, Amateur radio, Skiing, Running, Mountain biking, Slacklining, Electronics

Introduction: My name is Greg Kuvalis, I am a witty, spotless, beautiful, charming, delightful, thankful, beautiful person who loves writing and wants to share my knowledge and understanding with you.