# How to generate wideband Gaussian white noise

I want to generate correlated complex white Gaussian noise signals in MATLAB. What I do is that I take complex Gaussian random variables with unit-variance and multiply them with the desired input covariance matrix.

Next I have to send this signal through a bandpass filter to get the desired bandwidth, in my case 20 MHz.

But I don't know how to design the filter properly to adjust the bandwidth.

• Are you simply asking how to design a 20Mhz low pass filter or is this something you do know but applying that filter to a Gaussian white noise signal is causing additional confusion for you? If it specific to the filter can you please detail what you do already know and have tried to then understand where your trouble actually is and what you might be missing. Apr 14, 2022 at 16:31
• My problem is with the filter design itself. Eventually, I want to pass my signal through a power amplifier (PA) to investigate the non-linearity of the PA. I generate the complex Gaussian random variables using randn. Then multiply this with my desired covariance matrix. My first confusion is how to determine the length of this vector to be able to get the wideband output? Next when it comes to filtering, since I am a beginner, I am lost. Apr 14, 2022 at 17:01
• Additionally: explain why you need to filter, instead of simply declaring your (complex) sampling rate to be 20 MHz.
– MBaz
Apr 14, 2022 at 17:01
• I noticed that for example if I send my signal to Simulink, and pass it through a root-raised cosine transmit filter, if the input sequence is sufficiently long, I can get something a bit less than 20 MHz. However, I don't understand what happens. I want to have at least 45...50 dB attenuation of first and second neighbor channels. Apr 14, 2022 at 17:01
• Is your RRC filter limiting you to the 20 MHz BW? If so I do have a reasonable answer for you. What is your symbol rate and what is the distance in frequency from the center frequency of your signal to where you want 50 dB attenuation? Apr 14, 2022 at 18:59

The OP has further commented that the goal is to create test waveforms for assessing PA non-linearity using RRC filters with a goal of 50 dB rejection of adjacent channels. The bandwidth of the RRC filter is the symbol rate $$R$$ expanded by the roll-off factor $$\alpha$$ used for the filter. The occupied bandwidth is approximately $$R(1+\alpha)$$. Depending on the proximity of adjacent channels, the 50 dB rejection requirement may not be a challenge but requires increasing the overall duration (number of taps) in the filter.

To add some further background, the typical approach is to pulse shape the waveform with RRC filtering as required to meet out-of-band emissions (OOBE). The subsequent non-linearity such as in a power amplifier servers to undo this careful pulse shaping (consider hard limiting as the worst case; we take what would be a rectangular waveform which has an awful for OOBE Sinc function spectrum and carefully transition its edges which serves to reduce all those sidelobes in the spectrum-- but then if we hard limit it we have recreated the rectangular waveform again which "regrew" the sidelobes: Spectral Regrowth).

So in this case, the experiment should be to create the required bandwidth limiting with the RRC filter alone (especially too if we are too evaluation EVM in the receiver after the effects of the non-linearity, which should be a consideration in addition to OOBE). This would typically be done with an actual modulated waveform with a random data source, but it would also be quite easy to create a Gaussian noise waveform if that is what is needed and then pass that through an RRC filter with 50 dB of rejection in the adjacent channel (depending on the proximity of the adjacent channel and roll-off factor used in the filter). The considerations detailed below are used to design the RRC filter properly.

In the design of RRC filters there are two primary considerations beyond the roll-off factor that specifies the filter: the number of samples per symbol (which sets the sampling rate used), and the total number of taps in the filter (which sets the filters memory, duration or span). The performance of the filter in terms of rejection is set totally by the total number of taps in the filter.

Reducing the sampling rate, or the the number of samples per symbol, serves to decrease complexity as we can get a larger span in time for the same number of coefficients.

Increasing the sampling rate allows us to work with a wider range of frequencies, which can simplify subsequent filtering such as in further digital interpolation stages, or the reconstruction filter after the D/A converter. Also more significantly to the OP's application in exploring PA non-linearities, it will allow observation of the wider band non-linearity effects without having them alias. This is a significant consideration in power amplifier predistortion algorithms.

Please see this other post that details the trade-off between number of samples per symbol and filter duration in time along with demonstrated frequency response curves and example code in Python for generating the RRC filter coefficients.