Question

Please answer in MATLAB, thank you!

2. Calculate the energy of time domain signal x (t) and z (t) for the range of 0SIS2.5 Also calculate the energy of these sig

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Signal energy using Parsevals theorem is given by: N-1 N-1 where X[k] is the DFT of x[n], both of length N.

Matlab Code is below:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

close all,
clear all,
clc,

Fs = 1000;
F1 = 5;
F2 = 10;
Amp = 1;

t = 0:(1/Fs):2.5;

Xt = Amp * sin(2*pi*F1*t);
Zt = Amp * sin(2*pi*F2*t);

subplot(2,3,1); plot(Xt); str = strcat('Signal X(t) in Time Domain, F = ',num2str(F1),' Hz'); title(str);
subplot(2,3,4); plot(Zt); str = strcat('Signal Z(t) in Time Domain, F = ',num2str(F2),' Hz'); title(str);

SignalEnergy_TimeDomain_X = num2str(sumsqr(Xt))
SignalEnergy_TimeDomain_Z = num2str(sumsqr(Zt))

L=length(Xt);
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
Y = fft(Xt,NFFT)/L;
EnergySpectrum_X = abs(Y).^2/L;
subplot(2,3,3); plot(EnergySpectrum_X); title('Energy Spectrum - X(t)');

f = Fs/2*linspace(0,1,NFFT/2);
SignalEnergy_FreqDomain_X = num2str(sumsqr(abs(Y))/L)

% Plot single-sided amplitude spectrum.
subplot(2,3,2); plot(2*abs(Y(1:NFFT/2)));
str = strcat('X(t) -> FFT at N = ',num2str(NFFT),' Points'); title(str);
xlabel('Frequency (Hz)'); ylabel('|Y(f)|');

L=length(Zt);
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
Y = fft(Zt,NFFT)/L;
EnergySpectrum_Z = abs(Y).^2/L;
f = Fs/2*linspace(0,1,NFFT/2);
SignalEnergy_FreqDomain_Z = num2str(sumsqr(abs(Y))/L)
subplot(2,3,6); plot(EnergySpectrum_Z); title('Energy Spectrum - Z(t)');

% Plot single-sided amplitude spectrum.
subplot(2,3,5); plot(f,2*abs(Y(1:NFFT/2)));
str = strcat('Z(t) -> FFT at N = ',num2str(NFFT),' Points'); title(str);
xlabel('Frequency (Hz)'); ylabel('|Y(f)|');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Signal Xt) in Time Domain, F-5 Hz XIt)-> FFT at N-4095 Points Energy Spectrum X) 0.8 0.6 0.4 0.5 0.2 0 500 1000 1500 2000 250

