Languages

CommunityCategory: XMODELModeling a mathematical function with saturation limits

XMODEL

Modeling a mathematical function with saturation limits

SA Support Team Staff 2020-06-29

I am modeling a power amplifier with distortion. While a common way is to use a high-order polynomial function derived from a Taylor series expansion, one problem with it is that it is valid only for a limited input range. Beyond that range, the polynomial function can give a wrong output that either increases or decreases without bounds. Can I apply the polynomial function only for a limited input range and keep its output saturated outside that range?

1 Answers
Best Answer
SA Support Team Staff 2020-06-29

Yes, there is a really simple way to do this. Just put a 'limit' primitive before the 'poly_func' primitive. In fact, you can put the 'limit' primitive either before or after any mathematical function primitives to limit their input or output ranges. Please refer to this link for more information on the 'limit' primitive.

Let's suppose that you want to model a power amplifier with a moderate distortion using a polynomial function y=3x–x³. While this function well describes the amplifier's gain compression behavior when the input x is between -1 and 1, it gives a misleading output when the input x is out of this range, as shown in blue below. A more realistic amplifier would produce a saturated output instead as shown in red.

The model below is an example of modeling such a realistic amplifier by putting a 'limit' primitive before the 'poly_func' primitive. When the input is within the bounds of the 'limit' primitive (set by its parameters 'upper_limit' and 'lower_limit'), the input passes to the 'poly_func' primitive as-is and the final output follows that of the polynomial function. On the other hand, when the input is out of the bounds, the input passed to the 'poly_func' primitive is kept at the specified limit, effectively saturating the final output.

The simulated waveforms below illustrate how this model response to a triangular input waveform with a gradually-increasing amplitude. As expected, the model exhibits both the distortion effect described by the 'poly_func' primitive and the saturation effect described by the 'limit' primitive.

XMODEL

포화한계가 정해진 함수 모델링하는 법

SA Support Team Staff 2020-06-29

저는 파워앰프의 왜곡현상이 반영된 모델을 만들려고 합니다. 가장 많이 쓰이는 방법은 파워앰프를 Taylor 전개로 유도한 고차 다항식 함수로 모델링하는 것입니다만, 이 경우의 문제는 그 다항식 함수는 제한된 입력 범위에서만 유효하고, 그 범위 밖에서는 끝없이 증가하거나 감소하는 등 잘못된 출력값을 낼 수 있다는 것입니다. 다항식 함수를 정해진 입력 범위 안에서만 적용하고, 그 범위 밖에서는 포화된, 즉 고정된 출력을 내도록 모델을 구성할 수 있을까요?

1 Answers
Best Answer
SA Support Team Staff 2020-06-29

Yes, there is a really simple way to do this. Just put a 'limit' primitive before the 'poly_func' primitive. In fact, you can put the 'limit' primitive either before or after any mathematical function primitives to limit their input or output ranges. Please refer to this link for more information on the 'limit' primitive.

Let's suppose that you want to model a power amplifier with a moderate distortion using a polynomial function y=3x–x³. While this function well describes the amplifier's gain compression behavior when the input x is between -1 and 1, it gives a misleading output when the input x is out of this range, as shown in blue below. A more realistic amplifier would produce a saturated output instead as shown in red.

The model below is an example of modeling such a realistic amplifier by putting a 'limit' primitive before the 'poly_func' primitive. When the input is within the bounds of the 'limit' primitive (set by its parameters 'upper_limit' and 'lower_limit'), the input passes to the 'poly_func' primitive as-is and the final output follows that of the polynomial function. On the other hand, when the input is out of the bounds, the input passed to the 'poly_func' primitive is kept at the specified limit, effectively saturating the final output.

The simulated waveforms below illustrate how this model response to a triangular input waveform with a gradually-increasing amplitude. As expected, the model exhibits both the distortion effect described by the 'poly_func' primitive and the saturation effect described by the 'limit' primitive.