aic-waveform
v0.1.0
Published
## 使用npm:
Downloads
2
Readme
aic-waveform v0.1.0
安装
使用npm:
$ npm install --save aic-waveform
使用文档
时域图
图谱分析时域图 显示振动幅值与之间的关系,又称幅值时域图。
通过波形图可以获取到振幅、周期等信息,特别是波形的形状及其变化状态,以及波形在各个周期下的重复性状况,有助于对振动故障和干扰信号的分析,一般正常运转状态下的波形图振动峰峰值不大,且形态近似正弦波。航天智控波形图上提供算法,可直观展示出示峰值、平均值、有效值、峰值指标、波形指标、脉冲指标、裕度指标、峭度指标等参数。
示例
基本用法
<template> <div class="chart" style="overflow: visible"> <time-wave :loading="loading" :series-data="waveData" :def-w="1200" :def-h="300"></time-wave> </div> </template>
<script> export default { name: 'Time', data () { return { waveData: [], loading: false } }, mounted () { this.getWaveData() }, methods: { getWaveData () { this.loading = true // 模拟请求 setTimeout(() => { this.waveData = [ { itemId: 'D86E2FFF-D718-5C62-3FB0-6645D3BB4FB0', itemName: '测点1 > 2023-07-24 00:01:28', devName: '在线设备', pointName: '测点1', data: { frequencyDomain: null, timeDomain: { waveData: [ -1488.1667, -1508.7662, -1504.8562, -1487.4993, -1504.6892, -1508.8855, -1488.4767, -1499.897, ... ], rms: 1500.03, peak: 1512.49, pp: 24.99, slope: -3375335940, kurtosis: 5063480200000, waveFactor: 1, peakFactor: 1.01, pulseFactor: 1.01, clearanceFactor: 1.01, kurtosisFactor: -1.45, mean: -1500, fabsMean: 1500, min: -1512.49, max: -1487.5, timeStamp: null, indexArr: null }, samplePoint: 1024, sampleFre: 256, waveUnit: 'um', currentVibrationType: 2, rpm: 0, phase: null }, recordlab: 'eed1403ba38149d691facc3266af349c', rpm: 0, acqdatetime: '2023-07-24 00:01:28', unit: 'um', trendResult: 24.986328 } ] this.loading = false }, 300) } } } </script>
seriesData 示例
[
{
itemId: 'D86E2FFF-D718-5C62-3FB0-6645D3BB4FB0', // 测点ID
itemName: '测点1 > 2023-07-24 00:01:28', // legend 展示名称
devName: '测点1', // 设备名称
pointName: '测点1', // 测点名称
data: { // 数据体
frequencyDomain: null,
timeDomain: {
waveData: [ // 纵轴数据集合
-1488.1667,
-1508.7662,
-1504.8562,
-1487.4993,
-1504.6892,
-1508.8855,
-1488.4767,
-1499.897,
...
],
rms: 1500.03,
peak: 1512.49,
pp: 24.99,
slope: -3375335940,
kurtosis: 5063480200000,
waveFactor: 1,
peakFactor: 1.01,
pulseFactor: 1.01,
clearanceFactor: 1.01,
kurtosisFactor: -1.45,
mean: -1500,
fabsMean: 1500,
min: -1512.49, // 最小值
max: -1487.5, // 最大值
timeStamp: null,
indexArr: null
},
samplePoint: 1024, // 采样点数
sampleFre: 256, // 采样频率
waveUnit: 'um', // 单位
currentVibrationType: 2,
rpm: 0, // 转速
phase: null
},
recordlab: 'eed1403ba38149d691facc3266af349c', // 记录唯一标识
rpm: 0, // 转速
acqdatetime: '2023-07-24 00:01:28', // 采集时间
unit: 'um', // 单位
trendResult: 24.986328 // 特征值
}
]
// 其中带注释的字段必须有
Props 配置
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
| :-: | :-: | :-: | :-: | :-: |
| loading | 当前组件加载中的状态 | Boolean | true/false | false |
| def-w | 可选,图表容器宽度,根据实际情况传参。图表组件默认会取容器实际的宽度,但是如果取不到,则会取此参数,所以尽量设置准确 | Number | - | 1200 |
| def-h | 可选,图表容器高度,同上 | Number | - | 300 |
| series-data | 可选,绘制图谱所需数据,不传则显示缺省;具体格式见上。 | Array | - | [] |
| extra-option | 可选,定制配置项(echarts配置项,默认会直接生成图谱,如果有定制配置,则组织配置项到此参数) | Object | - | {} |
| chart-theme | 可选,提供三套主题样式 | String | default / dark-blue / dark | default |
| color-array | 可选,图谱线条颜色配置,默认提供12个配色,根据谱线数量依次配色 | Array | - | ['#4BDBEC', '#3ADBA0', '#edcd05', '#e6186f', '#0ce663', '#900bb3', '#18d9e6', '#f39c12', '#d80027', '#3c1518', '#fdbdb4', '#009688' ]
|
事件
| 事件名 | 说明 | 参数 |
| :-: | :-: | :-: |
| set-option-success | 图谱 setOption
之后触发 |
频域图
图谱分析频域图
频域图显示各振动分量的频率及其振幅值
基本用法
<template> <!-- 时域图 --> <div class="chart" style="overflow: visible"> <frequency-wave :loading="loading" :series-data="waveData" :def-w="1200" :def-h="300" ></frequency-wave> </div> </template>
<script> export default { name: 'Freq', data () { return { routeName: this.$route.name, filterParams: {}, waveData: [], loading: false } }, mounted () { this.init() }, methods: { init () { this.waveData = [ { itemId: '8CD1A19D-2FA0-9413-312E-3499EA26983E', itemName: '在线设备 > 测点1', devName: '在线设备', pointName: '测点1', data: { frequencyDomain: { dataArrayX: null, dataArrayY: [ 0, 0.0016658222, 0.001667101, 0.0016554776, 0.0016577477, 0.0016594465, 0.0016599653, 0.0016561669, 0.0016624007, 0.0016506291, 0.0016540656, 0.0016538084, ... ], multipleDataArrayX: null, multipleDataArrayY: null, maxDataArrayX: [50, 350, 49.38, 550, 48.75, 1310], maxDataArrayY: [ 282.8364, 0.00197, 0.00196, 0.00189, 0.00181, 0.00181 ], time: null, rpm: 0 }, timeDomain: null, samplePoint: 8192, sampleFre: 5120, waveUnit: 'A', currentVibrationType: null, rpm: 0, phase: null }, recordlab: '432f18b3c1e847f1918288d7cbce955e', rpm: 0, acqdatetime: '2023-07-26 22:13:51', unit: 'A', trendResult: 99.9978 } ] } } } </script>
seriesData 示例
[
{
itemId: '8CD1A19D-2FA0-9413-312E-3499EA26983E', // 测点ID
itemName: '在线设备 > 测点1', // legend 展示名称
devName: '在线设备', // 设备名称
pointName: '测点1', // 测点名称
data: { // 数据体
frequencyDomain: {
dataArrayX: null,
dataArrayY: [ // 纵轴数据集合
0,
0.0016658222,
0.001667101,
0.0016554776,
0.0016577477,
0.0016594465,
0.0016599653,
0.0016561669,
0.0016624007,
0.0016506291,
0.0016540656,
0.0016538084,
...
],
multipleDataArrayX: null,
multipleDataArrayY: null,
maxDataArrayX: [50, 350, 49.38, 550, 48.75, 1310], // 最大的几个幅值集合的X坐标
maxDataArrayY: [ // 最大的几个幅值集合,与maxDataArrayX坐标对应
282.8364,
0.00197,
0.00196,
0.00189,
0.00181,
0.00181
],
time: null,
rpm: 0
},
timeDomain: null,
samplePoint: 8192, // 采样点数
sampleFre: 5120, // 采样频率
waveUnit: 'A', // 单位
currentVibrationType: null,
rpm: 0, // 转速
phase: null
},
recordlab: '432f18b3c1e847f1918288d7cbce955e', // 记录唯一标识
rpm: 0, // 转速
acqdatetime: '2023-07-26 22:13:51', // 采集时间
unit: 'A', // 单位
trendResult: 99.9978 // 特征值
}
]
// 其中带注释的字段必须有
Props 配置
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
| :-: | :-: | :-: | :-: | :-: |
| loading | 当前组件加载中的状态 | Boolean | true/false | false |
| def-w | 可选,图表容器宽度,根据实际情况传参。图表组件默认会取容器实际的宽度,但是如果取不到,则会取此参数,所以尽量设置准确 | Number | - | 1200 |
| def-h | 可选,图表容器高度,同上 | Number | - | 300 |
| series-data | 可选,绘制图谱所需数据,不传则显示缺省;具体格式见上。 | Array | - | [] |
| extra-option | 可选,定制配置项(echarts配置项,默认会直接生成图谱,如果有定制配置,则组织配置项到此参数) | Object | - | {} |
| chart-theme | 可选,提供三套主题样式 | String | default / dark-blue / dark | default |
| color-array | 可选,图谱线条颜色配置,默认提供12个配色,根据谱线数量依次配色 | Array | - | ['#4BDBEC', '#3ADBA0', '#edcd05', '#e6186f', '#0ce663', '#900bb3', '#18d9e6', '#f39c12', '#d80027', '#3c1518', '#fdbdb4', '#009688' ]
|
事件
| 事件名 | 说明 | 参数 |
| :-: | :-: | :-: |
| set-option-success | 图谱 setOption
之后触发 |