基于单片机的双路温度测控系统设计_第1页
基于单片机的双路温度测控系统设计_第2页
基于单片机的双路温度测控系统设计_第3页
基于单片机的双路温度测控系统设计_第4页
基于单片机的双路温度测控系统设计_第5页
已阅读5页,还剩47页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

12 前言前言 温度测控在工业领域具有广泛的应用 随着传感器技术 微电子技术 单片 机技术的不断发展 为智能温度测控系统测控功能的完善 测控精度的提高和抗 干扰能力的增强等提供了条件 由于单片机具有集成度高 功能强 体积小 抗 干扰能力等优与一般 cpu 的优点 因此 在要求高控制精度和较低成本的测控条 件系统中 往往采用单片机作为数字控制取代模拟控制器 而作为 感觉器官 传感器用各种各样信息的感知获取和检测 并将其转换 为工作系统能进行处理的信息 目前 传感器正沿着分立式 集成化 智能化 单片机系统网络化的方向迅速发展 自能传感器系统是在智能传感器的基础上发 展而来的 显而易见 传感器在现代科学技术领域中占有极其重要的地位 采用 传感器技术的非电量电测方法 就是目前最广泛的测量技术 随着科学技术的发 展 现在也出现了光通量等作为可测量的传感器 本设计正对温度控制设计了以单片机为主机的主动控制系统 系统的结构图由单片 机 52 为主机 A D 转换器 两个测温点路 控制电机正反转 电源电路 键盘和显示电 路 温度测控系 统是一个闭环控制系统 用温度传感器将监测到的温度 A D 转化后送入计算机中 本设计在指导老师吴文涛 王璇 冯智磊的指导和相关文件的综合而完成的 摘要摘要 在现代工业印花技术中 单片机温度测控是核心设计一个基于单片机的双 路温度测控系统设计 其能够采集探头和工作台上两路信号 范围分别是 0 300 和 0 99 精度为正负 1 这两路温度信号通过放大器输入单片机 单片 机结合由键盘输入的设定值输出控制电机正反转命令 并用 LED 实时显示所测 得的两路温度值 关键词 单片机 温度测控系统 工业印花技术 Abstract In the modern industrial printing technology SCM is the core temperature controlling design a based on single chip microcomputer temperature measurement and control system of double road design The probe and the collection to two channels signal Range is 0 300 respectively and 0 99 precision of plus or minus 1 the two road temperature signal through the amplifier single chip microcomputer SCM by combining input keyboard input value output control motor positive negative command and LED real time display measured way two temperature Keywords SCM temperature measurement and control systems industrial printing technology 单回路温度控制器 一个单回路温度控制器是一种手段 需要从一个传感器的信号 把它比作 一个设定点信号 并调整输出到加热设备维护 尽可能接近 与测量温度和设 定温度平衡 这里的关键词是 尽可能接近 有许多用于实现这种控制方法 的几个类型 我们将试图简单介绍一下最常见的 开关控制 该应用程序的正确的温度控制器选择取决于应用程序所需的控制程度 最简 单的应用程序可能只需要什么是所谓的 开关 控制 开关控制操作的 就像 对我们的家庭供暖系统温控器相同的方式 换句话说 该控制器的输出可以是 100 或 100 优惠 对敏感性的开关控制 有时称为 滞后 或 死区 是进入点之间的控制作用 此时 控制输出开关由 关 开 时设计的 在 延时开关设计 这可以防止太迅速从小康到输出 如果设置滞后过于 狭窄 快速切换将发生 往往会造成所谓的输出 格格 之称 这种 抖动 可以导 致输出继电器和加热元件寿命差 因此 应设置滞后 这样是有关系的 开 和 关 的输出模式有足够的时间延迟 由于在通断控制器输出所需的滞后 总是会有一定的 冲 和 超调 中的调节作用 就根据拍摄和超调量在整个 特定应用的热系统的特点而定 图 A 时间配比的进程 需要比开关控制通常需要什么是所谓的配料多一点时间的 精确控制 一时间比例控制操作作为一个开关控制大致相同的方式 而这一过 程的温度是所谓的比例带之外 比例带设定点是 围绕在配料控制 届时需要 的地方区域 当进程进入温度之间的时间比例带 接近设定值 的周期时间和 休息时间开始发生变化 在比例带的低端 在时间比更大的关闭时间 由于工 艺越接近设定值 在时间减少 而关断时间增加 这改变了有效的权力 热负 荷 并导致 节流回 中 在该过程温度上升的速度 这一行动继续进行 直 到一个稳定的需要某处低于设定值的地方 在这一点上 控制的实现 在控制 点的差异和实际设定值被称为 下垂 图 B 积分或 复位行动 如果 下垂 的控制时间比例形式不能耐受的过程中 控制整体功能必须 加入 整体功能 自动复位 控制器发现使用数学算法来计算下垂数额 然后 调整输出到 复位 设定值的控制效果 这通常是通过自动转换带的比例稍微 弥补下垂 自动复位内采取行动只能比例带的地方 应自动复位比例带外应用 其结果将是一个极端的设定值超调状态 消除了比例带被称为 反重置饱和 自动复位外过程是典型的控制 包括自动复位或 整合 功能的标准功能 在 许多控件没有提供 自动 复位 此功能是通过手工完成的电位变化调整 手 动比例带 图 14A 及 14B 条 衍生金融工具 自动速率 当温度超调的过程 在其骑自行车 超过设定值 过冲可以小和微不足道 或大到足以导致这一进程的重大问题 在所有的讨论至今控件类型 发生过冲 过冲可能会造成损害 在许多流程 因此必须加以避免 衍生功能 也称为 自动率 可用于控制系统 以防止过冲 衍生功能预计多快的速度将达到设 定值 它这个测量过程的温度变化速率 然后通过强制成比例以更快的行动 从而减慢过程的温度变化率率的控制 这一行动使工艺温度的 滑翔 到设定 值 从而防止过冲很大程度在启动时系统的变化 如大负荷的变化或开门一炉 等发生 通常 最精确的过程控制应用都需要有比例控制 自动复位 自动速 率功能 这种类型的控制为 PID 知道 比例 积分 微分 图 14C 的 控制系统调节开关控制 优化一个开关控制系统通常由一个简单的手动调整完成 这种调整 基本 上通过调整控制点的控制开启和关闭开关滞后 比例 P 比例加积分 PI 和比例加积分加微分 PID 是有对 P PI 和 PID 控制适当调整的几种方法 大多数方法需要大量的试 验和错误以及大量具有很大的耐心赋予技师 下面是其中的方法之一 第一步 是调整比例带 如果控制器包含积分和微分的调整 调整到零之前 他们调整 比例带 调整比例带选择的响应速度 有时称为增益 成比例控制器需要实现 该系统的稳定性 比例带 必须更广泛地较系统的正常振荡的学历 但不要太 宽 以抑制系统的响应 开始时为比例带最窄的设置 如果有振荡 慢慢增加 比例带小的增量 使系统解决了几分钟后 每次出来 直到在该点的偏移量开 始增加下垂步调整 在这一点上 过程变量应在平衡状态下的一些设定点 接下来的步骤是调整积分或复位动作 如果该控制器具有手动复位调整 只需调整复位 直到进程下垂被淘汰 与手动复位调整的问题是 一旦设定值 更改为一个值比原来的外 下垂可能会回归和复位将再次需要进行调整 如果 控制具有自动复位 复位自动复位调整 调整时间常数 每分钟重复 最初的 设置应在每分钟重复的最低数字 以便在系统的平衡 换句话说 小步调整的 自动复位 使系统解决之后的每一步 直到开始出现轻微的振荡 然后回到小 康就在那里的振荡停止 调整 重新建立平衡点 该系统将自动调整偏移误差 下垂 最后一个控制参数 调整为速率或衍生功能 随时调整这个函数的最后一 个 永远 我之所以这样强调的是在这一点上 如果利率调整是在复位前作出 调整转向 复位将被拉出来的时候调整利率调整已打开 然后你只需要启动调 整过程结束了 其速率调节功能 是尽可能减少任何过冲 房价调整是基于调 整中 调谐到与整个系统的响应分钟的时间来计算时间 最初的利率调整应尽 可能最低的分钟数 增加在非常小的增量调整 每次调整后 让它解决了几分 钟 然后增加一个中等量设定值 观看的控制作用达到设定值 如果出现超调 提高利率调整另一个少量重复该过程直到冲被淘汰 有时系统会变成 疲软 绝不达到设定值的 如果发生这种情况 减少利率调整过程 直到达到设定值 可能仍有轻微的超调 但是这是一个取舍的情况 自动调谐 调整控制参数是不好玩 谢天谢地 现代技术和 自动调谐的发明 今 天的控制器制造商大多提供单回路的自动参数调整选项 它消除了手动调谐的温度控制器 不少苦工 有几种方法的自动调整 大多数的系统上运行的控制器 即 看 从开始时 的初始启动上升周期的时间进程到达设定值 然后从第一个周期的响应特性学习它调整到 最佳调谐自己在第一循环创造了历史的参数 自动调谐功能继续 学习 直到随后的周 期 并重新调整的 PID 达到最佳设置参数 由于并非所有制造商的自动调节控制器的功能 相同 最好咨询 然后再尝试第一次使用自动调谐功能的使用说明书 Single Loop Temperature Controllers A single loop temperature controller is an instrument that takes the signal from a sensor compares it to a setpoint signal and adjusts the output to the heating device to maintain as close as possible equilibrium between the measured temperature and the setpoint temperature The key phrase here is as close as possible There are several types of control methods used to accomplish this We will attempt to briefly explain the most common On Off Control Selection of the right temperature controller for the application depends on the degree of control required by the application The simplest of applications may only require what is called On Off control On Off control operates much in the same manner as the thermostat on our home heating systems In other words the output of the controller is either 100 on or 100 off The sensitivity of the On Off control sometimes called hysteresis or dead band is designed into the control action between the points at which the control output switches from off to on This designed in hysteresis prevents the output from switching from off to on too rapidly If the hysteresis is set too narrow rapid switching will occur and often result in what is known as output chattering This chattering can result in poor lifetime of output relays and heating components Therefore the hysteresis should be set so that there is sufficient time delay between the on and off modes of the outputs Due to the hysteresis needed in the output of the on off controller there will always be a certain undershoot and overshoot in the control action The amount of under shoot and overshoot is dependent upon the characteristics of the entire thermal system of a particular application Figure 13A Time Proportioning Processes requiring a little more precise control than On Off control usually require what is called Time Proportioning A time proportioning control operates much the same way as an on off control while the process temperature is outside of what is called the proportional band The proportional band is that area around the setpoint in which time proportioning control takes places When the process temperature enters the proportional band approaching setpoint the cycle time between time on and time off begins to vary At the low end of the proportional band the on time is much greater than the off time As the process gets closer to the setpoint the on time decreases and the off time increases This changes the effective power to the heating load and causes a throttling back in the speed at which the temperature of the process is increased This action continues until a stabilization takes place somewhere below the setpoint At this point control is achieved The difference in the control point and the actual setpoint is called droop Figure 13B As long as there is no change in the process load this condition will remain constant Integral or Reset Action If the droop in the time proportioning form of control cannot be tolerated in the process the Integral function of control must be added The integral function found in automatic reset controllers uses a mathematical algorithm to calculate the amount of droop and then adjusts the output to reset the control result to setpoint This is usually done by automatically shifting the proportion band slightly to compensate for the droop Automatic reset action can only take place within the proportional band Should automatic reset be applied outside the proportional band the result would be a condition of extreme overshoot of the setpoint The process of eliminating the automatic reset outside of the proportional band is called anti reset windup and is typically a standard feature of controls that include the automatic reset or integrating function On many controls that do not offer automatic reset This function is accomplished manually by a potentiometer adjustment that manually shifts the proportional band Figure 14A and 14B Derivative Automatic Rate Temperature overshoot is when the process during its cycling exceeds setpoint Overshoot can be small and insignificant or large enough to cause major problems with the process In all the types of control discussed so far overshoot occurs Overshoot can be damaging in many processes and therefore must be avoided The derivative function also called automatic rate can be used in control systems to prevent overshoot The derivative function anticipates how quickly the setpoint will be reached It does this by measuring the rate of change of process temperature and then by forcing the control into a proportioning action at a faster rate thereby slowing down the rate of process temperature change This action allows the process temperature to glide into the setpoint and thereby prevent a large degree of overshoot on start up and when system changes such as large load changes or the opening of a furnace door etc takes place Typically the most precise of process control applications will require a control that has proportional automatic reset and automatic rate functions This type of control is know as PID Proportional Integral Derivative Figure 14C Control System Tuning On Off Control Tuning an On Off control system is usually accomplished by one simple manual adjustment This adjustment basically controls the switching hysteresis by adjusting the points at which the control turns on and turns off Proportional P Proportional plus Integral PI and Proportional plus Integral plus Derivative PID There are several methods for the proper tuning of P PI and PID controls Most methods require a considerable amount of trial and error as well as a technician endowed with a lot of patience The following is one of those methods The first step is the tuning of the proportional band If the controller contains Integral and Derivative adjustments tune them to zero before adjusting the proportional band The proportional band adjustment selects the response speed sometimes called gain a proportional controller requires to achieve stability in the system The proportional band must be wider in degrees than the normal oscillations of the system but not too wide so as to dampen the system response Start out with the narrowest setting for the proportional band If there are oscillations slowly increase the proportional band in small increments allowing the system to settle out for a few minutes after each step adjustment until the point at which the offset droop begins to increase At this point the process variable should be in a state of equilibrium at some point under the setpoint The next step is to tune the Integral or reset action If the controller has a manual reset adjustment simply adjust the reset until the process droop is eliminated The problem with manual reset adjustments is that once the setpoint is changed to a value other than the original the droop will probably return and the reset will once again need to be adjusted If the control has automatic reset the reset adjustment adjusts the auto reset time constant repeats per minute The initial setting should be at the lowest number of repeats per minutes to allow for equilibrium in the system In other words adjust the auto reset in small steps allowing the system to settle after each step until minor oscillations begin to occur Then back off on the adjustment to the point at where the oscillations stop and the equilibrium is reestablished The system will then automatically adjust for offset errors droop The last control parameter to adjust is the Rate or Derivative function Always adjust this function last Always The reason I am so emphatic on this point is that if the rate adjustment is turned on before the reset adjustment is made the reset will be pulled out of adjustment when the rate adjustment is turned on Then you just have to start your tuning procedure over The function of the rate adjustment is to reduce as much as possible any overshoot The rate adjustment is a time based adjustment measured in minutes which is tuned to work with the overall system response time The initial rate adjustment should be the minimum number of minutes possible Increase the adjustment in very small increments After each adjustment let it settle out a few minutes Then increase the setpoint a moderate amount Watch the control action as the setpoint is reached If an overshoot occurs increase the rate adjustment another small amount and repeat the procedure until the overshoot is eliminated Sometimes the system will become sluggish and never reach setpoint at all If this occurs decrease the rate adjustment until the process reaches setpoint There may still be a slight overshoot but this is a trade off situation Autotune Tuning control parameters is no fun Thank goodness for modern technology and the invention of Autotune Most of today s controller manufacturers offer single loop temperature controllers with the option of automatic parameter tuning which eliminates a lot of the drudgery of manual tuning There are several methods of autotuning Most operate on a system whereby the controller looks at the initial start up cycle from start to the time the process reaches setpoint Then by learning from the response characteristics of the first cycle it adjusts itself to optimum tuning parameters based on the history created in the first cycles The auto tune function continues to learn from subsequent cycles and readjusts parameters until the optimum settings for PID are reached Since not all manufacturer s auto tune controllers function the same it is advisable to consult the instruction manual before attempting to use the auto tune feature for the first time 了解 PID 控制器 1 PID 温度控制器是可用的最精密的控制器 具有比例 积分和微分三级 控制 功能强大而且价格非常低廉 但 PID 究竟是什么呢 本文将帮助你了解 它 菲尔 约翰逊 McShane 公司 温度 本文将简要地介绍一种相对新型的温度控制器 PID 控制器 正如大家所知 许多设备的特性和表现会随着温度的变化而变化 这使得 它们难以在特定的操作中使用 温度的变化是由环境的变化引起的 为了使特 性在变化的环境中保持不变 我们必须通过供热或制冷来补偿环境温度的变化 这是由温度控制器来完成的 大多数温度控制器的设备都能供热 或者制冷 chill 使温度保持在某一个略 高于或低于环境温度的点 电子温度控制器常用于当受控温度高于环境温度时 通过电阻 加热器来改变电流供应 通过控制流过热转换器的冷冻剂的流量 被控装置或材料就能稳定在某一 低于环境温度的值 另一种低温控制系统 called buck and boost 通过冷却使温 度低于期望设定值 然后经控制器加热获得精确的设定温度值 当期望设定值 接近环境温度时就需要这种类型的操作 在理想状况下 一旦我们设定了某一区域或设备的温度 在任何时间段内该 温度都应该保持不变 不幸地是 我们并不是生活在理想状况下 因此 我们 需要温度控制器 如果你观察一段时间中一个受控对象的温度 你将发现它并不总是在那个 1 Tuffe O N Silicon Diffused Electronic Measurement System theory practice 精确的目标 设定值 温度 大部分时间中温度会在设定值上下波动 因此 我 们就关心它的波动量量 一种更新的温度控制器设计用一种精密的方法来减少这 种波动 这就是所谓的 PID 控制器 PID 控制器的定义 为了了解 PID 比例 积分 微分 控制器的操作我们应该回顾一下几个基 本的定义 导数导数 是描述变化率的值 例如 位移的导数是速度 加速度加速度 是速度关于时间的导数 积分积分 是导数的相反面 加速度的积分是速度而速度的积分是位移 比例比例 是指某一值相对另一值的变化 比例控制器的输出值是被控温度和 设定值之间的差值 或一个关于差值的函数 当温度远远低于设定值 或期望的 温度 时控制器将充分打开 当高于设定值时则充分关闭 控制器的带宽带宽是最高充分打开点与最低充分关闭点在度数上的差值 它就 是温度带 或温度的范围 在此范围内控制器的输出值就是比例 带的宽度和中 点温度值能通过控制器的调整装置改变 PID 操作 基于温度的功率输出曲线图是一条位于满输出水平的从周围温度到比例控 制带开始值 即控制器输出的低于充分打开时的温度值 的水平曲线 然后倾 斜向下 在右边 在一张典型的图中 通过设定值 然后继续向下直到充分关闭 时的温度值 当被控温度升高时 它会保留充分关闭时的值 现在 一条在垂直 平面上零输出的水平线 在这个范围内 除非冷却转入否则它将不受控制 在狭窄的带宽内 当带宽被减小时输出曲线在带宽温度范围内会变得更加 陡峭 这种陡峭是因为控制器内的放大器被增加了一个更高的增量或是安置了 更大倍数的放大器 在这种高增益的情况下 最轻量的误差或者被控温度与设 定值之间的差值 都会使控制器的输出曲线发生一个较大幅度的改变 在这种 情况下 它是非常敏感的 因此会导致一个被严格控制的温度 由于它更加敏感 它也可能造成功率输出的更快的变动 如此它可能超过设定值然后再次经过 设定值回下来 如果带宽被设置得太窄 温度可能在设定值附近猛烈地波动 导致控制器的输出中发生不希望的变化 在带宽调整的另一端 带宽是很宽的 这就是说控制器充分打开时的温度 和充分关闭时的温度相差很远 此时曲线改变 控制器的功率输出倾斜在比例 范围内变化不是很剧烈 这时 控制器的放大器的增益是被设低了的 它引起 了信号的一个大的变化导致输出改变 这样温度就缓慢地变化 因此很少或没 有机会超调 从而温度是相当稳定的 但是虽然温度相对稳定 它依然会因为 增益不够大而使温度跟不上被控对象周围环境温度的变化以致温度低于设定值 当一股不被期望出现的冷空气扫过被控区域时 这种情况就会发生 因此 必须根据被控温度区域及其周围的状况还有其它热动力学问题例如缺 少绝热和热传导性等会导致热量以确定速度丢失的情况调整带宽 在一个绝热 良好的区域 热量损失很少 带宽也可以设得比较宽 在可能会有比较严重的 热损失的情况下 带宽可以设得更窄一点 我们需要将控制器调整到稳定和响 应时间之间的理想点 在保持稳定的温度和做快速的更正之间 现在我们了解了比例控制 我们也了解了增益和稳定 还有一个更需要了 解的是保持在设定温度值的能力 作为一个指定的固定功率设备 通过绝热材料损失的热量使得实际温度会 轻微低于良好绝热情况下的温度 这其中的差别就来自于 PID 中的 I 它能 够通过改变比例带中点 叫做垂距 的位置来手动调整 这样就可以得到你想要 的温度 问题是如果热耗设备 绝缘材料 改变和系统开始更快地损失热量时 垂 距会发生改变并且你也许当时并不在那里手工调整它 为了补偿这个损失 我 们通过观看传感器的温度变化来监控那个温度点的改变 然后我们对变化求导 数 得到一个温度的变化率的值 PID 中的 D 加到积分值来生成一个自 动调整 在大多数应用处理进程中 温度传感器是插入在热电偶或保护管中的 这 保护传感器免受环境的影响和更便于撤除和替换 这些设备一般包括头部 联 合管和热电偶 智能工业温差电偶和 RT 标准和电阻温度系数下使用 D 都可 在现实中任何 Understanding a PID Controller The PID temperature controller is the most sophisticated controller available Three levels of tuning Proportional Integral and Derivative provide exceptional performance at a surprisingly low price But what is it really Here is an article that will help you understand it By Phil Johnson McShane Inc TEMPERATURE A relatively new type of temperature controller is called a PID controller which this article will attempt to describe in layman s language As we know characteristics and performance of many devices change with a change in temperature making them difficult to use in a particular operation The change in temperature is caused by a change in environment To hold characteristics constant in a changing environment we must supply or remove heat to compensate for variations in ambient temperature This is accomplished with temperature controllers Most installations of temperature controllers supply heat or remove heat chill to hold the temperature at a constant point somewhat above or below the ambient temperature Electronic temperature controllers are most often used to vary the supply of an electric current through a resistance heater to accomplish this when the controlled temperature is to be above ambient The controlled device or material can also be stabilized at some temperature below environment by controlling the flow of a refrigerant through a heat exchanger Yet another type of low temperature control system called buck and boost supplies cooling to drop the temperature below the desired set point and then controls the temperature by supplying heat via a controller to get the exact temperature setting This type of operation is needed when the desired set point is close to the ambient temperature In an ideal world once we set the temperature of an area or device the temperature would remain the same over any length of time Unfortunately we do not live in an ideal world Thus the need for temperature controllers If one were to observe the temperature of a controlled item o

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论