Pre–emphasis - Signal Processing

I am trying to compute the Pre-emphasis of a signal and the formular is below:
y[n] = x[n] - 0.95 x[n-1]
Let:
x=[1 3 5 9 4 3 2 1]
First..
x[1] = 1
x[n - 1] =0
y[n] = 1 - (0.95 * 0) = 1
Second..
x[2] = 3
x[n - 1] = 1
y[n] = 3 - (0.95 * 1) = 2.05
Therefore:
y[n] = 3 - (0.95 * 1) = 2.05
But I don't understand how this has increased the energy of the signal at a higher frequency? Because 3 is greater than 2.05 etc..
How this filter work?

1 Kommentar

KALYAN ACHARJYA
KALYAN ACHARJYA am 11 Aug. 2018
Is this Matlab related question or understand the concept?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Dimitris Kalogiros
Dimitris Kalogiros am 11 Aug. 2018
Bearbeitet: Dimitris Kalogiros am 11 Aug. 2018

0 Stimmen

Your question regards frequency response of FIR filters. I suggest to study (and run) the following script.
clear; clc; close all;
%frequency response of a filter with differencial equation y[n]=x[n]-0.95*x[x-1]
h=[1 -0.95];
freqz(h); zoom on; grid on;
title('frequency response')
%attenuation of a LOW frequency signal
t=0:1:500;
f1=0.01;
x=sin(2*pi*f1*t);
y=filter(h,1,x);
figure;
plot(x,'-b'); hold on;
plot(y, '-r'); zoom on; grid on;
legend('input', 'output');
title('attenuation of a LOW frequency signal')
%enhancement of a HIGH frequency signal
t=0:1:100;
f1=0.3;
x=sin(2*pi*f1*t);
y=filter(h,1,x);
figure;
plot(x,'-b'); hold on;
plot(y, '-r'); zoom on; grid on;
legend('input', 'output');
title('enhancement of a HIGH frequency signal');
Which illustrates how your filter works. How it emphasizes high frequencies and attenuates lowers

3 Kommentare

craze j
craze j am 30 Sep. 2019
Bearbeitet: craze j am 30 Sep. 2019
what is the input in the above code?what is x,y,f1 and what operation is taking place in x,y and f1? why f1 is fixed to that value and t is taken to that range? if speech signal is applied to above code then what input is given and where?
I used filter h=[1 -0.95] twice.
Each time, x is the input of the filter and y is the output.
At both examples, x was a sinusoidal signal, with frequency f1.
I use f1, in order to show what frequences are going to be attenuated and what frequencies are going to be enchaned.
t=0:1:500;
f1=0.01;
x=sin(2*pi*f1*t);
The above piece of code is just to generate filter's input.
You can just replace x with your audio signal
hanif omar
hanif omar am 14 Feb. 2021
if x is input.can i put x is analogread ?

Melden Sie sich an, um zu kommentieren.

Kategorien

Gefragt:

am 11 Aug. 2018

Kommentiert:

am 14 Feb. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by