LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Phase Locked Loop (PLL) at 80kHz using sound card input and output signal

Hello

I'm building an induction heater hoven that consists on a simple RLC circuit and a switching circuit that should be run with the resonance frequency (fR) of the RLC circuit. As the fR changes with the temperature increase, I need to implement a PLL that compares the signal (Vin) phase and the current (C) phase to keep them in phase and achieve fR along the heating process.

I made the Sound OUT.vi attached to use the sound card as signal output for a square wave but signal that I read in the oscilloscope is nothing compared from what I need.

Can someone assist me in this problem?

Best regards

 

0 Kudos
Message 1 of 6
(2,697 Views)

Hi jormo,

 

you initialize the sound output to use a samplerate of 192kHz, but you create waveforms using 3MHz samplerate.

Why do you think this will be a good idea?

 

What are the specs of your sound card? Are you really expecting to output square waves at 192kS/s?

 

And why do you unbundle the cluster elements using UnbundleByName and additionally a second time using Unbundle? Why not just split wires?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(2,674 Views)

Thank you for the reply.

The unbundle part was just a study test.

My sound card is working at 192 kHz, 24bit; the fact that I put a 3MHz sampleRate is because at lower sR I have an output wave with enough resolution. Since I need to actuate the power switches with maximum synchrony I need generate a square wave with the minimum distortion.

The RLC expected resonance frequency interval = [60 90] KHz along the heating process.

0 Kudos
Message 3 of 6
(2,646 Views)

Hi jormo,

 

you need to generate your waveforms with same samplerate as your soundcard is configured for!

 

The RLC expected resonance frequency interval = [60 90] KHz along the heating process.

So the ratio to your samplerate is just 3 to 2: you will never create needed square waves using your soundcard.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(2,640 Views)

Hi GerdW

I made some new tests and found out that the above 20kHz the output wave is not the one I generate in the vi. The frequency is not the same, as it can be seen in the osciloscope fotos.

From the sample rate available in the sound card (192kHz) I should be able to create at lest a 60kHz wave with good resolution, correct?

Is there any limitation imposed by the sound vi?

best regards

0 Kudos
Message 5 of 6
(2,629 Views)

Hi jormo,

 

two points:

- in your VI screenshots you should use a different plot style: use a plot stly with steps as interpolation between samples…

- please read the full specs of your sound card! What is given there about its frequency response? Are there any filters built in?

 

From the sample rate available in the sound card (192kHz) I should be able to create at lest a 60kHz wave with good resolution, correct?

Have you ever seen the FFT of a square wave? Do you know the amount of harmonics needed to "build" square waves? No, I don't think you will get a "good resolution square" wave with your soundcard for this frequency range!

When you want to achieve accurate results you should be professional DAQ equipment…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(2,626 Views)