2026a

# constellation


计算或绘制理想信号星座图

函数库: TyCommunication

# 语法

symbols = constellation(obj)
constellation(obj; plotfig=true)

# 说明

symbols = constellation(obj) 返回星座图的数值。


constellation(obj; plotfig=true) 生成结构体的星座图。

# 示例

绘制 QPSK 参考星座图

创建一个 QPSK 调制器。

using TyCommunication

mod = comm_QPSKModulator()

确定参考星座点。

refc = constellation(mod)
4×1 transpose(::Matrix{ComplexF64}) with eltype ComplexF64:
  0.7071067811865476 + 0.7071067811865475im
 -0.7071067811865475 + 0.7071067811865476im
 -0.7071067811865476 - 0.7071067811865475im
  0.7071067811865475 - 0.7071067811865476im

绘制星座图。

constellation(mod; plotfig=true)

为比特输入重新配置对象,并绘制星座图以显示格雷编码映射的二进制值。

release(mod)
mod.BitInput = true
constellation(mod; plotfig=true)

创建一个 QPSK 解调器并将相位偏移设置为 0。

demod = comm_QPSKDemodulator(; PhaseOffset=0)

绘制参考星座图。constellation 方法对调制器和解调器结构体均适用。

constellation(demod; plotfig=true)
绘制 PSK 参考星座图

创建一个 PSK 调制器

using TyCommunication

mod = comm_PSKModulator(;)

确定参考星座点。

refc = constellation(mod)
8×1 Matrix{ComplexF64}:
   0.9238795325112867 + 0.3826834323650898im
  0.38268343236508984 + 0.9238795325112867im
  -0.3826834323650897 + 0.9238795325112867im
  -0.9238795325112867 + 0.3826834323650899im
  -0.9238795325112868 - 0.38268343236508967im
 -0.38268343236509034 - 0.9238795325112865im
     0.38268343236509 - 0.9238795325112866im
   0.9238795325112865 - 0.3826834323650904im

绘制星座图。

constellation(mod; plotfig=true)

创建一个 PSK 解调器并设置调制阶数为 16。

demod = comm_PSKDemodulator(; ModulationOrder=16)

绘制参考星座图。constellation 方法对调制器和解调器结构体均适用。

constellation(demod; plotfig=true)
绘制 BPSK 参考星座图

创建一个 BPSK 调制器。

using TyCommunication

mod = comm_BPSKModulator()

确定参考星座点。

refc = constellation(mod)
2×1 Matrix{ComplexF64}:
  1.0 + 0.0im
 -1.0 + 1.2246467991473532e-16im

绘制星座图。

constellation(mod; plotfig=true)

创建一个 BPSK 解调器并设置相位偏移为

demod = comm_BPSKDemodulator(; PhaseOffset=pi / 2)

确定参考星座点。

refc = constellation(demod)
2×1 Matrix{ComplexF64}:
   6.123233995736766e-17 + 1.0im
 -1.8369701987210297e-16 - 1.0im

绘制参考星座图。constellation 方法对调制器和解调器结构体均适用。

constellation(demod; plotfig=true)
绘制 OQPSK 参考星座图

创建一个 OQPSK 调制器。

using TyCommunication

mod = comm_OQPSKModulator()

确定参考星座点。显示的星座点没有描述 OQPSK 调制器引入的 IQ 延迟。

refc = constellation(mod)
4×1 transpose(::Matrix{ComplexF64}) with eltype ComplexF64:
  0.7071067811865476 + 0.7071067811865475im
 -0.7071067811865475 + 0.7071067811865476im
 -0.7071067811865476 - 0.7071067811865475im
  0.7071067811865475 - 0.7071067811865476im

绘制星座图。

constellation(mod; plotfig=true)

改变调制器对象的相位偏移。绘制星座图以展示旋转后的星座点。

release(mod)
mod.PhaseOffset = 45 * pi / 180
refc = constellation(mod; plotfig=true)

# 输入参数

obj - 返回星座图对应的系统对象
系统对象

返回星座图对应的系统对象,指定为 PSK,BPSK,QPSK 或 OQPSK 的调制器或解调器对象。

# 输出参数

symbols - 星座点
复向量

星座点,以复向量形式返回。

# 另请参阅

comm_PSKModulator | comm_BPSKModulator