LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RMS

Hi all!
I’m seeking a help in this labview application that I’m using in my research project. I have two actuators, outputs, both are operating at the same frequency and sampling rate. The first output, speaker 1,  is my excitation to the system. I used a simulate signal function to generate the sine wave signal and feed it to the DAQmx vi. The second output, speaker 2, is my controlled output to the system to keep my input at a certain level. In a close loop control system style, I take the input signal which has been excited by speaker 1 and compare it to a desired fixed value. I take the difference, Error, and multiply it by a gain and feed it back to the system, and that is my speaker 2. The goal is to have my input, the resulted sinusoidal signal due to speaker 1, at a certain value by comparing it instantaneously to a fixed value and feed back the error value to the system. in order to achieve this goal, an RMS value has to be taken from the input signal to be compared to the desired value which is the reference value.
 
what I am trying to achieve here is taking the RMS/peak value of the acquired data for every single cycle by speaker 1 and multiply it by a gain and feeding it back to speaker 2  before speaker 2 generates its next cycle of the sinusoidal signal. Starting off the first generated cycle of the signal form speaker 1, the DAQ acquires data from microphones, sensors, and takes the RMS or Peak value for this single cycle. The RMS value will be subtracted from the desired value, and the resulted error will be multiplied by a gain, and sent to speaker 2. And It will keep on running until the RMS value matches the desired value and the error would be zero. The job of speaker 2 is to control the system and keep the output at a certain level. 
I don't how to make this work. As I am still clueless on what do. I have tried methods like Case Structure where I've delayed the iteration time to wait till first period finishes and speaker 1 excites, and then acquire data and then process it and send signal to speaker 2. Also I tried flat structures, timed structures....
0 Kudos
Message 1 of 4
(2,931 Views)
I can't look at your code from my phone, so I'll ask a general question: have you gone through any of the online tutorials? You seem to be asking very many basic questions.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 4
(2,926 Views)

Hi Mike, 

Yes I did. but nothing came out as expected. 

0 Kudos
Message 3 of 4
(2,919 Views)

I'm not sure, from your description, but when I see things like "every single cycle" and "closed loop control", I start to wonder how much signal theory you have, and whether you know about such things as stability, poles and zeros, etc.  It is extremely difficult to control a signal on a cycle-by-cycle basis, since you have to look at a signal for at least a cycle in order to estimate its amplitude, which means that you can't use this to control the current cycle, but only the next cycle.  Most commonly, you might want a good estimate (which means averaging) before jumping into a closed-loop control scheme -- noise has a funny way of getting in the way otherwise.

 

BS

0 Kudos
Message 4 of 4
(2,893 Views)