How to quantify non-symmetric signal clipping (clipped differently on positive and negative)?

5 ビュー (過去 30 日間)
Yixiao
Yixiao 2023 年 11 月 1 日
編集済み: Jon 2023 年 11 月 2 日
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
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?
Yixiao
Yixiao 2023 年 11 月 1 日
@Image Analyst Because the clip is not as 'clean' in our system, it's more like attenuation instead of a cut. It can have the same max but different "degree of attenuation" (cant find a better world). Excuse my poor drawing.

サインインしてコメントする。

回答 (2 件)

Jon
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 件のコメント
Yixiao
Yixiao 2023 年 11 月 1 日
This does not allow quantification of positive and negative clipping individually. It's also possible that different (combinations) of positive and negative clipping results in identical means.
Jon
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)
f = 1×2
1.0e-04 * 0.2356 -0.1888
fprime = clipQuant(t,xprime,a,omega)
fprime = 1×2
0.0852 0.1573
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
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.

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by