The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
Submitted by Duco Pulle on Mon, 10/21/2013 - 21:22
Hi, I have a pretty simple example that is giving me zero instead of the scaling result I expect. Any idea why? See diagram below:
Submitted by pete on Mon, 10/21/2013 - 21:23.
Hi Duco, The problem is the fx30.32 '*' (multiply) in the middle. fx30.32 means that you have 30 integer bits and 2 fractional bits in 32 bit word. 1 fractional bit lets you represent multiples of 1/2, 2 fractional bits lets you represent multiples of 1/4, 3 fractional bits gives you multiples of 1/8, and so on. You are feeding the multiply with .25 and .5, the result of which is .125 (or 1/8). You need 3 fractional bits to represent 1/8, but you only allocated 2, so the result is truncated to 0. If you know your largest result will be significantly less than 500 million, then you can move some integer bits to the fractional side and postpone the truncation. Generally you want enough integer bits to handle the largest input value you will see, but no more, as it steals precision away from fractional side.
We could add a warning when results are truncated to zero due to insufficient fractional bits.
Pete
Join us for a Community Conversation where we'll discuss practical approaches to analyzing complex electromagnetic models using hybrid solver techniques. This session will provide a general overview of how different computational methods can be combined within a single simulation to address models containing varied…
Join us for a community conversation to explore how different modeling approaches in Simcenter PSIM can help engineers simulate power electronics systems while balancing accuracy, simulation speed, and design insight. What you'll learn: Power transistor modeling : Thermal and high fidelity models Protection component…