基于PID的室温控制器-与Pelops/Copreus、Pelops/Argaeus和Pelops/Alcathous结合使用。
Epidaurus的Python项目详细描述
π_δαγ__ [1]是一种基于pid的室温控制器 结合Pelops/Copreus、Pelops/Argaeus和Pelops/Alcathous。
PELOPS概述
Epidaurus是基于mqtt的微服务集合的一部分 pelops。微服务概述 架构和示例可以在 (http://gitlab.com/pelops/pelops)。
对于用户
安装核心功能
核心功能的先决条件是:
sudo apt install python3 python3-pip sudo pip3 install paho-mqtt pyyaml pelops
通过PIP安装:
sudo pip3 install epidaurus
若要更新到最新版本,请将--upgrade作为前缀添加到 pip3行以上。
通过Gitlab安装(可能需要其他软件包):
git clone git@gitlab.com:pelops/epidaurus.git cd epidaurus sudo python3 setup.py install
这将安装以下shell脚本:*epidaurus
脚本cli参数是:*'-c'/'-config'-config文件 (必需)*'-v'-详细输出(可选)*'-版本'-显示 版本号和退出
yaml配置
yaml[2]文件必须包含四个根块:*mqtt-mqtt地址, MQTT端口和凭据文件的路径凭据文件(文件 包含两个条目:mqtt user,mqtt password)*logger- 日志级别和要使用的文件*控制器的参数 控制器和嵌入式PID
mqtt: mqtt-address: localhost mqtt-port: 1883 credentials-file: ~/credentials.yaml log-level: INFO logger: log-level: DEBUG # DEBUG, INFO, WARNING, ERROR, CRITICAL log-file: test_epidaurus.log controller: value-idle: 4.5 # idle mode output - heating system does nothing value-min: 5 # minimum output for active (=heating) system value-max: 23 # maximum value for heater pid-max-output: 500 # for normalization purposes. this is the expected maximum output of the pid controller idle-mode-threshold: 0.75 # if temperature is this value above set-point, set output to volt-idle value. topics-sub: set-point: /test/thermostat/set-point # receive new set point via this topic input: /test/thermostat/input # receive input (=temperature) updates via this topic topics-pub: output: /test/thermostat/output # publish resulting output voltage to this topic pid: p-gain: 75 i-gain: 20 d-gain: 0 update-interval: 30 # in seconds (in fact not used anywhere) windup-guard: 20 # protect integral term from windup
系统d
- 添加systemd示例。
对于开发人员
开始
该项目由两个主要模块组成:pid-classic pid实现*controller-环绕pid并添加 与恒温器相关的行为,如最小输出,空闲输出, 将PID输出标准化到预期电压范围。
必须确定pid的值和controller的一些值 使用真实系统的实验。获取第一组参数 您可以将tests/test_controller_model_nomqtt.py与 tools/model_trivial_flat.py。
待办事项
- PID的自动参数化
- …
其他
代码是为python3编写的(并在 覆盆子皮零与覆盆子伸展)。
Merge requests /bug reports是 欢迎光临。
[1] | The icon used for this project is not Epidaurus, son of pelops. |
[2] | Currently, pyyaml is yaml 1.1 compliant. In pyyaml On/Off and Yes/No are automatically converted to True/False. This is an unwanted behavior and deprecated in yaml 1.2. In copreus this autoconversion is removed. Thus, On/Off and Yes/No are read from the yaml file as strings (see module baseclasses.myconfigtools). |