基于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构造函数SimpleCommandBus()不可见   Java字符串和返回   java不能在类中使用上下文?   使用Java为SOAP定制DataHandler   java“访问被拒绝”在编译servlet时   java嵌入Jetty,在给定时间后终止请求   java如何使用预先指定的URL限制AWS S3 bucket中对象的上传大小?   java理解Azure文件存储:未知hostException   java将对象作为参数传递是否会产生与将其存储在字段中相同级别的耦合?   https告诉java客户端代码接受自签名证书   Java中的简单*权威DNS服务器*   Java解压缩字节数组错误数据检查   当我用SpringDoc和接口描述API规范时,java Spring控制器验证似乎不起作用   在Java中使用PHash(OpenCV)   Kotlin中的java简单继承示例   java Infinispan:ISPN004016:服务器不再位于群集中(127.0.0.1:11222),正在从池中删除   2行滑动菜单安卓本机JAVA   使用日期选择器时Android Studio中的java 4错误   java在<之间删除内容!和/>