波信号处理(周期)

发布于 2025-01-06 20:46:35 字数 151 浏览 0 评论 0原文

检测波形信号中 1 个周期的最佳方法是什么?

有人有特定的算法来做到这一点吗?你知道你在哪里找到它的吗?

我知道 fft,但我不知道如何让它给我波周期(时间位置)。

将信号分成周期!

我想要 pascal、matlab...

What is the best way to detect 1 period in a wave signal?

Does somebody have a specific algorithm to do that? And do you know where you found it?

I know fft, but I don't know how make it give me the wave period (position at time).

Split the signal in periods!

I'd like pascal, matlab...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦醒灬来后我 2025-01-13 20:46:35

这可能根本不是最好的方法,但却是一种可以找到答案的方法
周期信号的周期是展开

阶段。这是Matlab
(实际上是 Octave)代码:

t = linspace(0, 20, 50);
sig = sin(t) + rand(size(t))*0.2;

% Hilbert transform to give an analytic signal.
% The complex argument will
% now be the instantaneous phase.
n = length(sig);
m = n/2+1;
U = fft(sig) / length(sig);
U((m+1):n) = 0;
cpx = ifft(U);

% Get the phase.
phase = arg(cpx);

% Unwrap the phase.
for i = 2:length(phase)
    k = round((phase(i) - phase(i-1))/(2*pi));
    phase(i) = phase(i) - k*2*pi;
end

% Fit a linear model.
lin_est = [t', repmat(1, length(t), 1)] \ phase';

% The frequency is the rate of change of the phase over time.
freq_est = lin_est(1)/2/pi
T_est = 1 / freq_est

其他需要查看的内容 acf
fft

This is probably not at all the best way, but one way that can work to find the
period of a periodic signal is to unwrap
the

phase. Here is Matlab
(actually Octave) code:

t = linspace(0, 20, 50);
sig = sin(t) + rand(size(t))*0.2;

% Hilbert transform to give an analytic signal.
% The complex argument will
% now be the instantaneous phase.
n = length(sig);
m = n/2+1;
U = fft(sig) / length(sig);
U((m+1):n) = 0;
cpx = ifft(U);

% Get the phase.
phase = arg(cpx);

% Unwrap the phase.
for i = 2:length(phase)
    k = round((phase(i) - phase(i-1))/(2*pi));
    phase(i) = phase(i) - k*2*pi;
end

% Fit a linear model.
lin_est = [t', repmat(1, length(t), 1)] \ phase';

% The frequency is the rate of change of the phase over time.
freq_est = lin_est(1)/2/pi
T_est = 1 / freq_est

Other thingns to look at acf,
fft.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文