[L6] Circuit Optimization

5th Laboratory Session ~3 meetings

In the final laboratory session we will learn how to setup and use some sort of artificial intelligence to optimize the performance of a circuit. PyOPUS is one of Python libraries for simulation, performance aggregation and optimization. It was written particularly for circuit optimization, but can be used for various systems. No former Python experience is needed to understand this course.          

Shema1

           

#ripple
x = abs(scale())
y = m.ACmag(v('out')/v('in'))
bw =  m.ACbandwidth(v('out')/v('in'),scale(),filter='lp', levelType='db', level=-3.0)
i = m.IatXval(x, bw-200)        #interpolated index
i = int(np.round(i))        # parsethe float to int
y1 = m.XatIrange(y,0,i)     # subvector of vector y from 0 to i index
rup = y1.max()
rdn = y1.min()
nom = y[0]
__result = np.maximum(rup-nom, nom-rdn)
#damping
x = abs(scale())
y = m.ACmag(v('out')/v('in'))
bw = m.ACbandwidth(v('out')/v('in'),scale(),filter='lp', levelType='db', level=-3.0)
i = m.IatXval(x, bw+300)        # interpolated index
i = int(np.round(i))        # parse the float to int
y1 = m.XatIrange(y,i,len(y)-1)     # subvector of vector y from 0 to i index
damping = y1.max()
__result = damping