How to choose the amplification factor for the required SNR in MatLab ?

2 views (last 30 days)
I have a given noise vector with certain variance. That cannot be changed. I have an IQ-modulated signal and it needs to be amplified to get an SNR of 20dBs. How do I go about that?
k = 3/2; %certain variance
n = sqrt(k).*randn(1, N); %noise vector
noise_power = var(n);
SNR = 10*log10(var(Xiq)/noise_power) %current SNR of the IQ modulated signal
amp = 13.5; %some amplification, I can't figure out what it should be
Xamp = amp.* Xiq;
SNR = 10*log10(var(Xamp)/noise_power) %SNR in dB should be 20 dBs
Currently I am using a fixed scaling factor but I know this isn't the correct way to do it. Can someone help me please?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!