f) Calculate the coefficients of the trigonometric form of the Fourier series numerically in MATLAB and graphically represent the one-sided spectrum (width and phase) frequency for n up to 10 compared to the analytics results. g) From the coefficients of the trigonometric form of the Fourier series , calculate the coefficients of the exposure series and present the two-sided spectrum (width and phase) frequency. h) Find the average and active value of the signal from the Fourier expansion. i) Check if the sum of the harmonics actually creates the original signal. To verify this you need to add the fixed component and all the harmonious (for n = 1 to n = ). Since we can't do that in practice, try adding to MATLAB the first 5 harmonics in the constant component, then the constant component and the first 10 harmonics. Present graphically in the same chart the two last sums and the original signal .
%Matlab code for Fourier Series
clear all
close all
%All time values
X=linspace(-2,2,1001);
%Loop for creating the function
for i=1:length(X)
if X(i)>=-2 && X(i)<-1
zz(i)=0;
elseif X(i)>=-1 && X(i)<0
zz(i)=-4.*X(i);
elseif X(i)>=0 && X(i)<1
zz(i)=4.*X(i);
else
zz(i)=0;
end
end
figure(1)
%Plotting the function
hold on
plot(X,zz,'linewidth',3)
xlabel('x')
ylabel('f(x)')
title('Plotting of Actual data')
lgnd{1}='Actual data';
a1=X(1); b1=X(end);
l=(b1-a1)/2;
%Fourier series of the function for finding a and b
coefficients
for j=1:20
ss1=zz.*cos(j*pi*X/l);
%all a values of the Fourier series
aa(j)=(1/l)*trapz(X,ss1);
ss2=zz.*sin(j*pi*X/l);
%all b values of the Fourier series
bb(j)=(1/l)*trapz(X,ss2);
end
%a0 value of Fourier series
aa0=(1/l)*trapz(X,zz);
X=linspace(-5,5,6001);
s=aa0/2;
%all an and bn terms
fprintf('Printing few terms for Fourier series\n')
for i=1:10
fprintf('\tThe value of a%d=%f and b%d=%f.
\n\n',i,aa(i),i,bb(i))
end
%Fourier series of the function
for i=1:5
s=s+bb(i)*sin(i*pi*X/l)+aa(i)*cos(i*pi*X/l);
plot(X,s)
lgnd{i+1}=sprintf('Fourier %d
terms.',i);
end
legend(lgnd,'location','best')
box on
%%%%%%%%%%%%%%%%%% End of Code %%%%%%%%%%%%%%%%%
f) Calculate the coefficients of the trigonometric form of the Fourier series numerically in MATLAB and...
Part 1: Exponential Fourier series The following MATLAB code calculates the exponential Fourier series coefficient for the signal x(t) shown in the figure below, plots it's double sided amplitude spectrum IDn l, double sided phase spectrem LDn, and the resulting signal xn(t). 4r 4a Periodic signal x(t) 1.1 Show that the complex Fourier Series Coefficients written as: D 1.2 Use the following Matlab to general the two sided spectral line. 1.3 Execute the Matlab code with To = 2π and...
Question 2: (a) Derive the Trigonometric Fourier Series coefficients for the following periodic signal: ?(?) = |? ??? ?0?| Hint: you may use the tringnometric form the F.S. representation. (b) Compute the power contained in the DC component and the first 4 harmonics.
signal and system Find the trigonometric Fourier series coefficients for the following signal: f(t) 00 = 1 T/2 T 37/2 271
Problem 6: I7 Points For the following periodic signal, x(t) 4OSesi a) Express the signal exponent +cos(9t) +2cos(15t) al in complex exponential Fourier series form. 13 r series coefficients and sketch the spectral line. [2 Find the fundamental frequency and identilY the harmonics in the signal. 12) Solution Problem 6: I7 Points For the following periodic signal, x(t) 4OSesi a) Express the signal exponent +cos(9t) +2cos(15t) al in complex exponential Fourier series form. 13 r series coefficients and sketch the...
Use MATLAB to solve this question: Lab Exercises: Fourier Series Coefficients 4 In this lab, the objective is to create a set of functions that will enable us to do the following 1. Evaluate the Fourier Series coefficients for the following periodic signal which is defined over one period to be rt)240sin (100nt) for 0ts 1/100 (6) The period is 1/100 seconds. This signal is called a full-wave rectified sinusoid, because it contains only the positive lobe of the sinusoidal...
Determine the trigonometric Fourier series coefficients an and bn for signal x(t) sin(3m + 1) + 2 cos(7m-2) . Determine also the signal's fundamental radian frequency wo. No integration is required to solve this cos( ( ? problem
A periodic signal, x(t) is shown below. A = 10, T-4 sec. -T Write a MATLAB script to plot the signal, using enough points to get a smooth curve. Compute the Fourier series coefficients for the signal (if you can find them in the text, that is ok). Plot the single-sided or double-sided spectra for each signal. Include enough frequencies in the plots to adequately represent the frequency content of the signals. Plot partial sums of the Fourier series for...
Problem 2: A periodic signalxit) is shown below A =10, T-4 sec. -T Write a MATLAB script to plot the signal, using enough points to get a smooth curve. Compute the Fourier series coefficients for the signal (if you can find them in the text, that is ok). Plot the single-sided or double-sided spectra for each signal. Include enough frequencies in the plots to adequately represent the frequency content of the signals. Plot partial sums of the Fourier series for...
Problem 3. Determine the trigonometric Fourier series coefficients an and bn for signal a(t) sin(3t 1)2 cos(7t 2) Determine also the signal's fundamental radian frequency w. No integration is required to solve this problem.
2.For the periodic DT signal shown in Top, a) determine the Fourier Series Coefficients. b) Use MATLAB to generate a spectral plot (magnitude plot and a separate phase plot). c) Use MATLAB to generate and plot the signal as a DTFS expansion of the periodic signal. Plot over an interval containing several periods. Make sure to include the MATLAB code x[ri] -9 63 3 9 12 n 1. For the periodic DT signal shown in Top, a) determine the Fourier...