加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

initial的用法

(2010-10-19 15:51:28)
标签:

initial

杂谈

分类: matlab

initial - Initial condition response of state-space model

Syntax

initial
initial(sys,x0)
initial(sys,x0,t)

Description

initial calculates the unforced response of a state-space model with an initial condition on the states.

http://www.mathworks.com/help/toolbox/control/ref/eqn1255716189.gif

This function is applicable to either continuous- or discrete-time models. When invoked without left-side arguments, initial plots the initial condition response on the screen.

initial(sys,x0) plots the response of sys to an initial condition x0 on the states. sys can be any state-space model (continuous or discrete, SISO or MIMO, with or without inputs). The duration of simulation is determined automatically to reflect adequately the response transients.

initial(sys,x0,t) explicitly sets the simulation horizon. You can specify either a final time t = Tfinal (in seconds), or a vector of evenly spaced time samples of the form

t = 0:dt:Tfinal

For discrete systems, the spacing dt should match the sample period. For continuous systems, dt becomes the sample time of the discretized simulation model (see impulse), so make sure to choose dt small enough to capture transient phenomena.

To plot the initial condition responses of several LTI models on a single figure, use

initial(sys1,sys2,...,sysN,x0) 
initial(sys1,sys2,...,sysN,x0,t) 

(see impulse for details).

When invoked with left-side arguments,

[y,t,x] = initial(sys,x0)
[y,t,x] = initial(sys,x0,t)

return the output response y, the time vector t used for simulation, and the state trajectories x. No plot is drawn on the screen. The array y has as many rows as time samples (length of t) and as many columns as outputs. Similarly, x has length(t) rows and as many columns as states.

Remarks

You can change the properties of your plot, for example the units. For information on the ways to change properties of your plots, see Ways to Customize Plots.

Example

Plot the response of the state-space model

http://www.mathworks.com/help/toolbox/control/ref/eqn1255716302.gif

to the initial condition

http://www.mathworks.com/help/toolbox/control/ref/eqn1255716659.gif

a = [-0.5572   -0.7814;0.7814  0];
c = [1.9691  6.4493];
x0 = [1 ; 0]

sys = ss(a,[],c,[]);
initial(sys,x0)

http://www.mathworks.com/help/toolbox/control/ref/initial.html

0

阅读 收藏 喜欢 打印举报/Report
前一篇:小小哈皮
后一篇:tfd2step
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有