- https://www.mathworks.com/help/comm/ref/awgnchannel.html
- https://www.mathworks.com/help/comm/ug/awgn-channel.html
Simulink AWGN block, Input signal power from variable
3 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(1 个)
Sourabh
2025-4-25
编辑:Sourabh
2025-4-25
Hey @Ilya Michlin
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!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Propagation and Channel Models 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!