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

In summary, the conversation is about finding the frequency of a sine wave block in Simulink and using it as an input for another block. The person is trying to use a sign block and counter to determine the frequency, but it is not working. They want a block that can directly output the frequency of the input signal. Suggestions are made to use a PLL block or implement a DFT, FFT, or continuous Fourier transform function. It is also mentioned that these functions may require the DSP toolbox or can be implemented using individual blocks.
  • #1
Vagabond7
50
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
  • #2
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.
 
  • #3
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?
 
  • #4
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:

1. What is Simulink and how can it help me get a usable frequency as an input?

Simulink is a visual programming environment used for modeling, simulating, and analyzing dynamic systems. It can help you get a usable frequency as an input by providing various tools and functions for signal processing and analysis.

2. How can I access Simulink in my research or experiments?

Simulink is a part of the MATLAB software, so you can access it by downloading and installing MATLAB on your computer. Simulink can also be accessed through MATLAB Online or MATLAB Mobile.

3. Can Simulink help me with generating and analyzing signals of different frequencies?

Yes, Simulink has built-in blocks and tools for generating and analyzing signals of different frequencies. You can use these tools to create signals of specific frequencies and analyze their behavior in your system.

4. Is there a specific procedure for getting a usable frequency as an input using Simulink?

The procedure for getting a usable frequency as an input may vary depending on your specific application and system. However, Simulink provides various tutorials, examples, and documentation to help you understand and use its tools for frequency input.

5. Can I use Simulink to design and implement a control system with a specific frequency response?

Yes, Simulink has tools for designing and implementing control systems with specific frequency responses. You can use these tools to design and tune your control system to achieve the desired frequency response for your system.

Similar threads

  • Electrical Engineering
Replies
1
Views
873
Replies
46
Views
3K
  • Electrical Engineering
Replies
11
Views
939
  • Electrical Engineering
Replies
1
Views
991
Replies
26
Views
4K
Replies
10
Views
468
  • Electrical Engineering
Replies
23
Views
1K
  • Electrical Engineering
Replies
1
Views
3K
Replies
6
Views
930
Replies
8
Views
1K
Back
Top