GNU Radio World

PySDR: 4-FSK and Frequency Spacing

Companion to the Digital Modulation chapter of PySDR

Press Load to open this flowgraph in an editor embedded above, then ▶ to run it. Nothing is downloaded until you do.

Open in the full editor ▶ Download the .grc

Blocks used

BlockModuleUsed
VariableGNU Radio2
Chunks to SymbolsGNU Radio1
Frequency ModGNU Radio1
GUI LayoutGNU Radio1
NoteGNU Radio1
QT GUI Frequency SinkGNU Radio1
QT GUI RangeGNU Radio1
QT GUI Waterfall SinkGNU Radio1
Random Uniform SourceGNU Radio1
RepeatGNU Radio1
Scalar Multiply ConstGNU Radio1
ThrottleGNU Radio1

Notes in this flowgraph

Flowgraph source

digital/digital_modulation_fsk.grc
options:
    parameters:
        author: Marc
        comment: ''
        copyright: ''
        description: Companion to the Digital Modulation chapter of PySDR
        generate_options: qt_gui
        id: PySDR__4_FSK_and_Frequency_Spacing
        title: 'PySDR: 4-FSK and Frequency Spacing'
    states:
        coordinate: [10, 10]
        rotation: 0
        state: enabled
blocks:
-   name: delta_f
    id: variable_qtgui_range
    parameters:
        comment: ''
        label: Frequency spacing, delta f (Hz)
        min_len: '200'
        orient: QtCore.Qt.Horizontal
        rangeType: float
        start: '500'
        step: '500'
        stop: '50000'
        value: '10000'
        widget: counter_slider
    states:
        coordinate: [770, 20]
        rotation: 0
        state: enabled
-   name: samp_rate
    id: variable
    parameters:
        comment: ''
        value: '200000'
    states:
        coordinate: [1060, 20]
        rotation: 0
        state: enabled
-   name: sps
    id: variable
    parameters:
        comment: ''
        value: '100'
    states:
        coordinate: [1060, 130]
        rotation: 0
        state: enabled
-   name: deviation
    id: blocks_multiply_const_xx
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        constant: delta_f
        maxoutbuf: '0'
        minoutbuf: '0'
        type: float
    states:
        coordinate: [1130, 270]
        rotation: 0
        state: enabled
-   name: fm_mod
    id: analog_frequency_modulator_fc
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        maxoutbuf: '0'
        minoutbuf: '0'
        sensitivity: math.pi/samp_rate
    states:
        coordinate: [1400, 270]
        rotation: 0
        state: enabled
-   name: freq_sink
    id: qtgui_freq_sink_x
    parameters:
        affinity: ''
        alias: ''
        alpha1: '1'
        alpha10: '1'
        alpha2: '1'
        alpha3: '1'
        alpha4: '1'
        alpha5: '1'
        alpha6: '1'
        alpha7: '1'
        alpha8: '1'
        alpha9: '1'
        autoscale: 'False'
        average: '0.2'
        axislabels: 'True'
        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: '1024'
        freqhalf: 'True'
        grid: 'True'
        label1: ''
        label10: ''
        label2: ''
        label3: ''
        label4: ''
        label5: ''
        label6: ''
        label7: ''
        label8: ''
        label9: ''
        legend: 'True'
        marker1: '-1'
        marker10: '-1'
        marker2: '-1'
        marker3: '-1'
        marker4: '-1'
        marker5: '-1'
        marker6: '-1'
        marker7: '-1'
        marker8: '-1'
        marker9: '-1'
        maxoutbuf: '0'
        minoutbuf: '0'
        name: Four tones, delta f apart
        nconnections: '1'
        samp_rate: samp_rate
        style1: '1'
        style10: '1'
        style2: '1'
        style3: '1'
        style4: '1'
        style5: '1'
        style6: '1'
        style7: '1'
        style8: '1'
        style9: '1'
        tr_chan: '0'
        tr_level: '0'
        tr_mode: qtgui.TRIG_MODE_FREE
        tr_tag: ''
        type: complex
        update_time: '0.1'
        width1: '1'
        width10: '1'
        width2: '1'
        width3: '1'
        width4: '1'
        width5: '1'
        width6: '1'
        width7: '1'
        width8: '1'
        width9: '1'
        ymax: '10'
        ymin: '-100'
    states:
        coordinate: [450, 390]
        rotation: 0
        state: enabled
