- Technical Services and Consulting
- Embedded Systems | Firmware Developement | Simulations
- Electrical and Electronics Engineering
Plot phase on FM modulation on time domain
์กฐํ ์: 2 (์ต๊ทผ 30์ผ)
์ด์ ๋๊ธ ํ์
I have message signal m(t) which is a data set and i want to find of โ
(๐ก) values after that plot โ
(๐ก) values on time domain. where formula of โ
(๐ก) is โ
(๐ก)=2๐50โซ๐(๐)๐๐.
How i found the m(t) is shown down below.
Fs = 1000; % Sampling frequency
t = -10:1/Fs:10-1/Fs; % Time interval
f = -length(t)/2:1:length(t)/2-1; % Frequcny interval
fc = 250; % Hz
Kf = 50;
Tau = 2; center_1 = 1; center_2 = 3; % Recuired values for creating of "m(t)"
square_wave1 = square_wave_device(Tau, center_1, t); % First square wave
square_wave2 = square_wave_device(Tau, center_2, t); % Second square wave
mt = square_wave1 - square_wave2; % Message Signal
%-------------------- Creating the square waves -----------------------%
function square_output = square_wave_device(T, x, t)
x = x - 1 ; % Calculating the center of the positive side of the wave
square_output = (square((1/2*pi).*(t-x).*(T/2))+1)/2;
end
๋๊ธ ์: 0
๋ต๋ณ (1๊ฐ)
Hassaan
2024๋
1์ 8์ผ
ํธ์ง: Hassaan
2024๋
1์ 9์ผ
% Sampling frequency and Time interval
Fs = 1000; % Sampling frequency
t = -10:1/Fs:10-1/Fs; % Time interval
% Frequency interval
f = -length(t)/2:1:length(t)/2-1; % Frequency interval
% Required values for creating "m(t)"
Tau = 2; center_1 = 1; center_2 = 3;
% Creating square waves
square_wave1 = square_wave_device(Tau, center_1, t); % First square wave
square_wave2 = square_wave_device(Tau, center_2, t); % Second square wave
% Message Signal m(t)
mt = square_wave1 - square_wave2;
% Plotting m(t)
figure;
plot(t, mt);
title('Message Signal m(t) vs Time');
xlabel('Time (seconds)');
ylabel('m(t)');
grid on;
% Calculating phi(t)
Kf = 50; % Given constant
dt = 1/Fs; % Time step (delta t)
phi_t = 2 * pi * Kf * cumsum(mt) * dt; % Integration of m(t)
% Plotting phi(t)
figure;
plot(t, phi_t);
title('\phi(t) vs Time');
xlabel('Time (seconds)');
ylabel('\phi(t)');
grid on;
% Function for generating square waves
function square_output = square_wave_device(T, x, t)
x = x - 1; % Calculating the center of the positive side of the wave
square_output = (square((1/2*pi).*(t-x).*(T/2))+1)/2;
end
------------------------------------------------------------------------------------------------------------------------------------------------
If you find the solution helpful and it resolves your issue, it would be greatly appreciated if you could accept the answer. Also, leaving an upvote and a comment are also wonderful ways to provide feedback.
Professional Interests
๋๊ธ ์: 5
Hassaan
2024๋
1์ 10์ผ
Yes you can adjust as per your needs.
------------------------------------------------------------------------------------------------------------------------------------------------ If you find the solution helpful and it resolves your issue, it would be greatly appreciated if you could accept the answer. Also, leaving an upvote and a comment are also wonderful ways to provide feedback. Professional Interests Technical Services and Consulting Embedded Systems | Firmware Developement | Simulations Electrical and Electronics Engineering Feel free to contact me.
์ฐธ๊ณ ํญ๋ชฉ
์นดํ ๊ณ ๋ฆฌ
Help Center ๋ฐ File Exchange์์ Spectral Measurements์ ๋ํด ์์ธํ ์์๋ณด๊ธฐ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!