您好,欢迎来到爱问旅游网。
搜索
您的当前位置:首页电子秤设计

电子秤设计

来源:爱问旅游网
目录

1 绪论1.1 课题的背景及意义1.2 电子称重技术的发展概况2 系统的总体设计2.1 电子称重技术的基本原理2.2 系统的组成2.3电源电路3 系统的硬件设计3.1 模拟电路设计3.2 数字电路设计4 系统的软件设计4.1软件的设计思想4.2主程序流程图4.3主要程序模块设计4.4使用操作说明5 总体调试5.1测试仪表5.2 操作方法5.3 测试方法5.4 测试数据及测试结果分析结论参考文献致 谢附录1:软件程序附录2:英文资料附录3:英文翻译

1 绪论

电子衡器一般是指装有电子装置的衡器。因其种类繁多,且涉及到贸易结算和保护广大消费者的利益,所以为世界各国普遍关注和重视,并被确定为国家强制管理的法制计量器具。电子衡器是自动化称重控制和贸易计量的重要手段,对加强企业管理、严格生产、贸易结算、交通运输、港口计量和科学研究都起到了重要作用。电子衡器具有反应速度快,测量范围广、应用面广、结构简单、使用操作方便、信号远传、便于计算机控制等特点。被广泛应用于煤炭、石油、化工、电力、轻工、冶金、矿山、交通运输、港口、建筑、机械制造和国防等各个领域。

1.1 课题的背景及意义

电子称重技术是从50年代中期电子技术深入到衡器的辅助侧量技术,从60年初出现了机电结合电子衡器开始,迅速发展成为一门新兴技术,它是集传感器技术、微电子技术、计算机控制及测试技术、机械制造自动化技术、物料输送和管理技术为一体的综合技术,是现代称重计量和控制系统工程的重要技术基础。应用电子称重技术开发的电子称重系统,具有广阔的应用领域和较强的渗透性、同其它高技术产业一样,电子衡器

产业也是国家经济和科学竞争的重要阵地。

1.2 电子称重技术的发展概况

1.2.1 国内外的发展状况

电子称重技术是五六十年代发展起来的一门新兴技术。在我国发展比较晚,大约在80年代初才开始进入我国,随着计算机技术的普及电子称重技术在我国得到了长足的发展,在其在商业衡器领域电子秤的应用比例已达到7.7%,在工业计量领域电子称重技术也广泛应用于石油、化工、冶金、港口和码头、粮食等需定量包装的各个行业。

虽然我国的电子衡器水平有了相当的提高:但与发达国家相比,无论应用指标还是技术指标都有很大的差距,如国外的商用电子衡器的比例大约在80%以上,而我国目前仅7.7%,在高档次的电子称重产品中,如定量包装秤、配料秤、自动校检秤仍刚刚起步,水平尚待提高。

在称重的理论研究方面存在巨大的差异。据悉,近年国际上解决运动中和振动中的动态称重的问题,运用了工程动力学的称重原理与技术处理动态称重问题:突破了依赖静力场下力平衡的称重原理,相比之下我国在称重理论研究方面相当薄弱15-61新材料,新技术的应用也同国外发达国家相比有很大的差距。在国际上衡器的发展几乎能与计算机技术、微电子技术同步发展,己向数字化和智能化方向发展,而我国还处于刚刚起步阶段。

1.2.2发展趋势

通过分析近年来电子秤的发展情况及国内外市场的需求,电子秤的发展趋势是小型化、模块化、集成化、智能化;其技术性能趋向是速率高、准确度高、稳定性高、可靠性高;其功能趋向是称重计量的控制信息和非控制信息并重的“智能化”功能;其应用性能趋向于综合性和组合性。其中小型化与智能化是最重要的发展趋势。体积小、高度低、重量轻,即小、薄、轻。近几年新研制的电子秤结构充分体现了小薄轻的发展方向。电子秤的重显示控制器与电子计算机组合,利用电子计算机的智能来增加称重显示控制器的功能,充分体现了智能化。

2 系统的总体设计

2.1 电子称重技术的基本原理

称重技术的根本任务是测量各种状态下物体重量。实质上是测量被称物体质量,我们知道,质量的测量是物体在重力场下的重力测量获得的,用公式W=mg,w是物体的重量,g是在重力场的重力加速度,m是物体的质量。目前无论是利用杠杆的原理,还是利用弹性元件的弹力与被测物体的重力达到平衡来测量物体的质量,都没有离开两个必须的条件:一是重力场,二是静力平衡。

随着现代传感技术的发展,人们已从传统的机械杠杆原理测量物体的质量,发展到现在的电子称重,即用传感器把重力信号转变成电信号,利用电子计算机技术,根据电信号同重力信号的数学模型,间接的求出物体的质量。

2.2 系统的组成

本系统以ATmega48单片机为核心,主要制作原理是通过压力传感器使物品的压力信号转变为微弱的电信号,运用信号放大调理电路使电信号得到放大和整理,再将此信号进行A/D转换,使模拟信号转换成数字信号,再将其输入单片机中,利用单片机对其进行处理,最后用数码管显示出来。

本系统主要由压力传感器、信号放大电路、A/D转换、信号处理、键盘输入、数码管显示、报警电路、电源等组成。系统总体框图如下:

图2-1 系统总体框图

2.3电源电路

系统需要+5V,±12V电源,传感器需要+5V的线性电源

图2-2 电源电路图

3 系统的硬件设计

电子秤的硬件设计主要包括模拟电路部分和数字电路部分,模拟电路部分的功能主要是实现压力信号与电信号的转换、信号放大输出。数字电路部分的功能主要是实现A/D转换、显示、通讯等功能。

本系统采用ATMEL公司的atmega48型单片机,具有运算速度快,数据处理能力强等特点。广泛应用于各类检测和工业控制系统,还适用于一般的信号处理

和高级智能仪器,以及高性能的计算机外部设备控制器和办公自动化设备控制器。

3.1 模拟电路设计

3.1.1传感器

传感器(SENSOR)是由敏感元件和转换元件组成的可将电量或非电量转换为可测量的电量的检测装置。

传感器技术是现代科技的前沿技术,是现代信息技术的三大支柱之一,其水平高低是衡量一个国家科技发展水平的重要标志之一。传感器产业也是国内外公认的具有发展前途的高技术产业,它以其技术含量高、经济效益好、渗透能力强、市场前景广等特点为世人瞩目。[1]

压力传感器是工业实践中最为常用的一种传感器,而我们通常使用的压力传感器主要是利用压电效应制造而成的,这样的传感器也称为压电传感器。

目前广泛应用的是电阻应变片式称重传感器。电阻应变式传感器主要有两部分组成,一个是弹性敏感元件,我们称弹性体,它把被测物的重量转变成弹性体的应变值,另一个是电阻应变片,它把弹性体的应变同步的转换成电阻值的变化,弹性体在弹性范围内的变化符合如下的数学公式:

(3-1)

式中 —— 弹性体的相对变形;

, —— 弹性体的长度及其变化值;F —— 重量 (kg);

E —— 弹性体的弹性模量();S —— 弹性体的截面积();

压阻式压力传感器,在硅基片上用扩散工艺制成4个电阻阻值相等的应变元件构成惠斯顿电桥。[2]当压力传感器受到压力作用时,一对桥臂的电阻值增大ΔR,另一对桥臂的电阻值减少ΔR,电阻变化量ΔR与压力成正比,电桥如图所示:

图3-1 传感器工作原理图

此时:

(受压桥) (3-2) (受拉桥) (3-3)

所以

(3-4)

近似地

(3-5)式中 —— 电阻应变计的应变灵敏度;

—— 弹性体的泊松比;

—— 传感器的灵敏度。即单位电压供桥时的电桥输

出电压。[3]

随着技术的进步,由称重传感器制作的电子衡器已广泛地应用到各行各业,实现了对物料的快速、准确的称量,特别是随着微处理机的出现,工业生产过程自动化程度化的不断提高,称重传感器已成为过程控制中的一种必需的装置,从以前不能称重的大型罐、料斗等重量计测以及吊车秤、汽车秤等计测控制,到混合分配多种原料的配料系统、生产工艺中的自动检测和粉粒体进料量控制等,都应用了称重传感器,目前,称

重传感器几乎运用到了所有的称重领域。[4]

根据以上分析我们知道可以利用称重传感器把物体的重量通过传力机构作用于称重传感器,传感器输出电信号给单片机系统的前置电路,经滤波放大,模数转换传给计算机。[5]计算机系统利用其快速的数据处理能力,通过线性变换把它转换成重力信号并且完成显示及控制功能。3.1.2 前级放大器

在测量控制系统中,用来放大传感器输出的微弱电压、电流或电荷信号的放大电路称为测量放大电路,亦称仪用放大电路。[6]

前级放大电路的主要作用是提供足够大的增益,把传感器输出的微弱信号放大到足够的幅度,并且有足够大的共模抑制比,排除各种外来的共模干扰。压力传感器输出的电压信号为毫伏级,所以对运算放大器要求很高。[7]对信号进行放大可以利用普通低温漂运算放大器构成多级放大器。但是普通低温漂运算放大器构成多级放大器会引入大量噪声。由于A/D转换器需要很高的精度,所以几毫伏的干扰信号就会直接影响最后的测量精度,所以不宜采用。比较成熟的电路是三运放仪表放大电路,在提供大的共模抑制比的情况下,通过调节外部的一个电阻即可以灵活的设定增益范围,采用通用的运放OP07加精密电阻做成三运放测量放大器。其优点是元器件易得,价格便宜,其难点是必须保证各个元器件的精度,才能提高系统整体的共模抑制能力。

由高精度低漂移运算放大器构成差动放大器。[8]差动放大

器是把二个输入信号分别输入到运算放大器的同相和反相二个输入端,然后在输出端取出二个信号的差模成分,而尽量抑制二个信号的共模成分。差动放大器具有高输入阻抗,增益高的特点,电路图如下:

图3-2 前级放大电路图

输入级加入两个同相放大器,增大了输入阻抗,第二级为差动放大电路比较符合应用要求。

图3-2中:

(3-6) (3-7)

(3-8)

测量放大器的增益:

(3-9)

测量放大器是一种带有精密差动电压增益的器件,具有高输人阻抗、低输出阻抗 ,强抗共模干扰能力、低温漂、低失调电压和高稳定增益等特点, 在检测微弱信号的系统中被广泛用作前置放大器。[9]

