Languages

CommunityCategory: XMODELScaling the bandwidth of a channel model

XMODEL

Scaling the bandwidth of a channel model

SA Support Team Staff 2023-01-28

I’d like to simulate my high-speed transceiver model while varying the channel bandwidth, but I don’t have channel models with different bandwidths. Is there a nice way to scale the bandwidth of a given channel model?

1 Answers
SA Support Team Staff 2023-01-28

There is indeed a cool way to scale the bandwidth of a given channel model. If you have extracted your channel model from an S-parameter file using the 'sparam_to_tf' utility, the resulting parameter file may contain contents that look like this:

# XMODEL_PARAMFILE 1.0
# PRIMITIVE: filter

delay = 1.88257e-09
data = [
    1.99708e+09, 0, 4.00803e+08, 0, 1,
    1.75743e+10, 0, 1.68503e+10, 0, 1,
    2.80447e+10, 5.09226e+10, -7.91679e+09, -2.18534e+09, 1,
    2.80447e+10, -5.09226e+10, -7.91679e+09, 2.18534e+09, 1,
]

This file defines the 'delay' and 'data' parameters for a 'filter' or 'tline' primitive using the Python syntax. Among them, the 'data' parameter defines the s-domain transfer function H(s) of the channel using a sequence of 5 values, namely: areal, aimag, breal, bimag, and m.

Note that if this channel has a bandwidth of B, then a new channel with a transfer function of H(s/k) would have the bandwidth equal to k·B! In other words, to scale the bandwidth by a factor of k, all we need is to scale the areal and aimag values by a factor k and the breal and bimag values by a factor km, respectively.

Since the 'filter' and 'tline' primitives actually use an embedded Python interpreter to retrieve the parameter values from this file, it is possible to insert some Python codes that can do this scaling. For example, you can add the following codes at the end to scale the bandwidth of the channel by a factor of k (e.g. k=2.0 in this example):

# XMODEL_PARAMFILE 1.0
# PRIMITIVE: filter

delay = 1.88257e-09
data = [
    1.99708e+09, 0, 4.00803e+08, 0, 1,
    1.75743e+10, 0, 1.68503e+10, 0, 1,
    2.80447e+10, 5.09226e+10, -7.91679e+09, -2.18534e+09, 1,
    2.80447e+10, -5.09226e+10, -7.91679e+09, 2.18534e+09, 1,
]

# scaling bandwidth by k
k = 2.0

for i in range(len(data)/5):
    ar, ai, br, bi, m = data[5*i:5*i+5]
    data[5*i:5*i+5] = ar*k, ai*k, br*(k**m), bi*(k**m), m

In case your parameter file is extracted by the 'sparam_to_tline' utility, you may notice that its 'data' parameter has a slightly different format in order to define multiple transfer functions between the ports. You can insert the following codes at the end to scale the bandwidth of all the transfer functions by a factor of k.

# XMODEL_PARAMFILE 1.0
# PRIMITIVE: stline

num_port = 4
Z0 = ["R50", "R50", "R50", "R50"]

ports = [
    2, 1,
    1, 2,
    4, 3,
    4, 3,
    3, 4,
]

data = [
    4,
    1.653125e+09, 0.000000e+00, 3.190044e+08, 0.000000e+00, 1,
    1.347498e+10, 0.000000e+00, 1.252699e+10, 0.000000e+00, 1,
    2.006049e+10, 3.792898e+10, -5.879994e+09, -6.646469e+08, 1,
    2.006049e+10, -3.792898e+10, -5.879994e+09, 6.646469e+08, 1,
    8,
    1.673384e+09, 0.000000e+00, 3.172491e+08, 0.000000e+00, 1,
    1.682759e+09, 8.601975e+09, -1.648258e+07, -1.530915e+07, 1,
    1.682759e+09, -8.601975e+09, -1.648258e+07, 1.530915e+07, 1,
    1.388549e+10, 0.000000e+00, 1.341879e+10, 0.000000e+00, 1,
    2.282397e+10, 3.723116e+10, -6.751106e+09, -5.715521e+08, 1,
    2.282397e+10, -3.723116e+10, -6.751106e+09, 5.715521e+08, 1,
    8.626040e+09, 6.487185e+10, 3.048218e+08, -1.141305e+08, 1,
    8.626040e+09, -6.487185e+10, 3.048218e+08, 1.141305e+08, 1,

    # ... the rest is omitted for brevity
]

# scaling bandwidth by k
k = 2.0

idx = 0
for i in range(len(ports)/2):
    for j in range(data[idx]):
        ar, ai, br, bi, m = data[idx+5*j+1:idx+5*j+6]
        data[idx+5*j+1:idx+5*j+6] = ar*k, ai*k, br*(k**m), bi*(k**m), m
    idx += 5*data[idx]+1

I hope this provides a handy way of varying the bandwidth of a given channel while simulating your high-speed transceiver model.

XMODEL

