主要内容

Tachorpm

从转速计脉冲中提取RPM信号

描述

RPM= Tachorpm(x,fs)extracts a rotational speed signal,RPM, from a tachometer pulse signal vector,x, that has been sampled at a rate offsHz.

If you do not have a tachometer pulse signal, useRPMtrackto extractRPMfrom a vibration signal.

[RPM,t,tp] = tachorpm(x,fs)also returns the time vector,t,以及检测到的脉冲位置,tp

[___] = tachorpm(x,fs,Name,Value)指定使用的选项Name,Valuepairs and any of the previous syntaxes.

example

Tachorpm(___)with no output arguments plots the generated RPM signal and the tachometer signal with the detected pulses.

例子

collapse all

加载以300 Hz采样的模拟转速表信号。

loadtacho

使用并可视化RPM信号Tachorpmwith the default values.

Tachorpm(YN,FS)

增加捕获RPM峰的拟合点数。太多的要点导致过度拟合。通过放大峰周围的区域来验证此结果。

tachorpm(yn,fs,“ fitpoints',600) axis([0.47 0.65 1320 1570])

选择适度的点以获得更好的结果。

tachorpm(yn,fs,“ fitpoints',100)

将白色高斯噪声添加到转速表信号。默认的脉冲找到机制会错过脉冲并返回锯齿状的信号曲线。通过在两秒钟的时间间隔放大来验证此结果。

RNGdefaultwgn = 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)),'+') 抓住sl = statelevels(yn);绘图(t,sl(1)*一个(size(t)),t,sl(2)*一个(size(t))保持离开xlim([9 10])

Adjust the state levels to improve the pulse finding.

sl = [0 0.75]; [rpm,t,tp] = tachorpm(Yn,fs,“ fitpoints',100,'StateLevels',SL);图(t,yn,tp,均值(interp1(t,yn,tp))*一个(size(tp)),'+') 抓住绘图(t,sl(1)*一个(size(t)),t,sl(2)*一个(size(t))保持离开xlim([9 10])

Input Arguments

collapse all

转速表脉冲信号, specified as a row or column vector.

例子:double(chirp(( - 1.5:1/2e2:1.5),14,1.1,8,'quadratic')> 0.98)resembles a tachometer signal, sampled for three seconds at 200 Hz, and obtained during a quadratic run-up/coast-down test.

Sample rate, specified as a positive scalar expressed in Hz.

Name-Value Arguments

将可选的参数对Name1=Value1,...,NameN=ValueN, whereNameis the argument name and价值是相应的值。名称值参数必须在其他参数之后出现,但是对的顺序并不重要。

Before R2021a, use commas to separate each name and value, and encloseNamein quotes.

例子:“ pulsesperrev',3,“ outputfs”,1e3specifies that there are three tachometer pulses per revolution and that the returned RPM signal is to be sampled at 1 kHz.

转速计脉冲per revolution, specified as the comma-separated pair consisting of'PulsesPerRev'和一个真正的标量。

用于识别脉冲的状态水平,指定为逗号分隔对'StateLevels'和a two-element real vector. The first element of the vector corresponds to the low-state level and the second element corresponds to the high-state level. Choose the state levels so that all pulse edges cross within 10% of both of them. If this option is not specified, thenTachorpmcomputes the levels automatically using the histogram method, as in theStatelevelsfunction.

输出样本率, specified as the comma-separated pair consisting of'outputfs'和一个真正的标量。

拟合方法, specified as the comma-separated pair consisting of'FitType'和上e of either'smooth'或者'linear'

  • 'smooth'- 将一个最小二乘B-Spline拟合到脉冲RPM值。

  • 'linear'- 在脉冲RPM值之间线性插值。

b-spline断点,指定为逗号分隔对“ fitpoints'和一个真正的标量。断点的数量是曲线平滑度和与基础数据的亲密关系之间的权衡。选择太多的断点可能导致过度拟合。如果这个参数被忽略'FitType'被设定为'linear'

Output Arguments

collapse all

Rotational speeds, returned as a vector expressed in revolutions per minute.RPM具有与x

时间向量,作为秒数表达的正值向量返回。

Pulse locations, returned as a vector of positive values expressed in seconds.

算法

TheTachorpm功能执行以下步骤:

  1. 用途Statelevelsto determine the low and high states of the tachometer signal.

  2. 用途上升时间秋季to find the times at which each pulse starts and ends. It then averages these readings to locate the time of each pulse.

  3. 用途diffto determine the time intervals between pulse centers and computes the RPM values at the interval midpoints usingRPM = 60 / Δt

  4. If'FitType'指定为'smooth', then the function performs least-squares fitting using splines. If'FitType'指定为'linear', then the function performs linear interpolation usinginterp1

参考

[1]勃兰特,安德斯。Noise and Vibration Analysis: Signal Analysis and Experimental Procedures。英国奇切斯特:John Wiley&Sons,2011年。

[2] Vold,Håvard和Jan Leuridan。“使用卡尔曼跟踪过滤器,高分辨率订单跟踪以极端的降值率。”Shock and Vibration。Vol. 2, 1995, pp. 507–515.

Extended Capabilities

C/C++ Code Generation
使用MATLAB®CODER™生成C和C ++代码。

Version History

Introduced in R2016b