用Multisim7软件进行电路仿真:(1)观测输入输出波形

在Multisim7的电路窗口中创建电路,单击按钮进行仿真。双击示波器图标,打开示波器面板,观察输入、输出波形。

图3-3 测量放大电路的输入、输出

(2)测量电路的性能

运用Transfer Function Analysis方法测量放大器的放大倍数、输入电阻和输出电阻。按Simulate按钮运行仿真,结果如图3-5所示。

图 3-4 Transfer Function Analysis参数设置

图3-5 Transfer Function Analysis的仿真结果

(3)测量放大电路的通频带

运行电路,双击波特仪图标,打开波特仪面板,观察电路

的幅频特性曲线。移动垂直光标,测量幅度下降3dB时的频率,即为电路通频带,见图3-6。

图3-6 测量放大电路的幅频特性

(4)测量共模抑制比

测量共模抑制比的电路如图3-7所示。将输入两运放接同一输入信号,即为共模输入方式,用示波器观测输出波形,将输出电压与输入电压相比,可得到共模电压放大倍数。然后用差模电压放大倍数比共模电压放大倍数即得到电路的共模抑制比。

图3-7 测量共模抑制比电路

3.1.3 报警电路

图3-8 报警电路

3.2 数字电路设计

3.2.1 单片机

AVR单片机是1997年由ATMEL公司研发出的增强型内置

Flash的RISC(Reduced Instruction Set CPU) 精简指令集高速8位单片机。AVR的单片机可以广泛应用于计算机外部设备、工业实时控制、仪器仪表、通讯设备、家用电器等各个领域。(1)AVR的主要特性

高可靠性、功能强、高速度、低功耗和低价位 , 一直是衡量单片机性能的重要指标,也是单片机占领市场、赖以生存的必要条件。

AVR单片机硬件结构采取8位机与16位机的折中策略,即采用局部寄存器存堆(32个寄存器文件)和单体高速输入/输出的方案(即输入捕获寄存器、输出比较匹配寄存器及相应控制逻辑)。提高了指令执行速度(1Mips/MHz),克服了瓶颈现象,增强了功能;同时又减少了对外设管理的开销,相对简化了硬件结构,降低了成本。故AVR单片机在软/硬件开销、速度、性能和成本诸多方面取得了优化平衡,是高性价比的单片机。

 AVR单片机内嵌高质量的Flash程序存储器,擦写方便,支持ISP和IAP,便于产品的调试、开发、生产、更新。内嵌长寿命的EEProm可长期保存关键数据,避免断电丢失。片内大容量的RAM不仅能满足一般场合的使用,同时也更有效的支持使用高级语言开发系统程序,并可像MCS-51单片机那样扩展外部 RAM。

AVR单片机片内具备多种的时钟分频器,分别供URAT、I2C、SPI使用。其中与8/16位定时器配合的具有多达10 位的预分频器,可通过软件设定分频系数提供多种档次的定时时间。AVR单片机独有的“以定时器/计数器(单)双向计数形成三角波,再与输出比较匹配寄存器配合,生成占空比可变、频率

可变、相位可变方波的设计方法(即脉宽调制输出PWM)”更是令人耳目一新。[10]

增强性的高速同/异步串口,具有硬件产生校验码、硬件检测和校验侦错、两级接收缓冲、波特率自动调整定位(接收时)、屏蔽数据帧等功能,提高了通信的可靠性,方便程序编写,更便于组成分布式网络和实现多机通信系统的复杂应用,串口功能大大超过MCS-51/96单片机的串口,加之AVR单片机高速,中断服务时间短,故可实现高波特率通讯。

 多个复位源(自动上下电复位、外部复位、看门狗复位、BOD复位),可设置的启动后延时运行程序,增强了嵌入式系统的可靠性。 [11]

应用AVR单片机进行高速信号采集和处理具有51不可比拟的优势。实践表明,使用4MHz时钟的AVR单片机较使用相同时钟的51系列单片机具有20倍以上的速度和性能。而且AVR提供的JTAG/ISP接口,可以使用户方便进行在线仿真调试和适时程序更新。使用AVR单片机开发产品具有开发周期短,成本低廉等特点,因为对于使用熟练的开发者,所需要的开发工具就是一根自制的ISP下载线即可(成本不过十几元)。ATMEL公司将推出的新型AVR单片机将带有CAN、USB等等,继续降低功耗。(2)ATmega48的特点

本系统基于AVR单片机来实现,因为系统需要大量的控制显示和键盘。不宜采用大规模可编程逻辑器件:CPLD、FPGA来实现。(因为大规模可编程逻辑器件一般是使用状态机方式来实现,即所解决的问题都是规则的有限状态转换问题。本系统状态较多,难度较大。)另外系统没有其它高标准的要求,我

们最终选择了ATmega48单片机来实现系统设计。ATmega48单片机图如下:

图3-9 ATmega48单片机

ATmega48是基于AVR增强型RISC结构的低功耗8位CMOS微控制器。由于其先进的指令集以及单时钟周期指令执行时间,ATmega48 的数据吞吐率高达1 MIPS/MHz,从而可以缓减系统在功耗和处理速度之间的矛盾。

AVR 内核具有丰富的指令集和32 个通用工作寄存器。所有的寄存器都直接与算术逻辑单元(ALU) 相连接,使得一条指令可以在一个时钟周期内同时访问两个的寄存器。这种结构大大提高了代码效率,并且具有比普通的CISC 微控制器最高至10 倍的数据吞吐率。ATmega48有如下特点: 4K字节的系统内可编程Flash(具有在编程过程中还可以读的能力,即RWW), 256字节 EEPROM, 512节 SRAM,23 个通用I/O 口线, 32 个通用工作寄存器,三个具有比较模式的灵活的定时器/ 计数器(T/C), 片内/ 外中断,可编程串行USART,面向字节的两线串行接口,一个SPI 串行端口,一个 6 路10 位ADC(TQFP 与MLF 封装的器件具有8 路10 位ADC), 具有片内振荡器的可编程看门狗定时器,以及五种可以通过软件选择的省电模式。空闲模式时CPU 停止工作,而SRAM、T/C、USART、两线串行接口、SPI 端口以及中断系统继续工作;掉电模式时晶体振荡器停止振荡,所有功能除了中断和硬件复位之外都停止工作,寄存器的内容则一直保持;省电模式时异步定时器继续运行,以允许用户维持时间基准,器件的其他部分则处于睡眠状

态; ADC 噪声抑制模式时CPU 和所有的I/O 模块停止运行,而异步定时器和ADC 继续工作,以减少ADC 转换时的开关噪声; Standby 模式时振荡器工作而其他部分睡眠,使得器件只消耗极少的电流,同时具有快速启动能力。ATmega48是以Atmel 的高密度非易失性内存技术生产的。片内 ISP Flash可以通过SPI 接口、通用编程器,或引导程序进行多次编程。引导程序可以使用任意接口将应用程序来下载到应用Flash 存储区。在更新应用Flash 存储区时引导程序区的代码继续运行,从而实现了FLASH 的RWW 操作。 通过将8 位RISC CPU 与系统内可编程的Flash集成在一个芯片内, ATmega48为许多嵌入式控制应用提供了灵活而低成本的方案。3.2.2 A/D转换

微型计算机在实时控制、在线动态测量和对物理过程进行监控,以及图像、语言处理领域的应用中,都要与一些连续变化的模拟量(温度、压力、流量、位移、速度、光亮度、声音等模拟量)打交道,但数字计算机本身只能识别和处理数字量,因此必须经过转换器,把模拟量转换成数字量或将数字量转换成模拟量,才能实现CPU与被控对象之间的信息交换,所以微机在面向自动控制、自动测量和自动监测系统与各种被控对象发生关系时,就需设置模拟接口。显然,模拟接口电路的作用,在于把微机处理器系统的离散信号与模拟设备中连续变化的模拟电压、电流之间建立起适配关系,以便计算机执行控制与测量任务。[12]

A/D转换器是将模拟电压或电流转换成数字量的器件或装

置,它是一个模拟系统和计算机之间的接口,它在数据采集和控制系统中,得到了广泛的应用。常用的A/D转换方式有逐次逼近式和双斜积分式,前者转换时间短(几十个微秒-几百微秒),但抗干扰能力强。[13]

随着称重技术的不断发展,人们对称重仪表的测量精度和自动化程度提出了越来越高的要求。近年来电阻应变称重传感器的制造技术有了突破性发展,传感器的各项技术指标已满足各种电子称重设备的要求。而精度的提高除了与测量传感器有关系外,A/D转换器件也是影响称重仪表精度的一个重要的方面。选择合适的、高精度的模数转换器件将大幅度提高称重仪表的性能和精度,减少占用硬件资源。本系统采用ATmega48自带的8 路10 位A/D转换器。(1) A/D转换器的基本工作原理。

A/D转换器的转换方式通常有逐位比较转换方式和双积分转换方式,前者的转换速度比后者的转换速度快100倍以上,所以逐位比较转换法的A/D转换器广泛用于计算机控制系统中。[14]逐位比较转换法的原理如图3-9所示,

图3-10 A/D转换器原理图

它主要由控制时序和逻辑电路、逐位逼近寄存器(SAR)、D/A转换器和比较器四部分组成。逐位逼近寄存器(SAR)输出二进制编码数字送到D/A转换器,D/A转换后的输出电逻辑电路,修改SAR的数据,使SAR中的数据对应的反馈电压V0通过逐位比较去逼近被转换的输入电压VIN。其转换过程类似于天平称重的原理。当V0>VIN时,就将对应的比较位置为“0”,当V0直到每一位都比较完后,其V0与VIN的电压差小于或等D/A转换

器精度。

(2) ATmega48自带模数转换器的特点:• 10 位 精度

• 0.5 LSB 的非线性度• ± 2 LSB 的绝对精度

• 65 - 260 μs 的转换时间

• 最高分辨率时采样率高达15 kSPS• 6 路复用的单端输入通道

• 2 路附加的复用单端输入通道(TQFP 与MLF 封装)• 可选的向左调整ADC 读数

• 0 - VCC 的 ADC 输入电压范围• 可选的1.1V ADC 参考电压• 连续转换或单次转换模式• ADC 转换结束中断

• 基于睡眠模式的噪声抑制器

