changes from friday

This commit is contained in:
Silas Oettinghaus
2023-05-21 15:31:39 +02:00
parent 8d098a6c80
commit f5747bb863
9 changed files with 311 additions and 187 deletions

37
process_simulation.m Normal file
View File

@@ -0,0 +1,37 @@
figure(22)
clf
subplot(2,1,1)
hold on
plot(reference.signal(10000:end-20));
plot(rx_series(10000:end-20));
hold off
subplot(2,1,2)
hold on
plot(reference.signal(4150:4175));
plot(rx_series(4150:4175));
hold off
figure()
hold on
stem(X.signal(1,:))
stem(bitpattern(:,1)')
hold off
a = fftshift(xcorr(X.signal(1,:),circshift(bitpattern(:,1)',0)));
% BER
if (length(X.signal) ~= length(bitpattern'))
warning("TX and RX bitstreams have different length...")
end
[bits,errors,BER] = calc_ber(X.signal(:,10000:end-20),bitpattern(10000:end-19,:)',0);
disp(X.logbook);
disp(['BER: ', sprintf('%2E',BER)]);