SINIDE - Parameter identification of a sine-wave from a measured signal

버전 1.7.0.0 (1.11 MB) 작성자: Miroslav Balda
Frequency, amplitude, phase shift and mean value of the best sinus fit to a sampled signal.
다운로드 수: 1.3K
업데이트 날짜: 2015/6/15

라이선스 보기

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.

인용 양식

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. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2006b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Linear Model Identification에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.7.0.0

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

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.

1.5.0.0

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

1.4.0.0

Replaced initial figure of this leave.

1.3.0.0

Replaced initial figure of this leave.

1.2.0.0

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

1.1.0.0

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

1.0.0.0