一种由线性时不变系统阶跃响应获得M序列信号响应的方法
李玉玲1, 2,尹怡欣1, 2,赵宝永1, 2
(1. 北京科技大学 自动化学院,北京,100083;
2. 北京科技大学 钢铁流程先进控制教育部重点实验室,北京,100083)
摘要:提出一种直接由线性时不变动态系统的阶跃响应信号产生该系统在伪随机二位制信号PRBS-M序列作用下的输出响应信号的方法。该方法通过一种基于线性系统叠加原理的转换算法,将已知的系统阶跃响应直接转换为M序列信号输入下的系统响应,从而避免对实际系统实施M序列信号输入的试验,达到仅通过阶跃响应信号便可为该系统的建模和辨识提供合适的输入和输出数据的目的。最后,通过仿真和实验研究证明该方法的可行性。
关键词:线性时不变系统;阶跃响应;M序列;信号变换
中图分类号:TP11 文献标志码:A 文章编号:1672-7207(2011)S1-0741-04
A method to obtain M sequence response of
linear time invariant system from its step response
LI Yu-ling1, 2, YIN Yi-xin1, 2, ZHAO Bao-yong1, 2
(1. School of Automation and Electrical Engineering, University of Science and Technology Beijing, Beijing 100083, China;
2. Key Laboratory of Advanced Control of Iron and Steel Process (Ministry of Education),
University of Science and Technology Beijing, Beijing 100083, China)
Abstract: A method of obtaining the response of linear time invariant (LTI) system with PRBS-M sequence input from its step response was proposed. The method based on the principle of superposition charactering LTI systems could transform the step response signal of a LTI system directly into the response of the system with M sequence input, and thus avoid designing and conducting an actual experiment aiming to acquire system response with M sequence input. As a result, suitable input-output data for system identification are obtained only by utilizing the system’s step response data. In the end, some simulation studies demonstrate that this method is feasible.
Key words: linear time invariant system; step response; M sequences; signal transformation
线性时不变系统(LTI)的阶跃响应在系统分析和建模中发挥了巨大的作用。利用阶跃响应曲线来确定工业系统模型的经典方法有作图法[1-6]、面积法和积分法[7]等。其中,作图法提出较早;当阶跃响应曲线比较规则时,近似法、切线法、半对数法和两点法都能比较有效地导出传递函数。但这些方法有一定的局限性,且由于当时计算机水平的限制,精确度不高。基于利用阶跃响应辨识系统的过程中所存在的缺陷,人们提出了新的方法,比如最小二乘类辨识方法和非最小二乘类估计方法[8]等。这些方法中,要求系统的试验输入复杂多样并与噪声互不相关。伪随机信号[9]由于具有类似白噪声的互相关特性可作为系统辨识的输入试验信号,并被广泛地用于系统辨识中。尽管伪随机信号具有很多优点,但其产生和处理依然不及阶跃信号简单、方便。同时,针对某些特殊的不适合用M序列进行测试的系统,基于伪随机信号作为输入信号进行辨识的方法将失效。因此,本文作者提出一种新颖的转换方法,可将系统的阶跃响应转化为指定伪随机-M序列输入下的系统输出,使得阶跃响应信号也可作为试验输入用于最小二乘类等系统辨识方法中,为系统的阶跃响应曲线辨识系统提供新思路。
1 PRBS-M序列简介
伪随机信号是一种长周期信号,若观察时间大于一个周期,便是确定性周期信号,并显示出随机性;若观察时间小于一个周期,便是真实的随机二进制信号。在系统辨识中,用到的是伪随机信号的随机 性[9-10]。
M序列作为伪随机信号中的代表,在系统辨识中应用最为广泛。M序列是由n级移位寄存器产生的周期最长的序列。这种序列必须由非线性移位寄存器产生,包括由“0”或“1”组成,除了全为“0”的n种状态的所有组合,其长度N=2n-1。若移位时钟脉冲为?t,则M序列的周期为T=N?t。在系统辨识中,通常采用信号电平对称的M序列,即将由移位寄存器产生的M序列通过电平转移把“1”转换为正电平(“+a”),而把“0”转换为低电平(“-a”)。该伪随机信号具有理想的自相关特性:自相关函数为三角脉冲,类似于白噪声信号的自相关函数[11-12](即δ函数)。
2 线性时不变系统的阶跃响应与PRBS-M序列输入下的系统响应的转换方法
LTI系统的阶跃响应变换为PRBS-M序列输入下的系统响应的原理是:由于PRBS-M序列可以由若干个不同起始点阶跃信号叠加而成,则根据线性时不变系统的叠加原理,系统在PRBS-M序列输入下的响应信号也将由不同时刻的系统在阶跃输入下的输出响应信号的叠加,即当系统输入为M序列时,相当于系统在不同时刻施加阶跃信号作为输入,由此产生的系统输出为这些阶跃信号所产生的输出响应(包括零输入响应和零状态响应)的叠加。该过程如图1所示。
2.1 电平对称的PRBS-M序列的等价定义
尽管PRBS-M序列的产生通常是由n级移位寄存器产生的,但是根据线性信号的合成和叠加原理,并由文献[13]中的定理1和定理2可知, PRBS-M序列也可由若干个不同起始点阶跃信号叠加而成。考虑到系统辨识中电平对称PRBS-M序列的应用需求,不失一般性,这里仅介绍电平对称的PRBS-M序列的等价定义。
图1 转换原理图
Fig.1 Schematic diagram of transformation
假设有n级电平对称的M序列m:
(1)
式中:m1,m2,…,ml仅为a和-a,a>0为M序列的幅值。定义集合:A={k|mk≠mk+1,k{1,2,…,2n-1}}。则根据线性信号的加法,可以用阶跃函数定义该M序列如下:
,k≤2n-1 (2)
式中:1(k)表示阶跃信号。
2.2 M序列输入下的系统响应输出
根据式(2)可知:当系统输入为M序列时,系统相当于在不同时刻输入多个阶跃信号。这些阶跃信号的施加时刻,取决于M序列的电平变化时刻。
假设si表示线性系统在t=i时刻输入幅值为a的阶跃信号下的输出响应信号,gi表示线性系统在t=i时刻的单位阶跃响应。当i=0时,g0=s0/a。根据LTI系统的叠加性质,在LTI系统的输入——M序列符号跳变的时刻(此时t=i(iA)),则相当于该时刻在原来的基础上系统的输入“加上”一个与上一个输入信号符号相反的阶跃信号(a·1(k)))。在该信号的激励下,LTI系统将相应地产生一个输出si,即系统的输出在原来的基础上反向“加”2个新的输出si,用数学表达式表示如下:
(3)
由于除0时刻外系统的状态均不为0,则si为系统在i时刻由“新”的阶跃输入所产生的全响应,包括零状态响应和零输入响应,亦即
(4)
式中:zi为系统在t=i时的零输入响应;agi为系统在t=i时的零状态响应,即系统的阶跃响应,且gi=g0为系统的单位阶跃响应。
但实际上,zi作为系统对内部条件的响应[11],已经包含在i时刻之前所加的输入所产生的系统响应中,甚至当第1个阶跃信号施加于系统上时,zi便产生了,即zi是g0中的一部分。
根据以上讨论,则式(3)应修正为
(5)
通常,可以直接通过阶跃响应测试得到系统的阶跃响应g0,并在计算机上编写简单的程序来得到M序列码,根据式(5),则可以由系统的阶跃响应得到其在M序列输入下的系统输出,从而省去了用移位寄存器产生M序列直接进行系统试验的过程。通过转换得到的数据可以直接用于最小二乘类等系统辨识方法中进行线性系统的辨识和参数估计。
3 实验仿真
本文设计2个实验验证本文方法的有效性。
(1) 直接在matlab中进行仿真实验验证转换效果。已知LTID系统:
(6)
系统的阶跃响应和M序列输入试验下系统的响应曲线如图2(a)所示。根据图2(a)中的阶跃响应曲线进行式(5)的转换,得到系统响应曲线及其与直接进行M序列试验得到的输出进行比较的误差曲线如图2(b)所示。从图2(b)可见,通过转换程序得到的响应曲线与实际试验得到的响应曲线完全重合,误差几乎为0,拟合程度非常高。
(2) 通过转换的方法对实际系统进行辨识。通过西安唐都科教仪器公司研发的TD-ACC+自动控制原理及计算机控制教学实验系统搭建一个三阶系统,其传递函数为
(7)
取采样周期T=0.1,得到系统的脉冲传递函数为:
(8)
图2 基于系统阶跃响应曲线转换产生M序列输入下系统响应曲线的示意图
Fig.2 System response curve generated by transformation of step response
模型矢量A=[-2.687 4 2.431 7 -0.740 8],B=[0.132 5 -0.168 5 0.046 3]。
现场试验可获得系统的阶跃响应数据ystep,但由于教学实验系统的实验箱只能产生方波和正弦信号作为输入信号,无法产生PRBS信号,因此要对实验所得的输入、输出数据进行变换。通过matlab产生M序列码uM并根据该M序列和从实际系统得到的阶跃响应数据ystep按照本文的方法进行转换,得到在uM输入下的系统输出信号ytransfer。最后,利用matlab系统辨识工具箱内的辨识算法进行辨识,得到辨识的系统脉冲传递函数为:
(9)
比较式(8)和式(9),结果如表1所示。可见:辨识结果非常理想,证明了阶跃响应信号通过信号变换转换成系统在M序列输入下的输出信号这种方法的有效性和可行性。
表1 辨识模型与实际模型的比较
Table 1 Comparison of identification model and actual model
4 结论
本文的方法可对线性时不变系统的阶跃响应信号进行变换,得到该系统在M序列输入下的系统响应信号。通过此方法,可以使得一些不适合用M序列进行试验的系统依然能够得到其M序列响应,从而避免了对实际系统实施M序列信号输入的试验,达到了仅通过阶跃响应信号便可为该系统的建模和辨识提供合适的输入和输出数据的目的。本方法使得阶跃响应信号能够用于最小二乘类等系统辨识方法中,为通过LTI系统的阶跃响应曲线来进行系统辨识提供了新方法。
参考文献:
[1] 关中玉, 马亚鹏. 二维搜索法处理对象阶跃响应曲线的研究[J]. 控制工程, 2006, 13(S0): 11-13.
GUAN Zhong-yu, MA Ya-peng. New method for confirming the object feature parameter[J]. Control Engineering of China, 2006, 13(S0): 11-13.
[2] 张伟伟, 余岳峰, 罗永浩, 等. 基于阶跃响应曲线拟合的链条锅炉快速建模方法[J]. 工业锅炉, 2007(2): 1-4.
ZHANG Wei-wei, YU Yue-feng, LUO Yong-hao, et al. A fast modeling for chain grate stoker based on step response curve[J]. Industrial Boiler, 2007(2): 1-4.
[3] 蔡启仲, 罗文广, 崔惠柳, 等. 线性系统阶跃响应特性参数的求取与图形[J]. 广西工学院学报, 1998, 9(2): 38-41.
CAI Qi-zhong, LUO Wen-guang, CUI Hui-liu, et al. Graph and parameters evaluating of linear systems step response[J]. Journal of Guangxi Institute of Technology, 1998, 9(2): 38-41.
[4] 宋志安, 王文馨. 由阶跃响应曲线辨识传递函数的图解方法[J]. 山东科技大学学报: 自然科学版, 2003, 22(1): 61-63.
SONG Zhi-an, WANG Wen-xin. Diagrammatic method of transfer function identified by step-up response curves[J]. Journal of Shandong University of Science and Technology: Natural Science, 2003, 22(1): 61-63.
[5] 谢越宁, 徐嗣鑫. 由阶跃响应曲线确定工程对象的典型传递函数[J]. 南京工学院学报, 1988, 18(6): 102-108.
XIE Yue-ning, XU Si-xin. A method for determining the typical transfer function[J]. Journal of Nanjing Institute of Technology, 1988, 18(6): 102-108.
[6] 李旭. 线性系统阶跃响应辨识法[J]. 信息与控制, 1983(5): 10-17.
LI Xu. A newmethod for designing observes[J]. Information and Control, 1983(5): 10-17.
[7] 李农庄, 候国莲, 杨人坚. 由阶跃响应求传递函数的一种数值方法[J]. 北京动力经济学院学报, 1993(2): 68-72.
LI Nong-zhuang, HOU Guo-lian, YANG Ren-jian. A method for composing the transfer-functions by using the step responds[J]. Journal of Beijing Power Engineering Economics Institute, 1993(2): 68-72.
[8] O’Connell R A. Simple recursive processes for determining Laplace and Z transforms of the zero-input responses of linear time-invariant systems[J]. Education, IEEE Transactions on, 2002, 45(2): 168-170.
[9] 李白勇. 伪随机信号及相关辨识[M]. 北京: 科学出版社, 1987.
LI Bai-yong. Pseudo-random signal and related identification[M]. Beijing: Science Press, 1987.
[10] 姚莉, 赵均, 钱积新. 一种用于辨识MIMO系统的PRBS信号设计方法[J]. 江南大学学报: 自然科学版, 2007, 6(4): 424-427.
YAO Li, ZHAO Jun, QIAN Ji-xin. An optimized design approach of multi-prbs signals for MIMO system identification[J]. Journal of Jiangnan University: Natural Science Edition, 2007, 6(4): 424-427.
[11] Lathi B P. Linear systems and signals[M]. Oxford: Oxford University Press, 2004.
[12] 吴大正, 杨林耀, 等. 信号与线性系统分析[M]. 4版. 北京: 高等教育出版社, 2005.
WU Da-zheng, YANG Lin-yao, et al. Signal and linear system analysis[M]. 4th ed. Beijing: Higher Education Press, 2005.
[13] 李杰, 葛善虎, 丁宣浩. 阶跃函数在信号分析中的应用[J]. 桂林电子工业学院学报, 2005, 25(5): 61-65.
LI Jie, GE Shan-hu, DING Xuan-hao. The application of step signal in signal analysis[J]. Journal of Guilin University of Electronic Technology, 2005, 25(5): 61-65.
(编辑 杨华)
收稿日期:2011-04-15;修回日期:2011-06-15
基金项目:北京市教委重点学科基金资助项目(XK100080537)
通信作者:李玉玲(1987-),女,湖南衡阳人,博士研究生,从事非线性系统控制、系统辨识研究;电话:13488791932;E-mail:leize@yahoo.cn