# Recovering shape of periodically sampled signal in near resonance conditions

3 Ansichten (letzte 30 Tage)
Valeriy am 29 Jan. 2023
Beantwortet: Valeriy am 6 Mär. 2023
Periodic signal with frequency Fs has sampled with frequency Fo. How can we recover the signal's shape if Fs is close to Fo or one of its harmonics, so the period of a beating frequency takes hundreds of thousands of samples?
##### 3 Kommentare2 ältere Kommentare anzeigen2 ältere Kommentare ausblenden
Sulaymon Eshkabilov am 31 Jan. 2023
No, I don't. By following their guidelines, one can write a decent code to get the job done.

Melden Sie sich an, um zu kommentieren.

### Antworten (4)

Valeriy am 22 Feb. 2023
@Sulaymon Eshkabilov, I'm not working in mathematics area, so I'm not familiar with common abbreviations and I have a difficulty to apply ideas of cited publication to my case. Please, be so kind to help me.
From the cited publication: At first, in my case there are no frequency modulation, even more, signal frequency is constant and I know its value with good precision. So, if I understand correctly, theta dependence in my case is absent.
Second, sampling of my signal realized with constant, uniform spatial frequency, so how to understand interpolation of the original signal to uniform grid? It is already in uniform grid.
Is shape function from this publication shape of my periodic signal?
And, what does it mean, interpolate(A, B, C)?
Thank you very much for your help
##### 0 Kommentare-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

Sulaymon Eshkabilov am 28 Feb. 2023
There are several fucntions of MATLAB which can be used in such exercises. They are interp1(), interp2, interpn,pchip, spline, griddedInterpolant, scatteredInterpolant, etc. Here is one example how it can be attained.
% Given:
F = [0 1 3 1 0 -1 -3.5 -2 -1 0]; % Given signal
T = [0 1 3 4 7 8 10 11 12 13]; % Time intervals corresponding
% Note that T is non-uniform
% This how to perform interpolation:
dt = 0.2; % Sampling time interval, s
fs = 1/dt; % Sampling frequency, Hz
ti = T(1):1/fs:T(end); % Time
FF = griddedInterpolant(T, F); % Grid interpolation w.r.t ti's time intervals
fi = FF(ti);
figure(1)
plot(T,F, 'ro-', 'DisplayName', 'Data')
hold on
plot(ti, fi, 'k-.', 'Linewidth',2,'DisplayName', 'Interpolated data')
grid on
legend show
hold off %% Uniform time interval: Note the difference
% Given:
F = [0 1 3 1 0 -1 -3.5 -2 -1 0]; % Given signal
T = 0:9; % Time intervals are uniform
% Note that T can be also non-uniform
% This how to perform interpolation:
dt = 0.2; % Sampling time interval, s
fs = 1/dt; % Sampling frequency, Hz
ti = T(1):1/fs:T(end); % Time
% FF = griddedInterpolant(T, F); % Grid interpolation w.r.t ti's time intervals
% fi = FF(ti);
fi = interp1(T,F, ti, 'makima');
figure(2)
plot(T,F, 'ro-', 'markerfacecolor', 'c', 'DisplayName', 'Data')
hold on
plot(ti, fi, 'k-.', 'linewidth',2, 'DisplayName', 'Interpolated data')
grid on
hold off
legend show ##### 1 KommentarKeine anzeigenKeine ausblenden
Valeriy am 28 Feb. 2023
@Sulaymon Eshkabilov, thanks a lot for your detailed comment. But, as it follows from second part of my previous comment, so I'm repeating:
Second, sampling of my signal realized with constant, uniform spatial frequency, so how to understand interpolation of the original signal to uniform grid? It is already in uniform grid.
Is shape function from this publication shape of my periodic signal?
Probably, to clarify my question, I have to recover shape of the function, which I register as following:  All data sampled with constant, regular, known sampling rate. But how to process them according reference you gave me?
Thank you very much for your help

Melden Sie sich an, um zu kommentieren.

Sulaymon Eshkabilov am 28 Feb. 2023
As understood your question correctly, is that you are trying to get the shape function which is the envelope thata can be computed by the following fcn of MATLAB - envelope() - see this example:
fm = 5; % Freq 1
fc = 100; % Freq 2
dt = 0.001; % Sampling time interval, s
fs = 1/dt; % Sampling frequency, Hz
t= 0:1/fs:1; % Time
Am=3;
Ac = 3;
Ka = .75;
m = Am*cos (2*pi*fm*t);
S = Ac*(1 + Ka*m).* cos(2*pi*fc*t);
%%
% ENvelope is computed here:
[EUp, ELow]=envelope(S); % Upper and Lower envelopes are computed here
plot(t,S)
hold on
plot(t, EUp, 'r-'),
plot(t, ELow, 'r-')
legend('Data', 'Envelope')
grid on
xlabel('Time, [s]')
ylabel('Signal') ##### 3 Kommentare2 ältere Kommentare anzeigen2 ältere Kommentare ausblenden
Valeriy am 2 Mär. 2023
@Sulaymon Eshkabilov, I appreciate a lot your help, thank you.
The proposed answer is acceptable :) ?
Your first answer with the link to an article is most close to being acceptable. However, one crucial point remains: I can't realize their proposal due to the lack of necessary mathematical level. So this is the reason why I'm asking for your help.
The method of how to answer my question by envelope (or equivalent) function I have realized before asking this question.
Thank you for your explanation about transferring my data to a uniform grid, but my data are uniformly spaced. The next stage of Algorithm 1 from the cited article is 2. Compute the Fourier coefficients of f in theta space. In my case, a signal changes amplitude along many sampling periods. How long should signal data to be taken if its amplitude is changed over thousands of periods? In fact, my question has to be reformulated, how big has to be N from the first point of Algorithm 1?
Is Matlab realization of the singular value decomposition (SVD) necessary in the fifth stage of Algorithm 1?

Melden Sie sich an, um zu kommentieren.

Valeriy am 6 Mär. 2023
@Sulaymon Eshkabilov, I understand that answer on my question, using methods of cited article (https://royalsocietypublishing.org/doi/10.1098/rsta.2015.0194) is not too simple and perhaps it is behind your scope. But I'm sure that there are some peoples, members of this community with background, which well corresponds to knowledge, which is necessary to decipher proposed methods.
Do you know the way, methods, how to ask them, how to pass this question to correct audience? Make extended copy of Algorithm 1 from article?
Thanks for your help and proposals
##### 0 Kommentare-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Kategorien

Find more on Discrete Fourier and Cosine Transforms in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!