LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate a staircase waveform with the edges SMOOTHENED ?

Solved!
Go to solution

I want to generate a staircase waveform whose edges have been smoothened ? How do I do that?? Should I just use a filter at the output of a stair case generator or there are other efficient ways? The waveform should be somewhat as shown in the attached file. Please advise

0 Kudos
Message 1 of 12
(4,100 Views)

Hi biswa,

 

the plot looks like several steps with an exponential decay.

You might build up your waveform using some simple math functions…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 12
(4,083 Views)

It looks like a simple first order low-pass filter can do the job. If could be an analog or a digital filter depending on your hardware setup.

 

If you want to calculate the waveform (the digital filter approach) you can first create your ideal staircase waveform and then pass it through for example a first order digital Butterworth lowpass filter.

 

If you go for the analog approach a simple Resistor-Capacitor (RC) lowpass filter can do the trick.

0 Kudos
Message 3 of 12
(4,080 Views)

Attached herewith is a VI which might give you a perspective of what I am trying to achieve. I have incorporated the filter as you have mentioned but there seems to be glitch in the signal type. I will need something to convert the dynamic data to double it seems.

0 Kudos
Message 4 of 12
(4,068 Views)

I have attached a VI that shows an easy way to design your waveform using array concatenation and the Butterworth filter VI. The VI shows both simple array and waveform data type (WDT) options.

 

Message 5 of 12
(4,049 Views)

I would like to smoothen the edges of a staircase signal which is generated in the attached VI. Please suggest me a suitable lowpass filter that would smoothen the edges without leading to violation of the signal types.

0 Kudos
Message 6 of 12
(4,065 Views)

Hi biswa,

 

PLEASE don't create double posts in different threads!

Stick with your thread as long as the topic doesn't change!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 12
(4,042 Views)
Solution
Accepted by topic author biswa263

If you want to filter your signals point-by-point use the Butterworth pbp filter in the Signal Processing -Point by Point - Filter palette. Remember to set the order to 1 to avoid overshoot (the default value is second order).

Message 8 of 12
(4,034 Views)

Thank You for the support. I have been able to use your idea to use your idea to my advantage. I have attached the VI where I have used the filter within the control design and simulation loop because I am eventually going to use it for a set-point tracking of a plant.

0 Kudos
Message 9 of 12
(4,010 Views)

You've connected your cut-off frequency value to the high cutoff freq input of your filter VI, it should be connected to the low cutoff freq input instead.

Right now the used cut-off frequency is the default value of 0.125.

0 Kudos
Message 10 of 12
(4,005 Views)