예제 #1
0
def test_stabilisation():
    from OpenModal.analysis.lscf import lscf
    from OpenModal.analysis.utility_functions import prime_factors

    """    Test of the Complex Exponential Method and stabilisation   """
    f, frf, modal_sim, eta_sim, f0_sim = get_simulated_receptance(
        df_Hz=1, f_start=0, f_end=5001, measured_points=8, show=False, real_mode=False)

    low_lim = 0
    nf = (2 * (len(f) - 1))
    print(nf)
    while max(prime_factors(nf)) > 5:
        f = f[:-1]
        frf = frf[:, :-1]
        nf = (2 * (len(f) - 1))
    print(nf)

    df = (f[1] - f[0])
    nf = 2 * (len(f) - 1)
    ts = 1 / (nf * df)  # sampling period

    nmax = 30
    sr = lscf(frf, low_lim, nmax, ts, weighing_type='Unity', reconstruction='LSFD')
    # N = np.zeros(nmax, dtype = 'int')
    
    err_fn = 0.001
    err_xi = 0.005

    fn_temp,xi_temp, test_fn, test_xi= stabilisation(sr, nmax, err_fn, err_xi)
    
    stable_fn, stable_xi = stabilisation_plot(test_fn, test_xi, fn_temp, xi_temp, nmax, f, frf.T)
예제 #2
0
def test_lsfd():
    f, frf, modal_sim, eta_sim, f0_sim = get_simulated_receptance(
        df_Hz=1,
        f_start=0,
        f_end=5001,
        measured_points=8,
        show=False,
        real_mode=False)

    low_lim = 1500
    nf = (2 * (len(f) - 1))

    while max(prime_factors(nf)) > 5:
        f = f[:-1]
        frf = frf[:, :-1]
        nf = (2 * (len(f) - 1))

    df = (f[1] - f[0])
    nf = 2 * (len(f) - 1)
    ts = 1 / (nf * df)  # sampling period

    sr = lscf(frf,
              low_lim,
              6,
              ts,
              weighing_type='Unity',
              reconstruction='LSFD')
    fr, xi = complex_freq_to_freq_and_damp(sr[-1])
    print('Eigenfrequencies\n', fr)
    print('Damping factors\n', xi)
예제 #3
0
파일: lsce.py 프로젝트: openmodal/openmodal
def test_lsce():
    from OpenModal.analysis.utility_functions import complex_freq_to_freq_and_damp

    """    Test of the Least-Squares Complex Exponential Method    """
    from OpenModal.analysis.get_simulated_sample import get_simulated_receptance
    import matplotlib.pyplot as plt
    
    f, frf, modal_sim, eta_sim, f0_sim = get_simulated_receptance(df_Hz=1,
            f_start=0, f_end=5001, measured_points=8, show=False, real_mode=False)

    low_lim = 100
    nf = (2*(len(f)-low_lim-1))

    while max(prime_factors(nf)) > 5:
        f = f[:-1]
        frf = frf[:, :-1]
        nf = (2*(len(f)-low_lim-1))


    df = (f[1] - f[0])
    nf = 2*(len(f)-low_lim-1)
    ts = 1 / (nf * df)  # sampling period

    n = 12
    low_lim = 100

    sr = lsce(frf, f[low_lim], low_lim, n, ts, additional_timepoints=0, reconstruction='LSFD')

    fr, xi = complex_freq_to_freq_and_damp(sr[-2])

    print("fr\n", fr)
    print("xi\n", xi)
예제 #4
0
def test_stabilisation():
    from OpenModal.analysis.lscf import lscf
    from OpenModal.analysis.utility_functions import prime_factors

    """    Test of the Complex Exponential Method and stabilisation   """
    f, frf, modal_sim, eta_sim, f0_sim = get_simulated_receptance(
        df_Hz=1, f_start=0, f_end=5001, measured_points=8, show=False, real_mode=False)

    low_lim = 0
    nf = (2*(len(f)-low_lim-1))
    print(nf)
    while max(prime_factors(nf)) > 5:
        f = f[:-1]
        frf = frf[:, :-1]
        nf = (2*(len(f)-low_lim-1))
    print(nf)

    df = (f[1] - f[0])
    nf = 2*(len(f)-low_lim-1)
    ts = 1 / (nf * df)  # sampling period

    nmax = 30
    sr = lscf(frf, low_lim, nmax, ts, weighing_type='Unity', reconstruction='LSFD')
    # N = np.zeros(nmax, dtype = 'int')
    
    err_fn = 0.001
    err_xi = 0.005

    fn_temp,xi_temp, test_fn, test_xi= stabilisation(sr, nmax, err_fn, err_xi)
    
    stable_fn, stable_xi = stabilisation_plot(test_fn, test_xi, fn_temp, xi_temp, nmax, f, frf.T)
예제 #5
0
파일: lscf.py 프로젝트: openmodal/openmodal
def test_lsfd():
    f, frf, modal_sim, eta_sim, f0_sim = get_simulated_receptance(
        df_Hz=1, f_start=0, f_end=5001, measured_points=8, show=False, real_mode=False)

    low_lim = 1500
    nf = (2*(len(f)-low_lim-1))

    while max(prime_factors(nf)) > 5:
        f = f[:-1]
        frf = frf[:, :-1]
        nf = (2*(len(f)-low_lim-1))

    df = (f[1] - f[0])
    nf = 2*(len(f)-1)
    ts = 1 / (nf * df)  # sampling period

    sr = lscf(frf, low_lim, 6, ts, weighing_type='Unity', reconstruction='LSFD')
    fr, xi = complex_freq_to_freq_and_damp(sr[-1])
    print('Eigenfrequencies\n', fr)
    print('Damping factors\n', xi)
예제 #6
0
def test_lsce():
    from OpenModal.analysis.utility_functions import complex_freq_to_freq_and_damp
    """    Test of the Least-Squares Complex Exponential Method    """
    from OpenModal.analysis.get_simulated_sample import get_simulated_receptance
    import matplotlib.pyplot as plt

    f, frf, modal_sim, eta_sim, f0_sim = get_simulated_receptance(
        df_Hz=1,
        f_start=0,
        f_end=5001,
        measured_points=8,
        show=False,
        real_mode=False)

    low_lim = 100
    nf = (2 * (len(f) - low_lim - 1))

    while max(prime_factors(nf)) > 5:
        f = f[:-1]
        frf = frf[:, :-1]
        nf = (2 * (len(f) - low_lim - 1))

    df = (f[1] - f[0])
    nf = 2 * (len(f) - low_lim - 1)
    ts = 1 / (nf * df)  # sampling period

    n = 12
    low_lim = 100

    sr = lsce(frf,
              f[low_lim],
              low_lim,
              n,
              ts,
              additional_timepoints=0,
              reconstruction='LSFD')

    fr, xi = complex_freq_to_freq_and_damp(sr[-2])

    print("fr\n", fr)
    print("xi\n", xi)