function [U] = SWCtruncated(t,Wtrue,Signal) Used to get the harmonic component (amplitude and phase) of the Signal at frequency Wtrue
75 descargas
Actualizado 9 nov 2021

Ver licencia

Extracts the harmonic component of the Signal at angular frequency Wtrue. Can be used as sinusoid amplitude and phase estimator if frequency is known or as a narrowband filter extracting particular frequency component from the signal. Equivalent to Fourier transform, just frequency is not limited to Fourier bins.
Uses sine wave correlation (SWC). More details in:
L.Svilainis, et al. The Automated Complex Impedance Measurement System. Electronics and Electrical Engineering. 2007. Nr. 4(76),pp. 59-62. Available at: http://eejournal.ktu.lt/index.php/elt/article/view/10720
Other m-files required: none
Subfunctions: none
MAT-files required: none
Authors: Linas Svilainis
Kaunas University of Technology, Dept. of Electronics Engineering,
Kaunas, Lithuania
email address: linas.svilainis@ktu.lt
December 2006; Last revision: 10-Jul-2018
Copyright: Linas Svilainis
Syntax: [U] = SWCtruncated(t,Wtrue,Signal)
Signal - (1,N) array of sampled signal values
t - time axis,(1,N) array, must be same length as Signal
Wtrue - angular frequency for estimation (2*pi*F)
U - measured complex amplitude of the sinusoid
The more periods you record the better is noise or other frequencies rejection, the better estimation accuracy;
Recond length is truncated to aproximately fit the integer number of frequency Wtrue periods;
Time axis t must be sampled equally;
Example (TestSWC)
clear all
fsampl=100e6;%sampling frequency is 100MHz
f0=1.3012e6;%sinusoid frequency is 1.3012MHz
phi=30/180*pi;%sinusoid phase is 30deg
Um=0.141;%sinusoid amplitude is 0.141V
N=100;%record length is 1000 samples
%make time axis:
%generate test signal:
%add some noise:
%estimate signal amplitude and phase:
Uest = SWCtruncated(t,2*pi*f0,MySignal);
%plot the raw signal and estimated harmonic component:
xlabel('Time, us')
ylabel('Amplitude, V')
grid on
axis tight

Citar como

Linas Svilainis (2024). SWCtruncated (https://www.mathworks.com/matlabcentral/fileexchange/68174-swctruncated), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2015a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Más información sobre Spectral Measurements en Help Center y MATLAB Answers.

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión

Truncation for short signals (1-2 periods) was working wrong.


Minor syntax changes