필터 지우기
필터 지우기

FM modulation - all negative values somehow become positive

조회 수: 2 (최근 30일)
xiaofan yang
xiaofan yang 2016년 3월 23일
답변: Vidya Viswanathan 2016년 3월 31일
I'm having a weird issue. I'm testing a simple FM modulator - demodulator. I run the code below and this is the graph I get
As you can see all the negative values magically become positive. But I'm really just doing a simple modulation and demodulation. What is the issue here?
Fs = 20e6;
fc=200;(Hz)
fDev = 150000;
t = (0:1/Fs:0.2)';
x = sin(2*pi*30*t)+2*sin(2*pi*60*t);
txsig = fmmod(x,fc,Fs,fDev);
dataOut = fmdemod(txsig,fc,Fs,fDev);
plot(t,x,'c',t,dataOut,'b--');
xlabel('Time (s)')
ylabel('Amplitude')
legend('Original Signal','Demodulated Signal')

채택된 답변

Vidya Viswanathan
Vidya Viswanathan 2016년 3월 31일
Hi,
I notice that the value of frequency deviation that you have specified is very high. This could result in over modulation which is probably why you are not getting the original signal back. If you specify the value of frequency deviation to a lower value, say 50, you would be able to restore the original signal. For example,
Fs = 20e6;
fc=200;(Hz)
fDev = 50;
t = (0:1/Fs:0.2)';
x = sin(2*pi*30*t)+2*sin(2*pi*60*t);
txsig = fmmod(x,fc,Fs,fDev);
dataOut = fmdemod(txsig,fc,Fs,fDev);
plot(t,x,'c',t,dataOut,'b--');
xlabel('Time (s)')
ylabel('Amplitude')
legend('Original Signal','Demodulated Signal')
The plot obtained for the above code is shown below.
I hope this answers your query.
Regards,
Vidya

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Pulse and Transition Metrics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by