채널 모델의 대역폭을 스케일링하는 법

SA Support Team Staff 2023-01-28

제 고속인터페이스 모델을 채널의 대역폭을 변화시키면서 시뮬레이션해보고 싶은데, 다양한 대역폭의 채널 모델들을 가지고 있질 않습니다. 주어진 채널 모델의 대역폭을 스케일링할 수 있는 방법이 있을까요?

1 Answers
SA Support Team Staff 2023-01-28

There is indeed a cool way to scale the bandwidth of a given channel model. If you have extracted your channel model from an S-parameter file using the 'sparam_to_tf' utility, the resulting parameter file may contain contents that look like this:

# XMODEL_PARAMFILE 1.0
# PRIMITIVE: filter

delay = 1.88257e-09
data = [
    1.99708e+09, 0, 4.00803e+08, 0, 1,
    1.75743e+10, 0, 1.68503e+10, 0, 1,
    2.80447e+10, 5.09226e+10, -7.91679e+09, -2.18534e+09, 1,
    2.80447e+10, -5.09226e+10, -7.91679e+09, 2.18534e+09, 1,
]

This file defines the 'delay' and 'data' parameters for a 'filter' or 'tline' primitive using the Python syntax. Among them, the 'data' parameter defines the s-domain transfer function H(s) of the channel using a sequence of 5 values, namely: areal, aimag, breal, bimag, and m.

Note that if this channel has a bandwidth of B, then a new channel with a transfer function of H(s/k) would have the bandwidth equal to k·B! In other words, to scale the bandwidth by a factor of k, all we need is to scale the areal and aimag values by a factor k and the breal and bimag values by a factor km, respectively.

Since the 'filter' and 'tline' primitives actually use an embedded Python interpreter to retrieve the parameter values from this file, it is possible to insert some Python codes that can do this scaling. For example, you can add the following codes at the end to scale the bandwidth of the channel by a factor of k (e.g. k=2.0 in this example):

# XMODEL_PARAMFILE 1.0
# PRIMITIVE: filter

delay = 1.88257e-09
data = [
    1.99708e+09, 0, 4.00803e+08, 0, 1,
    1.75743e+10, 0, 1.68503e+10, 0, 1,
    2.80447e+10, 5.09226e+10, -7.91679e+09, -2.18534e+09, 1,
    2.80447e+10, -5.09226e+10, -7.91679e+09, 2.18534e+09, 1,
]

# scaling bandwidth by k
k = 2.0

for i in range(len(data)/5):
    ar, ai, br, bi, m = data[5*i:5*i+5]
    data[5*i:5*i+5] = ar*k, ai*k, br*(k**m), bi*(k**m), m

In case your parameter file is extracted by the 'sparam_to_tline' utility, you may notice that its 'data' parameter has a slightly different format in order to define multiple transfer functions between the ports. You can insert the following codes at the end to scale the bandwidth of all the transfer functions by a factor of k.

# XMODEL_PARAMFILE 1.0
# PRIMITIVE: stline

num_port = 4
Z0 = ["R50", "R50", "R50", "R50"]

ports = [
    2, 1,
    1, 2,
    4, 3,
    4, 3,
    3, 4,
]

data = [
    4,
    1.653125e+09, 0.000000e+00, 3.190044e+08, 0.000000e+00, 1,
    1.347498e+10, 0.000000e+00, 1.252699e+10, 0.000000e+00, 1,
    2.006049e+10, 3.792898e+10, -5.879994e+09, -6.646469e+08, 1,
    2.006049e+10, -3.792898e+10, -5.879994e+09, 6.646469e+08, 1,
    8,
    1.673384e+09, 0.000000e+00, 3.172491e+08, 0.000000e+00, 1,
    1.682759e+09, 8.601975e+09, -1.648258e+07, -1.530915e+07, 1,
    1.682759e+09, -8.601975e+09, -1.648258e+07, 1.530915e+07, 1,
    1.388549e+10, 0.000000e+00, 1.341879e+10, 0.000000e+00, 1,
    2.282397e+10, 3.723116e+10, -6.751106e+09, -5.715521e+08, 1,
    2.282397e+10, -3.723116e+10, -6.751106e+09, 5.715521e+08, 1,
    8.626040e+09, 6.487185e+10, 3.048218e+08, -1.141305e+08, 1,
    8.626040e+09, -6.487185e+10, 3.048218e+08, 1.141305e+08, 1,

    # ... the rest is omitted for brevity
]

# scaling bandwidth by k
k = 2.0

idx = 0
for i in range(len(ports)/2):
    for j in range(data[idx]):
        ar, ai, br, bi, m = data[idx+5*j+1:idx+5*j+6]
        data[idx+5*j+1:idx+5*j+6] = ar*k, ai*k, br*(k**m), bi*(k**m), m
    idx += 5*data[idx]+1

I hope this provides a handy way of varying the bandwidth of a given channel while simulating your high-speed transceiver model.