1
\$\begingroup\$

I'm trying to add the following function on my Simulink model.

enter image description here

where C, B, and N are already variables in my file. Is the correct way to multiply omega by the gains 3N and N/2 an input that into the sine (as shown)

enter image description here

or should I change the value of the frequency? If so, what would be the right value?

enter image description here

Thanks

\$\endgroup\$
1
  • 2
    \$\begingroup\$ This is a tricky question because nothing is specified for what your frequency should be. Henceforth, the frequency is arbitrary. The only difference you will see is more wave cycles per period of time. It won't affect any magnitudinal behavior... The only thing you'll see is the positional phase value of the wave. The right frequency value is what you need, which isn't specified here, so just choose something... :) \$\endgroup\$
    – user103380
    Commented Apr 4, 2018 at 2:12

2 Answers 2

1
\$\begingroup\$

It really comes down to how much control you want.
\$f_1(\omega) = Csin(\frac{Nt}{2}\omega)\$

\$f_2(\omega) = Bsin(3Nt \omega)\$

In your two equations the gain (C,B) and frequency (N) are your tunabled. Your attempt to realize this in simulink is purely on gain which produces:

\$f_1(\omega) = \frac{N}{2}sin(\omega t)\$

\$f_2(\omega) = 3Nsin(\omega t)\$

If you want a sinus source matching these equations then use the source block configured appropriately enter image description here

If you want to be able to vary the frequency and/or the amplitude use the SineWave function block. Feed in a ramp to set \$3N\omega\$ and an output gain block to set C

enter image description here

Your variables: B,C, N \$\omega\$ can then be set in an m-file or datadictionary.

IF you need these parameters varying this is also viable but a multiplying block is required and the ramp needs a varying slope (maybe via a mux)

\$\endgroup\$
1
  • \$\begingroup\$ So, the omega is an input form the simulation I'm doing, meaning it varies. And then B, C, and N are on my parameters file. I think the latter option you gave is the one that will fit my model. I appreciate your reply, thanks a lot. \$\endgroup\$
    – DJE.T.
    Commented Apr 4, 2018 at 18:08
0
\$\begingroup\$

Making sinusoidal signal with parameters:

Start from linear ramp block (=t). Multiply it with wanted angular velocity. It in your case is calculated from your variables. Input the result to sine calculation block. Multiply the result with the wanted amplitude.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.