modulator
Creates a two-port modulator.
| Library |
|
Syntax
Function call
-
mod = modulator()— creates a modulator object, the properties of which are set by default.
-
mod = modulator(Name=Value)— creates a modulator object with properties specified by one or more arguments of the typeName=Value. Unspecified properties retain their default values.
Arguments
Name-value input arguments
# Name — name of the modulator
+
"Modulator" (default) | line
Details
The name of the modulator. All names must be valid variable names.
| Типы данных |
|
# Model — type of conversion
+
"mod" (by default) | "demod"
Details
The type of conversion specified by one of the following values:
-
"mod"— modulator; -
"demod"— demodulator.
| Типы данных |
|
# Gain — consistent gain factor, dB
+
0 (default) | a non-negative scalar
Details
The agreed gain in dB, set as a non-negative scalar.
| Типы данных |
|
# NF — noise level, dB
+
0 (by default) | a real non-negative scalar
Details
The noise factor in dB, set as a real non-negative scalar.
| Типы данных |
|
# OIP2 is the point at which the power of the second—order intermodulation distortion would be equal to the power of the useful signal when extrapolating linear growth, dBm
+
Inf (by default) | the real scalar
Details
The point at which the power of the second-order intermodulation distortion would be equal to the power of the useful signal when extrapolating linear growth, in dBm, given as a real scalar.
| Типы данных |
|
# OIP3 is the intersection point at which the power of third—order intermodulation distortion would be equal to the power of the useful signal when extrapolating linear growth, dBm
+
Inf (by default) | the real scalar
Details
The intersection point at which the power of third-order intermodulation distortion would be equal to the power of the useful signal when extrapolating linear growth, in dBm, given as a real scalar.
| Типы данных |
|
# LO is the frequency of the reference oscillator, Hz
+
1e9 (by default) | a real positive scalar
Details
The frequency of the reference oscillator in Hz, set as a real finite positive scalar.
| Типы данных |
|
# ImageReject — mirror channel suppression
+
true (by default) | false
Details
Enables or disables mirror channel suppression at the modulator input. Setting the value false It may affect the accuracy and speed of calculations when modeling using the harmonic balance method.
| Типы данных |
|
# ChannelSelect — channel selection (channel selection)
+
true (by default) | false
Details
Enables or disables the selection (selection) of the working channel at the input of the modulator. Setting the value false It may affect the accuracy and speed of calculations when modeling using the harmonic balance method.
| Типы данных |
|
# Zin — input resistance, ohms
+
50 (by default) | a finite scalar with a positive real part
Details
Input resistance in ohms, set as a finite scalar. You can also use a complex value with a positive real part.
# Zout — output resistance, ohms
+
50 (default) | a finite scalar with a positive real part
Details
The output resistance in ohms, set as a finite scalar. You can also use a complex value with a positive real part.
# NumPorts — number of ports
+
2 (default) | scalar
Details
The number of ports specified as an integer scalar.
| This argument is read-only. |
| Типы данных |
|
# Terminals — terminal names
+
("p1+", "p2+", "p1−", "p2−") (by default) | tuple of strings
Details
Terminal names specified as a tuple of strings.
| This argument is read-only. |
Examples
Creating a modulator with default properties
Details
Let’s create a modulator and display its properties.
using EngeeRF
mod = modulator()
println("Name: ", mod.Name)
println("Model: ", mod.Model)
println("Gain: ", mod.Gain)
println("NF: ", mod.NF)
println("OIP2: ", mod.OIP2)
println("OIP3: ", mod.OIP3)
println("Zin: ", mod.Zin)
println("Zout: ", mod.Zout)
println("LO: ", mod.LO)
println("ImageReject: ", mod.ImageReject)
println("ChannelSelect: ", mod.ChannelSelect)
println("NumPorts: ", mod.NumPorts)
println("Terminals: ", mod.Terminals)
Name: Modulator
Model: Mod
Gain: 0.0
NF: 0.0
OIP2: Inf
OIP3: Inf
Zin: 50.0 + 0.0im
Zout: 50.0 + 0.0im
LO: 1.0e9
ImageReject: true
ChannelSelect: true
NumPorts: 2
Terminals: ("p1+", "p2+", "p1-", "p2-")
Modulator circuit
Details
Creating a modulator object with a gain factor (Gain) 4 dB and the frequency of the reference oscillator (LO) 2 GHz. Let’s create another modulator object with a third-order intersection output current (OIP3) — 13 dBm. Let’s build a two-port circuit using these modulators.
using EngeeRF
mod1 = modulator(Gain=4, LO=2e9, Name="mod1")
mod2 = modulator(OIP3=13, Name="mod2")
hckt = circuit("new_circuit")
add(hckt,[1 2],mod1)
add(hckt,[2 3],mod2)
println(hckt)
circuit(ElementNames = ("mod1", "mod2"), Name = "new_circuit", Elements = DataType[modulator, modulator], Nodes = [0, 1, 2, 3], NumPorts = 0)