您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 交通运输 > 相关函数-最小二乘法参数估计北工商
《系统辨识》上机实验报告北京工商大学《系统辨识》课程上机实验报告(2014年秋季学期)专业名称:控制工程上机题目:相关函数-最小二乘法参数估计专业班级:计研班学生姓名:学号:指导教师:刘、刘2015年1月《系统辨识》上机实验报告目录1实验目的...............................................................................................12实验原理...............................................................................................12.1COR-LS法的思路和算法............................................................................12.2COR-LS法的计算步骤................................................................................22.3COR-LS法的特点........................................................................................33实验内容...............................................................................................34仿真结果...............................................................................................35总结......................................................................................................56附录......................................................................................................66.1仿真程序....................................................................................................6《系统辨识》上机实验报告11实验目的1.利用相关函数-最小二乘结合法进行参数估计2.运用MATLAB编程,掌握算法实现方法2实验原理第一步,利用相关函数对数据进行一次相关分析,滤去有色噪声的影响,获得被辨识对象的非参数模型——脉冲响应(或相关函数);第二步,利用最小二乘法进一步估计模型的参数。因此,这种方法又称二步法。在辨识中,输入信号既可以是白噪声、伪随机二位式信号,也可以是有色噪声。实践证明,这种辨识方法效果非常好。2.1Cor-Ls法的思路和算法离散随机序列uk和yk(平稳遍历)有:101()()()NuuNkRukukNLim(1)101()()()NuynkRukykNLim(2)考虑过程:1111nnykaykayknbukbuknek(3)设uk和yk不相关,即 0ueR,将式(3)左右两边同乘以()uk,有11()()()()()()11nnukykaukykaukyknbukukbukuknukek(4)令0,,1kN,共得N个等式,将N个等式相加并除以N,得出:《系统辨识》上机实验报告211()()()()()()11uyuynuyuunuuRaRaRnbRbRnh(5)如果从样本数据计算出1,..,0,1,,nL,共L组相关函数,由式(5)得出L个由*uyR()和*uuR()组成的方程组:11(1)(0)(1)(0)(1)(2)(1)(2)(1)(2)*()(1)()(1)()uyuyuyuuuuuyuyuyuuuunuyuyuyuuuunRRRnRRnaRRRnRRnabRLRLRLnRLRLnb(1)()hhL(6)上式可表达成如下矩阵形式:LLLgRh(7)上式与最小二乘的NNNNy相似,故用LS法可得出参数估计为:1TTLLLLRRRg(8)为保证TLLRR满秩,要求2Ln。2.2Cor-Ls法的计算步骤1.由uk和yk用式(1)和式(2)计算出uyR()和uuR(),1,..,0,1,,nL,可由维纳——何甫方程可得出g(),1()()()LuyuuRgR(9)2.由式下面三个式子估计出。)()1()1()1()()1(^*^^^NNqNRNLNNTym《系统辨识》上机实验报告3)1()1()1(1)1()1()1(^*^*^*NqNPNqNqNPNLT)()1()1()1(^*NPNqNLINPT2.3Cor-Ls法的特点1、只要求{}k是与uk不相关的零均值平稳噪声,则{}k不影响辨识结果,并不要求{}k为白噪声。2、该方法能同时获得非参数模型gt和参数模型。3、计算量不太大,乐于为工程界采用。3实验内容该方法把辨识分成两步进行:第一步,利用相关函数对数据进行一次相关分析,滤去有色噪声的影响,获得被辨识对象的非参数模型脉冲响应(或相关函数);第二步,利用最小二乘法进一步估计模型的参数。因此,相关函数与最小二乘相结合的方法又称二步法。在辨识中,输入信号既可以是白噪声、伪随机二位式信号,也可以是有色噪声。1、熟悉相关函数最小二乘法进行参数估计的基本原理。2、按附表10-11、表10-12给出的二阶线性离散系统的输入输出数据,用相关函数最小二乘法进行参数估计。对任务进行方案设计,画出实验流程图,用MATLAB编程实现。撰写实验报告。4仿真结果利用Matlab仿真,模型输入输出数据离散点如下图所示:《系统辨识》上机实验报告44.1输入数据图4.2输出数据图《系统辨识》上机实验报告5模型参数的收敛值,如下图所示:模型参数的辨识结果为:a1a2b1b23.1014-0.45961.96616.1567由仿真结果可知,系统最终基本趋于收敛。如果数据序列能够再长一点,仿真的收敛效果会更好。仿真结果表明,Cor-Ls法可以实现系统参数的辨识。5总结本文首先给出了相关函数—最小二乘(Cor-Ls)法的相关理论和算法,明确了计算步骤以及该方法在系统辨识方面的优点和特点。本文基于该方法利用表10-11的数据辨识出了二阶离散线性系统的模型参数,并给出了仿真实验。仿真结果表明,该方法能够辨识出模型参数,且计算量小,易于工程实现。实践结果表明,一般情况下,相关函数—最小二乘相结合辨识方法(二步法)的辨识效《系统辨识》上机实验报告6果相当好,因此这种方法得到了广泛的应用。但是应当指出,当输出噪信比较大时,这种方法的辨识效果明显下降。这是因为噪声比较大时,模型中的噪声项不一定是白噪声的缘故。这种情况下,建议采用相关函数法与辅助变量法、广义最小二乘法等相结合组成相应的二步法。6附录6.1仿真程序clcclearcloseallu=[1.147,0.201,-0.787,-1.584-1.052,0.866,1.152,1.573,0.626,0.433...-0.958,0.810,-0.044,0.947,-1.474,-0.719,-0.086,1.099,1.450,1.151...0.485,1.633,0.043,1.326,1.706,-0.340,0.890,0.433,-1.177,-0.390...-0.982,1.435,-0.119,-0.769,-0.899,0.882,-1.008,-0.844,0.628,-0.679...1.541,1.375,-0.984,-0.582,1.609,0.090,-0.813,-0.428,-0.848,-0.410...0.048,-1.099,-1.108,0.259,-1.627,-0.528,0.203,1.204,1.691,-1.235...-1.228,-1.267,0.309,0.043,0.043,1.461,1.585,0.552,-0.601,-0.319...0.7440.829,-1.626,-0.127,-1.578,-0.822,1.469,-0.379,-0.212,0.178...0.493-0.056,-0.1294,1.228,-1.606,-0.382,-0.229,0.313,-0.161,-0.810...-0.2770.983,-0.288,0.846,1.325,0.723,0.713,0.6430.463,0.786...1.161,0.850,-1.349,-0.596,1.512,0.795,-0.713,0.453,-1.604,0.889...-0.938,0.056,0.829,-0.981,-1.232,1.327,-0.681,0.114,-1.135,1.284...-1.2010.758,0.590,-1.007,0.390,0.836,-1.52,-1.053,-0.083,0.619...0.840-1.258,-0.354,0.629,-0.242,1.680,-1.236,-0.803,0.537,《系统辨识》上机实验报告7-1.100...1.417,-1.024,0.671,0.688,-0.123,-0.952,0.232,-0.793,-1.138,1.154...0.206,1.196,1.013,1.518,-0.553,-0.987,0.167,-1.445,0.630,1.255...0.311,-1.726,0.975,1.718,1.360,1.667,1.111,1.018,0.078,-1.665...-0.760,1.184,-0.614,0.994,-0.089,0.947,1.706,-0.395,1.222,-1.351...0.231,1.425,0.114,-0.689,-0.704,1.070,0.262,1.610,1.489,-1.602...0.020,-0.601,-0.020,-0.601,-0.235,1.245,1.226,-0.204,0.926,-1.297];y=[0.086,2.210,0.486,-1.812,-3.705,-2.688,1.577,2.883,2.883,3.705,1.642,0.805,-2.088,0.946,-0.039,1.984,-2.545,-1.727,-0.231,2.440,3.583,2.915,1.443,3.598,0.702,2.638,3.611,-0.168,1.732,0.666,2.377,-0.554,-2.088,2.698,0.189,-1.633,-2.010,1.716,-1.641,-1.885,1.061,-0.968,2.911,3.088,-1.629,-1.533,3.030,0.614,
本文标题:相关函数-最小二乘法参数估计北工商
链接地址:https://www.777doc.com/doc-2171823 .html