Comments (59)
from autoencoder-based-communication-system.
no! normalization is used to normalize the energy of signal.So, it will make sending signal power to 1 unit.
from autoencoder-based-communication-system.
Okay.. So how to get amplitude modulation schemes? Like, how to reproduce Fig 4.c?? In the paper, it says
Fig.4c for the same parameters but with an average power normalization
instead of a fixed energy constraint
from autoencoder-based-communication-system.
I has same question to author but i never emailed to author about this.So, I never implemented figure 4.3.
from autoencoder-based-communication-system.
Okay.. I mailed author a couple of days back. But no reply yet!!
Even though, they mention in paper that source code is available at https://github.com/radioml/introdlphy, it seems such a repo doesn't exist. :/
from autoencoder-based-communication-system.
I mailed author for asking about normalization layer but didn't get an answer and I also didn't mention all details in an email.So, somehow i know that I will not be getting a reply.Again That was my mistake.
But this paper was on arxiv for a long time and then published to IEEE still GitHub repo has not been shared publicly.I think there are only two implementation is available on github of this paper.One is mine and other is on pytorch.
from autoencoder-based-communication-system.
hi, i also have same question about the average power constraint, i think batch normalization may solve this question. but i am not sure about this and i have some problems in using batch normalization in this question
from autoencoder-based-communication-system.
no , batch normalization is something different.batch normalization is trying to keep normal gaussian distribution which will have zero mean and 1 stddev.but here we are trying to normalize power.
from autoencoder-based-communication-system.
However, i try to implement batch norm(you should set gamma_constraint=max_norm(1.4142136)) in your code, it can produce fig4(c). It seems that it can achieve the average power constraint. But when i introduce batch norm into the code, the loss is large(about 0.17).
from autoencoder-based-communication-system.
@lintongtong123 I've tried using batch norm the results are too good to be true, I have tried implementing the norm layer as mentioned in the paper table-1, but I was not able to replicate the results. I am pretty sure this has something to with the norm layer.
from autoencoder-based-communication-system.
@Vsag Do you get fig4(c) by using batch norm? how do you implement batch norm in the code?I am interested in it.
from autoencoder-based-communication-system.
@lintongtong123 sorry I am not implementing figure 4 (c) I was talking about 3 (a) figure . I wasn't able to replicate even that, did you get the results as seen in figure 3? If you want to implement batch norm these links are helpful. I use pytorch as we are using dense networks link-2 will be helpfu.
https://discuss.pytorch.org/t/example-on-how-to-use-batch-norm/216
https://www.programcreek.com/python/example/107653/torch.nn.BatchNorm1d
from autoencoder-based-communication-system.
@Vsag you should increase N if you want to get the results as seen in figure 3
from autoencoder-based-communication-system.
@lintongtong123 what is the size of N for which you were able to replicate the results as seen in fig 3? I tried so many things but finally gave up tbf. Were you able to replicate the results?
from autoencoder-based-communication-system.
about 1000000
from autoencoder-based-communication-system.
are you sure? I mean should the normalisation layer be the one mentioned in table one i.e list of layers?
from autoencoder-based-communication-system.
if you want to get fig3, you can try increase N in the code, about 1000000.
from autoencoder-based-communication-system.
I've done what you said but at snr -4db the decoder is only a 50% accurate i.e it gets wrong results 50% of the time. but the hamming decoders start at about 78-80% accuracy at -4 snr. I am not sure about increasing the data size.
from autoencoder-based-communication-system.
here increasing data size want help unless we are dealing with more bits in msg. because after all if we use small number of bit let's assume n = 4 which means total 16 possibilities so trying data with 1000 or 5000 will be much more enough for small number of bits.
@lintongtong123 can you share result(constellation diagram) of batch norm layer.
from autoencoder-based-communication-system.
@immortal3 can you please tell me accuracy of Hamming 7,4 hard and MLD at -4db? Thanks!
from autoencoder-based-communication-system.
i think bler is visible in readme file so you can calculate accuracy.so bler is 0.5. which is same as 50% accuracy.
from autoencoder-based-communication-system.
@immortal3 Can you share your hamming codes' matlab code, because I swear when I implemented MLD I got accuracy close to 70-75% and in no way getting 50% accuracy. Code for reference.
`clear;
n=7;
k=4;
for_one=3.5;
for_zero=1.5;
%Generates Random Integers
x=randi([0,15],[500000,1]);
C=zeros(2^k,n);
transmit_vals=zeros(size(x,1),7);
temp=[];
parity_check=zeros(1,n-k);
%converts 2^k sequences into binary numbers
for values=1:2^k,
temp=de2bi(values-1,4);
temp=temp(:,end:-1:1);
C(values,1:4)=temp;
parity_check(1)=xor(xor(C(values,1),C(values,2)),C(values,3));
parity_check(2)=xor(xor(C(values,1),C(values,3)),C(values,4));
parity_check(3)=xor(xor(C(values,2),C(values,3)),C(values,4));
C(values,5:end)=parity_check;
end
for values=1:size(x,1),
temp=de2bi(x(values),4);
temp=temp(:,end:-1:1);
transmit_vals(values,1:4)=temp;
parity_check(1)=xor(xor(transmit_vals(values,1),transmit_vals(values,2)),transmit_vals(values,3));
parity_check(2)=xor(xor(transmit_vals(values,1),transmit_vals(values,3)),transmit_vals(values,4));
parity_check(3)=xor(xor(transmit_vals(values,2),transmit_vals(values,3)),transmit_vals(values,4));
transmit_vals(values,5:end)=parity_check;
zero_indx=find(transmit_vals(values,:)==0);
one_indx=find(transmit_vals(values,:)==1);
transmit_vals(values,zero_indx)=for_zero;
transmit_vals(values,one_indx)=for_one;
end
EbNo=[-4:0.5:8];
rate=k/n;
vals=zeros(1000,1);
predicted=zeros(size(x));
for values=1:size(EbNo,2),
i=0;
%total=0;
std_dev=(1/(2*rate*10^(EbNo(1,values)/10)))^0.5;
%Noise=normrnd(0,std_dev,size(transmit_vals,1),size(transmit_vals,2));
while(i<size(transmit_vals,1)),
total=0;
Noise=normrnd(0,std_dev,1,size(transmit_vals,2));
temp=transmit_vals(i+1,:)+Noise;
%vals(i+1)=sum(temp>1 & temp<4);
if (sum(temp>for_zero & temp<for_one))==0
dist=9;
indx=0;
zero_indx=find(temp<=for_zero);
one_indx=find(temp>=for_one);
temp(1,zero_indx)=0;
temp(1,one_indx)=1;
for j=1:size(C,1),
if dist>=sum(xor(temp,C(j,:)))
indx=j-1;
dist=sum(xor(temp,C(j,:)));
elseif dist==sum(xor(temp,C(j,:))),
total=total+1;
end
end
%total
predicted(i+1)=indx;
i=i+1;
end
end
%plot(vals);
values
err(values)=(sum(predicted~=x)/size(x,1));
%(sum(predicted~=x)/1000)
%pause;
end
plot(EbNo,err);
`
from autoencoder-based-communication-system.
@Vsag oh sorry,you're talking about real hamming code i give accuracy of autoencoder.again it was also wrong.This code i used for plotting graph.bler is 0.37038 in autoencoder at -4.so,you are right than accuracy will be 70-75% as error is 37-32%.
SNR_db = -4:0.5:8;
SNR = 10.^(SNR_db./10);
k = 4;
ber_7_4_hamming_hard = bercoding(SNR_db,'block','hard',n,k,4);
M = 4;
ber_4_4 = berawgn( SNR_db ,'psk',M,'nondiff');
ber_7_4_autoencoder = [ 0.37038 0.32722 0.29286 0.25436 0.21936 0.18242 0.1502 0.11876 0.09346 0.06972 0.04974 0.03586 0.02388 0.0169 0.00966 0.00574 0.00294 0.00154 0.00094 0.00034 0.00016 6e-05 3e-05 1e-05 8e-06 ];
%ber_7_4_fit = berfit(SNR_db,ber_7_4_autoencoder);
semilogy(SNR_db,ber_7_4_hamming_hard.*2,'b-.','linewidth',1),grid on,hold on;
semilogy(SNR_db,ber_7_4_autoencoder,'ro','linewidth',0.25,'MarkerFaceColor',[ 1 0 0]);
BER_SOFT=(7.*qfunc(sqrt(3*SNR)))+(7.*qfunc(sqrt(4*SNR)))+(qfunc(sqrt(7*SNR)));
semilogy(SNR_db,BER_SOFT./7,'b-','linewidth',1);
semilogy(SNR_db,ber_4_4.*4,'k','linewidth',1)
legend('Hamming (7,4) Hard Decision','Autoencoder(7,4)','Hamming (7,4) MLD','UnCoded BPSK(4,4)');
legend('Location','southwest');
ylim([1E-5 1]);```
from autoencoder-based-communication-system.
I also added code of both figure in case anyone need it.
from autoencoder-based-communication-system.
@immortal3 sorry to be picky but in the code why is the first value in ber_7_4_autoencoder 37%, that corresponds to the ML part I suppose? Did you change the values for the project or did you actually get 37% for -4db? Thanks
from autoencoder-based-communication-system.
if you can see last two line generate matlab like array which i copy paste into .m file for plotting.I didn't change any value i just copy pasted generate result and also you can check difference between research paper plotting and my plotting.In initial area(-4db to -2db) it's not even same.
from autoencoder-based-communication-system.
I ran your code a 30-40 times using different hyper paramters, I even wrote my own pytorch implementation, I never got 37% at -4db can you tell me how to do it? What all do I have to change in the code you've written. I am sorry if this sounds rude I am asking you in the most humble way possible so don't take it the wrong way. I am talking about the (7,4) auto encoder so there are no confusions.
from autoencoder-based-communication-system.
Wait I upload that to repo also.
from autoencoder-based-communication-system.
Why is the norm layer batch normalised? You've claimed that it was something from the table's layer. I have given up man whatever you say.
from autoencoder-based-communication-system.
check repo i uploaded code!
from autoencoder-based-communication-system.
Hey @immortal3 I have implemented batchnorm, you were claiming it's not batchnorm that was the reason I was pestering/bugging you. No hard feelings!! But is the norm layer used by the authors batch norm? The point with using batch norm I got this result, it give way better results, I think we are missing something, it's somewhere in between. I got a whopping 18% bler at -4db. So yeah thats what I have to say Thank you for bearing with me.
from autoencoder-based-communication-system.
i got also same result using batch norm but it's just illusion created by batch norm when you plot constellation diagram you get real picture what is going on.reality is signal we are send is no longer unit power so our ber calculation is wrong.we calculate ber assuming our signal is unit power and then draw it but here signal is no longer unit power.
from autoencoder-based-communication-system.
when you plot constellation diagram using batch norm then instead of lying on circle between (-1,1) it will go beyond like (-4,4) and give better result.When I first implemented this thing i got same result and thought it was improvement but after seeing what encoder is sending i get idea why it's not actual improvement.
from autoencoder-based-communication-system.
@Vsag any updates ?
from autoencoder-based-communication-system.
Hey none as of now, my final year project is ml in communication systems, I have mailed my guide saying the problem and mailed the author's if anyone tells me anything you'll be the first to know. If I plot the batch norm what you say happens. One thing I have to try is, all the DL libraries implement a batch norm where the update the mean, std like they update the weights. I'll have to try where they make the just normalize the features to just Gaussian where the signal is normalised between (0,1). I'll have to check. You'll be the first to know :) I promise
from autoencoder-based-communication-system.
@Vsag Any updates ? 😅 😅
from autoencoder-based-communication-system.
have you ever tried to simulate the paper title deep learning based MIMO Communication?
from autoencoder-based-communication-system.
no, i seen that paper but many details are not clearly mentioned to really re-produce results.
And also i don't have much knowledge in that field.
It would be really cool to see that someone reproduce that MIMO paper's results.
from autoencoder-based-communication-system.
sorry to disturb you,have you read the paper "deep learning based communication over the air",the channel in that paper is more complicated
from autoencoder-based-communication-system.
Yes, I tried. I was not able to understand many detail.
from autoencoder-based-communication-system.
Excuse me sir, did you draw fig3a fig3b with python? I am stuck with it for several weeks. Could you please share me with your code? Thank you so much!
from autoencoder-based-communication-system.
no,fig3a and fig3b are done with Matlab.
from autoencoder-based-communication-system.
@foryouforever I normalize the average power of every symbol as you do, but the diagram is different from yours. It still is similar to the figure4(b). what detail does I miss?
Thanks.
from autoencoder-based-communication-system.
@lintongtong123 I use BatchNormalization layer, and the diagram is similar to the figure4(c). the amplitude is [-4,4 on the x- and y- axes. When I set gamma_constraint=max_norm(), the amplitude can be changed. But the shape of constellation is changed, and the average power can't be controlled. How do you set gamma_constraint?
Thanks.
from autoencoder-based-communication-system.
semilogy(SNR_db,ber_4_4.*4,'k','linewidth',1)
I am sorry to trouble you. I am not sure whether the bit error rate of (4,4) system times 4 equals to the block error rate of (4,4)system. I mean that we should set 4 bit as a block at first rather than times 4 at last. Thank you!
from autoencoder-based-communication-system.
Did that. But then BER curve is different than author's Curve. So, I ended up doing 4 times.
from autoencoder-based-communication-system.
@immortal3
How did you set 4 bit as a block at first? I didn't come up with that.
Did you draw the constellation of traditional QPSK 16PSK and 16QAM? I am a beginner and I didn't find any material related to this in our library or on the Internet. Would you please show me how to realize that? Thank you so much!
from autoencoder-based-communication-system.
I am also researching the O'Shea's paper on the physical layer design based on DL. I have some issues bothering me on the Fig.4 (c). Could someone tell me how to implement the average energy normalization (i.e., QAM modulation scheme, not PSK one)?
from autoencoder-based-communication-system.
@LitterBrother Did you check this: #2 (comment)
from autoencoder-based-communication-system.
@v-i-s-h Don't you think the value of ber is too terrible to be convincible?
from autoencoder-based-communication-system.
@LitterBrother Here the point is not ber. point is that how autoencoder is being able to learn when we impose some constraints.
from autoencoder-based-communication-system.
@immortal3 Thanks for your kind. However, when I change the normalization method offered by @foryouforever, I still get a 16-PSK constellation.
from autoencoder-based-communication-system.
@LitterBrother
This is my working version.
# ---------------------------------- Auto encoder model ------------------------------------
with tf.name_scope( "Input_symbol" ):
tx_in = tf.placeholder( dtype = tf.float32, shape = (None,noOfSymbols), name = "tx_symbol" )
with tf.name_scope( "Transmitter"):
with tf.name_scope( "TX_1" ):
l1_wgt = tf.Variable( tf.random_normal([noOfSymbols,noOfSymbols],
stddev=np.sqrt(3.0/(noOfSymbols+noOfSymbols))),
name = "l1_wgt" )
l1_bias = tf.Variable( tf.zeros([noOfSymbols]), name = "l2_bias" )
l1_out = tf.nn.relu( tf.matmul(tx_in,l1_wgt) + l1_bias )
with tf.name_scope( "TX_2" ):
l2_wgt = tf.Variable( tf.random_normal([noOfSymbols,noOfChannels],
stddev=np.sqrt(3.0/(noOfSymbols+noOfChannels))),
name = "l2_wgt" )
l2_bias = tf.Variable( tf.zeros([noOfChannels]), name = "l2_bias" )
l2_out = tf.matmul(l1_out,l2_wgt) + l2_bias
with tf.name_scope( "TX_normalization" ):
if scheme == 'PSK' :
# For PSK
l3_out = np.sqrt(0.5*noOfChannels) * tf.multiply(
l2_out,
tf.rsqrt( tf.maximum(
tf.reduce_sum( tf.square(l2_out), axis = 1, keepdims = True ),
1e-12 )
),
name = "l3_out"
)
# For XAM
elif scheme == 'XAM' :
thisBatchSize = tf.cast( tf.shape(l2_out)[0], tf.float32 )
s = tf.norm( l2_out )
l3_out = tf.multiply( tf.sqrt(thisBatchSize)/s, l2_out, name = "l3_out" )
else:
print( "Invalid scheme {}".format(scheme) )
tx_out = tf.identity( l3_out, name = "tx_out" )
with tf.name_scope( "Channel" ):
# Placeholder for additive noise
ch_noise = tf.placeholder( dtype = tf.float32, shape = (None,noOfChannels), name = "ch_noise" )
# Add noise
ch_out = tf.add( tx_out, ch_noise, name = "ch_out" )
with tf.name_scope( "Reciever" ):
rx_in = tf.identity( ch_out, name = "rx_in" )
with tf.name_scope( "RX_1" ):
# rx1_out = tf.layers.dense( inputs = rx_in, units = noOfSymbols, activation = tf.nn.relu )
rx1_wgt = tf.Variable( tf.random_normal([noOfChannels,noOfSymbols],
stddev=np.sqrt(3.0/(noOfChannels+noOfSymbols))),
name = "rx1_wgt" )
rx1_bias = tf.Variable( tf.zeros([noOfSymbols]), name = "rx1_bias")
rx1_out = tf.nn.relu( tf.matmul(rx_in,rx1_wgt) + rx1_bias )
with tf.name_scope( "RX_2" ):
# rx2_out = tf.layers.dense( inputs = rx1_out, units = noOfSymbols, activation = tf.nn.softmax )
rx2_wgt = tf.Variable( tf.random_normal([noOfSymbols,noOfSymbols],
stddev=np.sqrt(3.0/(noOfSymbols+noOfSymbols))),
name = "rx2_wgt" )
rx2_bias = tf.Variable( tf.zeros([noOfSymbols]), name = "rx2_bias" )
rx2_out = tf.nn.softmax( tf.matmul(rx1_out,rx2_wgt) + rx2_bias, name = "rx2_out" )
rx_out = tf.identity( rx2_out, name = "rx_out" )
from autoencoder-based-communication-system.
batch norm(you should set gamma_constraint=max_norm(1.4142136)) in your code, it can produce fig4(c).
did u implement this?
from autoencoder-based-communication-system.
how do they produce to fig4(c)?I still don't understand it.Could you help me to explain this?Thanks a lot.
from autoencoder-based-communication-system.
Did that. But then BER curve is different than author's Curve. So, I ended up doing 4 times.
I think the right answer is that ber_8_8 = 1 - (1 - ser_2_2).^3 which agrees with the fig in article. Reason maybe that the block is constructed in dimensions which are orthogonal to each other.
from autoencoder-based-communication-system.
What's a probability of Autoencoder output? I need maximum probability, how to calculate?
from autoencoder-based-communication-system.
Hi!
Did anyone got an answer? I tried to email him too a week ago but sadly no response...
@immortal3 have you maybe tried to implement "Deep learning based MIMO communication" since? Tnx a lot
from autoencoder-based-communication-system.
wow. I joined the conversation late, but I have learnt a whole lot. Thanks for sharing guys.
from autoencoder-based-communication-system.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autoencoder-based-communication-system.