Anduin2017 / Anduin2017/HowToCook
使用有监督模型对火候等级进行定量分析的方法
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 102k
- Forks
- 11.1k
- Avg merge
- 14h 21m
- Merged PRs (30d)
- 2
Description
在编写新的菜谱时,我发现对于需要精确控制火候的菜肴,燃气炉具的火力难以用量化的方式表达:
将炉灶打开高火,同时锅中加入橄榄油,热锅 15-30秒。
将炉灶切换至中火,随后按顺序快速加入黄油
...
我阅读了以下的issue:
https://github.com/Anduin2017/HowToCook/issues/933
https://github.com/Anduin2017/HowToCook/issues/303
https://github.com/Anduin2017/HowToCook/issues/300
https://github.com/Anduin2017/HowToCook/issues/129
发现这似乎是一个长久的、没有被彻底解决的问题。我认为如果要将整个烹饪过程自动化,对于火候的量化是必须的。因此我在我的菜谱中加入了简易的火力参考标准:
- 对于燃气灶:
- 高火:旋转气阀至最大出气速度的 70%-90%。
- 中火:旋转气阀至最大出气速度的 40%-60%。
- 小火:旋转气阀至最大出气速度的 10%-30%。
电磁炉等电力烹饪厨具可以用温度和功率方便的判断火力,而燃气炉具则不同。正如 https://github.com/Anduin2017/HowToCook/issues/303 中提到,使用阀门旋转角来判断火力大小是不够严谨的。这是由于燃气灶、水龙头这类日常使用的阀门,通常属于非线性控制阀。对于大多数阀门系统,流量 $Q \propto \sqrt{\Delta P} \cdot A$, ( $\Delta P$ :压差, $A$:开口面积)
所以即使开口面积线性变化,流量依旧是非线性变化的。
我暂时想到了几个非接触式的定量分析燃气炉具火力的方案:
红外传感器测量
这是我能想到的最直观的办法,因为温度和热辐射成正比。
- 测量热辐射功率密度(单位:W/m²),归一化为百分比:火力百分比 = $\frac{E}{E_{\text{max}}} \times 100%$, $E$ 表示当前热辐射值, $E_{\text{max}}$ 表示最大热辐射基准值。
- 阈值划分(在校准后动态调整), 高火70%~100%, 中火30%~70%,小火:0%~30%
- 热辐射值扣除环境温度影响(如减去25°C室温对应的黑体辐射)
火焰光谱分析
高火时火焰呈蓝色(波长450-495nm),小火时黄色(570-590nm)增多。通过视觉方案分析火焰颜色来判断温度
- 用RGB传感器或摄像头,计算蓝色通道占比:
$$\text{蓝色比}=\frac{B}{R+G+B}\times100%$$ - 阈值:高火:蓝色比 > 60%,中火:40%~60%,小火:< 40%
温度变化率
锅底温度上升速率与火力正相关,和第一个方案有点类似。
- 监测锅底温度(热电偶或红外测温),计算斜率:
$$\Delta T/\Delta t=\frac{T_{t+1}-T_t}{\text{时间间隔}}$$ - 阈值(以水加热为例):高火:> 3°C/s, 中火:1~3°C/s, 小火:< 1°C/s
算法部分,应该要先校准:
- 高火校准:开最大火力,记录热辐射强度(设为基准值)、蓝色比、温度变化率。
- 小火校准:开最小稳定火焰,记录对应参数。
- 中火插值:通过线性或非线性模型生成中间阈值。
随后把数据应用到动态自适应模型:
- 使用机器学习如随机森林等算法对传感器数据(热辐射、光谱、温度变化率)进行融合。
- 模型输入:归一化后的传感器数据。
- 输出:火力状态概率分布,选最高概率作为结果。
例如,如果要在煮鸡蛋时判断火力:
- 传感器数据:
- 热辐射: $1200 W/m^2$(基准最大值为 $1500 W/m^2$ -> 80%)
- 蓝色比:65%
- 温度变化率:2.8°C/s
- 综合判断:
- 热辐射80% → 高火区间
- 蓝色比65% → 高火特征
- 温度变化率接近中火上限
- 结论:高火状态(置信度>90%)。
以上方案仅作抛砖引玉之用,但难点还是在于硬件怎么搭配,希望能有大佬把方案落地 :D
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no repository files, tests, or entry points; begin by reviewing linked issues 933, 303, 300, and 129 alongside the proposed sensor measurements and calibration steps. Done would mean turning the heat-level quantification proposal into a concrete hardware and supervised-model implementation, but the issue does not define acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- machine-learning
- Domain
- embedded-iot, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100