From edece2cdd0570dbd3260536a68de00e051c7f811 Mon Sep 17 00:00:00 2001 From: louissun Date: Thu, 27 Aug 2026 14:40:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=8E=A7=E6=B5=81=E9=98=80?= =?UTF-8?q?=E5=89=8D=E6=B5=81=E9=87=8F=E4=BC=A0=E6=84=9F=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ open_loop.py | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index eae9169..5f20ba5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ __pycache__ 解释压差传感器工作原理.md 气体流量控制方案设计.md 阻塞流压力判断.md +压差压比对流量影响的突发奇想.md +MPC与PID控制系统对比分析.md \ No newline at end of file diff --git a/open_loop.py b/open_loop.py index cf51b38..ef70719 100644 --- a/open_loop.py +++ b/open_loop.py @@ -2,7 +2,7 @@ 本模块可独立运行,用于阀门开度—流量特性的开环标定/扫点。程序会: -1. 生成 0%~100%(默认 10% 间隔)共 11 个开度值并随机打乱; +1. 生成 0%~100%(默认 5% 间隔)共 21 个开度值并随机打乱; 2. 逐个开度:写入电机行程 → 以固定周期采集控流阀前后 4 个传感器 (前压力、前流量、后压力、后流量)→ 等待“控流阀后流量”进入稳态后 切换到下一个开度; @@ -42,14 +42,14 @@ from flow_control import opening_to_motor_position PRESSURE_AFTER_CHANNEL = config.PRESSURE_INPUT_CHANNEL # 后压力,默认 0 FLOW_AFTER_CHANNEL = config.FLOW_INPUT_CHANNEL # 后流量,默认 1 PRESSURE_BEFORE_CHANNEL = 2 # 前压力(新增,需确认) -FLOW_BEFORE_CHANNEL = 3 # 前流量(新增,需确认) +FLOW_BEFORE_CHANNEL = None # 前流量(新增,需确认) MOTOR_CHANNEL = config.MOTOR_OUTPUT_CHANNEL # AO 通道 -# 开度扫描:0%~100%,默认 10% 间隔,共 11 个开度值,随机打乱。 +# 开度扫描:0%~100%,默认 5% 间隔,共 21 个开度值,随机打乱。 OPENING_MIN_PCT = 0.0 OPENING_MAX_PCT = 100.0 -OPENING_STEP_PCT = 10.0 +OPENING_STEP_PCT = 5.0 RANDOM_SEED = 42 # 设为整数可复现同一打乱顺序 # 采样与稳态判定