blob: 7811f0b40184cfc0ac7314f4c7f0247e4b23d7a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
id: variable_adaptive_algorithm
label: Adaptive Algorithm
flags: [ show_id, python ]
parameters:
- id: type
label: Algorithm Type
dtype: enum
options: [lms, nlms, cma]
option_labels: [LMS, NLMS, CMA]
- id: cons
label: Digital Constellation Object
dtype: raw
hide: 'part'
- id: step_size
label: Step Size
dtype: float
default: '.0001'
hide: 'none'
- id: modulus
label: Modulus
dtype: int
default: 2
hide: ${ ( 'none' if str(type) == "cma" else 'all') }
- id: ffactor
label: Forgetting Factor
dtype: float
default: .99
hide: ${ ( 'none' if str(type) == "rls" else 'all') }
- id: delta
label: Delta
dtype: float
default: 10.0
hide: ${ ( 'none' if str(type) == "rls" else 'all') }
value: |-
${ (digital.adaptive_algorithm_lms(cons.base(), step_size)) }
templates:
imports: from gnuradio import digital
var_make: |-
% if str(type) == "lms" or str(type) == "nlms":
self.${id} = ${id} = digital.adaptive_algorithm_${type}( ${cons}, ${step_size}).base()
% elif str(type) == "cma":
self.${id} = ${id} = digital.adaptive_algorithm_${type}( ${cons}, ${step_size}, ${modulus}).base()
% elif str(type) == "rls":
self.${id} = ${id} = digital.adaptive_algorithm_${type}( ${cons}, ${ffactor}, ${delta}).base()
% endif
file_format: 1
|