Finding frequencies given AC voltage samples

Click For Summary
SUMMARY

The discussion revolves around a C programming assignment that involves analyzing AC voltage samples to identify three different frequencies. The user proposes a method of counting zero crossings in the voltage samples to determine the number of waves, subsequently calculating frequency using the formula freq = (total number of waves x 100) / total number of samples. The approach is fundamentally sound, as it leverages the relationship between time period and frequency, but requires careful implementation to ensure accurate results.

PREREQUISITES
  • Understanding of AC voltage waveforms and their characteristics
  • Familiarity with C programming for data analysis
  • Knowledge of signal processing concepts, particularly frequency calculation
  • Experience with handling and processing large datasets in text file format
NEXT STEPS
  • Research methods for detecting zero crossings in AC signals
  • Learn about the Fast Fourier Transform (FFT) for frequency analysis
  • Explore data handling techniques in C for efficient file processing
  • Study the implications of sampling rates on frequency analysis
USEFUL FOR

Students in electrical engineering or computer science, C programmers working on signal processing tasks, and anyone interested in analyzing AC voltage data for frequency identification.

sekhar4
Messages
1
Reaction score
0

Homework Statement


Hey. I am new here.
Recently i got a C assignment (computing) in which i was given around 20 files..each with thousands of AC voltage test samples sampled at 1 ms..so technically 100 samples= 1 second.
I was told that there 3 different kinds of frequencies in the files and that i have to find them.


Homework Equations



freq=1/timeperiod

The Attempt at a Solution


I went through the samples and realized that if I count the no: of 0's ( 0.00045 or 0.0002) etc and divide the total no: by three, I should be getting the no: waves ..
now freq=(total no:of waves x 100 ) / total no: of samples .

i just want to know if I am doing it right ..please tell me..
I can write codes no problem ..but I want to know if I am heading in the right direction.
PS- can't upload even one of the .txt files as they are around 127 kb each and the forum only allows 100 kb ... sad
 
Physics news on Phys.org
If you have test samples sampled every 1ms (1x10^-3s) then you have 1000 samples per second.

Can you post an example of the numbers which represent one sample?
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
Replies
1
Views
1K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
3
Views
3K
Replies
17
Views
6K