ATmega48 有一个10位的逐次逼近型ADC。ADC与一个8通道的模拟多路复用器连接,能对来自端口A的8 路单端输入电压进行采样。单端电压输入以0V (GND) 为基准。ADC 包括一个采样保持电路,以确保在转换过程中输入到ADC 的电压保持恒定。ADC 由AVCC 引脚单独提供电源。AVCC 与VCC 之间的偏差不能超过± 0.3V。标称值为1.1V 的基准电压,以及AVCC,都位于器件之内。基准电压可以通过在AREF引脚上加一个电容进行解耦,以更好地抑制噪声。

ADC 通过逐次逼近的方法将输入的模拟电压转换成一个10

位的数字量。最小值代表GND,最大值代表AREF引脚上的电压再减去1 LSB。通过写ADMUX寄存器的REFSn位可以把AVCC 或内部1.1V 的参考电压连接到AREF 引脚。在AREF 上外加电容可以对片内参考电压进行解耦以提高噪声抑制性能。

模拟输入通道可以通过写ADMUX寄存器的MUX位来选择。任何ADC输入引脚,像GND及固定能隙参考电压,都可以作为ADC的单端输入。通过设置ADCSRA 寄存器的ADEN即可启动ADC。只有当ADEN 置位时参考电压及输入通道选择才生效。

ADC转换结果为10位,存放于ADC数据寄存器ADCH及ADCL中。默认情况下转换结果为右对齐,但可通过设置ADMUX 寄存器的ADLAR 变为左对齐。如果要求转换结果左对齐,且最高只需8 位的转换精度,那么只要读取ADCH 就足够了。否则要先读ADCL,再读ADCH,以保证数据寄存器中的内容是同一次转换的结果。一旦读出ADCL, ADC 对数据寄存器的寻址就被阻止了。也就是说,读取ADCL 之后,即使在读ADCH 之前又有一次ADC 转换结束,数据寄存器的数据也不会更新,从而保证了转换结果不丢失。ADCH 被读出后, ADC 即可再次访问ADCH 及ADCL 寄存器。ADC转换结果如下:

(3-10)

式中,为被选中引脚的输入电压,为参考电压。

A/D转换器接口:

 使CPU能起动A/D转换,并将转换结果传给CPU。必须在两者之间设置接口与控制电路。接口电路的构成取决于A/D转换器本身的性能特点,又取决于采用何种方式读取A/D转换结果CPU读取A/D转换数据的方法有三种,查询法,定时法和中断

法。[15]

本系统采用定时法读A/D转换所需时间Tc,那么起动A/D后,只需等待该段时间,就可以读A/D转换器。3.2.3 键盘输入

键盘输入是人机交互界面中最重要的组成部分,它是系统接受用户指令的直接途径。[16]

键盘接口图:

图3-11 键盘接口电路

3.2.4显示输出

显示电路是智能仪表的重要功能电路之一,为简化电路、降低成本,通常采用动态显示方式来实现。本系统采用四位LED显示。接口电路如下:

图3-12 LED显示接口电路

4 系统的软件设计

4.1软件的设计思想

采用模块化程序设计与结构程序设计的方法,即将程序整体分解为几个相对的程序模块:键处理显示模块、数据采集与处理模块、数据控制模块、报警程序模块、参数显示偏移计算模块等等。整体程序安排为:首先进行系统初始化,然后打开中断,等待中断信号,最后查询压力越界标志,判断是否进行报警处理。各键程序按照各自的功能进行处理。

本系统采用C语言作为编程语言。汇编语言作为传统嵌入式系统的编程语言,具有执行效率高等优点,但其本身是一种低级语言,编成效率低下,且可移植性和可读性差,维护极不方便,从而导致整个系统的可靠性也较差。而C语言以其结构化和能产生高效代码等优势满足了设计要求,是嵌入式系统编程的首选。用C语言进行嵌入式系统的开发,具有汇编语言编程所不可比拟的优势:可以大幅度加快开发进度;无需精通单片机指令集和具体的硬件,也能够编出符合硬件实际专业水平的

程序;可以实现软件的结构化编程,她使得软件的逻辑结构变得清晰、有条理,便于开发小组计划项目、分工合作。源程序的可读性和可维护性都很好;省去了人工分配单片机资源的工作;可移植性强;C语言提供auto、static、flash等存储类型。由于涉及到大量数据的运算,程序不宜采用汇编语言,C语言大大缩短了开发时间,且程序可读性非常好。软件所实现的功能① 称重② 计价

③ 累计,去皮④ 标定

⑤ 键盘、显示

4.2主程序流程图

系统的主程序流程框图如图4-1所示:

[17]

图4-1 系统的主程序流程框图

4.3主要程序模块设计

4.3.1 A/D转换模块

采用Mega48内置10位逐次逼近式A/D转换器,完成模数转换。前级放大电路的输出与单片机的PC5口相连,将输入信号进行A/D转换。

数据采集与数据处理模块针对的是由A/D转换器转换的压力字信号。包括采样通道选择与数据采样子程序。4.3.2 键盘扫描模块

本系统采用4×4键盘,键盘电路与单片机的PD0-PD7口相连。键盘的扫描程序步骤如下:

1 查询是否有键按下。

2 查询按下键所在的行、列位置。

3 对得到的行号和列号译码,得到键值。4 键的抖动处理,延时扫描。4.3.3 显示模块

采用4位动态LED显示。段选码端口I/O1用来输出显示字符的段选码,与单片机PB0-PB7口相连。位选码端口I/O2与单片机PC0-PC3口相连。I/O1不断送待显示字符的段选码,I/O2不断送出不同的位扫描码,并使每位显示字符停留一段时间,一般为1-5ms。利用眼睛的视觉惯性,从显示器上便可以见到相当稳定的数字显示。选择一动态扫描的频率有一定的要求,频率太低,LED将出现闪烁现象。如频率太高,由于每个LED点亮的时间太短,LED的亮度太低,肉眼无法看清,所以一般取几个ms左右为宜。

4.4使用操作说明

本系统采用16键键盘来实现,分为数字键:0-9为数字键,6个控制键。开机正确输入后,进入称重显示。

A 键 输入商品单价;

B键 显示商品重量;本次称重结束退出,进行下一次称重;

C键 确认键,可以将当前信息保存至购物清单;并且将金额累加,得到所购买商品的总金额;

D键 去皮键,用于去除皮重;

E键 清单价,用于输入的单价错误的时候,重新输入;F键 用于设置单价;

设定商品单价:开机后按两次F键,第二次按下F键后显示

F即可设置单价。输入商品代码,按确认键C确定,显示所输入的价格;再输入第二种商品的代码,按确认键确定,以此类推,最多可设定十种商品的单价。要设定的单价设定完后,按B键退出设置单价状态,返回称重状态。

未设置商品单价时亦可直接输入商品价格,称重过程如下:

开机后按B键进入称重状态,显示商品重量,按D键去除包装皮重,按确定键C显示去皮后重量,按一次A键显示零,输入商品单价,按C键确定,显示商品总价格。

运行中如果顾客购买已存入的10种商品,只需按下相应的商品键,再按确认键,即可保存此商品的信息,包括其重量,金额和当前累计金额。

另外,已存入的10种商品的单价均可重新设置,直接输入其单价即可,方便实用。如果所称重物超过了系统最大量程5Kg,则蜂明器发出报警声音。

5 总体调试

5.1测试仪表

4位半数字万用表(MASTECH MY-65),双踪示波器(YB4325),从1g到1000g的砝码(两套),计算器

5.2 操作方法

把传感器放平,接通电源,预热10分钟内,零点有漂移属正常;

如果空称时显示不为零,可按去皮键清零;如需去除器皿皮重,先按去皮键,再在器皿上放物件,则显示净重;

第一次使用或较长时间未用,则需用砝码标定;如果物品重量超出测量范围,蜂鸣器发出警告;单价设置时,先按设置键,再用数字键输入单价,可使用删除键修改。

5.3 测试方法

电子秤放平,预热10分钟以上;

把1g到10000g的砝码往秤上放,读取显示重量;设置单价,当物件重量变化时,读取相应的金额;使用累计功能,读取总金额;用1000g的砝码标称,标定功能;使用汇总功能。

5.4 测试数据及测试结果分析

5.4.1测试数据

按照操作方法,在实验室对1g到10000g的砝码进行测试,从小到大,然后从大到小,间隔一定时间,共测量10个来回,共20次;5.4.2测试结果及分析

表一:重量测试结果与误差分析

实际重量

测示重量

绝对误差相对误差

0.001kg§2kg3kg4kg5kg

0. 001|§1.9992.9993.9994.998

0§0.0010.0010.0010.002

0%§0.05%0.033%0.025%0.04%

表二:单价金额计算误差分析(随机重量和单

价)

实际重量

单价(元)

实际金额显示金额

0.200kg0.199kg0.500kg1.000kg

26.0015.3268.163.56

5.23.0534.083.56

5.23.0534.083.56

从表二可知,显示金额与实际金额相比,都在要求的范围之内。总价金额为各个金额的累加值,只要不溢出,总价金额绝对是各次显示金额的总和,其误差仅由单价金额的误差决定。

结论

经过为期十二周的毕业设计,我得到了很大的锻炼。实践和理论相结合,实践验证理论,理论指导实践,本人对所学知识有了更深的领会。同时也在实际操作中遇到了很多问题。

虽然我们在毕业设计当中遇到了很多问题,但在老师的细心指导下通过查阅书籍资料,一一将问题解决,温习了以前所学知识,还将知识应用于实践当中,这种在问题中学习到的知识留给自己的印象更加深刻。这次毕业设计中,我在了解电子秤的组成、特点、分类、发展以及在商业中的应用。

通过本次毕业设计的实践,我体会最深的一点是做一件事之前,必须要清楚地知道自己想要什么样的结果,这样的结果将如何体现出来,为什么会有这样的结果。对于不满意的结果要如何改进,改进后的先进性又体现在哪里等等。总之,必须要清楚的知道自己在做什么样的事,否则,所有的工作都是盲目的,没有目的的工作就没有成效可言。此外我深深的体会到“实践出真知”这句话,实践过程中会出现很多问题,在这些问题的解决过程中的学习会使自己对知识的领会更加深刻。

参考文献

[1] 孙以材等编著.压力传感器的设计制造与应用[M],冶金工业出版社, 2000

[2] 李道华等编.传感器电路分析与设计[M],武汉大学出版社, 2000

