Created
October 12, 2022 14:18
-
-
Save daniestevez/5d9a5eae21f119262f2abb58f3c53f60 to your computer and use it in GitHub Desktop.
QPSK & BPSK DSP Puzzle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
options: | |
parameters: | |
author: daniel | |
catch_exceptions: 'True' | |
category: '[GRC Hier Blocks]' | |
cmake_opt: '' | |
comment: '' | |
copyright: '' | |
description: '' | |
gen_cmake: 'On' | |
gen_linking: dynamic | |
generate_options: qt_gui | |
hier_block_src_path: '.:' | |
id: qpsk_trivia | |
max_nouts: '0' | |
output_language: python | |
placement: (0,0) | |
qt_qss_theme: '' | |
realtime_scheduling: '' | |
run: 'True' | |
run_command: '{python} -u {filename}' | |
run_options: prompt | |
sizing_mode: fixed | |
thread_safe_setters: '' | |
title: QPSK & BPSK DSP puzzle | |
window_size: (1000,1000) | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [8, 8] | |
rotation: 0 | |
state: enabled | |
blocks: | |
- name: alpha | |
id: variable_qtgui_entry | |
parameters: | |
comment: '' | |
gui_hint: '' | |
label: '' | |
type: real | |
value: 2e-5 | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [960, 32.0] | |
rotation: 0 | |
state: true | |
- name: channel_fir | |
id: variable | |
parameters: | |
comment: '' | |
value: np.fft.fftshift(np.fft.ifft(1 + alpha*np.fft.fftfreq(channel_ntaps, 1/samp_rate))) | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [728, 100.0] | |
rotation: 0 | |
state: true | |
- name: channel_ntaps | |
id: variable | |
parameters: | |
comment: '' | |
value: 2**14+1 | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [728, 20.0] | |
rotation: 0 | |
state: true | |
- name: constellation | |
id: variable_constellation | |
parameters: | |
comment: '' | |
const_points: '[-1-1j, -1+1j, 1+1j, 1-1j]' | |
dims: '1' | |
normalization: digital.constellation.AMPLITUDE_NORMALIZATION | |
precision: '8' | |
rot_sym: '4' | |
soft_dec_lut: None | |
sym_map: '[0, 1, 3, 2]' | |
type: bpsk | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [368, 20.0] | |
rotation: 0 | |
state: true | |
- name: rrc_taps | |
id: variable_rrc_filter_taps | |
parameters: | |
alpha: '0.001' | |
comment: '' | |
gain: np.sqrt(sps) | |
ntaps: 2**12+1 | |
samp_rate: sps | |
sym_rate: '1' | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [560, 20.0] | |
rotation: 0 | |
state: true | |
- name: samp_rate | |
id: variable | |
parameters: | |
comment: '' | |
value: '320000' | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [184, 12] | |
rotation: 0 | |
state: enabled | |
- name: sps | |
id: variable | |
parameters: | |
comment: '' | |
value: '8' | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [368, 92.0] | |
rotation: 0 | |
state: true | |
- name: analog_random_source_x_0 | |
id: analog_random_source_x | |
parameters: | |
affinity: '' | |
alias: '' | |
comment: '' | |
max: '2' | |
maxoutbuf: '0' | |
min: '0' | |
minoutbuf: '0' | |
num_samps: '100000' | |
repeat: 'True' | |
type: byte | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [32, 212.0] | |
rotation: 0 | |
state: true | |
- name: blocks_throttle_0 | |
id: blocks_throttle | |
parameters: | |
affinity: '' | |
alias: '' | |
comment: '' | |
ignoretag: 'True' | |
maxoutbuf: '0' | |
minoutbuf: '0' | |
samples_per_second: samp_rate | |
type: complex | |
vlen: '1' | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [696, 236.0] | |
rotation: 0 | |
state: true | |
- name: digital_constellation_encoder_bc_0 | |
id: digital_constellation_encoder_bc | |
parameters: | |
affinity: '' | |
alias: '' | |
comment: '' | |
constellation: constellation | |
maxoutbuf: '0' | |
minoutbuf: '0' | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [232, 236.0] | |
rotation: 0 | |
state: true | |
- name: fft_filter_xxx_0 | |
id: fft_filter_xxx | |
parameters: | |
affinity: '' | |
alias: '' | |
comment: '' | |
decim: '1' | |
maxoutbuf: '0' | |
minoutbuf: '0' | |
nthreads: '1' | |
samp_delay: '0' | |
taps: channel_fir | |
type: ccc | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [544, 356.0] | |
rotation: 0 | |
state: true | |
- name: fir_filter_xxx_0 | |
id: fir_filter_xxx | |
parameters: | |
affinity: '' | |
alias: '' | |
comment: '' | |
decim: sps | |
maxoutbuf: '0' | |
minoutbuf: '0' | |
samp_delay: (len(rrc_taps) - 1)//2 | |
taps: rrc_taps | |
type: ccc | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [96, 516.0] | |
rotation: 0 | |
state: true | |
- name: fir_filter_xxx_0_0 | |
id: fir_filter_xxx | |
parameters: | |
affinity: '' | |
alias: '' | |
comment: '' | |
decim: sps | |
maxoutbuf: '0' | |
minoutbuf: '0' | |
samp_delay: (len(rrc_taps) - 1)//2 + (len(channel_fir) - 1)//2 | |
taps: rrc_taps | |
type: ccc | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [96, 596.0] | |
rotation: 0 | |
state: true | |
- name: import_0 | |
id: import | |
parameters: | |
alias: '' | |
comment: '' | |
imports: import numpy as np | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [184, 84.0] | |
rotation: 0 | |
state: true | |
- name: interp_fir_filter_xxx_0 | |
id: interp_fir_filter_xxx | |
parameters: | |
affinity: '' | |
alias: '' | |
comment: '' | |
interp: sps | |
maxoutbuf: '0' | |
minoutbuf: '0' | |
samp_delay: '0' | |
taps: rrc_taps | |
type: ccc | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [456, 228.0] | |
rotation: 0 | |
state: true | |
- name: qtgui_const_sink_x_0 | |
id: qtgui_const_sink_x | |
parameters: | |
affinity: '' | |
alias: '' | |
alpha1: '1.0' | |
alpha10: '1.0' | |
alpha2: '1.0' | |
alpha3: '1.0' | |
alpha4: '1.0' | |
alpha5: '1.0' | |
alpha6: '1.0' | |
alpha7: '1.0' | |
alpha8: '1.0' | |
alpha9: '1.0' | |
autoscale: 'False' | |
axislabels: 'True' | |
color1: '"blue"' | |
color10: '"red"' | |
color2: '"red"' | |
color3: '"red"' | |
color4: '"red"' | |
color5: '"red"' | |
color6: '"red"' | |
color7: '"red"' | |
color8: '"red"' | |
color9: '"red"' | |
comment: '' | |
grid: 'False' | |
gui_hint: '' | |
label1: '' | |
label10: '' | |
label2: '' | |
label3: '' | |
label4: '' | |
label5: '' | |
label6: '' | |
label7: '' | |
label8: '' | |
label9: '' | |
legend: 'True' | |
marker1: '0' | |
marker10: '0' | |
marker2: '0' | |
marker3: '0' | |
marker4: '0' | |
marker5: '0' | |
marker6: '0' | |
marker7: '0' | |
marker8: '0' | |
marker9: '0' | |
name: '""' | |
nconnections: '2' | |
size: '1024' | |
style1: '0' | |
style10: '0' | |
style2: '0' | |
style3: '0' | |
style4: '0' | |
style5: '0' | |
style6: '0' | |
style7: '0' | |
style8: '0' | |
style9: '0' | |
tr_chan: '0' | |
tr_level: '0.0' | |
tr_mode: qtgui.TRIG_MODE_FREE | |
tr_slope: qtgui.TRIG_SLOPE_POS | |
tr_tag: '""' | |
type: complex | |
update_time: '0.10' | |
width1: '1' | |
width10: '1' | |
width2: '1' | |
width3: '1' | |
width4: '1' | |
width5: '1' | |
width6: '1' | |
width7: '1' | |
width8: '1' | |
width9: '1' | |
xmax: '2' | |
xmin: '-2' | |
ymax: '2' | |
ymin: '-2' | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [616, 516.0] | |
rotation: 0 | |
state: true | |
- name: qtgui_freq_sink_x_0 | |
id: qtgui_freq_sink_x | |
parameters: | |
affinity: '' | |
alias: '' | |
alpha1: '1.0' | |
alpha10: '1.0' | |
alpha2: '1.0' | |
alpha3: '1.0' | |
alpha4: '1.0' | |
alpha5: '1.0' | |
alpha6: '1.0' | |
alpha7: '1.0' | |
alpha8: '1.0' | |
alpha9: '1.0' | |
autoscale: 'False' | |
average: '1.0' | |
axislabels: 'True' | |
bw: samp_rate | |
color1: '"blue"' | |
color10: '"dark blue"' | |
color2: '"red"' | |
color3: '"green"' | |
color4: '"black"' | |
color5: '"cyan"' | |
color6: '"magenta"' | |
color7: '"yellow"' | |
color8: '"dark red"' | |
color9: '"dark green"' | |
comment: '' | |
ctrlpanel: 'False' | |
fc: '0' | |
fftsize: '4096' | |
freqhalf: 'True' | |
grid: 'False' | |
gui_hint: '' | |
label: Relative Gain | |
label1: '' | |
label10: '''''' | |
label2: '''''' | |
label3: '''''' | |
label4: '''''' | |
label5: '''''' | |
label6: '''''' | |
label7: '''''' | |
label8: '''''' | |
label9: '''''' | |
legend: 'True' | |
maxoutbuf: '0' | |
minoutbuf: '0' | |
name: '""' | |
nconnections: '2' | |
norm_window: 'False' | |
showports: 'False' | |
tr_chan: '0' | |
tr_level: '0.0' | |
tr_mode: qtgui.TRIG_MODE_FREE | |
tr_tag: '""' | |
type: complex | |
units: dB | |
update_time: '0.10' | |
width1: '1' | |
width10: '1' | |
width2: '1' | |
width3: '1' | |
width4: '1' | |
width5: '1' | |
width6: '1' | |
width7: '1' | |
width8: '1' | |
width9: '1' | |
wintype: window.WIN_BLACKMAN_hARRIS | |
ymax: '10' | |
ymin: '-140' | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [864, 340.0] | |
rotation: 0 | |
state: true | |
connections: | |
- [analog_random_source_x_0, '0', digital_constellation_encoder_bc_0, '0'] | |
- [blocks_throttle_0, '0', qtgui_freq_sink_x_0, '0'] | |
- [digital_constellation_encoder_bc_0, '0', interp_fir_filter_xxx_0, '0'] | |
- [fft_filter_xxx_0, '0', fir_filter_xxx_0_0, '0'] | |
- [fft_filter_xxx_0, '0', qtgui_freq_sink_x_0, '1'] | |
- [fir_filter_xxx_0, '0', qtgui_const_sink_x_0, '0'] | |
- [fir_filter_xxx_0_0, '0', qtgui_const_sink_x_0, '1'] | |
- [interp_fir_filter_xxx_0, '0', blocks_throttle_0, '0'] | |
- [interp_fir_filter_xxx_0, '0', fft_filter_xxx_0, '0'] | |
- [interp_fir_filter_xxx_0, '0', fir_filter_xxx_0, '0'] | |
metadata: | |
file_format: 1 | |
grc_version: 3.10.2.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment