Radio-Frequency Chain¶

- class RFChain(seed=None)[source]¶
Bases:
RandomNode,SerializableRepresentation of a block-base radio-frequency front-end.
- Parameters:
seed (
int|None) – Seed with which to initialize the radio-frequency chain’s random state.
- classmethod Deserialize(process)[source]¶
Deserialize an object’s state.
Objects cannot be deserialized directly, instead a
Factorymust be instructed to carry out the deserialization process.- Parameters:
process (
DeserializationProcess) – The current stage of the deserialization process. This object is generated by theFactoryand provides an interface to deserialization methods supporting multiple backends.- Return type:
- Returns:
The deserialized object.
- add_block(block)[source]¶
Add a new radio-frequency block to the chain.
The same block configuration can be added multiple times, each time creating a new
BlockReferenceinstance.- Parameters:
block (
TypeVar(RFBT, bound=RFBlock)) – The radio-frequency block to add to the chain.- Return type:
RFBlockReference[TypeVar(RFBT, bound=RFBlock)]
Returns: A reference to the added block.
- add_blocks(block, count)[source]¶
Add multiple identical blocks the radio-frequency chain.
- Parameters:
- Return type:
list[RFBlockReference[TypeVar(RFBT, bound=RFBlock)]]
Returns: List of references to the added blocks.
- connect(port_a, port_b)[source]¶
Connect an output port of one block to an input port of another block.
- Parameters:
port_a (
RFBlockPortReference) – First port to connect.port_b (
RFBlockPortReference) – Second port to connect.
- Raises:
ValueError – If two ports of the same type are connected.
- Return type:
- new_block(block, **kwargs)[source]¶
Initialize a new radio-frequency block instance and add it to the chain.
- new_blocks(block, count, **kwargs)[source]¶
Initialize multiple identical radio-frequency block instances and add them to the chain.
- Parameters:
- Return type:
list[RFBlockReference[TypeVar(RFBT, bound=RFBlock)]]
Returns: List of references to the newly created blocks.
- realize(bandwidth, oversampling_factor, carrier_frequency)[source]¶
Realize the radio-frequency chain.
- Parameters:
- Return type:
Returns: An instance of
RFChainRealizationrepresenting the realized chain.
- receive(rf_input, realization)[source]¶
Receive a signal through the radio-frequency chain.
- Parameters:
rf_input (
RFSignal|DenseSignal) – Samples received by the radio-frequency chain.realization (
RFChainRealization) – Realization of the radio-frequency chain.
- Return type:
- Returns:
The output signal after propagation through the radio-frequency chain.
- serialize(process)[source]¶
Serialize this object’s state.
Objects cannot be serialized directly, instead a
Factorymust be instructed to carry out the serialization process.- Parameters:
process (
SerializationProcess) – The current stage of the serialization process. This object is generated by theFactoryand provides an interface to serialization methods supporting multiple backends.- Return type:
- transmit(dsp_output, realization)[source]¶
Transmit a signal through the radio-frequency chain.
- Parameters:
dsp_output (
DenseSignal|RFSignal) – Samples generated by the transmitting DSP layer.realization (
RFChainRealization) – Realization of the radio-frequency chain.
- Return type:
- Returns:
The output signal after propagation through the radio-frequency chain.
- class RFChainRealization(bandwidth, oversampling_factor, carrier_frequency, block_states)[source]¶
Bases:
objectRealization of a radio-frequency chain.
- Parameters:
bandwidth (
float) – Simulation bandwidth of the chain in Hz.oversampling_factor (
int) – Oversampling factor of the chain’s modeling.carrier_frequency (
float) – Target carrier frequency of the modeled radio-frequency chain in Hz.block_states (
dict[RFBlockReference,RFBlockRealization]) – Dictionary mapping block references to their states.
- property block_states: dict[RFBlockReference, RFBlockRealization][source]¶
List of realizations for each block in the radio-frequency chain.
- class RFBlockReference(block)[source]¶
Bases:
Generic[RFBT],SerializableReference to a radio-frequency block within a radio-frequency chain.
- classmethod Deserialize(process)[source]¶
Deserialize an object’s state.
Objects cannot be deserialized directly, instead a
Factorymust be instructed to carry out the deserialization process.- Parameters:
process (
DeserializationProcess) – The current stage of the deserialization process. This object is generated by theFactoryand provides an interface to deserialization methods supporting multiple backends.- Return type:
- Returns:
The deserialized object.
- connect_from(output, output_ports, input_ports)[source]¶
Connect this block to another block’s input ports.
- connect_to(input, output_ports, input_ports)[source]¶
Connect this block’s output ports to another block’s input ports.
- incoming_block_index(block)[source]¶
Get the index of the incoming block in the list of incoming connections.
- Parameters:
block (
RFBlockReference) – The radio-frequency block reference to find in the incoming connections.- Return type:
Returns: The index of the incoming block in the list of incoming connections.
- port(name)[source]¶
Get a reference to a port or group of ports by name.
- Parameters:
name (
str) – Name of the port or group of ports to access. The name resolves to an attribute of the referenced of typeRFBlockPort.- Return type:
RFBlockPortReference[TypeVar(RFBT, bound=RFBlock)]- Returns:
A reference to the requested port or group of ports.
- Raises:
AttributeError – If the requested port or group of ports does not exist.
- propagate(state, input)[source]¶
Propagate a signal through the referenced block.
- Parameters:
state (
RFBlockRealization) – The state of the referenced block.input (
RFSignal) – The input signal to propagate through the block.
- Return type:
Returns: The output signal after propagation through the block.
- serialize(process)[source]¶
Serialize this object’s state.
Objects cannot be serialized directly, instead a
Factorymust be instructed to carry out the serialization process.- Parameters:
process (
SerializationProcess) – The current stage of the serialization process. This object is generated by theFactoryand provides an interface to serialization methods supporting multiple backends.- Return type:
- property incoming_connections: OrderedDict[RFBlockReference, tuple[list[int], list[int]]][source]¶
Dictionary of blocks connected to this block’s input ports.
The map’s keys are references to connected blocks. The map’s values are tuples containing: * A list of outgoing port indices from the connected block. * A list of incoming port indices to this block.
- property outgoing_connections: OrderedDict[RFBlockReference, tuple[list[int], list[int]]][source]¶
Dictionary of blocks connected to this block’s output ports.
The map’s keys are references to connected blocks. The map’s values are tuples containing: * A list of outgoing port indices from this block. * A list of incoming port indices to the connected block.
- class RFBlockPortReference(block_reference, port_indices, port_type)[source]¶
Bases:
Generic[RFBT],RFBlockPort[RFBT]Reference to a port or a group of ports of a radio-frequency block.
- Parameters:
block_reference (
RFBlockReference[TypeVar(RFBT, bound=RFBlock)]) – Reference to the radio-frequency block this port belongs to.port_indices (
SupportsInt|Iterable[int]) – Integer index or sequence of indices of the represented port(s).port_type (
RFBlockPortType) – Type of the port, either input or output.
- property block_reference: RFBlockReference[RFBT][source]¶
Reference to the radio-frequency block this port belongs to.