[3] 黄继昌等编著.传感器工作原理及应用实例[M],人民邮电出版社, 1998

[4] 丁镇生编著.传感器及传感技术应用[M],电子工业出版社, 1998

[5] 黄贤武等编著.传感器实际应用电路设计[M],电子科技大学出版社, 1997

[6] 吴兴惠,王彩君编著.传感器与信号处理[M],电子工业出版社, 1998

[7] 颜杰先编著.实用电子电路设计制作例解[M],电子工业出版社, 1993.6

[8] Pual Horowitz and Winfield Hill. The Art of

Electronics.2nd ed[M].Cambridge UniversityPress,19

[9] Robert B.Northrop. Analog Electronic Circuits[M].

Addison-Weseldy Publishing Company, New York.1990

[10] 张克彦编著.AVR单片机实用程序设计[M],北京航空航天大学出版社, 2004

[11] 宋建国主编.AVR单片机原理及应用[M],北京航空航天大学出版社, 1998

[12] 康华光主编.电子技术基础[M] 模拟部分,高等教育出

版社, 1988.5

[13] 康华光主编.电子技术基础[M] 数字部分,高等教育出版社, 1988.5

[14] 顾德英,罗云林,张键著.计算机控制技术[M],北京邮电大学出版社 ,2005

[15] 梁廷贵著.积分式A/D转换器其他专用集成电路分册[M],科学技术文献出版社

[16] 吴国经主编.单片机应用技术[M],中国电力出版社,2004

[17] 佟长福编著.AVR单片机GCC程序设计[M],北京航空航天大学出版社,2006

致 谢

毕业设计是检验大学四年学习结果的一个重要阶段,在这将近半年多的时间里,我不仅学到了不少新知识,还把以前所学到的知识提高到了一个更高的水平。更重要的是使我在学习和掌握这些知识的同时,能够在思维上得到锻炼和升华,在分析问题和解决问题的能力上得到培养和提高。在这里,我首先要感谢赵学玲老师,在她的细心的关怀指导帮助下,我们取得了很大的进步。其次感谢我的母校给了我这次

锻炼机会,还提供了先进的试验设备。同时,我要感谢在此次毕业设计中给予我帮助的同学,没有他们的帮助,我不可能取得今天的成绩。最后感谢大学四年中所有的老师,感谢他们那对我的教导和帮助,还有各位同学,感谢他们对我的关心和帮助,让我愉快的渡过了大学四年。

程序:

#include #include

附录1:软件程序

unsigned long sum=0; //

unsigned int ad_con;//存放PA0的AD转换结果unsigned int shp[10]={0,0,0,0,0,0,0,0,0,0};

unsigned int sum1,t,j,k=0;//unsigned long t,j,k=0;

/////////////////////////////延时///////////////////////////////////////////void delay_us(unsigned int t) //us {do t--;

while(t>1); }

void delay_ms(unsigned char t) //ms {

while(t!=0) {

delay_us(1042); t--; } }

////////////////////////////////////////////////////////////////////////////unsigned char led[]={

0X3F,/*0*/ //七段译码表 0X06,/*1*/ 0X5B,/*2*/ 0X4F,/*3*/ 0X66,/*4*/ 0X6D,/*5*/

0X7D,/*6*/ 0X07,/*7*/ 0X7F,/*8*/ 0X6F,/*9*/ 0X77,/*A*/ 0X7C,/*b*/ 0X39,/*C*/ 0X5E,/*d*/ 0X79,/*E*/

0X71/*F*/

}; //显示符0,1,2,3,4,5,6,7,8,9,

unsigned char led_buff[]={0x3f,0x3f,0x3f,0x3f}; //显示缓冲区

unsigned char scan_key(void) //不做按键释放检查的键盘扫描函数 {

unsigned char i,temp; DDRD=0X0F;PORTD=0XFF;for(i=0;i<4;i++) {

PORTD=~(1<temp=PIND&0XF0; if(temp!=0xf0) //如有键按下,延时15ms {

delay_ms(15); //延时用来消除显示抖动 temp=PIND&0xf0; //再读键盘 if(temp!=0xf0) {

temp&=0xf0;

switch (temp) //计算键值 {

case 0x70:temp=15-(3-i)*4;break; case 0xb0:temp=14-(3-i)*4;break; case 0xd0:temp=13-(3-i)*4;break; case 0xe0:temp=12-(3-i)*4;break; default:temp=0x7f; } return temp; } }

PORTD=0xff; }

return 0x7f; }

void port_init(void) {

DDRB=0xff; PORTB=0xff; DDRC=0x0f;

PORTC=0Xf0; DDRD=0x0f; PORTD=0xff; }

void adc_init(void) // A/D转换设置口

Pc0.0 {

DDRC|=0x0f; PORTC|=0x0f;

ADCSRA=0x00; //disable adc

ADMUX=0x45; //参考电压AVCC(01),转换结果右对齐(0)通道5 ACSR=0x80; //模拟比较器禁用

ADCSRA=0xEA; //AD使能,启动AD,ADC自动触发使能,ADC中断使能,预分频选择

DIDR0=0x3f; //禁止输入

}

//ADC转换结束//

#pragma interrupt_handler adc_isr:22 void adc_isr(void) {

int n,m;

ad_con=n=ADCL; m=ADCH;

ad_con|=(int)m<<8;

ADCSRA=0x00; //disable adc

ADMUX=0x45; //select adc input5 ACSR=0x80; //模拟比较器禁用

ADCSRA=0xEA; //AD使能,启动AD,ADC自动触发使能,ADC中断使能,预分频选择 }

#define vref 5080

void adctovol(unsigned int adc) {

unsigned int adz;unsigned char i;

adz=(unsigned int)(((unsigned long)((unsigned long)adc*vref))/1024); adz=adz/10; sum=adz;

for(i=0;i<4;i++) {

led_buff[i]=led[adz%10]; adz=adz/10;

if(i==3) led_buff[i]=led_buff[i]|0x80; }}

void display(void) {

unsigned char i=0; for(;i<4;i++) {

PORTB=led_buff[i];PORTC=1<<(3-i); delay_us(1000); PORTC&=0Xf0; }

}

////////////////////////////ad//////////////////////////////// void ad (void) {

adctovol(ad_con); //ad_con

display();//display();display();display();display();

}

//////////////////////B键////////////////////////////////////////////////void b_jian() //已按下B键

