MCSA spectral analysis using FFT
8 views (last 30 days)
Show older comments
Hi,
I'm new to matlab. I have to do FFT and plots of spectral analysis of an induction motor with short circuit. Here in zip I have csv file (I also have same matlab file if necessary, don't know what is better) of one phase (without fault). I've been trying for several throws to create something, but no luck. The sampling frequency was 5000000 Hz, the recording length was 0,2 s and the number of samples was 1000000. Can I ask for help. Thank you very much.
0 Comments
Answers (1)
AH
on 21 Apr 2024
Here is a simple code that you can get started with.
Let's first import the data into MATLAB and extract signal value x and time vector t.
unzip("csv.csz.zip")
T = readtable("csv.csv","NumHeaderLines",11,"ReadVariableNames",true);
t = T.Second;
x = T.Value;
Ts = 2e-7; % time step
fs = 1/Ts; % sample rate
Let's take a look at the time-domain signal
figure
plot(t,x)
xlabel("Time (s)")
ylabel("Amp.")
The signal seems to be a sinusoid. It seems that the recorded signal is contaminated by some high-frequency noise. So perhaps before Fourier analysis, it's a good idea to remove those noise. To choose the passband frequency, you can simply run this code pspectrum(x-mean(x),fs) and evalue the preliminary Fourier spectrum. From this prelimnary analysis, it seems tha the signal occupies a frequency bandwidth of 0.01 MHz.
fpass = 0.05e6;
xlf = lowpass(x,fpass,fs);
Now let's use the function pspectrum to perform Fourier analysis (frequency-domain). To see the frequency ocntent, it's recommended removing the DC value (frequency content at the 0 frequency).
figure
pspectrum(xlf-mean(xlf),fs)
You can do all these steps (time-domain analysis and frequency-domain analysis) all in the Signal Analyzer App.
For further detailed you may want to take a look at this example Practical Introduction to Frequency-Domain Analysis.
See Also
Categories
Find more on Spectral Measurements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!