-   name: hold_symbol
    id: blocks_repeat
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        interp: sps
        maxoutbuf: '0'
        minoutbuf: '0'
        type: float
        vlen: '1'
    states:
        coordinate: [850, 270]
        rotation: 0
        state: enabled
-   name: note_dev
    id: note
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        note: "Random 2-bit symbols map to the four levels -3, -1, 1, 3 and each is held for 100 samples, so the symbol rate is 2 kBd\n\nFrequency modulating those levels puts four tones on the air, spaced delta f apart. Slide it and watch the tones separate in the spectrum and the waterfall"
    states:
        coordinate: [320, 20]
        rotation: 0
        state: enabled
-   name: random_symbols
    id: analog_random_uniform_source_x
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        maximum: '4'
        maxoutbuf: '0'
        minimum: '0'
        minoutbuf: '0'
        seed: '0'
        type: byte
    states:
        coordinate: [20, 250]
        rotation: 0
        state: enabled
-   name: symbol_map
    id: digital_chunks_to_symbols_xx
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        dimension: '1'
        in_type: byte
        maxoutbuf: '0'
        minoutbuf: '0'
        num_ports: '1'
        out_type: float
        symbol_table: '[-3, -1, 1, 3]'
    states:
        coordinate: [500, 260]
        rotation: 0
        state: enabled
-   name: throttle
    id: blocks_throttle2
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        ignoretag: 'True'
        limit: auto
        maximum: '0.1'
        maxoutbuf: '0'
        minoutbuf: '0'
        samples_per_second: samp_rate
        type: complex
        vlen: '1'
    states:
        coordinate: [90, 410]
        rotation: 0
        state: enabled
-   name: wasm_gui_layout_0
    id: wasm_gui_layout
    parameters:
        affinity: ''
        alias: ''
        columns: '12'
        comment: ''
        layout: '{"delta_f":[0,0,12,1],"freq_sink":[0,1,12,3],"waterfall_sink":[0,4,12,3]}'
        row_height: '60'
    states:
        coordinate: [1250, 30]
        rotation: 0
        state: enabled
-   name: waterfall_sink
    id: qtgui_waterfall_sink_x
    parameters:
        affinity: ''
        alias: ''
        alpha1: '1'
        alpha10: '1'
        alpha2: '1'
        alpha3: '1'
        alpha4: '1'
        alpha5: '1'
        alpha6: '1'
        alpha7: '1'
        alpha8: '1'
        alpha9: '1'
        average: '1.0'
        axislabels: 'True'
        color1: '0'
        color10: '0'
        color2: '0'
        color3: '0'
        color4: '0'
        color5: '0'
        color6: '0'
        color7: '0'
        color8: '0'
        color9: '0'
        comment: ''
        fc: '0'
        fftsize: '1024'
        grid: 'False'
        int_max: '0'
        int_min: '-100'
        label1: ''
        label10: ''
        label2: ''
        label3: ''
        label4: ''
        label5: ''
        label6: ''
        label7: ''
        label8: ''
        label9: ''
        legend: 'True'
        maxoutbuf: '0'
        minoutbuf: '0'
        name: Symbols over time
        nconnections: '1'
        samp_rate: samp_rate
        update_time: '0.1'
    states:
        coordinate: [450, 580]
        rotation: 0
        state: enabled
connections:
- [deviation, '0', fm_mod, '0']
- [fm_mod, '0', throttle, '0']
- [hold_symbol, '0', deviation, '0']
- [random_symbols, '0', symbol_map, '0']
- [symbol_map, '0', hold_symbol, '0']
- [throttle, '0', freq_sink, '0']
- [throttle, '0', waterfall_sink, '0']
metadata:
    file_format: 1
    grc_version: 3.11.0.0