How to quantify non-symmetric signal clipping (clipped differently on positive and negative)?
5 次查看(过去 30 天)
显示 更早的评论
I am trying to characterize a real world system that essentially works as an oscillator. We know that its max displacement on the positive and negative side is limited (saturated) by different factors. Say we put in a sinusoid the response of the system will be clipped like this:
t=0:1e-3:1e2;
x=sin(t);
xprime=x;
xprime(x>0.7)=0.7;
xprime(x<-0.8)=-0.8;
plot(t,x)
hold on
plot(t,xprime)
hold off
I guess the positive and negative clip should create two harmonics that are of different phases, and we can use their power to quantify both clips. However in practice how do we isolate these harmonics? In the real-world system the clipping is never as 'clean' and there could be other distortions. Any idea would be helpful
2 个评论
Image Analyst
2023-11-1
Why not simply look at the max and min values of the clipped signal? Woudln't that tell you the clipping values?
回答(2 个)
Jon
2023-11-1
If, as in your example the nominal (unclipped ) time mean of the signal is zero, then you could quantify the clipping by the shift in the time mean value from zero. If nominal signal has a non-zero time mean, then look at shift from this nominal time mean value.
3 个评论
Jon
2023-11-2
编辑:Jon
2023-11-2
You could look at means of the negative and positive portions of your signal separately
omega = 1; % radian frequency rad/s
a = 1; % amplitude
t=0:1e-3:1e2;
x=a*sin(t*omega);
xprime=x;
xprime(x>0.7)=0.7;
xprime(x<-0.8)=-0.8;
plot(t,x,t,xprime)
% Quantify the clipping using the mean value over a integral number of
% periods
%
f = clipQuant(t,x,a,omega)
fprime = clipQuant(t,xprime,a,omega)
function f = clipQuant(t,x,a,omega)
% compute clipping levels
% f = clip(x,a,omega) returns vector of lower and upper clip
% levels as normalized fraction given signal x, nominal amplitude a ,
% and radian frequency omega
% Determine final time to average over an integral number of cycles
numCycles = floor(t(end)*omega/(2*pi));
tFinal = 2*pi*numCycles/omega;
% compute mean for positive and negative portions of wave
xbarNeg = mean(x(t<=tFinal & x <= 0));
xbarPos = mean(x(t<=tFinal & x > 0));
% normalize relative to what would be measured for an unclipped sin
nomVal = a*2/pi;
f(1) = (xbarNeg + nomVal)/(nomVal);
f(2) = (nomVal - xbarPos)/(nomVal);
end
Image Analyst
2023-11-2
I'd get your positive and negative signals separately by thresholding and masking.
posSignalIndexes = signal > 0;
posSignal = signal(posSignalIndexes);
negSignal = signal(~posSignalIndexes);
Then I'd take the fft of them and compare the power in each element of the fft to that of a perfectly shaped waveform. Then maybe get the average difference over all frequencies. If the signal is corrupted/clipped/different, then the power in the frequency spectra will not be the same.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!