Using MATLAB to simulate the response of an open-loop system to a step input
13 views (last 30 days)
Show older comments
I have transfer function C(s)/I(s) = 1/(V1(s+lambda), where V1 = 10ml and lambda = 0.004.
How do you use MATLAB to simulate the response of an open-loop system to a step input, for this instance, of i(t) = 1mL/s
0 Comments
Answers (1)
Ameer Hamza
on 12 Apr 2020
Edited: Ameer Hamza
on 12 Apr 2020
This simulates a step response of your system
V1 = 10;
lambda = 0.004;
sys = tf(1, [V1 V1*lambda]);
step(sys) % or [C,t] = step(sys) to get output as vectors
For a general input, where I(t) is a function of time
V1 = 10;
lambda = 0.004;
t = 0:0.01:10;
I = sin(t);
sys = tf(1, [V1 V1*lambda]);
lsim(sys, I, t) % or [C,t] = step(sys) to get output as vectors
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!