{//1

unsigned int d,dan=0; unsigned char key1,key2; unsigned int i;

while(key1!=12) //如果按下的不是C键,则 { key1=scan_key(); do {

key2=scan_key();

ad(); //进行ad }

while(key1==key2);

if (key1==12) //如果按下的是C键,则显示清零再跳出总循环

{

for(i=0;i<4;i++) //先显示清零............ led_buff[i]=led[0]; }

if(key1==13) //如果按下的是D键,则去皮 {

for(i=0;i<4;i++) //先显示清零 led_buff[i]=led[0]; while(1) {

key1=scan_key(); //键盘扫描 do {

key2=scan_key(); display(); }

while(key1==key2);

if(key1<10||key1==14||key1==12) {

if (key1==14)

for(i=0;i<4;i++) //显示清零, led_buff[i]=led[0]; else {

if (key1==12) //若按下确认键C {

for(i=0;i<4;i++) //显示清零, led_buff[i]=led[0]; sum=sum-dan; d=sum;

for(i=0;i<4;i++) //计算价格 {

led_buff[i]=led[d%10]; d=d/10; if(i==3)

led_buff[i]=led_buff[i]|0x80; }

break;

} else {

for (i=0;i<3;i++) //显示

led_buff[3-i]=led_buff[2-i]; //按下一次移一次 //if(key1==10)

//led_buff[0]=led_buff[0]|0x80; led_buff[0]=led[key1&0x7f]; dan=dan*10; //左移 dan=dan+key1; //记单价 } } } } } display(); }//4}//1

//////////////////////////F键程序////////////////////////////////////////void Fjian(void) {//1

unsigned int dan=0;unsigned char key1,key2;unsigned char i,p=0;unsigned int c=0;

for(i=0;i<4;i++) //先显示清零 led_buff[i]=led[0];

led_buff[0]=led[11&0x7f]; //按下F键

delay_ms(400);led_buff[0]=led[0];while(c<10)

{//2

key1=scan_key(); do {//3

key2=scan_key(); display();

}//3

while(key1==key2);

if(key1<10||key1==14||key1==12||key1==15||key1==11) {//4

if(key1==15) //按下F键 {//5

led_buff[0]=led[key1&0x7f]; //显示F while(1) { //6

key1=scan_key(); //键扫 do {//7

key2=scan_key();

display(); }//7

while(key1==key2);

if(key1<10||key1==12||key1==14||key1==11) //若按键 {//8

if(key1<10||key1==14||key1==11)

{//9

if(key1<10) {//10

for(i=0;i<4;i++) //显示清零, led_buff[i]=led[0];

led_buff[0]=led[key1&0x7f];

p=key1; //p为shp[]中的p位; }//10 else

{//11

if(key1==14)

led_buff[0]=led[0]; else {//12

for(i=0;i<4;i++) //显示清零, led_buff[i]=led[0]; c=10; break; }//12

} //11 }//9 else

{//13

for(i=0;i<4;i++) //显示清零, led_buff[i]=led[0]; while(1) { //14

key1=scan_key();

do {//15

key2=scan_key(); //键扫

display(); }//15

while(key1==key2);

if(key1<11||key1==12||key1==14) //若按下数字键或c确认键

{//16 if(key1<11||key1==14) //按下数字键 {//17

if(key1==14) {//18

for(i=0;i<4;i++) //显示清零, led_buff[i]=led[0]; shp[p]=0; dan=0; }//18 else {//19

for (i=0;i<3;i++) //显示

led_buff[3-i]=led_buff[2-i]; //按下一次移一次 led_buff[0]=led[key1&0x7f]; dan=dan*10; //左移 shp[p]=dan+key1; dan=shp[p]; } //19 }//17

else

//if(key1==12) //按下C键 {//20

for(i=0;i<4;i++) //记单价 {//21

led_buff[i]=led[dan%10]; dan=dan/10; if(i==2)

led_buff[i]=led_buff[i]|0x80; }//21

break; //跳出循环 }//20 }//16 }//14 }//13 }//8 }//6 }//5 else {//22

if (key1==14)

for(i=0;i<4;i++) //显示清零, led_buff[i]=led[0]; else {//23

if (key1==12) //若按下确认键C {//24

for(i=0;i<4;i++)

{//25

for(i=0;i<4;i++) //显示清零, led_buff[i]=led[0]; }//25C

c++;

continue; }//24 else

{//26

//if(key1==11) break; //else //{//27

for (i=0;i<3;i++) //显示

led_buff[3-i]=led_buff[2-i]; //按下一次移一次 led_buff[0]=led[key1&0x7f]; dan=dan*10; //左移

shp[c]=dan+key1; //记单价 //if(i==2)

//led_buff[2]|=led_buff[2]|0x80; //dan=shp[c]; //} //27 }//26 }//23 }//22 }//4 display(); }//2

}//1

///////////////////////////ajian/////////////////////////////////////void a_anjian(void) {//1

unsigned char key1,key2;unsigned char i,m;unsigned int dan=0;

for(i=0;i<4;i++) //显示清零, led_buff[i]=led[0];

led_buff[0]=led[10&0x7f];delay_ms(200);led_buff[0]=led[0];while(1) {//2

key1=scan_key(); //键扫 do {//3

key2=scan_key(); display(); }//3

while(key1==key2);

if((key1<=11)||key1==14||key1==12) {

if(key1<10||key1==14||key1==12) {//5

if(key1<10||key1==14) {//6

if(key1==14) {//7

for(i=0;i<4;i++) //显示清零, led_buff[i]=led[0]; dan=0; }//7 else { //8

for (i=0;i<3;i++) //显示

led_buff[3-i]=led_buff[2-i]; //按下一次移一次 led_buff[0]=led[key1&0x7f]; dan=dan*10; dan=dan+key1;

} //8 //记单价 }//6

else //若按下确认键C {//9

for(i=0;i<4;i++) //显示清零, led_buff[i]=led[0]; sum=sum*dan; sum1=sum/1000; k=sum1+k; j=k;

for(i=0;i<4;i++) //计算价格 {

led_buff[i]=led[j%10]; j=j/10; if(i==2)

led_buff[i]=led_buff[i]|0x80; }//10 break;

}//9 } //5 else {

if(key1==11) break; else{

for(i=0;i<4;i++) //显示清零, led_buff[i]=led[0];

led_buff[0]=led[key1&0x7f]; while(1) {//2

key1=scan_key(); //键扫 do {//3

key2=scan_key(); display(); }//3

while(key1==key2);

if(key1<=11||key1==12||key1==14) {

if(key1==11) break; if(key1<11) {

if(key1<10) {

for(i=0;i<4;i++) //显示清零, led_buff[i]=led[0];

led_buff[0]=led[key1&0x7f]; m=key1; }

else break; } else {

if(key1==12) {

for(i=0;i<4;i++) //显示清零, led_buff[i]=led[0]; t=shp[m]; sum=sum*t; sum1=sum/1000; k=k+sum1; j=k;

for(i=0;i<4;i++) //计算价格 {

led_buff[i]=led[j%10]; j=j/10;

if(i==2)

led_buff[i]=led_buff[i]|0x80; }//10 } else {

for(i=0;i<4;i++) //显示清零, led_buff[i]=led[0]; k=k-sum1; } } } } } }

} }//2 }//

/////////////////////////主函数////////////////////////////////////////////void main(void) {//1

unsigned char key1,key2; unsigned char i; port_init();

MCUCR=0X00; adc_init(); SEI(); while(1) {//2

key1=scan_key(); do {

key2=scan_key(); display();

}

while(key1==key2); switch (key1)

{

case 11:b_jian();break; //如果先按下B键 case 14:{ //如果先按下E键,则清单价 for(i=0;i<4;i++)

led_buff[i]=led[0]; }break; case 15: Fjian();break; case 10: a_anjian();break; } display(); }//2} //1

附录2:英文资料

One The develop general situation and tendency of production courseautomation

Since 30 decade from this century, automation technology has gottenastonishing achievement , has played a crucial role in industrial productionand science develop. Now, automation installation has become large scaleequipment, is important as cannot cut part apart to form. Can say that if notdeploy suitable voluntarily control system, large scale production course cannot run at all. Actually, the level of production course automation has becomea important sign of measuring industrial enterprise modern level.

Look back the history of automation technical development , can seethat it and the development of production course have close connection, issingle for one to conform to simplicity form go to complex form, from localautomation to the automation of overall situation, from the elementaryintelligent development to high-grade intelligence course. Automation therole in industrial production, have gone through approximately 3 developstage.

Before 50 decade, can sum up the first stage that develops forautomation. In this period, theoretical foundation is to carry out mathematicswith transfer function to describe , is taking thoroughly locus law andfrequency law as classical control theory of analysis and comprehensivesystematic basic method , so has obvious support handwork and experienceto carry out analysis and comprehensive colour. In design course, is that the

production course of be complex decomposes artificially for some simplecourse normally .Its control goal can only also satisfy in the steady and safecategory that belongs to local automation that maintains production. At thattime have also appeared somewhat as string level , before Kui compensationetc. very effective complex system, corresponding control appearance alsogoes to unit combined-type from base type development. But by and large,automation level is still in elementary stage.

In the 10 years of sixty decade, We can consider as the second stage ofindustrial automation development. In 50 decade, end passes because ofproduction Cheng side with promptly the large scale, direction developmentthat melts continuously , industrial course nonlinear , couple with thecharacteristics such as denaturation very stick out , original simple controlsystem can not already satisfy requirement, automatic control is faced withthe serious challenge of industrial production. Is lucky to be , to meet spacethe needs that explored development get up modern control theory haveproduced and have gotten astonishing achievement in some advancedtechnical fields. It is taking state space analysis method as foundation, it isknown that content has included being basic system with least-square todiscriminate, with maximum value principle and development program forthe optimum control of major method and with card Er graceful strain the 3minutes such as best estimate with wave theory of core. What deserve to benoticed is that it is optimum that modern control theory, in synthesizing andanalysing system, have gone to from external phenomenon thorough theregularity that reveals systematic intrinsic , since local control enters theoverall situation that arrives under certain meaning, and on structure, havearrived from only ring development to meet ring and learning ring etc.. Cansay that modern control theory is the leap of people for controling thetechnical one quality on knowledge , has established theoretical foundation

for realization to be horizontal automation high. At the same time, popularityand the development of electronic digital computer are that the application ofmodern control theory has opened up road , have offered very importanttechnology means to realize industrial automation. In middle of 60 decade,have arisen the directly digital control replace simulated regulator withcomputer ( Direct Digital Control, DDC ) with from computer definitesimulated regulator or DDC loop the optimum supervisor control that setsvalue ( Supervisory Computer Control, SCC ), have some successful reports.In the beginning of 60 decade, abroad, attempt to replcae completelysimulated appearance with a computer , realize \" totally computer control \".In our country also in power plant and refinery the experiment research thathas carried out computer control. At that time because of computer not only,volume has expensive price , and still has a lot of problems in the aspect ofreliability and function, computer control stays all along in test stage.Besides, still have great gap between modern control theory and projectreality, this is to build mould difficulty since production course mechanism iscomplex mainly, performance index does not be easy to determine , controlstrategy very much lack and so on, make modern control theory momentaryis hard to still apply in production course. Though it is such, in this stageregardless of in modern control theory transplant application, is still to havegot good beginning in the aspect of computer leads into industrial course andtry.

In 70 decade industrial automation develop expression two obviouscharacteristics, they only enter the sign of the stage of 3th. For firstcharacteristic, in the beginning of 70 decade, have begun to have arisen thecontrol computer commercialization department that suits industrialautomation list. Since the circuit of large scale integration is successful asmaking , with tiny processor come out , make the function of computer rich

and colorful, reliable Sex rises considerably, and price drops substantially.Especially industrial director, is having adopted redundant technology , softhardware from after diagnosing the measures such as function, its reliabilityhas risen to the level that can satisfy industrial control requirement basically.Deserve to be pointed out is , begin from middle of 70 decade, according toindustrial scale of production the much characteristic of big, course parameterand control loop, for satisfy industrial computer should have the requirementof high reliability and flexibility , has arisen a kind of distribution typecontrol system ( Distributed Control Systems, DCS ), and name gathersscattered system. Technology in the computer system of one body, as soon ascoming out , for the favour that gets industrial circle , now, on world, havehad the 60 surplus domestic company's systems that puts development to themarket one after another , some unit of our country also in R&D own fairscattered system. This kind of system in structure on scatter , will computerdistribution rail cars in port between or a level that install , not only makesystematic danger scatter , have eliminated the applause node of overallsituation , have increased systematic reliability , and can be flexible to realizevarious new control law and algorithm conveniently, is convenient for systemdebug and throw in turn to transport. Obviously, the appearance of this kindof distribution type system has offered strong technology tool for realizationto be horizontal automation high to production course automationdevelopment, bring profound influence, can say that from 70 decade,industrial production automation has entered computer times.

Second characteristic is that control theoretical and other subjectsintersect mutually , permeates mutually, to deep direction development theexample of newspaper and control. Additionally, since 70 decade, the energycrisis that appears in world scope and market fiercely competitive, industrialscale of production more tend to the huge power as every power station, have

gone to six-hundreds thousands and kW of one million from two-hundredsthousands kW development, even stone is chemical, trade middle ageproduce the three-hundreds thousands tons of ethylene with even larger leveland the factories such as synthetic ammonia also establish in large quantity.The renovation of equipment has raised productivity greaterly. But to raiseoutput further, reduce cost , economize raw material and reduce energyconsumption to be not easy matter, must in scatter the foundation of controlon, from the viewpoint with optimum overall situation for entire big system,synthesize coordination. Domestic and international already in papermaking,it is metallurgical with stone melt the research work of having developedthese aspects in system. Can say that industrial production reality is putforward with excellent quality, high yield and low consumption for thecontrol requirement of goal from objective on have promoted 3 generationcontrol theory form and develop. Though so far, it is still in development andperfect course, but have gotten maximum pay attention and pay attention to ,get great progress. At the same time, in modern control theory, such asnonlinear systematic, distribution parameter systematic, radom control aswell as the control of fault tolerance and so on also in theoretically withpractice in have gotten development. In a word, in this stage, industrialautomation is occuring huge transform, it has broken through the pattern ofend department control , enters the closed-loop control that has containedsome subsystem to the control of overall situation , and has systematiccooperative control, optimum control as well as decision management, peoplename it as the new pattern of control management unifinication. It'sappearance will make industrial automation system, scientifically on thefoundation of getting production course and market information in largequantities, arrange and manage the productivity that produces and developsequipment fully , reaches the control goal of the high quality low

consumption of high yield eventually.

From the process of industrial automation development, can get followingconclusion:

( 1 ) the development of industrial automation and the development ofindustrial production course have very close connection. Industrialproduction the development, such as the transform of processing and therenovation of equipment scale of production unceasing enlarge etc. havepromoted automatic the process that melts , and industrial automation thenew achievement in the aspect of control theoretical and technical tool haveagain guaranteed modern industrial livelihood under safe steady prerequisite,carry out the operation \" block side\" , develop the potential of equipmentfully , raise productivity , get the economic and social benifit of high limit.( 2 ) industrial automation have entered computer times, enter the times ofso called computer integrated course system ( Computer IntegratedProduction Systems, CIPS ). However, now, face plentiful computer system,though having a lot of ready-made advanced controls, being theoretical , it isunceasing to lack effective control method to satisfy industrial production ishigh as puting forward to ask , therefore strengthen control theoretical andproduction actual close combination, notice to lead into intelligent controland expert system form algorithm and the simple and practical controlstructure of different form step by step, control theoretical project the taskthat melts , is in the future Course is major as controling to study content.The second requirement and the task of course control

The scope that industrial automation is concerned with is very broad,course control is in which a most important branch. It aims at the 6 claimedmainly big parameter, temperature, pressure, rate of flow and liquid position (or thing position ) , the parameters such as composition and thing controlproblem. It can cover a lot of industrial departments such as petroleum,

chemical engineering, power and metallurgy , is light industrial , weavingand so on, thus course control in national economy in possess extremelyimportant position. Industrial production is various for the requirement ofcourse control , can be sumed up eventually for 3 requirements, safety,economy and stability. Safety denotes to ensure the safety of person andequipment in entire production course, what this is most important is also themost basic requirement. Usually, it is to report to the police the more withparameter , accident report to the police with interlocks protective etc.measure guarantee. Now, because of industrial enterprise highly continuousand large scale characteristic, have suggested that online fault is foreseen anddiagnosed , design the control system of fault tolerance to wait for the safetythat raises operation further. Here, should still point out especially that alongwith environment, pollution becomes serious day by day , ecological balanceencounters damage, modern enterprise must regard the law of environmentalprotection that accords with the establishment of country as the importantcomposition part of production safety. Economy aims at producing the rawmaterial and energy that quality and quantity product consume also, is also toask production cost low at least and efficiency is highly. For near some yearcompete along with market aggravate with the scarcity of world energy,economy have gotten pass have never error pay attention. Production courseis local or overall optimization problem have mentioned agenda become theurgent task that need to solve very. The requirement of final a stability denotesystem have to restrain outside disturb , maintain production course theability of long-term steady operation. As well known, industrial productionenvironment does not be regular and constant, for instance the compositionchange or supply of raw material quantity difference, in responser, catalyst isactive to attenuate , the surface of heat exchanger of heat transfer stain, stillhave market sales volume rises and falls and so on is objective existence ,

them can or much affect steady production less. Certainly, the judgementmethod for simple control systematic stability has ripened very much , but ismore difficult for the analysis of large scale, complex big systematic stability.Along with the development of industrial production, to satisfy 3 above-mentioned requirements in theoretically with practice on still have a lot ofprograms that remain research.

The task of course control is on the foundation of knowing and graspingdevelopment property and the static quiet of processing and productioncourse , basis 3 above-mentioned requirements, application theory is analysedand synthesized for controling system , realizes finally with suitable technicalmeans. What deserve to be pointed out is that to meet the current requirementof producing for control to recover recover high tendency, must notice themodern control technical application in course fully, course model melts ,research take the role of act enough importance, because the application ofmodern control technology depends on the depth for course static quiet anddevelopment property knowledge greatly.

Therefore can say that course control is the knowledges such as controltheory, technology knowledge and computer technical and instrumentappearance and one that forms is applied science. In studying the practice thatexplored , form probably a new control theory that more suits industrialcourse control characteristic , so make course control rise promptly to a newlevel, this has no reason.

The task of course control is completed by realization and the design ofcontrol system. Now with one again Fei the control example of oil heatingstove come to explain.The following step:

1 . definite control goal for given controlled course, can put forwardvarious different control goals according to specific condition. Is takingheating stove as example , can have some following different goals:

( 1 ) in safe service condition take off , guarantee that hot oil outlettemperature stabilizes;

( 2 ) in safe service condition take off , guarantee that it is steady that hotoil outlet temperature and flue gas contain oxygen to measure;

( 3 ) in safe service condition take off , guarantee that hot oil outlettemperature stabilizes and heating stove thermal efficiency is highest.Obviously, to realize different control goal, should have different controlscheme.

2 . option measure parameter ( have been adjusted quantity ) regardlessof adopt what control scheme, need to control and keep watch on entireproduction course through some measures of parameter. For instance inheating stove, hot oil outlet temperature and flue gas contain oxygen tomeasure , the fuel force of oil pressure and the negative pressure of thechamber of a stove and so on, these parameters are parametery. After havingdetermined the parameter that needs detection , should select suitablemeasure element and change to send ware. Should notice that someparameters can not be directly measured probably because of some reasons ,should be gotten through measuring the another parameter that becomessurely linear relation to it ( is again called as indirect parameter ) , or comesusing the estimated method of parameter. Some control goals can only bemeasured through can calculate , being the temperature of smoke evacuationfor example thermal efficiency in heating stove and containing oxygen in fluegas with the function of the content of carbon monoxide, must measure theseparameters respectively and synthesize calculation to get. In destilling towerreflux than this kind that also belongs to parameter.

Usually, operational ton is the stipulation of technology , in controlsystem designs , has no general election to select room. But under havingmany operational tons and the condition of having been adjusted quantity , it

is which to useage operational ton control which one have been adjustedquantity will select carefully still. For instance in couple is changeful tomeasure system, must be adjusted for operational ton and quantity how topair problem make choice. In above-mentioned heating stove control, withfuel, quantity is operational ton to control hot oil outlet temperature , changesthe rate of flow of flue gas with flue baffle to guarantee that contain oxygenin flue gas to measure , is these to be by the stipulation of technology. But ifexcept flue baffle, being outside , in equipment still have the entrance of thechamber of a stove send the board of gangway diaphragm, so regulate fluegas with the baffle of which one to contain oxygen quantity the room thatselected in addition.

Only loop regulator the application in the automatic control of power plantBased on the characteristic of single loop regulator my courtyard in AnQing Shi melt the 3 issue of heat and power plant build project( the 630 t andmachine of 50 Mw / h stove) design in, have adopted dalian appearancefactory to introduce v187MA of Hitachi company — the only loop regulatorof E model, as the automatic regulation of unit equipment. Automaticregulating system gives an example.

( 1 ) the voluntarily regulation record of thermic load Tong

Form this regulating system with only loop regulator , see similarconventional appearance from working principle, the place of not same placelies in only loop regulator fair unit appearance various assemblies for asoftware of each other joins , it is flexible to use , have reduced externalhardware wiring. Make us come fully when designing using its richregulation and operational function to rise its system regulation quality.( 2 ) send wind automatic regulating system

This regulation loop is formed by a only loop regulator , but has used therich control function of its inside actually , have realized a string level

regulation. Additionally, the feedback that has still solved two actuators istrailed , has raised regulation quality.

( 3 ) hand /auto do not have voluntarily to disturb switch

The / of by hand do not have voluntarily to disturb switch is any aregulating system whether the important condition that carries out normalwork. Only loop regulator can facilitate very much this function that poolrealizes , additionally, still have from diagnosis and logic operationalfunction. , using these functions, can facilitate the monitoring of regulatingsystem that pool has no for realizing conventional appearance to protect. Wehave considered 3 following monitoring points in design:① regulation from diagnosis monitoring;

② the PID regulation operational unit PV knot of measured value decideworth the deviation value monitoring of SP;

② the deviation value of regulator output and valve position feedbacksignal monitoring.

( 4 ) direct with position operator form a complete set

On the face plate of single loop regulator, hand / automatic diverterswitch and hand hold button, but the operation of fiery power plant is beenaccustomed to , ask from control loop in work station on should set directposition operator. Therefore V187MA with Dalian appearance factory of itstransfer — the regulator of E model have developed to it supplemental DFDspecially — 1000 GJ ( electric position operator ). This position operator andelectric conducted ware and regulator coupling , can form to show operatingsystem , realize the / automatic state of by hand to show , trail voluntarilywith two-way do not have to disturb switch.

PMK but programming regulator is the only loop regulator that JapaneseFuji company puts 0 to the market in 1983, belong to . 2 level regulatorrepresentatives, actually can reach 0 . the standard of 1 level tables, ( each

biggest error of simulated quantity is smaller than 0 . the full span of thesimulated quantity of 1% ). Major performance index and parameter are asfollows: The 7 DCl a moulds of 5 V are entered , the 4 DCl a moulds of 5 Vhappen , 1 DC4s — 20 mA or the DCl a mould of 5 V happen , allow loadimpedance is 0 — 600 ohms, 8 switches quantity input and 8 switchesquantity output. Control function: Through the connection of modular ( have19 control modulars ), realization is controled basically ( a PID control ),ratio is controled ( 10 ratio operational (PID ), flee level control (PID )with program control( Cheng store to set 10 PID). Operational functionhas arithmetic, switch and pulse to occur , is square open , reports to thepolice , slope function , warm up to press mend straight, pulse widthcalculation, advanced hysteresis, absolute value and symbol reverse, pulsenumber count , hysteresis time and linearization , move and count output ,average , option location pulse width alternate , logic operational, limit ,imitate average , reckon by time , dead band, simulated calculation, trigger,switch and sampling maintenance and decoder.

Set-point sets function: Under different control way set-point set todivide into worth surely to set ( from hand hold input or set unit set ), remotecontrol sets ( set value pass through external given voltage or pulse widthgive ) with biography set ( last position machine pass through communicationset ). Export way: Hand is held ( again weigh soft hand hold , through goingup button or rapid company, button realizes the change of export value ),hand is held ( pawn regulator is away from line take charge of the adjustmentof export value ), automatic ( export value get control law or last positionmachine decision ). The switch of some kinds of above-mentioned waiesmostly is do not have disturb to do not have Hu the automatic switch ofweighing apparatus. \"

Communication way: With a maximum of but with 15 regulator or last

position machine pass through share compound line press 19.2 k b / srealization the serial data without modulation position deliver , to formmultistage distribution type system to offer condition.

Keyboard function: Have a 40 keies set unit, carry out data show ,modify , solidify as well as control the connection of operational modular.Have perfect from diagnosis function with rich report to the police system:For each major hardware loop and outside load loop go on online keep watchon , and export voluntarily to report to the police information, through faultkey on seting unit circulate show or rear son fault report to the police. Reportto the police content can designate through software configuration, as set-point and measured value, the change rate, export value and output ofmeasured value worth the last lower limit of change rate as well as deviationvalue to report to the police.

Broken electrical cold heat starts:

When the power source of 24 V is lower than 19 V, system protectsaccording to broken electrical handling through broken electricity , makesworking data insure , when answering electricity can basis broken electricaltime whether exceed 2 min or system whether promise succession start ( fromexternal switch decide ) come to decide succession start or initial start.

Control method; On basic PID foundation, through software configuration,can realize ratio control , before Kui control and option control, intermittencecontrol and nonlinear control. Fuji FC series appearance now in the stone ofour country melt system use generally, it is been reliability high that it has ,performance is stabilized , is operating and convenient with the characteristicwith strong adaptability, for Chinese stone melt parent companyrecommendation product. In October 1990 Fuji company's FC that has putnew a generation to the market super small-sized controler( CC — S, willbefore PMA ( regular program regulator ), PMK, PMB ( hand hold ware ),

the series such as PMG ( ratio set ware ) rise to block difference, is PNAl . ,PNA3, PNB3 is with PNG3. November 1992 is just arisen in Chinese market.It is had that PMK and most whole PNA3 of its function compare with majorchange: 1 . from 8 numbers and the 5 buttons on table head show to replaceside set unit, 2 . from 101 give out light diode the way of showing havereplaced 201 plasmas show , 3 . from the communication way of CCskeining thread alter for RS422 communication, make but the at most 15developments of communication go to 30; 4 . will the original hard hand inappearance rear hold move the top of table head, so need not take outregulator body can modify various parameters , so, make mechanical partiallylarge easier, overall weight fall to 3 kg from 5 kg. 5 . the modular that letsuser make increase somewhat, reach 86, ( have originally 73 ), have increasedmainly from fixed die piece. User but in in which choose 24 modularcomposition systems, sampling period from original 0 . 2 s ( or 0 . 4 s )quickly go to 0 . 1 s ( or 0 . 2 s ). 6 . have increased the cipher beforemodification parameter, in order to ensure the safety concerning importantparameter.

In a word, from the new a acting regulator that this few annualmarkets put tendency to the market it's develop mainly is , reducewith great efforts

Let hardware and structure as far as possible simple , at thesame time develop software vigorously to make function perfectcontinuously, operating use is facilitated more. For joining barriertrade always agreement rib new situation in near China, whendeveloping and developing new product, deserve the market thatrefers to and is so helpful to participate in quality, function as wellas price to compete.

附录3:英文翻译

一、生产过程自动化的发展概况和趋势

自本世纪30年代以来,自动化技术获得了惊人的成就,已在工业生产和科学发展中起着关键的作用。当前,自动化装置已成为大型设备不可分割的重要组成部分。可以说,如果不配置合适的自动控制系统,大型生产过程是根本无法运行的。实际上,生产过程自动化的程度已成为衡量工业企业现代化水平的一个重要标志。

回顾自动化技术发展的历史,可以看到它与生产过程本身的发展有着密切的联系,是一个从简单形式到复杂形式,从局部自动化到全局自动化,从低级智能到高级智能的发展过程。自动化在工业生产中的作用,大致经历了三个发展阶段。

50年代以前可以归结为自动化发展的第一阶段。在这一时期中,理论基础是用传递函数进行数学描述,以根轨迹法和频率法作为分析和综合系统基本方法的经典控制理论,因而带有明显的依靠手工和经验进行分析和综合的色彩。在设计过程

中,一般是将复杂的生产过程人为地分解为若干个简单过程,最终实现单输入单输出的控制系统。其控制目标也就只能满足于保持生产的平稳和安全,属于局部自动化的范畴。当时,也出现了一些如串级、前馈补偿等十分有效的复杂系统,相应的控制仪表也从基地式发展到单元组合式。但总的说来,自动化水平还处于低级阶段。

60年代的10年,可以认为是工业自动化发展的第二个阶段。50年代末,由于生产过程迅速向着大型化、连续化的方向发展,工业过程的非线性、耦合性和时变性等特点十分突出,原有的简单控制系统已经不能满足要求,自动控制面临着工业生产的严重挑战。幸运的是,为适应空间探索的需要而发展起来的现代控制理论已经产生并已在某些尖端技术领域取得惊人的成就。它以状态空间分析方法为基础,内容包括了以最小二乘法为基础的系统辨识,以极大值原理和动态规划为主要方法的最优控制和以卡尔曼滤波理论为核心的最佳估计等三部分。值得注意的是,现代控制理论在综合和分析系统时,已经从外部现象深入到揭示系统内在的规律性,从局部控制进入到在一定意义下的全局最优,而且在结构上已从单环扩展到适应环、学习环等。可以说,现代控制理论是人们对控制技术在认识上的一次质的飞跃,为实现高水平的自动化奠定了理论基础。与此同时,电子数字计算机的发展与普及为现代控制理论的应用开辟了道路,为实现工业自动化提供了十分重要的技术手段。在60年代中期,已出现了用计算机代替模拟调节器的直接数字控制(Direct Digital Control,DDC)和由计算机确定模拟调节器或DDC回路最优设定值的监督控制(Supervisory Computer

Control,SCC),并有一些成功的报导。60年代初,国外曾试图用一台计算机顶替全部模拟仪表,实现“全盘计算机控制”。在我国,也曾在发电厂和炼油厂进行了计算机控制的实验研究。当时由于电子计算机不但体积大,价格昂贵,而且在可靠性和功能方面还存在不少问题,计算机控制始终停留在试验阶段。此外,现代控制理论与工程实际之间还有很大的差距,这主要是由于生产过程机理复杂,建模困难,性能指标不易确定,控制策略十分缺乏等等,使得现代控制理论一时还难以应用于生产过程。尽管如此,在这一阶段中,无论在现代控制理论的移植应用,还是在计算机引入工业过程方面,都有了良好的开端和尝试。

70年代工业自动化的发展表现出两个明显的特点,它们正是进入第三个阶段的标志。就第一个特点来说,70年代初已开始出现了适合工业自动化的控制计算机商品化系列。由于大规模集成电路制造的成功和微处理器的问世,使计算机的功能丰富多彩,可靠性大为提高,而价格却大幅度下降。尤其是工业用控制机,在采用了冗余技术,软硬件的自诊断功能等措施后,其可靠性已提高到基本上能够满足工业控制要求的程度。值得指出的是,从70年代中期开始,针对工业生产规模大、过程参数和控制回路多的特点,为了满足工业用计算机应具有高度可靠性和灵活性的要求,出现了一种分布式控制系统(DistributedControl Systems,DCS),又称集散系统,它是集计算机技术、控制技术、通讯技术和图形显示等技术于一体的计算机系统,一经问世,就受到工业界的青睐,目前世界上已有60余家公司先后推出各自开发的系统,我国有的单位也在研制自己的集散

系统。这种系统在结构上的分散,即将计算机分布到车间或者装置一级,不仅使系统危险分散,消除了全局性的鼓掌节点,增加了系统的可靠性,而且可以灵活方便地实现各种新型控制规律和算法,便于系统的分批调试和投运。显然,这种分布式系统的出现,为实现高水平的自动化提供了强有力的技术工具,给生产过程自动化发展带来深远的影响,可以说,从70年始,工业生产自动化已进入计算机时代。

第二个特点是控制理论与其他学科相互交叉,互相渗透,向纵深方向发展,报和控制的实例。另外,70年代以来,由于世界范围内出现的能源危机和市场剧烈竞争,工业生产规模更趋庞大,如每个电站的功率已经从20万kW发展到60万、100万kW,石化工业中年产30万吨级甚至更大的乙烯、合成氨等工厂也大批建成。设备的更新换代,较大地提高了生产率。但要进一步提高产量,降低成本,节约原材料和减少能源消耗并非易事,必须在分散控制的基础上,从全局最优的观点出发对整个大系统进行综合协调。国内外已在造纸,冶金和石化系统中开展了这些方面的科研工作。可以说,工业生产实际提出的以优质、高产、低消耗为目标的控制要求,从客观上促进了第三代控制理论的形成和发展。尽管到目前为止,它还处在发展和完善过程中,但已受到极大的重视和关注,取得很大的进展。与此同时,在现代控制理论中,诸如非线性系统、分布参数系统、随机控制以及容错控制等等也在理论上和实践中得到了发展。总之,在这个阶段中,工业自动化正在发生着巨大的变革,它已突破了局部控制的模式,进入到全局控制,既包含了若干子系统的闭环控制,又有大系统协制、最优控制以及

决策管理,即人们称之为控制管理一体化的新模式。它的出现将使工业自动化系统在大量获取生产过程和市场信息的基础上,科学地安排、调度生产,充分发挥设备的生产能力,最终达到优质高产低消耗的控制目标。

从工业自动化发展的进程,可以得到如下结论:

(1)工业自动化的发展与工业生产过程本身的发展有着极为密切的联系。工业生产本身的发展,诸如工艺流程的变革,设备的更新换代,生产规模的不断扩大等促进了自动化的进程,而工业自动化在控制理论和技术工具方面的新成就又保证了现代工业生在安全平稳的前提下进行“卡边”运行,充分发挥设备的潜力,提高生产率,获取最大限度的经济和社会效益。(2)工业自动化已进入计算机时代,进入所谓的计算机集成过程系统(Computer Integrated Production Systems,CIPS)的时代。可是,当前面对琳琅满目的计算机系统,尽管已有许多现成的先进控制理论,却缺乏行之有效的控制方法去满足工业生产不断提出的高要求,因此,加强控制理论与生产实际密切结合,注意引入智能控制、专家系统,逐步形成不同形式的既简单又实用的控制结构和算法,是控制理论工程化的任务,是今后过程控制的主要研究内容。

二、过程控制的任务和要求

工业自动化涉及的范围极广,过程控制是其中最重要的一个分支。它主要针对所谓六大参数,即温度、压力、流量、液位(或物位)、成分和物性等参数的控制问题。它能覆盖许多工业部门,诸如石油、化工、电力、冶金、轻工、纺织等等,因而,过程控制在国民经济中占有极其重要的地位。工业生产对

过程控制的要求是多方面的,最终可以归纳为三项要求,即安全性、经济性和稳定性。安全性是指在整个生产过程中,确保人身和设备的安全,这是最重要的也是最基本的要求。通常是采用参数越限报警、事故报警和联锁保护等措施加以保证。现在,由于工业企业高度连续化和大型化的特点,提出了在线故障预测和诊断,设计容错控制系统等来进一步提高运行的安全性。这里还应特别指出,随着环境污染日趋严重,生态平衡遭到破坏,现代企业必须把符合国家制定的环境保视为生产安全性的重要组成部分。经济性,旨在生产同样质量和数量产品所消耗的能量和原材料最少,也就是要求生产成本低而效率高。近若干年来,随着市场竞争加剧和世界能源的匮乏,经济性已受到过去从未有过的重视。生产过程局部或整体最优化问题已经提上议事日程成为极需解决的迫切任务。最后一项稳定性的要求是指系统具有抑止外部干扰,保持生产过程长期稳定运行的能力。众所周知,工业生产环境不是固定不变的,例如原材料成分改变或供应量不同,反应器中催化剂活性的衰减,换热器传热面沾污,还有市场销售量的起落等等都是客观存在的,它们会或多或少地影响稳定生产。当然,对简单控制系统稳定性的判断方法已很成熟,但对大型、复杂大系统稳定性的分析就困难得多。随着工业生产的发展,为了满足上述三项要求,在理论上和实践上都还有许多课题有待研究。

过程控制的任务就是在了解、掌握工艺流程和生产过程的静态和动态特性的基础上根据上述三项要求,应用理论对控制系统进行分析和综合,最后采用适宜的技术手段加以实现。值得指出的是,为适应当前生产对控制的要求愈来愈高的趋势,

必须充分注意现代控制技术在过程中的应用,其中过程模型化的研究起着举足轻重的作用,因为现代控制技术的应用在很大程度上取决于对过程静态和动态特性认识的深度。因此可以说,过程控制是控制理论、工艺知识、计算机技术和仪器仪表等知识相结合而构成的一门应用科学。在研究探索的实践中,可能形成一门更适合工业过程控制特点的新的控制理论,从而使过程控制迅速提高到一个新的水平,这不是没有道理的。

过程控制的任务是由控制系统的设计和实现来完成的。现在以一个再沸油加热炉的控制实例来加以说明。加热炉的设计和实现有如下步骤:

1.确定控制目标 对于给定的被控过程,可以根据具体情况提出各种不同的控制目标。以加热炉为例,可以有以下几个不同的目标:

(1)在安全运行条件下,保证热油出口温度稳定;

(2)在安全运行条件下,保证热油出口温度和烟气含氧量稳定;

(3)在安全运行条件下,保证热油出口温度稳定,而且加热炉热效率最高。显然,为实现不同的控制目标就应有不同的控制方案。

2.选择测量参数(被调量) 无论采用什么控制方案,都需要通过某些参数的测量来控制和监视整个生产过程。例如在加热炉中,热油出口温度、烟气含氧量、燃料油压力、炉膛负压等等。在确定了需要检测的参数后,就应选择合适的测量元件和变送器。应该注意,有些参数可能因某些原因不能直接测量,则应通过测量与之成一定线性关系的另一参数(又称为间

接参数)来获取,或者利用参数估计的方法来得到。有些控制目标只能通过计算得到,比如加热炉中的热效率就是排烟温度、烟气中含氧量和一氧化碳含量的函数,必须分别测量这些参数并进行综合计算才能得到。蒸馏塔中回流比也属于这一类参数。

3,操作量的选择。一般情况下,操作量都是工艺规定的,在控制系统设计中没有多大选择余地。但是在有多个操作量和被调量的情况下,用哪个操作量去控制哪个被调量还是要认真加以选择的。例如在耦合多变量系统中,必须就操作量和被调量如何配对问题作出抉择。在上述加热炉控制中,以燃油量作为操作量来控制热油出口温度,用烟道挡板改变烟气流量来保证烟气中含氧量,这些是由工艺规定的。但是,如果除了烟道挡板外,设备中还装有炉膛入口处的送风挡板,那么用哪个挡板来调节烟气含氧量还有选择的余地。单回路调节器在电厂自动控制中的应用

基于单回路调节器的特点,我院在安庆石化热电厂三期建工程(50Mw机、630t/h炉)设计中,采用了大连仪表厂引进日立公司的v187MA—E型单回路调节器,作为机组的自动调节设备。自动调节系统举例。(1)热负荷自动调节录统

用单回路调节器构成该调节系统,从工作原理上看类似常规仪表,所不同之处,在于单回路调节器集单元仪表各种组件为一件,彼此软件连接,调用灵活,减少了外部硬件接线。使我们在设计时充分利用其丰富的调节、运算功能来提高其系统调节品质。

(2)送风自动调节系统

该调节回路由一台单回路调节器构成,但实际上却利用了其内部丰富的控制功能,实现了一个串级调节。另外还解决了双执行机构的反馈跟踪,提高了调节品质。(3)手/自动无扰切换

手动/自动无扰切换是任何一个调节系统能否进行正常工作的重要条件。单回路调节器能够很方便池实现这一功能,另外还具有自诊断和逻辑运算功能。利用这些功能,就可以方便池实现常规仪表所没有的调节系统监控保护。我们在设计中考虑了以下三个监控点: ①调节自诊断监控;

②PID调节运算单元测量值PV结定值SP的偏差值监控;②调节器输出和阀位反馈信号的偏差值监控。(4)直接与操作器配套

单回路调节器的面板上有手/自动切换开关和手操按钮,但火电厂的运行习惯,要求自控回路在操作台上应设有直接操作器。为此大连仪表厂为其引进的V187MA—E型调节器专门开发了与之配套的DFD—1000GJ(电动操作器)。本操作器与电动执行器及调节器联接时,可构成显示操作系统,实现手动/自动状态显示、自动跟踪与双向无扰动切换。

PMK可编程调节器是日本富士公司在1983年推出的单回路调节器,属于0.2级调节器代表,实际上能达到0.1级表的标准, (即各模拟量的最大误差小于0.1%模拟量的满量程)。主要性能指标和参数如下:7个DCl一5V模入, 4个DCl一5V模出, 1个DC4—20 mA或DCl一5V模出,许负载阻抗为0—

600欧姆,8个开关量输入和8个开关量输出。控制功能:通过模块的连接(有19个控制模块),实现基本控制(一个PID控制),比率控制(比率运算十PID),串级控制(PID十PID)和程序控制(程存设定十PID)。运算功能有四则运算、开关、脉冲发生、开平方、报警、斜坡函数、温差补正、脉冲宽度计算、超前滞后、绝对值、符号反向、脉冲数计数、滞后时间、线性化、移动、数输出、平均、选择位置脉冲宽度变换、逻辑运算、限幅、模拟平均、计时、死区、模拟计算、触发器、切换、采样保持和译码器等。

给定值设定功能:在不同的控制方式之下,给定值的设定分为定值设定(由手操键入或设定单元设定),遥控设定(设定值通过外部给定的电压量或脉冲宽度给定)和传设定(上位机通过通讯设定)。输出方式:手操(又称软手操,通过上下按钮或快速按钮实现输出值的改变),手操(当调节器离线时担任输出值的调整),自动(输出值受控制规律或上位机决定)。上述几种方式的切换大都是无扰动无平衡的自动切换。

通讯方式:最多可与15台调节器或上位机通过多股复合线按19.2k b/s实现无调制位的串行数据传送,为组成多级分布式系统提供条件。

键盘功能:有一个40键的设定单元,进行数据的显示,修改,固化以及控制运算模块的连接。具有完善的自诊断功能和丰富的报警系统:对于各主要硬件回路和外负载回路进行在线监视,并自动输出报警信息,通过故障键在设定单元上循环显示或后端子故障报警。报警内容可以通过软件配置来指定,如给定值,测量值,测量值变化率,输出值,输出值变化率以及

偏差值的上下限报警。断电冷热启动:

当24V电源低于19V时,系统按断电处理,通过断电保护,使工作数据保起来,在复电时,可以根据断电时间是否超过2min或系统是否允许连续启动(由外部开关定)来决定连续启动或初始启动。

控制方法;在基本的PID基础上,通过软件配置,可以实现比率控制、前馈控制、 选择控制、间歇控制和非线性控制等。富士FC系列仪表目前在我国石化系统普遍使用,它具有可靠性高,性能稳定,操作方便和适应性强的特点,为中国石化总公司推荐产品。1990年10月富士公司推出了新一代的FC超级小型控制器(CC—S,将以前的PMA (固定程序调节器),PMK,PMB(手操器),PMG(比率设定器)等系列均升挡分别为PNAl.、PNA3,PNB3和PNG3。1992年11月刚刚在中国市场出现。其功能最全的PNA3与PMK相比主要改动有:1.由表头上的5个按键和8位数码显示替代了侧面的设定单元,2. 由101段发光二极管显示方式替代了201段的等离子显示,3.由CC绞线的通讯方式改为RS422通讯,使可通讯的最多15台扩展到30台;4.将原来在仪表后部的硬手操移到表头的上方,从而无需抽出调节器本体就可以修改各种参数,从而使机械部分大大简化,整机重量从5kg降到3kg。5.供用户使的模块略有增加,多达86个, (原来有73个),主要增加了自整定模块。用户可在其中选用24个模块组成系统,采样周期从原来的0.2s(或0.4s)加快到0.1s(或0.2s)。6.增加了修改参数之前的密码,以确保有关重要参数的安全。

总之,从这几年市场推出的新一代调节器来看,它的主要发展趋势是,努力降低成本,让硬件和结构尽量简捷,同时大力开发软件使功能不断完善,操作使用更为方便。对于不久中国加入关贸总协议肋新形势,在开发和研制新产品时值得借鉴,这样有利于参与质量,功能以及价格的市场竞争。

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- awee.cn 版权所有 湘ICP备2023022495号-5

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务