[iOut, iIn] = [0,0]
    fig = plt.figure(); plt.grid(True)
    plt.plot(freq_hz[iIn], mag2db(Szz[iOut, iIn]), '.b', label = 'Estimate Nominal [MIMO]')
    plt.plot(freq_hz[iIn, sigIndx[iIn]], mag2db(Szz[iOut, iIn, sigIndx[iIn]]), '.r:', label = 'Estimate Nominal [SIMO]')
    plt.xlabel('Frequency [Hz]')
    plt.ylabel('Power Spectral Density [dB]')
    plt.legend()
    plt.xlim([1,5])
    plt.ylim([0,20])
    fig.set_tight_layout(True)
    fig.set_size_inches([6.4,2.4])

    if False:
        FreqTrans.PrintPrettyFig(fig, 'OpenMimoExcitationInterp.pgf')


    fig = plt.figure(); plt.grid(True)
    fig.tight_layout()
    plt.plot(freq_hz[iIn], mag2db(Snn[iOut, iIn]), '.b', label = 'Estimate Null [MIMO]');
    plt.plot(freqGap_rps*rps2hz, mag2db(SnnN[iOut]), '.g:', label = 'Estimate from Null')
    plt.ylabel('Power Spectral Density [dB]')
    plt.xlabel('Frequency [Hz]')
    plt.legend()
    plt.xlim([4,8])
    fig.set_tight_layout(True)
    fig.set_size_inches([6.4,2.4])

    if False:
        FreqTrans.PrintPrettyFig(fig, 'OpenMimoNullInterp.pgf')
Exemple #2
0
    iSide1 = np.argwhere(bins > binPeak[0])[0][0] - 20
    iStart = np.argwhere(Mfit_dB[:iSide1] < M_dB[:iSide1])[-1][0]
    ax2.plot(bins[iStart:],
             Mfit_dB[iStart:],
             color=color,
             linestyle=':',
             label=str(winLabel) + ' Approx')

    print(
        str(winLabel) + 'binMin: ' + str(bins[iStart]) + ' a: ' +
        str(popt[0]) + ' s: ' + str(popt[1]))

# ax1.set_ylabel("Amplitude")
# ax1.set_xlabel("Sample")
# ax1.grid(True)
# ax1.set_ylim([0, 1.1])
# ax1.legend()

ax2.set_xlim([0, 10])
ax2.set_ylim([-80, 10])
ax2.grid(True)
ax2.set_ylabel("Normalized Power Magnitude [dB]")
ax2.set_xlabel("Normalized Bin")
ax2.legend(loc='upper right', framealpha=1)

fig2.set_size_inches([6.4, 3.6])
fig2.tight_layout()

if False:
    FreqTrans.PrintPrettyFig(fig2, 'WindowFunc.pgf')
Exemple #3
0
                                 linestyle=':',
                                 color='r',
                                 label='Dirichlet Approximation')

ax = fig.get_axes()
# ax[0].set_xlim(0, time_s[-1])
ax[0].set_xlim(right=3 * tBinWidth)
ax[0].set_ylim(bottom=-60)
ax[0].set_ylabel(
    str.replace(ax[0].get_ylabel(), 'Gain [dB]', 'Null / Excitation [mag]'))

ax[0].legend()
FreqTrans.FixLegend(ax[0])
fig.set_size_inches([6.4, 2.4])
if False:
    FreqTrans.PrintPrettyFig(fig, 'PowerLeakage.pgf')

#%%

fBin = np.linspace(0, 5, num=300)

freqExc_rps / freqExc_rps[0]
freqExc_rps / freqRate_rps

freqStep_rps / freqExc_rps[0]
freqStep_rps / freqRate_rps

Pww = PwwListMean.sum()

# Pexc = Pww * t / T
# Pexc = uPeak**2 *
f = SatFunc(delta/A)

fig = plt.figure()
plt.plot(A/delta, f, '-', label = 'Saturation Function')
# plt.plot(A/delta, 1 - f, '-', label = 'Limiter Function')
plt.grid(True)

plt.xlim([0, 10])
plt.ylim([0, 1.1])
plt.xlabel('Input Amplitude [$A / \delta$]')
plt.ylabel('Output Amplitude [$|N(A)| / m$]')
plt.legend()

fig.set_size_inches([6.4, 3.6])
if False:
  FreqTrans.PrintPrettyFig(fig, 'SaturationFunction.pgf')


#%%
def DF_Saturation(A, delta, m = 1):
    # Saturation (Gelb #7)
    n_r = m * SatFunc(delta/A)
    n_i = 0.0

    n = n_r + 1j * n_i

    return n

def DF_TimeDelay(A, omega, tDelay_s):
    # Time Delay (Gelb #33)
    n_r = np.cos(omega * tDelay_s)