辽宁科技大学本科生毕业设计第1页基于LQR的二级倒立摆控制系统研究摘要倒立摆系统是一个典型的多变量、非线性、强耦合和快速运动的高阶不稳定系统,它是检验各种新的控制理论和方法有效性的典型理想模型。在其控制过程中,能有效地反映诸如镇定性、鲁棒性、随动性以及跟踪等许多关键问题。本文主要研究二级倒立摆LQR控制方法。首先建立了二级倒立摆的数学模型,然后对二级倒立摆的数学模型进行控制设计,应用遗传算法确定系统性能指标函数中的加权阵Q,R得到系统状态反馈控制矩阵。最后,用MATLAB进行了系统仿真。在几次凑试Q矩阵值后系统的响应结果都不尽如人意,于是采用遗传算法对Q矩阵优化。仿真结果证明:经过遗传算法优化后的系统响应能更加满足设计要求。关键词:二级倒立摆;LQR控制;遗传算法辽宁科技大学本科生毕业设计第2页ResearchondoubleinvertedpendulumcontrolsystembasedonLQRABSTRACTTheinvertedpendulumisatypicalhighordersystem,withmulti-variable,non-linear,strong-coupling,fleetandabsolutelyinstable.Itisrepresentativeasanidealmodeltoprovenewcontroltheoryandtechniques.Duringthecontrolprocess,pendulumcaneffectivelyreflectmanykeyproblemssuchasequanimity,robust,follow-upandtrack,therefore.ThispaperstudiesacontrolmethodofdoubleinvertedpendulumLQR.Firstofall,themathematicalmodelofthedoubleinvertedpendulumisestablished,thenmakeacontroldesigntodoubleinvertedpendulumonthemathematicalmodel,anddeterminethesystemperformanceindexweightmatrixQ,Rbyusinggeneticalgorithminordertoattainthesystemstatefeedbackcontrolmatrix.Finally,thesimulationofthesystemismadebyMATLAB.AfterseveraltestmatrixQvaluetheresultsarenotsatisfactoryresponse,thenweoptimizeQmatrixbyusingGeneticAlgorithm.Simulationresultsshow:ThesystemresponsecanmeetthedesignrequirementseffectivelyafterGeneticAlgorithmoptimization.Keywords:Doubleinvertedpendulum;LQRcontrol;GeneticAlgorithm.辽宁科技大学本科生毕业设计第3页目录摘要..................................................................................................................................................................1ABSTRACT...................................................................................................................................................21绪论.................................................................................................................................................................51.1引言...........................................................................................................................................................51.2倒立摆设备简介...................................................................................................................................51.3倒立摆系统简介...................................................................................................................................71.4国内外研究情况....................................................................................................................................91.5论文的主要内容..................................................................................................................................122数学模型的建立和分析...................................................................................................................132.1数学建模的方法...................................................................................................................................132.2二级倒立摆的结构和工作原理.....................................................................................................132.3拉格朗日运动方程.............................................................................................................................142.4推导建立数学模型.............................................................................................................................152.5二级倒立摆系统性能分析..............................................................................................................212.5.1稳定性分析...................................................................................................................................212.5.2能控性能观性分析....................................................................................................................213线性二次最优控制算法简介.......................................................................................................233.1线性二次型最优调节器原理..........................................................................................................233.2加权阵Q、R的选择........................................................................................................................254遗传算法...................................................................................................................................................26辽宁科技大学本科生毕业设计第4页4.1遗传算法的基本理论.......................................................................................................................264.2基本遗传算法.....................................................................................................................................274.3基本遗传算法的局限性...................................................................................................................274.4遗传算法的求解步骤........................................................................................................................284.5遗传算法的特点..................................................................................................................................294.7遗传算法优化加权阵....................................................................................