# How do I plot the response to a step disturbace of a control system in the time domain?

I would like to plot the time response of a step disturbance of a control system, but I am not sure what I have to plot.

I have tried to plot the step response of the Sensitivity function, but I am not sure it is the correct thing to do. So, what I have done is something like:

s = tf('s')
S = 1/(1+C*P);

step(S)


I my case, by doing so I get:

where in my case I have plotted the step response of different sensitivity functions.

Is this the response to a step disturbance? And if yes, how do I interpret this?

• A disturbance doesn't have a step response; it may be a step response disturbance so, decide what it is that you are asking. – Andy aka Feb 6 at 14:51
• Thanks, I have corrected my mistake. would like to know about the response to a step disturbance. Thanks. – J.D. Feb 6 at 15:17
• What you have plotted in your question matches what you now want. – Andy aka Feb 6 at 16:01

There is definitely such a thing as system response on step disturbance. It depends a bit how you define your disturbance though.

On the figure above you can see one general closed loop transfer function block diagram with input $$\d\$$ and output $$\n\$$ disturbance inputs. Of course you can have many different types of disturbances, this is just a simple case.

## Output disturbance

Output disturbance $$\n\$$ is mostly considered to be high frequency additive noise and it is not that common to plot step response of such transfer function. Simply because the noise $$\n\$$ is high frequency signal and you will be mostly interested in the high frequency system response, whereas low frequency signals such as step signal are mostly used for stationary inputs. So you would rather plot bode diagram of this transfer function and study the gain for higher frequencies. The transfer function in between $$\y\$$ and $$\n\$$ is what you were using for your plots and you can obtain it by reorganizing the closed-loop blocks.

Making the additive noise transfer function: $$G_n(s) = \frac{y}{n} = \frac{1}{1 + CP}$$

What you are trying to achieve with the transfer function $$\G_n\$$ is very low gain on high frequencies and you don't care too much for low frequencies.

## Input disturbance

On the other side input disturbances $$\d\$$ usually are signals with much slower dynamics, and in many cases exactly step signals. For example, adding load to electric motor. Therefore the step response behavior of this transfer function can tell you how well will your closed loop system cope with such disturbances.

To obtain the transfer function you need to reorganize the closed-loop (figure above) and you get $$D_d(s) = \frac{y}{d} = \frac{P}{1+CP}.$$

What you are trying to achieve with the transfer function $$\G_d\$$ is very low gain on low frequencies and you don't care too much for high frequencies.

Finally, what can you conclude from step response of $$\G_d\$$. Basically goal of your control loop is to reject the disturbance, as fast as possible. Therefore you expect that your transfer function step response will diminish to zero or a very low value - that it will reject your disturbance. So the faster and less oscillatory it does so, the better your controller is (Very roughly speaking).