# how to normalize power spectral density

Status
Not open for further replies.

#### Preben

##### Member level 1 hi
I want to compare distortions of two signals. I calculated the power spectral density of these signals.
anyone can tell me how to calculate the normalized power spectral density, so I compare these two spectral? it is better if you can write matlab code.

#### zorx

##### Member level 2 Lets say that P1 is PSD of signal #1, and P2 is PSD of signal #2. The arrays have the same length.
I guess in Matlab it would be:

P1_max = max(P1); %find the max value of P1
P2_max = max(P2); %find the max value of P2
P1_norm = P1/P1_max; % P1 normalized within [0, 1] range
P2_norm = P2/P2_max; % P2 normalized within [0, 1] range

and now you need to plot those two normalized PSD:

figure;
plot(f, P1_norm); %plot normalized PSD for signal #1
hold on; %hold the current figure so it can be used once again to plot another PSD
plot(f, P2_norm); %plot normalized PSD for signal #2 on the same figure

cheers

Last edited:

#### bababui

##### Junior Member level 3 One thing that you can look at is coherence between these signals. mscohere command in MATLAB. Just a thought, not sure if that's what you're looking for.

Status
Not open for further replies.