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.
I have a design like this ( full code, UCF & test bench towards the end)..
data_in <= data when (readwrite = '0' and reset = '0') else (others =>'0');
process(clk,reset)
.
.
if(reset = '1') then
.
.
elsif(clk'event and clk = '1') then
.
if(readwrite = '0') then
counter <=...
Hi Klaus,
I've been trying out a few things to handle the spike. I added an additional short length moving average filter on top of the RMS & this seems to get rid of the spike with minimal response delay(during a change in magnitude).
The other question I had was regarding what you mentioned...
Actually, you could say that in a way I am able to "see" the future frequency. The method I'm following is to keep accumulating new samples into a buffer until I get a full cycle(based on zero crossings). Once a full cycle is obtained, I process the all the samples in that cycle as a "batch"...
Hi Klaus,
I've been working on implementing this method and a few doubts popped up.
1. What's the integration_count/integration_time that you've mentioned?
I tried guessing what this might be but just couldn't come up with an answer. For some reason, the results I see are all over the place &...
Umm, where & when did I mention that the frequency shifts from sample to sample?:???:
I said, the frequency can change from cycle to cycle. Say you have 1 cycle of 100Hz, the next cycle maybe 110Hz. Something like that.
- - - Updated - - -
Agreed. I think I made our(mine tbh) lives quite a...
Hi Barry,
The RMS needs to be computed for every sample & not every cycle, i.e. every time a new sample comes in, it is squared, divided by N & added to the running total. Then, the squared & divided by N value of (n - N)th sample is subtracted. So, I think computing RMS every 3 zero crossings...
I'm using a sliding RMS mechanism to compute RMS of a signal, i.e. with a window size of N, I add the squared value of the new sample x(n) to the running total while deducting the squared value of the x(n - N) sample and then performing a square root to get the RMS value.
This method works fine...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.