Simulink AWGN block, Input signal power from variable

조회 수: 3 (최근 30일)
Ilya Michlin
Ilya Michlin 2019년 6월 30일
편집: Sourabh 2025년 4월 25일
Hey,
I am using the "AWGN Channel" block in Simulink and I want to input the "Input signal power" from a variable from inside the simulation.
What I mean is that I have a block in the Simulink that calculates the signal power and outputs it. I want this to be the input to the "Input signal power" block.
Is there a way to do it?

답변 (1개)

Sourabh
Sourabh 2025년 4월 25일
편집: Sourabh 2025년 4월 25일
In Simulink, the "AWGN Channel" block does not natively support dynamic input for the "Input signal power" parameter during simulation. This parameter is typically set as a fixed value in the block's parameters dialog box and cannot be connected directly to a signal line within the model.
You can follow this alternative approach to achieve dynamic noise variance based on a computed signal power:
1. In the AWGN Channel block parameters, set the "Mode" to "Variance" and “Noise variance source” to “Input port”.
2. Add a “MATLAB Function block to compute the noise variance based on the measured signal power and desired SNR.
Double-click the block and define the function as follows:
function noiseVar = computeVariance(sigPower)
SNR_dB = 10; % Desired SNR in dB
noiseVar = sigPower / (10^(SNR_dB / 10));
end
3. Connect the output of the block that calculates the signal power to the input of MATLAB Function block.
4. Connect the output of MATLAB Function block to the input of AWGN Channel block.
For more details on “AWGN Channel”, kindly visit the following MATLAB documentation links:
I hope this helps!

카테고리

Help CenterFile Exchange에서 Propagation and Channel Models에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by