Forum
Please or Register to create posts and topics.

# SweepStressTest demo output points problem

The param is like this: start freq is 1000MHz, end freq is 1300MHz, RBW is 1000KHz. The output points size should be (1300MHz-1000MHz)/1000KHz=300 points. But the result is 608 points.

When the RBW is changed to 100KHz, the desired output size should be 3000, but the result is 6000.

The attached is the output table and my demo code.

Moderator note: Topic has been moved to the proper forum

By the way, could you tell me the meaning of the num field in struct AARTSAAPI_Packet?  The comment is like this 'number of samples used in the packet'. But I analyze the data, I found the num is the different samples of the same spectrum. Is that right? If so, which sample I should take to make the result?

As you can see in your table, the number of results is about twice the number that you calculated. That is because RBW is not the same as stepsize between sample points, the latter is smaller to avoid problems with signals at the edge of the requested bandwidth. It is not exactly factor 2 due to rounding issues and technical factors.

Quote from testpoint on 11/05/2022, 11:26

By the way, could you tell me the meaning of the num field in struct AARTSAAPI_Packet?  The comment is like this 'number of samples used in the packet'. But I analyze the data, I found the num is the different samples of the same spectrum. Is that right? If so, which sample I should take to make the result?

The term "sample" in this context means the full spectrum data. So each packet contains "num" samples, and each sample contains "size" values. It is grouped like this to reduce overhead when each sample is relatively short.

How could I know the exact frequency of each point?

For example, the start freq is 1000MHz, stop freq is 1300MHz, RBW is 1MHz, and I input a sine wave in 1100MHz -50dBm. There are 608 points output, which point is the biggest value?

You have startFrequency, stepFrequency and size values in the packet header. So the frequency of the value at index I is startFrequency + (I % size) * stepFrequency.

Quote from mm_dev on 12/05/2022, 10:48

You have startFrequency, stepFrequency and size values in the packet header. So the frequency of the value at index I is startFrequency + (I % size) * stepFrequency.

oh, I see. But that points number is not the same with my seetings, neither with each point frequency. Thank you.