How to quantify non-symmetric signal clipping (clipped differently on positive and negative)?
6 ビュー (過去 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!