怎么用step把2个系统的阶跃信号联系起来?
下面是STEP的帮助说明:step response of LTI system
Syntax
step(sys)
step(sys,t)
step(sys1,sys2,...,sysN)
step(sys1,sys2,...,sysN,t)
step(sys1,'PlotStyle1',...,sysN,'PlotStyleN')
= step(sys)
Description
step calculates the unit step response of a linear system. Zero initial state is assumed in the state-space case. When invoked with no output arguments, this function plots the step response on the screen.
step(sys) plots the step response of an arbitrary LTI model sys. This model can be continuous or discrete, and SISO or MIMO. The step response of multi-input systems is the collection of step responses for each input channel. The duration of simulation is determined automatically based on the system poles and zeros.
step(sys,t) sets the simulation horizon explicitly. 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 "Algorithm"), so make sure to choose dt small enough to capture transient phenomena.
To plot the step responses of several LTI models sys1,..., sysN on a single figure, use
step(sys1,sys2,...,sysN)
step(sys1,sys2,...,sysN,t)
All systems must have the same number of inputs and outputs but may otherwise be a mix of continuous- and discrete-time systems. This syntax is useful to compare the step responses of multiple systems.
You can also specify a distinctive color, linestyle, and/or marker for each system. For example,
step(sys1,'y:',sys2,'g--')
plots the step response of sys1 with a dotted yellow line and the step response of sys2 with a green dashed line.
When invoked with output arguments,
= step(sys)
= step(sys) % for state-space models only
y = step(sys,t)
return the output response y, the time vector t used for simulation, and the state trajectories x (for state-space models only). No plot is drawn on the screen. For single-input systems, y has as many rows as time samples (length of t), and as many columns as outputs. In the multi-input case, the step responses of each input channel are stacked up along the third dimension of y. The dimensions of y are then
and y(:,:,j) gives the response to a unit step command injected in the jth input channel. Similarly, the dimensions of x are
我设计的系统在内环有个阶跃干扰。
我是先求的不加干扰时的输出:
内环设计(不加干扰时)
g1=tf(0.01,); %电机传递函数
>> g2=tf(,1);%PD控制器
>> g3=tf(1,);%积分环节
>> g4=tf(15000,); %机械系统传递函数
>> g5=feedback(g1*g2,1);%内环闭环传递函数(不加干扰时)
>> g6=g5*g3*g4;%外环开环传递函数(不加干扰时)
>> g7=feedback(g6,1);%外环闭环传递函数(不加干扰时)
>> step(g7)
>> bode(g6)
>> margin(g6)
在设计只有干扰时的
内环设计(单独加干扰时)
g1=tf(0.01,); %电机传递函数
g2=tf(,1); %PD控制器
g3=tf(1,); %积分环节
g4=tf(15000,); %机械系统传递函数
g5=feedback(g1,g2); %内环闭环传递函数(单独加干扰时)
g6=g5*g3*g4; %外环开环传递函数(单独加干扰时)
g7=feedback(g6,g2); %外环闭环传递函数(单独加干扰时)
step(g7)
bode(g6)
margin(g6)
现在的问题时,我要将这2部分叠加起来。用STEP这个函数。
不知道怎么做?
页:
[1]