基于PID的室温控制器-与Pelops/Copreus、Pelops/Argaeus和Pelops/Alcathous结合使用。

Epidaurus的Python项目详细描述


π_δαγ__ [1]是一种基于pid的室温控制器 结合Pelops/Copreus、Pelops/Argaeus和Pelops/Alcathous。

Pelops Overview

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.pytools/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).

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Jboss LinkageError:加载程序约束冲突:解析重写的方法时   java Struts 1:如何使用表单bean设置<html:multibox/>值?   使用Fortify将字段设置为Null时的Java Null取消引用   用java对连接字符的图像进行分割   java无法使用Quarkus模拟,NullPointer异常,无法找到相关导入   html试图使iframe垫片与Java小程序上的CSS下拉菜单一起工作   java无法获取Base64。decodeBase64正常工作(Commons编解码器)   java为什么我不能通过点击打开jar文件?   java当用户第一次使用预先填充的sqlite数据库时,安卓应用程序如何添加新的列或表?   在tomcat中安装java GoDaddy SSL证书。。。没有与私钥匹配的证书   java试图实现一些伪代码、算法   java如何读取其他按钮id,避免所有转到第一个按钮   java使用单个   oop为什么Java Map不扩展集合?