06-08-2021 07:25 AM - edited 06-08-2021 07:37 AM
Hi Bhavani,
@Bhavani08 wrote:
I am actualy struck at the term u(t-t1) and u(t-t2),it is unit step function and how should it be actually given?? I tried using formula node and formula waveform but there was no function that implements the step function in both the cases. I am unable to give the u(t-t1) and u(t-t2) as input,even if I try I got error.
Where does those terms appear in the formulas given in your previous message? Where did you mention those "unit step functions" before? I thought the "u(t2)/u(t1)" terms refer to voltage values at a given time…
So "u(t-t1)" is 0 for t<t1 and 1 for t>=t1? What about a simple comparison followed by a select node (or just a BooleanTo0/1)?
Why do you need a formula node when you can use simple math functions?
What is a "formula waveform"?
Just to give you an idea:

06-08-2021 07:30 AM
@Bhavani08 wrote:
I am actualy struck at the term u(t-t1) and u(t-t2),it is unit step function
This one? https://en.wikipedia.org/wiki/Heaviside_step_function
Looks like this would do the trick:
06-08-2021 07:39 AM - edited 06-08-2021 07:48 AM
@LLindenbauer wrote:Looks like this would do the trick:
It can be even simpler. Rather than calculating the difference t-t1 and then using your code, you could directly use a ">=" node with the two arguments t and t1 wired to it, in place of the >0 function. Just as Gerd is using in his sample.
But other than in Gerds example, A is likely the time domain signal to analyze (so most likely really should be written as A(t) ) and t is the loop iteration counter scaled with the sample interval time.
06-08-2021 07:49 AM - edited 06-08-2021 07:49 AM
Hi,
@rolfk wrote:But other than in Gerds example, A is likely the time domain signal to analyze and t is the loop iteration counter scaled with the sample interval time.
According to Bhavanis table A is given as constant value of "A=1".
I used the Ramp pattern to create that "time array" from 0 to "T end", no scaling needed.
Update to the image above: due thanks to polymorphism you don't need the FOR loop…
06-08-2021 07:55 AM
@GerdW wrote:
Hi,
@rolfk wrote:But other than in Gerds example, A is likely the time domain signal to analyze and t is the loop iteration counter scaled with the sample interval time.
According to Bhavanis table A is given as constant value of "A=1".
I used the Ramp pattern to create that "time array" from 0 to "T end", no scaling needed.
Update to the image above:
duethanks to polymorphism you don't need the FOR loop…
Seems logical but makes little sense. That calculates some variation over a monotonically increasing ramp with the only variable inputs being t1 and t2? Sounds not very useful to me in terms of AC measurements.
06-08-2021 08:12 AM
Hi Rolf,
@rolfk wrote:
Seems logical but makes little sense.
I try to translate the formula given by Bhavani in its given pure logical/mathematical form.
When Bhavani provides other formulas then (s)he has to change the implementation as well…
06-08-2021 09:09 AM
@GerdW wrote:
Hi Rolf,
@rolfk wrote:
Seems logical but makes little sense.I try to translate the formula given by Bhavani in its given pure logical/mathematical form.
When Bhavani provides other formulas then (s)he has to change the implementation as well…
I understand. Just pointing out that it's likely not quite the solution yet. Without more input from the OP, it's however all we can do.
06-08-2021 09:43 AM - edited 06-08-2021 09:47 AM
Actually I tried the block diagram given above, I am not able to get the desired output. Is there any other way to generate voltage sag??
06-08-2021 09:47 AM - edited 06-08-2021 09:48 AM
Hi Bhavani,
@Bhavani08 wrote:
I am not able to get the desired output. Is there any other way to generate voltage sag??
What is the expected/desired output?
Why don't you attach your VI/implementation?
When you attach a VI: include data, which shows the desired output in contrast to the output you get currently…
(You could implement the desired algorithm in an Excel workbook to create the "desired output". This way we could compare your Excel algorithm with your LabVIEW implementation.)
06-08-2021 09:59 AM
The desired output required is being attached,