コード例 #1
0
    iu = mat_u['iu'].item()  # 2 location of force
    nper = mat_u['P'].item()
    nsper = mat_u['N'].item()
    u = mat_u['u'].squeeze()
    y = mat_y['y']

    # zero-based numbering of dof
    # iu are dofs of force
    sig = namedtuple('sig', 'u y fs fmin fmax iu nper nsper')
    return sig(u, y, fs, fmin, fmax, iu - 1, nper, nsper)


lin = load(nonlin=False)
slin = Signal(lin.u, lin.fs, lin.y)
per = [4, 5, 6, 7, 8, 9]
slin.cut(lin.nsper, per)

# idof are selected dofs, ie. all dofs here
idof = np.arange(7)
# dof where nonlinearity is
nldof = 6
# method to estimate BD
bd_method = 'explicit'
#bd_method = 'nr'

# ims: matrix block order. At least n+1
# nmax: max model order for stabilisation diagram
# ncur: model order for erstimation
ims = 40
nmax = 20
ncur = 6
コード例 #2
0
ファイル: fnsi.py プロジェクト: pawsen/pyvib
ftype = 'multisine'
filename = 'data/' + 'pyds_' + ftype + 'vrms0.2'
Nm = namedtuple('Nm', 'y yd ydd u t finst fs ns')
msine = pickle.load(open(filename + '.pkl', 'rb'))

# which dof to get H1 estimate from/show periodicity for
dof = 0

fmin = 0
fmax = 10/2/np.pi
nlin = Signal(msine.u, msine.fs, y=msine.y)
fper, ax = nlin.periodicity(msine.ns, dof, offset=0)


per = [7,9]
nlin.cut(msine.ns, per)

isnoise = False

inl = np.array([[0,-1]])
nl_spline = NL_spline(inl, nspl=15)
nl = NL_force()
nl.add(nl_spline)
iu = 0
idof = [0]
nldof = []

ims = 60
nmax = 40
ncur = 6
nlist = np.arange(2, nmax+3, 2)
コード例 #3
0
dof = 0

# Frequency interval of interest
fmin = 0
fmax = 5 / 2 / np.pi
# Setup the signal/extract periods
slin = Signal(lin.u, lin.fs, lin.y)
snlin = Signal(nlin.u, nlin.fs, nlin.y)

# show periodicity, to select periods from
if show_periodicity:
    slin.periodicity(lin.ns, dof, offset=0)
    snlin.periodicity(nlin.ns, dof, offset=0)

per = [7, 8]
slin.cut(lin.ns, per)
snlin.cut(lin.ns, per)

# inl: connection. -1 is ground. enl: exponent. knl: coefficient. Always 1.
inl = np.array([[0, -1], [1, -1]])
enl = np.array([3, 3])
knl = np.array([1, 1])
nl_pol = NL_polynomial(inl, enl, knl)
nl = NL_force(nl_pol)

# zero-based numbering of dof
# idof are selected dofs.
# iu are dofs of force
iu = 0
idof = [0, 1]