Take the 2-minute tour ×
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It's 100% free, no registration required.

I'm looking for a suitable measure in order to quantify the asymmetry of a signal. I've read this: Detect signals degree of imbalance and this: How to measure the agreement between to curves? but I can't see how they apply to my case.

So this is the part of the signal that I am interested in:Part of the signal that I am interested in (ignore xlabel)

The red line shows the original signal and the black line shows the right part of the signal mirrored about the time=0 axis. What I need to do is find a way to quantify the asymmetry of the red line, i.e. a measure of its difference from the black line.

What I have tried doing is taking the square root of the sum of the squares (SRSS) of the differences of each point. That is:

$$ SRSS = \sqrt{\sum\limits_i (y_{black,i} - y_{red,i})^2} $$

Unfortunately, this measure is affected by the number of points that I take for each curve. So for example if the resolution is half, SRSS will decrease even if I'm comparing the same lines.

Is there any other measures of asymmetry that you can suggest? Ideally, they should be a single number and not be affected greatly by the resolution of the lines.

share|improve this question
2  
"Unfortunately, this measure is affected by the number of points that I take for each curve." What if you divide the total by the number of samples in the sum? –  pichenettes Apr 29 at 11:47
    
You want to measure the skewness; see the link for several measures. –  Emre Apr 29 at 22:12

2 Answers 2

up vote 3 down vote accepted

Assuming you're looking for symmetry around $x=0$, you can decompose any function into a symmetric and an antisymmetric part:

$$ f(x) = \frac{1}{2}\left(f(x)+f(-x)\right) + \frac{1}{2}\left( f(x) - f(-x) \right)$$

Calling $f_+(x):=\frac{1}{2}\left( f(x) + f(-x) \right)$ and $f_-(x):=\frac{1}{2}\left( f(x) - f(-x) \right)$ you can easily verify that $f_+$ is symmetric while $f_-$ is antisymmetric.

Now you can measure symmetry by taking any suitable norm on your functions. For example the symmetry of $f(x)$ can be measured as

$$S[f]:=\frac{||f_+||}{||f_+||+||f_-||}$$

which ranges from $0$ (fully antisymmetric) to $1$ (fully symmetric).

A possible useful norm on functions is defined as

$$||f|| = \sqrt{\int_\mathbb{R} f(x)^2 dx} $$

which can be discretised to

$$||f|| = \sqrt{ \sum_i f(x_i)^2 \frac{x(i+1)-x(i-1)}{2} }$$

share|improve this answer
    
Thank you. The norm that you have suggested doesn't really work for me as it gives me imaginary values and hence distorts the symmetry measure. I have used this code in MATLAB to implement your suggestion (the commented out part is the norm you have suggested and doesn't work for me). –  Demetris Apr 30 at 13:08
    
MATLAB code of how I implemented @Jazzmaniac 's suggestion f_plus = 0.5 * (f + flip(f)); f_minus = 0.5 * (f - flip(f)); f_plus_norm = 0; f_minus_norm = 0; for k = 2:length(f)-1; f_plus_norm = norm(f_plus); %f_plus_norm + (f_plus(k)^2 * (f_plus(k+1)-f_plus(k-1))*0.5); f_minus_norm = norm(f_minus); %f_minus_norm + (f_minus(k)^2 * (f_minus(k+1)-f_minus(k-1))*0.5); end f_plus_norm = sqrt(f_plus_norm); f_minus_norm = sqrt(f_minus_norm); m = f_plus_norm / (f_plus_norm + f_minus_norm);` –  Demetris Apr 30 at 13:17
    
@Demetris, the norm should always give non-negative (i.e. real) results. I think you have made an error in your implementation: x(i+1)-x(i-1) is not the function value difference but the x-position difference! –  Jazzmaniac Apr 30 at 14:49

You could compute the odd part of the signal. If the point of symmetry is the index $n=0$ (as in your example), then the odd part of the signal is

$$y_o(n)=\frac12(y(n)-y(-n))$$

You could use the normalized sum of squares of $y_o(n)$ as a measure of asymmetry:

$$m=\frac{1}{(2N+1)Y^2_0}\sum_{n=-N}^{N}y_o^2(n)$$

where $Y_0=\max\{|y_o(n)|\}$. With this definition the measure $m$ is independent of the number of data points and it is also independent of scaling.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.