Riccasim.m
资源名称:power.rar [点击查看]
上传用户:eighthdate
上传日期:2014-05-24
资源大小:270k
文件大小:0k
源码类别:
其他行业
开发平台:
Matlab
- function [pdot] = riccasim(t,p)
- % Hadi Saadat, 1998
- % This function obtains the numerical solution of the time-domain Riccati
- % equation with the boundary condition specified at final time.
- global A B Q R t0 tf x0
- [A,B,Q,R,t0,tf,x0]=system(A,B,Q,R,t0,tf,x0);
- n=length(A); nsq=n*n;
- s=reshape(p,n,n)';
- r=inv(R);
- sdot=[s*A+A'*s+Q-s*B*r*B'*s];
- pdot=reshape(sdot',1,nsq);
- pdot=pdot';