Search code examples
matlabsimulinkgaussiannoise

How can I make gaussian noise with certain mean value in simulink?


How can I make gaussian noise with mean= 18 and variance= 0.1 in simulink? I can't use AWGN block since I'm not able to specify mean value in it. I want to generate the below signal which is gaussian noise with mean= 18 and variance= 0.1:

enter image description here


Solution

  • Construct the model as follows. From the Library Browser select the DSP System Toolbox, then choose the Random Source block.

    enter image description here

    Now, adjust the block parameters Source type, Mean and Variance:

    enter image description here

    Construct the model by adding a Scope block as follows:

    enter image description here

    After running the model for 10 sec., you will see the generated Gaussian noise waveform by double-clicking the Scope block. You will notice the plot is not similar to the image you posted, this is how the default plot works in Simulink.

    Now, to make sure it's the correct signal, send the signal to MATLAB using the To Workspace block and plot it. This is how this noise waveform is plotted in MATLAB, the same as your image.

    enter image description here