LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview

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:

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 26
(1,596 Views)

@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:

LLindenbauer_0-1623155240998.png

 

0 Kudos
Message 12 of 26
(1,591 Views)

@LLindenbauer wrote:

Looks like this would do the trick:

LLindenbauer_0-1623155240998.png


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.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 13 of 26
(1,578 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 26
(1,569 Views)

@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: due thanks 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.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 15 of 26
(1,560 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 26
(1,557 Views)

@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.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 17 of 26
(1,542 Views)

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?? 

0 Kudos
Message 18 of 26
(1,530 Views)

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.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 19 of 26
(1,526 Views)

The desired output required is being attached, 

0 Kudos
Message 20 of 26
(1,517 Views)