Global variable definition

reza hakimi_20486
reza hakimi_20486 Altair Community Member
edited January 2 in Community Q&A

Hello

In the rms block, I want to calculate the rms value of a signal whose frequency is variable.

Now, how to give the frequency of that signal which is calculated in another part of the circuit and is changing to the rms block?

Tagged:

Answers

  • Rhonda_20369
    Rhonda_20369 New Altair Community Member
    edited January 2

    Hi, Reza,

    When you can't find a block to perform the function you want, you have many choices in PSIM.

    First of all, you need to know how many math algorithms out there, which ones would fit to be in your project, and which one is the best as your choice.

    Then, you can use PSIM's function blocks to implement your algorithm.

     

    The rms (root-mean-square) value is, by definition an "average" of an AC signal. Its math formula is:

    image

    How to implement those formulars in a digitized system for different applications, you may find many algorithms by searching textbooks and technical articles.

    There are many blocks in PSIM you can use to build an "averaging" algorithm. And these blocks are supported for code generation.

    In "Elements >> Control >> Digital Control", there are several types of digital integrators and several types of digital filters. 

    According to your own algorithm, you should be able to use those blocks, and other PSIM control blocks, to build your own rms circuit.

    Of course, you can also use "Simplified C Block" or "SimCoder C Block" and write your own C code to implement your own algorithm.

     

    Sincerely,

    Rhonda