Simulink help for getting a frequency I can use as an input

AI Thread Summary
To extract the frequency from a sine wave in Simulink, users can utilize the Phase-Locked Loop (PLL) block, which is available for both single and three-phase signals. However, some users have difficulty connecting the PLL to output the actual frequency value, often only receiving a constant value instead. Alternatives include using the FFT block from the DSP toolbox or implementing a custom function for the Fourier transform to obtain frequency information. Users are encouraged to explore individual blocks to create a subsystem for future use. Effective frequency extraction is essential for controlling variable frequencies in applications like Double Fed Induction Generators.
Vagabond7
Messages
50
Reaction score
11
Ok, say I have a sine wave block that has a frequency of 60Hz. What can I do to get that frequency as a number so I can use it as an input to another block? I've tried various things such as a "sign" block that counts when it switches from positive to negative and then a counter that resets after a second. That doesn't work. It counts up and resets, but it doesn't just tell me what the frequency of the signal is. I want something that will just say "hey, the frequency of the input signal is this." so I can feed it into another block.

Essentially I am trying to get a frequency I can feed into a PID so I can control a variable frequency to keep it at a steady 60 Hz.

I am actually trying to control the frequency of a Double fed induction generator that doesn't have a steady output voltage frequency. We can control the rotor frequency as a means of controlling the stator output frequency, but I am trying to do this automatically with a PID controller. I'm feeding the stator voltage into a controller that can run simulink models, but I can't get it to just say what the stator frequency is. I can't find anything is simulink that will just give me a block that has the frequency of the input signal that I can feed into something else. Any suggestions?
 
Engineering news on Phys.org
Hi,
You can use PLL block in Simulink to find the frequency of the signal. Both single and three-phase PLLs are available in Simulink.
 
I had looked at the PLL block, but I couldn't find a way to hook it up to anything that actually gave me the frequency. Say for example, I just hook up a sinewave block set to 60Hz to the PLL, what do I need to run the Frequency output to for it to say "60"? I tried just hooking it up to a display but it would only give me a 1 I think. What do I need to do with the PLL to actually get it to output the frequency being fed in?
 
unless you have the DSP toolbox, there is not a drop in block.

have you had a signals and systems class?
You want to extract frequency information, which implies a DFT, FFT, or continuous Fourier transform function.
Either use the FFT block from the DSP toolbox, or use the s-block to write your own function and implement the Fourier transform or fft or dft.
or you can use individual blocks to implement the for-mentioned functions. Then you can save the pattern as a subsystem and use it in the future.
 
Last edited:
I used to be an HVAC technician. One time I had a service call in which there was no power to the thermostat. The thermostat did not have power because the fuse in the air handler was blown. The fuse in the air handler was blown because there was a low voltage short. The rubber coating on one of the thermostat wires was chewed off by a rodent. The exposed metal in the thermostat wire was touching the metal cabinet of the air handler. This was a low voltage short. This low voltage...
Hey guys. I have a question related to electricity and alternating current. Say an alien fictional society developed electricity, and settled on a standard like 73V AC current at 46 Hz. How would appliances be designed, and what impact would the lower frequency and voltage have on transformers, wiring, TVs, computers, LEDs, motors, and heating, assuming the laws of physics and technology are the same as on Earth?
Thread 'How Does Jaguar's 1980s V12 Dual Coil Ignition System Enhance Spark Strength?'
I have come across a dual coil ignition system as used by Jaguar on their V12 in the 1980's. It uses two ignition coils with their primary windings wired in parallel. The primary coil has its secondary winding wired to the distributor and then to the spark plugs as is standard practice. However, the auxiliary coil has it secondary winding output sealed off. The purpose of the system was to provide a stronger spark to the plugs, always a difficult task with the very short dwell time of a...
Back
Top