How to find step response for variable transfer function?
2 次查看(过去 30 天)
显示 更早的评论
the coefficients of a transfer function are varying, how to find the step response to all the possible transfer functions. transfer function :
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/153064/image.png)
step response:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/153065/image.png)
the above figure shows the varying transfer function and step response. I don't know how to get the step response shown in the above diagram for the varying system given. In matlab simulink.
0 个评论
回答(1 个)
Sebastian Castro
2016-1-6
Well, first off let's do this with an individual parameter.
% Parameters
K = 1;
T = 1;
L = 1;
% Create the system
s = tf('s');
sys = (K/(T*s + 1))*exp(-L*s)
% Step response
step(sys)
You can instead place this in a big loop for different parameter values. For example:
% Parameters
K = [0.5,1.0,1.5];
T = [0.5,1.0,1.5];
L = [0.5,1.0,1.5];
% Initialize the loop counter
count = 1;
for ii = 1:numel(K)
for jj = 1:numel(T)
for kk = 1:numel(L)
% Create the system (use 3rd dimension to concatenate)
sys(:,:,count) = (K(ii)/(T(jj)*s + 1))*exp(-L(kk)*s);
count = count + 1;
end
end
end
% Step response
step(sys)
By the way, there is a way more elegant/efficient way of expressing parameter variations shown in this documentation link. However, it didn't seem to work because of the exponential portion, which can't accept a realp tunable parameter.
If you want to pursue the above, you may need to do a Pade approximation of that exponential time delay piece first.
- Sebastian
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Programmatic Model Editing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!