matlab中signal pulses,Extract RPM signal from tachometer pulses

load tacho

Compute and visualize the RPM signal using tachorpm with the default values.

tachorpm(Yn,fs)

57dd4d6d2a9caa70fce08bbb69209f30.png

Increase the number of fit points to capture the RPM peak. Too many points result in overfitting. Verify this result by zooming in on the area around the peak.

tachorpm(Yn,fs,'FitPoints',600)

axis([0.47 0.65 1320 1570])

6373141c9466382308f4d0040bd3e97d.png

Choose a moderate number of points to obtain a better result.

tachorpm(Yn,fs,'FitPoints',100)

e59ef8225ed7d38172c845f9900190d1.png

Add white Gaussian noise to the tachometer signal. The default pulse-finding mechanism misses pulses and returns a jagged signal profile. Verify this result by zooming in on a two-second time interval.

rng default

wgn = randn(size(Yn))/10;

Yn = Yn+wgn;

[rpm,t,tp] = tachorpm(Yn,fs,'FitPoints',100);

figure

plot(t,Yn,tp,mean(interp1(t,Yn,tp))*ones(size(tp)),'+')

hold on

sl = statelevels(Yn);

plot(t,sl(1)*ones(size(t)),t,sl(2)*ones(size(t)))

hold off

xlim([9 10])

9c473b8f3d11f9b0712aeb094ed1ebb8.png

Adjust the state levels to improve the pulse finding.

sl = [0 0.75];

[rpm,t,tp] = tachorpm(Yn,fs,'FitPoints',100,'StateLevels',sl);

plot(t,Yn,tp,mean(interp1(t,Yn,tp))*ones(size(tp)),'+')

hold on

plot(t,sl(1)*ones(size(t)),t,sl(2)*ones(size(t)))

hold off

xlim([9 10])

9c99f409455640bc67fe36b51f4c4f5d.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值