硕士学位论文(工程硕士)全自动化学发光分析仪加样控制系统的设计与实现DesignandImplementationoftheSamplingControlSystemofTheAutomatedChemiluminescenceImmunoassayAnalyzer何燕平哈尔滨工业大学2012年6月国内图书分类号:TP391.8学校代码:10213国际图书分类号:621.3密级:公开工程硕士学位论文全自动化学发光分析仪加样控制系统的设计与实现硕士研究生:何燕平导师:夏勇副教授副导师:杨友谊高级工程师申请学位:工程硕士学科:软件工程所在单位:软件学院答辩日期:2012年6月授予学位单位:哈尔滨工业大学ClassifiedIndex:TP391.8U.D.C:621.3DissertationfortheMaster’sDegreeinEngineeringDesignandImplementationoftheSamplingControlSystemofTheAutomatedChemiluminescenceImmunoassayAnalyzerCandidate:HeYanpingSupervisor:AssociateProf.XiaYongAssociateSupervisor:SE.YangYouyiAcademicDegreeAppliedfor:MasterofEngineeringSpeciality:SoftwareEngineeringAffiliation:HarbinInstituteofTechnologyatWeihaiDateofDefence:June,2012Degree-Conferring-Institution:HarbinInstituteofTechnology哈尔滨工业大学工程硕士学位论文-I-摘要全自动化学发光免疫分析仪可以通过血清样本,通过自动化的添加样本、添加试剂、添加磁珠、孵育、磁分离以及清洗、最后加发光底物,测量发光光强的方法进行免疫分析,在临床诊断中具有很重要的作用。但目前,国内使用的全自动化学发光免疫分析仪都是国外的产品。因此研制具有自主产权的该类产品具有很高的研究价值。其中全自动化学发光免疫分析仪加样控制系统的设计是非常关键的,在保证高速加样的前提下,要确保系统的可靠性和准确性以及稳定性。针对分析仪对加样控制系统有较高的控制需求,分析系统主要的被控对象——左、右加样臂,设计了以TMS320F2812数字信号处理器为核心的加样控制系统。硬件系统主要由核心控制板和电机驱动板构成。核心板以TMS320F2812和CPLD为主体,实现两个独立三轴的加样运动控制。驱动板实现电机信号的驱动以及其他信号的隔离等辅助功能。加样控制系统通过控制器局域网络(CAN)与上位机通讯,接收上位机的加样命令,分析并执行加样动作。加样控制系统的主控软件采用结构化程序设计,主要由加样控制程序、CAN通讯子程序、加样泵控制子程序、FLASH读写子程序等模块构成。加样控制程序采用位置环和速度环双闭环的PID算法,在加样动作高速完成的前提下保证了定位精度和运动的平滑性。加样控制程序通过参数化设计,可以根据不同的仪器以及不同的控制要求,修改相应的控制参数,来满足用户需求。全自动化学发光分析仪加样控制系统经过软件测试及实际测试,响应速度快、定位精度高、加样精度准确,可靠性以及稳定性良好,达到了项目预期的技术指标。关键词:数字信号处理器;PID控制算法;控制器局域网络;结构化程序设计;软件测试哈尔滨工业大学工程硕士学位论文-II-AbstractThecommonanalysisprocessoftheautomatedchemiluminescenceimmunoassayanalyzercouldfirstautomaticallyaddthepatient'sserumsamplestothereactioncups,thenreagents,beads,afteraperiodofincubatingandaddingmagneticseparationandwashing,andfinallywithalight-emittingsubstratemeasuretheluminousintensityimmunoassay.Throughtheformerprocessesthemachinewillgivetheresult,whichplaysanimportantroleindiagnosis.However,thiskindofimmunoassayanalyzerusedinourcountrycurrentlyarealmostforeignproducts.Therefore,thedevelopmentofsuchproductswithself-producingpropertyhasanimportantresearchvalue.Automaticchemiluminescenceimmunoassayanalyzersamplingcontrolsystemiscriticalinthissystemwhichensurestheanalysisresult,systemreliabilityandstability.Consideringthecharacteristicofleftsamplingarmandrightsamplingarm,thispaperdesignedasamplingcontrolsystemusingTMS320F2812,akindofDSP,asthemaincontrollerinaccordancewiththehighdemandofcontrolprecisionandmovingspeedofthesamplingcontrolsystem.Thehardwaresystemiscomposedwiththemasterelectricboardandthemotordrivingboard.AmongthemthemasterelectriccontrolboardusesTMS320F2812andCPLDasmaincontrolchipstorealizetwoindependentthree-axis-likemovementcontrolcircuit.MoreoverthedrivingboardrealizedtheauxiliaryfunctionssuchasthemotorsignaldrivingandcommonIOsignalsisolating.SamplecontrolsystemusesCANbustocommunicatingwiththehostcomputer,andthenreceivesacommandfromPCwhichanalyzesandexecutesthecorrespondingsampleactions.Usingstructuredprogramming,thesoftwareofsamplemastercontrolsystemcomposewiththesamplingactionsubroutine,theCANcommunicationsubroutine,thesamplepumpcontrolsubroutine,andtheFLASHreadingandwritingsubroutines.ThesamplecontrolprogramusesdualclosedloopPIDcontrolalgorithm--thepositionloopandspeedloop,whichensuresthesamplingaccuracyandmovementsmoothnessunderthepremiseofmeasuringandhigh-speedactions.Samplingcontrolprogramappliesparametricdesignstoadopttovariousinstrumentsandcontrolrequirements.Theappropriatecontrolparameterscanalsobemodifiedbyuser,whichbringsbetterflexibility.Throughalongperiodsoftwaretestingandactualtestinginhospital,theautomaticchemicalluminescenceanalyzersamplingcontrolsystemshowedtheadvantageoffastresponse,highpositioningaccuracy,highprecision,goodreliabilityandstability.Keywords:DigitalSignalProcessing,Proportional–integral–derivativecontrolalgorithm,ControllerAreaNetwork,Structuredprogramming,Softwaretesting哈尔滨工业大学工程硕士学位论文-III-目录摘要..................................................................................................................................IAbstract...............................................................................................................................II第1章绪论...................................................................................................................11.1课题来源及研究目的和意义..................................................................................11.2国内外研究现状......................................................................................................21.2.1化学发光免疫分析设备...................................................................................21.2.2多轴定位控制系统...........................................................................................21.3系统所采用的主要技术手段...................................................................................31.3.1基于TMS320F2812的控制系统设计..............................................................31.3.2双闭环的数字PID定位控制算法...................................................................41.3.3基于CAN总线的通讯控制..........