Esempio n. 1
0
def doublependulummodifiedTS_withnoise(finaltime=600.0,dt=0.025):
    from DoublePendulumModified import solvePendulum
    timeseries = solvePendulum([1.0,2.0,3.0,2.0],finaltime,dt)
    for j in range(timeseries.shape[1]):
        s = np.std(timeseries[:,j])
        timeseries[:,j] += -0.01*s + 0.02*s*np.random.random(timeseries[:,j].shape)
    eqns = 'Double pendulum with noise'
    names = ['x','y','z','w']
    return eqns,names,timeseries
Esempio n. 2
0
def doublependulumTS(finaltime=600.0,dt=0.025):
    from DoublePendulum import solvePendulum
    timeseries = solvePendulum([1.0,2.0,3.0,2.0],finaltime,dt)
    eqns = 'Double pendulum'
    names = ['x','y','z','w']
    return eqns,names,timeseries
Esempio n. 3
0
def doublependulummodifiedTS_changedbeta(finaltime=600.0,dt=0.025):
    from DoublePendulumModified import solvePendulum
    timeseries = solvePendulum([1.0,2.0,3.0,2.0],finaltime,dt,beta=1.2)
    eqns = 'Double pendulum modified'
    names = ['x','y','z','w']
    return eqns,names,timeseries
Esempio n. 4
0
    import StateSpaceReconstructionPlots as SSRPlots
    # from LorenzEqns import solveLorenz
    # timeseries = solveLorenz([1.0,0.5,0.5],80.0)
    # l,avg1,avg2,std1,std2 = causalityWrapper(timeseries[:4001,0],timeseries[:4001,1],2,8,range(20,2000,200),25,causalitytester=testCausality)
    # from differenceEqns import solve2Species
    # timeseries = solve2Species([0.4,0.2],8.0)
    # l,avg1,avg2,std1,std2 = causalityWrapper(timeseries[:,0],timeseries[:,1],2,8,range(20,320,40),25,causalitytester=testCausality)
    # print(np.array(l))
    # print(np.array([avg1,avg2]))
    # avgarr = np.zeros((len(avg1),2))
    # avgarr[:,0] = avg1
    # avgarr[:,1] = avg2
    # SSRPlots.plots(np.array(l),avgarr,hold=0,show=1,stylestr=['b-','r-'],leglabels=['x from My','y from Mx'], legloc=0,xstr='length of time interval',ystr='mean corr coeff')

    from DoublePendulum import solvePendulum
    timeseries = solvePendulum([1.0, 2.0, 3.0, 2.0], 300.0)
    names = ['x', 'y', 'z']
    styles = ['b-', 'r-', 'g-', 'k-']
    hold = 0
    show = 0
    for k in range(3):
        l, avg1, avg2, std1, std2 = causalityWrapper(
            timeseries[200:, k],
            timeseries[200:, -1],
            4,
            8,
            range(500, 3000, 500),
            25,
            causalitytester=testCausality)
        print(np.array(l))
        print(np.array([avg1, avg2]))