Signal generation on Simulink?

2 ビュー (過去 30 日間)
Hossam Amin
Hossam Amin 2022 年 2 月 21 日
コメント済み: Hossam Amin 2022 年 2 月 22 日
I would like to know how can I generate a signal that looks like this (in the image) mainly using Simulink or a script function that can be employed later in simulink.
Thanks

回答 (2 件)

Arif Hoq
Arif Hoq 2022 年 2 月 22 日
You can use this script in a function block of Simulink. Just take y as a output in the simulink block.
fs = 9000; % signal sampled at a rate of 200 Hz for 1 second
t = 0:1/fs:1;
y1 = cos(2*pi*30*t);
y2 = cos(2*pi*5*t); % 5 Hz modulating signal
y2 = rescale(y2,0.15,1); % modulation amplitude min/max factor
y = y1 .* y2; % create amplitude-modulated signal
plot(y(1:7000))

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2022 年 2 月 22 日
This modulation signal can be generated using the following Simulink model and/or this M-ffile:
fs = 5000; % sampling frequency (Hz)
t = 0:1/fs:1; % time vector
x = (1.25+sin(2*pi*25*t+pi/2)).*sin(2*pi*t*175);
plot(t,x), grid on
xlim([0, 0.25])
xlabel('Time, [sec]')
ylabel('Amplitude')
  1 件のコメント
Hossam Amin
Hossam Amin 2022 年 2 月 22 日
Thanks for the answer.
I was thinking if I needed to add some random guassian noise to that signal and then consider the whole signal as semi-symmetric, subtract each data point with it's symmetric counter part. i.e in that case the midpoint is 0.125. So subtract point at 0.125s from point at 0s, point 0.2 from 0.05 and so on.
Hence, in this perfect signal such subtraction is equal to zero, however, when random noise is added to it, the subtraction will not be zero I believe.

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

カテゴリ

Help Center および File ExchangeSources についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by