# 故障频率接口说明 ## 接口 ```http GET /AnalysisMulti/fault-frequency/resolve ``` Nginx 对外路径: ```text http://127.0.0.1:8080/AnalysisMulti/fault-frequency/resolve ``` 算法服务直连路径: ```text http://127.0.0.1:8888/fault-frequency/resolve ``` ## 参数 | 参数 | 必填 | 说明 | |---|---|---| | `engineCode` | 是 | 风机编号,如 `WOG01344` | | `pointName` | 是 | 波形测点英文键,如 `main_bearing_radial_horizontal_vibration` | | `rpm` | 否 | 当前转速,默认 0;发电机测点用发电机转速,主轴承/齿轮箱低速测点会按机型传动比折算 | | `millTypeCode` | 否 | 机型编号;不传则从 `wind_engine_group` 查询 | ## 成功响应 ```json { "code": 200, "supported": true, "engineCode": "WOG01344", "millTypeCode": "WEM00041", "componentType": "main_bearing", "position": "front", "stage": 0, "brand": "SKF", "model": "240/560CA/W33", "nRolls": 108, "rollerDiameter": 18, "pitchDiameter": 623.13, "contactAngle": 15, "rpm": 1500, "shaftRpm": 13.277, "speedRatio": 112.98, "frequencies": { "BPFI": 12.282, "BPFO": 11.616, "BSF": 3.827, "FTF": 0.108 }, "source": "unit_dict_brand_model", "confidence": 0.95, "missing": [], "warnings": ["按机型传动比折算到低速轴"] } ``` 齿轮箱齿轮测点额外返回: ```json "GMF": 22.349 ``` ## 参数缺失响应 ```json { "code": 200, "supported": false, "componentType": null, "frequencies": {}, "missing": ["pitch_diameter", "contact_angle"], "message": "轴承几何参数不完整,无法计算故障频率", "warnings": [] } ``` ## 数据来源优先级 1. `component_fault_spec`(品牌/型号级故障参数); 2. `unit_dict_brand_model`(兼容现有轴承字典); 3. `unit_bearings` / `unit_dynamo` / `unit_gearbox_structure` / `unit_gearbox_bearings` 提供具体部件品牌型号和齿数; 4. `measurement_point_component` 提供测点与部件/位置映射。 ## 峰值证据接口 ```http GET /AnalysisMulti/fault-frequency/evidence ``` 参数: | 参数 | 必填 | 说明 | |---|---|---| | `windCode` | 是 | 风场编号 | | `recordId` | 是 | 波形记录 ID | | `engineCode` | 是 | 风机编号 | | `pointName` | 是 | 测点英文键 | | `rpm` | 否 | 备用转速;优先使用波形记录中的转速 | | `millTypeCode` | 否 | 机型编号 | 返回每条故障频率的: ```json { "faultType": "BPFO", "targetFreq": 8.63, "peakFreq": 8.3, "peak": 0.000004, "ratio": 5.36, "method": "envelope", "harmonics": [], "status": "normal|watch|alarm" } ``` 采样率低于 12800 Hz 返回 `supported=false`,不给出峰值结论。 ## 约束 - 缺参数时返回 `supported=false`,不生成频率、不参与故障判定; - 主轴承/齿轮箱低速测点按 `wind_engine_mill.rotational_speed_ratio` 折算,缺少传动比时按输入转速处理并在 `warnings` 标注; - 齿轮箱级间转速目前按低速轴近似,后续可由各级齿数精确计算; - 采样频率低于 12800 Hz 的波形不能用于轴承高频故障诊断。