Anonymous
Оптимальный фильтр в дробных доменах Фурье [закрыто]
Сообщение
Anonymous » 13 апр 2025, 17:20
Является ли код оптимального фильтра в дробных доменах Фурье?
Код: Выделить всё
# Length of the exemplary signal
N = 256
t = linspace(-1, 1, N) # Time vector
# Original signal x(t)
x = exp(-t**2)
# Noise n(t)
n = 0.1 * randn(N) # Assuming you want a 1D noise array
# Observed signal y(t)
y = x + n
# Fractional order
a = 0.5
# Fractional Fourier Transform
X_a = frft(x, a)
Y_a = frft(y, a)
# Autocorrelation function
R_yy = Y_a * conj(Y_a)
R_xy = X_a * conj(Y_a)
# Optimal filter
G_a = R_xy / R_yy
# Applying the filter
X_hat_a = G_a * Y_a
# Inverse fractional Fourier transform
x_hat = frft(X_hat_a, -a)
# Plotting
figure()
subplot(3, 1, 1)
plot(t, x, 'b', t, y, 'r')
legend(['Original signal x(t)', 'Observed signal y(t)'])
title('Time-domain signals')
subplot(3, 1, 2)
plot(t, abs(X_a), 'b', t, abs(Y_a), 'r')
legend(['|X^{(a)}(u)|', '|Y^{(a)}(u)|'])
title('Magnitude in fractional Fourier domain')
subplot(3, 1, 3)
plot(t, x, 'b', t, real(x_hat), 'g')
legend(['Original signal x(t)', 'Estimated signal \hat{x}(t)'])
title('Filtering result')
Paper
Подробнее здесь:
https://stackoverflow.com/questions/795 ... er-domains
1744554028
Anonymous
Является ли код оптимального фильтра в дробных доменах Фурье?[code]# Length of the exemplary signal N = 256 t = linspace(-1, 1, N) # Time vector # Original signal x(t) x = exp(-t**2) # Noise n(t) n = 0.1 * randn(N) # Assuming you want a 1D noise array # Observed signal y(t) y = x + n # Fractional order a = 0.5 # Fractional Fourier Transform X_a = frft(x, a) Y_a = frft(y, a) # Autocorrelation function R_yy = Y_a * conj(Y_a) R_xy = X_a * conj(Y_a) # Optimal filter G_a = R_xy / R_yy # Applying the filter X_hat_a = G_a * Y_a # Inverse fractional Fourier transform x_hat = frft(X_hat_a, -a) # Plotting figure() subplot(3, 1, 1) plot(t, x, 'b', t, y, 'r') legend(['Original signal x(t)', 'Observed signal y(t)']) title('Time-domain signals') subplot(3, 1, 2) plot(t, abs(X_a), 'b', t, abs(Y_a), 'r') legend(['|X^{(a)}(u)|', '|Y^{(a)}(u)|']) title('Magnitude in fractional Fourier domain') subplot(3, 1, 3) plot(t, x, 'b', t, real(x_hat), 'g') legend(['Original signal x(t)', 'Estimated signal \hat{x}(t)']) title('Filtering result') [/code] Paper Подробнее здесь: [url]https://stackoverflow.com/questions/79570303/optimal-filter-in-fractional-fourier-domains[/url]