MATLAB Code for White Noise

MATLAB Code for White Noise thumbnail
White noise is also known as uniform noise.

MATLAB is a software environment for the generation and execution of scripts for the analysis and simulation of mathematical and technical data. White noise is a random signal of uniform frequency. It is common for most digital signals acquired in the real world to be contaminated with noise. Addition of white noise to simulated signals is important for modeling and analysis of real-world data.

  1. White Noise

    • White noise is uniform noise containing an equal representation of all frequencies over a broad band. Since signals are acquired over a finite period of time at a finite sampling frequency, it is impossible for noise to be uniform over an infinite range of frequencies. White noise is intimately related to random Brownian motion. In fact, much of the white noise found in real-world data is due to random thermal noise in the recording apparatus.

    Generate White Noise

    • MATLAB can generate a signal of only white noise using the wgn() function:

      my_noise = wgn(m, n, power);

      The returned value of my_noise is an m-by-n matrix containing random value of white noise. Power is the value in dB relative to a watt of the generated noise with a load impedance of one ohm. The impedance value can be changed by including the value after the power variable in the function call. The units of power can be altered by including the parameters "dBW," "dBm," or "linear" after power in the function call. Both real or complex values can be generated by including "real" or "complex" in the function call.

    Add White Noise

    • MATLAB can add white noise to an existing signal using the agwn() function:

      my_noisy_signal = awgn(my_signal, snr);

      The my_signal variable is a vector containing the signal you wish to add white noise to. The snr variable is the signal-to-noise ratio per sample in dB. Adding the "measured" parameter to the function call calculates the power of my_signal before adding noise.

    Applications

    • Adding white noise can be used to simulate signals similar to those you might obtain in real-world experiments. White noise can also be used as a basis to analyze noise acquired in real world experiments to determine the source of the noise. Noise may not have the uniform frequency distribution of white noise. For example, noise from electrical interference is focused in the frequency 60 Hz, the frequency of AC current in the United States.

Related Searches:

References

  • Photo Credit Hemera Technologies/AbleStock.com/Getty Images

Comments

Related Ads

Featured