ab plc_pid指令(详细使用).pdf
24页1 PID Instrument - How to use (Confidential – For Internal Use Only) Copyright © 2007 Rockwell Automation, Inc. All rights reserved.2 Agenda Sample 1. PID手动模式手动模式 1. PID手动模式手动模式 2. PID自动模式及设置自动模式及设置 2. PID自动模式及设置自动模式及设置 Example • 结构体:PID_Structure (Confidential – For Internal Use Only) Copyright © 2007 Rockwell Automation, Inc. All rights reserved.3 (Confidential – For Internal Use Only) Copyright © 2007 Rockwell Automation, Inc. All rights reserved.4 PID 手动模式手动模式 ?共有两种手动模式 ?手动手动(Tag:PID_Structure.MO) ?软件手动软件手动(Tag:PID_Structure.SWM) 两种方式都可选定,但手动会覆盖 软件手动。
?手动 ?牵引值(Tieback)(Tag:PID_Structure.TIE) ?最大牵引值(Tag:PID_Structure.MAXTIE) ?最小牵引值(Tag:PID_Structure.MINTIE) 手动的原理是:根据最大/最小 牵引值按比例,将Tieback值标定 成一个0%到100%范围内的牵引 值,然后作为PID调节器的输出 PID 手动手动 •PID指令的输出锁定在56.8% –56.8%=5680/10000 –输出牵引值PID_Structure.TIE=56.8 –软件手动设定输出PID_Structure.SO被修改为56.8,但该 值不启作用(即使置位PID_Structure.SWM,该值也将被手 动模式屏蔽) •不同于下图,也可由模拟量输入通道来进行PID牵 引,如:将Tieback变量换成Local:0:I.Ch0Data, 再根 据模块的通道参数设定PID中的最大最小牵引值 (Confidential – For Internal Use Only) Copyright © 2007 Rockwell Automation, Inc. All rights reserved.5 PID – 软件手动软件手动 • 只采用软件手动时: – PID_Structure.OUT=PID_Structure.SO=22.0 (Confidential – For Internal Use Only) Copyright © 2007 Rockwell Automation, Inc. All rights reserved.6 7 Auto Mode 当PID不在任何一种手动模式时, 它将处于自动模式。
PID 基本设定基本设定 - Tuning (Confidential – For Internal Use Only) Copyright © 2007 Rockwell Automation, Inc. All rights reserved.8 选择手动模式选择手动模式 比例增益比例增益/积分增益 微分时间 积分增益 微分时间 设定值设定值 PID_Structure.SP 软件手动输出值软件手动输出值 PID_Structure.SO 前馈或偏置值前馈或偏置值 PID_Structure.BIAS PID 基本设定基本设定 – Tuning /前馈或偏置前馈或偏置 • 前馈值可以设定为正或负(通常正) • 前馈值将直接叠加到控制变量中 • 当CV值无限趋近CV的最大/最小定标值时, 前馈基本不起作用(叠加作用被抵消) • 前馈使PID提前提前或延后延后一定输出量开始响应,它可在扰动有机会改变CV前,预先补 偿扰动的作用 (Confidential – For Internal Use Only) Copyright © 2007 Rockwell Automation, Inc. All rights reserved.9 无前馈时,当下的 输出应为 无前馈时,当下的 输出应为49.99515 (Confidential – For Internal Use Only) Copyright © 2007 Rockwell Automation, Inc. All rights reserved.10 PID 基本设定基本设定 – Configuration •独立增益独立增益(Independent) 3项增益(P,I 这时,Output被锁定。
•当Error的绝对值大于3时(死区值=3),Error Within Deadband 显示为No;这时,Output解除锁定,PID自动调 节并自动输出 如果使用死区,控制变量必须是Real 格式有2种死区控制方式有过零 特性的死区和无过零特性的死区 PID 基本设定基本设定 – Alarm (Confidential – For Internal Use Only) Copyright © 2007 Rockwell Automation, Inc. All rights reserved.14 PID 基本设定基本设定 – Scaling • 假如IO为: (Confidential – For Internal Use Only) Copyright © 2007 Rockwell Automation, Inc. All rights reserved.15 •选定Enable •传感器的输出类 型 •可对照模块手册来 选不同的格式,不同 的格式对应不同的定 标值 •选Scaled for PID时, 定标值=16383 •选定Enable •模块通道的输出 类型 •可对照模块手册来 选不同的格式,不同 的格式对应不同的定 标值。
•选Scaled for PID时, 定标值=16383 PID 基本设定基本设定 – Scaling • PID指令为? • 那么,PID指令中的标定为? (Confidential – For Internal Use Only) Copyright © 2007 Rockwell Automation, Inc. All rights reserved.16 •温度等传感器相对 于20毫安(即16383) 输出时的传感器最大 测量值 •直接标定到模拟量 模块的输出通道 •温度等传感器 相对于4毫安 (即0)输出时 的传感器测量 值 PID 基本设定基本设定 – Configuration 无冲击启动无冲击启动 • 无冲击启动概念 – 当CPU从Program Mode到Run Mode或系统上电时, – 可以使用PID指令的Inhold Bit和Inhold Value 来自动重新设定PID指令,使 得PID的控制变量输出等于当前的模块的模拟量通道的输出 (Confidential – For Internal Use Only) Copyright © 2007 Rockwell Automation, Inc. All rights reserved.17 PID 基本设定基本设定 – Configuration 无冲击启动无冲击启动 • 设定 – 配置模拟量模块(以1769-OF4CI为例),选择“初始化保持”。
(Confidential – For Internal Use Only) Copyright © 2007 Rockwell Automation, Inc. All rights reserved.18 PID 基本设定基本设定 – Configuration 无冲击启动无冲击启动 • 设定 – 配置PID指令的无冲击参数:Inhold Bit 和Inhold Value (Confidential – For Internal Use Only) Copyright © 2007 Rockwell Automation, Inc. All rights reserved.19 PID 基本设定基本设定 – Configuration 无冲击启动无冲击启动 • 参考 (Confidential – For Internal Use Only) Copyright © 2007 Rockwell Automation, Inc. All rights reserved.20 • 意义: – 对相互之间关联的两个回路,控制上它们存在联动,对这种应用进行 级联控制 – 真正需要控制的对象是TT1 – TT1/TT2作为Master回路;TT2和CV阀作为Slaver回路?Master回路计算TT2 的设定值(变化的),计算出的设定值用于Slaver回路去调节CV的实际需 要的输入。
PID 基本设定基本设定 – 级联回路级联回路 (Confidential – For Internal Use Only) Copyright © 2007 Rockwell Automation, Inc. All rights reserved.21 TT1 TT2 蒸汽 产品 热水 热交换器 热交换器 PID 基本设定基本设定 – 级联回路级联回路 (Confidential – For Internal Use Only) Copyright © 2007 Rockwell Automation, Inc. All rights reserved.22 都用独立增益 PID 基本设定基本设定 – 级联回路级联回路 • 通过分别设定Master/Slaver回路的定标值,可以根据你的需要 将Slaver回路的设定值由等于Master的输出值标定到符合工业 工况需要的值 (Confidential – For Internal Use Only) Copyright © 2007 Rockwell Automation, Inc. All rights reserved.23 •调整该范围将影响 到Slaver的设定值: 由Master输出值标定 得来的结果 24 。





