Info

This question is closed. Reopen it to edit or answer.

How to implement NN in reducing the PSD of the signal without changing the information in the signal

1 view (last 30 days)
Hi everyone,
I am new to neural networks kindly guide me on the following: The code is to compute the PSD of the signal. I want to reduce the PSD of the signal without changing the signal characteristics, to transmit the same signal with low PSD. Is this possible with using NN? if yes then how. need urgent response. Thanks in advance.
close all
Fs=10000; % Fs=sample rate
T=1; % T=time duration of the waveform, in secs.
n=T*Fs; % n=number of samples
time=(1:n)/Fs; % time is the vector of the sample times
f=1000/(2*pi);
x=cos(2*pi*f*time);
%t=find(x<0);
%x(t)=zeros(size(t)); % x is a half-wave rectified cosine waveform
x=sign(x);
t=find(x<0);
x(t)=zeros(size(t)); % x is a half-wave rectified cosine waveform
%sound(x/max(abs(x)),Fs) % plays the waveform as an audio file
figure(1)
plot(time,x)
axis([0 10/f -1.2 1.2]) % Displaying just 10 cycles of x(t)
title('First few cycles of the waveform, x(t)');
grid
%
% Calculating power from the time signal
% This is a Riemann sum approximation of Average Power
% Note: Duration, T=n*Ts, where Ts=1/Fs
%
Power_of_x=sum(x.^2)/n % Riemann approximation of the integral
%
% Looking at frequency domain
% fft evaluates the discrete Fourier transform (DFT)
% at a set of equally spaced points on [0,1]
%
XFs=fft(x)/Fs; % scale fft(x) to get spectrum of x(t)
%
% fftshift moves this to [-0.5, 0.5] for better visualization
%
Xf=fftshift(XFs);
%
% Computing energy spectrum
%
Exf=abs(Xf).^2; % Note: Exf can also be computed as abs(Xf).^2
%
% Pxf is an approximation to the continuous time PSD
%
Pxf=Exf/T;
%
% Assigning frequencies to the samples of the PSD
%
figure(2)
df=Fs/n; % Df=freq separation between two consecutive fft points
freq=[-(n/2)+1:1:n/2]*df;
maxPxf=max(Pxf);
subplot(211)
plot(freq,Pxf)
axis([-5000 5000 0 maxPxf])
title('Power Spectral Density of x(t) ');
subplot(212)
plot(freq,10*log10(Pxf/maxPxf))
axis([-5000 5000 -100 0])
grid
title('Power Spectral Density of x(t) in dB ');
%
% Calculating power from the PSD using Parseval's relation:
% i.e., power = integral of (Pxf) over all frequencies.
% This is a Riemann sum approximation to the actual power
%
Power_from_PSD=sum(Pxf)*df
%Now use Matlab's PSD function to plot the PSD

Answers (1)

Greg Heath
Greg Heath on 24 May 2013
To answer your question:
No.
Neural networks are typically used for pattern-recognition/classification or curve-fitting/regression.
Your problem does not apply.
Why doesn't scaling your input to have unit power solve your problem?
  2 Comments
Sander Khowaja
Sander Khowaja on 24 May 2013
What I want is I want to reduce the power of signal I have gone through a couple of research papers which have applied Neural Networks in doing this, I just want a concept for how they have done it
Greg Heath
Greg Heath on 26 May 2013
I have never heard of such a procedure.
Please submit some elucidating code and/or comments so I can get an inkling of your problem.
Greg

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!