# Adding noise to frequency response

I have the dynamics of a 2nd order system, mass-spring-damper for example, in the transfer-function format.

For the analysis that I am doing, I am calculating the frequency response of the system by replacing the $$s$$ with $$j\omega$$ for a given range of $$\omega$$ of interest.

Now, I need to examine in the behavior of the system when noise is added. How does one go about adding noise to the frequency response? Is it valid to generate some random noise (constant mean and variance) divided into a real and imaginary part and add it to the frequency response?

I don't think it's a good idea to add random noise to frequency response. In general, noise is added to the input or output signal. You should be clear that at which stage the noise is introduced. According to the different stages of noise introduction, there are two main transfer function estimators, $$H_1$$ estimator and $$H_2$$ estimator.

1. $$H_1$$ assumes that there is no noise on the input and consequently that all the input measurements are accurate. All noise is assumed to be on the output.

$$\hat{Y}(\omega) = H(\omega) X(\omega) + N(\omega)$$ where $$\hat{Y}(\omega)$$ is the observed output signal, which is polluted by additive noise $$N(\omega)$$. And you will see that there is a deviation between the estimated frequency response and the real one.

$$\hat{H}(\omega) = \frac{\hat{Y}(\omega)}{X(\omega)} = H(\omega) + \frac{N(\omega)}{X(\omega)}$$

This estimator tends to give an underestimate of the frequency response if there is noise on the input.

1. $$H_2$$ estimator assumes that there is no noise on the output. Noise is assumed to be only on input.

$$Y(\omega) = H(\omega) \Big[X(\omega) + N(\omega)\Big]$$

This estimator tends to give an overestimate of the frequency response if there is noise on the output.

Check here Transfer function estimate

To examine the behavior of the system when noise is added would only make sense to apply the noise to the input of the system. To do this you would determine the power spectral density (spectrum) of your noise process (which for the white noise case the OP describes would be constant across the entire frequency range, so in that case the spectrum is constant or scaled to one conveniently) and then cascade the system with the noise (which would be a product in the frequency domain) to see how the system filters the noise and observe the resulting output frequency spectrum.

Basically you would see that your system filters your noise by the frequency response as expected. So for white noise the frequency response and the output spectrum would have the same shape, scaled by the constant magnitude of the noise in frequency!

This is illustrated below, and basically this is the purpose of the frequency response; to see how noise or other signals at the input to the system will appear at the output. In this case we have a constant noise density $$N$$ (white noise), with a system starting with gain $$g$$ at the lowest frequency, and the resulting output spectrum will in this case on constant noise will be identical to the frequency response scaled by the noise level. (Often such plots are shown in dB scale in which case we would add $$N+g$$ if the two units were in dB given the relationship $$\log(ab) = \log(a)+\log(b)$$.)