Add a comment
Know the answer?
Add Answer to:
Please answer in MATLAB, thank you! 2. Calculate the energy of time domain signal x (t) and z (t) for the range of 0SIS...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I need help with number 2 . Please answer in MATLAB thank you! 1. In the lab we analyzed filtering 60 Hz power-line noi...

    I need help with number 2 . Please answer in MATLAB thank you! 1. In the lab we analyzed filtering 60 Hz power-line noise from ECG signal using a digital (signal processing) filter. Now let's try to an analog (circuit) filter approach to remove the 60 Hz line-noise. Following is an active twin-T notch filter with transfer function: (1+m)((2joRC? +1 Z(a) 2R 2R Here m is the ratio of the two feedback 2C R resistance which determines the gain and...

  • Problem 1 (10 pts). A time-domain signal x(t) is given in the figure below: - -...

    Problem 1 (10 pts). A time-domain signal x(t) is given in the figure below: - - - - - - - 9 X(t) 0 2 t, msec (a) Compute the simplest real-valued math function for the spectrum X($). (b) Plot X(f) over a Hz frequency range large enough to show all the important properties.

  • help with this matlab problem asap thank you.... Exercise 2: Fourier Transform properties (a) Time Scaling....

    help with this matlab problem asap thank you.... Exercise 2: Fourier Transform properties (a) Time Scaling. Create an M-file and: 1. Plot the waveform s(t)sinc(at/0.5) where a1 and t fro5 tot4.99 (seconds) in 0.01 increments. 2. Plot the amplitude spectrum of s(t). Comment the figure. 3. Repeat (a.1) and (a.2) for α-2. How do this signals compare in tune? How do their bandwidths compare? (b) Time Shifting. Create an M-file and: 1. Plot s(t)rectpuls(t) and s2(t)rectpuls(t 2.5), where t is...

  • consider the signal using matlab Problem 2: Consider a signal: x[n] 3cos(n7/3) + 2sin(nt/4)+ cos(n7/5) Using...

    consider the signal using matlab Problem 2: Consider a signal: x[n] 3cos(n7/3) + 2sin(nt/4)+ cos(n7/5) Using Matlab, (1) Plot this signal in time domain. Can you identify the various frequencies in this signal? Use n 0:1:1000 (2) Plot this signal in frequency domain using the "fft" command. Identify the individual frequencies in the plot. (3) Calculate the frequencies of these signals. In the frequency plot, 1000 2

  • Given an energy signal x(t) = (t-5T)e-t-T) , where T-0.1 compute its energy spectrum density in...

    Given an energy signal x(t) = (t-5T)e-t-T) , where T-0.1 compute its energy spectrum density in Matlab 1. use two different methods to a. Get its spectrum using Fourier transformation, follovfed by the squaring its amplitude. Plot its Fourier transformation and its energy spectrum density. Get its autocorrelation function, followed by its Fourier transformation. Plot its autocorrelation function and its energy spectrum density. b. 2. In a multipath channel, the received signal y (t) x(t) 0.15x(t -6T) +0.09x(t 10.5T), plot...

  • Please explain in detail and use MATLAB code. Thank you. Prob. 4-1 FM and PM are,...

    Please explain in detail and use MATLAB code. Thank you. Prob. 4-1 FM and PM are, respectively, defined as FM: A cos ((t) PM: A cos (kpm(t)) The FM and PM coefficients. kf and kp are kf-100 and kp-2, respectively. The carrier frequency is 400 Hz (1) Plot both the time-domain and frequency-domain representation for two independent message signals, m1(t) and m2(t) using MATLAB. Figure 1 is, again, the illustration of the Rectangular pulse (a) Tn1(t) = 11(t _ 0.5)...

  • Now use MATLAB to generate and plot 15seconds of this signal in the time-domain.Use the fft()...

    Now use MATLAB to generate and plot 15seconds of this signal in the time-domain.Use the fft() function to find the fourier transform of this signal and plot its magnitude spectrum School of Engineering Task 3 - The Fourier Transform: Scaling property Exercise: Let's take a look now at using the Fourier transform on aperiodic signals. Consider the real exponential signal from the discharging capacitor in tas 3 of laboratory 1 which was found to be: You(t)=e"u(t) Begin by calculating manually...

  • Answer Q2 Q1. Use MATLAB to calculate sum of the AC voltages. Plot all three voltages...

    Answer Q2 Q1. Use MATLAB to calculate sum of the AC voltages. Plot all three voltages in the same figure using the inbuilt function subplot(). The frequency of the signal is 10 Hz. Vary the time, t, so that you can view few cycles of the AC voltage. vi(t) = 10 V sin(wt +T/2) vz(t) =15 V sin(wt+1/3) vs(t) = (t) + v2(t) Q2. Use voltage vi(t) from Q1 and impedance, Z = 50 L 30°, and find phasor current...

  • Q. 2 A continuous time signal x(t) has the Continuous Time Fourier Transform shown in Fig...

    Q. 2 A continuous time signal x(t) has the Continuous Time Fourier Transform shown in Fig 2. Xc() -80007 0 80001 2 (rad/s) Fig 2 According to the sampling theorem, find the maximum allowable sampling period T for this signal. Also plot the Fourier Transforms of the sampled signal X:(j) and X(elo). Label the resulting signals appropriately (both in frequency and amplitude axis). Assuming that the sampling period is increased 1.2 times, what is the new sampling frequency 2? What...

  • 2. [20 points] The carrier c(t-Acce(2106 t) is frequency modulated by the sinusoid signal m(t) 2cos...

    2. [20 points] The carrier c(t-Acce(2106 t) is frequency modulated by the sinusoid signal m(t) 2cos (2000mt). The deviation constant is kr 3000 Hz/V Determine the bandwidth of the modulated signal using Carson's rule a. Sketch the magnitude of the spectrum of the modulated signal (plot only those frequency components that lie within the bandwidth derived in part a) with detailed information such as the areas of delta function determined by the Bessel function, frequency separation between each spectrum (note...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT