To draw steady-state error versus time graphs in matlab, first, we need to generate a step input and apply it to the system. After applying the step input, we can simulate the response of the system using step()
function.
Once the response of the system is simulated, we can calculate the steady-state error using the following formula:
ess = 1 - lim(s -> 0) G(s)H(s) / [1 + lim(s -> 0) G(s)H(s)]
where G(s)
is the transfer function of the system and H(s)
is the transfer function of the feedback loop.
The steady-state error can be plotted against time using the following code:
main.m581 chars23 lines
This code will generate a plot of the steady-state error versus time, along with the response of the system to the step input.
gistlibby LogSnag