Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

CRO + MATLAB = Spectrum analyzer ?

Status
Not open for further replies.

engineer

Member level 2
Joined
Apr 9, 2005
Messages
44
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
1,648
analog cro working

hi
i took the picture attached from CRO and I want to analyze it using MATLAB to know the harmonic components in it
I don't have a spectrum analyzer so i want to use MATLAB to do this function.
any help??
regards
 

matlab+input+sound card+signal+scope

Take a period measurement, T, and about 20 visual measurements of amplitude, enter them in Matlab and use the interp function to generate a few hundred points. Then use fft, fftshift, abs to get the spectrum. The "sampling" frequency will be 20/T. Generate a frequency scale from -10/T to 10/T, and plot the spectrum.

It is very distorted, if you're looking for pure sine it's very far from that and the circuit should be checked to see what generates the nonlinearity. It seems like a B-E breakdown from a transistor or something similar. When it will look more like sin the measurement makes sense. A THD<5% is not visualy observable in the time domain.
 

matlab+spectrum of signals

thanks Eugen for your reply
I just want to decompose this waveform to its fundamental and harmonics components so that I can know the THD of the nonlinear loads I am using
is there another way?
 

matlab voltage spectrum

Do you have some convenient way to transfer that waveform into MATLAB? If it's a digital scope, it should have some sort of data I/O port. It would be tedious and somewhat inaccurate to read points with your eye.

If your scope is analog, maybe you can use your computer's sound card as a digital oscilloscope. It's limited to audio frequency range, but that may be sufficient. MATLAB can input a waveform from a sound card. Modern sound cards have 16-bit converters, which give a nice spectrum.

If that's a high-voltage signal, be careful! Attenuate is to a safe level before feeding it into your computer.

To simply the MATLAB processing, try to pick equally spaced points along the time axis that includes exactly one waveform cycle. For example, if that's a 60 Hz waveform, you could collect 50 points spaced 1/3000 seconds. Then you could feed the points directly into an FFT without having to worry about applying a weighting function. Weighting functions work fine if your data includes many waveform cycles (like from your sound card), but not if it's only one cycle (you scope snapshot).
 

spectrum analyzer and cro

thanks echo47 for your reply
I am working on an analog CRO and a high voltage signal so I can't use the sound card as I think the signal would be distorted from its original waveform if I tried to attenuate it to a low signal
how can I collect the sampling points you are talking about?
 

matlab, spectrum analyzer

A properly built attenuator shouldn't distort the signal. For example, your oscilloscope has a good input attenuator. However, if the voltage is quite high and if you are inexperienced, please don't try to build an attenuator due to the safety hazard.

Another idea -- some scopes have a "vertical out" or "CH1 out" connector on the back panel. It's a low-voltage version of the signal you seen on the CRT. That signal may be suitable for direct connection to a sound card.

If you don't have that option, then your only choice may be to tediously read points from the oscilloscope screen. The results may be mediocre due to the obvious measurement inaccuracies. A frequency transform is very sensitive to distorted data.

Or maybe someone has a program that can digitize the green waveform in your JPEG snapshot. I haven't seen such a thing, but it may exist.
 

sound card cro

Apart from the discussed options, THD can be measured with a RMS meter after filtering the fundamental with a bandstop. This has been the standard method for decades. This is rather easy for a several 10 % THD as in the shown case.
 

spectrum analyzer matlab

echo47 said:
Or maybe someone has a program that can digitize the green waveform in your JPEG snapshot. I haven't seen such a thing, but it may exist.
I've seen a program like that a couple of years ago. It was a free or OpenSource program. Unfortunately, I don't remember the name or the maker.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top