Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to write a code for 10db bandwidth calculation in CST

Status
Not open for further replies.

ehsanzf

Newbie level 2
Joined
Feb 1, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,298
hello dear friends,
I have simulated a structure in CST and I'm trying to optimize it by writing the optimization codes in Macros of the software. the problem I have faced is that how can I write the code for calculation of bandwidth for the plot like the one below. I Want the 10dB bandwidth of the of between points 3 & 4. I cannot limit my frequency sweep because this band shifts to other frequencies while optimization. The code I have used for is the this:

Code:
  f1 = mfmin
    temps1 = Abs(ms11min-threshold)
    f2 = mfmin
    temps2 = Abs(ms11min-threshold)
    For i = 0 To nn-1
      If mfreq(nn-1-i) < mfmin Then
        If Abs(ms11(nn-1-i)-threshold) < temps1 Then
          f1 = mfreq(nn-1-i)
          temps1 = Abs(ms11(nn-1-i)-threshold)
        End If
      End If
      If mfreq(i) > mfmin Then
        If Abs(ms11(i)-threshold) < temps2 Then
          f2 = mfreq(i)
          temps2 = Abs(ms11(i)-threshold)
        End If
      End If
    Next i

1111.JPG
the problem is that it sometimes calculate the other 10dB bandwidth between 1&2 or the bandwidth between 1 & 4!
Thank you.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top