Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Garnier Jean-Romain
Performance of QPSK Modulation over Dowlink NOMA
Commits
7203bccc
Commit
7203bccc
authored
Apr 30, 2019
by
Garnier Jean-Romain
Browse files
Improve receiving filter for 2 users flowgraph
parent
8a891177
Changes
2
Hide whitespace changes
Inline
Side-by-side
gnuradio/flowgraph_NOMA_2_users.grc
View file @
7203bccc
...
...
@@ -483,7 +483,7 @@
</param>
<param>
<key>
value
</key>
<value>
16
</value>
<value>
32
</value>
</param>
</block>
<block>
...
...
@@ -952,7 +952,7 @@
</param>
<param>
<key>
_coordinate
</key>
<value>
(
672
, 479)
</value>
<value>
(
816
, 479)
</value>
</param>
<param>
<key>
_rotation
</key>
...
...
@@ -1222,6 +1222,85 @@
<value>
float
</value>
</param>
</block>
<block>
<key>
band_reject_filter
</key>
<param>
<key>
beta
</key>
<value>
6.76
</value>
</param>
<param>
<key>
alias
</key>
<value></value>
</param>
<param>
<key>
comment
</key>
<value></value>
</param>
<param>
<key>
affinity
</key>
<value></value>
</param>
<param>
<key>
decim
</key>
<value>
1
</value>
</param>
<param>
<key>
_enabled
</key>
<value>
1
</value>
</param>
<param>
<key>
type
</key>
<value>
fir_filter_ccf
</value>
</param>
<param>
<key>
_coordinate
</key>
<value>
(424, 451)
</value>
</param>
<param>
<key>
_rotation
</key>
<value>
0
</value>
</param>
<param>
<key>
gain
</key>
<value>
1
</value>
</param>
<param>
<key>
high_cutoff_freq
</key>
<value>
4500
</value>
</param>
<param>
<key>
id
</key>
<value>
band_reject_filter_0
</value>
</param>
<param>
<key>
interp
</key>
<value>
1
</value>
</param>
<param>
<key>
low_cutoff_freq
</key>
<value>
3500
</value>
</param>
<param>
<key>
maxoutbuf
</key>
<value>
0
</value>
</param>
<param>
<key>
minoutbuf
</key>
<value>
0
</value>
</param>
<param>
<key>
samp_rate
</key>
<value>
samp_rate
</value>
</param>
<param>
<key>
width
</key>
<value>
512
</value>
</param>
<param>
<key>
win
</key>
<value>
firdes.WIN_HAMMING
</value>
</param>
</block>
<block>
<key>
blocks_add_const_vxx
</key>
<param>
...
...
@@ -1434,7 +1513,7 @@
</param>
<param>
<key>
_coordinate
</key>
<value>
(
45
6, 493)
</value>
<value>
(
61
6, 493)
</value>
</param>
<param>
<key>
_rotation
</key>
...
...
@@ -1540,7 +1619,7 @@
</param>
<param>
<key>
cutoff_freq
</key>
<value>
2
048
</value>
<value>
2
2000 * 16 / sps
</value>
</param>
<param>
<key>
decim
</key>
...
...
@@ -1556,7 +1635,7 @@
</param>
<param>
<key>
_coordinate
</key>
<value>
(2
56
, 458)
</value>
<value>
(2
32
, 458)
</value>
</param>
<param>
<key>
_rotation
</key>
...
...
@@ -1588,7 +1667,7 @@
</param>
<param>
<key>
width
</key>
<value>
512
</value>
<value>
2048
</value>
</param>
<param>
<key>
win
</key>
...
...
@@ -1982,7 +2061,7 @@
</param>
<param>
<key>
_coordinate
</key>
<value>
(
912
, 303)
</value>
<value>
(
856
, 303)
</value>
</param>
<param>
<key>
gui_hint
</key>
...
...
@@ -2269,7 +2348,7 @@
</param>
<param>
<key>
_coordinate
</key>
<value>
(
456
, 567)
</value>
<value>
(
624
, 567)
</value>
</param>
<param>
<key>
gui_hint
</key>
...
...
@@ -2775,7 +2854,7 @@
</param>
<param>
<key>
_coordinate
</key>
<value>
(
912
, 191)
</value>
<value>
(
856
, 191)
</value>
</param>
<param>
<key>
gui_hint
</key>
...
...
@@ -3134,7 +3213,7 @@
</param>
<param>
<key>
_coordinate
</key>
<value>
(
992
, 407)
</value>
<value>
(
1136
, 407)
</value>
</param>
<param>
<key>
gui_hint
</key>
...
...
@@ -4248,7 +4327,7 @@
</param>
<param>
<key>
_coordinate
</key>
<value>
(1
112
, 196)
</value>
<value>
(1
040
, 196)
</value>
</param>
<param>
<key>
_rotation
</key>
...
...
@@ -5323,7 +5402,7 @@
</param>
<param>
<key>
_coordinate
</key>
<value>
(
32
, 458)
</value>
<value>
(
16
, 458)
</value>
</param>
<param>
<key>
_rotation
</key>
...
...
@@ -5486,7 +5565,7 @@
</param>
<param>
<key>
_coordinate
</key>
<value>
(
992
, 500)
</value>
<value>
(
1136
, 500)
</value>
</param>
<param>
<key>
_rotation
</key>
...
...
@@ -5861,6 +5940,18 @@
<source_key>
0
</source_key>
<sink_key>
1
</sink_key>
</connection>
<connection>
<source_block_id>
band_reject_filter_0
</source_block_id>
<sink_block_id>
fir_filter_xxx_0_0
</sink_block_id>
<source_key>
0
</source_key>
<sink_key>
0
</sink_key>
</connection>
<connection>
<source_block_id>
band_reject_filter_0
</source_block_id>
<sink_block_id>
qtgui_freq_sink_x_0_0
</sink_block_id>
<source_key>
0
</source_key>
<sink_key>
0
</sink_key>
</connection>
<connection>
<source_block_id>
blocks_add_const_vxx_0
</source_block_id>
<sink_block_id>
blocks_magphase_to_complex_0
</sink_block_id>
...
...
@@ -5917,13 +6008,7 @@
</connection>
<connection>
<source_block_id>
low_pass_filter_0
</source_block_id>
<sink_block_id>
fir_filter_xxx_0_0
</sink_block_id>
<source_key>
0
</source_key>
<sink_key>
0
</sink_key>
</connection>
<connection>
<source_block_id>
low_pass_filter_0
</source_block_id>
<sink_block_id>
qtgui_freq_sink_x_0_0
</sink_block_id>
<sink_block_id>
band_reject_filter_0
</sink_block_id>
<source_key>
0
</source_key>
<sink_key>
0
</sink_key>
</connection>
...
...
gnuradio/top_block.py
100644 → 100755
View file @
7203bccc
...
...
@@ -3,7 +3,7 @@
##################################################
# GNU Radio Python Flow Graph
# Title: Top Block
# Generated:
Mon
Apr
29 17:02:10
2019
# Generated:
Tue
Apr
30 16:42:31
2019
##################################################
if
__name__
==
'__main__'
:
...
...
@@ -62,7 +62,7 @@ class top_block(gr.top_block, Qt.QWidget):
##################################################
# Variables
##################################################
self
.
sps
=
sps
=
16
self
.
sps
=
sps
=
32
self
.
samp_rate
=
samp_rate
=
512000
self
.
Pmax
=
Pmax
=
1
self
.
ntaps
=
ntaps
=
11
*
sps
**
2
...
...
@@ -386,7 +386,7 @@ class top_block(gr.top_block, Qt.QWidget):
self
.
_qtgui_const_sink_x_0_win
=
sip
.
wrapinstance
(
self
.
qtgui_const_sink_x_0
.
pyqwidget
(),
Qt
.
QWidget
)
self
.
tab_layout_2
.
addWidget
(
self
.
_qtgui_const_sink_x_0_win
)
self
.
low_pass_filter_0
=
filter
.
fir_filter_ccf
(
1
,
firdes
.
low_pass
(
1
,
samp_rate
,
2
048
,
512
,
firdes
.
WIN_HAMMING
,
6.76
))
1
,
samp_rate
,
2
2000
*
16
/
sps
,
2048
,
firdes
.
WIN_HAMMING
,
6.76
))
self
.
interp_fir_filter_xxx_0
=
filter
.
interp_fir_filter_ccc
(
sps
,
(
variable_rrc_filter_taps_0
))
self
.
interp_fir_filter_xxx_0
.
declare_sample_delay
(
0
)
self
.
fir_filter_xxx_0_0
=
filter
.
fir_filter_ccc
(
sps
,
(
variable_rrc_filter_taps_0
))
...
...
@@ -395,6 +395,8 @@ class top_block(gr.top_block, Qt.QWidget):
self
.
blocks_magphase_to_complex_0
=
blocks
.
magphase_to_complex
(
1
)
self
.
blocks_complex_to_magphase_0
=
blocks
.
complex_to_magphase
(
1
)
self
.
blocks_add_const_vxx_0
=
blocks
.
add_const_vff
((
deltaPhi
*
pi
,
))
self
.
band_reject_filter_0
=
filter
.
fir_filter_ccf
(
1
,
firdes
.
band_reject
(
1
,
samp_rate
,
3500
,
4500
,
512
,
firdes
.
WIN_HAMMING
,
6.76
))
self
.
analog_const_source_x_0_1
=
analog
.
sig_source_f
(
0
,
analog
.
GR_CONST_WAVE
,
0
,
0
,
P2
)
self
.
analog_const_source_x_0_0_0
=
analog
.
sig_source_f
(
0
,
analog
.
GR_CONST_WAVE
,
0
,
0
,
P1
)
self
.
analog_const_source_x_0_0
=
analog
.
sig_source_f
(
0
,
analog
.
GR_CONST_WAVE
,
0
,
0
,
P1
)
...
...
@@ -436,6 +438,8 @@ class top_block(gr.top_block, Qt.QWidget):
self
.
connect
((
self
.
analog_const_source_x_0_0_0
,
0
),
(
self
.
NOMA_decode_cc_0_0_0
,
0
))
self
.
connect
((
self
.
analog_const_source_x_0_1
,
0
),
(
self
.
NOMA_decode_cc_0
,
1
))
self
.
connect
((
self
.
analog_const_source_x_0_1
,
0
),
(
self
.
NOMA_decode_cc_0_0_0
,
1
))
self
.
connect
((
self
.
band_reject_filter_0
,
0
),
(
self
.
fir_filter_xxx_0_0
,
0
))
self
.
connect
((
self
.
band_reject_filter_0
,
0
),
(
self
.
qtgui_freq_sink_x_0_0
,
0
))
self
.
connect
((
self
.
blocks_add_const_vxx_0
,
0
),
(
self
.
blocks_magphase_to_complex_0
,
1
))
self
.
connect
((
self
.
blocks_complex_to_magphase_0
,
1
),
(
self
.
blocks_add_const_vxx_0
,
0
))
self
.
connect
((
self
.
blocks_complex_to_magphase_0
,
0
),
(
self
.
blocks_multiply_const_vxx_1
,
0
))
...
...
@@ -445,8 +449,7 @@ class top_block(gr.top_block, Qt.QWidget):
self
.
connect
((
self
.
interp_fir_filter_xxx_0
,
0
),
(
self
.
qtgui_freq_sink_x_0
,
0
))
self
.
connect
((
self
.
interp_fir_filter_xxx_0
,
0
),
(
self
.
qtgui_time_sink_x_0
,
0
))
self
.
connect
((
self
.
interp_fir_filter_xxx_0
,
0
),
(
self
.
uhd_usrp_sink_0_0_0
,
0
))
self
.
connect
((
self
.
low_pass_filter_0
,
0
),
(
self
.
fir_filter_xxx_0_0
,
0
))
self
.
connect
((
self
.
low_pass_filter_0
,
0
),
(
self
.
qtgui_freq_sink_x_0_0
,
0
))
self
.
connect
((
self
.
low_pass_filter_0
,
0
),
(
self
.
band_reject_filter_0
,
0
))
self
.
connect
((
self
.
uhd_usrp_source_0_0_0
,
0
),
(
self
.
low_pass_filter_0
,
0
))
def
closeEvent
(
self
,
event
):
...
...
@@ -462,6 +465,7 @@ class top_block(gr.top_block, Qt.QWidget):
self
.
sps
=
sps
self
.
set_freq
(
self
.
samp_rate
/
self
.
sps
)
self
.
set_ntaps
(
11
*
self
.
sps
**
2
)
self
.
low_pass_filter_0
.
set_taps
(
firdes
.
low_pass
(
1
,
self
.
samp_rate
,
22000
*
16
/
self
.
sps
,
2048
,
firdes
.
WIN_HAMMING
,
6.76
))
def
get_samp_rate
(
self
):
return
self
.
samp_rate
...
...
@@ -469,13 +473,14 @@ class top_block(gr.top_block, Qt.QWidget):
def
set_samp_rate
(
self
,
samp_rate
):
self
.
samp_rate
=
samp_rate
self
.
set_freq
(
self
.
samp_rate
/
self
.
sps
)
self
.
band_reject_filter_0
.
set_taps
(
firdes
.
band_reject
(
1
,
self
.
samp_rate
,
3500
,
4500
,
512
,
firdes
.
WIN_HAMMING
,
6.76
))
self
.
qtgui_freq_sink_x_0
.
set_frequency_range
(
0
,
self
.
samp_rate
)
self
.
qtgui_freq_sink_x_0_0
.
set_frequency_range
(
0
,
self
.
samp_rate
)
self
.
qtgui_time_sink_x_0
.
set_samp_rate
(
self
.
samp_rate
)
self
.
qtgui_time_sink_x_0_0
.
set_samp_rate
(
self
.
samp_rate
)
self
.
uhd_usrp_sink_0_0_0
.
set_samp_rate
(
self
.
samp_rate
)
self
.
uhd_usrp_source_0_0_0
.
set_samp_rate
(
self
.
samp_rate
)
self
.
low_pass_filter_0
.
set_taps
(
firdes
.
low_pass
(
1
,
self
.
samp_rate
,
2
048
,
512
,
firdes
.
WIN_HAMMING
,
6.76
))
self
.
low_pass_filter_0
.
set_taps
(
firdes
.
low_pass
(
1
,
self
.
samp_rate
,
2
2000
*
16
/
self
.
sps
,
2048
,
firdes
.
WIN_HAMMING
,
6.76
))
def
get_Pmax
(
self
):
return
self
.
Pmax
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment