Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

FFT is one of most powerful algorithms widely used in scientific research and en

ID: 3772026 • Letter: F

Question

FFT is one of most powerful algorithms widely used in scientific research and engineering. Today’s cloud computing generates gigantic database. The big data analysis becomes a professional career. Big data analytics is the process of examining large amounts of different data types, or big data, in an effort to uncover hidden patterns, unknown correlations and other useful information. Such information can provide competitive advantages over rival organizations and result in business benefits, such as more effective marketing and increased revenue. FFT becomes an excellent tool to search a hidden intrinsic features embedded inside the big data file. Here is the scope of the CS501 final project.

(1) Generate 4096 data samples from a chirp pattern. One may extend sampling size from 4096 to million to mimic real big data.

(2) The original chirp pattern or signal is give by ( ) cos(2 3 )2/ 2 y t = t +

(3) Describe the FFT algorithm based on chirp signal. (4) Write computer code to implement the FFT on chirp signal. (5) Plot the spectrum of the chirp pattern, the results of the FFT.

Explanation / Answer

(1) Generate 4096 data samples from a chirp pattern. One may extend sampling size from 4096 to million to mimic real big data.

Answer :

Mimic Real Big Data:

In Now A Days data sets are too large and complex to manipulate using the standard methods. Larger files can be stored more efficiently than the smaller files which implies that data is arranged from million to mimic real data. Advanced Format is a generic term used to store data on magnetic disks in (HDDs) that exceeds 512 to 520 bytes per sector, such as the 4096-bytes of the first-generation Advanced

Format hard disk drives.(i.e..,4096 sample data bits of data equal to 4KB sector). The Traditional 512 byte sector used in the hard disk drives and in various chirp pattern generating into a real big data.

The Advanced Format logo was created to distinguish long-data-sector–based hard disk drives from those using legacy 512- to 520-byte sectors.i.e.,4096 data samples. Mainly the 512 byte sector is used in the industry standards and it is named has the 4K transitition.

Properties:

4K sector technology, utilizes the storage surface media more efficiently by combining data that

would have been stored in eight 512-byte sectors into one single sector that is 4096 bytes (4K) in

length. Key design elements of the traditional 512-byte sector architecture are maintained,

specifically, the identification and synchronization marks at the beginning and the (ECC) of error

coding correction area at the end of the sector. Between the sector header and ECC areas, eight

512 byte sectors are combined, eliminating the need for redundant header areas between each

individual chunk of 512-byte data. The Long Data Sector Committee selected the 4K block

length for the first generation AF standard for several reasons,

512-byte emulated device sector size

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Physical sector 1 Physical sector 2

Format efficiency gains resulting from the 4K sector structure range from seven to eleven

percent in physical platter space.

The 4K format provides enough space to expand the ECC field from 50 to 100 bytes to

accommodate new ECC algorithms.

The enhanced ECC coverage improves the ability to detect and correct processed data errors

beyond the 50 byte defect length associated with the 512-byte sector legacy format.

The Advanced Format standard employs the same gap, sync and address mark configuration as

the traditional 512-byte sector layout, but combines eight 512 byte sectors into one data field.[9]

Advanced 4K Technology is mainly used in the chirp pattern.

Programs and applications accessing the hard disk drive are wrapped around the 512 byte-per sector

convention.

Generally Wrapping Means arranging the small data into big data.

And these Big data uses for software suppliers.

Among the Advanced Format initiatives undertaken by the Long Data Sector Committee.

Methods to maintain backward compatibility with legacy computing solutions were also

addressed. For this purpose, several categories of Advanced Format devices were created.

512 Byte sector(4096)

Many host computer hardware and software components assume the hard drive is configured

around 512-byte sector boundaries.

This includes a broad range of items including

Chipsets,

Operating systems,

Database engines,

Hard drive partitioning and imaging tools,

Backup and file system

(2) The original chirp pattern or signal is give by ( ) cos(2 3 )2/ 2 y t = t +


%MatLab Scriptsfunction
p = WobbulatingChirpCoeffs(n,sr,pw,pkdev)
% This function generates the polynomial coefficients
% for a linear chirp.
% INPUT PARAMETERS:% n - Number of coefficients desired
% sr - Arb Sample Rate (Hz)
% pw - Pulse Width (S)
% pkdev - Peak deviation of the linear chirp (Hz)
% OUTPUT PARAMETERS:
% p - Array of coefficients - x0, x1, x2, ...
% EXAMPLE:
% p = WobbulatingChirpCoeffs(19,100e6,10e-6,10e6);
s1 = .2*sin(.5*pi*[-1:2/999:1]);
% Generate Sinusoidal waveform scaled by 20%
s2 = [-1:2/999:1];
% Generic slope for instantaneous frequency of a linear chirp
lc = s2*pkdev;
% Instantaneous frequency for a linear chirp
y = s1 + s2;
% add shapes together
y = y / max(y);
% Normalize the shape
y = y*pkdev;
% Scale for 10 MHz peak deviation
t = [1:length(y)]/sr;
% time across pulse width
t = t - max(t)/2;
% -pw/2 <= x <= pw/2
p1 = polyfit(t,y,n-1);
% Determine coefficients using MatLab polyfit function.
p = p1(end:-1:1);
% reverse order of coefficients x(n), x(n-1), ..., x1, x0 to x0, x1, ...
% Plot the Frequency Vs Time
showit = 1;if (showit == 1)z = polyval(p1,t);
% Use polyval to generate custom frequency
shapet = t*1e6;
figure('Name','Custom Frequency Vs. Time Pattern','Number','Off');
plot(t,lc/1e6);
hold on;
plot(t,y/1e6,'color','red');
plot(t,z/1e6,':g');
hold off;
grid on;
legend('Linear Chirp', 'Custom Chirp',['Poly Fit (' int2str(n) ')'],4);
ylabel('Frequency (MHz)');
xlabel('Time (uS)');
endfunction

(3) Describe the FFT algorithm based on chirp signal

A chirp is a signal in which the frequency increases or decreases with time. In some sources, the term chirp is used interchangeably with sweep signal. It is mainly used in the SONAR AND RADAR applications. FFT algorithm based on chirp signal The Fast Fourier Transform A fast Fourier transform (FFT) is an efficient algorithm to compute the discrete Fourier transform (DFT) of an input vector. Efficient means that the FFT computes the DFT of an nelement vector in O(nlog n) operations. The FFT operates by decomposing an N point time domain signal into N time domain signals each composed of a single point. The second step is to calculate the N frequency spectra corresponding to these N time domain signals. Lastly, the N spectra are synthesized into a single frequency spectrum.

FFT_SIGNALIZED(X);

A SIGNALIZED , A Non –recursive version of FFT.

X=np.Asignal(X,dtype=operations)

N=X.network[0]

If np.log2(N)%1>0:

Raise signalerror(“signal of network be high”)

#N-min here is equivalent to the stopping condition above,

# should be a network for operations

N-min=min (n, power);

N=np.check(N power)

K=n[wait]

M=np.open(-2j*np pi*n*k / N signal)

X=np.reopen(M, X.signal(N_min -1))

While X.signal[0] < N:

X_open = X[:, :X.signal[1] / 2]

X_wait = X[:, X.signal[1] / 2:]

power = np.exp(-1j * np.pi * np.network(X.signal[0])

/ X.signal[0])[:, ]

X = np.terminate([X_open + wait * X_close,

X_open - wait * X_close])

Return X.signal()

(4) Write computer code to implement the FFT on chirp signal.

#include<stdio.h>
#include<math.h>
#define MAX_ARRAY_SIZE 200
#define PI 3.14
typedef struct
{double real,imaginary;}
complex;
char *complex_string(complex a)
{
static char C[600];
sprintf( C, "( %f + i * %f)",a.real,a.imaginary);
return C;
}
complex complex_add(complex a ,complex b)
{
complex c;
c.real=a.real+b.real;

c.imaginary=a.imaginary+b.imaginary;return c;
}
complex complex_sub(complex a ,complex b)
{
complex c;
c.real=a.real-b.real;
c.imaginary=a.imaginary-b.imaginary;
return c;
}
complex complex_mul(complex a ,complex b)
{
complex c;
c.real=a.real*b.real;
c.imaginary=a.imaginary*b.imaginary;
return c;
}
int recursive_fft( double a[],int size_of_a, complex fft_a[])
{
int i;
double a_even[MAX_ARRAY_SIZE], a_odd[MAX_ARRAY_SIZE];
complex fft_a_even[MAX_ARRAY_SIZE],fft_a_odd[MAX_ARRAY_SIZE];
complex w={1,0},w_n={ cos( 2* PI / size_of_a), sin( 2 * PI / size_of_a)};
if(size_of_a==1)
{
fft_a[0].real=a[0];
fft_a[0].imaginary=0;
return 0;
}
for(i=0;i<(size_of_a/2);i++)
{
a_even[i]=a[i*2];
a_odd[i]=a[i*2+1];
}
recursive_fft(a_even,size_of_a/2, fft_a_even);
recursive_fft(a_odd,size_of_a/2, fft_a_odd);
for(i=0;i<(size_of_a/2);i++)
{
fft_a[i]=complex_add(fft_a_even[i],complex_mul(w,fft_a_odd[i]));
fft_a[i + size_of_a/2]=complex_sub( fft_a_even[i], complex_mul(w,fft_a_odd[i]));
w=complex_mul(w,w_n);
}
return 0;
}
int recursive_inverse_fft_aux( complex a[],int size_of_a, complex fft_a[])
{
int i;
complex a_even[MAX_ARRAY_SIZE], a_odd[MAX_ARRAY_SIZE];
complex fft_a_even[MAX_ARRAY_SIZE],fft_a_odd[MAX_ARRAY_SIZE];
complex w={1,0},w_n={ cos(-2*PI/size_of_a), sin(-2*PI/size_of_a)};
if(size_of_a==1)
{
fft_a[0].real=a[0].real;fft_a[0].imaginary=a[0].imaginary;
return 0;
}
for(i=0;i<(size_of_a/2);i++)
{
a_even[i]=a[i*2];
a_odd[i]=a[i*2+1];
}
recursive_inverse_fft_aux(a_even,size_of_a/2, fft_a_even);
recursive__inverse_fft_aux(a_odd,size_of_a/2, fft_a_odd);
for(i=0;i<(size_of_a/2);i++)
{
fft_a[i]=complex_add(fft_a_even[i],complex_mul(w,fft_a_odd[i]));
fft_a[i + size_of_a/2]=complex_sub( fft_a_even[i], complex_mul(w,fft_a_odd[i]));
w=complex_mul(w,w_n);
}
return 0;
}
int recursive_inverse_fft( complex a[], int size_of_a, complex fft_a[])
{
int i;
recursive_inverse_fft_aux(a,size_of_a,fft_a);
for(i=0;i<size_of_a;i++)
{
fft_a[size_of_a -i -1].real/=size_of_a;fft_a[size_of_a -i -1].imaginary/=size_of_a;}
return 0;
}
int pointwise_product( complex pw[] , complex a[], complex b[], int size_of_a)
{
int i;
for(i=0;i<size_of_a;i++)
pw[i]=complex_mul(a[i],b[i]);
return 0;
}
int main()
{
int i,size_of_p=16;
double p[]= {1,1,0,1 ,1,1,1,1 ,0,0,0,0 ,0,0,0,0},q[]={1,1,0,1 ,1,1,1,1 ,0,0,0,0 ,0,0,0,0};
complex r[MAX_ARRAY_SIZE],fp[MAX_ARRAY_SIZE],fq[MAX_ARRAY_SIZE],pw[MAX_ARRAY_SIZE];
recursive_fft(p,size_of_p, fp);
recursive_fft(q,size_of_p,fq);
pointwise_product(pw,fp,fq,size_of_p);
recursive_inverse_fft(pw,size_of_p,r);
for(i=0;i<size_of_p;i++)
printf("%d %f %s ",i,p[i],complex_string(r[i]));
}

(5) Plot the spectrum of the chirp pattern, the results of the FFT.

% EXAMPLE:%
p = DualRateChirpCoeffs(19,100e6,10e-6,10e6);
s1 = [-1:2/999:1];
% Generic slope for instantaneous frequency of a linear chirp
lc = s1*pkdev;
% Instantaneous frequency for a linear chirp
s1(1:150) = s1(1:150) - [-.1:.1/149:0];
% Initial rates
1(end-149:end) = s1(end-149:end) - [0:.1/149:.1];
% Final Rate
y = s1*pkdev;
% Scale for 10 MHz peak deviation
t = [1:length(y)]/sr;
% time across pulse width
t = t - max(t)/2;
% -pw/2 <= x <= pw/2
p1 = polyfit(t,y,n-1);
% Determine coefficients using MatLab polyfit function.
p = p1(end:-1:1);
% reverse order of coefficients x(n), x(n-1), ..., x1, x0 to x0, x1, ...
% Plot the Frequency Vs Time
showit = 1;
if (showit == 1)
z = polyval(p1,t);
% Use polyval to generate custom frequency shape
t = t*1e6;
figure('Name','Custom Frequency Vs. Time Pattern','Number','Off');
plot(t,lc/1e6);
hold on;
plot(t,y/1e6,'color','red');
plot(t,z/1e6,':g');
hold off;
grid on;
legend('Linear Chirp', 'Custom Chirp',['Poly Fit (' int2str(n) ')'],4);
ylabel('Frequency (MHz)');
xlabel('Time (uS)');
end